From 3109b81078e70ac87f27bb4e3591558cf440d9ba Mon Sep 17 00:00:00 2001 From: Sander Postma Date: Fri, 28 Jul 2017 16:31:48 +0200 Subject: [PATCH 01/10] Project rename --- .gitignore | 15 +- buildAllMavenProfiles.cmd | 9 +- csharp-net35/.gitignore | 185 + csharp-net35/.swagger-codegen-ignore | 23 + csharp-net35/.travis.yml | 21 + csharp-net35/LICENSE | 201 + csharp-net35/README.md | 127 + .../Sphereon.SDK.TemplateProcessor.sln | 27 + csharp-net35/build.bat | 28 + csharp-net35/build.sh | 48 + csharp-net35/docs/DataSetResponse.md | 12 + csharp-net35/docs/Error.md | 12 + csharp-net35/docs/ErrorResponse.md | 9 + csharp-net35/docs/Lifecycle.md | 11 + csharp-net35/docs/MergeApi.md | 874 ++ csharp-net35/docs/MergeJob.md | 19 + csharp-net35/docs/MergeJobResponse.md | 12 + csharp-net35/docs/MergeSettings.md | 17 + csharp-net35/docs/OutputSettings.md | 10 + csharp-net35/docs/OwnerInfo.md | 12 + csharp-net35/docs/StreamLocation.md | 12 + csharp-net35/docs/TemplateContext.md | 14 + csharp-net35/docs/TemplateContextRequest.md | 12 + csharp-net35/docs/TemplateContextResponse.md | 12 + csharp-net35/git_push.sh | 52 + csharp-net35/mono_nunit_test.sh | 33 + .../Api/MergeApiTests.cs | 241 + .../Model/DataSetResponseTests.cs | 114 + .../Model/ErrorResponseTests.cs | 90 + .../Model/ErrorTests.cs | 114 + .../Model/LifecycleTests.cs | 106 + .../Model/MergeJobResponseTests.cs | 114 + .../Model/MergeJobTests.cs | 170 + .../Model/MergeSettingsTests.cs | 154 + .../Model/OutputSettingsTests.cs | 98 + .../Model/OwnerInfoTests.cs | 114 + .../Model/StreamLocationTests.cs | 114 + .../Model/TemplateContextRequestTests.cs | 114 + .../Model/TemplateContextResponseTests.cs | 114 + .../Model/TemplateContextTests.cs | 130 + ...Sphereon.SDK.TemplateProcessor.Test.csproj | 94 + .../packages.config | 6 + .../Api/MergeApi.cs | 1491 +++ .../Client/ApiClient.cs | 468 + .../Client/ApiException.cs | 72 + .../Client/ApiResponse.cs | 66 + .../Client/Configuration.cs | 338 + .../Client/ExceptionFactory.cs | 36 + .../Client/IApiAccessor.cs | 54 + .../Model/DataSetResponse.cs | 209 + .../Model/Error.cs | 226 + .../Model/ErrorResponse.cs | 126 + .../Model/Lifecycle.cs | 191 + .../Model/MergeJob.cs | 344 + .../Model/MergeJobResponse.cs | 228 + .../Model/MergeSettings.cs | 328 + .../Model/OutputSettings.cs | 271 + .../Model/OwnerInfo.cs | 175 + .../Model/StreamLocation.cs | 171 + .../Model/TemplateContext.cs | 237 + .../Model/TemplateContextRequest.cs | 205 + .../Model/TemplateContextResponse.cs | 216 + .../Properties/AssemblyInfo.cs | 32 + .../Sphereon.SDK.TemplateProcessor.csproj | 82 + .../packages.config | 5 + csharp-net45/.gitignore | 185 + csharp-net45/.swagger-codegen-ignore | 23 + csharp-net45/.travis.yml | 21 + csharp-net45/LICENSE | 201 + csharp-net45/README.md | 127 + .../Sphereon.SDK.TemplateProcessor.sln | 27 + csharp-net45/build.bat | 28 + csharp-net45/build.sh | 48 + csharp-net45/docs/DataSetResponse.md | 12 + csharp-net45/docs/Error.md | 12 + csharp-net45/docs/ErrorResponse.md | 9 + csharp-net45/docs/Lifecycle.md | 11 + csharp-net45/docs/MergeApi.md | 874 ++ csharp-net45/docs/MergeJob.md | 19 + csharp-net45/docs/MergeJobResponse.md | 12 + csharp-net45/docs/MergeSettings.md | 17 + csharp-net45/docs/OutputSettings.md | 10 + csharp-net45/docs/OwnerInfo.md | 12 + csharp-net45/docs/StreamLocation.md | 12 + csharp-net45/docs/TemplateContext.md | 14 + csharp-net45/docs/TemplateContextRequest.md | 12 + csharp-net45/docs/TemplateContextResponse.md | 12 + csharp-net45/git_push.sh | 52 + csharp-net45/mono_nunit_test.sh | 33 + .../Api/MergeApiTests.cs | 241 + .../Model/DataSetResponseTests.cs | 114 + .../Model/ErrorResponseTests.cs | 90 + .../Model/ErrorTests.cs | 114 + .../Model/LifecycleTests.cs | 106 + .../Model/MergeJobResponseTests.cs | 114 + .../Model/MergeJobTests.cs | 170 + .../Model/MergeSettingsTests.cs | 154 + .../Model/OutputSettingsTests.cs | 98 + .../Model/OwnerInfoTests.cs | 114 + .../Model/StreamLocationTests.cs | 114 + .../Model/TemplateContextRequestTests.cs | 114 + .../Model/TemplateContextResponseTests.cs | 114 + .../Model/TemplateContextTests.cs | 130 + ...Sphereon.SDK.TemplateProcessor.Test.csproj | 94 + .../packages.config | 6 + .../Api/MergeApi.cs | 2845 ++++++ .../Client/ApiClient.cs | 494 + .../Client/ApiException.cs | 72 + .../Client/ApiResponse.cs | 66 + .../Client/Configuration.cs | 338 + .../Client/ExceptionFactory.cs | 36 + .../Client/IApiAccessor.cs | 54 + .../Model/DataSetResponse.cs | 209 + .../Model/Error.cs | 226 + .../Model/ErrorResponse.cs | 126 + .../Model/Lifecycle.cs | 191 + .../Model/MergeJob.cs | 344 + .../Model/MergeJobResponse.cs | 228 + .../Model/MergeSettings.cs | 328 + .../Model/OutputSettings.cs | 271 + .../Model/OwnerInfo.cs | 175 + .../Model/StreamLocation.cs | 171 + .../Model/TemplateContext.cs | 237 + .../Model/TemplateContextRequest.cs | 205 + .../Model/TemplateContextResponse.cs | 216 + .../Properties/AssemblyInfo.cs | 32 + .../Sphereon.SDK.TemplateProcessor.csproj | 82 + .../packages.config | 5 + html-docs/.swagger-codegen-ignore | 23 + html-docs/LICENSE | 201 + html-docs/index.html | 8465 +++++++++++++++++ java8-jersey2/.gitignore | 21 + java8-jersey2/.swagger-codegen-ignore | 23 + java8-jersey2/.travis.yml | 29 + java8-jersey2/LICENSE | 201 + java8-jersey2/README.md | 149 + java8-jersey2/build.gradle | 113 + java8-jersey2/build.sbt | 24 + java8-jersey2/docs/DataSetResponse.md | 22 + java8-jersey2/docs/Error.md | 22 + java8-jersey2/docs/ErrorResponse.md | 10 + java8-jersey2/docs/Lifecycle.md | 27 + java8-jersey2/docs/MergeApi.md | 718 ++ java8-jersey2/docs/MergeJob.md | 32 + java8-jersey2/docs/MergeJobResponse.md | 25 + java8-jersey2/docs/MergeSettings.md | 34 + java8-jersey2/docs/OutputSettings.md | 42 + java8-jersey2/docs/OwnerInfo.md | 13 + java8-jersey2/docs/StreamLocation.md | 13 + java8-jersey2/docs/TemplateContext.md | 23 + java8-jersey2/docs/TemplateContextRequest.md | 21 + java8-jersey2/docs/TemplateContextResponse.md | 23 + java8-jersey2/git_push.sh | 52 + java8-jersey2/gradle.properties | 2 + .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 53639 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 + java8-jersey2/gradlew | 160 + java8-jersey2/gradlew.bat | 90 + java8-jersey2/pom.xml | 182 + java8-jersey2/settings.gradle | 1 + java8-jersey2/src/main/AndroidManifest.xml | 3 + .../sdk/template_processor/api/MergeApi.java | 598 ++ .../template_processor/handler/ApiClient.java | 699 ++ .../handler/ApiException.java | 103 + .../handler/Configuration.java | 51 + .../sdk/template_processor/handler/JSON.java | 37 + .../sdk/template_processor/handler/Pair.java | 64 + .../handler/RFC3339DateFormat.java | 44 + .../handler/StringUtil.java | 67 + .../handler/auth/ApiKeyAuth.java | 87 + .../handler/auth/Authentication.java | 41 + .../handler/auth/HttpBasicAuth.java | 70 + .../handler/auth/OAuth.java | 51 + .../handler/auth/OAuthFlow.java | 30 + .../model/DataSetResponse.java | 177 + .../sdk/template_processor/model/Error.java | 204 + .../model/ErrorResponse.java | 110 + .../template_processor/model/Lifecycle.java | 207 + .../template_processor/model/MergeJob.java | 349 + .../model/MergeJobResponse.java | 192 + .../model/MergeSettings.java | 356 + .../model/OutputSettings.java | 215 + .../template_processor/model/OwnerInfo.java | 171 + .../model/StreamLocation.java | 171 + .../model/TemplateContext.java | 256 + .../model/TemplateContextRequest.java | 202 + .../model/TemplateContextResponse.java | 189 + .../template_processor/api/MergeApiTest.java | 264 + java8-okhttp-gson/.gitignore | 21 + java8-okhttp-gson/.swagger-codegen-ignore | 23 + java8-okhttp-gson/.travis.yml | 29 + java8-okhttp-gson/LICENSE | 201 + java8-okhttp-gson/README.md | 149 + java8-okhttp-gson/build.gradle | 102 + java8-okhttp-gson/build.sbt | 19 + java8-okhttp-gson/docs/DataSetResponse.md | 22 + java8-okhttp-gson/docs/Error.md | 22 + java8-okhttp-gson/docs/ErrorResponse.md | 10 + java8-okhttp-gson/docs/Lifecycle.md | 27 + java8-okhttp-gson/docs/MergeApi.md | 718 ++ java8-okhttp-gson/docs/MergeJob.md | 32 + java8-okhttp-gson/docs/MergeJobResponse.md | 25 + java8-okhttp-gson/docs/MergeSettings.md | 34 + java8-okhttp-gson/docs/OutputSettings.md | 42 + java8-okhttp-gson/docs/OwnerInfo.md | 13 + java8-okhttp-gson/docs/StreamLocation.md | 13 + java8-okhttp-gson/docs/TemplateContext.md | 23 + .../docs/TemplateContextRequest.md | 21 + .../docs/TemplateContextResponse.md | 23 + java8-okhttp-gson/git_push.sh | 52 + java8-okhttp-gson/gradle.properties | 2 + .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 53639 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 + java8-okhttp-gson/gradlew | 160 + java8-okhttp-gson/gradlew.bat | 90 + java8-okhttp-gson/pom.xml | 148 + java8-okhttp-gson/settings.gradle | 1 + .../src/main/AndroidManifest.xml | 3 + .../sdk/template_processor/api/MergeApi.java | 1483 +++ .../handler/ApiCallback.java | 74 + .../template_processor/handler/ApiClient.java | 1325 +++ .../handler/ApiException.java | 103 + .../handler/ApiResponse.java | 71 + .../handler/Configuration.java | 51 + .../sdk/template_processor/handler/JSON.java | 239 + .../sdk/template_processor/handler/Pair.java | 64 + .../handler/ProgressRequestBody.java | 95 + .../handler/ProgressResponseBody.java | 88 + .../handler/StringUtil.java | 67 + .../handler/auth/ApiKeyAuth.java | 87 + .../handler/auth/Authentication.java | 41 + .../handler/auth/HttpBasicAuth.java | 66 + .../handler/auth/OAuth.java | 51 + .../handler/auth/OAuthFlow.java | 30 + .../model/DataSetResponse.java | 169 + .../sdk/template_processor/model/Error.java | 196 + .../model/ErrorResponse.java | 109 + .../template_processor/model/Lifecycle.java | 189 + .../template_processor/model/MergeJob.java | 344 + .../model/MergeJobResponse.java | 187 + .../model/MergeSettings.java | 339 + .../model/OutputSettings.java | 213 + .../template_processor/model/OwnerInfo.java | 170 + .../model/StreamLocation.java | 170 + .../model/TemplateContext.java | 247 + .../model/TemplateContextRequest.java | 193 + .../model/TemplateContextResponse.java | 182 + .../template_processor/api/MergeApiTest.java | 264 + java8-retrofit2/.gitignore | 21 + java8-retrofit2/.swagger-codegen-ignore | 23 + java8-retrofit2/.travis.yml | 29 + java8-retrofit2/LICENSE | 201 + java8-retrofit2/README.md | 39 + java8-retrofit2/build.gradle | 111 + java8-retrofit2/build.sbt | 20 + java8-retrofit2/docs/DataSetResponse.md | 22 + java8-retrofit2/docs/Error.md | 22 + java8-retrofit2/docs/ErrorResponse.md | 10 + java8-retrofit2/docs/Lifecycle.md | 27 + java8-retrofit2/docs/MergeApi.md | 718 ++ java8-retrofit2/docs/MergeJob.md | 32 + java8-retrofit2/docs/MergeJobResponse.md | 25 + java8-retrofit2/docs/MergeSettings.md | 34 + java8-retrofit2/docs/OutputSettings.md | 42 + java8-retrofit2/docs/OwnerInfo.md | 13 + java8-retrofit2/docs/StreamLocation.md | 13 + java8-retrofit2/docs/TemplateContext.md | 23 + .../docs/TemplateContextRequest.md | 21 + .../docs/TemplateContextResponse.md | 23 + java8-retrofit2/git_push.sh | 52 + java8-retrofit2/gradle.properties | 2 + .../gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 53639 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 + java8-retrofit2/gradlew | 160 + java8-retrofit2/gradlew.bat | 90 + java8-retrofit2/pom.xml | 151 + java8-retrofit2/settings.gradle | 1 + java8-retrofit2/src/main/AndroidManifest.xml | 3 + .../sdk/template_processor/api/MergeApi.java | 223 + .../template_processor/handler/ApiClient.java | 415 + .../handler/CollectionFormats.java | 95 + .../handler/StringUtil.java | 67 + .../handler/auth/ApiKeyAuth.java | 68 + .../handler/auth/HttpBasicAuth.java | 50 + .../handler/auth/OAuth.java | 176 + .../handler/auth/OAuthFlow.java | 30 + .../handler/auth/OAuthOkHttpClient.java | 72 + .../model/DataSetResponse.java | 169 + .../sdk/template_processor/model/Error.java | 196 + .../model/ErrorResponse.java | 109 + .../template_processor/model/Lifecycle.java | 189 + .../template_processor/model/MergeJob.java | 344 + .../model/MergeJobResponse.java | 187 + .../model/MergeSettings.java | 339 + .../model/OutputSettings.java | 213 + .../template_processor/model/OwnerInfo.java | 170 + .../model/StreamLocation.java | 170 + .../model/TemplateContext.java | 247 + .../model/TemplateContextRequest.java | 193 + .../model/TemplateContextResponse.java | 182 + .../template_processor/api/MergeApiTest.java | 206 + javascript/.swagger-codegen-ignore | 23 + javascript/.travis.yml | 7 + javascript/LICENSE | 201 + javascript/README.md | 127 + javascript/docs/DataSetResponse.md | 24 + javascript/docs/Error.md | 24 + javascript/docs/ErrorResponse.md | 8 + javascript/docs/Lifecycle.md | 30 + javascript/docs/MergeApi.md | 699 ++ javascript/docs/MergeJob.md | 37 + javascript/docs/MergeJobResponse.md | 30 + javascript/docs/MergeSettings.md | 38 + javascript/docs/OutputSettings.md | 61 + javascript/docs/OwnerInfo.md | 11 + javascript/docs/StreamLocation.md | 11 + javascript/docs/TemplateContext.md | 24 + javascript/docs/TemplateContextRequest.md | 22 + javascript/docs/TemplateContextResponse.md | 26 + javascript/git_push.sh | 52 + javascript/mocha.opts | 0 javascript/package.json | 18 + .../SphereonTemplateProcessor/ApiClient.js | 515 + .../SphereonTemplateProcessor/api/MergeApi.js | 672 ++ .../src/SphereonTemplateProcessor/index.js | 146 + .../model/DataSetResponse.js | 143 + .../SphereonTemplateProcessor/model/Error.js | 140 + .../model/ErrorResponse.js | 91 + .../model/Lifecycle.js | 137 + .../model/MergeJob.js | 221 + .../model/MergeJobResponse.js | 157 + .../model/MergeSettings.js | 198 + .../model/OutputSettings.js | 208 + .../model/OwnerInfo.js | 119 + .../model/StreamLocation.js | 115 + .../model/TemplateContext.js | 151 + .../model/TemplateContextRequest.js | 134 + .../model/TemplateContextResponse.js | 147 + javascript/test/api/MergeApi.spec.js | 194 + javascript/test/model/DataSetResponse.spec.js | 94 + javascript/test/model/Error.spec.js | 94 + javascript/test/model/ErrorResponse.spec.js | 76 + javascript/test/model/Lifecycle.spec.js | 88 + javascript/test/model/MergeJob.spec.js | 136 + .../test/model/MergeJobResponse.spec.js | 94 + javascript/test/model/MergeSettings.spec.js | 124 + javascript/test/model/OutputSettings.spec.js | 82 + javascript/test/model/OwnerInfo.spec.js | 94 + javascript/test/model/StreamLocation.spec.js | 94 + javascript/test/model/TemplateContext.spec.js | 106 + .../test/model/TemplateContextRequest.spec.js | 94 + .../model/TemplateContextResponse.spec.js | 94 + pom.xml | 462 +- src/main/resources/config/csharp-net45.json | 10 +- swagger.sdk.json | 861 ++ 355 files changed, 58126 insertions(+), 81 deletions(-) create mode 100644 csharp-net35/.gitignore create mode 100644 csharp-net35/.swagger-codegen-ignore create mode 100644 csharp-net35/.travis.yml create mode 100644 csharp-net35/LICENSE create mode 100644 csharp-net35/README.md create mode 100644 csharp-net35/Sphereon.SDK.TemplateProcessor.sln create mode 100644 csharp-net35/build.bat create mode 100644 csharp-net35/build.sh create mode 100644 csharp-net35/docs/DataSetResponse.md create mode 100644 csharp-net35/docs/Error.md create mode 100644 csharp-net35/docs/ErrorResponse.md create mode 100644 csharp-net35/docs/Lifecycle.md create mode 100644 csharp-net35/docs/MergeApi.md create mode 100644 csharp-net35/docs/MergeJob.md create mode 100644 csharp-net35/docs/MergeJobResponse.md create mode 100644 csharp-net35/docs/MergeSettings.md create mode 100644 csharp-net35/docs/OutputSettings.md create mode 100644 csharp-net35/docs/OwnerInfo.md create mode 100644 csharp-net35/docs/StreamLocation.md create mode 100644 csharp-net35/docs/TemplateContext.md create mode 100644 csharp-net35/docs/TemplateContextRequest.md create mode 100644 csharp-net35/docs/TemplateContextResponse.md create mode 100644 csharp-net35/git_push.sh create mode 100644 csharp-net35/mono_nunit_test.sh create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Api/MergeApiTests.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/DataSetResponseTests.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/ErrorResponseTests.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/ErrorTests.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/LifecycleTests.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/MergeJobResponseTests.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/MergeJobTests.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/MergeSettingsTests.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/OutputSettingsTests.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/OwnerInfoTests.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/StreamLocationTests.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/TemplateContextRequestTests.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/TemplateContextResponseTests.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/TemplateContextTests.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Sphereon.SDK.TemplateProcessor.Test.csproj create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/packages.config create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Api/MergeApi.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ApiClient.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ApiException.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ApiResponse.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/Configuration.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ExceptionFactory.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/IApiAccessor.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/DataSetResponse.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/Error.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/ErrorResponse.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/Lifecycle.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/MergeJob.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/MergeJobResponse.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/MergeSettings.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/OutputSettings.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/OwnerInfo.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/StreamLocation.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContext.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextRequest.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextResponse.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Properties/AssemblyInfo.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Sphereon.SDK.TemplateProcessor.csproj create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/packages.config create mode 100644 csharp-net45/.gitignore create mode 100644 csharp-net45/.swagger-codegen-ignore create mode 100644 csharp-net45/.travis.yml create mode 100644 csharp-net45/LICENSE create mode 100644 csharp-net45/README.md create mode 100644 csharp-net45/Sphereon.SDK.TemplateProcessor.sln create mode 100644 csharp-net45/build.bat create mode 100644 csharp-net45/build.sh create mode 100644 csharp-net45/docs/DataSetResponse.md create mode 100644 csharp-net45/docs/Error.md create mode 100644 csharp-net45/docs/ErrorResponse.md create mode 100644 csharp-net45/docs/Lifecycle.md create mode 100644 csharp-net45/docs/MergeApi.md create mode 100644 csharp-net45/docs/MergeJob.md create mode 100644 csharp-net45/docs/MergeJobResponse.md create mode 100644 csharp-net45/docs/MergeSettings.md create mode 100644 csharp-net45/docs/OutputSettings.md create mode 100644 csharp-net45/docs/OwnerInfo.md create mode 100644 csharp-net45/docs/StreamLocation.md create mode 100644 csharp-net45/docs/TemplateContext.md create mode 100644 csharp-net45/docs/TemplateContextRequest.md create mode 100644 csharp-net45/docs/TemplateContextResponse.md create mode 100644 csharp-net45/git_push.sh create mode 100644 csharp-net45/mono_nunit_test.sh create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Api/MergeApiTests.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/DataSetResponseTests.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/ErrorResponseTests.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/ErrorTests.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/LifecycleTests.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/MergeJobResponseTests.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/MergeJobTests.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/MergeSettingsTests.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/OutputSettingsTests.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/OwnerInfoTests.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/StreamLocationTests.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/TemplateContextRequestTests.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/TemplateContextResponseTests.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/TemplateContextTests.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Sphereon.SDK.TemplateProcessor.Test.csproj create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/packages.config create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Api/MergeApi.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ApiClient.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ApiException.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ApiResponse.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/Configuration.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ExceptionFactory.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/IApiAccessor.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/DataSetResponse.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/Error.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/ErrorResponse.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/Lifecycle.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/MergeJob.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/MergeJobResponse.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/MergeSettings.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/OutputSettings.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/OwnerInfo.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/StreamLocation.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContext.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextRequest.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextResponse.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Properties/AssemblyInfo.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Sphereon.SDK.TemplateProcessor.csproj create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/packages.config create mode 100644 html-docs/.swagger-codegen-ignore create mode 100644 html-docs/LICENSE create mode 100644 html-docs/index.html create mode 100644 java8-jersey2/.gitignore create mode 100644 java8-jersey2/.swagger-codegen-ignore create mode 100644 java8-jersey2/.travis.yml create mode 100644 java8-jersey2/LICENSE create mode 100644 java8-jersey2/README.md create mode 100644 java8-jersey2/build.gradle create mode 100644 java8-jersey2/build.sbt create mode 100644 java8-jersey2/docs/DataSetResponse.md create mode 100644 java8-jersey2/docs/Error.md create mode 100644 java8-jersey2/docs/ErrorResponse.md create mode 100644 java8-jersey2/docs/Lifecycle.md create mode 100644 java8-jersey2/docs/MergeApi.md create mode 100644 java8-jersey2/docs/MergeJob.md create mode 100644 java8-jersey2/docs/MergeJobResponse.md create mode 100644 java8-jersey2/docs/MergeSettings.md create mode 100644 java8-jersey2/docs/OutputSettings.md create mode 100644 java8-jersey2/docs/OwnerInfo.md create mode 100644 java8-jersey2/docs/StreamLocation.md create mode 100644 java8-jersey2/docs/TemplateContext.md create mode 100644 java8-jersey2/docs/TemplateContextRequest.md create mode 100644 java8-jersey2/docs/TemplateContextResponse.md create mode 100644 java8-jersey2/git_push.sh create mode 100644 java8-jersey2/gradle.properties create mode 100644 java8-jersey2/gradle/wrapper/gradle-wrapper.jar create mode 100644 java8-jersey2/gradle/wrapper/gradle-wrapper.properties create mode 100644 java8-jersey2/gradlew create mode 100644 java8-jersey2/gradlew.bat create mode 100644 java8-jersey2/pom.xml create mode 100644 java8-jersey2/settings.gradle create mode 100644 java8-jersey2/src/main/AndroidManifest.xml create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/MergeApi.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiException.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/Configuration.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/JSON.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/Pair.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/RFC3339DateFormat.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/Authentication.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/HttpBasicAuth.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/Error.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java create mode 100644 java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/MergeApiTest.java create mode 100644 java8-okhttp-gson/.gitignore create mode 100644 java8-okhttp-gson/.swagger-codegen-ignore create mode 100644 java8-okhttp-gson/.travis.yml create mode 100644 java8-okhttp-gson/LICENSE create mode 100644 java8-okhttp-gson/README.md create mode 100644 java8-okhttp-gson/build.gradle create mode 100644 java8-okhttp-gson/build.sbt create mode 100644 java8-okhttp-gson/docs/DataSetResponse.md create mode 100644 java8-okhttp-gson/docs/Error.md create mode 100644 java8-okhttp-gson/docs/ErrorResponse.md create mode 100644 java8-okhttp-gson/docs/Lifecycle.md create mode 100644 java8-okhttp-gson/docs/MergeApi.md create mode 100644 java8-okhttp-gson/docs/MergeJob.md create mode 100644 java8-okhttp-gson/docs/MergeJobResponse.md create mode 100644 java8-okhttp-gson/docs/MergeSettings.md create mode 100644 java8-okhttp-gson/docs/OutputSettings.md create mode 100644 java8-okhttp-gson/docs/OwnerInfo.md create mode 100644 java8-okhttp-gson/docs/StreamLocation.md create mode 100644 java8-okhttp-gson/docs/TemplateContext.md create mode 100644 java8-okhttp-gson/docs/TemplateContextRequest.md create mode 100644 java8-okhttp-gson/docs/TemplateContextResponse.md create mode 100644 java8-okhttp-gson/git_push.sh create mode 100644 java8-okhttp-gson/gradle.properties create mode 100644 java8-okhttp-gson/gradle/wrapper/gradle-wrapper.jar create mode 100644 java8-okhttp-gson/gradle/wrapper/gradle-wrapper.properties create mode 100644 java8-okhttp-gson/gradlew create mode 100644 java8-okhttp-gson/gradlew.bat create mode 100644 java8-okhttp-gson/pom.xml create mode 100644 java8-okhttp-gson/settings.gradle create mode 100644 java8-okhttp-gson/src/main/AndroidManifest.xml create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/MergeApi.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiCallback.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiException.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiResponse.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Configuration.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/JSON.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Pair.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ProgressRequestBody.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ProgressResponseBody.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/Authentication.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/HttpBasicAuth.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Error.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java create mode 100644 java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/MergeApiTest.java create mode 100644 java8-retrofit2/.gitignore create mode 100644 java8-retrofit2/.swagger-codegen-ignore create mode 100644 java8-retrofit2/.travis.yml create mode 100644 java8-retrofit2/LICENSE create mode 100644 java8-retrofit2/README.md create mode 100644 java8-retrofit2/build.gradle create mode 100644 java8-retrofit2/build.sbt create mode 100644 java8-retrofit2/docs/DataSetResponse.md create mode 100644 java8-retrofit2/docs/Error.md create mode 100644 java8-retrofit2/docs/ErrorResponse.md create mode 100644 java8-retrofit2/docs/Lifecycle.md create mode 100644 java8-retrofit2/docs/MergeApi.md create mode 100644 java8-retrofit2/docs/MergeJob.md create mode 100644 java8-retrofit2/docs/MergeJobResponse.md create mode 100644 java8-retrofit2/docs/MergeSettings.md create mode 100644 java8-retrofit2/docs/OutputSettings.md create mode 100644 java8-retrofit2/docs/OwnerInfo.md create mode 100644 java8-retrofit2/docs/StreamLocation.md create mode 100644 java8-retrofit2/docs/TemplateContext.md create mode 100644 java8-retrofit2/docs/TemplateContextRequest.md create mode 100644 java8-retrofit2/docs/TemplateContextResponse.md create mode 100644 java8-retrofit2/git_push.sh create mode 100644 java8-retrofit2/gradle.properties create mode 100644 java8-retrofit2/gradle/wrapper/gradle-wrapper.jar create mode 100644 java8-retrofit2/gradle/wrapper/gradle-wrapper.properties create mode 100644 java8-retrofit2/gradlew create mode 100644 java8-retrofit2/gradlew.bat create mode 100644 java8-retrofit2/pom.xml create mode 100644 java8-retrofit2/settings.gradle create mode 100644 java8-retrofit2/src/main/AndroidManifest.xml create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/MergeApi.java create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/CollectionFormats.java create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/HttpBasicAuth.java create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthOkHttpClient.java create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/Error.java create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java create mode 100644 java8-retrofit2/src/test/java/com/sphereon/sdk/template_processor/api/MergeApiTest.java create mode 100644 javascript/.swagger-codegen-ignore create mode 100644 javascript/.travis.yml create mode 100644 javascript/LICENSE create mode 100644 javascript/README.md create mode 100644 javascript/docs/DataSetResponse.md create mode 100644 javascript/docs/Error.md create mode 100644 javascript/docs/ErrorResponse.md create mode 100644 javascript/docs/Lifecycle.md create mode 100644 javascript/docs/MergeApi.md create mode 100644 javascript/docs/MergeJob.md create mode 100644 javascript/docs/MergeJobResponse.md create mode 100644 javascript/docs/MergeSettings.md create mode 100644 javascript/docs/OutputSettings.md create mode 100644 javascript/docs/OwnerInfo.md create mode 100644 javascript/docs/StreamLocation.md create mode 100644 javascript/docs/TemplateContext.md create mode 100644 javascript/docs/TemplateContextRequest.md create mode 100644 javascript/docs/TemplateContextResponse.md create mode 100644 javascript/git_push.sh create mode 100644 javascript/mocha.opts create mode 100644 javascript/package.json create mode 100644 javascript/src/SphereonTemplateProcessor/ApiClient.js create mode 100644 javascript/src/SphereonTemplateProcessor/api/MergeApi.js create mode 100644 javascript/src/SphereonTemplateProcessor/index.js create mode 100644 javascript/src/SphereonTemplateProcessor/model/DataSetResponse.js create mode 100644 javascript/src/SphereonTemplateProcessor/model/Error.js create mode 100644 javascript/src/SphereonTemplateProcessor/model/ErrorResponse.js create mode 100644 javascript/src/SphereonTemplateProcessor/model/Lifecycle.js create mode 100644 javascript/src/SphereonTemplateProcessor/model/MergeJob.js create mode 100644 javascript/src/SphereonTemplateProcessor/model/MergeJobResponse.js create mode 100644 javascript/src/SphereonTemplateProcessor/model/MergeSettings.js create mode 100644 javascript/src/SphereonTemplateProcessor/model/OutputSettings.js create mode 100644 javascript/src/SphereonTemplateProcessor/model/OwnerInfo.js create mode 100644 javascript/src/SphereonTemplateProcessor/model/StreamLocation.js create mode 100644 javascript/src/SphereonTemplateProcessor/model/TemplateContext.js create mode 100644 javascript/src/SphereonTemplateProcessor/model/TemplateContextRequest.js create mode 100644 javascript/src/SphereonTemplateProcessor/model/TemplateContextResponse.js create mode 100644 javascript/test/api/MergeApi.spec.js create mode 100644 javascript/test/model/DataSetResponse.spec.js create mode 100644 javascript/test/model/Error.spec.js create mode 100644 javascript/test/model/ErrorResponse.spec.js create mode 100644 javascript/test/model/Lifecycle.spec.js create mode 100644 javascript/test/model/MergeJob.spec.js create mode 100644 javascript/test/model/MergeJobResponse.spec.js create mode 100644 javascript/test/model/MergeSettings.spec.js create mode 100644 javascript/test/model/OutputSettings.spec.js create mode 100644 javascript/test/model/OwnerInfo.spec.js create mode 100644 javascript/test/model/StreamLocation.spec.js create mode 100644 javascript/test/model/TemplateContext.spec.js create mode 100644 javascript/test/model/TemplateContextRequest.spec.js create mode 100644 javascript/test/model/TemplateContextResponse.spec.js create mode 100644 swagger.sdk.json diff --git a/.gitignore b/.gitignore index 109af38..aa7401b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,18 +1,6 @@ -# Visual Studio -.vs/ -bin/ -obj/ -packages/ -*.ncb -*.suo -*ReSharper* -Debug/ -*.user -*.lnk - -# Java *.class + # Package Files # *.jar *.war @@ -26,7 +14,6 @@ log.* #Intellij *.iml -.idea #Maven target/ diff --git a/buildAllMavenProfiles.cmd b/buildAllMavenProfiles.cmd index a1087d1..f903fa9 100644 --- a/buildAllMavenProfiles.cmd +++ b/buildAllMavenProfiles.cmd @@ -1,2 +1,7 @@ -call mvn -Pjava8 clean install -call mvn -Pcsharp-net45 clean install \ No newline at end of file +call mvn -Pjava8-jersey2 clean install +start mvn -Pjava8-okhttp-gson clean install +start mvn -Pjava8-retrofit2 clean install +start mvn -Pcsharp-net45 clean install +start mvn -Pcsharp-net35 clean install +start mvn -Pjavascript clean install +start mvn -Phtml-docs clean install diff --git a/csharp-net35/.gitignore b/csharp-net35/.gitignore new file mode 100644 index 0000000..d3f4f7b --- /dev/null +++ b/csharp-net35/.gitignore @@ -0,0 +1,185 @@ +# Ref: https://gist.github.com/kmorcinek/2710267 +# Download this file using PowerShell v3 under Windows with the following comand +# Invoke-WebRequest https://gist.githubusercontent.com/kmorcinek/2710267/raw/ -OutFile .gitignore + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +build/ +[Bb]in/ +[Oo]bj/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.scc + +# OS generated files # +.DS_Store* +ehthumbs.db +Icon? +Thumbs.db + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml +*.pfx +*.publishsettings +modulesbin/ +tempbin/ + +# EPiServer Site file (VPP) +AppData/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# vim +*.txt~ +*.swp +*.swo + +# svn +.svn + +# SQL Server files +**/App_Data/*.mdf +**/App_Data/*.ldf +**/App_Data/*.sdf + + +#LightSwitch generated files +GeneratedArtifacts/ +_Pvt_Extensions/ +ModelManifest.xml + +# ========================= +# Windows detritus +# ========================= + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac desktop service store files +.DS_Store + +# SASS Compiler cache +.sass-cache + +# Visual Studio 2014 CTP +**/*.sln.ide diff --git a/csharp-net35/.swagger-codegen-ignore b/csharp-net35/.swagger-codegen-ignore new file mode 100644 index 0000000..c5fa491 --- /dev/null +++ b/csharp-net35/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/csharp-net35/.travis.yml b/csharp-net35/.travis.yml new file mode 100644 index 0000000..e3137dd --- /dev/null +++ b/csharp-net35/.travis.yml @@ -0,0 +1,21 @@ +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +language: csharp +mono: + - latest +solution: Sphereon.SDK.TemplateProcessor.sln +script: + - /bin/sh ./mono_nunit_test.sh diff --git a/csharp-net35/LICENSE b/csharp-net35/LICENSE new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/csharp-net35/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/csharp-net35/README.md b/csharp-net35/README.md new file mode 100644 index 0000000..23c3d58 --- /dev/null +++ b/csharp-net35/README.md @@ -0,0 +1,127 @@ +# Sphereon.SDK.TemplateProcessor - the C# library for the OfficeTextMerge + +The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + +This C# SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: + +- API version: 0.1 +- SDK version: 1.0.0 +- Build date: 2017-07-28T16:30:06.518+02:00 +- Build package: class io.swagger.codegen.languages.CSharpClientCodegen + For more information, please visit [https://sphereon.com](https://sphereon.com) + +## Frameworks supported +- .NET 4.0 or later +- Windows Phone 7.1 (Mango) + +## Dependencies +- [RestSharp](https://www.nuget.org/packages/RestSharp) - 105.1.0 or later +- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 7.0.0 or later + +The DLLs included in the package may not be the latest version. We recommned using [NuGet] (https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages: +``` +Install-Package RestSharp +Install-Package Newtonsoft.Json +``` + +NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See [RestSharp#742](https://github.com/restsharp/RestSharp/issues/742) + +## Installation +Run the following command to generate the DLL +- [Mac/Linux] `/bin/sh build.sh` +- [Windows] `build.bat` + +Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces: +```csharp +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Model; +``` + +## Getting Started + +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Model; + +namespace Example +{ + public class Example + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var payload = payload_example; // string | The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] + + try + { + // Store dataset + DataSetResponse result = apiInstance.CreateDataSet(payload); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.CreateDataSet: " + e.Message ); + } + } + } +} +``` + + +## Documentation for API Endpoints + +All URIs are relative to *https://gw.api.cloud.sphereon.com/* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*MergeApi* | [**CreateDataSet**](docs/MergeApi.md#createdataset) | **POST** /template-processor/merge/0.1/datasets | Store dataset +*MergeApi* | [**CreateTemplateContext**](docs/MergeApi.md#createtemplatecontext) | **POST** /template-processor/merge/0.1/templates | Create template context +*MergeApi* | [**DeleteDataSet**](docs/MergeApi.md#deletedataset) | **DELETE** /template-processor/merge/0.1/datasets/{dataSetId} | Delete a stored data set +*MergeApi* | [**DeleteJob**](docs/MergeApi.md#deletejob) | **DELETE** /template-processor/merge/0.1/jobs/{jobId} | Delete a job manually +*MergeApi* | [**DeleteTemplateContext**](docs/MergeApi.md#deletetemplatecontext) | **DELETE** /template-processor/merge/0.1/templates/{templateId} | Delete template context +*MergeApi* | [**GetJob**](docs/MergeApi.md#getjob) | **GET** /template-processor/merge/0.1/jobs/{jobId} | Job definition and state +*MergeApi* | [**GetJobs**](docs/MergeApi.md#getjobs) | **GET** /template-processor/merge/0.1/jobs | Get all jobs +*MergeApi* | [**GetResultStreamById**](docs/MergeApi.md#getresultstreambyid) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file +*MergeApi* | [**GetResultStreamsAsContainer**](docs/MergeApi.md#getresultstreamsascontainer) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/container | Get the result file +*MergeApi* | [**GetTemplateContext**](docs/MergeApi.md#gettemplatecontext) | **GET** /template-processor/merge/0.1/templates/{templateId} | Get template context +*MergeApi* | [**SubmitJob**](docs/MergeApi.md#submitjob) | **PUT** /template-processor/merge/0.1/jobs | Submit merge job for processing +*MergeApi* | [**UpdateTemplateContext**](docs/MergeApi.md#updatetemplatecontext) | **PUT** /template-processor/merge/0.1/templates | Update template context +*MergeApi* | [**UploadTemplateFile**](docs/MergeApi.md#uploadtemplatefile) | **POST** /template-processor/merge/0.1/templates/{templateId} | Upload template file + + + +## Documentation for Models + + - [Model.DataSetResponse](docs/DataSetResponse.md) + - [Model.Error](docs/Error.md) + - [Model.ErrorResponse](docs/ErrorResponse.md) + - [Model.Lifecycle](docs/Lifecycle.md) + - [Model.MergeJob](docs/MergeJob.md) + - [Model.MergeJobResponse](docs/MergeJobResponse.md) + - [Model.MergeSettings](docs/MergeSettings.md) + - [Model.OutputSettings](docs/OutputSettings.md) + - [Model.OwnerInfo](docs/OwnerInfo.md) + - [Model.StreamLocation](docs/StreamLocation.md) + - [Model.TemplateContext](docs/TemplateContext.md) + - [Model.TemplateContextRequest](docs/TemplateContextRequest.md) + - [Model.TemplateContextResponse](docs/TemplateContextResponse.md) + + +## Documentation for Authorization + +### oauth2schema + +- **Type**: OAuth +- **Flow**: application +- **Authorization URL**: +- **Scopes**: + - global: accessEverything + diff --git a/csharp-net35/Sphereon.SDK.TemplateProcessor.sln b/csharp-net35/Sphereon.SDK.TemplateProcessor.sln new file mode 100644 index 0000000..362d10f --- /dev/null +++ b/csharp-net35/Sphereon.SDK.TemplateProcessor.sln @@ -0,0 +1,27 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +VisualStudioVersion = 12.0.0.0 +MinimumVisualStudioVersion = 10.0.0.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sphereon.SDK.TemplateProcessor", "src\Sphereon.SDK.TemplateProcessor\Sphereon.SDK.TemplateProcessor.csproj", "{034DD73B-80EA-4824-9D3A-776B31B31505}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sphereon.SDK.TemplateProcessor.Test", "src\Sphereon.SDK.TemplateProcessor.Test\Sphereon.SDK.TemplateProcessor.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" +EndProject +Global +GlobalSection(SolutionConfigurationPlatforms) = preSolution +Debug|Any CPU = Debug|Any CPU +Release|Any CPU = Release|Any CPU +EndGlobalSection +GlobalSection(ProjectConfigurationPlatforms) = postSolution +{034DD73B-80EA-4824-9D3A-776B31B31505}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{034DD73B-80EA-4824-9D3A-776B31B31505}.Debug|Any CPU.Build.0 = Debug|Any CPU +{034DD73B-80EA-4824-9D3A-776B31B31505}.Release|Any CPU.ActiveCfg = Release|Any CPU +{034DD73B-80EA-4824-9D3A-776B31B31505}.Release|Any CPU.Build.0 = Release|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU +EndGlobalSection +GlobalSection(SolutionProperties) = preSolution +HideSolutionNode = FALSE +EndGlobalSection +EndGlobal \ No newline at end of file diff --git a/csharp-net35/build.bat b/csharp-net35/build.bat new file mode 100644 index 0000000..d0ecd7e --- /dev/null +++ b/csharp-net35/build.bat @@ -0,0 +1,28 @@ +:: Generated by: https://github.com/swagger-api/swagger-codegen.git +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +@echo off + + +SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v3.5 + +if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://nuget.org/nuget.exe', '.\nuget.exe')" +.\nuget.exe install src\Sphereon.SDK.TemplateProcessor\packages.config -o packages + +if not exist ".\bin" mkdir bin + +copy packages\Newtonsoft.Json.8.0.3\lib\net35\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll +copy packages\RestSharp.105.1.0\lib\net35\RestSharp.dll bin\RestSharp.dll + +%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\RestSharp.dll /target:library /out:bin\Sphereon.SDK.TemplateProcessor.dll /recurse:src\Sphereon.SDK.TemplateProcessor\*.cs /doc:bin\Sphereon.SDK.TemplateProcessor.xml diff --git a/csharp-net35/build.sh b/csharp-net35/build.sh new file mode 100644 index 0000000..7391301 --- /dev/null +++ b/csharp-net35/build.sh @@ -0,0 +1,48 @@ +#!/usr/bin/env bash +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +frameworkVersion=net35 +netfx=${frameworkVersion#net} + +echo "[INFO] Target framework: ${frameworkVersion}" + +echo "[INFO] Download nuget and packages" +wget -nc https://nuget.org/nuget.exe; +mozroots --import --sync +mono nuget.exe install src/Sphereon.SDK.TemplateProcessor/packages.config -o packages; + +echo "[INFO] Copy DLLs to the 'bin' folder" +mkdir -p bin; +cp packages/Newtonsoft.Json.8.0.3/lib/net35/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; +cp packages/RestSharp.105.1.0/lib/net35/RestSharp.dll bin/RestSharp.dll; + +echo "[INFO] Run 'mcs' to build bin/Sphereon.SDK.TemplateProcessor.dll" +mcs -sdk:${netfx} -r:bin/Newtonsoft.Json.dll,\ +bin/RestSharp.dll,\ +System.Runtime.Serialization.dll \ +-target:library \ +-out:bin/Sphereon.SDK.TemplateProcessor.dll \ +-recurse:'src/Sphereon.SDK.TemplateProcessor/*.cs' \ +-doc:bin/Sphereon.SDK.TemplateProcessor.xml \ +-platform:anycpu + +if [ $? -ne 0 ] +then + echo "[ERROR] Compilation failed with exit code $?" + exit 1 +else + echo "[INFO] bin/Sphereon.SDK.TemplateProcessor.dll was created successfully" +fi diff --git a/csharp-net35/docs/DataSetResponse.md b/csharp-net35/docs/DataSetResponse.md new file mode 100644 index 0000000..e844d50 --- /dev/null +++ b/csharp-net35/docs/DataSetResponse.md @@ -0,0 +1,12 @@ +# Sphereon.SDK.TemplateProcessor.Model.DataSetResponse +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CompletionTime** | **DateTime?** | The completion date/time of this template in ISO 8601 format | [optional] +**CreationTime** | **DateTime?** | The creation date/time of this template in ISO 8601 format | [optional] +**Id** | **string** | Unique dataset id | +**Status** | **string** | The status of the template | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net35/docs/Error.md b/csharp-net35/docs/Error.md new file mode 100644 index 0000000..e341298 --- /dev/null +++ b/csharp-net35/docs/Error.md @@ -0,0 +1,12 @@ +# Sphereon.SDK.TemplateProcessor.Model.Error +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | **string** | | +**Level** | **string** | | +**Cause** | [**Error**](Error.md) | | [optional] +**Message** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net35/docs/ErrorResponse.md b/csharp-net35/docs/ErrorResponse.md new file mode 100644 index 0000000..7d4532d --- /dev/null +++ b/csharp-net35/docs/ErrorResponse.md @@ -0,0 +1,9 @@ +# Sphereon.SDK.TemplateProcessor.Model.ErrorResponse +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**List<Error>**](Error.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net35/docs/Lifecycle.md b/csharp-net35/docs/Lifecycle.md new file mode 100644 index 0000000..c1f9138 --- /dev/null +++ b/csharp-net35/docs/Lifecycle.md @@ -0,0 +1,11 @@ +# Sphereon.SDK.TemplateProcessor.Model.Lifecycle +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ActionTime** | **DateTime?** | The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation | [optional] +**Action** | **string** | | [optional] +**Type** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net35/docs/MergeApi.md b/csharp-net35/docs/MergeApi.md new file mode 100644 index 0000000..b921b4f --- /dev/null +++ b/csharp-net35/docs/MergeApi.md @@ -0,0 +1,874 @@ +# Sphereon.SDK.TemplateProcessor.Api.MergeApi + +All URIs are relative to *https://gw.api.cloud.sphereon.com/* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateDataSet**](MergeApi.md#createdataset) | **POST** /template-processor/merge/0.1/datasets | Store dataset +[**CreateTemplateContext**](MergeApi.md#createtemplatecontext) | **POST** /template-processor/merge/0.1/templates | Create template context +[**DeleteDataSet**](MergeApi.md#deletedataset) | **DELETE** /template-processor/merge/0.1/datasets/{dataSetId} | Delete a stored data set +[**DeleteJob**](MergeApi.md#deletejob) | **DELETE** /template-processor/merge/0.1/jobs/{jobId} | Delete a job manually +[**DeleteTemplateContext**](MergeApi.md#deletetemplatecontext) | **DELETE** /template-processor/merge/0.1/templates/{templateId} | Delete template context +[**GetJob**](MergeApi.md#getjob) | **GET** /template-processor/merge/0.1/jobs/{jobId} | Job definition and state +[**GetJobs**](MergeApi.md#getjobs) | **GET** /template-processor/merge/0.1/jobs | Get all jobs +[**GetResultStreamById**](MergeApi.md#getresultstreambyid) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file +[**GetResultStreamsAsContainer**](MergeApi.md#getresultstreamsascontainer) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/container | Get the result file +[**GetTemplateContext**](MergeApi.md#gettemplatecontext) | **GET** /template-processor/merge/0.1/templates/{templateId} | Get template context +[**SubmitJob**](MergeApi.md#submitjob) | **PUT** /template-processor/merge/0.1/jobs | Submit merge job for processing +[**UpdateTemplateContext**](MergeApi.md#updatetemplatecontext) | **PUT** /template-processor/merge/0.1/templates | Update template context +[**UploadTemplateFile**](MergeApi.md#uploadtemplatefile) | **POST** /template-processor/merge/0.1/templates/{templateId} | Upload template file + + + +# **CreateDataSet** +> DataSetResponse CreateDataSet (string payload) + +Store dataset + +Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class CreateDataSetExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var payload = payload_example; // string | The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] + + try + { + // Store dataset + DataSetResponse result = apiInstance.CreateDataSet(payload); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.CreateDataSet: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **payload** | **string**| The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] | + +### Return type + +[**DataSetResponse**](DataSetResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **CreateTemplateContext** +> TemplateContextResponse CreateTemplateContext (TemplateContextRequest templateRequest) + +Create template context + +Create a unique template context for your environment + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class CreateTemplateContextExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var templateRequest = new TemplateContextRequest(); // TemplateContextRequest | The template request + + try + { + // Create template context + TemplateContextResponse result = apiInstance.CreateTemplateContext(templateRequest); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.CreateTemplateContext: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| The template request | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteDataSet** +> DataSetResponse DeleteDataSet (string dataSetId) + +Delete a stored data set + +Delete a stored data set + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class DeleteDataSetExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var dataSetId = dataSetId_example; // string | dataSetId + + try + { + // Delete a stored data set + DataSetResponse result = apiInstance.DeleteDataSet(dataSetId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.DeleteDataSet: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dataSetId** | **string**| dataSetId | + +### Return type + +[**DataSetResponse**](DataSetResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteJob** +> MergeJobResponse DeleteJob (string jobId) + +Delete a job manually + +Delete the merge job and all related files + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class DeleteJobExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var jobId = jobId_example; // string | jobId + + try + { + // Delete a job manually + MergeJobResponse result = apiInstance.DeleteJob(jobId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.DeleteJob: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **string**| jobId | + +### Return type + +[**MergeJobResponse**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteTemplateContext** +> TemplateContextResponse DeleteTemplateContext (string templateId) + +Delete template context + +Delete a template context with all history + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class DeleteTemplateContextExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var templateId = templateId_example; // string | templateId + + try + { + // Delete template context + TemplateContextResponse result = apiInstance.DeleteTemplateContext(templateId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.DeleteTemplateContext: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **string**| templateId | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetJob** +> MergeJobResponse GetJob (string jobId) + +Job definition and state + +Get the merge job definition and current state. Please not that you can differentiate based on http response status + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class GetJobExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var jobId = jobId_example; // string | jobId + + try + { + // Job definition and state + MergeJobResponse result = apiInstance.GetJob(jobId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.GetJob: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **string**| jobId | + +### Return type + +[**MergeJobResponse**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetJobs** +> List GetJobs (List status = null) + +Get all jobs + +Get all office text job definitions and their current state. + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class GetJobsExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var status = new List(); // List | A list of status to filter on. (optional) + + try + { + // Get all jobs + List<MergeJobResponse> result = apiInstance.GetJobs(status); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.GetJobs: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**List**](string.md)| A list of status to filter on. | [optional] + +### Return type + +[**List**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetResultStreamById** +> byte[] GetResultStreamById (string jobId, string streamId, OutputSettings outputSettings = null) + +Get the result file + +Get a merge result document as a binary stream. + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class GetResultStreamByIdExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var jobId = jobId_example; // string | jobId + var streamId = streamId_example; // string | streamId + var outputSettings = new OutputSettings(); // OutputSettings | outputSettings (optional) + + try + { + // Get the result file + byte[] result = apiInstance.GetResultStreamById(jobId, streamId, outputSettings); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.GetResultStreamById: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **string**| jobId | + **streamId** | **string**| streamId | + **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] + +### Return type + +**byte[]** + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/octet-stream + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetResultStreamsAsContainer** +> byte[] GetResultStreamsAsContainer (string jobId, OutputSettings outputSettings = null) + +Get the result file + +Get all documents inside a compressed container as a binary stream. + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class GetResultStreamsAsContainerExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var jobId = jobId_example; // string | jobId + var outputSettings = new OutputSettings(); // OutputSettings | outputSettings (optional) + + try + { + // Get the result file + byte[] result = apiInstance.GetResultStreamsAsContainer(jobId, outputSettings); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.GetResultStreamsAsContainer: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **string**| jobId | + **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] + +### Return type + +**byte[]** + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/octet-stream + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetTemplateContext** +> TemplateContextResponse GetTemplateContext (string templateId) + +Get template context + +Get an existing template context + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class GetTemplateContextExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var templateId = templateId_example; // string | The template context name unique for your environment + + try + { + // Get template context + TemplateContextResponse result = apiInstance.GetTemplateContext(templateId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.GetTemplateContext: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **string**| The template context name unique for your environment | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **SubmitJob** +> MergeJobResponse SubmitJob (MergeSettings mergesettings) + +Submit merge job for processing + +Submit merge job run. + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class SubmitJobExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var mergesettings = new MergeSettings(); // MergeSettings | The merge- and output settings + + try + { + // Submit merge job for processing + MergeJobResponse result = apiInstance.SubmitJob(mergesettings); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.SubmitJob: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **mergesettings** | [**MergeSettings**](MergeSettings.md)| The merge- and output settings | + +### Return type + +[**MergeJobResponse**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UpdateTemplateContext** +> TemplateContextResponse UpdateTemplateContext (TemplateContextRequest templateContextRequest) + +Update template context + +Update an existing template context for your environment + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class UpdateTemplateContextExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var templateContextRequest = new TemplateContextRequest(); // TemplateContextRequest | templateContextRequest + + try + { + // Update template context + TemplateContextResponse result = apiInstance.UpdateTemplateContext(templateContextRequest); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.UpdateTemplateContext: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateContextRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| templateContextRequest | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UploadTemplateFile** +> TemplateContextResponse UploadTemplateFile (string templateId, System.IO.Stream stream) + +Upload template file + +Upload the Office template file + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class UploadTemplateFileExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var templateId = templateId_example; // string | The template context name unique for your environment + var stream = new System.IO.Stream(); // System.IO.Stream | The template (file/inputstream) to store + + try + { + // Upload template file + TemplateContextResponse result = apiInstance.UploadTemplateFile(templateId, stream); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.UploadTemplateFile: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **string**| The template context name unique for your environment | + **stream** | **System.IO.Stream**| The template (file/inputstream) to store | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/csharp-net35/docs/MergeJob.md b/csharp-net35/docs/MergeJob.md new file mode 100644 index 0000000..a5cd506 --- /dev/null +++ b/csharp-net35/docs/MergeJob.md @@ -0,0 +1,19 @@ +# Sphereon.SDK.TemplateProcessor.Model.MergeJob +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ResultFolderPath** | **string** | The target folder path of result files | [optional] +**CompletionTime** | **DateTime?** | The completion date/time of this job in ISO 8601 format | [optional] +**JobId** | **string** | The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation | +**ResultContainerId** | **string** | The target container id of result files | [optional] +**CreationTime** | **DateTime?** | The creation date/time of this job in ISO 8601 format | [optional] +**DataSetId** | **string** | Data set id | [optional] +**ResultStreams** | [**List<StreamLocation>**](StreamLocation.md) | The storage locations of the result files. | +**HeaderDataSetIds** | **List<string>** | Header data set ids | [optional] +**MergeSettings** | [**MergeSettings**](MergeSettings.md) | | [optional] +**StatusMessage** | **string** | A status message, which can be informational, warning or error. A message here does not indicate an error perse | [optional] +**Status** | **string** | The status of the job | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net35/docs/MergeJobResponse.md b/csharp-net35/docs/MergeJobResponse.md new file mode 100644 index 0000000..c31a8d8 --- /dev/null +++ b/csharp-net35/docs/MergeJobResponse.md @@ -0,0 +1,12 @@ +# Sphereon.SDK.TemplateProcessor.Model.MergeJobResponse +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JobId** | **string** | The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation | +**Job** | [**MergeJob**](MergeJob.md) | | [optional] +**StatusMessage** | **string** | A status message, which can be informational, warning or error. AA message here does not indicate an error perse | [optional] +**Status** | **string** | The status of the job | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net35/docs/MergeSettings.md b/csharp-net35/docs/MergeSettings.md new file mode 100644 index 0000000..964bf17 --- /dev/null +++ b/csharp-net35/docs/MergeSettings.md @@ -0,0 +1,17 @@ +# Sphereon.SDK.TemplateProcessor.Model.MergeSettings +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Lifecycle** | [**Lifecycle**](Lifecycle.md) | | [optional] +**MergeResult** | **string** | | [optional] +**DataSetId** | **string** | Data set id | +**Engine** | **string** | | [optional] +**HeaderDataSetIds** | **List<string>** | optional header data set ids | [optional] +**TemplateVersion** | **int?** | Template version | [optional] +**ResultStreamLocation** | [**StreamLocation**](StreamLocation.md) | The output location of the result files. | +**TemplateId** | **string** | Template id | +**OutputSettings** | [**OutputSettings**](OutputSettings.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net35/docs/OutputSettings.md b/csharp-net35/docs/OutputSettings.md new file mode 100644 index 0000000..da7491f --- /dev/null +++ b/csharp-net35/docs/OutputSettings.md @@ -0,0 +1,10 @@ +# Sphereon.SDK.TemplateProcessor.Model.OutputSettings +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeliveryFormat** | **string** | | [optional] +**OutputFormat** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net35/docs/OwnerInfo.md b/csharp-net35/docs/OwnerInfo.md new file mode 100644 index 0000000..9f68152 --- /dev/null +++ b/csharp-net35/docs/OwnerInfo.md @@ -0,0 +1,12 @@ +# Sphereon.SDK.TemplateProcessor.Model.OwnerInfo +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Phone** | **string** | The owner's phone number | [optional] +**CompanyDepartment** | **string** | The owner's company/department | [optional] +**Name** | **string** | The owner's name | [optional] +**Email** | **string** | The owner's email address | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net35/docs/StreamLocation.md b/csharp-net35/docs/StreamLocation.md new file mode 100644 index 0000000..e365ada --- /dev/null +++ b/csharp-net35/docs/StreamLocation.md @@ -0,0 +1,12 @@ +# Sphereon.SDK.TemplateProcessor.Model.StreamLocation +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FolderPath** | **string** | | [optional] +**OriginalFileName** | **string** | | [optional] +**ContainerId** | **string** | | [optional] +**FileId** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net35/docs/TemplateContext.md b/csharp-net35/docs/TemplateContext.md new file mode 100644 index 0000000..9f56a89 --- /dev/null +++ b/csharp-net35/docs/TemplateContext.md @@ -0,0 +1,14 @@ +# Sphereon.SDK.TemplateProcessor.Model.TemplateContext +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TemplateType** | **string** | | +**TemplateFileLocations** | [**Dictionary<string, StreamLocation>**](StreamLocation.md) | The template files (versioned) | [optional] +**Description** | **string** | The template description | [optional] +**OwnerInfo** | [**OwnerInfo**](OwnerInfo.md) | | [optional] +**Id** | **string** | | [optional] +**TemplateId** | **string** | The template context id | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net35/docs/TemplateContextRequest.md b/csharp-net35/docs/TemplateContextRequest.md new file mode 100644 index 0000000..b509255 --- /dev/null +++ b/csharp-net35/docs/TemplateContextRequest.md @@ -0,0 +1,12 @@ +# Sphereon.SDK.TemplateProcessor.Model.TemplateContextRequest +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TemplateType** | **string** | | +**Description** | **string** | | [optional] +**OwnerInfo** | [**OwnerInfo**](OwnerInfo.md) | | [optional] +**TemplateId** | **string** | The template context id | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net35/docs/TemplateContextResponse.md b/csharp-net35/docs/TemplateContextResponse.md new file mode 100644 index 0000000..6c11a45 --- /dev/null +++ b/csharp-net35/docs/TemplateContextResponse.md @@ -0,0 +1,12 @@ +# Sphereon.SDK.TemplateProcessor.Model.TemplateContextResponse +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreationTime** | **DateTime?** | The creation date/time of this response in ISO 8601 format | [optional] +**Context** | [**TemplateContext**](TemplateContext.md) | | [optional] +**Id** | **string** | Unique template context id | +**Status** | **string** | The status of the template | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net35/git_push.sh b/csharp-net35/git_push.sh new file mode 100644 index 0000000..7923201 --- /dev/null +++ b/csharp-net35/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/csharp-net35/mono_nunit_test.sh b/csharp-net35/mono_nunit_test.sh new file mode 100644 index 0000000..b1bf816 --- /dev/null +++ b/csharp-net35/mono_nunit_test.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +wget -nc https://nuget.org/nuget.exe +mozroots --import --sync + +echo "[INFO] remove bin/Debug/SwaggerClientTest.dll" +rm src/IO.Swagger.Test/bin/Debug/Sphereon.SDK.TemplateProcessor.Test.dll 2> /dev/null + +echo "[INFO] install NUnit runners via NuGet" +wget -nc https://nuget.org/nuget.exe +mozroots --import --sync +mono nuget.exe install src/Sphereon.SDK.TemplateProcessor.Test/packages.config -o packages + +echo "[INFO] Install NUnit runners via NuGet" +mono nuget.exe install NUnit.Runners -Version 2.6.4 -OutputDirectory packages + +echo "[INFO] Build the solution and run the unit test" +xbuild Sphereon.SDK.TemplateProcessor.sln && \ + mono ./packages/NUnit.Runners.2.6.4/tools/nunit-console.exe src/Sphereon.SDK.TemplateProcessor.Test/bin/Debug/Sphereon.SDK.TemplateProcessor.Test.dll diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Api/MergeApiTests.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Api/MergeApiTests.cs new file mode 100644 index 0000000..a761162 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Api/MergeApiTests.cs @@ -0,0 +1,241 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing MergeApi + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the API endpoint. + /// + [TestFixture] + public class MergeApiTests + { + private MergeApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new MergeApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of MergeApi + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsInstanceOfType' MergeApi + //Assert.IsInstanceOfType(typeof(MergeApi), instance, "instance is a MergeApi"); + } + + + /// + /// Test CreateDataSet + /// + [Test] + public void CreateDataSetTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string payload = null; + //var response = instance.CreateDataSet(payload); + //Assert.IsInstanceOf (response, "response is DataSetResponse"); + } + + /// + /// Test CreateTemplateContext + /// + [Test] + public void CreateTemplateContextTest() + { + // TODO uncomment below to test the method and replace null with proper value + //TemplateContextRequest templateRequest = null; + //var response = instance.CreateTemplateContext(templateRequest); + //Assert.IsInstanceOf (response, "response is TemplateContextResponse"); + } + + /// + /// Test DeleteDataSet + /// + [Test] + public void DeleteDataSetTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string dataSetId = null; + //var response = instance.DeleteDataSet(dataSetId); + //Assert.IsInstanceOf (response, "response is DataSetResponse"); + } + + /// + /// Test DeleteJob + /// + [Test] + public void DeleteJobTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string jobId = null; + //var response = instance.DeleteJob(jobId); + //Assert.IsInstanceOf (response, "response is MergeJobResponse"); + } + + /// + /// Test DeleteTemplateContext + /// + [Test] + public void DeleteTemplateContextTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string templateId = null; + //var response = instance.DeleteTemplateContext(templateId); + //Assert.IsInstanceOf (response, "response is TemplateContextResponse"); + } + + /// + /// Test GetJob + /// + [Test] + public void GetJobTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string jobId = null; + //var response = instance.GetJob(jobId); + //Assert.IsInstanceOf (response, "response is MergeJobResponse"); + } + + /// + /// Test GetJobs + /// + [Test] + public void GetJobsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //List status = null; + //var response = instance.GetJobs(status); + //Assert.IsInstanceOf> (response, "response is List"); + } + + /// + /// Test GetResultStreamById + /// + [Test] + public void GetResultStreamByIdTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string jobId = null; + //string streamId = null; + //OutputSettings outputSettings = null; + //var response = instance.GetResultStreamById(jobId, streamId, outputSettings); + //Assert.IsInstanceOf (response, "response is byte[]"); + } + + /// + /// Test GetResultStreamsAsContainer + /// + [Test] + public void GetResultStreamsAsContainerTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string jobId = null; + //OutputSettings outputSettings = null; + //var response = instance.GetResultStreamsAsContainer(jobId, outputSettings); + //Assert.IsInstanceOf (response, "response is byte[]"); + } + + /// + /// Test GetTemplateContext + /// + [Test] + public void GetTemplateContextTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string templateId = null; + //var response = instance.GetTemplateContext(templateId); + //Assert.IsInstanceOf (response, "response is TemplateContextResponse"); + } + + /// + /// Test SubmitJob + /// + [Test] + public void SubmitJobTest() + { + // TODO uncomment below to test the method and replace null with proper value + //MergeSettings mergesettings = null; + //var response = instance.SubmitJob(mergesettings); + //Assert.IsInstanceOf (response, "response is MergeJobResponse"); + } + + /// + /// Test UpdateTemplateContext + /// + [Test] + public void UpdateTemplateContextTest() + { + // TODO uncomment below to test the method and replace null with proper value + //TemplateContextRequest templateContextRequest = null; + //var response = instance.UpdateTemplateContext(templateContextRequest); + //Assert.IsInstanceOf (response, "response is TemplateContextResponse"); + } + + /// + /// Test UploadTemplateFile + /// + [Test] + public void UploadTemplateFileTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string templateId = null; + //System.IO.Stream stream = null; + //var response = instance.UploadTemplateFile(templateId, stream); + //Assert.IsInstanceOf (response, "response is TemplateContextResponse"); + } + + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/DataSetResponseTests.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/DataSetResponseTests.cs new file mode 100644 index 0000000..6ef1157 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/DataSetResponseTests.cs @@ -0,0 +1,114 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing DataSetResponse + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class DataSetResponseTests + { + // TODO uncomment below to declare an instance variable for DataSetResponse + //private DataSetResponse instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of DataSetResponse + //instance = new DataSetResponse(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of DataSetResponse + /// + [Test] + public void DataSetResponseInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" DataSetResponse + //Assert.IsInstanceOfType (instance, "variable 'instance' is a DataSetResponse"); + } + + /// + /// Test the property 'CompletionTime' + /// + [Test] + public void CompletionTimeTest() + { + // TODO unit test for the property 'CompletionTime' + } + /// + /// Test the property 'CreationTime' + /// + [Test] + public void CreationTimeTest() + { + // TODO unit test for the property 'CreationTime' + } + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/ErrorResponseTests.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/ErrorResponseTests.cs new file mode 100644 index 0000000..b8b7f12 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/ErrorResponseTests.cs @@ -0,0 +1,90 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing ErrorResponse + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class ErrorResponseTests + { + // TODO uncomment below to declare an instance variable for ErrorResponse + //private ErrorResponse instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of ErrorResponse + //instance = new ErrorResponse(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of ErrorResponse + /// + [Test] + public void ErrorResponseInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" ErrorResponse + //Assert.IsInstanceOfType (instance, "variable 'instance' is a ErrorResponse"); + } + + /// + /// Test the property 'Errors' + /// + [Test] + public void ErrorsTest() + { + // TODO unit test for the property 'Errors' + } + + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/ErrorTests.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/ErrorTests.cs new file mode 100644 index 0000000..6418104 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/ErrorTests.cs @@ -0,0 +1,114 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing Error + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class ErrorTests + { + // TODO uncomment below to declare an instance variable for Error + //private Error instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of Error + //instance = new Error(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of Error + /// + [Test] + public void ErrorInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" Error + //Assert.IsInstanceOfType (instance, "variable 'instance' is a Error"); + } + + /// + /// Test the property 'Code' + /// + [Test] + public void CodeTest() + { + // TODO unit test for the property 'Code' + } + /// + /// Test the property 'Level' + /// + [Test] + public void LevelTest() + { + // TODO unit test for the property 'Level' + } + /// + /// Test the property 'Cause' + /// + [Test] + public void CauseTest() + { + // TODO unit test for the property 'Cause' + } + /// + /// Test the property 'Message' + /// + [Test] + public void MessageTest() + { + // TODO unit test for the property 'Message' + } + + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/LifecycleTests.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/LifecycleTests.cs new file mode 100644 index 0000000..abbb7a4 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/LifecycleTests.cs @@ -0,0 +1,106 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing Lifecycle + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class LifecycleTests + { + // TODO uncomment below to declare an instance variable for Lifecycle + //private Lifecycle instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of Lifecycle + //instance = new Lifecycle(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of Lifecycle + /// + [Test] + public void LifecycleInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" Lifecycle + //Assert.IsInstanceOfType (instance, "variable 'instance' is a Lifecycle"); + } + + /// + /// Test the property 'ActionTime' + /// + [Test] + public void ActionTimeTest() + { + // TODO unit test for the property 'ActionTime' + } + /// + /// Test the property 'Action' + /// + [Test] + public void ActionTest() + { + // TODO unit test for the property 'Action' + } + /// + /// Test the property 'Type' + /// + [Test] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } + + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/MergeJobResponseTests.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/MergeJobResponseTests.cs new file mode 100644 index 0000000..bc5c161 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/MergeJobResponseTests.cs @@ -0,0 +1,114 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing MergeJobResponse + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class MergeJobResponseTests + { + // TODO uncomment below to declare an instance variable for MergeJobResponse + //private MergeJobResponse instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of MergeJobResponse + //instance = new MergeJobResponse(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of MergeJobResponse + /// + [Test] + public void MergeJobResponseInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" MergeJobResponse + //Assert.IsInstanceOfType (instance, "variable 'instance' is a MergeJobResponse"); + } + + /// + /// Test the property 'JobId' + /// + [Test] + public void JobIdTest() + { + // TODO unit test for the property 'JobId' + } + /// + /// Test the property 'Job' + /// + [Test] + public void JobTest() + { + // TODO unit test for the property 'Job' + } + /// + /// Test the property 'StatusMessage' + /// + [Test] + public void StatusMessageTest() + { + // TODO unit test for the property 'StatusMessage' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/MergeJobTests.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/MergeJobTests.cs new file mode 100644 index 0000000..095506d --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/MergeJobTests.cs @@ -0,0 +1,170 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing MergeJob + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class MergeJobTests + { + // TODO uncomment below to declare an instance variable for MergeJob + //private MergeJob instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of MergeJob + //instance = new MergeJob(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of MergeJob + /// + [Test] + public void MergeJobInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" MergeJob + //Assert.IsInstanceOfType (instance, "variable 'instance' is a MergeJob"); + } + + /// + /// Test the property 'ResultFolderPath' + /// + [Test] + public void ResultFolderPathTest() + { + // TODO unit test for the property 'ResultFolderPath' + } + /// + /// Test the property 'CompletionTime' + /// + [Test] + public void CompletionTimeTest() + { + // TODO unit test for the property 'CompletionTime' + } + /// + /// Test the property 'JobId' + /// + [Test] + public void JobIdTest() + { + // TODO unit test for the property 'JobId' + } + /// + /// Test the property 'ResultContainerId' + /// + [Test] + public void ResultContainerIdTest() + { + // TODO unit test for the property 'ResultContainerId' + } + /// + /// Test the property 'CreationTime' + /// + [Test] + public void CreationTimeTest() + { + // TODO unit test for the property 'CreationTime' + } + /// + /// Test the property 'DataSetId' + /// + [Test] + public void DataSetIdTest() + { + // TODO unit test for the property 'DataSetId' + } + /// + /// Test the property 'ResultStreams' + /// + [Test] + public void ResultStreamsTest() + { + // TODO unit test for the property 'ResultStreams' + } + /// + /// Test the property 'HeaderDataSetIds' + /// + [Test] + public void HeaderDataSetIdsTest() + { + // TODO unit test for the property 'HeaderDataSetIds' + } + /// + /// Test the property 'MergeSettings' + /// + [Test] + public void MergeSettingsTest() + { + // TODO unit test for the property 'MergeSettings' + } + /// + /// Test the property 'StatusMessage' + /// + [Test] + public void StatusMessageTest() + { + // TODO unit test for the property 'StatusMessage' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/MergeSettingsTests.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/MergeSettingsTests.cs new file mode 100644 index 0000000..fcd5572 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/MergeSettingsTests.cs @@ -0,0 +1,154 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing MergeSettings + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class MergeSettingsTests + { + // TODO uncomment below to declare an instance variable for MergeSettings + //private MergeSettings instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of MergeSettings + //instance = new MergeSettings(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of MergeSettings + /// + [Test] + public void MergeSettingsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" MergeSettings + //Assert.IsInstanceOfType (instance, "variable 'instance' is a MergeSettings"); + } + + /// + /// Test the property 'Lifecycle' + /// + [Test] + public void LifecycleTest() + { + // TODO unit test for the property 'Lifecycle' + } + /// + /// Test the property 'MergeResult' + /// + [Test] + public void MergeResultTest() + { + // TODO unit test for the property 'MergeResult' + } + /// + /// Test the property 'DataSetId' + /// + [Test] + public void DataSetIdTest() + { + // TODO unit test for the property 'DataSetId' + } + /// + /// Test the property 'Engine' + /// + [Test] + public void EngineTest() + { + // TODO unit test for the property 'Engine' + } + /// + /// Test the property 'HeaderDataSetIds' + /// + [Test] + public void HeaderDataSetIdsTest() + { + // TODO unit test for the property 'HeaderDataSetIds' + } + /// + /// Test the property 'TemplateVersion' + /// + [Test] + public void TemplateVersionTest() + { + // TODO unit test for the property 'TemplateVersion' + } + /// + /// Test the property 'ResultStreamLocation' + /// + [Test] + public void ResultStreamLocationTest() + { + // TODO unit test for the property 'ResultStreamLocation' + } + /// + /// Test the property 'TemplateId' + /// + [Test] + public void TemplateIdTest() + { + // TODO unit test for the property 'TemplateId' + } + /// + /// Test the property 'OutputSettings' + /// + [Test] + public void OutputSettingsTest() + { + // TODO unit test for the property 'OutputSettings' + } + + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/OutputSettingsTests.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/OutputSettingsTests.cs new file mode 100644 index 0000000..1c9b36c --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/OutputSettingsTests.cs @@ -0,0 +1,98 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing OutputSettings + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class OutputSettingsTests + { + // TODO uncomment below to declare an instance variable for OutputSettings + //private OutputSettings instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of OutputSettings + //instance = new OutputSettings(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of OutputSettings + /// + [Test] + public void OutputSettingsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" OutputSettings + //Assert.IsInstanceOfType (instance, "variable 'instance' is a OutputSettings"); + } + + /// + /// Test the property 'DeliveryFormat' + /// + [Test] + public void DeliveryFormatTest() + { + // TODO unit test for the property 'DeliveryFormat' + } + /// + /// Test the property 'OutputFormat' + /// + [Test] + public void OutputFormatTest() + { + // TODO unit test for the property 'OutputFormat' + } + + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/OwnerInfoTests.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/OwnerInfoTests.cs new file mode 100644 index 0000000..d199b80 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/OwnerInfoTests.cs @@ -0,0 +1,114 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing OwnerInfo + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class OwnerInfoTests + { + // TODO uncomment below to declare an instance variable for OwnerInfo + //private OwnerInfo instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of OwnerInfo + //instance = new OwnerInfo(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of OwnerInfo + /// + [Test] + public void OwnerInfoInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" OwnerInfo + //Assert.IsInstanceOfType (instance, "variable 'instance' is a OwnerInfo"); + } + + /// + /// Test the property 'Phone' + /// + [Test] + public void PhoneTest() + { + // TODO unit test for the property 'Phone' + } + /// + /// Test the property 'CompanyDepartment' + /// + [Test] + public void CompanyDepartmentTest() + { + // TODO unit test for the property 'CompanyDepartment' + } + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/StreamLocationTests.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/StreamLocationTests.cs new file mode 100644 index 0000000..01b252b --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/StreamLocationTests.cs @@ -0,0 +1,114 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing StreamLocation + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class StreamLocationTests + { + // TODO uncomment below to declare an instance variable for StreamLocation + //private StreamLocation instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of StreamLocation + //instance = new StreamLocation(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of StreamLocation + /// + [Test] + public void StreamLocationInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" StreamLocation + //Assert.IsInstanceOfType (instance, "variable 'instance' is a StreamLocation"); + } + + /// + /// Test the property 'FolderPath' + /// + [Test] + public void FolderPathTest() + { + // TODO unit test for the property 'FolderPath' + } + /// + /// Test the property 'OriginalFileName' + /// + [Test] + public void OriginalFileNameTest() + { + // TODO unit test for the property 'OriginalFileName' + } + /// + /// Test the property 'ContainerId' + /// + [Test] + public void ContainerIdTest() + { + // TODO unit test for the property 'ContainerId' + } + /// + /// Test the property 'FileId' + /// + [Test] + public void FileIdTest() + { + // TODO unit test for the property 'FileId' + } + + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/TemplateContextRequestTests.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/TemplateContextRequestTests.cs new file mode 100644 index 0000000..ecc1b1e --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/TemplateContextRequestTests.cs @@ -0,0 +1,114 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing TemplateContextRequest + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class TemplateContextRequestTests + { + // TODO uncomment below to declare an instance variable for TemplateContextRequest + //private TemplateContextRequest instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of TemplateContextRequest + //instance = new TemplateContextRequest(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of TemplateContextRequest + /// + [Test] + public void TemplateContextRequestInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" TemplateContextRequest + //Assert.IsInstanceOfType (instance, "variable 'instance' is a TemplateContextRequest"); + } + + /// + /// Test the property 'TemplateType' + /// + [Test] + public void TemplateTypeTest() + { + // TODO unit test for the property 'TemplateType' + } + /// + /// Test the property 'Description' + /// + [Test] + public void DescriptionTest() + { + // TODO unit test for the property 'Description' + } + /// + /// Test the property 'OwnerInfo' + /// + [Test] + public void OwnerInfoTest() + { + // TODO unit test for the property 'OwnerInfo' + } + /// + /// Test the property 'TemplateId' + /// + [Test] + public void TemplateIdTest() + { + // TODO unit test for the property 'TemplateId' + } + + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/TemplateContextResponseTests.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/TemplateContextResponseTests.cs new file mode 100644 index 0000000..7625bc0 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/TemplateContextResponseTests.cs @@ -0,0 +1,114 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing TemplateContextResponse + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class TemplateContextResponseTests + { + // TODO uncomment below to declare an instance variable for TemplateContextResponse + //private TemplateContextResponse instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of TemplateContextResponse + //instance = new TemplateContextResponse(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of TemplateContextResponse + /// + [Test] + public void TemplateContextResponseInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" TemplateContextResponse + //Assert.IsInstanceOfType (instance, "variable 'instance' is a TemplateContextResponse"); + } + + /// + /// Test the property 'CreationTime' + /// + [Test] + public void CreationTimeTest() + { + // TODO unit test for the property 'CreationTime' + } + /// + /// Test the property 'Context' + /// + [Test] + public void ContextTest() + { + // TODO unit test for the property 'Context' + } + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/TemplateContextTests.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/TemplateContextTests.cs new file mode 100644 index 0000000..ef78245 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/TemplateContextTests.cs @@ -0,0 +1,130 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing TemplateContext + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class TemplateContextTests + { + // TODO uncomment below to declare an instance variable for TemplateContext + //private TemplateContext instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of TemplateContext + //instance = new TemplateContext(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of TemplateContext + /// + [Test] + public void TemplateContextInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" TemplateContext + //Assert.IsInstanceOfType (instance, "variable 'instance' is a TemplateContext"); + } + + /// + /// Test the property 'TemplateType' + /// + [Test] + public void TemplateTypeTest() + { + // TODO unit test for the property 'TemplateType' + } + /// + /// Test the property 'TemplateFileLocations' + /// + [Test] + public void TemplateFileLocationsTest() + { + // TODO unit test for the property 'TemplateFileLocations' + } + /// + /// Test the property 'Description' + /// + [Test] + public void DescriptionTest() + { + // TODO unit test for the property 'Description' + } + /// + /// Test the property 'OwnerInfo' + /// + [Test] + public void OwnerInfoTest() + { + // TODO unit test for the property 'OwnerInfo' + } + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'TemplateId' + /// + [Test] + public void TemplateIdTest() + { + // TODO unit test for the property 'TemplateId' + } + + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Sphereon.SDK.TemplateProcessor.Test.csproj b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Sphereon.SDK.TemplateProcessor.Test.csproj new file mode 100644 index 0000000..f0a15f8 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Sphereon.SDK.TemplateProcessor.Test.csproj @@ -0,0 +1,94 @@ + + + + + Debug + AnyCPU + {19F1DEBC-DE5E-4517-8062-F000CD499087} + Library + Properties + Sphereon.SDK.TemplateProcessor.Test + Sphereon.SDK.TemplateProcessor.Test + v3.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + $(SolutionDir)\packages\Newtonsoft.Json.8.0.3\lib\net35\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.8.0.3\lib\net35\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.8.0.3\lib\net35\Newtonsoft.Json.dll + ..\..\vendor\Newtonsoft.Json.8.0.3\lib\net35\Newtonsoft.Json.dll + + + $(SolutionDir)\packages\RestSharp.105.1.0\lib\net35\RestSharp.dll + ..\packages\RestSharp.105.1.0\lib\net35\RestSharp.dll + ..\..\packages\RestSharp.105.1.0\lib\net35\RestSharp.dll + ..\..\vendor\RestSharp.105.1.0\lib\net35\RestSharp.dll + + + $(SolutionDir)\packages\NUnit.2.6.4\lib\nunit.framework.dll + ..\packages\NUnit.2.6.4\lib\nunit.framework.dll + ..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll + ..\..\vendor\NUnit.2.6.4\lib\nunit.framework.dll + + + + + + + + + + + + {034DD73B-80EA-4824-9D3A-776B31B31505} + Sphereon.SDK.TemplateProcessor + + + + diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/packages.config b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/packages.config new file mode 100644 index 0000000..6f3d691 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/packages.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Api/MergeApi.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Api/MergeApi.cs new file mode 100644 index 0000000..427dd15 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Api/MergeApi.cs @@ -0,0 +1,1491 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Sphereon.SDK.TemplateProcessor.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IMergeApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Store dataset + /// + /// + /// Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + /// + /// Thrown when fails to make API call + /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] + /// DataSetResponse + DataSetResponse CreateDataSet (string payload); + + /// + /// Store dataset + /// + /// + /// Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + /// + /// Thrown when fails to make API call + /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] + /// ApiResponse of DataSetResponse + ApiResponse CreateDataSetWithHttpInfo (string payload); + /// + /// Create template context + /// + /// + /// Create a unique template context for your environment + /// + /// Thrown when fails to make API call + /// The template request + /// TemplateContextResponse + TemplateContextResponse CreateTemplateContext (TemplateContextRequest templateRequest); + + /// + /// Create template context + /// + /// + /// Create a unique template context for your environment + /// + /// Thrown when fails to make API call + /// The template request + /// ApiResponse of TemplateContextResponse + ApiResponse CreateTemplateContextWithHttpInfo (TemplateContextRequest templateRequest); + /// + /// Delete a stored data set + /// + /// + /// Delete a stored data set + /// + /// Thrown when fails to make API call + /// dataSetId + /// DataSetResponse + DataSetResponse DeleteDataSet (string dataSetId); + + /// + /// Delete a stored data set + /// + /// + /// Delete a stored data set + /// + /// Thrown when fails to make API call + /// dataSetId + /// ApiResponse of DataSetResponse + ApiResponse DeleteDataSetWithHttpInfo (string dataSetId); + /// + /// Delete a job manually + /// + /// + /// Delete the merge job and all related files + /// + /// Thrown when fails to make API call + /// jobId + /// MergeJobResponse + MergeJobResponse DeleteJob (string jobId); + + /// + /// Delete a job manually + /// + /// + /// Delete the merge job and all related files + /// + /// Thrown when fails to make API call + /// jobId + /// ApiResponse of MergeJobResponse + ApiResponse DeleteJobWithHttpInfo (string jobId); + /// + /// Delete template context + /// + /// + /// Delete a template context with all history + /// + /// Thrown when fails to make API call + /// templateId + /// TemplateContextResponse + TemplateContextResponse DeleteTemplateContext (string templateId); + + /// + /// Delete template context + /// + /// + /// Delete a template context with all history + /// + /// Thrown when fails to make API call + /// templateId + /// ApiResponse of TemplateContextResponse + ApiResponse DeleteTemplateContextWithHttpInfo (string templateId); + /// + /// Job definition and state + /// + /// + /// Get the merge job definition and current state. Please not that you can differentiate based on http response status + /// + /// Thrown when fails to make API call + /// jobId + /// MergeJobResponse + MergeJobResponse GetJob (string jobId); + + /// + /// Job definition and state + /// + /// + /// Get the merge job definition and current state. Please not that you can differentiate based on http response status + /// + /// Thrown when fails to make API call + /// jobId + /// ApiResponse of MergeJobResponse + ApiResponse GetJobWithHttpInfo (string jobId); + /// + /// Get all jobs + /// + /// + /// Get all office text job definitions and their current state. + /// + /// Thrown when fails to make API call + /// A list of status to filter on. (optional) + /// List<MergeJobResponse> + List GetJobs (List status = null); + + /// + /// Get all jobs + /// + /// + /// Get all office text job definitions and their current state. + /// + /// Thrown when fails to make API call + /// A list of status to filter on. (optional) + /// ApiResponse of List<MergeJobResponse> + ApiResponse> GetJobsWithHttpInfo (List status = null); + /// + /// Get the result file + /// + /// + /// Get a merge result document as a binary stream. + /// + /// Thrown when fails to make API call + /// jobId + /// streamId + /// outputSettings (optional) + /// byte[] + byte[] GetResultStreamById (string jobId, string streamId, OutputSettings outputSettings = null); + + /// + /// Get the result file + /// + /// + /// Get a merge result document as a binary stream. + /// + /// Thrown when fails to make API call + /// jobId + /// streamId + /// outputSettings (optional) + /// ApiResponse of byte[] + ApiResponse GetResultStreamByIdWithHttpInfo (string jobId, string streamId, OutputSettings outputSettings = null); + /// + /// Get the result file + /// + /// + /// Get all documents inside a compressed container as a binary stream. + /// + /// Thrown when fails to make API call + /// jobId + /// outputSettings (optional) + /// byte[] + byte[] GetResultStreamsAsContainer (string jobId, OutputSettings outputSettings = null); + + /// + /// Get the result file + /// + /// + /// Get all documents inside a compressed container as a binary stream. + /// + /// Thrown when fails to make API call + /// jobId + /// outputSettings (optional) + /// ApiResponse of byte[] + ApiResponse GetResultStreamsAsContainerWithHttpInfo (string jobId, OutputSettings outputSettings = null); + /// + /// Get template context + /// + /// + /// Get an existing template context + /// + /// Thrown when fails to make API call + /// The template context name unique for your environment + /// TemplateContextResponse + TemplateContextResponse GetTemplateContext (string templateId); + + /// + /// Get template context + /// + /// + /// Get an existing template context + /// + /// Thrown when fails to make API call + /// The template context name unique for your environment + /// ApiResponse of TemplateContextResponse + ApiResponse GetTemplateContextWithHttpInfo (string templateId); + /// + /// Submit merge job for processing + /// + /// + /// Submit merge job run. + /// + /// Thrown when fails to make API call + /// The merge- and output settings + /// MergeJobResponse + MergeJobResponse SubmitJob (MergeSettings mergesettings); + + /// + /// Submit merge job for processing + /// + /// + /// Submit merge job run. + /// + /// Thrown when fails to make API call + /// The merge- and output settings + /// ApiResponse of MergeJobResponse + ApiResponse SubmitJobWithHttpInfo (MergeSettings mergesettings); + /// + /// Update template context + /// + /// + /// Update an existing template context for your environment + /// + /// Thrown when fails to make API call + /// templateContextRequest + /// TemplateContextResponse + TemplateContextResponse UpdateTemplateContext (TemplateContextRequest templateContextRequest); + + /// + /// Update template context + /// + /// + /// Update an existing template context for your environment + /// + /// Thrown when fails to make API call + /// templateContextRequest + /// ApiResponse of TemplateContextResponse + ApiResponse UpdateTemplateContextWithHttpInfo (TemplateContextRequest templateContextRequest); + /// + /// Upload template file + /// + /// + /// Upload the Office template file + /// + /// Thrown when fails to make API call + /// The template context name unique for your environment + /// The template (file/inputstream) to store + /// TemplateContextResponse + TemplateContextResponse UploadTemplateFile (string templateId, System.IO.Stream stream); + + /// + /// Upload template file + /// + /// + /// Upload the Office template file + /// + /// Thrown when fails to make API call + /// The template context name unique for your environment + /// The template (file/inputstream) to store + /// ApiResponse of TemplateContextResponse + ApiResponse UploadTemplateFileWithHttpInfo (string templateId, System.IO.Stream stream); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class MergeApi : IMergeApi + { + private Sphereon.SDK.TemplateProcessor.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public MergeApi(String basePath) + { + this.Configuration = new Configuration(new ApiClient(basePath)); + + ExceptionFactory = Sphereon.SDK.TemplateProcessor.Client.Configuration.DefaultExceptionFactory; + + // ensure API client has configuration ready + if (Configuration.ApiClient.Configuration == null) + { + this.Configuration.ApiClient.Configuration = this.Configuration; + } + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public MergeApi(Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = Sphereon.SDK.TemplateProcessor.Client.Configuration.DefaultExceptionFactory; + + // ensure API client has configuration ready + if (Configuration.ApiClient.Configuration == null) + { + this.Configuration.ApiClient.Configuration = this.Configuration; + } + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Sphereon.SDK.TemplateProcessor.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public Dictionary DefaultHeader() + { + return this.Configuration.DefaultHeader; + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + /// + /// Store dataset Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + /// + /// Thrown when fails to make API call + /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] + /// DataSetResponse + public DataSetResponse CreateDataSet (string payload) + { + ApiResponse localVarResponse = CreateDataSetWithHttpInfo(payload); + return localVarResponse.Data; + } + + /// + /// Store dataset Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + /// + /// Thrown when fails to make API call + /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] + /// ApiResponse of DataSetResponse + public ApiResponse< DataSetResponse > CreateDataSetWithHttpInfo (string payload) + { + // verify the required parameter 'payload' is set + if (payload == null) + throw new ApiException(400, "Missing required parameter 'payload' when calling MergeApi->CreateDataSet"); + + var localVarPath = "/template-processor/merge/0.1/datasets"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (payload != null && payload.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(payload); // http body (model) parameter + } + else + { + localVarPostBody = payload; // byte array + } + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateDataSet", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (DataSetResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DataSetResponse))); + + } + + /// + /// Create template context Create a unique template context for your environment + /// + /// Thrown when fails to make API call + /// The template request + /// TemplateContextResponse + public TemplateContextResponse CreateTemplateContext (TemplateContextRequest templateRequest) + { + ApiResponse localVarResponse = CreateTemplateContextWithHttpInfo(templateRequest); + return localVarResponse.Data; + } + + /// + /// Create template context Create a unique template context for your environment + /// + /// Thrown when fails to make API call + /// The template request + /// ApiResponse of TemplateContextResponse + public ApiResponse< TemplateContextResponse > CreateTemplateContextWithHttpInfo (TemplateContextRequest templateRequest) + { + // verify the required parameter 'templateRequest' is set + if (templateRequest == null) + throw new ApiException(400, "Missing required parameter 'templateRequest' when calling MergeApi->CreateTemplateContext"); + + var localVarPath = "/template-processor/merge/0.1/templates"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (templateRequest != null && templateRequest.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(templateRequest); // http body (model) parameter + } + else + { + localVarPostBody = templateRequest; // byte array + } + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateTemplateContext", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); + + } + + /// + /// Delete a stored data set Delete a stored data set + /// + /// Thrown when fails to make API call + /// dataSetId + /// DataSetResponse + public DataSetResponse DeleteDataSet (string dataSetId) + { + ApiResponse localVarResponse = DeleteDataSetWithHttpInfo(dataSetId); + return localVarResponse.Data; + } + + /// + /// Delete a stored data set Delete a stored data set + /// + /// Thrown when fails to make API call + /// dataSetId + /// ApiResponse of DataSetResponse + public ApiResponse< DataSetResponse > DeleteDataSetWithHttpInfo (string dataSetId) + { + // verify the required parameter 'dataSetId' is set + if (dataSetId == null) + throw new ApiException(400, "Missing required parameter 'dataSetId' when calling MergeApi->DeleteDataSet"); + + var localVarPath = "/template-processor/merge/0.1/datasets/{dataSetId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (dataSetId != null) localVarPathParams.Add("dataSetId", Configuration.ApiClient.ParameterToString(dataSetId)); // path parameter + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteDataSet", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (DataSetResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DataSetResponse))); + + } + + /// + /// Delete a job manually Delete the merge job and all related files + /// + /// Thrown when fails to make API call + /// jobId + /// MergeJobResponse + public MergeJobResponse DeleteJob (string jobId) + { + ApiResponse localVarResponse = DeleteJobWithHttpInfo(jobId); + return localVarResponse.Data; + } + + /// + /// Delete a job manually Delete the merge job and all related files + /// + /// Thrown when fails to make API call + /// jobId + /// ApiResponse of MergeJobResponse + public ApiResponse< MergeJobResponse > DeleteJobWithHttpInfo (string jobId) + { + // verify the required parameter 'jobId' is set + if (jobId == null) + throw new ApiException(400, "Missing required parameter 'jobId' when calling MergeApi->DeleteJob"); + + var localVarPath = "/template-processor/merge/0.1/jobs/{jobId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteJob", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (MergeJobResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(MergeJobResponse))); + + } + + /// + /// Delete template context Delete a template context with all history + /// + /// Thrown when fails to make API call + /// templateId + /// TemplateContextResponse + public TemplateContextResponse DeleteTemplateContext (string templateId) + { + ApiResponse localVarResponse = DeleteTemplateContextWithHttpInfo(templateId); + return localVarResponse.Data; + } + + /// + /// Delete template context Delete a template context with all history + /// + /// Thrown when fails to make API call + /// templateId + /// ApiResponse of TemplateContextResponse + public ApiResponse< TemplateContextResponse > DeleteTemplateContextWithHttpInfo (string templateId) + { + // verify the required parameter 'templateId' is set + if (templateId == null) + throw new ApiException(400, "Missing required parameter 'templateId' when calling MergeApi->DeleteTemplateContext"); + + var localVarPath = "/template-processor/merge/0.1/templates/{templateId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteTemplateContext", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); + + } + + /// + /// Job definition and state Get the merge job definition and current state. Please not that you can differentiate based on http response status + /// + /// Thrown when fails to make API call + /// jobId + /// MergeJobResponse + public MergeJobResponse GetJob (string jobId) + { + ApiResponse localVarResponse = GetJobWithHttpInfo(jobId); + return localVarResponse.Data; + } + + /// + /// Job definition and state Get the merge job definition and current state. Please not that you can differentiate based on http response status + /// + /// Thrown when fails to make API call + /// jobId + /// ApiResponse of MergeJobResponse + public ApiResponse< MergeJobResponse > GetJobWithHttpInfo (string jobId) + { + // verify the required parameter 'jobId' is set + if (jobId == null) + throw new ApiException(400, "Missing required parameter 'jobId' when calling MergeApi->GetJob"); + + var localVarPath = "/template-processor/merge/0.1/jobs/{jobId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetJob", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (MergeJobResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(MergeJobResponse))); + + } + + /// + /// Get all jobs Get all office text job definitions and their current state. + /// + /// Thrown when fails to make API call + /// A list of status to filter on. (optional) + /// List<MergeJobResponse> + public List GetJobs (List status = null) + { + ApiResponse> localVarResponse = GetJobsWithHttpInfo(status); + return localVarResponse.Data; + } + + /// + /// Get all jobs Get all office text job definitions and their current state. + /// + /// Thrown when fails to make API call + /// A list of status to filter on. (optional) + /// ApiResponse of List<MergeJobResponse> + public ApiResponse< List > GetJobsWithHttpInfo (List status = null) + { + + var localVarPath = "/template-processor/merge/0.1/jobs"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (status != null) localVarQueryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetJobs", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + + } + + /// + /// Get the result file Get a merge result document as a binary stream. + /// + /// Thrown when fails to make API call + /// jobId + /// streamId + /// outputSettings (optional) + /// byte[] + public byte[] GetResultStreamById (string jobId, string streamId, OutputSettings outputSettings = null) + { + ApiResponse localVarResponse = GetResultStreamByIdWithHttpInfo(jobId, streamId, outputSettings); + return localVarResponse.Data; + } + + /// + /// Get the result file Get a merge result document as a binary stream. + /// + /// Thrown when fails to make API call + /// jobId + /// streamId + /// outputSettings (optional) + /// ApiResponse of byte[] + public ApiResponse< byte[] > GetResultStreamByIdWithHttpInfo (string jobId, string streamId, OutputSettings outputSettings = null) + { + // verify the required parameter 'jobId' is set + if (jobId == null) + throw new ApiException(400, "Missing required parameter 'jobId' when calling MergeApi->GetResultStreamById"); + // verify the required parameter 'streamId' is set + if (streamId == null) + throw new ApiException(400, "Missing required parameter 'streamId' when calling MergeApi->GetResultStreamById"); + + var localVarPath = "/template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/octet-stream" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter + if (streamId != null) localVarPathParams.Add("streamId", Configuration.ApiClient.ParameterToString(streamId)); // path parameter + if (outputSettings != null && outputSettings.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(outputSettings); // http body (model) parameter + } + else + { + localVarPostBody = outputSettings; // byte array + } + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetResultStreamById", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (byte[]) Configuration.ApiClient.Deserialize(localVarResponse, typeof(byte[]))); + + } + + /// + /// Get the result file Get all documents inside a compressed container as a binary stream. + /// + /// Thrown when fails to make API call + /// jobId + /// outputSettings (optional) + /// byte[] + public byte[] GetResultStreamsAsContainer (string jobId, OutputSettings outputSettings = null) + { + ApiResponse localVarResponse = GetResultStreamsAsContainerWithHttpInfo(jobId, outputSettings); + return localVarResponse.Data; + } + + /// + /// Get the result file Get all documents inside a compressed container as a binary stream. + /// + /// Thrown when fails to make API call + /// jobId + /// outputSettings (optional) + /// ApiResponse of byte[] + public ApiResponse< byte[] > GetResultStreamsAsContainerWithHttpInfo (string jobId, OutputSettings outputSettings = null) + { + // verify the required parameter 'jobId' is set + if (jobId == null) + throw new ApiException(400, "Missing required parameter 'jobId' when calling MergeApi->GetResultStreamsAsContainer"); + + var localVarPath = "/template-processor/merge/0.1/jobs/{jobId}/result/container"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/octet-stream" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter + if (outputSettings != null && outputSettings.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(outputSettings); // http body (model) parameter + } + else + { + localVarPostBody = outputSettings; // byte array + } + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetResultStreamsAsContainer", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (byte[]) Configuration.ApiClient.Deserialize(localVarResponse, typeof(byte[]))); + + } + + /// + /// Get template context Get an existing template context + /// + /// Thrown when fails to make API call + /// The template context name unique for your environment + /// TemplateContextResponse + public TemplateContextResponse GetTemplateContext (string templateId) + { + ApiResponse localVarResponse = GetTemplateContextWithHttpInfo(templateId); + return localVarResponse.Data; + } + + /// + /// Get template context Get an existing template context + /// + /// Thrown when fails to make API call + /// The template context name unique for your environment + /// ApiResponse of TemplateContextResponse + public ApiResponse< TemplateContextResponse > GetTemplateContextWithHttpInfo (string templateId) + { + // verify the required parameter 'templateId' is set + if (templateId == null) + throw new ApiException(400, "Missing required parameter 'templateId' when calling MergeApi->GetTemplateContext"); + + var localVarPath = "/template-processor/merge/0.1/templates/{templateId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetTemplateContext", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); + + } + + /// + /// Submit merge job for processing Submit merge job run. + /// + /// Thrown when fails to make API call + /// The merge- and output settings + /// MergeJobResponse + public MergeJobResponse SubmitJob (MergeSettings mergesettings) + { + ApiResponse localVarResponse = SubmitJobWithHttpInfo(mergesettings); + return localVarResponse.Data; + } + + /// + /// Submit merge job for processing Submit merge job run. + /// + /// Thrown when fails to make API call + /// The merge- and output settings + /// ApiResponse of MergeJobResponse + public ApiResponse< MergeJobResponse > SubmitJobWithHttpInfo (MergeSettings mergesettings) + { + // verify the required parameter 'mergesettings' is set + if (mergesettings == null) + throw new ApiException(400, "Missing required parameter 'mergesettings' when calling MergeApi->SubmitJob"); + + var localVarPath = "/template-processor/merge/0.1/jobs"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (mergesettings != null && mergesettings.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(mergesettings); // http body (model) parameter + } + else + { + localVarPostBody = mergesettings; // byte array + } + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SubmitJob", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (MergeJobResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(MergeJobResponse))); + + } + + /// + /// Update template context Update an existing template context for your environment + /// + /// Thrown when fails to make API call + /// templateContextRequest + /// TemplateContextResponse + public TemplateContextResponse UpdateTemplateContext (TemplateContextRequest templateContextRequest) + { + ApiResponse localVarResponse = UpdateTemplateContextWithHttpInfo(templateContextRequest); + return localVarResponse.Data; + } + + /// + /// Update template context Update an existing template context for your environment + /// + /// Thrown when fails to make API call + /// templateContextRequest + /// ApiResponse of TemplateContextResponse + public ApiResponse< TemplateContextResponse > UpdateTemplateContextWithHttpInfo (TemplateContextRequest templateContextRequest) + { + // verify the required parameter 'templateContextRequest' is set + if (templateContextRequest == null) + throw new ApiException(400, "Missing required parameter 'templateContextRequest' when calling MergeApi->UpdateTemplateContext"); + + var localVarPath = "/template-processor/merge/0.1/templates"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (templateContextRequest != null && templateContextRequest.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(templateContextRequest); // http body (model) parameter + } + else + { + localVarPostBody = templateContextRequest; // byte array + } + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateTemplateContext", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); + + } + + /// + /// Upload template file Upload the Office template file + /// + /// Thrown when fails to make API call + /// The template context name unique for your environment + /// The template (file/inputstream) to store + /// TemplateContextResponse + public TemplateContextResponse UploadTemplateFile (string templateId, System.IO.Stream stream) + { + ApiResponse localVarResponse = UploadTemplateFileWithHttpInfo(templateId, stream); + return localVarResponse.Data; + } + + /// + /// Upload template file Upload the Office template file + /// + /// Thrown when fails to make API call + /// The template context name unique for your environment + /// The template (file/inputstream) to store + /// ApiResponse of TemplateContextResponse + public ApiResponse< TemplateContextResponse > UploadTemplateFileWithHttpInfo (string templateId, System.IO.Stream stream) + { + // verify the required parameter 'templateId' is set + if (templateId == null) + throw new ApiException(400, "Missing required parameter 'templateId' when calling MergeApi->UploadTemplateFile"); + // verify the required parameter 'stream' is set + if (stream == null) + throw new ApiException(400, "Missing required parameter 'stream' when calling MergeApi->UploadTemplateFile"); + + var localVarPath = "/template-processor/merge/0.1/templates/{templateId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "multipart/form-data" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter + if (stream != null) localVarFileParams.Add("stream", Configuration.ApiClient.ParameterToFile("stream", stream)); + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UploadTemplateFile", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); + + } + + } +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ApiClient.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ApiClient.cs new file mode 100644 index 0000000..74e7bcd --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ApiClient.cs @@ -0,0 +1,468 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Text.RegularExpressions; +using System.IO; +using System.Web; +using System.Linq; +using System.Net; +using System.Text; +using Newtonsoft.Json; +using RestSharp; + +namespace Sphereon.SDK.TemplateProcessor.Client +{ + /// + /// API client is mainly responsible for making the HTTP call to the API backend. + /// + public partial class ApiClient + { + private JsonSerializerSettings serializerSettings = new JsonSerializerSettings + { + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor + }; + + /// + /// Allows for extending request processing for generated code. + /// + /// The RestSharp request object + partial void InterceptRequest(IRestRequest request); + + /// + /// Allows for extending response processing for generated code. + /// + /// The RestSharp request object + /// The RestSharp response object + partial void InterceptResponse(IRestRequest request, IRestResponse response); + + /// + /// Initializes a new instance of the class + /// with default configuration and base path (https://gw.api.cloud.sphereon.com/). + /// + public ApiClient() + { + Configuration = Configuration.Default; + RestClient = new RestClient("https://gw.api.cloud.sphereon.com/"); + } + + /// + /// Initializes a new instance of the class + /// with default base path (https://gw.api.cloud.sphereon.com/). + /// + /// An instance of Configuration. + public ApiClient(Configuration config = null) + { + if (config == null) + Configuration = Configuration.Default; + else + Configuration = config; + + RestClient = new RestClient("https://gw.api.cloud.sphereon.com/"); + } + + /// + /// Initializes a new instance of the class + /// with default configuration. + /// + /// The base path. + public ApiClient(String basePath = "https://gw.api.cloud.sphereon.com/") + { + if (String.IsNullOrEmpty(basePath)) + throw new ArgumentException("basePath cannot be empty"); + + RestClient = new RestClient(basePath); + Configuration = Configuration.Default; + } + + /// + /// Gets or sets the default API client for making HTTP calls. + /// + /// The default API client. + [Obsolete("ApiClient.Default is deprecated, please use 'Configuration.Default.ApiClient' instead.")] + public static ApiClient Default; + + /// + /// Gets or sets the Configuration. + /// + /// An instance of the Configuration. + public Configuration Configuration { get; set; } + + /// + /// Gets or sets the RestClient. + /// + /// An instance of the RestClient + public RestClient RestClient { get; set; } + + // Creates and sets up a RestRequest prior to a call. + private RestRequest PrepareRequest( + String path, RestSharp.Method method, Dictionary queryParams, Object postBody, + Dictionary headerParams, Dictionary formParams, + Dictionary fileParams, Dictionary pathParams, + String contentType) + { + var request = new RestRequest(path, method); + + // add path parameter, if any + foreach(var param in pathParams) + request.AddParameter(param.Key, param.Value, ParameterType.UrlSegment); + + // add header parameter, if any + foreach(var param in headerParams) + request.AddHeader(param.Key, param.Value); + + // add query parameter, if any + foreach(var param in queryParams) + request.AddQueryParameter(param.Key, param.Value); + + // add form parameter, if any + foreach(var param in formParams) + request.AddParameter(param.Key, param.Value); + + // add file parameter, if any + foreach(var param in fileParams) + { + request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentType); + } + + if (postBody != null) // http body (model or byte[]) parameter + { + if (postBody.GetType() == typeof(String)) + { + request.AddParameter("application/json", postBody, ParameterType.RequestBody); + } + else if (postBody.GetType() == typeof(byte[])) + { + request.AddParameter(contentType, postBody, ParameterType.RequestBody); + } + } + + return request; + } + + /// + /// Makes the HTTP request (Sync). + /// + /// URL path. + /// HTTP method. + /// Query parameters. + /// HTTP body (POST request). + /// Header parameters. + /// Form parameters. + /// File parameters. + /// Path parameters. + /// Content Type of the request + /// Object + public Object CallApi( + String path, RestSharp.Method method, Dictionary queryParams, Object postBody, + Dictionary headerParams, Dictionary formParams, + Dictionary fileParams, Dictionary pathParams, + String contentType) + { + var request = PrepareRequest( + path, method, queryParams, postBody, headerParams, formParams, fileParams, + pathParams, contentType); + + // set timeout + RestClient.Timeout = Configuration.Timeout; + // set user agent + RestClient.UserAgent = Configuration.UserAgent; + + InterceptRequest(request); + var response = RestClient.Execute(request); + InterceptResponse(request, response); + + return (Object) response; + } + + + /// + /// Escape string (url-encoded). + /// + /// String to be escaped. + /// Escaped string. + public string EscapeString(string str) + { + return UrlEncode(str); + } + + /// + /// Create FileParameter based on Stream. + /// + /// Parameter name. + /// Input stream. + /// FileParameter. + public FileParameter ParameterToFile(string name, Stream stream) + { + if (stream is FileStream) + return FileParameter.Create(name, ReadAsBytes(stream), Path.GetFileName(((FileStream)stream).Name)); + else + return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided"); + } + + /// + /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. + /// If parameter is a list, join the list with ",". + /// Otherwise just return the string. + /// + /// The parameter (header, path, query, form). + /// Formatted string. + public string ParameterToString(object obj) + { + if (obj is DateTime) + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15T13:45:30.0000000 + return ((DateTime)obj).ToString (Configuration.DateTimeFormat); + else if (obj is DateTimeOffset) + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15T13:45:30.0000000 + return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); + else if (obj is IList) + { + var flattenedString = new StringBuilder(); + foreach (var param in (IList)obj) + { + if (flattenedString.Length > 0) + flattenedString.Append(","); + flattenedString.Append(param); + } + return flattenedString.ToString(); + } + else + return Convert.ToString (obj); + } + + /// + /// Deserialize the JSON string into a proper object. + /// + /// The HTTP response. + /// Object type. + /// Object representation of the JSON string. + public object Deserialize(IRestResponse response, Type type) + { + IList headers = response.Headers; + if (type == typeof(byte[])) // return byte array + { + return response.RawBytes; + } + + if (type == typeof(Stream)) + { + if (headers != null) + { + var filePath = String.IsNullOrEmpty(Configuration.TempFolderPath) + ? Path.GetTempPath() + : Configuration.TempFolderPath; + var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); + foreach (var header in headers) + { + var match = regex.Match(header.ToString()); + if (match.Success) + { + string fileName = filePath + SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); + File.WriteAllBytes(fileName, response.RawBytes); + return new FileStream(fileName, FileMode.Open); + } + } + } + var stream = new MemoryStream(response.RawBytes); + return stream; + } + + if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object + { + return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); + } + + if (type == typeof(String) || type.Name.StartsWith("System.Nullable")) // return primitive type + { + return ConvertType(response.Content, type); + } + + // at this point, it must be a model (json) + try + { + return JsonConvert.DeserializeObject(response.Content, type, serializerSettings); + } + catch (Exception e) + { + throw new ApiException(500, e.Message); + } + } + + /// + /// Serialize an input (model) into JSON string + /// + /// Object. + /// JSON string. + public String Serialize(object obj) + { + try + { + return obj != null ? JsonConvert.SerializeObject(obj) : null; + } + catch (Exception e) + { + throw new ApiException(500, e.Message); + } + } + + /// + /// Select the Content-Type header's value from the given content-type array: + /// if JSON exists in the given array, use it; + /// otherwise use the first one defined in 'consumes' + /// + /// The Content-Type array to select from. + /// The Content-Type header to use. + public String SelectHeaderContentType(String[] contentTypes) + { + if (contentTypes.Length == 0) + return null; + + if (contentTypes.Contains("application/json", StringComparer.OrdinalIgnoreCase)) + return "application/json"; + + return contentTypes[0]; // use the first content type specified in 'consumes' + } + + /// + /// Select the Accept header's value from the given accepts array: + /// if JSON exists in the given array, use it; + /// otherwise use all of them (joining into a string) + /// + /// The accepts array to select from. + /// The Accept header to use. + public String SelectHeaderAccept(String[] accepts) + { + if (accepts.Length == 0) + return null; + + if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) + return "application/json"; + + return String.Join(",", accepts); + } + + /// + /// Encode string in base64 format. + /// + /// String to be encoded. + /// Encoded string. + public static string Base64Encode(string text) + { + return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); + } + + /// + /// Dynamically cast the object into target type. + /// Ref: http://stackoverflow.com/questions/4925718/c-dynamic-runtime-cast + /// + /// Object to be casted + /// Target type + /// Casted object + public static object ConvertType(T source, Type dest) where T : class + { + return Convert.ChangeType(source, dest); + } + + /// + /// Convert stream to byte array + /// Credit/Ref: http://stackoverflow.com/a/221941/677735 + /// + /// Input stream to be converted + /// Byte array + public static byte[] ReadAsBytes(Stream input) + { + byte[] buffer = new byte[16*1024]; + using (MemoryStream ms = new MemoryStream()) + { + int read; + while ((read = input.Read(buffer, 0, buffer.Length)) > 0) + { + ms.Write(buffer, 0, read); + } + return ms.ToArray(); + } + } + + /// + /// URL encode a string + /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 + /// + /// String to be URL encoded + /// Byte array + public static string UrlEncode(string input) + { + const int maxLength = 32766; + + if (input == null) + { + throw new ArgumentNullException("input"); + } + + if (input.Length <= maxLength) + { + return Uri.EscapeDataString(input); + } + + StringBuilder sb = new StringBuilder(input.Length * 2); + int index = 0; + + while (index < input.Length) + { + int length = Math.Min(input.Length - index, maxLength); + string subString = input.Substring(index, length); + + sb.Append(Uri.EscapeDataString(subString)); + index += subString.Length; + } + + return sb.ToString(); + } + + /// + /// Sanitize filename by removing the path + /// + /// Filename + /// Filename + public static string SanitizeFilename(string filename) + { + Match match = Regex.Match(filename, @".*[/\\](.*)$"); + + if (match.Success) + { + return match.Groups[1].Value; + } + else + { + return filename; + } + } + } +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ApiException.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ApiException.cs new file mode 100644 index 0000000..385a710 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ApiException.cs @@ -0,0 +1,72 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; + +namespace Sphereon.SDK.TemplateProcessor.Client +{ + /// + /// API Exception + /// + public class ApiException : Exception + { + /// + /// Gets or sets the error code (HTTP status code) + /// + /// The error code (HTTP status code). + public int ErrorCode { get; set; } + + /// + /// Gets or sets the error content (body json object) + /// + /// The error content (Http response body). + public object ErrorContent { get; private set; } + + /// + /// Initializes a new instance of the class. + /// + public ApiException() {} + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// Error message. + public ApiException(int errorCode, string message) : base(message) + { + this.ErrorCode = errorCode; + } + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// Error message. + /// Error content. + public ApiException(int errorCode, string message, object errorContent = null) : base(message) + { + this.ErrorCode = errorCode; + this.ErrorContent = errorContent; + } + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ApiResponse.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ApiResponse.cs new file mode 100644 index 0000000..226d483 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ApiResponse.cs @@ -0,0 +1,66 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Collections.Generic; + +namespace Sphereon.SDK.TemplateProcessor.Client +{ + /// + /// API Response + /// + public class ApiResponse + { + /// + /// Gets or sets the status code (HTTP status code) + /// + /// The status code. + public int StatusCode { get; private set; } + + /// + /// Gets or sets the HTTP headers + /// + /// HTTP headers + public IDictionary Headers { get; private set; } + + /// + /// Gets or sets the data (parsed HTTP body) + /// + /// The data. + public T Data { get; private set; } + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// HTTP headers. + /// Data (parsed HTTP body) + public ApiResponse(int statusCode, IDictionary headers, T data) + { + this.StatusCode= statusCode; + this.Headers = headers; + this.Data = data; + } + + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/Configuration.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/Configuration.cs new file mode 100644 index 0000000..26500f5 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/Configuration.cs @@ -0,0 +1,338 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Reflection; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; + +namespace Sphereon.SDK.TemplateProcessor.Client +{ + /// + /// Represents a set of configuration settings + /// + public class Configuration + { + /// + /// Initializes a new instance of the Configuration class with different settings + /// + /// Api client + /// Dictionary of default HTTP header + /// Username + /// Password + /// accessToken + /// Dictionary of API key + /// Dictionary of API key prefix + /// Temp folder path + /// DateTime format string + /// HTTP connection timeout (in milliseconds) + /// HTTP user agent + public Configuration(ApiClient apiClient = null, + Dictionary defaultHeader = null, + string username = null, + string password = null, + string accessToken = null, + Dictionary apiKey = null, + Dictionary apiKeyPrefix = null, + string tempFolderPath = null, + string dateTimeFormat = null, + int timeout = 100000, + string userAgent = "Swagger-Codegen/1.0.0/csharp" + ) + { + setApiClientUsingDefault(apiClient); + + Username = username; + Password = password; + AccessToken = accessToken; + UserAgent = userAgent; + + if (defaultHeader != null) + DefaultHeader = defaultHeader; + if (apiKey != null) + ApiKey = apiKey; + if (apiKeyPrefix != null) + ApiKeyPrefix = apiKeyPrefix; + + TempFolderPath = tempFolderPath; + DateTimeFormat = dateTimeFormat; + Timeout = timeout; + } + + /// + /// Initializes a new instance of the Configuration class. + /// + /// Api client. + public Configuration(ApiClient apiClient) + { + setApiClientUsingDefault(apiClient); + } + + /// + /// Version of the package. + /// + /// Version of the package. + public const string Version = "1.0.0"; + + /// + /// Gets or sets the default Configuration. + /// + /// Configuration. + public static Configuration Default = new Configuration(); + + /// + /// Default creation of exceptions for a given method name and response object + /// + public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) => + { + int status = (int) response.StatusCode; + if (status >= 400) return new ApiException(status, String.Format("Error calling {0}: {1}", methodName, response.Content), response.Content); + if (status == 0) return new ApiException(status, String.Format("Error calling {0}: {1}", methodName, response.ErrorMessage), response.ErrorMessage); + return null; + }; + + /// + /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. + /// + /// Timeout. + public int Timeout + { + get { return ApiClient.RestClient.Timeout; } + + set + { + if (ApiClient != null) + ApiClient.RestClient.Timeout = value; + } + } + + /// + /// Gets or sets the default API client for making HTTP calls. + /// + /// The API client. + public ApiClient ApiClient; + + /// + /// Set the ApiClient using Default or ApiClient instance. + /// + /// An instance of ApiClient. + /// + public void setApiClientUsingDefault (ApiClient apiClient = null) + { + if (apiClient == null) + { + if (Default != null && Default.ApiClient == null) + Default.ApiClient = new ApiClient(); + + ApiClient = Default != null ? Default.ApiClient : new ApiClient(); + } + else + { + if (Default != null && Default.ApiClient == null) + Default.ApiClient = apiClient; + + ApiClient = apiClient; + } + } + + private Dictionary _defaultHeaderMap = new Dictionary(); + + /// + /// Gets or sets the default header. + /// + public Dictionary DefaultHeader + { + get { return _defaultHeaderMap; } + + set + { + _defaultHeaderMap = value; + } + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + public void AddDefaultHeader(string key, string value) + { + _defaultHeaderMap[key] = value; + } + + /// + /// Add Api Key Header. + /// + /// Api Key name. + /// Api Key value. + /// + public void AddApiKey(string key, string value) + { + ApiKey[key] = value; + } + + /// + /// Sets the API key prefix. + /// + /// Api Key name. + /// Api Key value. + public void AddApiKeyPrefix(string key, string value) + { + ApiKeyPrefix[key] = value; + } + + /// + /// Gets or sets the HTTP user agent. + /// + /// Http user agent. + public String UserAgent { get; set; } + + /// + /// Gets or sets the username (HTTP basic authentication). + /// + /// The username. + public String Username { get; set; } + + /// + /// Gets or sets the password (HTTP basic authentication). + /// + /// The password. + public String Password { get; set; } + + /// + /// Gets or sets the access token for OAuth2 authentication. + /// + /// The access token. + public String AccessToken { get; set; } + + /// + /// Gets or sets the API key based on the authentication name. + /// + /// The API key. + public Dictionary ApiKey = new Dictionary(); + + /// + /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. + /// + /// The prefix of the API key. + public Dictionary ApiKeyPrefix = new Dictionary(); + + /// + /// Get the API key with prefix. + /// + /// API key identifier (authentication scheme). + /// API key with prefix. + public string GetApiKeyWithPrefix (string apiKeyIdentifier) + { + var apiKeyValue = ""; + ApiKey.TryGetValue (apiKeyIdentifier, out apiKeyValue); + var apiKeyPrefix = ""; + if (ApiKeyPrefix.TryGetValue (apiKeyIdentifier, out apiKeyPrefix)) + return apiKeyPrefix + " " + apiKeyValue; + else + return apiKeyValue; + } + + private string _tempFolderPath = Path.GetTempPath(); + + /// + /// Gets or sets the temporary folder path to store the files downloaded from the server. + /// + /// Folder path. + public String TempFolderPath + { + get { return _tempFolderPath; } + + set + { + if (String.IsNullOrEmpty(value)) + { + _tempFolderPath = value; + return; + } + + // create the directory if it does not exist + if (!Directory.Exists(value)) + Directory.CreateDirectory(value); + + // check if the path contains directory separator at the end + if (value[value.Length - 1] == Path.DirectorySeparatorChar) + _tempFolderPath = value; + else + _tempFolderPath = value + Path.DirectorySeparatorChar; + } + } + + private const string ISO8601_DATETIME_FORMAT = "o"; + + private string _dateTimeFormat = ISO8601_DATETIME_FORMAT; + + /// + /// Gets or sets the the date time format used when serializing in the ApiClient + /// By default, it's set to ISO 8601 - "o", for others see: + /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx + /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx + /// No validation is done to ensure that the string you're providing is valid + /// + /// The DateTimeFormat string + public String DateTimeFormat + { + get + { + return _dateTimeFormat; + } + set + { + if (string.IsNullOrEmpty(value)) + { + // Never allow a blank or null string, go back to the default + _dateTimeFormat = ISO8601_DATETIME_FORMAT; + return; + } + + // Caution, no validation when you choose date time format other than ISO 8601 + // Take a look at the above links + _dateTimeFormat = value; + } + } + + /// + /// Returns a string with essential information for debugging. + /// + public static String ToDebugReport() + { + String report = "C# SDK (Sphereon.SDK.TemplateProcessor) Debug Report:\n"; + report += " OS: " + Environment.OSVersion + "\n"; + report += " .NET Framework Version: " + Assembly + .GetExecutingAssembly() + .GetReferencedAssemblies() + .Where(x => x.Name == "System.Core").First().Version.ToString() + "\n"; + report += " Version of the API: 0.1\n"; + report += " SDK Package Version: 1.0.0\n"; + + return report; + } + } +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ExceptionFactory.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ExceptionFactory.cs new file mode 100644 index 0000000..2cec3aa --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ExceptionFactory.cs @@ -0,0 +1,36 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using System; +using RestSharp; + +namespace Sphereon.SDK.TemplateProcessor.Client +{ + /// + /// A delegate to ExceptionFactory method + /// + /// Method name + /// Response + /// Exceptions + public delegate Exception ExceptionFactory(string methodName, IRestResponse response); +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/IApiAccessor.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/IApiAccessor.cs new file mode 100644 index 0000000..9cba70a --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/IApiAccessor.cs @@ -0,0 +1,54 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; + +namespace Sphereon.SDK.TemplateProcessor.Client +{ + /// + /// Represents configuration aspects required to interact with the API endpoints. + /// + public interface IApiAccessor + { + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + Configuration Configuration {get; set;} + + /// + /// Gets the base path of the API client. + /// + /// The base path + String GetBasePath(); + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + ExceptionFactory ExceptionFactory { get; set; } + } +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/DataSetResponse.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/DataSetResponse.cs new file mode 100644 index 0000000..a3a94a9 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/DataSetResponse.cs @@ -0,0 +1,209 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// The merge template response. + /// + [DataContract] + public partial class DataSetResponse : IEquatable + { + /// + /// The status of the template + /// + /// The status of the template + [JsonConverter(typeof(StringEnumConverter))] + public enum StatusEnum + { + + /// + /// Enum CREATED for "CREATED" + /// + [EnumMember(Value = "CREATED")] + CREATED, + + /// + /// Enum UPDATED for "UPDATED" + /// + [EnumMember(Value = "UPDATED")] + UPDATED, + + /// + /// Enum DELETED for "DELETED" + /// + [EnumMember(Value = "DELETED")] + DELETED + } + + /// + /// The status of the template + /// + /// The status of the template + [DataMember(Name="status", EmitDefaultValue=false)] + public StatusEnum? Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DataSetResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// Unique dataset id (required). + public DataSetResponse(string Id = null) + { + // to ensure "Id" is required (not null) + if (Id == null) + { + throw new InvalidDataException("Id is a required property for DataSetResponse and cannot be null"); + } + else + { + this.Id = Id; + } + } + + /// + /// The completion date/time of this template in ISO 8601 format + /// + /// The completion date/time of this template in ISO 8601 format + [DataMember(Name="completionTime", EmitDefaultValue=false)] + public DateTime? CompletionTime { get; private set; } + /// + /// The creation date/time of this template in ISO 8601 format + /// + /// The creation date/time of this template in ISO 8601 format + [DataMember(Name="creationTime", EmitDefaultValue=false)] + public DateTime? CreationTime { get; private set; } + /// + /// Unique dataset id + /// + /// Unique dataset id + [DataMember(Name="id", EmitDefaultValue=false)] + public string Id { get; set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DataSetResponse {\n"); + sb.Append(" CompletionTime: ").Append(CompletionTime).Append("\n"); + sb.Append(" CreationTime: ").Append(CreationTime).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as DataSetResponse); + } + + /// + /// Returns true if DataSetResponse instances are equal + /// + /// Instance of DataSetResponse to be compared + /// Boolean + public bool Equals(DataSetResponse other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.CompletionTime == other.CompletionTime || + this.CompletionTime != null && + this.CompletionTime.Equals(other.CompletionTime) + ) && + ( + this.CreationTime == other.CreationTime || + this.CreationTime != null && + this.CreationTime.Equals(other.CreationTime) + ) && + ( + this.Id == other.Id || + this.Id != null && + this.Id.Equals(other.Id) + ) && + ( + this.Status == other.Status || + this.Status != null && + this.Status.Equals(other.Status) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.CompletionTime != null) + hash = hash * 59 + this.CompletionTime.GetHashCode(); + if (this.CreationTime != null) + hash = hash * 59 + this.CreationTime.GetHashCode(); + if (this.Id != null) + hash = hash * 59 + this.Id.GetHashCode(); + if (this.Status != null) + hash = hash * 59 + this.Status.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/Error.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/Error.cs new file mode 100644 index 0000000..d7fc44c --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/Error.cs @@ -0,0 +1,226 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// An error + /// + [DataContract] + public partial class Error : IEquatable + { + /// + /// Gets or Sets Level + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum LevelEnum + { + + /// + /// Enum INFO for "INFO" + /// + [EnumMember(Value = "INFO")] + INFO, + + /// + /// Enum WARNING for "WARNING" + /// + [EnumMember(Value = "WARNING")] + WARNING, + + /// + /// Enum FATAL for "FATAL" + /// + [EnumMember(Value = "FATAL")] + FATAL + } + + /// + /// Gets or Sets Level + /// + [DataMember(Name="level", EmitDefaultValue=false)] + public LevelEnum? Level { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Error() { } + /// + /// Initializes a new instance of the class. + /// + /// Code (required). + /// Level (required). + /// Cause. + /// Message (required). + public Error(string Code = null, LevelEnum? Level = null, Error Cause = null, string Message = null) + { + // to ensure "Code" is required (not null) + if (Code == null) + { + throw new InvalidDataException("Code is a required property for Error and cannot be null"); + } + else + { + this.Code = Code; + } + // to ensure "Level" is required (not null) + if (Level == null) + { + throw new InvalidDataException("Level is a required property for Error and cannot be null"); + } + else + { + this.Level = Level; + } + // to ensure "Message" is required (not null) + if (Message == null) + { + throw new InvalidDataException("Message is a required property for Error and cannot be null"); + } + else + { + this.Message = Message; + } + this.Cause = Cause; + } + + /// + /// Gets or Sets Code + /// + [DataMember(Name="code", EmitDefaultValue=false)] + public string Code { get; set; } + /// + /// Gets or Sets Cause + /// + [DataMember(Name="cause", EmitDefaultValue=false)] + public Error Cause { get; set; } + /// + /// Gets or Sets Message + /// + [DataMember(Name="message", EmitDefaultValue=false)] + public string Message { get; set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Error {\n"); + sb.Append(" Code: ").Append(Code).Append("\n"); + sb.Append(" Level: ").Append(Level).Append("\n"); + sb.Append(" Cause: ").Append(Cause).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as Error); + } + + /// + /// Returns true if Error instances are equal + /// + /// Instance of Error to be compared + /// Boolean + public bool Equals(Error other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.Code == other.Code || + this.Code != null && + this.Code.Equals(other.Code) + ) && + ( + this.Level == other.Level || + this.Level != null && + this.Level.Equals(other.Level) + ) && + ( + this.Cause == other.Cause || + this.Cause != null && + this.Cause.Equals(other.Cause) + ) && + ( + this.Message == other.Message || + this.Message != null && + this.Message.Equals(other.Message) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.Code != null) + hash = hash * 59 + this.Code.GetHashCode(); + if (this.Level != null) + hash = hash * 59 + this.Level.GetHashCode(); + if (this.Cause != null) + hash = hash * 59 + this.Cause.GetHashCode(); + if (this.Message != null) + hash = hash * 59 + this.Message.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/ErrorResponse.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/ErrorResponse.cs new file mode 100644 index 0000000..784d4e2 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/ErrorResponse.cs @@ -0,0 +1,126 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// The error response + /// + [DataContract] + public partial class ErrorResponse : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// Errors. + public ErrorResponse(List Errors = null) + { + this.Errors = Errors; + } + + /// + /// Gets or Sets Errors + /// + [DataMember(Name="errors", EmitDefaultValue=false)] + public List Errors { get; set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ErrorResponse {\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as ErrorResponse); + } + + /// + /// Returns true if ErrorResponse instances are equal + /// + /// Instance of ErrorResponse to be compared + /// Boolean + public bool Equals(ErrorResponse other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.Errors == other.Errors || + this.Errors != null && + this.Errors.SequenceEqual(other.Errors) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.Errors != null) + hash = hash * 59 + this.Errors.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/Lifecycle.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/Lifecycle.cs new file mode 100644 index 0000000..8ff4348 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/Lifecycle.cs @@ -0,0 +1,191 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// Lifecycle settings. When no lifecycle settings are supplied, the job and files will be deleted directly after retrieval of the file + /// + [DataContract] + public partial class Lifecycle : IEquatable + { + /// + /// Gets or Sets Action + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum ActionEnum + { + + /// + /// Enum DELETE for "DELETE" + /// + [EnumMember(Value = "DELETE")] + DELETE + } + + /// + /// Gets or Sets Type + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum TypeEnum + { + + /// + /// Enum RETRIEVAL for "RETRIEVAL" + /// + [EnumMember(Value = "RETRIEVAL")] + RETRIEVAL, + + /// + /// Enum TIME for "TIME" + /// + [EnumMember(Value = "TIME")] + TIME + } + + /// + /// Gets or Sets Action + /// + [DataMember(Name="action", EmitDefaultValue=false)] + public ActionEnum? Action { get; set; } + /// + /// Gets or Sets Type + /// + [DataMember(Name="type", EmitDefaultValue=false)] + public TypeEnum? Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation. + /// Action. + /// Type. + public Lifecycle(DateTime? ActionTime = null, ActionEnum? Action = null, TypeEnum? Type = null) + { + this.ActionTime = ActionTime; + this.Action = Action; + this.Type = Type; + } + + /// + /// The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation + /// + /// The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation + [DataMember(Name="actionTime", EmitDefaultValue=false)] + public DateTime? ActionTime { get; set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Lifecycle {\n"); + sb.Append(" ActionTime: ").Append(ActionTime).Append("\n"); + sb.Append(" Action: ").Append(Action).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as Lifecycle); + } + + /// + /// Returns true if Lifecycle instances are equal + /// + /// Instance of Lifecycle to be compared + /// Boolean + public bool Equals(Lifecycle other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.ActionTime == other.ActionTime || + this.ActionTime != null && + this.ActionTime.Equals(other.ActionTime) + ) && + ( + this.Action == other.Action || + this.Action != null && + this.Action.Equals(other.Action) + ) && + ( + this.Type == other.Type || + this.Type != null && + this.Type.Equals(other.Type) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.ActionTime != null) + hash = hash * 59 + this.ActionTime.GetHashCode(); + if (this.Action != null) + hash = hash * 59 + this.Action.GetHashCode(); + if (this.Type != null) + hash = hash * 59 + this.Type.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/MergeJob.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/MergeJob.cs new file mode 100644 index 0000000..d1a6849 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/MergeJob.cs @@ -0,0 +1,344 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// The merge job. Has access to the job merge data. + /// + [DataContract] + public partial class MergeJob : IEquatable + { + /// + /// The status of the job + /// + /// The status of the job + [JsonConverter(typeof(StringEnumConverter))] + public enum StatusEnum + { + + /// + /// Enum CREATED for "CREATED" + /// + [EnumMember(Value = "CREATED")] + CREATED, + + /// + /// Enum UPDATED for "UPDATED" + /// + [EnumMember(Value = "UPDATED")] + UPDATED, + + /// + /// Enum PROCESSING for "PROCESSING" + /// + [EnumMember(Value = "PROCESSING")] + PROCESSING, + + /// + /// Enum DONE for "DONE" + /// + [EnumMember(Value = "DONE")] + DONE, + + /// + /// Enum ERROR for "ERROR" + /// + [EnumMember(Value = "ERROR")] + ERROR, + + /// + /// Enum DELETED for "DELETED" + /// + [EnumMember(Value = "DELETED")] + DELETED + } + + /// + /// The status of the job + /// + /// The status of the job + [DataMember(Name="status", EmitDefaultValue=false)] + public StatusEnum? Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected MergeJob() { } + /// + /// Initializes a new instance of the class. + /// + /// The target folder path of result files. + /// The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation (required). + /// The target container id of result files. + /// Data set id. + /// The storage locations of the result files. (required). + /// Header data set ids. + /// MergeSettings. + public MergeJob(string ResultFolderPath = null, string JobId = null, string ResultContainerId = null, string DataSetId = null, List ResultStreams = null, List HeaderDataSetIds = null, MergeSettings MergeSettings = null) + { + // to ensure "JobId" is required (not null) + if (JobId == null) + { + throw new InvalidDataException("JobId is a required property for MergeJob and cannot be null"); + } + else + { + this.JobId = JobId; + } + // to ensure "ResultStreams" is required (not null) + if (ResultStreams == null) + { + throw new InvalidDataException("ResultStreams is a required property for MergeJob and cannot be null"); + } + else + { + this.ResultStreams = ResultStreams; + } + this.ResultFolderPath = ResultFolderPath; + this.ResultContainerId = ResultContainerId; + this.DataSetId = DataSetId; + this.HeaderDataSetIds = HeaderDataSetIds; + this.MergeSettings = MergeSettings; + } + + /// + /// The target folder path of result files + /// + /// The target folder path of result files + [DataMember(Name="resultFolderPath", EmitDefaultValue=false)] + public string ResultFolderPath { get; set; } + /// + /// The completion date/time of this job in ISO 8601 format + /// + /// The completion date/time of this job in ISO 8601 format + [DataMember(Name="completionTime", EmitDefaultValue=false)] + public DateTime? CompletionTime { get; private set; } + /// + /// The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation + /// + /// The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation + [DataMember(Name="jobId", EmitDefaultValue=false)] + public string JobId { get; set; } + /// + /// The target container id of result files + /// + /// The target container id of result files + [DataMember(Name="resultContainerId", EmitDefaultValue=false)] + public string ResultContainerId { get; set; } + /// + /// The creation date/time of this job in ISO 8601 format + /// + /// The creation date/time of this job in ISO 8601 format + [DataMember(Name="creationTime", EmitDefaultValue=false)] + public DateTime? CreationTime { get; private set; } + /// + /// Data set id + /// + /// Data set id + [DataMember(Name="dataSetId", EmitDefaultValue=false)] + public string DataSetId { get; set; } + /// + /// The storage locations of the result files. + /// + /// The storage locations of the result files. + [DataMember(Name="resultStreams", EmitDefaultValue=false)] + public List ResultStreams { get; set; } + /// + /// Header data set ids + /// + /// Header data set ids + [DataMember(Name="headerDataSetIds", EmitDefaultValue=false)] + public List HeaderDataSetIds { get; set; } + /// + /// Gets or Sets MergeSettings + /// + [DataMember(Name="mergeSettings", EmitDefaultValue=false)] + public MergeSettings MergeSettings { get; set; } + /// + /// A status message, which can be informational, warning or error. A message here does not indicate an error perse + /// + /// A status message, which can be informational, warning or error. A message here does not indicate an error perse + [DataMember(Name="statusMessage", EmitDefaultValue=false)] + public string StatusMessage { get; private set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class MergeJob {\n"); + sb.Append(" ResultFolderPath: ").Append(ResultFolderPath).Append("\n"); + sb.Append(" CompletionTime: ").Append(CompletionTime).Append("\n"); + sb.Append(" JobId: ").Append(JobId).Append("\n"); + sb.Append(" ResultContainerId: ").Append(ResultContainerId).Append("\n"); + sb.Append(" CreationTime: ").Append(CreationTime).Append("\n"); + sb.Append(" DataSetId: ").Append(DataSetId).Append("\n"); + sb.Append(" ResultStreams: ").Append(ResultStreams).Append("\n"); + sb.Append(" HeaderDataSetIds: ").Append(HeaderDataSetIds).Append("\n"); + sb.Append(" MergeSettings: ").Append(MergeSettings).Append("\n"); + sb.Append(" StatusMessage: ").Append(StatusMessage).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as MergeJob); + } + + /// + /// Returns true if MergeJob instances are equal + /// + /// Instance of MergeJob to be compared + /// Boolean + public bool Equals(MergeJob other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.ResultFolderPath == other.ResultFolderPath || + this.ResultFolderPath != null && + this.ResultFolderPath.Equals(other.ResultFolderPath) + ) && + ( + this.CompletionTime == other.CompletionTime || + this.CompletionTime != null && + this.CompletionTime.Equals(other.CompletionTime) + ) && + ( + this.JobId == other.JobId || + this.JobId != null && + this.JobId.Equals(other.JobId) + ) && + ( + this.ResultContainerId == other.ResultContainerId || + this.ResultContainerId != null && + this.ResultContainerId.Equals(other.ResultContainerId) + ) && + ( + this.CreationTime == other.CreationTime || + this.CreationTime != null && + this.CreationTime.Equals(other.CreationTime) + ) && + ( + this.DataSetId == other.DataSetId || + this.DataSetId != null && + this.DataSetId.Equals(other.DataSetId) + ) && + ( + this.ResultStreams == other.ResultStreams || + this.ResultStreams != null && + this.ResultStreams.SequenceEqual(other.ResultStreams) + ) && + ( + this.HeaderDataSetIds == other.HeaderDataSetIds || + this.HeaderDataSetIds != null && + this.HeaderDataSetIds.SequenceEqual(other.HeaderDataSetIds) + ) && + ( + this.MergeSettings == other.MergeSettings || + this.MergeSettings != null && + this.MergeSettings.Equals(other.MergeSettings) + ) && + ( + this.StatusMessage == other.StatusMessage || + this.StatusMessage != null && + this.StatusMessage.Equals(other.StatusMessage) + ) && + ( + this.Status == other.Status || + this.Status != null && + this.Status.Equals(other.Status) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.ResultFolderPath != null) + hash = hash * 59 + this.ResultFolderPath.GetHashCode(); + if (this.CompletionTime != null) + hash = hash * 59 + this.CompletionTime.GetHashCode(); + if (this.JobId != null) + hash = hash * 59 + this.JobId.GetHashCode(); + if (this.ResultContainerId != null) + hash = hash * 59 + this.ResultContainerId.GetHashCode(); + if (this.CreationTime != null) + hash = hash * 59 + this.CreationTime.GetHashCode(); + if (this.DataSetId != null) + hash = hash * 59 + this.DataSetId.GetHashCode(); + if (this.ResultStreams != null) + hash = hash * 59 + this.ResultStreams.GetHashCode(); + if (this.HeaderDataSetIds != null) + hash = hash * 59 + this.HeaderDataSetIds.GetHashCode(); + if (this.MergeSettings != null) + hash = hash * 59 + this.MergeSettings.GetHashCode(); + if (this.StatusMessage != null) + hash = hash * 59 + this.StatusMessage.GetHashCode(); + if (this.Status != null) + hash = hash * 59 + this.Status.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/MergeJobResponse.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/MergeJobResponse.cs new file mode 100644 index 0000000..a62aef1 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/MergeJobResponse.cs @@ -0,0 +1,228 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// The merge job response. + /// + [DataContract] + public partial class MergeJobResponse : IEquatable + { + /// + /// The status of the job + /// + /// The status of the job + [JsonConverter(typeof(StringEnumConverter))] + public enum StatusEnum + { + + /// + /// Enum CREATED for "CREATED" + /// + [EnumMember(Value = "CREATED")] + CREATED, + + /// + /// Enum UPDATED for "UPDATED" + /// + [EnumMember(Value = "UPDATED")] + UPDATED, + + /// + /// Enum PROCESSING for "PROCESSING" + /// + [EnumMember(Value = "PROCESSING")] + PROCESSING, + + /// + /// Enum DONE for "DONE" + /// + [EnumMember(Value = "DONE")] + DONE, + + /// + /// Enum ERROR for "ERROR" + /// + [EnumMember(Value = "ERROR")] + ERROR, + + /// + /// Enum DELETED for "DELETED" + /// + [EnumMember(Value = "DELETED")] + DELETED + } + + /// + /// The status of the job + /// + /// The status of the job + [DataMember(Name="status", EmitDefaultValue=false)] + public StatusEnum? Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected MergeJobResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation (required). + /// Job. + public MergeJobResponse(string JobId = null, MergeJob Job = null) + { + // to ensure "JobId" is required (not null) + if (JobId == null) + { + throw new InvalidDataException("JobId is a required property for MergeJobResponse and cannot be null"); + } + else + { + this.JobId = JobId; + } + this.Job = Job; + } + + /// + /// The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation + /// + /// The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation + [DataMember(Name="jobId", EmitDefaultValue=false)] + public string JobId { get; set; } + /// + /// Gets or Sets Job + /// + [DataMember(Name="job", EmitDefaultValue=false)] + public MergeJob Job { get; set; } + /// + /// A status message, which can be informational, warning or error. AA message here does not indicate an error perse + /// + /// A status message, which can be informational, warning or error. AA message here does not indicate an error perse + [DataMember(Name="statusMessage", EmitDefaultValue=false)] + public string StatusMessage { get; private set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class MergeJobResponse {\n"); + sb.Append(" JobId: ").Append(JobId).Append("\n"); + sb.Append(" Job: ").Append(Job).Append("\n"); + sb.Append(" StatusMessage: ").Append(StatusMessage).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as MergeJobResponse); + } + + /// + /// Returns true if MergeJobResponse instances are equal + /// + /// Instance of MergeJobResponse to be compared + /// Boolean + public bool Equals(MergeJobResponse other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.JobId == other.JobId || + this.JobId != null && + this.JobId.Equals(other.JobId) + ) && + ( + this.Job == other.Job || + this.Job != null && + this.Job.Equals(other.Job) + ) && + ( + this.StatusMessage == other.StatusMessage || + this.StatusMessage != null && + this.StatusMessage.Equals(other.StatusMessage) + ) && + ( + this.Status == other.Status || + this.Status != null && + this.Status.Equals(other.Status) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.JobId != null) + hash = hash * 59 + this.JobId.GetHashCode(); + if (this.Job != null) + hash = hash * 59 + this.Job.GetHashCode(); + if (this.StatusMessage != null) + hash = hash * 59 + this.StatusMessage.GetHashCode(); + if (this.Status != null) + hash = hash * 59 + this.Status.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/MergeSettings.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/MergeSettings.cs new file mode 100644 index 0000000..4b427d9 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/MergeSettings.cs @@ -0,0 +1,328 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// Merge settings + /// + [DataContract] + public partial class MergeSettings : IEquatable + { + /// + /// Gets or Sets MergeResult + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum MergeResultEnum + { + + /// + /// Enum SINGLEFILE for "SINGLE_FILE" + /// + [EnumMember(Value = "SINGLE_FILE")] + SINGLEFILE, + + /// + /// Enum SEPARATEFILES for "SEPARATE_FILES" + /// + [EnumMember(Value = "SEPARATE_FILES")] + SEPARATEFILES + } + + /// + /// Gets or Sets Engine + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EngineEnum + { + + /// + /// Enum BASIC for "BASIC" + /// + [EnumMember(Value = "BASIC")] + BASIC, + + /// + /// Enum PREMIUM for "PREMIUM" + /// + [EnumMember(Value = "PREMIUM")] + PREMIUM + } + + /// + /// Gets or Sets MergeResult + /// + [DataMember(Name="mergeResult", EmitDefaultValue=false)] + public MergeResultEnum? MergeResult { get; set; } + /// + /// Gets or Sets Engine + /// + [DataMember(Name="engine", EmitDefaultValue=false)] + public EngineEnum? Engine { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected MergeSettings() { } + /// + /// Initializes a new instance of the class. + /// + /// Lifecycle. + /// MergeResult. + /// Data set id (required). + /// Engine. + /// optional header data set ids. + /// Template version. + /// The output location of the result files. (required). + /// Template id (required). + /// OutputSettings (required). + public MergeSettings(Lifecycle Lifecycle = null, MergeResultEnum? MergeResult = null, string DataSetId = null, EngineEnum? Engine = null, List HeaderDataSetIds = null, int? TemplateVersion = null, StreamLocation ResultStreamLocation = null, string TemplateId = null, OutputSettings OutputSettings = null) + { + // to ensure "DataSetId" is required (not null) + if (DataSetId == null) + { + throw new InvalidDataException("DataSetId is a required property for MergeSettings and cannot be null"); + } + else + { + this.DataSetId = DataSetId; + } + // to ensure "ResultStreamLocation" is required (not null) + if (ResultStreamLocation == null) + { + throw new InvalidDataException("ResultStreamLocation is a required property for MergeSettings and cannot be null"); + } + else + { + this.ResultStreamLocation = ResultStreamLocation; + } + // to ensure "TemplateId" is required (not null) + if (TemplateId == null) + { + throw new InvalidDataException("TemplateId is a required property for MergeSettings and cannot be null"); + } + else + { + this.TemplateId = TemplateId; + } + // to ensure "OutputSettings" is required (not null) + if (OutputSettings == null) + { + throw new InvalidDataException("OutputSettings is a required property for MergeSettings and cannot be null"); + } + else + { + this.OutputSettings = OutputSettings; + } + this.Lifecycle = Lifecycle; + this.MergeResult = MergeResult; + this.Engine = Engine; + this.HeaderDataSetIds = HeaderDataSetIds; + this.TemplateVersion = TemplateVersion; + } + + /// + /// Gets or Sets Lifecycle + /// + [DataMember(Name="lifecycle", EmitDefaultValue=false)] + public Lifecycle Lifecycle { get; set; } + /// + /// Data set id + /// + /// Data set id + [DataMember(Name="dataSetId", EmitDefaultValue=false)] + public string DataSetId { get; set; } + /// + /// optional header data set ids + /// + /// optional header data set ids + [DataMember(Name="headerDataSetIds", EmitDefaultValue=false)] + public List HeaderDataSetIds { get; set; } + /// + /// Template version + /// + /// Template version + [DataMember(Name="templateVersion", EmitDefaultValue=false)] + public int? TemplateVersion { get; set; } + /// + /// The output location of the result files. + /// + /// The output location of the result files. + [DataMember(Name="resultStreamLocation", EmitDefaultValue=false)] + public StreamLocation ResultStreamLocation { get; set; } + /// + /// Template id + /// + /// Template id + [DataMember(Name="templateId", EmitDefaultValue=false)] + public string TemplateId { get; set; } + /// + /// Gets or Sets OutputSettings + /// + [DataMember(Name="outputSettings", EmitDefaultValue=false)] + public OutputSettings OutputSettings { get; set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class MergeSettings {\n"); + sb.Append(" Lifecycle: ").Append(Lifecycle).Append("\n"); + sb.Append(" MergeResult: ").Append(MergeResult).Append("\n"); + sb.Append(" DataSetId: ").Append(DataSetId).Append("\n"); + sb.Append(" Engine: ").Append(Engine).Append("\n"); + sb.Append(" HeaderDataSetIds: ").Append(HeaderDataSetIds).Append("\n"); + sb.Append(" TemplateVersion: ").Append(TemplateVersion).Append("\n"); + sb.Append(" ResultStreamLocation: ").Append(ResultStreamLocation).Append("\n"); + sb.Append(" TemplateId: ").Append(TemplateId).Append("\n"); + sb.Append(" OutputSettings: ").Append(OutputSettings).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as MergeSettings); + } + + /// + /// Returns true if MergeSettings instances are equal + /// + /// Instance of MergeSettings to be compared + /// Boolean + public bool Equals(MergeSettings other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.Lifecycle == other.Lifecycle || + this.Lifecycle != null && + this.Lifecycle.Equals(other.Lifecycle) + ) && + ( + this.MergeResult == other.MergeResult || + this.MergeResult != null && + this.MergeResult.Equals(other.MergeResult) + ) && + ( + this.DataSetId == other.DataSetId || + this.DataSetId != null && + this.DataSetId.Equals(other.DataSetId) + ) && + ( + this.Engine == other.Engine || + this.Engine != null && + this.Engine.Equals(other.Engine) + ) && + ( + this.HeaderDataSetIds == other.HeaderDataSetIds || + this.HeaderDataSetIds != null && + this.HeaderDataSetIds.SequenceEqual(other.HeaderDataSetIds) + ) && + ( + this.TemplateVersion == other.TemplateVersion || + this.TemplateVersion != null && + this.TemplateVersion.Equals(other.TemplateVersion) + ) && + ( + this.ResultStreamLocation == other.ResultStreamLocation || + this.ResultStreamLocation != null && + this.ResultStreamLocation.Equals(other.ResultStreamLocation) + ) && + ( + this.TemplateId == other.TemplateId || + this.TemplateId != null && + this.TemplateId.Equals(other.TemplateId) + ) && + ( + this.OutputSettings == other.OutputSettings || + this.OutputSettings != null && + this.OutputSettings.Equals(other.OutputSettings) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.Lifecycle != null) + hash = hash * 59 + this.Lifecycle.GetHashCode(); + if (this.MergeResult != null) + hash = hash * 59 + this.MergeResult.GetHashCode(); + if (this.DataSetId != null) + hash = hash * 59 + this.DataSetId.GetHashCode(); + if (this.Engine != null) + hash = hash * 59 + this.Engine.GetHashCode(); + if (this.HeaderDataSetIds != null) + hash = hash * 59 + this.HeaderDataSetIds.GetHashCode(); + if (this.TemplateVersion != null) + hash = hash * 59 + this.TemplateVersion.GetHashCode(); + if (this.ResultStreamLocation != null) + hash = hash * 59 + this.ResultStreamLocation.GetHashCode(); + if (this.TemplateId != null) + hash = hash * 59 + this.TemplateId.GetHashCode(); + if (this.OutputSettings != null) + hash = hash * 59 + this.OutputSettings.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/OutputSettings.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/OutputSettings.cs new file mode 100644 index 0000000..cfaa551 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/OutputSettings.cs @@ -0,0 +1,271 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// Output settings + /// + [DataContract] + public partial class OutputSettings : IEquatable + { + /// + /// Gets or Sets DeliveryFormat + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum DeliveryFormatEnum + { + + /// + /// Enum PLAIN for "PLAIN" + /// + [EnumMember(Value = "PLAIN")] + PLAIN, + + /// + /// Enum ZIP for "ZIP" + /// + [EnumMember(Value = "ZIP")] + ZIP, + + /// + /// Enum _7ZIP for "_7ZIP" + /// + [EnumMember(Value = "_7ZIP")] + _7ZIP + } + + /// + /// Gets or Sets OutputFormat + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum OutputFormatEnum + { + + /// + /// Enum DOC for "DOC" + /// + [EnumMember(Value = "DOC")] + DOC, + + /// + /// Enum DOCX for "DOCX" + /// + [EnumMember(Value = "DOCX")] + DOCX, + + /// + /// Enum RTF for "RTF" + /// + [EnumMember(Value = "RTF")] + RTF, + + /// + /// Enum PDF for "PDF" + /// + [EnumMember(Value = "PDF")] + PDF, + + /// + /// Enum XPS for "XPS" + /// + [EnumMember(Value = "XPS")] + XPS, + + /// + /// Enum SVG for "SVG" + /// + [EnumMember(Value = "SVG")] + SVG, + + /// + /// Enum HTML for "HTML" + /// + [EnumMember(Value = "HTML")] + HTML, + + /// + /// Enum ODT for "ODT" + /// + [EnumMember(Value = "ODT")] + ODT, + + /// + /// Enum TIFF for "TIFF" + /// + [EnumMember(Value = "TIFF")] + TIFF, + + /// + /// Enum PNG for "PNG" + /// + [EnumMember(Value = "PNG")] + PNG, + + /// + /// Enum BMP for "BMP" + /// + [EnumMember(Value = "BMP")] + BMP, + + /// + /// Enum JPEG for "JPEG" + /// + [EnumMember(Value = "JPEG")] + JPEG, + + /// + /// Enum TXT for "TXT" + /// + [EnumMember(Value = "TXT")] + TXT, + + /// + /// Enum XML for "XML" + /// + [EnumMember(Value = "XML")] + XML, + + /// + /// Enum JSON for "JSON" + /// + [EnumMember(Value = "JSON")] + JSON, + + /// + /// Enum DEFAULT for "DEFAULT" + /// + [EnumMember(Value = "DEFAULT")] + DEFAULT + } + + /// + /// Gets or Sets DeliveryFormat + /// + [DataMember(Name="deliveryFormat", EmitDefaultValue=false)] + public DeliveryFormatEnum? DeliveryFormat { get; set; } + /// + /// Gets or Sets OutputFormat + /// + [DataMember(Name="outputFormat", EmitDefaultValue=false)] + public OutputFormatEnum? OutputFormat { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// DeliveryFormat. + /// OutputFormat. + public OutputSettings(DeliveryFormatEnum? DeliveryFormat = null, OutputFormatEnum? OutputFormat = null) + { + this.DeliveryFormat = DeliveryFormat; + this.OutputFormat = OutputFormat; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class OutputSettings {\n"); + sb.Append(" DeliveryFormat: ").Append(DeliveryFormat).Append("\n"); + sb.Append(" OutputFormat: ").Append(OutputFormat).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as OutputSettings); + } + + /// + /// Returns true if OutputSettings instances are equal + /// + /// Instance of OutputSettings to be compared + /// Boolean + public bool Equals(OutputSettings other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.DeliveryFormat == other.DeliveryFormat || + this.DeliveryFormat != null && + this.DeliveryFormat.Equals(other.DeliveryFormat) + ) && + ( + this.OutputFormat == other.OutputFormat || + this.OutputFormat != null && + this.OutputFormat.Equals(other.OutputFormat) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.DeliveryFormat != null) + hash = hash * 59 + this.DeliveryFormat.GetHashCode(); + if (this.OutputFormat != null) + hash = hash * 59 + this.OutputFormat.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/OwnerInfo.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/OwnerInfo.cs new file mode 100644 index 0000000..52e2d57 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/OwnerInfo.cs @@ -0,0 +1,175 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// Owner info + /// + [DataContract] + public partial class OwnerInfo : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// The owner's phone number. + /// The owner's company/department. + /// The owner's name. + /// The owner's email address. + public OwnerInfo(string Phone = null, string CompanyDepartment = null, string Name = null, string Email = null) + { + this.Phone = Phone; + this.CompanyDepartment = CompanyDepartment; + this.Name = Name; + this.Email = Email; + } + + /// + /// The owner's phone number + /// + /// The owner's phone number + [DataMember(Name="phone", EmitDefaultValue=false)] + public string Phone { get; set; } + /// + /// The owner's company/department + /// + /// The owner's company/department + [DataMember(Name="companyDepartment", EmitDefaultValue=false)] + public string CompanyDepartment { get; set; } + /// + /// The owner's name + /// + /// The owner's name + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + /// + /// The owner's email address + /// + /// The owner's email address + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class OwnerInfo {\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); + sb.Append(" CompanyDepartment: ").Append(CompanyDepartment).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as OwnerInfo); + } + + /// + /// Returns true if OwnerInfo instances are equal + /// + /// Instance of OwnerInfo to be compared + /// Boolean + public bool Equals(OwnerInfo other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.Phone == other.Phone || + this.Phone != null && + this.Phone.Equals(other.Phone) + ) && + ( + this.CompanyDepartment == other.CompanyDepartment || + this.CompanyDepartment != null && + this.CompanyDepartment.Equals(other.CompanyDepartment) + ) && + ( + this.Name == other.Name || + this.Name != null && + this.Name.Equals(other.Name) + ) && + ( + this.Email == other.Email || + this.Email != null && + this.Email.Equals(other.Email) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.Phone != null) + hash = hash * 59 + this.Phone.GetHashCode(); + if (this.CompanyDepartment != null) + hash = hash * 59 + this.CompanyDepartment.GetHashCode(); + if (this.Name != null) + hash = hash * 59 + this.Name.GetHashCode(); + if (this.Email != null) + hash = hash * 59 + this.Email.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/StreamLocation.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/StreamLocation.cs new file mode 100644 index 0000000..41a7043 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/StreamLocation.cs @@ -0,0 +1,171 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// Location record of data stream + /// + [DataContract] + public partial class StreamLocation : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// FolderPath. + /// OriginalFileName. + /// ContainerId. + /// FileId. + public StreamLocation(string FolderPath = null, string OriginalFileName = null, string ContainerId = null, string FileId = null) + { + this.FolderPath = FolderPath; + this.OriginalFileName = OriginalFileName; + this.ContainerId = ContainerId; + this.FileId = FileId; + } + + /// + /// Gets or Sets FolderPath + /// + [DataMember(Name="folderPath", EmitDefaultValue=false)] + public string FolderPath { get; set; } + /// + /// Gets or Sets OriginalFileName + /// + [DataMember(Name="originalFileName", EmitDefaultValue=false)] + public string OriginalFileName { get; set; } + /// + /// Gets or Sets ContainerId + /// + [DataMember(Name="containerId", EmitDefaultValue=false)] + public string ContainerId { get; set; } + /// + /// Gets or Sets FileId + /// + [DataMember(Name="fileId", EmitDefaultValue=false)] + public string FileId { get; set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class StreamLocation {\n"); + sb.Append(" FolderPath: ").Append(FolderPath).Append("\n"); + sb.Append(" OriginalFileName: ").Append(OriginalFileName).Append("\n"); + sb.Append(" ContainerId: ").Append(ContainerId).Append("\n"); + sb.Append(" FileId: ").Append(FileId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as StreamLocation); + } + + /// + /// Returns true if StreamLocation instances are equal + /// + /// Instance of StreamLocation to be compared + /// Boolean + public bool Equals(StreamLocation other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.FolderPath == other.FolderPath || + this.FolderPath != null && + this.FolderPath.Equals(other.FolderPath) + ) && + ( + this.OriginalFileName == other.OriginalFileName || + this.OriginalFileName != null && + this.OriginalFileName.Equals(other.OriginalFileName) + ) && + ( + this.ContainerId == other.ContainerId || + this.ContainerId != null && + this.ContainerId.Equals(other.ContainerId) + ) && + ( + this.FileId == other.FileId || + this.FileId != null && + this.FileId.Equals(other.FileId) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.FolderPath != null) + hash = hash * 59 + this.FolderPath.GetHashCode(); + if (this.OriginalFileName != null) + hash = hash * 59 + this.OriginalFileName.GetHashCode(); + if (this.ContainerId != null) + hash = hash * 59 + this.ContainerId.GetHashCode(); + if (this.FileId != null) + hash = hash * 59 + this.FileId.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContext.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContext.cs new file mode 100644 index 0000000..8153984 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContext.cs @@ -0,0 +1,237 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// TemplateContext + /// + [DataContract] + public partial class TemplateContext : IEquatable + { + /// + /// Gets or Sets TemplateType + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum TemplateTypeEnum + { + + /// + /// Enum OFFICE for "OFFICE" + /// + [EnumMember(Value = "OFFICE")] + OFFICE, + + /// + /// Enum FREEMARKER for "FREEMARKER" + /// + [EnumMember(Value = "FREEMARKER")] + FREEMARKER + } + + /// + /// Gets or Sets TemplateType + /// + [DataMember(Name="templateType", EmitDefaultValue=false)] + public TemplateTypeEnum? TemplateType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TemplateContext() { } + /// + /// Initializes a new instance of the class. + /// + /// TemplateType (required). + /// The template files (versioned). + /// The template description. + /// OwnerInfo. + /// Id. + /// The template context id. + public TemplateContext(TemplateTypeEnum? TemplateType = null, Dictionary TemplateFileLocations = null, string Description = null, OwnerInfo OwnerInfo = null, string Id = null, string TemplateId = null) + { + // to ensure "TemplateType" is required (not null) + if (TemplateType == null) + { + throw new InvalidDataException("TemplateType is a required property for TemplateContext and cannot be null"); + } + else + { + this.TemplateType = TemplateType; + } + this.TemplateFileLocations = TemplateFileLocations; + this.Description = Description; + this.OwnerInfo = OwnerInfo; + this.Id = Id; + this.TemplateId = TemplateId; + } + + /// + /// The template files (versioned) + /// + /// The template files (versioned) + [DataMember(Name="templateFileLocations", EmitDefaultValue=false)] + public Dictionary TemplateFileLocations { get; set; } + /// + /// The template description + /// + /// The template description + [DataMember(Name="description", EmitDefaultValue=false)] + public string Description { get; set; } + /// + /// Gets or Sets OwnerInfo + /// + [DataMember(Name="ownerInfo", EmitDefaultValue=false)] + public OwnerInfo OwnerInfo { get; set; } + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + public string Id { get; set; } + /// + /// The template context id + /// + /// The template context id + [DataMember(Name="templateId", EmitDefaultValue=false)] + public string TemplateId { get; set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class TemplateContext {\n"); + sb.Append(" TemplateType: ").Append(TemplateType).Append("\n"); + sb.Append(" TemplateFileLocations: ").Append(TemplateFileLocations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" OwnerInfo: ").Append(OwnerInfo).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" TemplateId: ").Append(TemplateId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as TemplateContext); + } + + /// + /// Returns true if TemplateContext instances are equal + /// + /// Instance of TemplateContext to be compared + /// Boolean + public bool Equals(TemplateContext other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.TemplateType == other.TemplateType || + this.TemplateType != null && + this.TemplateType.Equals(other.TemplateType) + ) && + ( + this.TemplateFileLocations == other.TemplateFileLocations || + this.TemplateFileLocations != null && + this.TemplateFileLocations.SequenceEqual(other.TemplateFileLocations) + ) && + ( + this.Description == other.Description || + this.Description != null && + this.Description.Equals(other.Description) + ) && + ( + this.OwnerInfo == other.OwnerInfo || + this.OwnerInfo != null && + this.OwnerInfo.Equals(other.OwnerInfo) + ) && + ( + this.Id == other.Id || + this.Id != null && + this.Id.Equals(other.Id) + ) && + ( + this.TemplateId == other.TemplateId || + this.TemplateId != null && + this.TemplateId.Equals(other.TemplateId) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.TemplateType != null) + hash = hash * 59 + this.TemplateType.GetHashCode(); + if (this.TemplateFileLocations != null) + hash = hash * 59 + this.TemplateFileLocations.GetHashCode(); + if (this.Description != null) + hash = hash * 59 + this.Description.GetHashCode(); + if (this.OwnerInfo != null) + hash = hash * 59 + this.OwnerInfo.GetHashCode(); + if (this.Id != null) + hash = hash * 59 + this.Id.GetHashCode(); + if (this.TemplateId != null) + hash = hash * 59 + this.TemplateId.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextRequest.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextRequest.cs new file mode 100644 index 0000000..b5ee6cb --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextRequest.cs @@ -0,0 +1,205 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// The merge template request. + /// + [DataContract] + public partial class TemplateContextRequest : IEquatable + { + /// + /// Gets or Sets TemplateType + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum TemplateTypeEnum + { + + /// + /// Enum OFFICE for "OFFICE" + /// + [EnumMember(Value = "OFFICE")] + OFFICE, + + /// + /// Enum FREEMARKER for "FREEMARKER" + /// + [EnumMember(Value = "FREEMARKER")] + FREEMARKER + } + + /// + /// Gets or Sets TemplateType + /// + [DataMember(Name="templateType", EmitDefaultValue=false)] + public TemplateTypeEnum? TemplateType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TemplateContextRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// TemplateType (required). + /// Description. + /// OwnerInfo. + /// The template context id. + public TemplateContextRequest(TemplateTypeEnum? TemplateType = null, string Description = null, OwnerInfo OwnerInfo = null, string TemplateId = null) + { + // to ensure "TemplateType" is required (not null) + if (TemplateType == null) + { + throw new InvalidDataException("TemplateType is a required property for TemplateContextRequest and cannot be null"); + } + else + { + this.TemplateType = TemplateType; + } + this.Description = Description; + this.OwnerInfo = OwnerInfo; + this.TemplateId = TemplateId; + } + + /// + /// Gets or Sets Description + /// + [DataMember(Name="description", EmitDefaultValue=false)] + public string Description { get; set; } + /// + /// Gets or Sets OwnerInfo + /// + [DataMember(Name="ownerInfo", EmitDefaultValue=false)] + public OwnerInfo OwnerInfo { get; set; } + /// + /// The template context id + /// + /// The template context id + [DataMember(Name="templateId", EmitDefaultValue=false)] + public string TemplateId { get; set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class TemplateContextRequest {\n"); + sb.Append(" TemplateType: ").Append(TemplateType).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" OwnerInfo: ").Append(OwnerInfo).Append("\n"); + sb.Append(" TemplateId: ").Append(TemplateId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as TemplateContextRequest); + } + + /// + /// Returns true if TemplateContextRequest instances are equal + /// + /// Instance of TemplateContextRequest to be compared + /// Boolean + public bool Equals(TemplateContextRequest other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.TemplateType == other.TemplateType || + this.TemplateType != null && + this.TemplateType.Equals(other.TemplateType) + ) && + ( + this.Description == other.Description || + this.Description != null && + this.Description.Equals(other.Description) + ) && + ( + this.OwnerInfo == other.OwnerInfo || + this.OwnerInfo != null && + this.OwnerInfo.Equals(other.OwnerInfo) + ) && + ( + this.TemplateId == other.TemplateId || + this.TemplateId != null && + this.TemplateId.Equals(other.TemplateId) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.TemplateType != null) + hash = hash * 59 + this.TemplateType.GetHashCode(); + if (this.Description != null) + hash = hash * 59 + this.Description.GetHashCode(); + if (this.OwnerInfo != null) + hash = hash * 59 + this.OwnerInfo.GetHashCode(); + if (this.TemplateId != null) + hash = hash * 59 + this.TemplateId.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextResponse.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextResponse.cs new file mode 100644 index 0000000..b6de9ca --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextResponse.cs @@ -0,0 +1,216 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// The merge template response. + /// + [DataContract] + public partial class TemplateContextResponse : IEquatable + { + /// + /// The status of the template + /// + /// The status of the template + [JsonConverter(typeof(StringEnumConverter))] + public enum StatusEnum + { + + /// + /// Enum CREATED for "CREATED" + /// + [EnumMember(Value = "CREATED")] + CREATED, + + /// + /// Enum UPDATED for "UPDATED" + /// + [EnumMember(Value = "UPDATED")] + UPDATED, + + /// + /// Enum DELETED for "DELETED" + /// + [EnumMember(Value = "DELETED")] + DELETED, + + /// + /// Enum PROCESSING for "PROCESSING" + /// + [EnumMember(Value = "PROCESSING")] + PROCESSING + } + + /// + /// The status of the template + /// + /// The status of the template + [DataMember(Name="status", EmitDefaultValue=false)] + public StatusEnum? Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TemplateContextResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// Context. + /// Unique template context id (required). + public TemplateContextResponse(TemplateContext Context = null, string Id = null) + { + // to ensure "Id" is required (not null) + if (Id == null) + { + throw new InvalidDataException("Id is a required property for TemplateContextResponse and cannot be null"); + } + else + { + this.Id = Id; + } + this.Context = Context; + } + + /// + /// The creation date/time of this response in ISO 8601 format + /// + /// The creation date/time of this response in ISO 8601 format + [DataMember(Name="creationTime", EmitDefaultValue=false)] + public DateTime? CreationTime { get; private set; } + /// + /// Gets or Sets Context + /// + [DataMember(Name="context", EmitDefaultValue=false)] + public TemplateContext Context { get; set; } + /// + /// Unique template context id + /// + /// Unique template context id + [DataMember(Name="id", EmitDefaultValue=false)] + public string Id { get; set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class TemplateContextResponse {\n"); + sb.Append(" CreationTime: ").Append(CreationTime).Append("\n"); + sb.Append(" Context: ").Append(Context).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as TemplateContextResponse); + } + + /// + /// Returns true if TemplateContextResponse instances are equal + /// + /// Instance of TemplateContextResponse to be compared + /// Boolean + public bool Equals(TemplateContextResponse other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.CreationTime == other.CreationTime || + this.CreationTime != null && + this.CreationTime.Equals(other.CreationTime) + ) && + ( + this.Context == other.Context || + this.Context != null && + this.Context.Equals(other.Context) + ) && + ( + this.Id == other.Id || + this.Id != null && + this.Id.Equals(other.Id) + ) && + ( + this.Status == other.Status || + this.Status != null && + this.Status.Equals(other.Status) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.CreationTime != null) + hash = hash * 59 + this.CreationTime.GetHashCode(); + if (this.Context != null) + hash = hash * 59 + this.Context.GetHashCode(); + if (this.Id != null) + hash = hash * 59 + this.Id.GetHashCode(); + if (this.Status != null) + hash = hash * 59 + this.Status.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Properties/AssemblyInfo.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f3b9f7d --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Properties/AssemblyInfo.cs @@ -0,0 +1,32 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Swagger Library")] +[assembly: AssemblyDescription("A library generated from a Swagger doc")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Swagger")] +[assembly: AssemblyProduct("SwaggerLibrary")] +[assembly: AssemblyCopyright("No Copyright")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0")] +[assembly: AssemblyFileVersion("1.0.0")] diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Sphereon.SDK.TemplateProcessor.csproj b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Sphereon.SDK.TemplateProcessor.csproj new file mode 100644 index 0000000..83b452e --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Sphereon.SDK.TemplateProcessor.csproj @@ -0,0 +1,82 @@ + + + + + Debug + AnyCPU + {034DD73B-80EA-4824-9D3A-776B31B31505} + Library + Properties + Sphereon.SDK.TemplateProcessor + Sphereon.SDK.TemplateProcessor + v3.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + $(SolutionDir)\packages\Newtonsoft.Json.8.0.3\lib\net35\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.8.0.3\lib\net35\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.8.0.3\lib\net35\Newtonsoft.Json.dll + ..\..\vendor\Newtonsoft.Json.8.0.3\lib\net35\Newtonsoft.Json.dll + + + $(SolutionDir)\packages\RestSharp.105.1.0\lib\net35\RestSharp.dll + ..\packages\RestSharp.105.1.0\lib\net35\RestSharp.dll + ..\..\packages\RestSharp.105.1.0\lib\net35\RestSharp.dll + ..\..\vendor\RestSharp.105.1.0\lib\net35\RestSharp.dll + + + + + + + + + + + diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/packages.config b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/packages.config new file mode 100644 index 0000000..7be7c65 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/packages.config @@ -0,0 +1,5 @@ + + + + + diff --git a/csharp-net45/.gitignore b/csharp-net45/.gitignore new file mode 100644 index 0000000..d3f4f7b --- /dev/null +++ b/csharp-net45/.gitignore @@ -0,0 +1,185 @@ +# Ref: https://gist.github.com/kmorcinek/2710267 +# Download this file using PowerShell v3 under Windows with the following comand +# Invoke-WebRequest https://gist.githubusercontent.com/kmorcinek/2710267/raw/ -OutFile .gitignore + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +build/ +[Bb]in/ +[Oo]bj/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.scc + +# OS generated files # +.DS_Store* +ehthumbs.db +Icon? +Thumbs.db + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml +*.pfx +*.publishsettings +modulesbin/ +tempbin/ + +# EPiServer Site file (VPP) +AppData/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# vim +*.txt~ +*.swp +*.swo + +# svn +.svn + +# SQL Server files +**/App_Data/*.mdf +**/App_Data/*.ldf +**/App_Data/*.sdf + + +#LightSwitch generated files +GeneratedArtifacts/ +_Pvt_Extensions/ +ModelManifest.xml + +# ========================= +# Windows detritus +# ========================= + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac desktop service store files +.DS_Store + +# SASS Compiler cache +.sass-cache + +# Visual Studio 2014 CTP +**/*.sln.ide diff --git a/csharp-net45/.swagger-codegen-ignore b/csharp-net45/.swagger-codegen-ignore new file mode 100644 index 0000000..c5fa491 --- /dev/null +++ b/csharp-net45/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/csharp-net45/.travis.yml b/csharp-net45/.travis.yml new file mode 100644 index 0000000..e3137dd --- /dev/null +++ b/csharp-net45/.travis.yml @@ -0,0 +1,21 @@ +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +language: csharp +mono: + - latest +solution: Sphereon.SDK.TemplateProcessor.sln +script: + - /bin/sh ./mono_nunit_test.sh diff --git a/csharp-net45/LICENSE b/csharp-net45/LICENSE new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/csharp-net45/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/csharp-net45/README.md b/csharp-net45/README.md new file mode 100644 index 0000000..59147df --- /dev/null +++ b/csharp-net45/README.md @@ -0,0 +1,127 @@ +# Sphereon.SDK.TemplateProcessor - the C# library for the OfficeTextMerge + +The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + +This C# SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: + +- API version: 0.1 +- SDK version: 1.0.0 +- Build date: 2017-07-28T16:30:04.170+02:00 +- Build package: class io.swagger.codegen.languages.CSharpClientCodegen + For more information, please visit [https://sphereon.com](https://sphereon.com) + +## Frameworks supported +- .NET 4.0 or later +- Windows Phone 7.1 (Mango) + +## Dependencies +- [RestSharp](https://www.nuget.org/packages/RestSharp) - 105.1.0 or later +- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 7.0.0 or later + +The DLLs included in the package may not be the latest version. We recommned using [NuGet] (https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages: +``` +Install-Package RestSharp +Install-Package Newtonsoft.Json +``` + +NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See [RestSharp#742](https://github.com/restsharp/RestSharp/issues/742) + +## Installation +Run the following command to generate the DLL +- [Mac/Linux] `/bin/sh build.sh` +- [Windows] `build.bat` + +Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces: +```csharp +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Model; +``` + +## Getting Started + +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Model; + +namespace Example +{ + public class Example + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var payload = payload_example; // string | The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] + + try + { + // Store dataset + DataSetResponse result = apiInstance.CreateDataSet(payload); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.CreateDataSet: " + e.Message ); + } + } + } +} +``` + + +## Documentation for API Endpoints + +All URIs are relative to *https://gw.api.cloud.sphereon.com/* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*MergeApi* | [**CreateDataSet**](docs/MergeApi.md#createdataset) | **POST** /template-processor/merge/0.1/datasets | Store dataset +*MergeApi* | [**CreateTemplateContext**](docs/MergeApi.md#createtemplatecontext) | **POST** /template-processor/merge/0.1/templates | Create template context +*MergeApi* | [**DeleteDataSet**](docs/MergeApi.md#deletedataset) | **DELETE** /template-processor/merge/0.1/datasets/{dataSetId} | Delete a stored data set +*MergeApi* | [**DeleteJob**](docs/MergeApi.md#deletejob) | **DELETE** /template-processor/merge/0.1/jobs/{jobId} | Delete a job manually +*MergeApi* | [**DeleteTemplateContext**](docs/MergeApi.md#deletetemplatecontext) | **DELETE** /template-processor/merge/0.1/templates/{templateId} | Delete template context +*MergeApi* | [**GetJob**](docs/MergeApi.md#getjob) | **GET** /template-processor/merge/0.1/jobs/{jobId} | Job definition and state +*MergeApi* | [**GetJobs**](docs/MergeApi.md#getjobs) | **GET** /template-processor/merge/0.1/jobs | Get all jobs +*MergeApi* | [**GetResultStreamById**](docs/MergeApi.md#getresultstreambyid) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file +*MergeApi* | [**GetResultStreamsAsContainer**](docs/MergeApi.md#getresultstreamsascontainer) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/container | Get the result file +*MergeApi* | [**GetTemplateContext**](docs/MergeApi.md#gettemplatecontext) | **GET** /template-processor/merge/0.1/templates/{templateId} | Get template context +*MergeApi* | [**SubmitJob**](docs/MergeApi.md#submitjob) | **PUT** /template-processor/merge/0.1/jobs | Submit merge job for processing +*MergeApi* | [**UpdateTemplateContext**](docs/MergeApi.md#updatetemplatecontext) | **PUT** /template-processor/merge/0.1/templates | Update template context +*MergeApi* | [**UploadTemplateFile**](docs/MergeApi.md#uploadtemplatefile) | **POST** /template-processor/merge/0.1/templates/{templateId} | Upload template file + + + +## Documentation for Models + + - [Model.DataSetResponse](docs/DataSetResponse.md) + - [Model.Error](docs/Error.md) + - [Model.ErrorResponse](docs/ErrorResponse.md) + - [Model.Lifecycle](docs/Lifecycle.md) + - [Model.MergeJob](docs/MergeJob.md) + - [Model.MergeJobResponse](docs/MergeJobResponse.md) + - [Model.MergeSettings](docs/MergeSettings.md) + - [Model.OutputSettings](docs/OutputSettings.md) + - [Model.OwnerInfo](docs/OwnerInfo.md) + - [Model.StreamLocation](docs/StreamLocation.md) + - [Model.TemplateContext](docs/TemplateContext.md) + - [Model.TemplateContextRequest](docs/TemplateContextRequest.md) + - [Model.TemplateContextResponse](docs/TemplateContextResponse.md) + + +## Documentation for Authorization + +### oauth2schema + +- **Type**: OAuth +- **Flow**: application +- **Authorization URL**: +- **Scopes**: + - global: accessEverything + diff --git a/csharp-net45/Sphereon.SDK.TemplateProcessor.sln b/csharp-net45/Sphereon.SDK.TemplateProcessor.sln new file mode 100644 index 0000000..b3967d0 --- /dev/null +++ b/csharp-net45/Sphereon.SDK.TemplateProcessor.sln @@ -0,0 +1,27 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +VisualStudioVersion = 12.0.0.0 +MinimumVisualStudioVersion = 10.0.0.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sphereon.SDK.TemplateProcessor", "src\Sphereon.SDK.TemplateProcessor\Sphereon.SDK.TemplateProcessor.csproj", "{80B64299-4E8C-4A19-A669-65EC364D8526}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sphereon.SDK.TemplateProcessor.Test", "src\Sphereon.SDK.TemplateProcessor.Test\Sphereon.SDK.TemplateProcessor.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" +EndProject +Global +GlobalSection(SolutionConfigurationPlatforms) = preSolution +Debug|Any CPU = Debug|Any CPU +Release|Any CPU = Release|Any CPU +EndGlobalSection +GlobalSection(ProjectConfigurationPlatforms) = postSolution +{80B64299-4E8C-4A19-A669-65EC364D8526}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{80B64299-4E8C-4A19-A669-65EC364D8526}.Debug|Any CPU.Build.0 = Debug|Any CPU +{80B64299-4E8C-4A19-A669-65EC364D8526}.Release|Any CPU.ActiveCfg = Release|Any CPU +{80B64299-4E8C-4A19-A669-65EC364D8526}.Release|Any CPU.Build.0 = Release|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU +{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU +EndGlobalSection +GlobalSection(SolutionProperties) = preSolution +HideSolutionNode = FALSE +EndGlobalSection +EndGlobal \ No newline at end of file diff --git a/csharp-net45/build.bat b/csharp-net45/build.bat new file mode 100644 index 0000000..34009ef --- /dev/null +++ b/csharp-net45/build.bat @@ -0,0 +1,28 @@ +:: Generated by: https://github.com/swagger-api/swagger-codegen.git +:: +:: Licensed under the Apache License, Version 2.0 (the "License"); +:: you may not use this file except in compliance with the License. +:: You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an "AS IS" BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +:: See the License for the specific language governing permissions and +:: limitations under the License. + +@echo off + +SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319 + + +if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://nuget.org/nuget.exe', '.\nuget.exe')" +.\nuget.exe install src\Sphereon.SDK.TemplateProcessor\packages.config -o packages + +if not exist ".\bin" mkdir bin + +copy packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll +copy packages\RestSharp.105.1.0\lib\net45\RestSharp.dll bin\RestSharp.dll + +%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\RestSharp.dll /target:library /out:bin\Sphereon.SDK.TemplateProcessor.dll /recurse:src\Sphereon.SDK.TemplateProcessor\*.cs /doc:bin\Sphereon.SDK.TemplateProcessor.xml diff --git a/csharp-net45/build.sh b/csharp-net45/build.sh new file mode 100644 index 0000000..8f23762 --- /dev/null +++ b/csharp-net45/build.sh @@ -0,0 +1,48 @@ +#!/usr/bin/env bash +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +frameworkVersion=net45 +netfx=${frameworkVersion#net} + +echo "[INFO] Target framework: ${frameworkVersion}" + +echo "[INFO] Download nuget and packages" +wget -nc https://nuget.org/nuget.exe; +mozroots --import --sync +mono nuget.exe install src/Sphereon.SDK.TemplateProcessor/packages.config -o packages; + +echo "[INFO] Copy DLLs to the 'bin' folder" +mkdir -p bin; +cp packages/Newtonsoft.Json.8.0.3/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; +cp packages/RestSharp.105.1.0/lib/net45/RestSharp.dll bin/RestSharp.dll; + +echo "[INFO] Run 'mcs' to build bin/Sphereon.SDK.TemplateProcessor.dll" +mcs -sdk:${netfx} -r:bin/Newtonsoft.Json.dll,\ +bin/RestSharp.dll,\ +System.Runtime.Serialization.dll \ +-target:library \ +-out:bin/Sphereon.SDK.TemplateProcessor.dll \ +-recurse:'src/Sphereon.SDK.TemplateProcessor/*.cs' \ +-doc:bin/Sphereon.SDK.TemplateProcessor.xml \ +-platform:anycpu + +if [ $? -ne 0 ] +then + echo "[ERROR] Compilation failed with exit code $?" + exit 1 +else + echo "[INFO] bin/Sphereon.SDK.TemplateProcessor.dll was created successfully" +fi diff --git a/csharp-net45/docs/DataSetResponse.md b/csharp-net45/docs/DataSetResponse.md new file mode 100644 index 0000000..e844d50 --- /dev/null +++ b/csharp-net45/docs/DataSetResponse.md @@ -0,0 +1,12 @@ +# Sphereon.SDK.TemplateProcessor.Model.DataSetResponse +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CompletionTime** | **DateTime?** | The completion date/time of this template in ISO 8601 format | [optional] +**CreationTime** | **DateTime?** | The creation date/time of this template in ISO 8601 format | [optional] +**Id** | **string** | Unique dataset id | +**Status** | **string** | The status of the template | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net45/docs/Error.md b/csharp-net45/docs/Error.md new file mode 100644 index 0000000..e341298 --- /dev/null +++ b/csharp-net45/docs/Error.md @@ -0,0 +1,12 @@ +# Sphereon.SDK.TemplateProcessor.Model.Error +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | **string** | | +**Level** | **string** | | +**Cause** | [**Error**](Error.md) | | [optional] +**Message** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net45/docs/ErrorResponse.md b/csharp-net45/docs/ErrorResponse.md new file mode 100644 index 0000000..7d4532d --- /dev/null +++ b/csharp-net45/docs/ErrorResponse.md @@ -0,0 +1,9 @@ +# Sphereon.SDK.TemplateProcessor.Model.ErrorResponse +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**List<Error>**](Error.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net45/docs/Lifecycle.md b/csharp-net45/docs/Lifecycle.md new file mode 100644 index 0000000..c1f9138 --- /dev/null +++ b/csharp-net45/docs/Lifecycle.md @@ -0,0 +1,11 @@ +# Sphereon.SDK.TemplateProcessor.Model.Lifecycle +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ActionTime** | **DateTime?** | The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation | [optional] +**Action** | **string** | | [optional] +**Type** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net45/docs/MergeApi.md b/csharp-net45/docs/MergeApi.md new file mode 100644 index 0000000..b921b4f --- /dev/null +++ b/csharp-net45/docs/MergeApi.md @@ -0,0 +1,874 @@ +# Sphereon.SDK.TemplateProcessor.Api.MergeApi + +All URIs are relative to *https://gw.api.cloud.sphereon.com/* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateDataSet**](MergeApi.md#createdataset) | **POST** /template-processor/merge/0.1/datasets | Store dataset +[**CreateTemplateContext**](MergeApi.md#createtemplatecontext) | **POST** /template-processor/merge/0.1/templates | Create template context +[**DeleteDataSet**](MergeApi.md#deletedataset) | **DELETE** /template-processor/merge/0.1/datasets/{dataSetId} | Delete a stored data set +[**DeleteJob**](MergeApi.md#deletejob) | **DELETE** /template-processor/merge/0.1/jobs/{jobId} | Delete a job manually +[**DeleteTemplateContext**](MergeApi.md#deletetemplatecontext) | **DELETE** /template-processor/merge/0.1/templates/{templateId} | Delete template context +[**GetJob**](MergeApi.md#getjob) | **GET** /template-processor/merge/0.1/jobs/{jobId} | Job definition and state +[**GetJobs**](MergeApi.md#getjobs) | **GET** /template-processor/merge/0.1/jobs | Get all jobs +[**GetResultStreamById**](MergeApi.md#getresultstreambyid) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file +[**GetResultStreamsAsContainer**](MergeApi.md#getresultstreamsascontainer) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/container | Get the result file +[**GetTemplateContext**](MergeApi.md#gettemplatecontext) | **GET** /template-processor/merge/0.1/templates/{templateId} | Get template context +[**SubmitJob**](MergeApi.md#submitjob) | **PUT** /template-processor/merge/0.1/jobs | Submit merge job for processing +[**UpdateTemplateContext**](MergeApi.md#updatetemplatecontext) | **PUT** /template-processor/merge/0.1/templates | Update template context +[**UploadTemplateFile**](MergeApi.md#uploadtemplatefile) | **POST** /template-processor/merge/0.1/templates/{templateId} | Upload template file + + + +# **CreateDataSet** +> DataSetResponse CreateDataSet (string payload) + +Store dataset + +Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class CreateDataSetExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var payload = payload_example; // string | The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] + + try + { + // Store dataset + DataSetResponse result = apiInstance.CreateDataSet(payload); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.CreateDataSet: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **payload** | **string**| The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] | + +### Return type + +[**DataSetResponse**](DataSetResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **CreateTemplateContext** +> TemplateContextResponse CreateTemplateContext (TemplateContextRequest templateRequest) + +Create template context + +Create a unique template context for your environment + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class CreateTemplateContextExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var templateRequest = new TemplateContextRequest(); // TemplateContextRequest | The template request + + try + { + // Create template context + TemplateContextResponse result = apiInstance.CreateTemplateContext(templateRequest); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.CreateTemplateContext: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| The template request | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteDataSet** +> DataSetResponse DeleteDataSet (string dataSetId) + +Delete a stored data set + +Delete a stored data set + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class DeleteDataSetExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var dataSetId = dataSetId_example; // string | dataSetId + + try + { + // Delete a stored data set + DataSetResponse result = apiInstance.DeleteDataSet(dataSetId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.DeleteDataSet: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dataSetId** | **string**| dataSetId | + +### Return type + +[**DataSetResponse**](DataSetResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteJob** +> MergeJobResponse DeleteJob (string jobId) + +Delete a job manually + +Delete the merge job and all related files + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class DeleteJobExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var jobId = jobId_example; // string | jobId + + try + { + // Delete a job manually + MergeJobResponse result = apiInstance.DeleteJob(jobId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.DeleteJob: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **string**| jobId | + +### Return type + +[**MergeJobResponse**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteTemplateContext** +> TemplateContextResponse DeleteTemplateContext (string templateId) + +Delete template context + +Delete a template context with all history + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class DeleteTemplateContextExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var templateId = templateId_example; // string | templateId + + try + { + // Delete template context + TemplateContextResponse result = apiInstance.DeleteTemplateContext(templateId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.DeleteTemplateContext: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **string**| templateId | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetJob** +> MergeJobResponse GetJob (string jobId) + +Job definition and state + +Get the merge job definition and current state. Please not that you can differentiate based on http response status + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class GetJobExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var jobId = jobId_example; // string | jobId + + try + { + // Job definition and state + MergeJobResponse result = apiInstance.GetJob(jobId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.GetJob: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **string**| jobId | + +### Return type + +[**MergeJobResponse**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetJobs** +> List GetJobs (List status = null) + +Get all jobs + +Get all office text job definitions and their current state. + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class GetJobsExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var status = new List(); // List | A list of status to filter on. (optional) + + try + { + // Get all jobs + List<MergeJobResponse> result = apiInstance.GetJobs(status); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.GetJobs: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**List**](string.md)| A list of status to filter on. | [optional] + +### Return type + +[**List**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetResultStreamById** +> byte[] GetResultStreamById (string jobId, string streamId, OutputSettings outputSettings = null) + +Get the result file + +Get a merge result document as a binary stream. + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class GetResultStreamByIdExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var jobId = jobId_example; // string | jobId + var streamId = streamId_example; // string | streamId + var outputSettings = new OutputSettings(); // OutputSettings | outputSettings (optional) + + try + { + // Get the result file + byte[] result = apiInstance.GetResultStreamById(jobId, streamId, outputSettings); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.GetResultStreamById: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **string**| jobId | + **streamId** | **string**| streamId | + **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] + +### Return type + +**byte[]** + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/octet-stream + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetResultStreamsAsContainer** +> byte[] GetResultStreamsAsContainer (string jobId, OutputSettings outputSettings = null) + +Get the result file + +Get all documents inside a compressed container as a binary stream. + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class GetResultStreamsAsContainerExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var jobId = jobId_example; // string | jobId + var outputSettings = new OutputSettings(); // OutputSettings | outputSettings (optional) + + try + { + // Get the result file + byte[] result = apiInstance.GetResultStreamsAsContainer(jobId, outputSettings); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.GetResultStreamsAsContainer: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **string**| jobId | + **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] + +### Return type + +**byte[]** + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/octet-stream + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetTemplateContext** +> TemplateContextResponse GetTemplateContext (string templateId) + +Get template context + +Get an existing template context + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class GetTemplateContextExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var templateId = templateId_example; // string | The template context name unique for your environment + + try + { + // Get template context + TemplateContextResponse result = apiInstance.GetTemplateContext(templateId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.GetTemplateContext: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **string**| The template context name unique for your environment | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **SubmitJob** +> MergeJobResponse SubmitJob (MergeSettings mergesettings) + +Submit merge job for processing + +Submit merge job run. + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class SubmitJobExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var mergesettings = new MergeSettings(); // MergeSettings | The merge- and output settings + + try + { + // Submit merge job for processing + MergeJobResponse result = apiInstance.SubmitJob(mergesettings); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.SubmitJob: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **mergesettings** | [**MergeSettings**](MergeSettings.md)| The merge- and output settings | + +### Return type + +[**MergeJobResponse**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UpdateTemplateContext** +> TemplateContextResponse UpdateTemplateContext (TemplateContextRequest templateContextRequest) + +Update template context + +Update an existing template context for your environment + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class UpdateTemplateContextExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var templateContextRequest = new TemplateContextRequest(); // TemplateContextRequest | templateContextRequest + + try + { + // Update template context + TemplateContextResponse result = apiInstance.UpdateTemplateContext(templateContextRequest); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.UpdateTemplateContext: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateContextRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| templateContextRequest | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UploadTemplateFile** +> TemplateContextResponse UploadTemplateFile (string templateId, System.IO.Stream stream) + +Upload template file + +Upload the Office template file + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class UploadTemplateFileExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new MergeApi(); + var templateId = templateId_example; // string | The template context name unique for your environment + var stream = new System.IO.Stream(); // System.IO.Stream | The template (file/inputstream) to store + + try + { + // Upload template file + TemplateContextResponse result = apiInstance.UploadTemplateFile(templateId, stream); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling MergeApi.UploadTemplateFile: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **string**| The template context name unique for your environment | + **stream** | **System.IO.Stream**| The template (file/inputstream) to store | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/csharp-net45/docs/MergeJob.md b/csharp-net45/docs/MergeJob.md new file mode 100644 index 0000000..a5cd506 --- /dev/null +++ b/csharp-net45/docs/MergeJob.md @@ -0,0 +1,19 @@ +# Sphereon.SDK.TemplateProcessor.Model.MergeJob +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ResultFolderPath** | **string** | The target folder path of result files | [optional] +**CompletionTime** | **DateTime?** | The completion date/time of this job in ISO 8601 format | [optional] +**JobId** | **string** | The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation | +**ResultContainerId** | **string** | The target container id of result files | [optional] +**CreationTime** | **DateTime?** | The creation date/time of this job in ISO 8601 format | [optional] +**DataSetId** | **string** | Data set id | [optional] +**ResultStreams** | [**List<StreamLocation>**](StreamLocation.md) | The storage locations of the result files. | +**HeaderDataSetIds** | **List<string>** | Header data set ids | [optional] +**MergeSettings** | [**MergeSettings**](MergeSettings.md) | | [optional] +**StatusMessage** | **string** | A status message, which can be informational, warning or error. A message here does not indicate an error perse | [optional] +**Status** | **string** | The status of the job | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net45/docs/MergeJobResponse.md b/csharp-net45/docs/MergeJobResponse.md new file mode 100644 index 0000000..c31a8d8 --- /dev/null +++ b/csharp-net45/docs/MergeJobResponse.md @@ -0,0 +1,12 @@ +# Sphereon.SDK.TemplateProcessor.Model.MergeJobResponse +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JobId** | **string** | The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation | +**Job** | [**MergeJob**](MergeJob.md) | | [optional] +**StatusMessage** | **string** | A status message, which can be informational, warning or error. AA message here does not indicate an error perse | [optional] +**Status** | **string** | The status of the job | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net45/docs/MergeSettings.md b/csharp-net45/docs/MergeSettings.md new file mode 100644 index 0000000..964bf17 --- /dev/null +++ b/csharp-net45/docs/MergeSettings.md @@ -0,0 +1,17 @@ +# Sphereon.SDK.TemplateProcessor.Model.MergeSettings +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Lifecycle** | [**Lifecycle**](Lifecycle.md) | | [optional] +**MergeResult** | **string** | | [optional] +**DataSetId** | **string** | Data set id | +**Engine** | **string** | | [optional] +**HeaderDataSetIds** | **List<string>** | optional header data set ids | [optional] +**TemplateVersion** | **int?** | Template version | [optional] +**ResultStreamLocation** | [**StreamLocation**](StreamLocation.md) | The output location of the result files. | +**TemplateId** | **string** | Template id | +**OutputSettings** | [**OutputSettings**](OutputSettings.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net45/docs/OutputSettings.md b/csharp-net45/docs/OutputSettings.md new file mode 100644 index 0000000..da7491f --- /dev/null +++ b/csharp-net45/docs/OutputSettings.md @@ -0,0 +1,10 @@ +# Sphereon.SDK.TemplateProcessor.Model.OutputSettings +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeliveryFormat** | **string** | | [optional] +**OutputFormat** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net45/docs/OwnerInfo.md b/csharp-net45/docs/OwnerInfo.md new file mode 100644 index 0000000..9f68152 --- /dev/null +++ b/csharp-net45/docs/OwnerInfo.md @@ -0,0 +1,12 @@ +# Sphereon.SDK.TemplateProcessor.Model.OwnerInfo +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Phone** | **string** | The owner's phone number | [optional] +**CompanyDepartment** | **string** | The owner's company/department | [optional] +**Name** | **string** | The owner's name | [optional] +**Email** | **string** | The owner's email address | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net45/docs/StreamLocation.md b/csharp-net45/docs/StreamLocation.md new file mode 100644 index 0000000..e365ada --- /dev/null +++ b/csharp-net45/docs/StreamLocation.md @@ -0,0 +1,12 @@ +# Sphereon.SDK.TemplateProcessor.Model.StreamLocation +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FolderPath** | **string** | | [optional] +**OriginalFileName** | **string** | | [optional] +**ContainerId** | **string** | | [optional] +**FileId** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net45/docs/TemplateContext.md b/csharp-net45/docs/TemplateContext.md new file mode 100644 index 0000000..9f56a89 --- /dev/null +++ b/csharp-net45/docs/TemplateContext.md @@ -0,0 +1,14 @@ +# Sphereon.SDK.TemplateProcessor.Model.TemplateContext +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TemplateType** | **string** | | +**TemplateFileLocations** | [**Dictionary<string, StreamLocation>**](StreamLocation.md) | The template files (versioned) | [optional] +**Description** | **string** | The template description | [optional] +**OwnerInfo** | [**OwnerInfo**](OwnerInfo.md) | | [optional] +**Id** | **string** | | [optional] +**TemplateId** | **string** | The template context id | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net45/docs/TemplateContextRequest.md b/csharp-net45/docs/TemplateContextRequest.md new file mode 100644 index 0000000..b509255 --- /dev/null +++ b/csharp-net45/docs/TemplateContextRequest.md @@ -0,0 +1,12 @@ +# Sphereon.SDK.TemplateProcessor.Model.TemplateContextRequest +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TemplateType** | **string** | | +**Description** | **string** | | [optional] +**OwnerInfo** | [**OwnerInfo**](OwnerInfo.md) | | [optional] +**TemplateId** | **string** | The template context id | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net45/docs/TemplateContextResponse.md b/csharp-net45/docs/TemplateContextResponse.md new file mode 100644 index 0000000..6c11a45 --- /dev/null +++ b/csharp-net45/docs/TemplateContextResponse.md @@ -0,0 +1,12 @@ +# Sphereon.SDK.TemplateProcessor.Model.TemplateContextResponse +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreationTime** | **DateTime?** | The creation date/time of this response in ISO 8601 format | [optional] +**Context** | [**TemplateContext**](TemplateContext.md) | | [optional] +**Id** | **string** | Unique template context id | +**Status** | **string** | The status of the template | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net45/git_push.sh b/csharp-net45/git_push.sh new file mode 100644 index 0000000..7923201 --- /dev/null +++ b/csharp-net45/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/csharp-net45/mono_nunit_test.sh b/csharp-net45/mono_nunit_test.sh new file mode 100644 index 0000000..b1bf816 --- /dev/null +++ b/csharp-net45/mono_nunit_test.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +wget -nc https://nuget.org/nuget.exe +mozroots --import --sync + +echo "[INFO] remove bin/Debug/SwaggerClientTest.dll" +rm src/IO.Swagger.Test/bin/Debug/Sphereon.SDK.TemplateProcessor.Test.dll 2> /dev/null + +echo "[INFO] install NUnit runners via NuGet" +wget -nc https://nuget.org/nuget.exe +mozroots --import --sync +mono nuget.exe install src/Sphereon.SDK.TemplateProcessor.Test/packages.config -o packages + +echo "[INFO] Install NUnit runners via NuGet" +mono nuget.exe install NUnit.Runners -Version 2.6.4 -OutputDirectory packages + +echo "[INFO] Build the solution and run the unit test" +xbuild Sphereon.SDK.TemplateProcessor.sln && \ + mono ./packages/NUnit.Runners.2.6.4/tools/nunit-console.exe src/Sphereon.SDK.TemplateProcessor.Test/bin/Debug/Sphereon.SDK.TemplateProcessor.Test.dll diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Api/MergeApiTests.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Api/MergeApiTests.cs new file mode 100644 index 0000000..a761162 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Api/MergeApiTests.cs @@ -0,0 +1,241 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing MergeApi + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the API endpoint. + /// + [TestFixture] + public class MergeApiTests + { + private MergeApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new MergeApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of MergeApi + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsInstanceOfType' MergeApi + //Assert.IsInstanceOfType(typeof(MergeApi), instance, "instance is a MergeApi"); + } + + + /// + /// Test CreateDataSet + /// + [Test] + public void CreateDataSetTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string payload = null; + //var response = instance.CreateDataSet(payload); + //Assert.IsInstanceOf (response, "response is DataSetResponse"); + } + + /// + /// Test CreateTemplateContext + /// + [Test] + public void CreateTemplateContextTest() + { + // TODO uncomment below to test the method and replace null with proper value + //TemplateContextRequest templateRequest = null; + //var response = instance.CreateTemplateContext(templateRequest); + //Assert.IsInstanceOf (response, "response is TemplateContextResponse"); + } + + /// + /// Test DeleteDataSet + /// + [Test] + public void DeleteDataSetTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string dataSetId = null; + //var response = instance.DeleteDataSet(dataSetId); + //Assert.IsInstanceOf (response, "response is DataSetResponse"); + } + + /// + /// Test DeleteJob + /// + [Test] + public void DeleteJobTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string jobId = null; + //var response = instance.DeleteJob(jobId); + //Assert.IsInstanceOf (response, "response is MergeJobResponse"); + } + + /// + /// Test DeleteTemplateContext + /// + [Test] + public void DeleteTemplateContextTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string templateId = null; + //var response = instance.DeleteTemplateContext(templateId); + //Assert.IsInstanceOf (response, "response is TemplateContextResponse"); + } + + /// + /// Test GetJob + /// + [Test] + public void GetJobTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string jobId = null; + //var response = instance.GetJob(jobId); + //Assert.IsInstanceOf (response, "response is MergeJobResponse"); + } + + /// + /// Test GetJobs + /// + [Test] + public void GetJobsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //List status = null; + //var response = instance.GetJobs(status); + //Assert.IsInstanceOf> (response, "response is List"); + } + + /// + /// Test GetResultStreamById + /// + [Test] + public void GetResultStreamByIdTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string jobId = null; + //string streamId = null; + //OutputSettings outputSettings = null; + //var response = instance.GetResultStreamById(jobId, streamId, outputSettings); + //Assert.IsInstanceOf (response, "response is byte[]"); + } + + /// + /// Test GetResultStreamsAsContainer + /// + [Test] + public void GetResultStreamsAsContainerTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string jobId = null; + //OutputSettings outputSettings = null; + //var response = instance.GetResultStreamsAsContainer(jobId, outputSettings); + //Assert.IsInstanceOf (response, "response is byte[]"); + } + + /// + /// Test GetTemplateContext + /// + [Test] + public void GetTemplateContextTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string templateId = null; + //var response = instance.GetTemplateContext(templateId); + //Assert.IsInstanceOf (response, "response is TemplateContextResponse"); + } + + /// + /// Test SubmitJob + /// + [Test] + public void SubmitJobTest() + { + // TODO uncomment below to test the method and replace null with proper value + //MergeSettings mergesettings = null; + //var response = instance.SubmitJob(mergesettings); + //Assert.IsInstanceOf (response, "response is MergeJobResponse"); + } + + /// + /// Test UpdateTemplateContext + /// + [Test] + public void UpdateTemplateContextTest() + { + // TODO uncomment below to test the method and replace null with proper value + //TemplateContextRequest templateContextRequest = null; + //var response = instance.UpdateTemplateContext(templateContextRequest); + //Assert.IsInstanceOf (response, "response is TemplateContextResponse"); + } + + /// + /// Test UploadTemplateFile + /// + [Test] + public void UploadTemplateFileTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string templateId = null; + //System.IO.Stream stream = null; + //var response = instance.UploadTemplateFile(templateId, stream); + //Assert.IsInstanceOf (response, "response is TemplateContextResponse"); + } + + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/DataSetResponseTests.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/DataSetResponseTests.cs new file mode 100644 index 0000000..6ef1157 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/DataSetResponseTests.cs @@ -0,0 +1,114 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing DataSetResponse + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class DataSetResponseTests + { + // TODO uncomment below to declare an instance variable for DataSetResponse + //private DataSetResponse instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of DataSetResponse + //instance = new DataSetResponse(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of DataSetResponse + /// + [Test] + public void DataSetResponseInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" DataSetResponse + //Assert.IsInstanceOfType (instance, "variable 'instance' is a DataSetResponse"); + } + + /// + /// Test the property 'CompletionTime' + /// + [Test] + public void CompletionTimeTest() + { + // TODO unit test for the property 'CompletionTime' + } + /// + /// Test the property 'CreationTime' + /// + [Test] + public void CreationTimeTest() + { + // TODO unit test for the property 'CreationTime' + } + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/ErrorResponseTests.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/ErrorResponseTests.cs new file mode 100644 index 0000000..b8b7f12 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/ErrorResponseTests.cs @@ -0,0 +1,90 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing ErrorResponse + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class ErrorResponseTests + { + // TODO uncomment below to declare an instance variable for ErrorResponse + //private ErrorResponse instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of ErrorResponse + //instance = new ErrorResponse(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of ErrorResponse + /// + [Test] + public void ErrorResponseInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" ErrorResponse + //Assert.IsInstanceOfType (instance, "variable 'instance' is a ErrorResponse"); + } + + /// + /// Test the property 'Errors' + /// + [Test] + public void ErrorsTest() + { + // TODO unit test for the property 'Errors' + } + + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/ErrorTests.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/ErrorTests.cs new file mode 100644 index 0000000..6418104 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/ErrorTests.cs @@ -0,0 +1,114 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing Error + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class ErrorTests + { + // TODO uncomment below to declare an instance variable for Error + //private Error instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of Error + //instance = new Error(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of Error + /// + [Test] + public void ErrorInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" Error + //Assert.IsInstanceOfType (instance, "variable 'instance' is a Error"); + } + + /// + /// Test the property 'Code' + /// + [Test] + public void CodeTest() + { + // TODO unit test for the property 'Code' + } + /// + /// Test the property 'Level' + /// + [Test] + public void LevelTest() + { + // TODO unit test for the property 'Level' + } + /// + /// Test the property 'Cause' + /// + [Test] + public void CauseTest() + { + // TODO unit test for the property 'Cause' + } + /// + /// Test the property 'Message' + /// + [Test] + public void MessageTest() + { + // TODO unit test for the property 'Message' + } + + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/LifecycleTests.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/LifecycleTests.cs new file mode 100644 index 0000000..abbb7a4 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/LifecycleTests.cs @@ -0,0 +1,106 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing Lifecycle + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class LifecycleTests + { + // TODO uncomment below to declare an instance variable for Lifecycle + //private Lifecycle instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of Lifecycle + //instance = new Lifecycle(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of Lifecycle + /// + [Test] + public void LifecycleInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" Lifecycle + //Assert.IsInstanceOfType (instance, "variable 'instance' is a Lifecycle"); + } + + /// + /// Test the property 'ActionTime' + /// + [Test] + public void ActionTimeTest() + { + // TODO unit test for the property 'ActionTime' + } + /// + /// Test the property 'Action' + /// + [Test] + public void ActionTest() + { + // TODO unit test for the property 'Action' + } + /// + /// Test the property 'Type' + /// + [Test] + public void TypeTest() + { + // TODO unit test for the property 'Type' + } + + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/MergeJobResponseTests.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/MergeJobResponseTests.cs new file mode 100644 index 0000000..bc5c161 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/MergeJobResponseTests.cs @@ -0,0 +1,114 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing MergeJobResponse + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class MergeJobResponseTests + { + // TODO uncomment below to declare an instance variable for MergeJobResponse + //private MergeJobResponse instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of MergeJobResponse + //instance = new MergeJobResponse(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of MergeJobResponse + /// + [Test] + public void MergeJobResponseInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" MergeJobResponse + //Assert.IsInstanceOfType (instance, "variable 'instance' is a MergeJobResponse"); + } + + /// + /// Test the property 'JobId' + /// + [Test] + public void JobIdTest() + { + // TODO unit test for the property 'JobId' + } + /// + /// Test the property 'Job' + /// + [Test] + public void JobTest() + { + // TODO unit test for the property 'Job' + } + /// + /// Test the property 'StatusMessage' + /// + [Test] + public void StatusMessageTest() + { + // TODO unit test for the property 'StatusMessage' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/MergeJobTests.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/MergeJobTests.cs new file mode 100644 index 0000000..095506d --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/MergeJobTests.cs @@ -0,0 +1,170 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing MergeJob + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class MergeJobTests + { + // TODO uncomment below to declare an instance variable for MergeJob + //private MergeJob instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of MergeJob + //instance = new MergeJob(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of MergeJob + /// + [Test] + public void MergeJobInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" MergeJob + //Assert.IsInstanceOfType (instance, "variable 'instance' is a MergeJob"); + } + + /// + /// Test the property 'ResultFolderPath' + /// + [Test] + public void ResultFolderPathTest() + { + // TODO unit test for the property 'ResultFolderPath' + } + /// + /// Test the property 'CompletionTime' + /// + [Test] + public void CompletionTimeTest() + { + // TODO unit test for the property 'CompletionTime' + } + /// + /// Test the property 'JobId' + /// + [Test] + public void JobIdTest() + { + // TODO unit test for the property 'JobId' + } + /// + /// Test the property 'ResultContainerId' + /// + [Test] + public void ResultContainerIdTest() + { + // TODO unit test for the property 'ResultContainerId' + } + /// + /// Test the property 'CreationTime' + /// + [Test] + public void CreationTimeTest() + { + // TODO unit test for the property 'CreationTime' + } + /// + /// Test the property 'DataSetId' + /// + [Test] + public void DataSetIdTest() + { + // TODO unit test for the property 'DataSetId' + } + /// + /// Test the property 'ResultStreams' + /// + [Test] + public void ResultStreamsTest() + { + // TODO unit test for the property 'ResultStreams' + } + /// + /// Test the property 'HeaderDataSetIds' + /// + [Test] + public void HeaderDataSetIdsTest() + { + // TODO unit test for the property 'HeaderDataSetIds' + } + /// + /// Test the property 'MergeSettings' + /// + [Test] + public void MergeSettingsTest() + { + // TODO unit test for the property 'MergeSettings' + } + /// + /// Test the property 'StatusMessage' + /// + [Test] + public void StatusMessageTest() + { + // TODO unit test for the property 'StatusMessage' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/MergeSettingsTests.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/MergeSettingsTests.cs new file mode 100644 index 0000000..fcd5572 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/MergeSettingsTests.cs @@ -0,0 +1,154 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing MergeSettings + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class MergeSettingsTests + { + // TODO uncomment below to declare an instance variable for MergeSettings + //private MergeSettings instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of MergeSettings + //instance = new MergeSettings(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of MergeSettings + /// + [Test] + public void MergeSettingsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" MergeSettings + //Assert.IsInstanceOfType (instance, "variable 'instance' is a MergeSettings"); + } + + /// + /// Test the property 'Lifecycle' + /// + [Test] + public void LifecycleTest() + { + // TODO unit test for the property 'Lifecycle' + } + /// + /// Test the property 'MergeResult' + /// + [Test] + public void MergeResultTest() + { + // TODO unit test for the property 'MergeResult' + } + /// + /// Test the property 'DataSetId' + /// + [Test] + public void DataSetIdTest() + { + // TODO unit test for the property 'DataSetId' + } + /// + /// Test the property 'Engine' + /// + [Test] + public void EngineTest() + { + // TODO unit test for the property 'Engine' + } + /// + /// Test the property 'HeaderDataSetIds' + /// + [Test] + public void HeaderDataSetIdsTest() + { + // TODO unit test for the property 'HeaderDataSetIds' + } + /// + /// Test the property 'TemplateVersion' + /// + [Test] + public void TemplateVersionTest() + { + // TODO unit test for the property 'TemplateVersion' + } + /// + /// Test the property 'ResultStreamLocation' + /// + [Test] + public void ResultStreamLocationTest() + { + // TODO unit test for the property 'ResultStreamLocation' + } + /// + /// Test the property 'TemplateId' + /// + [Test] + public void TemplateIdTest() + { + // TODO unit test for the property 'TemplateId' + } + /// + /// Test the property 'OutputSettings' + /// + [Test] + public void OutputSettingsTest() + { + // TODO unit test for the property 'OutputSettings' + } + + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/OutputSettingsTests.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/OutputSettingsTests.cs new file mode 100644 index 0000000..1c9b36c --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/OutputSettingsTests.cs @@ -0,0 +1,98 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing OutputSettings + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class OutputSettingsTests + { + // TODO uncomment below to declare an instance variable for OutputSettings + //private OutputSettings instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of OutputSettings + //instance = new OutputSettings(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of OutputSettings + /// + [Test] + public void OutputSettingsInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" OutputSettings + //Assert.IsInstanceOfType (instance, "variable 'instance' is a OutputSettings"); + } + + /// + /// Test the property 'DeliveryFormat' + /// + [Test] + public void DeliveryFormatTest() + { + // TODO unit test for the property 'DeliveryFormat' + } + /// + /// Test the property 'OutputFormat' + /// + [Test] + public void OutputFormatTest() + { + // TODO unit test for the property 'OutputFormat' + } + + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/OwnerInfoTests.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/OwnerInfoTests.cs new file mode 100644 index 0000000..d199b80 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/OwnerInfoTests.cs @@ -0,0 +1,114 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing OwnerInfo + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class OwnerInfoTests + { + // TODO uncomment below to declare an instance variable for OwnerInfo + //private OwnerInfo instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of OwnerInfo + //instance = new OwnerInfo(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of OwnerInfo + /// + [Test] + public void OwnerInfoInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" OwnerInfo + //Assert.IsInstanceOfType (instance, "variable 'instance' is a OwnerInfo"); + } + + /// + /// Test the property 'Phone' + /// + [Test] + public void PhoneTest() + { + // TODO unit test for the property 'Phone' + } + /// + /// Test the property 'CompanyDepartment' + /// + [Test] + public void CompanyDepartmentTest() + { + // TODO unit test for the property 'CompanyDepartment' + } + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Email' + /// + [Test] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/StreamLocationTests.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/StreamLocationTests.cs new file mode 100644 index 0000000..01b252b --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/StreamLocationTests.cs @@ -0,0 +1,114 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing StreamLocation + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class StreamLocationTests + { + // TODO uncomment below to declare an instance variable for StreamLocation + //private StreamLocation instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of StreamLocation + //instance = new StreamLocation(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of StreamLocation + /// + [Test] + public void StreamLocationInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" StreamLocation + //Assert.IsInstanceOfType (instance, "variable 'instance' is a StreamLocation"); + } + + /// + /// Test the property 'FolderPath' + /// + [Test] + public void FolderPathTest() + { + // TODO unit test for the property 'FolderPath' + } + /// + /// Test the property 'OriginalFileName' + /// + [Test] + public void OriginalFileNameTest() + { + // TODO unit test for the property 'OriginalFileName' + } + /// + /// Test the property 'ContainerId' + /// + [Test] + public void ContainerIdTest() + { + // TODO unit test for the property 'ContainerId' + } + /// + /// Test the property 'FileId' + /// + [Test] + public void FileIdTest() + { + // TODO unit test for the property 'FileId' + } + + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/TemplateContextRequestTests.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/TemplateContextRequestTests.cs new file mode 100644 index 0000000..ecc1b1e --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/TemplateContextRequestTests.cs @@ -0,0 +1,114 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing TemplateContextRequest + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class TemplateContextRequestTests + { + // TODO uncomment below to declare an instance variable for TemplateContextRequest + //private TemplateContextRequest instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of TemplateContextRequest + //instance = new TemplateContextRequest(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of TemplateContextRequest + /// + [Test] + public void TemplateContextRequestInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" TemplateContextRequest + //Assert.IsInstanceOfType (instance, "variable 'instance' is a TemplateContextRequest"); + } + + /// + /// Test the property 'TemplateType' + /// + [Test] + public void TemplateTypeTest() + { + // TODO unit test for the property 'TemplateType' + } + /// + /// Test the property 'Description' + /// + [Test] + public void DescriptionTest() + { + // TODO unit test for the property 'Description' + } + /// + /// Test the property 'OwnerInfo' + /// + [Test] + public void OwnerInfoTest() + { + // TODO unit test for the property 'OwnerInfo' + } + /// + /// Test the property 'TemplateId' + /// + [Test] + public void TemplateIdTest() + { + // TODO unit test for the property 'TemplateId' + } + + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/TemplateContextResponseTests.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/TemplateContextResponseTests.cs new file mode 100644 index 0000000..7625bc0 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/TemplateContextResponseTests.cs @@ -0,0 +1,114 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing TemplateContextResponse + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class TemplateContextResponseTests + { + // TODO uncomment below to declare an instance variable for TemplateContextResponse + //private TemplateContextResponse instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of TemplateContextResponse + //instance = new TemplateContextResponse(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of TemplateContextResponse + /// + [Test] + public void TemplateContextResponseInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" TemplateContextResponse + //Assert.IsInstanceOfType (instance, "variable 'instance' is a TemplateContextResponse"); + } + + /// + /// Test the property 'CreationTime' + /// + [Test] + public void CreationTimeTest() + { + // TODO unit test for the property 'CreationTime' + } + /// + /// Test the property 'Context' + /// + [Test] + public void ContextTest() + { + // TODO unit test for the property 'Context' + } + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'Status' + /// + [Test] + public void StatusTest() + { + // TODO unit test for the property 'Status' + } + + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/TemplateContextTests.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/TemplateContextTests.cs new file mode 100644 index 0000000..ef78245 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/TemplateContextTests.cs @@ -0,0 +1,130 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing TemplateContext + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class TemplateContextTests + { + // TODO uncomment below to declare an instance variable for TemplateContext + //private TemplateContext instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of TemplateContext + //instance = new TemplateContext(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of TemplateContext + /// + [Test] + public void TemplateContextInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" TemplateContext + //Assert.IsInstanceOfType (instance, "variable 'instance' is a TemplateContext"); + } + + /// + /// Test the property 'TemplateType' + /// + [Test] + public void TemplateTypeTest() + { + // TODO unit test for the property 'TemplateType' + } + /// + /// Test the property 'TemplateFileLocations' + /// + [Test] + public void TemplateFileLocationsTest() + { + // TODO unit test for the property 'TemplateFileLocations' + } + /// + /// Test the property 'Description' + /// + [Test] + public void DescriptionTest() + { + // TODO unit test for the property 'Description' + } + /// + /// Test the property 'OwnerInfo' + /// + [Test] + public void OwnerInfoTest() + { + // TODO unit test for the property 'OwnerInfo' + } + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'TemplateId' + /// + [Test] + public void TemplateIdTest() + { + // TODO unit test for the property 'TemplateId' + } + + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Sphereon.SDK.TemplateProcessor.Test.csproj b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Sphereon.SDK.TemplateProcessor.Test.csproj new file mode 100644 index 0000000..8432e01 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Sphereon.SDK.TemplateProcessor.Test.csproj @@ -0,0 +1,94 @@ + + + + + Debug + AnyCPU + {19F1DEBC-DE5E-4517-8062-F000CD499087} + Library + Properties + Sphereon.SDK.TemplateProcessor.Test + Sphereon.SDK.TemplateProcessor.Test + v4.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + $(SolutionDir)\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll + ..\..\vendor\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll + + + $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll + ..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll + ..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll + ..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll + + + $(SolutionDir)\packages\NUnit.2.6.4\lib\nunit.framework.dll + ..\packages\NUnit.2.6.4\lib\nunit.framework.dll + ..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll + ..\..\vendor\NUnit.2.6.4\lib\nunit.framework.dll + + + + + + + + + + + + {80B64299-4E8C-4A19-A669-65EC364D8526} + Sphereon.SDK.TemplateProcessor + + + + diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/packages.config b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/packages.config new file mode 100644 index 0000000..9bb00f0 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/packages.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Api/MergeApi.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Api/MergeApi.cs new file mode 100644 index 0000000..e7f190a --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Api/MergeApi.cs @@ -0,0 +1,2845 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Sphereon.SDK.TemplateProcessor.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IMergeApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Store dataset + /// + /// + /// Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + /// + /// Thrown when fails to make API call + /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] + /// DataSetResponse + DataSetResponse CreateDataSet (string payload); + + /// + /// Store dataset + /// + /// + /// Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + /// + /// Thrown when fails to make API call + /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] + /// ApiResponse of DataSetResponse + ApiResponse CreateDataSetWithHttpInfo (string payload); + /// + /// Create template context + /// + /// + /// Create a unique template context for your environment + /// + /// Thrown when fails to make API call + /// The template request + /// TemplateContextResponse + TemplateContextResponse CreateTemplateContext (TemplateContextRequest templateRequest); + + /// + /// Create template context + /// + /// + /// Create a unique template context for your environment + /// + /// Thrown when fails to make API call + /// The template request + /// ApiResponse of TemplateContextResponse + ApiResponse CreateTemplateContextWithHttpInfo (TemplateContextRequest templateRequest); + /// + /// Delete a stored data set + /// + /// + /// Delete a stored data set + /// + /// Thrown when fails to make API call + /// dataSetId + /// DataSetResponse + DataSetResponse DeleteDataSet (string dataSetId); + + /// + /// Delete a stored data set + /// + /// + /// Delete a stored data set + /// + /// Thrown when fails to make API call + /// dataSetId + /// ApiResponse of DataSetResponse + ApiResponse DeleteDataSetWithHttpInfo (string dataSetId); + /// + /// Delete a job manually + /// + /// + /// Delete the merge job and all related files + /// + /// Thrown when fails to make API call + /// jobId + /// MergeJobResponse + MergeJobResponse DeleteJob (string jobId); + + /// + /// Delete a job manually + /// + /// + /// Delete the merge job and all related files + /// + /// Thrown when fails to make API call + /// jobId + /// ApiResponse of MergeJobResponse + ApiResponse DeleteJobWithHttpInfo (string jobId); + /// + /// Delete template context + /// + /// + /// Delete a template context with all history + /// + /// Thrown when fails to make API call + /// templateId + /// TemplateContextResponse + TemplateContextResponse DeleteTemplateContext (string templateId); + + /// + /// Delete template context + /// + /// + /// Delete a template context with all history + /// + /// Thrown when fails to make API call + /// templateId + /// ApiResponse of TemplateContextResponse + ApiResponse DeleteTemplateContextWithHttpInfo (string templateId); + /// + /// Job definition and state + /// + /// + /// Get the merge job definition and current state. Please not that you can differentiate based on http response status + /// + /// Thrown when fails to make API call + /// jobId + /// MergeJobResponse + MergeJobResponse GetJob (string jobId); + + /// + /// Job definition and state + /// + /// + /// Get the merge job definition and current state. Please not that you can differentiate based on http response status + /// + /// Thrown when fails to make API call + /// jobId + /// ApiResponse of MergeJobResponse + ApiResponse GetJobWithHttpInfo (string jobId); + /// + /// Get all jobs + /// + /// + /// Get all office text job definitions and their current state. + /// + /// Thrown when fails to make API call + /// A list of status to filter on. (optional) + /// List<MergeJobResponse> + List GetJobs (List status = null); + + /// + /// Get all jobs + /// + /// + /// Get all office text job definitions and their current state. + /// + /// Thrown when fails to make API call + /// A list of status to filter on. (optional) + /// ApiResponse of List<MergeJobResponse> + ApiResponse> GetJobsWithHttpInfo (List status = null); + /// + /// Get the result file + /// + /// + /// Get a merge result document as a binary stream. + /// + /// Thrown when fails to make API call + /// jobId + /// streamId + /// outputSettings (optional) + /// byte[] + byte[] GetResultStreamById (string jobId, string streamId, OutputSettings outputSettings = null); + + /// + /// Get the result file + /// + /// + /// Get a merge result document as a binary stream. + /// + /// Thrown when fails to make API call + /// jobId + /// streamId + /// outputSettings (optional) + /// ApiResponse of byte[] + ApiResponse GetResultStreamByIdWithHttpInfo (string jobId, string streamId, OutputSettings outputSettings = null); + /// + /// Get the result file + /// + /// + /// Get all documents inside a compressed container as a binary stream. + /// + /// Thrown when fails to make API call + /// jobId + /// outputSettings (optional) + /// byte[] + byte[] GetResultStreamsAsContainer (string jobId, OutputSettings outputSettings = null); + + /// + /// Get the result file + /// + /// + /// Get all documents inside a compressed container as a binary stream. + /// + /// Thrown when fails to make API call + /// jobId + /// outputSettings (optional) + /// ApiResponse of byte[] + ApiResponse GetResultStreamsAsContainerWithHttpInfo (string jobId, OutputSettings outputSettings = null); + /// + /// Get template context + /// + /// + /// Get an existing template context + /// + /// Thrown when fails to make API call + /// The template context name unique for your environment + /// TemplateContextResponse + TemplateContextResponse GetTemplateContext (string templateId); + + /// + /// Get template context + /// + /// + /// Get an existing template context + /// + /// Thrown when fails to make API call + /// The template context name unique for your environment + /// ApiResponse of TemplateContextResponse + ApiResponse GetTemplateContextWithHttpInfo (string templateId); + /// + /// Submit merge job for processing + /// + /// + /// Submit merge job run. + /// + /// Thrown when fails to make API call + /// The merge- and output settings + /// MergeJobResponse + MergeJobResponse SubmitJob (MergeSettings mergesettings); + + /// + /// Submit merge job for processing + /// + /// + /// Submit merge job run. + /// + /// Thrown when fails to make API call + /// The merge- and output settings + /// ApiResponse of MergeJobResponse + ApiResponse SubmitJobWithHttpInfo (MergeSettings mergesettings); + /// + /// Update template context + /// + /// + /// Update an existing template context for your environment + /// + /// Thrown when fails to make API call + /// templateContextRequest + /// TemplateContextResponse + TemplateContextResponse UpdateTemplateContext (TemplateContextRequest templateContextRequest); + + /// + /// Update template context + /// + /// + /// Update an existing template context for your environment + /// + /// Thrown when fails to make API call + /// templateContextRequest + /// ApiResponse of TemplateContextResponse + ApiResponse UpdateTemplateContextWithHttpInfo (TemplateContextRequest templateContextRequest); + /// + /// Upload template file + /// + /// + /// Upload the Office template file + /// + /// Thrown when fails to make API call + /// The template context name unique for your environment + /// The template (file/inputstream) to store + /// TemplateContextResponse + TemplateContextResponse UploadTemplateFile (string templateId, System.IO.Stream stream); + + /// + /// Upload template file + /// + /// + /// Upload the Office template file + /// + /// Thrown when fails to make API call + /// The template context name unique for your environment + /// The template (file/inputstream) to store + /// ApiResponse of TemplateContextResponse + ApiResponse UploadTemplateFileWithHttpInfo (string templateId, System.IO.Stream stream); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Store dataset + /// + /// + /// Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + /// + /// Thrown when fails to make API call + /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] + /// Task of DataSetResponse + System.Threading.Tasks.Task CreateDataSetAsync (string payload); + + /// + /// Store dataset + /// + /// + /// Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + /// + /// Thrown when fails to make API call + /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] + /// Task of ApiResponse (DataSetResponse) + System.Threading.Tasks.Task> CreateDataSetAsyncWithHttpInfo (string payload); + /// + /// Create template context + /// + /// + /// Create a unique template context for your environment + /// + /// Thrown when fails to make API call + /// The template request + /// Task of TemplateContextResponse + System.Threading.Tasks.Task CreateTemplateContextAsync (TemplateContextRequest templateRequest); + + /// + /// Create template context + /// + /// + /// Create a unique template context for your environment + /// + /// Thrown when fails to make API call + /// The template request + /// Task of ApiResponse (TemplateContextResponse) + System.Threading.Tasks.Task> CreateTemplateContextAsyncWithHttpInfo (TemplateContextRequest templateRequest); + /// + /// Delete a stored data set + /// + /// + /// Delete a stored data set + /// + /// Thrown when fails to make API call + /// dataSetId + /// Task of DataSetResponse + System.Threading.Tasks.Task DeleteDataSetAsync (string dataSetId); + + /// + /// Delete a stored data set + /// + /// + /// Delete a stored data set + /// + /// Thrown when fails to make API call + /// dataSetId + /// Task of ApiResponse (DataSetResponse) + System.Threading.Tasks.Task> DeleteDataSetAsyncWithHttpInfo (string dataSetId); + /// + /// Delete a job manually + /// + /// + /// Delete the merge job and all related files + /// + /// Thrown when fails to make API call + /// jobId + /// Task of MergeJobResponse + System.Threading.Tasks.Task DeleteJobAsync (string jobId); + + /// + /// Delete a job manually + /// + /// + /// Delete the merge job and all related files + /// + /// Thrown when fails to make API call + /// jobId + /// Task of ApiResponse (MergeJobResponse) + System.Threading.Tasks.Task> DeleteJobAsyncWithHttpInfo (string jobId); + /// + /// Delete template context + /// + /// + /// Delete a template context with all history + /// + /// Thrown when fails to make API call + /// templateId + /// Task of TemplateContextResponse + System.Threading.Tasks.Task DeleteTemplateContextAsync (string templateId); + + /// + /// Delete template context + /// + /// + /// Delete a template context with all history + /// + /// Thrown when fails to make API call + /// templateId + /// Task of ApiResponse (TemplateContextResponse) + System.Threading.Tasks.Task> DeleteTemplateContextAsyncWithHttpInfo (string templateId); + /// + /// Job definition and state + /// + /// + /// Get the merge job definition and current state. Please not that you can differentiate based on http response status + /// + /// Thrown when fails to make API call + /// jobId + /// Task of MergeJobResponse + System.Threading.Tasks.Task GetJobAsync (string jobId); + + /// + /// Job definition and state + /// + /// + /// Get the merge job definition and current state. Please not that you can differentiate based on http response status + /// + /// Thrown when fails to make API call + /// jobId + /// Task of ApiResponse (MergeJobResponse) + System.Threading.Tasks.Task> GetJobAsyncWithHttpInfo (string jobId); + /// + /// Get all jobs + /// + /// + /// Get all office text job definitions and their current state. + /// + /// Thrown when fails to make API call + /// A list of status to filter on. (optional) + /// Task of List<MergeJobResponse> + System.Threading.Tasks.Task> GetJobsAsync (List status = null); + + /// + /// Get all jobs + /// + /// + /// Get all office text job definitions and their current state. + /// + /// Thrown when fails to make API call + /// A list of status to filter on. (optional) + /// Task of ApiResponse (List<MergeJobResponse>) + System.Threading.Tasks.Task>> GetJobsAsyncWithHttpInfo (List status = null); + /// + /// Get the result file + /// + /// + /// Get a merge result document as a binary stream. + /// + /// Thrown when fails to make API call + /// jobId + /// streamId + /// outputSettings (optional) + /// Task of byte[] + System.Threading.Tasks.Task GetResultStreamByIdAsync (string jobId, string streamId, OutputSettings outputSettings = null); + + /// + /// Get the result file + /// + /// + /// Get a merge result document as a binary stream. + /// + /// Thrown when fails to make API call + /// jobId + /// streamId + /// outputSettings (optional) + /// Task of ApiResponse (byte[]) + System.Threading.Tasks.Task> GetResultStreamByIdAsyncWithHttpInfo (string jobId, string streamId, OutputSettings outputSettings = null); + /// + /// Get the result file + /// + /// + /// Get all documents inside a compressed container as a binary stream. + /// + /// Thrown when fails to make API call + /// jobId + /// outputSettings (optional) + /// Task of byte[] + System.Threading.Tasks.Task GetResultStreamsAsContainerAsync (string jobId, OutputSettings outputSettings = null); + + /// + /// Get the result file + /// + /// + /// Get all documents inside a compressed container as a binary stream. + /// + /// Thrown when fails to make API call + /// jobId + /// outputSettings (optional) + /// Task of ApiResponse (byte[]) + System.Threading.Tasks.Task> GetResultStreamsAsContainerAsyncWithHttpInfo (string jobId, OutputSettings outputSettings = null); + /// + /// Get template context + /// + /// + /// Get an existing template context + /// + /// Thrown when fails to make API call + /// The template context name unique for your environment + /// Task of TemplateContextResponse + System.Threading.Tasks.Task GetTemplateContextAsync (string templateId); + + /// + /// Get template context + /// + /// + /// Get an existing template context + /// + /// Thrown when fails to make API call + /// The template context name unique for your environment + /// Task of ApiResponse (TemplateContextResponse) + System.Threading.Tasks.Task> GetTemplateContextAsyncWithHttpInfo (string templateId); + /// + /// Submit merge job for processing + /// + /// + /// Submit merge job run. + /// + /// Thrown when fails to make API call + /// The merge- and output settings + /// Task of MergeJobResponse + System.Threading.Tasks.Task SubmitJobAsync (MergeSettings mergesettings); + + /// + /// Submit merge job for processing + /// + /// + /// Submit merge job run. + /// + /// Thrown when fails to make API call + /// The merge- and output settings + /// Task of ApiResponse (MergeJobResponse) + System.Threading.Tasks.Task> SubmitJobAsyncWithHttpInfo (MergeSettings mergesettings); + /// + /// Update template context + /// + /// + /// Update an existing template context for your environment + /// + /// Thrown when fails to make API call + /// templateContextRequest + /// Task of TemplateContextResponse + System.Threading.Tasks.Task UpdateTemplateContextAsync (TemplateContextRequest templateContextRequest); + + /// + /// Update template context + /// + /// + /// Update an existing template context for your environment + /// + /// Thrown when fails to make API call + /// templateContextRequest + /// Task of ApiResponse (TemplateContextResponse) + System.Threading.Tasks.Task> UpdateTemplateContextAsyncWithHttpInfo (TemplateContextRequest templateContextRequest); + /// + /// Upload template file + /// + /// + /// Upload the Office template file + /// + /// Thrown when fails to make API call + /// The template context name unique for your environment + /// The template (file/inputstream) to store + /// Task of TemplateContextResponse + System.Threading.Tasks.Task UploadTemplateFileAsync (string templateId, System.IO.Stream stream); + + /// + /// Upload template file + /// + /// + /// Upload the Office template file + /// + /// Thrown when fails to make API call + /// The template context name unique for your environment + /// The template (file/inputstream) to store + /// Task of ApiResponse (TemplateContextResponse) + System.Threading.Tasks.Task> UploadTemplateFileAsyncWithHttpInfo (string templateId, System.IO.Stream stream); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class MergeApi : IMergeApi + { + private Sphereon.SDK.TemplateProcessor.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public MergeApi(String basePath) + { + this.Configuration = new Configuration(new ApiClient(basePath)); + + ExceptionFactory = Sphereon.SDK.TemplateProcessor.Client.Configuration.DefaultExceptionFactory; + + // ensure API client has configuration ready + if (Configuration.ApiClient.Configuration == null) + { + this.Configuration.ApiClient.Configuration = this.Configuration; + } + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public MergeApi(Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = Sphereon.SDK.TemplateProcessor.Client.Configuration.DefaultExceptionFactory; + + // ensure API client has configuration ready + if (Configuration.ApiClient.Configuration == null) + { + this.Configuration.ApiClient.Configuration = this.Configuration; + } + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Sphereon.SDK.TemplateProcessor.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public Dictionary DefaultHeader() + { + return this.Configuration.DefaultHeader; + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + /// + /// Store dataset Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + /// + /// Thrown when fails to make API call + /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] + /// DataSetResponse + public DataSetResponse CreateDataSet (string payload) + { + ApiResponse localVarResponse = CreateDataSetWithHttpInfo(payload); + return localVarResponse.Data; + } + + /// + /// Store dataset Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + /// + /// Thrown when fails to make API call + /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] + /// ApiResponse of DataSetResponse + public ApiResponse< DataSetResponse > CreateDataSetWithHttpInfo (string payload) + { + // verify the required parameter 'payload' is set + if (payload == null) + throw new ApiException(400, "Missing required parameter 'payload' when calling MergeApi->CreateDataSet"); + + var localVarPath = "/template-processor/merge/0.1/datasets"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (payload != null && payload.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(payload); // http body (model) parameter + } + else + { + localVarPostBody = payload; // byte array + } + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateDataSet", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (DataSetResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DataSetResponse))); + + } + + /// + /// Store dataset Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + /// + /// Thrown when fails to make API call + /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] + /// Task of DataSetResponse + public async System.Threading.Tasks.Task CreateDataSetAsync (string payload) + { + ApiResponse localVarResponse = await CreateDataSetAsyncWithHttpInfo(payload); + return localVarResponse.Data; + + } + + /// + /// Store dataset Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + /// + /// Thrown when fails to make API call + /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] + /// Task of ApiResponse (DataSetResponse) + public async System.Threading.Tasks.Task> CreateDataSetAsyncWithHttpInfo (string payload) + { + // verify the required parameter 'payload' is set + if (payload == null) + throw new ApiException(400, "Missing required parameter 'payload' when calling MergeApi->CreateDataSet"); + + var localVarPath = "/template-processor/merge/0.1/datasets"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (payload != null && payload.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(payload); // http body (model) parameter + } + else + { + localVarPostBody = payload; // byte array + } + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateDataSet", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (DataSetResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DataSetResponse))); + + } + + /// + /// Create template context Create a unique template context for your environment + /// + /// Thrown when fails to make API call + /// The template request + /// TemplateContextResponse + public TemplateContextResponse CreateTemplateContext (TemplateContextRequest templateRequest) + { + ApiResponse localVarResponse = CreateTemplateContextWithHttpInfo(templateRequest); + return localVarResponse.Data; + } + + /// + /// Create template context Create a unique template context for your environment + /// + /// Thrown when fails to make API call + /// The template request + /// ApiResponse of TemplateContextResponse + public ApiResponse< TemplateContextResponse > CreateTemplateContextWithHttpInfo (TemplateContextRequest templateRequest) + { + // verify the required parameter 'templateRequest' is set + if (templateRequest == null) + throw new ApiException(400, "Missing required parameter 'templateRequest' when calling MergeApi->CreateTemplateContext"); + + var localVarPath = "/template-processor/merge/0.1/templates"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (templateRequest != null && templateRequest.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(templateRequest); // http body (model) parameter + } + else + { + localVarPostBody = templateRequest; // byte array + } + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateTemplateContext", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); + + } + + /// + /// Create template context Create a unique template context for your environment + /// + /// Thrown when fails to make API call + /// The template request + /// Task of TemplateContextResponse + public async System.Threading.Tasks.Task CreateTemplateContextAsync (TemplateContextRequest templateRequest) + { + ApiResponse localVarResponse = await CreateTemplateContextAsyncWithHttpInfo(templateRequest); + return localVarResponse.Data; + + } + + /// + /// Create template context Create a unique template context for your environment + /// + /// Thrown when fails to make API call + /// The template request + /// Task of ApiResponse (TemplateContextResponse) + public async System.Threading.Tasks.Task> CreateTemplateContextAsyncWithHttpInfo (TemplateContextRequest templateRequest) + { + // verify the required parameter 'templateRequest' is set + if (templateRequest == null) + throw new ApiException(400, "Missing required parameter 'templateRequest' when calling MergeApi->CreateTemplateContext"); + + var localVarPath = "/template-processor/merge/0.1/templates"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (templateRequest != null && templateRequest.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(templateRequest); // http body (model) parameter + } + else + { + localVarPostBody = templateRequest; // byte array + } + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateTemplateContext", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); + + } + + /// + /// Delete a stored data set Delete a stored data set + /// + /// Thrown when fails to make API call + /// dataSetId + /// DataSetResponse + public DataSetResponse DeleteDataSet (string dataSetId) + { + ApiResponse localVarResponse = DeleteDataSetWithHttpInfo(dataSetId); + return localVarResponse.Data; + } + + /// + /// Delete a stored data set Delete a stored data set + /// + /// Thrown when fails to make API call + /// dataSetId + /// ApiResponse of DataSetResponse + public ApiResponse< DataSetResponse > DeleteDataSetWithHttpInfo (string dataSetId) + { + // verify the required parameter 'dataSetId' is set + if (dataSetId == null) + throw new ApiException(400, "Missing required parameter 'dataSetId' when calling MergeApi->DeleteDataSet"); + + var localVarPath = "/template-processor/merge/0.1/datasets/{dataSetId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (dataSetId != null) localVarPathParams.Add("dataSetId", Configuration.ApiClient.ParameterToString(dataSetId)); // path parameter + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteDataSet", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (DataSetResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DataSetResponse))); + + } + + /// + /// Delete a stored data set Delete a stored data set + /// + /// Thrown when fails to make API call + /// dataSetId + /// Task of DataSetResponse + public async System.Threading.Tasks.Task DeleteDataSetAsync (string dataSetId) + { + ApiResponse localVarResponse = await DeleteDataSetAsyncWithHttpInfo(dataSetId); + return localVarResponse.Data; + + } + + /// + /// Delete a stored data set Delete a stored data set + /// + /// Thrown when fails to make API call + /// dataSetId + /// Task of ApiResponse (DataSetResponse) + public async System.Threading.Tasks.Task> DeleteDataSetAsyncWithHttpInfo (string dataSetId) + { + // verify the required parameter 'dataSetId' is set + if (dataSetId == null) + throw new ApiException(400, "Missing required parameter 'dataSetId' when calling MergeApi->DeleteDataSet"); + + var localVarPath = "/template-processor/merge/0.1/datasets/{dataSetId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (dataSetId != null) localVarPathParams.Add("dataSetId", Configuration.ApiClient.ParameterToString(dataSetId)); // path parameter + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteDataSet", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (DataSetResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DataSetResponse))); + + } + + /// + /// Delete a job manually Delete the merge job and all related files + /// + /// Thrown when fails to make API call + /// jobId + /// MergeJobResponse + public MergeJobResponse DeleteJob (string jobId) + { + ApiResponse localVarResponse = DeleteJobWithHttpInfo(jobId); + return localVarResponse.Data; + } + + /// + /// Delete a job manually Delete the merge job and all related files + /// + /// Thrown when fails to make API call + /// jobId + /// ApiResponse of MergeJobResponse + public ApiResponse< MergeJobResponse > DeleteJobWithHttpInfo (string jobId) + { + // verify the required parameter 'jobId' is set + if (jobId == null) + throw new ApiException(400, "Missing required parameter 'jobId' when calling MergeApi->DeleteJob"); + + var localVarPath = "/template-processor/merge/0.1/jobs/{jobId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteJob", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (MergeJobResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(MergeJobResponse))); + + } + + /// + /// Delete a job manually Delete the merge job and all related files + /// + /// Thrown when fails to make API call + /// jobId + /// Task of MergeJobResponse + public async System.Threading.Tasks.Task DeleteJobAsync (string jobId) + { + ApiResponse localVarResponse = await DeleteJobAsyncWithHttpInfo(jobId); + return localVarResponse.Data; + + } + + /// + /// Delete a job manually Delete the merge job and all related files + /// + /// Thrown when fails to make API call + /// jobId + /// Task of ApiResponse (MergeJobResponse) + public async System.Threading.Tasks.Task> DeleteJobAsyncWithHttpInfo (string jobId) + { + // verify the required parameter 'jobId' is set + if (jobId == null) + throw new ApiException(400, "Missing required parameter 'jobId' when calling MergeApi->DeleteJob"); + + var localVarPath = "/template-processor/merge/0.1/jobs/{jobId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteJob", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (MergeJobResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(MergeJobResponse))); + + } + + /// + /// Delete template context Delete a template context with all history + /// + /// Thrown when fails to make API call + /// templateId + /// TemplateContextResponse + public TemplateContextResponse DeleteTemplateContext (string templateId) + { + ApiResponse localVarResponse = DeleteTemplateContextWithHttpInfo(templateId); + return localVarResponse.Data; + } + + /// + /// Delete template context Delete a template context with all history + /// + /// Thrown when fails to make API call + /// templateId + /// ApiResponse of TemplateContextResponse + public ApiResponse< TemplateContextResponse > DeleteTemplateContextWithHttpInfo (string templateId) + { + // verify the required parameter 'templateId' is set + if (templateId == null) + throw new ApiException(400, "Missing required parameter 'templateId' when calling MergeApi->DeleteTemplateContext"); + + var localVarPath = "/template-processor/merge/0.1/templates/{templateId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteTemplateContext", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); + + } + + /// + /// Delete template context Delete a template context with all history + /// + /// Thrown when fails to make API call + /// templateId + /// Task of TemplateContextResponse + public async System.Threading.Tasks.Task DeleteTemplateContextAsync (string templateId) + { + ApiResponse localVarResponse = await DeleteTemplateContextAsyncWithHttpInfo(templateId); + return localVarResponse.Data; + + } + + /// + /// Delete template context Delete a template context with all history + /// + /// Thrown when fails to make API call + /// templateId + /// Task of ApiResponse (TemplateContextResponse) + public async System.Threading.Tasks.Task> DeleteTemplateContextAsyncWithHttpInfo (string templateId) + { + // verify the required parameter 'templateId' is set + if (templateId == null) + throw new ApiException(400, "Missing required parameter 'templateId' when calling MergeApi->DeleteTemplateContext"); + + var localVarPath = "/template-processor/merge/0.1/templates/{templateId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("DeleteTemplateContext", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); + + } + + /// + /// Job definition and state Get the merge job definition and current state. Please not that you can differentiate based on http response status + /// + /// Thrown when fails to make API call + /// jobId + /// MergeJobResponse + public MergeJobResponse GetJob (string jobId) + { + ApiResponse localVarResponse = GetJobWithHttpInfo(jobId); + return localVarResponse.Data; + } + + /// + /// Job definition and state Get the merge job definition and current state. Please not that you can differentiate based on http response status + /// + /// Thrown when fails to make API call + /// jobId + /// ApiResponse of MergeJobResponse + public ApiResponse< MergeJobResponse > GetJobWithHttpInfo (string jobId) + { + // verify the required parameter 'jobId' is set + if (jobId == null) + throw new ApiException(400, "Missing required parameter 'jobId' when calling MergeApi->GetJob"); + + var localVarPath = "/template-processor/merge/0.1/jobs/{jobId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetJob", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (MergeJobResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(MergeJobResponse))); + + } + + /// + /// Job definition and state Get the merge job definition and current state. Please not that you can differentiate based on http response status + /// + /// Thrown when fails to make API call + /// jobId + /// Task of MergeJobResponse + public async System.Threading.Tasks.Task GetJobAsync (string jobId) + { + ApiResponse localVarResponse = await GetJobAsyncWithHttpInfo(jobId); + return localVarResponse.Data; + + } + + /// + /// Job definition and state Get the merge job definition and current state. Please not that you can differentiate based on http response status + /// + /// Thrown when fails to make API call + /// jobId + /// Task of ApiResponse (MergeJobResponse) + public async System.Threading.Tasks.Task> GetJobAsyncWithHttpInfo (string jobId) + { + // verify the required parameter 'jobId' is set + if (jobId == null) + throw new ApiException(400, "Missing required parameter 'jobId' when calling MergeApi->GetJob"); + + var localVarPath = "/template-processor/merge/0.1/jobs/{jobId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetJob", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (MergeJobResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(MergeJobResponse))); + + } + + /// + /// Get all jobs Get all office text job definitions and their current state. + /// + /// Thrown when fails to make API call + /// A list of status to filter on. (optional) + /// List<MergeJobResponse> + public List GetJobs (List status = null) + { + ApiResponse> localVarResponse = GetJobsWithHttpInfo(status); + return localVarResponse.Data; + } + + /// + /// Get all jobs Get all office text job definitions and their current state. + /// + /// Thrown when fails to make API call + /// A list of status to filter on. (optional) + /// ApiResponse of List<MergeJobResponse> + public ApiResponse< List > GetJobsWithHttpInfo (List status = null) + { + + var localVarPath = "/template-processor/merge/0.1/jobs"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (status != null) localVarQueryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetJobs", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + + } + + /// + /// Get all jobs Get all office text job definitions and their current state. + /// + /// Thrown when fails to make API call + /// A list of status to filter on. (optional) + /// Task of List<MergeJobResponse> + public async System.Threading.Tasks.Task> GetJobsAsync (List status = null) + { + ApiResponse> localVarResponse = await GetJobsAsyncWithHttpInfo(status); + return localVarResponse.Data; + + } + + /// + /// Get all jobs Get all office text job definitions and their current state. + /// + /// Thrown when fails to make API call + /// A list of status to filter on. (optional) + /// Task of ApiResponse (List<MergeJobResponse>) + public async System.Threading.Tasks.Task>> GetJobsAsyncWithHttpInfo (List status = null) + { + + var localVarPath = "/template-processor/merge/0.1/jobs"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (status != null) localVarQueryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetJobs", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + + } + + /// + /// Get the result file Get a merge result document as a binary stream. + /// + /// Thrown when fails to make API call + /// jobId + /// streamId + /// outputSettings (optional) + /// byte[] + public byte[] GetResultStreamById (string jobId, string streamId, OutputSettings outputSettings = null) + { + ApiResponse localVarResponse = GetResultStreamByIdWithHttpInfo(jobId, streamId, outputSettings); + return localVarResponse.Data; + } + + /// + /// Get the result file Get a merge result document as a binary stream. + /// + /// Thrown when fails to make API call + /// jobId + /// streamId + /// outputSettings (optional) + /// ApiResponse of byte[] + public ApiResponse< byte[] > GetResultStreamByIdWithHttpInfo (string jobId, string streamId, OutputSettings outputSettings = null) + { + // verify the required parameter 'jobId' is set + if (jobId == null) + throw new ApiException(400, "Missing required parameter 'jobId' when calling MergeApi->GetResultStreamById"); + // verify the required parameter 'streamId' is set + if (streamId == null) + throw new ApiException(400, "Missing required parameter 'streamId' when calling MergeApi->GetResultStreamById"); + + var localVarPath = "/template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/octet-stream" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter + if (streamId != null) localVarPathParams.Add("streamId", Configuration.ApiClient.ParameterToString(streamId)); // path parameter + if (outputSettings != null && outputSettings.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(outputSettings); // http body (model) parameter + } + else + { + localVarPostBody = outputSettings; // byte array + } + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetResultStreamById", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (byte[]) Configuration.ApiClient.Deserialize(localVarResponse, typeof(byte[]))); + + } + + /// + /// Get the result file Get a merge result document as a binary stream. + /// + /// Thrown when fails to make API call + /// jobId + /// streamId + /// outputSettings (optional) + /// Task of byte[] + public async System.Threading.Tasks.Task GetResultStreamByIdAsync (string jobId, string streamId, OutputSettings outputSettings = null) + { + ApiResponse localVarResponse = await GetResultStreamByIdAsyncWithHttpInfo(jobId, streamId, outputSettings); + return localVarResponse.Data; + + } + + /// + /// Get the result file Get a merge result document as a binary stream. + /// + /// Thrown when fails to make API call + /// jobId + /// streamId + /// outputSettings (optional) + /// Task of ApiResponse (byte[]) + public async System.Threading.Tasks.Task> GetResultStreamByIdAsyncWithHttpInfo (string jobId, string streamId, OutputSettings outputSettings = null) + { + // verify the required parameter 'jobId' is set + if (jobId == null) + throw new ApiException(400, "Missing required parameter 'jobId' when calling MergeApi->GetResultStreamById"); + // verify the required parameter 'streamId' is set + if (streamId == null) + throw new ApiException(400, "Missing required parameter 'streamId' when calling MergeApi->GetResultStreamById"); + + var localVarPath = "/template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/octet-stream" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter + if (streamId != null) localVarPathParams.Add("streamId", Configuration.ApiClient.ParameterToString(streamId)); // path parameter + if (outputSettings != null && outputSettings.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(outputSettings); // http body (model) parameter + } + else + { + localVarPostBody = outputSettings; // byte array + } + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetResultStreamById", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (byte[]) Configuration.ApiClient.Deserialize(localVarResponse, typeof(byte[]))); + + } + + /// + /// Get the result file Get all documents inside a compressed container as a binary stream. + /// + /// Thrown when fails to make API call + /// jobId + /// outputSettings (optional) + /// byte[] + public byte[] GetResultStreamsAsContainer (string jobId, OutputSettings outputSettings = null) + { + ApiResponse localVarResponse = GetResultStreamsAsContainerWithHttpInfo(jobId, outputSettings); + return localVarResponse.Data; + } + + /// + /// Get the result file Get all documents inside a compressed container as a binary stream. + /// + /// Thrown when fails to make API call + /// jobId + /// outputSettings (optional) + /// ApiResponse of byte[] + public ApiResponse< byte[] > GetResultStreamsAsContainerWithHttpInfo (string jobId, OutputSettings outputSettings = null) + { + // verify the required parameter 'jobId' is set + if (jobId == null) + throw new ApiException(400, "Missing required parameter 'jobId' when calling MergeApi->GetResultStreamsAsContainer"); + + var localVarPath = "/template-processor/merge/0.1/jobs/{jobId}/result/container"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/octet-stream" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter + if (outputSettings != null && outputSettings.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(outputSettings); // http body (model) parameter + } + else + { + localVarPostBody = outputSettings; // byte array + } + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetResultStreamsAsContainer", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (byte[]) Configuration.ApiClient.Deserialize(localVarResponse, typeof(byte[]))); + + } + + /// + /// Get the result file Get all documents inside a compressed container as a binary stream. + /// + /// Thrown when fails to make API call + /// jobId + /// outputSettings (optional) + /// Task of byte[] + public async System.Threading.Tasks.Task GetResultStreamsAsContainerAsync (string jobId, OutputSettings outputSettings = null) + { + ApiResponse localVarResponse = await GetResultStreamsAsContainerAsyncWithHttpInfo(jobId, outputSettings); + return localVarResponse.Data; + + } + + /// + /// Get the result file Get all documents inside a compressed container as a binary stream. + /// + /// Thrown when fails to make API call + /// jobId + /// outputSettings (optional) + /// Task of ApiResponse (byte[]) + public async System.Threading.Tasks.Task> GetResultStreamsAsContainerAsyncWithHttpInfo (string jobId, OutputSettings outputSettings = null) + { + // verify the required parameter 'jobId' is set + if (jobId == null) + throw new ApiException(400, "Missing required parameter 'jobId' when calling MergeApi->GetResultStreamsAsContainer"); + + var localVarPath = "/template-processor/merge/0.1/jobs/{jobId}/result/container"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/octet-stream" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter + if (outputSettings != null && outputSettings.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(outputSettings); // http body (model) parameter + } + else + { + localVarPostBody = outputSettings; // byte array + } + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetResultStreamsAsContainer", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (byte[]) Configuration.ApiClient.Deserialize(localVarResponse, typeof(byte[]))); + + } + + /// + /// Get template context Get an existing template context + /// + /// Thrown when fails to make API call + /// The template context name unique for your environment + /// TemplateContextResponse + public TemplateContextResponse GetTemplateContext (string templateId) + { + ApiResponse localVarResponse = GetTemplateContextWithHttpInfo(templateId); + return localVarResponse.Data; + } + + /// + /// Get template context Get an existing template context + /// + /// Thrown when fails to make API call + /// The template context name unique for your environment + /// ApiResponse of TemplateContextResponse + public ApiResponse< TemplateContextResponse > GetTemplateContextWithHttpInfo (string templateId) + { + // verify the required parameter 'templateId' is set + if (templateId == null) + throw new ApiException(400, "Missing required parameter 'templateId' when calling MergeApi->GetTemplateContext"); + + var localVarPath = "/template-processor/merge/0.1/templates/{templateId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetTemplateContext", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); + + } + + /// + /// Get template context Get an existing template context + /// + /// Thrown when fails to make API call + /// The template context name unique for your environment + /// Task of TemplateContextResponse + public async System.Threading.Tasks.Task GetTemplateContextAsync (string templateId) + { + ApiResponse localVarResponse = await GetTemplateContextAsyncWithHttpInfo(templateId); + return localVarResponse.Data; + + } + + /// + /// Get template context Get an existing template context + /// + /// Thrown when fails to make API call + /// The template context name unique for your environment + /// Task of ApiResponse (TemplateContextResponse) + public async System.Threading.Tasks.Task> GetTemplateContextAsyncWithHttpInfo (string templateId) + { + // verify the required parameter 'templateId' is set + if (templateId == null) + throw new ApiException(400, "Missing required parameter 'templateId' when calling MergeApi->GetTemplateContext"); + + var localVarPath = "/template-processor/merge/0.1/templates/{templateId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetTemplateContext", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); + + } + + /// + /// Submit merge job for processing Submit merge job run. + /// + /// Thrown when fails to make API call + /// The merge- and output settings + /// MergeJobResponse + public MergeJobResponse SubmitJob (MergeSettings mergesettings) + { + ApiResponse localVarResponse = SubmitJobWithHttpInfo(mergesettings); + return localVarResponse.Data; + } + + /// + /// Submit merge job for processing Submit merge job run. + /// + /// Thrown when fails to make API call + /// The merge- and output settings + /// ApiResponse of MergeJobResponse + public ApiResponse< MergeJobResponse > SubmitJobWithHttpInfo (MergeSettings mergesettings) + { + // verify the required parameter 'mergesettings' is set + if (mergesettings == null) + throw new ApiException(400, "Missing required parameter 'mergesettings' when calling MergeApi->SubmitJob"); + + var localVarPath = "/template-processor/merge/0.1/jobs"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (mergesettings != null && mergesettings.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(mergesettings); // http body (model) parameter + } + else + { + localVarPostBody = mergesettings; // byte array + } + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SubmitJob", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (MergeJobResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(MergeJobResponse))); + + } + + /// + /// Submit merge job for processing Submit merge job run. + /// + /// Thrown when fails to make API call + /// The merge- and output settings + /// Task of MergeJobResponse + public async System.Threading.Tasks.Task SubmitJobAsync (MergeSettings mergesettings) + { + ApiResponse localVarResponse = await SubmitJobAsyncWithHttpInfo(mergesettings); + return localVarResponse.Data; + + } + + /// + /// Submit merge job for processing Submit merge job run. + /// + /// Thrown when fails to make API call + /// The merge- and output settings + /// Task of ApiResponse (MergeJobResponse) + public async System.Threading.Tasks.Task> SubmitJobAsyncWithHttpInfo (MergeSettings mergesettings) + { + // verify the required parameter 'mergesettings' is set + if (mergesettings == null) + throw new ApiException(400, "Missing required parameter 'mergesettings' when calling MergeApi->SubmitJob"); + + var localVarPath = "/template-processor/merge/0.1/jobs"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (mergesettings != null && mergesettings.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(mergesettings); // http body (model) parameter + } + else + { + localVarPostBody = mergesettings; // byte array + } + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("SubmitJob", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (MergeJobResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(MergeJobResponse))); + + } + + /// + /// Update template context Update an existing template context for your environment + /// + /// Thrown when fails to make API call + /// templateContextRequest + /// TemplateContextResponse + public TemplateContextResponse UpdateTemplateContext (TemplateContextRequest templateContextRequest) + { + ApiResponse localVarResponse = UpdateTemplateContextWithHttpInfo(templateContextRequest); + return localVarResponse.Data; + } + + /// + /// Update template context Update an existing template context for your environment + /// + /// Thrown when fails to make API call + /// templateContextRequest + /// ApiResponse of TemplateContextResponse + public ApiResponse< TemplateContextResponse > UpdateTemplateContextWithHttpInfo (TemplateContextRequest templateContextRequest) + { + // verify the required parameter 'templateContextRequest' is set + if (templateContextRequest == null) + throw new ApiException(400, "Missing required parameter 'templateContextRequest' when calling MergeApi->UpdateTemplateContext"); + + var localVarPath = "/template-processor/merge/0.1/templates"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (templateContextRequest != null && templateContextRequest.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(templateContextRequest); // http body (model) parameter + } + else + { + localVarPostBody = templateContextRequest; // byte array + } + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateTemplateContext", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); + + } + + /// + /// Update template context Update an existing template context for your environment + /// + /// Thrown when fails to make API call + /// templateContextRequest + /// Task of TemplateContextResponse + public async System.Threading.Tasks.Task UpdateTemplateContextAsync (TemplateContextRequest templateContextRequest) + { + ApiResponse localVarResponse = await UpdateTemplateContextAsyncWithHttpInfo(templateContextRequest); + return localVarResponse.Data; + + } + + /// + /// Update template context Update an existing template context for your environment + /// + /// Thrown when fails to make API call + /// templateContextRequest + /// Task of ApiResponse (TemplateContextResponse) + public async System.Threading.Tasks.Task> UpdateTemplateContextAsyncWithHttpInfo (TemplateContextRequest templateContextRequest) + { + // verify the required parameter 'templateContextRequest' is set + if (templateContextRequest == null) + throw new ApiException(400, "Missing required parameter 'templateContextRequest' when calling MergeApi->UpdateTemplateContext"); + + var localVarPath = "/template-processor/merge/0.1/templates"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (templateContextRequest != null && templateContextRequest.GetType() != typeof(byte[])) + { + localVarPostBody = Configuration.ApiClient.Serialize(templateContextRequest); // http body (model) parameter + } + else + { + localVarPostBody = templateContextRequest; // byte array + } + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UpdateTemplateContext", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); + + } + + /// + /// Upload template file Upload the Office template file + /// + /// Thrown when fails to make API call + /// The template context name unique for your environment + /// The template (file/inputstream) to store + /// TemplateContextResponse + public TemplateContextResponse UploadTemplateFile (string templateId, System.IO.Stream stream) + { + ApiResponse localVarResponse = UploadTemplateFileWithHttpInfo(templateId, stream); + return localVarResponse.Data; + } + + /// + /// Upload template file Upload the Office template file + /// + /// Thrown when fails to make API call + /// The template context name unique for your environment + /// The template (file/inputstream) to store + /// ApiResponse of TemplateContextResponse + public ApiResponse< TemplateContextResponse > UploadTemplateFileWithHttpInfo (string templateId, System.IO.Stream stream) + { + // verify the required parameter 'templateId' is set + if (templateId == null) + throw new ApiException(400, "Missing required parameter 'templateId' when calling MergeApi->UploadTemplateFile"); + // verify the required parameter 'stream' is set + if (stream == null) + throw new ApiException(400, "Missing required parameter 'stream' when calling MergeApi->UploadTemplateFile"); + + var localVarPath = "/template-processor/merge/0.1/templates/{templateId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "multipart/form-data" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter + if (stream != null) localVarFileParams.Add("stream", Configuration.ApiClient.ParameterToFile("stream", stream)); + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UploadTemplateFile", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); + + } + + /// + /// Upload template file Upload the Office template file + /// + /// Thrown when fails to make API call + /// The template context name unique for your environment + /// The template (file/inputstream) to store + /// Task of TemplateContextResponse + public async System.Threading.Tasks.Task UploadTemplateFileAsync (string templateId, System.IO.Stream stream) + { + ApiResponse localVarResponse = await UploadTemplateFileAsyncWithHttpInfo(templateId, stream); + return localVarResponse.Data; + + } + + /// + /// Upload template file Upload the Office template file + /// + /// Thrown when fails to make API call + /// The template context name unique for your environment + /// The template (file/inputstream) to store + /// Task of ApiResponse (TemplateContextResponse) + public async System.Threading.Tasks.Task> UploadTemplateFileAsyncWithHttpInfo (string templateId, System.IO.Stream stream) + { + // verify the required parameter 'templateId' is set + if (templateId == null) + throw new ApiException(400, "Missing required parameter 'templateId' when calling MergeApi->UploadTemplateFile"); + // verify the required parameter 'stream' is set + if (stream == null) + throw new ApiException(400, "Missing required parameter 'stream' when calling MergeApi->UploadTemplateFile"); + + var localVarPath = "/template-processor/merge/0.1/templates/{templateId}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new Dictionary(); + var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "multipart/form-data" + }; + String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json;charset=UTF-8" + }; + String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + localVarPathParams.Add("format", "json"); + if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter + if (stream != null) localVarFileParams.Add("stream", Configuration.ApiClient.ParameterToFile("stream", stream)); + + // authentication (oauth2schema) required + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("UploadTemplateFile", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); + + } + + } +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ApiClient.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ApiClient.cs new file mode 100644 index 0000000..8b6224d --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ApiClient.cs @@ -0,0 +1,494 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Text.RegularExpressions; +using System.IO; +using System.Web; +using System.Linq; +using System.Net; +using System.Text; +using Newtonsoft.Json; +using RestSharp; + +namespace Sphereon.SDK.TemplateProcessor.Client +{ + /// + /// API client is mainly responsible for making the HTTP call to the API backend. + /// + public partial class ApiClient + { + private JsonSerializerSettings serializerSettings = new JsonSerializerSettings + { + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor + }; + + /// + /// Allows for extending request processing for generated code. + /// + /// The RestSharp request object + partial void InterceptRequest(IRestRequest request); + + /// + /// Allows for extending response processing for generated code. + /// + /// The RestSharp request object + /// The RestSharp response object + partial void InterceptResponse(IRestRequest request, IRestResponse response); + + /// + /// Initializes a new instance of the class + /// with default configuration and base path (https://gw.api.cloud.sphereon.com/). + /// + public ApiClient() + { + Configuration = Configuration.Default; + RestClient = new RestClient("https://gw.api.cloud.sphereon.com/"); + } + + /// + /// Initializes a new instance of the class + /// with default base path (https://gw.api.cloud.sphereon.com/). + /// + /// An instance of Configuration. + public ApiClient(Configuration config = null) + { + if (config == null) + Configuration = Configuration.Default; + else + Configuration = config; + + RestClient = new RestClient("https://gw.api.cloud.sphereon.com/"); + } + + /// + /// Initializes a new instance of the class + /// with default configuration. + /// + /// The base path. + public ApiClient(String basePath = "https://gw.api.cloud.sphereon.com/") + { + if (String.IsNullOrEmpty(basePath)) + throw new ArgumentException("basePath cannot be empty"); + + RestClient = new RestClient(basePath); + Configuration = Configuration.Default; + } + + /// + /// Gets or sets the default API client for making HTTP calls. + /// + /// The default API client. + [Obsolete("ApiClient.Default is deprecated, please use 'Configuration.Default.ApiClient' instead.")] + public static ApiClient Default; + + /// + /// Gets or sets the Configuration. + /// + /// An instance of the Configuration. + public Configuration Configuration { get; set; } + + /// + /// Gets or sets the RestClient. + /// + /// An instance of the RestClient + public RestClient RestClient { get; set; } + + // Creates and sets up a RestRequest prior to a call. + private RestRequest PrepareRequest( + String path, RestSharp.Method method, Dictionary queryParams, Object postBody, + Dictionary headerParams, Dictionary formParams, + Dictionary fileParams, Dictionary pathParams, + String contentType) + { + var request = new RestRequest(path, method); + + // add path parameter, if any + foreach(var param in pathParams) + request.AddParameter(param.Key, param.Value, ParameterType.UrlSegment); + + // add header parameter, if any + foreach(var param in headerParams) + request.AddHeader(param.Key, param.Value); + + // add query parameter, if any + foreach(var param in queryParams) + request.AddQueryParameter(param.Key, param.Value); + + // add form parameter, if any + foreach(var param in formParams) + request.AddParameter(param.Key, param.Value); + + // add file parameter, if any + foreach(var param in fileParams) + { + request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentType); + } + + if (postBody != null) // http body (model or byte[]) parameter + { + if (postBody.GetType() == typeof(String)) + { + request.AddParameter("application/json", postBody, ParameterType.RequestBody); + } + else if (postBody.GetType() == typeof(byte[])) + { + request.AddParameter(contentType, postBody, ParameterType.RequestBody); + } + } + + return request; + } + + /// + /// Makes the HTTP request (Sync). + /// + /// URL path. + /// HTTP method. + /// Query parameters. + /// HTTP body (POST request). + /// Header parameters. + /// Form parameters. + /// File parameters. + /// Path parameters. + /// Content Type of the request + /// Object + public Object CallApi( + String path, RestSharp.Method method, Dictionary queryParams, Object postBody, + Dictionary headerParams, Dictionary formParams, + Dictionary fileParams, Dictionary pathParams, + String contentType) + { + var request = PrepareRequest( + path, method, queryParams, postBody, headerParams, formParams, fileParams, + pathParams, contentType); + + // set timeout + RestClient.Timeout = Configuration.Timeout; + // set user agent + RestClient.UserAgent = Configuration.UserAgent; + + InterceptRequest(request); + var response = RestClient.Execute(request); + InterceptResponse(request, response); + + return (Object) response; + } + /// + /// Makes the asynchronous HTTP request. + /// + /// URL path. + /// HTTP method. + /// Query parameters. + /// HTTP body (POST request). + /// Header parameters. + /// Form parameters. + /// File parameters. + /// Path parameters. + /// Content type. + /// The Task instance. + public async System.Threading.Tasks.Task CallApiAsync( + String path, RestSharp.Method method, Dictionary queryParams, Object postBody, + Dictionary headerParams, Dictionary formParams, + Dictionary fileParams, Dictionary pathParams, + String contentType) + { + var request = PrepareRequest( + path, method, queryParams, postBody, headerParams, formParams, fileParams, + pathParams, contentType); + InterceptRequest(request); + var response = await RestClient.ExecuteTaskAsync(request); + InterceptResponse(request, response); + return (Object)response; + } + + /// + /// Escape string (url-encoded). + /// + /// String to be escaped. + /// Escaped string. + public string EscapeString(string str) + { + return UrlEncode(str); + } + + /// + /// Create FileParameter based on Stream. + /// + /// Parameter name. + /// Input stream. + /// FileParameter. + public FileParameter ParameterToFile(string name, Stream stream) + { + if (stream is FileStream) + return FileParameter.Create(name, ReadAsBytes(stream), Path.GetFileName(((FileStream)stream).Name)); + else + return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided"); + } + + /// + /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. + /// If parameter is a list, join the list with ",". + /// Otherwise just return the string. + /// + /// The parameter (header, path, query, form). + /// Formatted string. + public string ParameterToString(object obj) + { + if (obj is DateTime) + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15T13:45:30.0000000 + return ((DateTime)obj).ToString (Configuration.DateTimeFormat); + else if (obj is DateTimeOffset) + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15T13:45:30.0000000 + return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); + else if (obj is IList) + { + var flattenedString = new StringBuilder(); + foreach (var param in (IList)obj) + { + if (flattenedString.Length > 0) + flattenedString.Append(","); + flattenedString.Append(param); + } + return flattenedString.ToString(); + } + else + return Convert.ToString (obj); + } + + /// + /// Deserialize the JSON string into a proper object. + /// + /// The HTTP response. + /// Object type. + /// Object representation of the JSON string. + public object Deserialize(IRestResponse response, Type type) + { + IList headers = response.Headers; + if (type == typeof(byte[])) // return byte array + { + return response.RawBytes; + } + + if (type == typeof(Stream)) + { + if (headers != null) + { + var filePath = String.IsNullOrEmpty(Configuration.TempFolderPath) + ? Path.GetTempPath() + : Configuration.TempFolderPath; + var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); + foreach (var header in headers) + { + var match = regex.Match(header.ToString()); + if (match.Success) + { + string fileName = filePath + SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); + File.WriteAllBytes(fileName, response.RawBytes); + return new FileStream(fileName, FileMode.Open); + } + } + } + var stream = new MemoryStream(response.RawBytes); + return stream; + } + + if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object + { + return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); + } + + if (type == typeof(String) || type.Name.StartsWith("System.Nullable")) // return primitive type + { + return ConvertType(response.Content, type); + } + + // at this point, it must be a model (json) + try + { + return JsonConvert.DeserializeObject(response.Content, type, serializerSettings); + } + catch (Exception e) + { + throw new ApiException(500, e.Message); + } + } + + /// + /// Serialize an input (model) into JSON string + /// + /// Object. + /// JSON string. + public String Serialize(object obj) + { + try + { + return obj != null ? JsonConvert.SerializeObject(obj) : null; + } + catch (Exception e) + { + throw new ApiException(500, e.Message); + } + } + + /// + /// Select the Content-Type header's value from the given content-type array: + /// if JSON exists in the given array, use it; + /// otherwise use the first one defined in 'consumes' + /// + /// The Content-Type array to select from. + /// The Content-Type header to use. + public String SelectHeaderContentType(String[] contentTypes) + { + if (contentTypes.Length == 0) + return null; + + if (contentTypes.Contains("application/json", StringComparer.OrdinalIgnoreCase)) + return "application/json"; + + return contentTypes[0]; // use the first content type specified in 'consumes' + } + + /// + /// Select the Accept header's value from the given accepts array: + /// if JSON exists in the given array, use it; + /// otherwise use all of them (joining into a string) + /// + /// The accepts array to select from. + /// The Accept header to use. + public String SelectHeaderAccept(String[] accepts) + { + if (accepts.Length == 0) + return null; + + if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) + return "application/json"; + + return String.Join(",", accepts); + } + + /// + /// Encode string in base64 format. + /// + /// String to be encoded. + /// Encoded string. + public static string Base64Encode(string text) + { + return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); + } + + /// + /// Dynamically cast the object into target type. + /// Ref: http://stackoverflow.com/questions/4925718/c-dynamic-runtime-cast + /// + /// Object to be casted + /// Target type + /// Casted object + public static dynamic ConvertType(dynamic source, Type dest) + { + return Convert.ChangeType(source, dest); + } + + /// + /// Convert stream to byte array + /// Credit/Ref: http://stackoverflow.com/a/221941/677735 + /// + /// Input stream to be converted + /// Byte array + public static byte[] ReadAsBytes(Stream input) + { + byte[] buffer = new byte[16*1024]; + using (MemoryStream ms = new MemoryStream()) + { + int read; + while ((read = input.Read(buffer, 0, buffer.Length)) > 0) + { + ms.Write(buffer, 0, read); + } + return ms.ToArray(); + } + } + + /// + /// URL encode a string + /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 + /// + /// String to be URL encoded + /// Byte array + public static string UrlEncode(string input) + { + const int maxLength = 32766; + + if (input == null) + { + throw new ArgumentNullException("input"); + } + + if (input.Length <= maxLength) + { + return Uri.EscapeDataString(input); + } + + StringBuilder sb = new StringBuilder(input.Length * 2); + int index = 0; + + while (index < input.Length) + { + int length = Math.Min(input.Length - index, maxLength); + string subString = input.Substring(index, length); + + sb.Append(Uri.EscapeDataString(subString)); + index += subString.Length; + } + + return sb.ToString(); + } + + /// + /// Sanitize filename by removing the path + /// + /// Filename + /// Filename + public static string SanitizeFilename(string filename) + { + Match match = Regex.Match(filename, @".*[/\\](.*)$"); + + if (match.Success) + { + return match.Groups[1].Value; + } + else + { + return filename; + } + } + } +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ApiException.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ApiException.cs new file mode 100644 index 0000000..870e829 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ApiException.cs @@ -0,0 +1,72 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; + +namespace Sphereon.SDK.TemplateProcessor.Client +{ + /// + /// API Exception + /// + public class ApiException : Exception + { + /// + /// Gets or sets the error code (HTTP status code) + /// + /// The error code (HTTP status code). + public int ErrorCode { get; set; } + + /// + /// Gets or sets the error content (body json object) + /// + /// The error content (Http response body). + public dynamic ErrorContent { get; private set; } + + /// + /// Initializes a new instance of the class. + /// + public ApiException() {} + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// Error message. + public ApiException(int errorCode, string message) : base(message) + { + this.ErrorCode = errorCode; + } + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// Error message. + /// Error content. + public ApiException(int errorCode, string message, dynamic errorContent = null) : base(message) + { + this.ErrorCode = errorCode; + this.ErrorContent = errorContent; + } + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ApiResponse.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ApiResponse.cs new file mode 100644 index 0000000..226d483 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ApiResponse.cs @@ -0,0 +1,66 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Collections.Generic; + +namespace Sphereon.SDK.TemplateProcessor.Client +{ + /// + /// API Response + /// + public class ApiResponse + { + /// + /// Gets or sets the status code (HTTP status code) + /// + /// The status code. + public int StatusCode { get; private set; } + + /// + /// Gets or sets the HTTP headers + /// + /// HTTP headers + public IDictionary Headers { get; private set; } + + /// + /// Gets or sets the data (parsed HTTP body) + /// + /// The data. + public T Data { get; private set; } + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// HTTP headers. + /// Data (parsed HTTP body) + public ApiResponse(int statusCode, IDictionary headers, T data) + { + this.StatusCode= statusCode; + this.Headers = headers; + this.Data = data; + } + + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/Configuration.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/Configuration.cs new file mode 100644 index 0000000..26500f5 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/Configuration.cs @@ -0,0 +1,338 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Reflection; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; + +namespace Sphereon.SDK.TemplateProcessor.Client +{ + /// + /// Represents a set of configuration settings + /// + public class Configuration + { + /// + /// Initializes a new instance of the Configuration class with different settings + /// + /// Api client + /// Dictionary of default HTTP header + /// Username + /// Password + /// accessToken + /// Dictionary of API key + /// Dictionary of API key prefix + /// Temp folder path + /// DateTime format string + /// HTTP connection timeout (in milliseconds) + /// HTTP user agent + public Configuration(ApiClient apiClient = null, + Dictionary defaultHeader = null, + string username = null, + string password = null, + string accessToken = null, + Dictionary apiKey = null, + Dictionary apiKeyPrefix = null, + string tempFolderPath = null, + string dateTimeFormat = null, + int timeout = 100000, + string userAgent = "Swagger-Codegen/1.0.0/csharp" + ) + { + setApiClientUsingDefault(apiClient); + + Username = username; + Password = password; + AccessToken = accessToken; + UserAgent = userAgent; + + if (defaultHeader != null) + DefaultHeader = defaultHeader; + if (apiKey != null) + ApiKey = apiKey; + if (apiKeyPrefix != null) + ApiKeyPrefix = apiKeyPrefix; + + TempFolderPath = tempFolderPath; + DateTimeFormat = dateTimeFormat; + Timeout = timeout; + } + + /// + /// Initializes a new instance of the Configuration class. + /// + /// Api client. + public Configuration(ApiClient apiClient) + { + setApiClientUsingDefault(apiClient); + } + + /// + /// Version of the package. + /// + /// Version of the package. + public const string Version = "1.0.0"; + + /// + /// Gets or sets the default Configuration. + /// + /// Configuration. + public static Configuration Default = new Configuration(); + + /// + /// Default creation of exceptions for a given method name and response object + /// + public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) => + { + int status = (int) response.StatusCode; + if (status >= 400) return new ApiException(status, String.Format("Error calling {0}: {1}", methodName, response.Content), response.Content); + if (status == 0) return new ApiException(status, String.Format("Error calling {0}: {1}", methodName, response.ErrorMessage), response.ErrorMessage); + return null; + }; + + /// + /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. + /// + /// Timeout. + public int Timeout + { + get { return ApiClient.RestClient.Timeout; } + + set + { + if (ApiClient != null) + ApiClient.RestClient.Timeout = value; + } + } + + /// + /// Gets or sets the default API client for making HTTP calls. + /// + /// The API client. + public ApiClient ApiClient; + + /// + /// Set the ApiClient using Default or ApiClient instance. + /// + /// An instance of ApiClient. + /// + public void setApiClientUsingDefault (ApiClient apiClient = null) + { + if (apiClient == null) + { + if (Default != null && Default.ApiClient == null) + Default.ApiClient = new ApiClient(); + + ApiClient = Default != null ? Default.ApiClient : new ApiClient(); + } + else + { + if (Default != null && Default.ApiClient == null) + Default.ApiClient = apiClient; + + ApiClient = apiClient; + } + } + + private Dictionary _defaultHeaderMap = new Dictionary(); + + /// + /// Gets or sets the default header. + /// + public Dictionary DefaultHeader + { + get { return _defaultHeaderMap; } + + set + { + _defaultHeaderMap = value; + } + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + public void AddDefaultHeader(string key, string value) + { + _defaultHeaderMap[key] = value; + } + + /// + /// Add Api Key Header. + /// + /// Api Key name. + /// Api Key value. + /// + public void AddApiKey(string key, string value) + { + ApiKey[key] = value; + } + + /// + /// Sets the API key prefix. + /// + /// Api Key name. + /// Api Key value. + public void AddApiKeyPrefix(string key, string value) + { + ApiKeyPrefix[key] = value; + } + + /// + /// Gets or sets the HTTP user agent. + /// + /// Http user agent. + public String UserAgent { get; set; } + + /// + /// Gets or sets the username (HTTP basic authentication). + /// + /// The username. + public String Username { get; set; } + + /// + /// Gets or sets the password (HTTP basic authentication). + /// + /// The password. + public String Password { get; set; } + + /// + /// Gets or sets the access token for OAuth2 authentication. + /// + /// The access token. + public String AccessToken { get; set; } + + /// + /// Gets or sets the API key based on the authentication name. + /// + /// The API key. + public Dictionary ApiKey = new Dictionary(); + + /// + /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. + /// + /// The prefix of the API key. + public Dictionary ApiKeyPrefix = new Dictionary(); + + /// + /// Get the API key with prefix. + /// + /// API key identifier (authentication scheme). + /// API key with prefix. + public string GetApiKeyWithPrefix (string apiKeyIdentifier) + { + var apiKeyValue = ""; + ApiKey.TryGetValue (apiKeyIdentifier, out apiKeyValue); + var apiKeyPrefix = ""; + if (ApiKeyPrefix.TryGetValue (apiKeyIdentifier, out apiKeyPrefix)) + return apiKeyPrefix + " " + apiKeyValue; + else + return apiKeyValue; + } + + private string _tempFolderPath = Path.GetTempPath(); + + /// + /// Gets or sets the temporary folder path to store the files downloaded from the server. + /// + /// Folder path. + public String TempFolderPath + { + get { return _tempFolderPath; } + + set + { + if (String.IsNullOrEmpty(value)) + { + _tempFolderPath = value; + return; + } + + // create the directory if it does not exist + if (!Directory.Exists(value)) + Directory.CreateDirectory(value); + + // check if the path contains directory separator at the end + if (value[value.Length - 1] == Path.DirectorySeparatorChar) + _tempFolderPath = value; + else + _tempFolderPath = value + Path.DirectorySeparatorChar; + } + } + + private const string ISO8601_DATETIME_FORMAT = "o"; + + private string _dateTimeFormat = ISO8601_DATETIME_FORMAT; + + /// + /// Gets or sets the the date time format used when serializing in the ApiClient + /// By default, it's set to ISO 8601 - "o", for others see: + /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx + /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx + /// No validation is done to ensure that the string you're providing is valid + /// + /// The DateTimeFormat string + public String DateTimeFormat + { + get + { + return _dateTimeFormat; + } + set + { + if (string.IsNullOrEmpty(value)) + { + // Never allow a blank or null string, go back to the default + _dateTimeFormat = ISO8601_DATETIME_FORMAT; + return; + } + + // Caution, no validation when you choose date time format other than ISO 8601 + // Take a look at the above links + _dateTimeFormat = value; + } + } + + /// + /// Returns a string with essential information for debugging. + /// + public static String ToDebugReport() + { + String report = "C# SDK (Sphereon.SDK.TemplateProcessor) Debug Report:\n"; + report += " OS: " + Environment.OSVersion + "\n"; + report += " .NET Framework Version: " + Assembly + .GetExecutingAssembly() + .GetReferencedAssemblies() + .Where(x => x.Name == "System.Core").First().Version.ToString() + "\n"; + report += " Version of the API: 0.1\n"; + report += " SDK Package Version: 1.0.0\n"; + + return report; + } + } +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ExceptionFactory.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ExceptionFactory.cs new file mode 100644 index 0000000..2cec3aa --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ExceptionFactory.cs @@ -0,0 +1,36 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using System; +using RestSharp; + +namespace Sphereon.SDK.TemplateProcessor.Client +{ + /// + /// A delegate to ExceptionFactory method + /// + /// Method name + /// Response + /// Exceptions + public delegate Exception ExceptionFactory(string methodName, IRestResponse response); +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/IApiAccessor.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/IApiAccessor.cs new file mode 100644 index 0000000..9cba70a --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/IApiAccessor.cs @@ -0,0 +1,54 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; + +namespace Sphereon.SDK.TemplateProcessor.Client +{ + /// + /// Represents configuration aspects required to interact with the API endpoints. + /// + public interface IApiAccessor + { + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + Configuration Configuration {get; set;} + + /// + /// Gets the base path of the API client. + /// + /// The base path + String GetBasePath(); + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + ExceptionFactory ExceptionFactory { get; set; } + } +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/DataSetResponse.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/DataSetResponse.cs new file mode 100644 index 0000000..a3a94a9 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/DataSetResponse.cs @@ -0,0 +1,209 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// The merge template response. + /// + [DataContract] + public partial class DataSetResponse : IEquatable + { + /// + /// The status of the template + /// + /// The status of the template + [JsonConverter(typeof(StringEnumConverter))] + public enum StatusEnum + { + + /// + /// Enum CREATED for "CREATED" + /// + [EnumMember(Value = "CREATED")] + CREATED, + + /// + /// Enum UPDATED for "UPDATED" + /// + [EnumMember(Value = "UPDATED")] + UPDATED, + + /// + /// Enum DELETED for "DELETED" + /// + [EnumMember(Value = "DELETED")] + DELETED + } + + /// + /// The status of the template + /// + /// The status of the template + [DataMember(Name="status", EmitDefaultValue=false)] + public StatusEnum? Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DataSetResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// Unique dataset id (required). + public DataSetResponse(string Id = null) + { + // to ensure "Id" is required (not null) + if (Id == null) + { + throw new InvalidDataException("Id is a required property for DataSetResponse and cannot be null"); + } + else + { + this.Id = Id; + } + } + + /// + /// The completion date/time of this template in ISO 8601 format + /// + /// The completion date/time of this template in ISO 8601 format + [DataMember(Name="completionTime", EmitDefaultValue=false)] + public DateTime? CompletionTime { get; private set; } + /// + /// The creation date/time of this template in ISO 8601 format + /// + /// The creation date/time of this template in ISO 8601 format + [DataMember(Name="creationTime", EmitDefaultValue=false)] + public DateTime? CreationTime { get; private set; } + /// + /// Unique dataset id + /// + /// Unique dataset id + [DataMember(Name="id", EmitDefaultValue=false)] + public string Id { get; set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DataSetResponse {\n"); + sb.Append(" CompletionTime: ").Append(CompletionTime).Append("\n"); + sb.Append(" CreationTime: ").Append(CreationTime).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as DataSetResponse); + } + + /// + /// Returns true if DataSetResponse instances are equal + /// + /// Instance of DataSetResponse to be compared + /// Boolean + public bool Equals(DataSetResponse other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.CompletionTime == other.CompletionTime || + this.CompletionTime != null && + this.CompletionTime.Equals(other.CompletionTime) + ) && + ( + this.CreationTime == other.CreationTime || + this.CreationTime != null && + this.CreationTime.Equals(other.CreationTime) + ) && + ( + this.Id == other.Id || + this.Id != null && + this.Id.Equals(other.Id) + ) && + ( + this.Status == other.Status || + this.Status != null && + this.Status.Equals(other.Status) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.CompletionTime != null) + hash = hash * 59 + this.CompletionTime.GetHashCode(); + if (this.CreationTime != null) + hash = hash * 59 + this.CreationTime.GetHashCode(); + if (this.Id != null) + hash = hash * 59 + this.Id.GetHashCode(); + if (this.Status != null) + hash = hash * 59 + this.Status.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/Error.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/Error.cs new file mode 100644 index 0000000..d7fc44c --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/Error.cs @@ -0,0 +1,226 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// An error + /// + [DataContract] + public partial class Error : IEquatable + { + /// + /// Gets or Sets Level + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum LevelEnum + { + + /// + /// Enum INFO for "INFO" + /// + [EnumMember(Value = "INFO")] + INFO, + + /// + /// Enum WARNING for "WARNING" + /// + [EnumMember(Value = "WARNING")] + WARNING, + + /// + /// Enum FATAL for "FATAL" + /// + [EnumMember(Value = "FATAL")] + FATAL + } + + /// + /// Gets or Sets Level + /// + [DataMember(Name="level", EmitDefaultValue=false)] + public LevelEnum? Level { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Error() { } + /// + /// Initializes a new instance of the class. + /// + /// Code (required). + /// Level (required). + /// Cause. + /// Message (required). + public Error(string Code = null, LevelEnum? Level = null, Error Cause = null, string Message = null) + { + // to ensure "Code" is required (not null) + if (Code == null) + { + throw new InvalidDataException("Code is a required property for Error and cannot be null"); + } + else + { + this.Code = Code; + } + // to ensure "Level" is required (not null) + if (Level == null) + { + throw new InvalidDataException("Level is a required property for Error and cannot be null"); + } + else + { + this.Level = Level; + } + // to ensure "Message" is required (not null) + if (Message == null) + { + throw new InvalidDataException("Message is a required property for Error and cannot be null"); + } + else + { + this.Message = Message; + } + this.Cause = Cause; + } + + /// + /// Gets or Sets Code + /// + [DataMember(Name="code", EmitDefaultValue=false)] + public string Code { get; set; } + /// + /// Gets or Sets Cause + /// + [DataMember(Name="cause", EmitDefaultValue=false)] + public Error Cause { get; set; } + /// + /// Gets or Sets Message + /// + [DataMember(Name="message", EmitDefaultValue=false)] + public string Message { get; set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Error {\n"); + sb.Append(" Code: ").Append(Code).Append("\n"); + sb.Append(" Level: ").Append(Level).Append("\n"); + sb.Append(" Cause: ").Append(Cause).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as Error); + } + + /// + /// Returns true if Error instances are equal + /// + /// Instance of Error to be compared + /// Boolean + public bool Equals(Error other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.Code == other.Code || + this.Code != null && + this.Code.Equals(other.Code) + ) && + ( + this.Level == other.Level || + this.Level != null && + this.Level.Equals(other.Level) + ) && + ( + this.Cause == other.Cause || + this.Cause != null && + this.Cause.Equals(other.Cause) + ) && + ( + this.Message == other.Message || + this.Message != null && + this.Message.Equals(other.Message) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.Code != null) + hash = hash * 59 + this.Code.GetHashCode(); + if (this.Level != null) + hash = hash * 59 + this.Level.GetHashCode(); + if (this.Cause != null) + hash = hash * 59 + this.Cause.GetHashCode(); + if (this.Message != null) + hash = hash * 59 + this.Message.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/ErrorResponse.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/ErrorResponse.cs new file mode 100644 index 0000000..784d4e2 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/ErrorResponse.cs @@ -0,0 +1,126 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// The error response + /// + [DataContract] + public partial class ErrorResponse : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// Errors. + public ErrorResponse(List Errors = null) + { + this.Errors = Errors; + } + + /// + /// Gets or Sets Errors + /// + [DataMember(Name="errors", EmitDefaultValue=false)] + public List Errors { get; set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ErrorResponse {\n"); + sb.Append(" Errors: ").Append(Errors).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as ErrorResponse); + } + + /// + /// Returns true if ErrorResponse instances are equal + /// + /// Instance of ErrorResponse to be compared + /// Boolean + public bool Equals(ErrorResponse other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.Errors == other.Errors || + this.Errors != null && + this.Errors.SequenceEqual(other.Errors) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.Errors != null) + hash = hash * 59 + this.Errors.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/Lifecycle.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/Lifecycle.cs new file mode 100644 index 0000000..8ff4348 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/Lifecycle.cs @@ -0,0 +1,191 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// Lifecycle settings. When no lifecycle settings are supplied, the job and files will be deleted directly after retrieval of the file + /// + [DataContract] + public partial class Lifecycle : IEquatable + { + /// + /// Gets or Sets Action + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum ActionEnum + { + + /// + /// Enum DELETE for "DELETE" + /// + [EnumMember(Value = "DELETE")] + DELETE + } + + /// + /// Gets or Sets Type + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum TypeEnum + { + + /// + /// Enum RETRIEVAL for "RETRIEVAL" + /// + [EnumMember(Value = "RETRIEVAL")] + RETRIEVAL, + + /// + /// Enum TIME for "TIME" + /// + [EnumMember(Value = "TIME")] + TIME + } + + /// + /// Gets or Sets Action + /// + [DataMember(Name="action", EmitDefaultValue=false)] + public ActionEnum? Action { get; set; } + /// + /// Gets or Sets Type + /// + [DataMember(Name="type", EmitDefaultValue=false)] + public TypeEnum? Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation. + /// Action. + /// Type. + public Lifecycle(DateTime? ActionTime = null, ActionEnum? Action = null, TypeEnum? Type = null) + { + this.ActionTime = ActionTime; + this.Action = Action; + this.Type = Type; + } + + /// + /// The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation + /// + /// The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation + [DataMember(Name="actionTime", EmitDefaultValue=false)] + public DateTime? ActionTime { get; set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Lifecycle {\n"); + sb.Append(" ActionTime: ").Append(ActionTime).Append("\n"); + sb.Append(" Action: ").Append(Action).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as Lifecycle); + } + + /// + /// Returns true if Lifecycle instances are equal + /// + /// Instance of Lifecycle to be compared + /// Boolean + public bool Equals(Lifecycle other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.ActionTime == other.ActionTime || + this.ActionTime != null && + this.ActionTime.Equals(other.ActionTime) + ) && + ( + this.Action == other.Action || + this.Action != null && + this.Action.Equals(other.Action) + ) && + ( + this.Type == other.Type || + this.Type != null && + this.Type.Equals(other.Type) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.ActionTime != null) + hash = hash * 59 + this.ActionTime.GetHashCode(); + if (this.Action != null) + hash = hash * 59 + this.Action.GetHashCode(); + if (this.Type != null) + hash = hash * 59 + this.Type.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/MergeJob.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/MergeJob.cs new file mode 100644 index 0000000..d1a6849 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/MergeJob.cs @@ -0,0 +1,344 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// The merge job. Has access to the job merge data. + /// + [DataContract] + public partial class MergeJob : IEquatable + { + /// + /// The status of the job + /// + /// The status of the job + [JsonConverter(typeof(StringEnumConverter))] + public enum StatusEnum + { + + /// + /// Enum CREATED for "CREATED" + /// + [EnumMember(Value = "CREATED")] + CREATED, + + /// + /// Enum UPDATED for "UPDATED" + /// + [EnumMember(Value = "UPDATED")] + UPDATED, + + /// + /// Enum PROCESSING for "PROCESSING" + /// + [EnumMember(Value = "PROCESSING")] + PROCESSING, + + /// + /// Enum DONE for "DONE" + /// + [EnumMember(Value = "DONE")] + DONE, + + /// + /// Enum ERROR for "ERROR" + /// + [EnumMember(Value = "ERROR")] + ERROR, + + /// + /// Enum DELETED for "DELETED" + /// + [EnumMember(Value = "DELETED")] + DELETED + } + + /// + /// The status of the job + /// + /// The status of the job + [DataMember(Name="status", EmitDefaultValue=false)] + public StatusEnum? Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected MergeJob() { } + /// + /// Initializes a new instance of the class. + /// + /// The target folder path of result files. + /// The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation (required). + /// The target container id of result files. + /// Data set id. + /// The storage locations of the result files. (required). + /// Header data set ids. + /// MergeSettings. + public MergeJob(string ResultFolderPath = null, string JobId = null, string ResultContainerId = null, string DataSetId = null, List ResultStreams = null, List HeaderDataSetIds = null, MergeSettings MergeSettings = null) + { + // to ensure "JobId" is required (not null) + if (JobId == null) + { + throw new InvalidDataException("JobId is a required property for MergeJob and cannot be null"); + } + else + { + this.JobId = JobId; + } + // to ensure "ResultStreams" is required (not null) + if (ResultStreams == null) + { + throw new InvalidDataException("ResultStreams is a required property for MergeJob and cannot be null"); + } + else + { + this.ResultStreams = ResultStreams; + } + this.ResultFolderPath = ResultFolderPath; + this.ResultContainerId = ResultContainerId; + this.DataSetId = DataSetId; + this.HeaderDataSetIds = HeaderDataSetIds; + this.MergeSettings = MergeSettings; + } + + /// + /// The target folder path of result files + /// + /// The target folder path of result files + [DataMember(Name="resultFolderPath", EmitDefaultValue=false)] + public string ResultFolderPath { get; set; } + /// + /// The completion date/time of this job in ISO 8601 format + /// + /// The completion date/time of this job in ISO 8601 format + [DataMember(Name="completionTime", EmitDefaultValue=false)] + public DateTime? CompletionTime { get; private set; } + /// + /// The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation + /// + /// The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation + [DataMember(Name="jobId", EmitDefaultValue=false)] + public string JobId { get; set; } + /// + /// The target container id of result files + /// + /// The target container id of result files + [DataMember(Name="resultContainerId", EmitDefaultValue=false)] + public string ResultContainerId { get; set; } + /// + /// The creation date/time of this job in ISO 8601 format + /// + /// The creation date/time of this job in ISO 8601 format + [DataMember(Name="creationTime", EmitDefaultValue=false)] + public DateTime? CreationTime { get; private set; } + /// + /// Data set id + /// + /// Data set id + [DataMember(Name="dataSetId", EmitDefaultValue=false)] + public string DataSetId { get; set; } + /// + /// The storage locations of the result files. + /// + /// The storage locations of the result files. + [DataMember(Name="resultStreams", EmitDefaultValue=false)] + public List ResultStreams { get; set; } + /// + /// Header data set ids + /// + /// Header data set ids + [DataMember(Name="headerDataSetIds", EmitDefaultValue=false)] + public List HeaderDataSetIds { get; set; } + /// + /// Gets or Sets MergeSettings + /// + [DataMember(Name="mergeSettings", EmitDefaultValue=false)] + public MergeSettings MergeSettings { get; set; } + /// + /// A status message, which can be informational, warning or error. A message here does not indicate an error perse + /// + /// A status message, which can be informational, warning or error. A message here does not indicate an error perse + [DataMember(Name="statusMessage", EmitDefaultValue=false)] + public string StatusMessage { get; private set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class MergeJob {\n"); + sb.Append(" ResultFolderPath: ").Append(ResultFolderPath).Append("\n"); + sb.Append(" CompletionTime: ").Append(CompletionTime).Append("\n"); + sb.Append(" JobId: ").Append(JobId).Append("\n"); + sb.Append(" ResultContainerId: ").Append(ResultContainerId).Append("\n"); + sb.Append(" CreationTime: ").Append(CreationTime).Append("\n"); + sb.Append(" DataSetId: ").Append(DataSetId).Append("\n"); + sb.Append(" ResultStreams: ").Append(ResultStreams).Append("\n"); + sb.Append(" HeaderDataSetIds: ").Append(HeaderDataSetIds).Append("\n"); + sb.Append(" MergeSettings: ").Append(MergeSettings).Append("\n"); + sb.Append(" StatusMessage: ").Append(StatusMessage).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as MergeJob); + } + + /// + /// Returns true if MergeJob instances are equal + /// + /// Instance of MergeJob to be compared + /// Boolean + public bool Equals(MergeJob other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.ResultFolderPath == other.ResultFolderPath || + this.ResultFolderPath != null && + this.ResultFolderPath.Equals(other.ResultFolderPath) + ) && + ( + this.CompletionTime == other.CompletionTime || + this.CompletionTime != null && + this.CompletionTime.Equals(other.CompletionTime) + ) && + ( + this.JobId == other.JobId || + this.JobId != null && + this.JobId.Equals(other.JobId) + ) && + ( + this.ResultContainerId == other.ResultContainerId || + this.ResultContainerId != null && + this.ResultContainerId.Equals(other.ResultContainerId) + ) && + ( + this.CreationTime == other.CreationTime || + this.CreationTime != null && + this.CreationTime.Equals(other.CreationTime) + ) && + ( + this.DataSetId == other.DataSetId || + this.DataSetId != null && + this.DataSetId.Equals(other.DataSetId) + ) && + ( + this.ResultStreams == other.ResultStreams || + this.ResultStreams != null && + this.ResultStreams.SequenceEqual(other.ResultStreams) + ) && + ( + this.HeaderDataSetIds == other.HeaderDataSetIds || + this.HeaderDataSetIds != null && + this.HeaderDataSetIds.SequenceEqual(other.HeaderDataSetIds) + ) && + ( + this.MergeSettings == other.MergeSettings || + this.MergeSettings != null && + this.MergeSettings.Equals(other.MergeSettings) + ) && + ( + this.StatusMessage == other.StatusMessage || + this.StatusMessage != null && + this.StatusMessage.Equals(other.StatusMessage) + ) && + ( + this.Status == other.Status || + this.Status != null && + this.Status.Equals(other.Status) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.ResultFolderPath != null) + hash = hash * 59 + this.ResultFolderPath.GetHashCode(); + if (this.CompletionTime != null) + hash = hash * 59 + this.CompletionTime.GetHashCode(); + if (this.JobId != null) + hash = hash * 59 + this.JobId.GetHashCode(); + if (this.ResultContainerId != null) + hash = hash * 59 + this.ResultContainerId.GetHashCode(); + if (this.CreationTime != null) + hash = hash * 59 + this.CreationTime.GetHashCode(); + if (this.DataSetId != null) + hash = hash * 59 + this.DataSetId.GetHashCode(); + if (this.ResultStreams != null) + hash = hash * 59 + this.ResultStreams.GetHashCode(); + if (this.HeaderDataSetIds != null) + hash = hash * 59 + this.HeaderDataSetIds.GetHashCode(); + if (this.MergeSettings != null) + hash = hash * 59 + this.MergeSettings.GetHashCode(); + if (this.StatusMessage != null) + hash = hash * 59 + this.StatusMessage.GetHashCode(); + if (this.Status != null) + hash = hash * 59 + this.Status.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/MergeJobResponse.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/MergeJobResponse.cs new file mode 100644 index 0000000..a62aef1 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/MergeJobResponse.cs @@ -0,0 +1,228 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// The merge job response. + /// + [DataContract] + public partial class MergeJobResponse : IEquatable + { + /// + /// The status of the job + /// + /// The status of the job + [JsonConverter(typeof(StringEnumConverter))] + public enum StatusEnum + { + + /// + /// Enum CREATED for "CREATED" + /// + [EnumMember(Value = "CREATED")] + CREATED, + + /// + /// Enum UPDATED for "UPDATED" + /// + [EnumMember(Value = "UPDATED")] + UPDATED, + + /// + /// Enum PROCESSING for "PROCESSING" + /// + [EnumMember(Value = "PROCESSING")] + PROCESSING, + + /// + /// Enum DONE for "DONE" + /// + [EnumMember(Value = "DONE")] + DONE, + + /// + /// Enum ERROR for "ERROR" + /// + [EnumMember(Value = "ERROR")] + ERROR, + + /// + /// Enum DELETED for "DELETED" + /// + [EnumMember(Value = "DELETED")] + DELETED + } + + /// + /// The status of the job + /// + /// The status of the job + [DataMember(Name="status", EmitDefaultValue=false)] + public StatusEnum? Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected MergeJobResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation (required). + /// Job. + public MergeJobResponse(string JobId = null, MergeJob Job = null) + { + // to ensure "JobId" is required (not null) + if (JobId == null) + { + throw new InvalidDataException("JobId is a required property for MergeJobResponse and cannot be null"); + } + else + { + this.JobId = JobId; + } + this.Job = Job; + } + + /// + /// The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation + /// + /// The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation + [DataMember(Name="jobId", EmitDefaultValue=false)] + public string JobId { get; set; } + /// + /// Gets or Sets Job + /// + [DataMember(Name="job", EmitDefaultValue=false)] + public MergeJob Job { get; set; } + /// + /// A status message, which can be informational, warning or error. AA message here does not indicate an error perse + /// + /// A status message, which can be informational, warning or error. AA message here does not indicate an error perse + [DataMember(Name="statusMessage", EmitDefaultValue=false)] + public string StatusMessage { get; private set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class MergeJobResponse {\n"); + sb.Append(" JobId: ").Append(JobId).Append("\n"); + sb.Append(" Job: ").Append(Job).Append("\n"); + sb.Append(" StatusMessage: ").Append(StatusMessage).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as MergeJobResponse); + } + + /// + /// Returns true if MergeJobResponse instances are equal + /// + /// Instance of MergeJobResponse to be compared + /// Boolean + public bool Equals(MergeJobResponse other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.JobId == other.JobId || + this.JobId != null && + this.JobId.Equals(other.JobId) + ) && + ( + this.Job == other.Job || + this.Job != null && + this.Job.Equals(other.Job) + ) && + ( + this.StatusMessage == other.StatusMessage || + this.StatusMessage != null && + this.StatusMessage.Equals(other.StatusMessage) + ) && + ( + this.Status == other.Status || + this.Status != null && + this.Status.Equals(other.Status) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.JobId != null) + hash = hash * 59 + this.JobId.GetHashCode(); + if (this.Job != null) + hash = hash * 59 + this.Job.GetHashCode(); + if (this.StatusMessage != null) + hash = hash * 59 + this.StatusMessage.GetHashCode(); + if (this.Status != null) + hash = hash * 59 + this.Status.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/MergeSettings.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/MergeSettings.cs new file mode 100644 index 0000000..4b427d9 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/MergeSettings.cs @@ -0,0 +1,328 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// Merge settings + /// + [DataContract] + public partial class MergeSettings : IEquatable + { + /// + /// Gets or Sets MergeResult + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum MergeResultEnum + { + + /// + /// Enum SINGLEFILE for "SINGLE_FILE" + /// + [EnumMember(Value = "SINGLE_FILE")] + SINGLEFILE, + + /// + /// Enum SEPARATEFILES for "SEPARATE_FILES" + /// + [EnumMember(Value = "SEPARATE_FILES")] + SEPARATEFILES + } + + /// + /// Gets or Sets Engine + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EngineEnum + { + + /// + /// Enum BASIC for "BASIC" + /// + [EnumMember(Value = "BASIC")] + BASIC, + + /// + /// Enum PREMIUM for "PREMIUM" + /// + [EnumMember(Value = "PREMIUM")] + PREMIUM + } + + /// + /// Gets or Sets MergeResult + /// + [DataMember(Name="mergeResult", EmitDefaultValue=false)] + public MergeResultEnum? MergeResult { get; set; } + /// + /// Gets or Sets Engine + /// + [DataMember(Name="engine", EmitDefaultValue=false)] + public EngineEnum? Engine { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected MergeSettings() { } + /// + /// Initializes a new instance of the class. + /// + /// Lifecycle. + /// MergeResult. + /// Data set id (required). + /// Engine. + /// optional header data set ids. + /// Template version. + /// The output location of the result files. (required). + /// Template id (required). + /// OutputSettings (required). + public MergeSettings(Lifecycle Lifecycle = null, MergeResultEnum? MergeResult = null, string DataSetId = null, EngineEnum? Engine = null, List HeaderDataSetIds = null, int? TemplateVersion = null, StreamLocation ResultStreamLocation = null, string TemplateId = null, OutputSettings OutputSettings = null) + { + // to ensure "DataSetId" is required (not null) + if (DataSetId == null) + { + throw new InvalidDataException("DataSetId is a required property for MergeSettings and cannot be null"); + } + else + { + this.DataSetId = DataSetId; + } + // to ensure "ResultStreamLocation" is required (not null) + if (ResultStreamLocation == null) + { + throw new InvalidDataException("ResultStreamLocation is a required property for MergeSettings and cannot be null"); + } + else + { + this.ResultStreamLocation = ResultStreamLocation; + } + // to ensure "TemplateId" is required (not null) + if (TemplateId == null) + { + throw new InvalidDataException("TemplateId is a required property for MergeSettings and cannot be null"); + } + else + { + this.TemplateId = TemplateId; + } + // to ensure "OutputSettings" is required (not null) + if (OutputSettings == null) + { + throw new InvalidDataException("OutputSettings is a required property for MergeSettings and cannot be null"); + } + else + { + this.OutputSettings = OutputSettings; + } + this.Lifecycle = Lifecycle; + this.MergeResult = MergeResult; + this.Engine = Engine; + this.HeaderDataSetIds = HeaderDataSetIds; + this.TemplateVersion = TemplateVersion; + } + + /// + /// Gets or Sets Lifecycle + /// + [DataMember(Name="lifecycle", EmitDefaultValue=false)] + public Lifecycle Lifecycle { get; set; } + /// + /// Data set id + /// + /// Data set id + [DataMember(Name="dataSetId", EmitDefaultValue=false)] + public string DataSetId { get; set; } + /// + /// optional header data set ids + /// + /// optional header data set ids + [DataMember(Name="headerDataSetIds", EmitDefaultValue=false)] + public List HeaderDataSetIds { get; set; } + /// + /// Template version + /// + /// Template version + [DataMember(Name="templateVersion", EmitDefaultValue=false)] + public int? TemplateVersion { get; set; } + /// + /// The output location of the result files. + /// + /// The output location of the result files. + [DataMember(Name="resultStreamLocation", EmitDefaultValue=false)] + public StreamLocation ResultStreamLocation { get; set; } + /// + /// Template id + /// + /// Template id + [DataMember(Name="templateId", EmitDefaultValue=false)] + public string TemplateId { get; set; } + /// + /// Gets or Sets OutputSettings + /// + [DataMember(Name="outputSettings", EmitDefaultValue=false)] + public OutputSettings OutputSettings { get; set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class MergeSettings {\n"); + sb.Append(" Lifecycle: ").Append(Lifecycle).Append("\n"); + sb.Append(" MergeResult: ").Append(MergeResult).Append("\n"); + sb.Append(" DataSetId: ").Append(DataSetId).Append("\n"); + sb.Append(" Engine: ").Append(Engine).Append("\n"); + sb.Append(" HeaderDataSetIds: ").Append(HeaderDataSetIds).Append("\n"); + sb.Append(" TemplateVersion: ").Append(TemplateVersion).Append("\n"); + sb.Append(" ResultStreamLocation: ").Append(ResultStreamLocation).Append("\n"); + sb.Append(" TemplateId: ").Append(TemplateId).Append("\n"); + sb.Append(" OutputSettings: ").Append(OutputSettings).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as MergeSettings); + } + + /// + /// Returns true if MergeSettings instances are equal + /// + /// Instance of MergeSettings to be compared + /// Boolean + public bool Equals(MergeSettings other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.Lifecycle == other.Lifecycle || + this.Lifecycle != null && + this.Lifecycle.Equals(other.Lifecycle) + ) && + ( + this.MergeResult == other.MergeResult || + this.MergeResult != null && + this.MergeResult.Equals(other.MergeResult) + ) && + ( + this.DataSetId == other.DataSetId || + this.DataSetId != null && + this.DataSetId.Equals(other.DataSetId) + ) && + ( + this.Engine == other.Engine || + this.Engine != null && + this.Engine.Equals(other.Engine) + ) && + ( + this.HeaderDataSetIds == other.HeaderDataSetIds || + this.HeaderDataSetIds != null && + this.HeaderDataSetIds.SequenceEqual(other.HeaderDataSetIds) + ) && + ( + this.TemplateVersion == other.TemplateVersion || + this.TemplateVersion != null && + this.TemplateVersion.Equals(other.TemplateVersion) + ) && + ( + this.ResultStreamLocation == other.ResultStreamLocation || + this.ResultStreamLocation != null && + this.ResultStreamLocation.Equals(other.ResultStreamLocation) + ) && + ( + this.TemplateId == other.TemplateId || + this.TemplateId != null && + this.TemplateId.Equals(other.TemplateId) + ) && + ( + this.OutputSettings == other.OutputSettings || + this.OutputSettings != null && + this.OutputSettings.Equals(other.OutputSettings) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.Lifecycle != null) + hash = hash * 59 + this.Lifecycle.GetHashCode(); + if (this.MergeResult != null) + hash = hash * 59 + this.MergeResult.GetHashCode(); + if (this.DataSetId != null) + hash = hash * 59 + this.DataSetId.GetHashCode(); + if (this.Engine != null) + hash = hash * 59 + this.Engine.GetHashCode(); + if (this.HeaderDataSetIds != null) + hash = hash * 59 + this.HeaderDataSetIds.GetHashCode(); + if (this.TemplateVersion != null) + hash = hash * 59 + this.TemplateVersion.GetHashCode(); + if (this.ResultStreamLocation != null) + hash = hash * 59 + this.ResultStreamLocation.GetHashCode(); + if (this.TemplateId != null) + hash = hash * 59 + this.TemplateId.GetHashCode(); + if (this.OutputSettings != null) + hash = hash * 59 + this.OutputSettings.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/OutputSettings.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/OutputSettings.cs new file mode 100644 index 0000000..cfaa551 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/OutputSettings.cs @@ -0,0 +1,271 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// Output settings + /// + [DataContract] + public partial class OutputSettings : IEquatable + { + /// + /// Gets or Sets DeliveryFormat + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum DeliveryFormatEnum + { + + /// + /// Enum PLAIN for "PLAIN" + /// + [EnumMember(Value = "PLAIN")] + PLAIN, + + /// + /// Enum ZIP for "ZIP" + /// + [EnumMember(Value = "ZIP")] + ZIP, + + /// + /// Enum _7ZIP for "_7ZIP" + /// + [EnumMember(Value = "_7ZIP")] + _7ZIP + } + + /// + /// Gets or Sets OutputFormat + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum OutputFormatEnum + { + + /// + /// Enum DOC for "DOC" + /// + [EnumMember(Value = "DOC")] + DOC, + + /// + /// Enum DOCX for "DOCX" + /// + [EnumMember(Value = "DOCX")] + DOCX, + + /// + /// Enum RTF for "RTF" + /// + [EnumMember(Value = "RTF")] + RTF, + + /// + /// Enum PDF for "PDF" + /// + [EnumMember(Value = "PDF")] + PDF, + + /// + /// Enum XPS for "XPS" + /// + [EnumMember(Value = "XPS")] + XPS, + + /// + /// Enum SVG for "SVG" + /// + [EnumMember(Value = "SVG")] + SVG, + + /// + /// Enum HTML for "HTML" + /// + [EnumMember(Value = "HTML")] + HTML, + + /// + /// Enum ODT for "ODT" + /// + [EnumMember(Value = "ODT")] + ODT, + + /// + /// Enum TIFF for "TIFF" + /// + [EnumMember(Value = "TIFF")] + TIFF, + + /// + /// Enum PNG for "PNG" + /// + [EnumMember(Value = "PNG")] + PNG, + + /// + /// Enum BMP for "BMP" + /// + [EnumMember(Value = "BMP")] + BMP, + + /// + /// Enum JPEG for "JPEG" + /// + [EnumMember(Value = "JPEG")] + JPEG, + + /// + /// Enum TXT for "TXT" + /// + [EnumMember(Value = "TXT")] + TXT, + + /// + /// Enum XML for "XML" + /// + [EnumMember(Value = "XML")] + XML, + + /// + /// Enum JSON for "JSON" + /// + [EnumMember(Value = "JSON")] + JSON, + + /// + /// Enum DEFAULT for "DEFAULT" + /// + [EnumMember(Value = "DEFAULT")] + DEFAULT + } + + /// + /// Gets or Sets DeliveryFormat + /// + [DataMember(Name="deliveryFormat", EmitDefaultValue=false)] + public DeliveryFormatEnum? DeliveryFormat { get; set; } + /// + /// Gets or Sets OutputFormat + /// + [DataMember(Name="outputFormat", EmitDefaultValue=false)] + public OutputFormatEnum? OutputFormat { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// DeliveryFormat. + /// OutputFormat. + public OutputSettings(DeliveryFormatEnum? DeliveryFormat = null, OutputFormatEnum? OutputFormat = null) + { + this.DeliveryFormat = DeliveryFormat; + this.OutputFormat = OutputFormat; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class OutputSettings {\n"); + sb.Append(" DeliveryFormat: ").Append(DeliveryFormat).Append("\n"); + sb.Append(" OutputFormat: ").Append(OutputFormat).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as OutputSettings); + } + + /// + /// Returns true if OutputSettings instances are equal + /// + /// Instance of OutputSettings to be compared + /// Boolean + public bool Equals(OutputSettings other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.DeliveryFormat == other.DeliveryFormat || + this.DeliveryFormat != null && + this.DeliveryFormat.Equals(other.DeliveryFormat) + ) && + ( + this.OutputFormat == other.OutputFormat || + this.OutputFormat != null && + this.OutputFormat.Equals(other.OutputFormat) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.DeliveryFormat != null) + hash = hash * 59 + this.DeliveryFormat.GetHashCode(); + if (this.OutputFormat != null) + hash = hash * 59 + this.OutputFormat.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/OwnerInfo.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/OwnerInfo.cs new file mode 100644 index 0000000..52e2d57 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/OwnerInfo.cs @@ -0,0 +1,175 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// Owner info + /// + [DataContract] + public partial class OwnerInfo : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// The owner's phone number. + /// The owner's company/department. + /// The owner's name. + /// The owner's email address. + public OwnerInfo(string Phone = null, string CompanyDepartment = null, string Name = null, string Email = null) + { + this.Phone = Phone; + this.CompanyDepartment = CompanyDepartment; + this.Name = Name; + this.Email = Email; + } + + /// + /// The owner's phone number + /// + /// The owner's phone number + [DataMember(Name="phone", EmitDefaultValue=false)] + public string Phone { get; set; } + /// + /// The owner's company/department + /// + /// The owner's company/department + [DataMember(Name="companyDepartment", EmitDefaultValue=false)] + public string CompanyDepartment { get; set; } + /// + /// The owner's name + /// + /// The owner's name + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + /// + /// The owner's email address + /// + /// The owner's email address + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class OwnerInfo {\n"); + sb.Append(" Phone: ").Append(Phone).Append("\n"); + sb.Append(" CompanyDepartment: ").Append(CompanyDepartment).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as OwnerInfo); + } + + /// + /// Returns true if OwnerInfo instances are equal + /// + /// Instance of OwnerInfo to be compared + /// Boolean + public bool Equals(OwnerInfo other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.Phone == other.Phone || + this.Phone != null && + this.Phone.Equals(other.Phone) + ) && + ( + this.CompanyDepartment == other.CompanyDepartment || + this.CompanyDepartment != null && + this.CompanyDepartment.Equals(other.CompanyDepartment) + ) && + ( + this.Name == other.Name || + this.Name != null && + this.Name.Equals(other.Name) + ) && + ( + this.Email == other.Email || + this.Email != null && + this.Email.Equals(other.Email) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.Phone != null) + hash = hash * 59 + this.Phone.GetHashCode(); + if (this.CompanyDepartment != null) + hash = hash * 59 + this.CompanyDepartment.GetHashCode(); + if (this.Name != null) + hash = hash * 59 + this.Name.GetHashCode(); + if (this.Email != null) + hash = hash * 59 + this.Email.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/StreamLocation.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/StreamLocation.cs new file mode 100644 index 0000000..41a7043 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/StreamLocation.cs @@ -0,0 +1,171 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// Location record of data stream + /// + [DataContract] + public partial class StreamLocation : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + /// FolderPath. + /// OriginalFileName. + /// ContainerId. + /// FileId. + public StreamLocation(string FolderPath = null, string OriginalFileName = null, string ContainerId = null, string FileId = null) + { + this.FolderPath = FolderPath; + this.OriginalFileName = OriginalFileName; + this.ContainerId = ContainerId; + this.FileId = FileId; + } + + /// + /// Gets or Sets FolderPath + /// + [DataMember(Name="folderPath", EmitDefaultValue=false)] + public string FolderPath { get; set; } + /// + /// Gets or Sets OriginalFileName + /// + [DataMember(Name="originalFileName", EmitDefaultValue=false)] + public string OriginalFileName { get; set; } + /// + /// Gets or Sets ContainerId + /// + [DataMember(Name="containerId", EmitDefaultValue=false)] + public string ContainerId { get; set; } + /// + /// Gets or Sets FileId + /// + [DataMember(Name="fileId", EmitDefaultValue=false)] + public string FileId { get; set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class StreamLocation {\n"); + sb.Append(" FolderPath: ").Append(FolderPath).Append("\n"); + sb.Append(" OriginalFileName: ").Append(OriginalFileName).Append("\n"); + sb.Append(" ContainerId: ").Append(ContainerId).Append("\n"); + sb.Append(" FileId: ").Append(FileId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as StreamLocation); + } + + /// + /// Returns true if StreamLocation instances are equal + /// + /// Instance of StreamLocation to be compared + /// Boolean + public bool Equals(StreamLocation other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.FolderPath == other.FolderPath || + this.FolderPath != null && + this.FolderPath.Equals(other.FolderPath) + ) && + ( + this.OriginalFileName == other.OriginalFileName || + this.OriginalFileName != null && + this.OriginalFileName.Equals(other.OriginalFileName) + ) && + ( + this.ContainerId == other.ContainerId || + this.ContainerId != null && + this.ContainerId.Equals(other.ContainerId) + ) && + ( + this.FileId == other.FileId || + this.FileId != null && + this.FileId.Equals(other.FileId) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.FolderPath != null) + hash = hash * 59 + this.FolderPath.GetHashCode(); + if (this.OriginalFileName != null) + hash = hash * 59 + this.OriginalFileName.GetHashCode(); + if (this.ContainerId != null) + hash = hash * 59 + this.ContainerId.GetHashCode(); + if (this.FileId != null) + hash = hash * 59 + this.FileId.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContext.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContext.cs new file mode 100644 index 0000000..8153984 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContext.cs @@ -0,0 +1,237 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// TemplateContext + /// + [DataContract] + public partial class TemplateContext : IEquatable + { + /// + /// Gets or Sets TemplateType + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum TemplateTypeEnum + { + + /// + /// Enum OFFICE for "OFFICE" + /// + [EnumMember(Value = "OFFICE")] + OFFICE, + + /// + /// Enum FREEMARKER for "FREEMARKER" + /// + [EnumMember(Value = "FREEMARKER")] + FREEMARKER + } + + /// + /// Gets or Sets TemplateType + /// + [DataMember(Name="templateType", EmitDefaultValue=false)] + public TemplateTypeEnum? TemplateType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TemplateContext() { } + /// + /// Initializes a new instance of the class. + /// + /// TemplateType (required). + /// The template files (versioned). + /// The template description. + /// OwnerInfo. + /// Id. + /// The template context id. + public TemplateContext(TemplateTypeEnum? TemplateType = null, Dictionary TemplateFileLocations = null, string Description = null, OwnerInfo OwnerInfo = null, string Id = null, string TemplateId = null) + { + // to ensure "TemplateType" is required (not null) + if (TemplateType == null) + { + throw new InvalidDataException("TemplateType is a required property for TemplateContext and cannot be null"); + } + else + { + this.TemplateType = TemplateType; + } + this.TemplateFileLocations = TemplateFileLocations; + this.Description = Description; + this.OwnerInfo = OwnerInfo; + this.Id = Id; + this.TemplateId = TemplateId; + } + + /// + /// The template files (versioned) + /// + /// The template files (versioned) + [DataMember(Name="templateFileLocations", EmitDefaultValue=false)] + public Dictionary TemplateFileLocations { get; set; } + /// + /// The template description + /// + /// The template description + [DataMember(Name="description", EmitDefaultValue=false)] + public string Description { get; set; } + /// + /// Gets or Sets OwnerInfo + /// + [DataMember(Name="ownerInfo", EmitDefaultValue=false)] + public OwnerInfo OwnerInfo { get; set; } + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + public string Id { get; set; } + /// + /// The template context id + /// + /// The template context id + [DataMember(Name="templateId", EmitDefaultValue=false)] + public string TemplateId { get; set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class TemplateContext {\n"); + sb.Append(" TemplateType: ").Append(TemplateType).Append("\n"); + sb.Append(" TemplateFileLocations: ").Append(TemplateFileLocations).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" OwnerInfo: ").Append(OwnerInfo).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" TemplateId: ").Append(TemplateId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as TemplateContext); + } + + /// + /// Returns true if TemplateContext instances are equal + /// + /// Instance of TemplateContext to be compared + /// Boolean + public bool Equals(TemplateContext other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.TemplateType == other.TemplateType || + this.TemplateType != null && + this.TemplateType.Equals(other.TemplateType) + ) && + ( + this.TemplateFileLocations == other.TemplateFileLocations || + this.TemplateFileLocations != null && + this.TemplateFileLocations.SequenceEqual(other.TemplateFileLocations) + ) && + ( + this.Description == other.Description || + this.Description != null && + this.Description.Equals(other.Description) + ) && + ( + this.OwnerInfo == other.OwnerInfo || + this.OwnerInfo != null && + this.OwnerInfo.Equals(other.OwnerInfo) + ) && + ( + this.Id == other.Id || + this.Id != null && + this.Id.Equals(other.Id) + ) && + ( + this.TemplateId == other.TemplateId || + this.TemplateId != null && + this.TemplateId.Equals(other.TemplateId) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.TemplateType != null) + hash = hash * 59 + this.TemplateType.GetHashCode(); + if (this.TemplateFileLocations != null) + hash = hash * 59 + this.TemplateFileLocations.GetHashCode(); + if (this.Description != null) + hash = hash * 59 + this.Description.GetHashCode(); + if (this.OwnerInfo != null) + hash = hash * 59 + this.OwnerInfo.GetHashCode(); + if (this.Id != null) + hash = hash * 59 + this.Id.GetHashCode(); + if (this.TemplateId != null) + hash = hash * 59 + this.TemplateId.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextRequest.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextRequest.cs new file mode 100644 index 0000000..b5ee6cb --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextRequest.cs @@ -0,0 +1,205 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// The merge template request. + /// + [DataContract] + public partial class TemplateContextRequest : IEquatable + { + /// + /// Gets or Sets TemplateType + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum TemplateTypeEnum + { + + /// + /// Enum OFFICE for "OFFICE" + /// + [EnumMember(Value = "OFFICE")] + OFFICE, + + /// + /// Enum FREEMARKER for "FREEMARKER" + /// + [EnumMember(Value = "FREEMARKER")] + FREEMARKER + } + + /// + /// Gets or Sets TemplateType + /// + [DataMember(Name="templateType", EmitDefaultValue=false)] + public TemplateTypeEnum? TemplateType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TemplateContextRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// TemplateType (required). + /// Description. + /// OwnerInfo. + /// The template context id. + public TemplateContextRequest(TemplateTypeEnum? TemplateType = null, string Description = null, OwnerInfo OwnerInfo = null, string TemplateId = null) + { + // to ensure "TemplateType" is required (not null) + if (TemplateType == null) + { + throw new InvalidDataException("TemplateType is a required property for TemplateContextRequest and cannot be null"); + } + else + { + this.TemplateType = TemplateType; + } + this.Description = Description; + this.OwnerInfo = OwnerInfo; + this.TemplateId = TemplateId; + } + + /// + /// Gets or Sets Description + /// + [DataMember(Name="description", EmitDefaultValue=false)] + public string Description { get; set; } + /// + /// Gets or Sets OwnerInfo + /// + [DataMember(Name="ownerInfo", EmitDefaultValue=false)] + public OwnerInfo OwnerInfo { get; set; } + /// + /// The template context id + /// + /// The template context id + [DataMember(Name="templateId", EmitDefaultValue=false)] + public string TemplateId { get; set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class TemplateContextRequest {\n"); + sb.Append(" TemplateType: ").Append(TemplateType).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" OwnerInfo: ").Append(OwnerInfo).Append("\n"); + sb.Append(" TemplateId: ").Append(TemplateId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as TemplateContextRequest); + } + + /// + /// Returns true if TemplateContextRequest instances are equal + /// + /// Instance of TemplateContextRequest to be compared + /// Boolean + public bool Equals(TemplateContextRequest other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.TemplateType == other.TemplateType || + this.TemplateType != null && + this.TemplateType.Equals(other.TemplateType) + ) && + ( + this.Description == other.Description || + this.Description != null && + this.Description.Equals(other.Description) + ) && + ( + this.OwnerInfo == other.OwnerInfo || + this.OwnerInfo != null && + this.OwnerInfo.Equals(other.OwnerInfo) + ) && + ( + this.TemplateId == other.TemplateId || + this.TemplateId != null && + this.TemplateId.Equals(other.TemplateId) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.TemplateType != null) + hash = hash * 59 + this.TemplateType.GetHashCode(); + if (this.Description != null) + hash = hash * 59 + this.Description.GetHashCode(); + if (this.OwnerInfo != null) + hash = hash * 59 + this.OwnerInfo.GetHashCode(); + if (this.TemplateId != null) + hash = hash * 59 + this.TemplateId.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextResponse.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextResponse.cs new file mode 100644 index 0000000..b6de9ca --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextResponse.cs @@ -0,0 +1,216 @@ +/* + * OfficeTextMerge + * + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Sphereon.SDK.TemplateProcessor.Model +{ + /// + /// The merge template response. + /// + [DataContract] + public partial class TemplateContextResponse : IEquatable + { + /// + /// The status of the template + /// + /// The status of the template + [JsonConverter(typeof(StringEnumConverter))] + public enum StatusEnum + { + + /// + /// Enum CREATED for "CREATED" + /// + [EnumMember(Value = "CREATED")] + CREATED, + + /// + /// Enum UPDATED for "UPDATED" + /// + [EnumMember(Value = "UPDATED")] + UPDATED, + + /// + /// Enum DELETED for "DELETED" + /// + [EnumMember(Value = "DELETED")] + DELETED, + + /// + /// Enum PROCESSING for "PROCESSING" + /// + [EnumMember(Value = "PROCESSING")] + PROCESSING + } + + /// + /// The status of the template + /// + /// The status of the template + [DataMember(Name="status", EmitDefaultValue=false)] + public StatusEnum? Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TemplateContextResponse() { } + /// + /// Initializes a new instance of the class. + /// + /// Context. + /// Unique template context id (required). + public TemplateContextResponse(TemplateContext Context = null, string Id = null) + { + // to ensure "Id" is required (not null) + if (Id == null) + { + throw new InvalidDataException("Id is a required property for TemplateContextResponse and cannot be null"); + } + else + { + this.Id = Id; + } + this.Context = Context; + } + + /// + /// The creation date/time of this response in ISO 8601 format + /// + /// The creation date/time of this response in ISO 8601 format + [DataMember(Name="creationTime", EmitDefaultValue=false)] + public DateTime? CreationTime { get; private set; } + /// + /// Gets or Sets Context + /// + [DataMember(Name="context", EmitDefaultValue=false)] + public TemplateContext Context { get; set; } + /// + /// Unique template context id + /// + /// Unique template context id + [DataMember(Name="id", EmitDefaultValue=false)] + public string Id { get; set; } + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class TemplateContextResponse {\n"); + sb.Append(" CreationTime: ").Append(CreationTime).Append("\n"); + sb.Append(" Context: ").Append(Context).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as TemplateContextResponse); + } + + /// + /// Returns true if TemplateContextResponse instances are equal + /// + /// Instance of TemplateContextResponse to be compared + /// Boolean + public bool Equals(TemplateContextResponse other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.CreationTime == other.CreationTime || + this.CreationTime != null && + this.CreationTime.Equals(other.CreationTime) + ) && + ( + this.Context == other.Context || + this.Context != null && + this.Context.Equals(other.Context) + ) && + ( + this.Id == other.Id || + this.Id != null && + this.Id.Equals(other.Id) + ) && + ( + this.Status == other.Status || + this.Status != null && + this.Status.Equals(other.Status) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + if (this.CreationTime != null) + hash = hash * 59 + this.CreationTime.GetHashCode(); + if (this.Context != null) + hash = hash * 59 + this.Context.GetHashCode(); + if (this.Id != null) + hash = hash * 59 + this.Id.GetHashCode(); + if (this.Status != null) + hash = hash * 59 + this.Status.GetHashCode(); + return hash; + } + } + } + +} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Properties/AssemblyInfo.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f3b9f7d --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Properties/AssemblyInfo.cs @@ -0,0 +1,32 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Swagger Library")] +[assembly: AssemblyDescription("A library generated from a Swagger doc")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Swagger")] +[assembly: AssemblyProduct("SwaggerLibrary")] +[assembly: AssemblyCopyright("No Copyright")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0")] +[assembly: AssemblyFileVersion("1.0.0")] diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Sphereon.SDK.TemplateProcessor.csproj b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Sphereon.SDK.TemplateProcessor.csproj new file mode 100644 index 0000000..32909b5 --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Sphereon.SDK.TemplateProcessor.csproj @@ -0,0 +1,82 @@ + + + + + Debug + AnyCPU + {80B64299-4E8C-4A19-A669-65EC364D8526} + Library + Properties + Sphereon.SDK.TemplateProcessor + Sphereon.SDK.TemplateProcessor + v4.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + $(SolutionDir)\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll + ..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll + ..\..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll + ..\..\vendor\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll + + + $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll + ..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll + ..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll + ..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll + + + + + + + + + + + diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/packages.config b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/packages.config new file mode 100644 index 0000000..80f617d --- /dev/null +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/packages.config @@ -0,0 +1,5 @@ + + + + + diff --git a/html-docs/.swagger-codegen-ignore b/html-docs/.swagger-codegen-ignore new file mode 100644 index 0000000..c5fa491 --- /dev/null +++ b/html-docs/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/html-docs/LICENSE b/html-docs/LICENSE new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/html-docs/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/html-docs/index.html b/html-docs/index.html new file mode 100644 index 0000000..020589a --- /dev/null +++ b/html-docs/index.html @@ -0,0 +1,8465 @@ + + + + + OfficeTextMerge + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+
+

OfficeTextMerge

+
+
+
+ +
+ + +
+

Merge

+ + + + + + + +
+ +
+
+

createDataSet

+
+
+ +
+
+ +

+

Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job.

+

+
+ +
/template-processor/merge/0.1/datasets
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X post -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template-processor/merge/0.1/datasets"
+
+
+
+
+ +
+

+import com.sphereon.sdk.template-processor.*;
+import com.sphereon.sdk.template-processor.auth.*;
+import com.sphereon.sdk.template-processor.model.*;
+import api.MergeApi;
+
+import java.io.File;
+import java.util.*;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        ApiClient defaultClient = Configuration.getDefaultApiClient();
+        
+        // Configure OAuth2 access token for authorization: oauth2schema
+        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
+        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
+
+        MergeApi apiInstance = new MergeApi();
+        String payload = payload_example; // String | The dates for the merge [   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   },   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   } ]
+        try {
+            DataSetResponse result = apiInstance.createDataSet(payload);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#createDataSet");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import api.MergeApi;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        MergeApi apiInstance = new MergeApi();
+        String payload = payload_example; // String | The dates for the merge [   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   },   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   } ]
+        try {
+            DataSetResponse result = apiInstance.createDataSet(payload);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#createDataSet");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+
+String *payload = payload_example; // The dates for the merge [   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   },   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   } ]
+
+MergeApi *apiInstance = [[MergeApi alloc] init];
+
+// Store dataset
+[apiInstance createDataSetWith:payload
+              completionHandler: ^(DataSetResponse output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+var defaultClient = .ApiClient.instance;
+
+// Configure OAuth2 access token for authorization: oauth2schema
+var oauth2schema = defaultClient.authentications['oauth2schema'];
+oauth2schema.accessToken = "YOUR ACCESS TOKEN"
+
+var api = new .MergeApi()
+
+var payload = payload_example; // {String} The dates for the merge [   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   },   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   } ]
+
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.createDataSet(payload, callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using model;
+
+namespace Example
+{
+    public class createDataSetExample
+    {
+        public void main()
+        {
+            
+            // Configure OAuth2 access token for authorization: oauth2schema
+            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+            var apiInstance = new MergeApi();
+            var payload = payload_example;  // String | The dates for the merge [   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   },   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   } ]
+
+            try
+            {
+                // Store dataset
+                DataSetResponse result = apiInstance.createDataSet(payload);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling MergeApi.createDataSet: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+setAccessToken('YOUR_ACCESS_TOKEN');
+
+$api_instance = new com.sphereon.sdk.template-processor\Api\MergeApi();
+$payload = payload_example; // String | The dates for the merge [   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   },   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   } ]
+
+try {
+    $result = $api_instance->createDataSet($payload);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling MergeApi->createDataSet: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + + + + +
Body parameters
+ + + + + + + + + + + +
NameDescription
payload * + + + +
+
+ + +

Responses

+ +

Status: 200 - Data set received and stored

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 400 - Unsupported data set format

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

createTemplateContext

+
+
+ +
+
+ +

+

Create a unique template context for your environment

+

+
+ +
/template-processor/merge/0.1/templates
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X post -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template-processor/merge/0.1/templates"
+
+
+
+
+ +
+

+import com.sphereon.sdk.template-processor.*;
+import com.sphereon.sdk.template-processor.auth.*;
+import com.sphereon.sdk.template-processor.model.*;
+import api.MergeApi;
+
+import java.io.File;
+import java.util.*;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        ApiClient defaultClient = Configuration.getDefaultApiClient();
+        
+        // Configure OAuth2 access token for authorization: oauth2schema
+        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
+        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
+
+        MergeApi apiInstance = new MergeApi();
+        TemplateContextRequest templateRequest = ; // TemplateContextRequest | The template request
+        try {
+            TemplateContextResponse result = apiInstance.createTemplateContext(templateRequest);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#createTemplateContext");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import api.MergeApi;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        MergeApi apiInstance = new MergeApi();
+        TemplateContextRequest templateRequest = ; // TemplateContextRequest | The template request
+        try {
+            TemplateContextResponse result = apiInstance.createTemplateContext(templateRequest);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#createTemplateContext");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+
+TemplateContextRequest *templateRequest = ; // The template request
+
+MergeApi *apiInstance = [[MergeApi alloc] init];
+
+// Create template context
+[apiInstance createTemplateContextWith:templateRequest
+              completionHandler: ^(TemplateContextResponse output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+var defaultClient = .ApiClient.instance;
+
+// Configure OAuth2 access token for authorization: oauth2schema
+var oauth2schema = defaultClient.authentications['oauth2schema'];
+oauth2schema.accessToken = "YOUR ACCESS TOKEN"
+
+var api = new .MergeApi()
+
+var templateRequest = ; // {TemplateContextRequest} The template request
+
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.createTemplateContext(templateRequest, callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using model;
+
+namespace Example
+{
+    public class createTemplateContextExample
+    {
+        public void main()
+        {
+            
+            // Configure OAuth2 access token for authorization: oauth2schema
+            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+            var apiInstance = new MergeApi();
+            var templateRequest = new TemplateContextRequest(); // TemplateContextRequest | The template request
+
+            try
+            {
+                // Create template context
+                TemplateContextResponse result = apiInstance.createTemplateContext(templateRequest);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling MergeApi.createTemplateContext: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+setAccessToken('YOUR_ACCESS_TOKEN');
+
+$api_instance = new com.sphereon.sdk.template-processor\Api\MergeApi();
+$templateRequest = ; // TemplateContextRequest | The template request
+
+try {
+    $result = $api_instance->createTemplateContext($templateRequest);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling MergeApi->createTemplateContext: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + + + + +
Body parameters
+ + + + + + + + + + + +
NameDescription
templateRequest * + + + +
+
+ + +

Responses

+ +

Status: 200 - Template context created

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 400 - Template context already exists

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

deleteDataSet

+
+
+ +
+
+ +

+

Delete a stored data set

+

+
+ +
/template-processor/merge/0.1/datasets/{dataSetId}
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X delete -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template-processor/merge/0.1/datasets/{dataSetId}"
+
+
+
+
+ +
+

+import com.sphereon.sdk.template-processor.*;
+import com.sphereon.sdk.template-processor.auth.*;
+import com.sphereon.sdk.template-processor.model.*;
+import api.MergeApi;
+
+import java.io.File;
+import java.util.*;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        ApiClient defaultClient = Configuration.getDefaultApiClient();
+        
+        // Configure OAuth2 access token for authorization: oauth2schema
+        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
+        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
+
+        MergeApi apiInstance = new MergeApi();
+        String dataSetId = dataSetId_example; // String | dataSetId
+        try {
+            DataSetResponse result = apiInstance.deleteDataSet(dataSetId);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#deleteDataSet");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import api.MergeApi;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        MergeApi apiInstance = new MergeApi();
+        String dataSetId = dataSetId_example; // String | dataSetId
+        try {
+            DataSetResponse result = apiInstance.deleteDataSet(dataSetId);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#deleteDataSet");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+
+String *dataSetId = dataSetId_example; // dataSetId
+
+MergeApi *apiInstance = [[MergeApi alloc] init];
+
+// Delete a stored data set
+[apiInstance deleteDataSetWith:dataSetId
+              completionHandler: ^(DataSetResponse output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+var defaultClient = .ApiClient.instance;
+
+// Configure OAuth2 access token for authorization: oauth2schema
+var oauth2schema = defaultClient.authentications['oauth2schema'];
+oauth2schema.accessToken = "YOUR ACCESS TOKEN"
+
+var api = new .MergeApi()
+
+var dataSetId = dataSetId_example; // {String} dataSetId
+
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.deleteDataSet(dataSetId, callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using model;
+
+namespace Example
+{
+    public class deleteDataSetExample
+    {
+        public void main()
+        {
+            
+            // Configure OAuth2 access token for authorization: oauth2schema
+            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+            var apiInstance = new MergeApi();
+            var dataSetId = dataSetId_example;  // String | dataSetId
+
+            try
+            {
+                // Delete a stored data set
+                DataSetResponse result = apiInstance.deleteDataSet(dataSetId);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling MergeApi.deleteDataSet: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+setAccessToken('YOUR_ACCESS_TOKEN');
+
+$api_instance = new com.sphereon.sdk.template-processor\Api\MergeApi();
+$dataSetId = dataSetId_example; // String | dataSetId
+
+try {
+    $result = $api_instance->deleteDataSet($dataSetId);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling MergeApi->deleteDataSet: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + +
Path parameters
+ + + + + + + + + + +
NameDescription
dataSetId* + + + +
+
+ + + + + +

Responses

+ +

Status: 200 - Successfully deleted the data set

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 400 - Could not delete data set

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 404 - Invalid data set id

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

deleteJob

+
+
+ +
+
+ +

+

Delete the merge job and all related files

+

+
+ +
/template-processor/merge/0.1/jobs/{jobId}
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X delete -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template-processor/merge/0.1/jobs/{jobId}"
+
+
+
+
+ +
+

+import com.sphereon.sdk.template-processor.*;
+import com.sphereon.sdk.template-processor.auth.*;
+import com.sphereon.sdk.template-processor.model.*;
+import api.MergeApi;
+
+import java.io.File;
+import java.util.*;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        ApiClient defaultClient = Configuration.getDefaultApiClient();
+        
+        // Configure OAuth2 access token for authorization: oauth2schema
+        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
+        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
+
+        MergeApi apiInstance = new MergeApi();
+        String jobId = jobId_example; // String | jobId
+        try {
+            MergeJobResponse result = apiInstance.deleteJob(jobId);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#deleteJob");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import api.MergeApi;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        MergeApi apiInstance = new MergeApi();
+        String jobId = jobId_example; // String | jobId
+        try {
+            MergeJobResponse result = apiInstance.deleteJob(jobId);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#deleteJob");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+
+String *jobId = jobId_example; // jobId
+
+MergeApi *apiInstance = [[MergeApi alloc] init];
+
+// Delete a job manually
+[apiInstance deleteJobWith:jobId
+              completionHandler: ^(MergeJobResponse output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+var defaultClient = .ApiClient.instance;
+
+// Configure OAuth2 access token for authorization: oauth2schema
+var oauth2schema = defaultClient.authentications['oauth2schema'];
+oauth2schema.accessToken = "YOUR ACCESS TOKEN"
+
+var api = new .MergeApi()
+
+var jobId = jobId_example; // {String} jobId
+
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.deleteJob(jobId, callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using model;
+
+namespace Example
+{
+    public class deleteJobExample
+    {
+        public void main()
+        {
+            
+            // Configure OAuth2 access token for authorization: oauth2schema
+            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+            var apiInstance = new MergeApi();
+            var jobId = jobId_example;  // String | jobId
+
+            try
+            {
+                // Delete a job manually
+                MergeJobResponse result = apiInstance.deleteJob(jobId);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling MergeApi.deleteJob: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+setAccessToken('YOUR_ACCESS_TOKEN');
+
+$api_instance = new com.sphereon.sdk.template-processor\Api\MergeApi();
+$jobId = jobId_example; // String | jobId
+
+try {
+    $result = $api_instance->deleteJob($jobId);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling MergeApi->deleteJob: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + +
Path parameters
+ + + + + + + + + + +
NameDescription
jobId* + + + +
+
+ + + + + +

Responses

+ +

Status: 200 - Merge job returned and Job is done or in error

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 400 - Could not delete job

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 404 - Invalid job id

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

deleteTemplateContext

+
+
+ +
+
+ +

+

Delete a template context with all history

+

+
+ +
/template-processor/merge/0.1/templates/{templateId}
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X delete -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template-processor/merge/0.1/templates/{templateId}"
+
+
+
+
+ +
+

+import com.sphereon.sdk.template-processor.*;
+import com.sphereon.sdk.template-processor.auth.*;
+import com.sphereon.sdk.template-processor.model.*;
+import api.MergeApi;
+
+import java.io.File;
+import java.util.*;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        ApiClient defaultClient = Configuration.getDefaultApiClient();
+        
+        // Configure OAuth2 access token for authorization: oauth2schema
+        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
+        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
+
+        MergeApi apiInstance = new MergeApi();
+        String templateId = templateId_example; // String | templateId
+        try {
+            TemplateContextResponse result = apiInstance.deleteTemplateContext(templateId);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#deleteTemplateContext");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import api.MergeApi;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        MergeApi apiInstance = new MergeApi();
+        String templateId = templateId_example; // String | templateId
+        try {
+            TemplateContextResponse result = apiInstance.deleteTemplateContext(templateId);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#deleteTemplateContext");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+
+String *templateId = templateId_example; // templateId
+
+MergeApi *apiInstance = [[MergeApi alloc] init];
+
+// Delete template context
+[apiInstance deleteTemplateContextWith:templateId
+              completionHandler: ^(TemplateContextResponse output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+var defaultClient = .ApiClient.instance;
+
+// Configure OAuth2 access token for authorization: oauth2schema
+var oauth2schema = defaultClient.authentications['oauth2schema'];
+oauth2schema.accessToken = "YOUR ACCESS TOKEN"
+
+var api = new .MergeApi()
+
+var templateId = templateId_example; // {String} templateId
+
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.deleteTemplateContext(templateId, callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using model;
+
+namespace Example
+{
+    public class deleteTemplateContextExample
+    {
+        public void main()
+        {
+            
+            // Configure OAuth2 access token for authorization: oauth2schema
+            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+            var apiInstance = new MergeApi();
+            var templateId = templateId_example;  // String | templateId
+
+            try
+            {
+                // Delete template context
+                TemplateContextResponse result = apiInstance.deleteTemplateContext(templateId);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling MergeApi.deleteTemplateContext: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+setAccessToken('YOUR_ACCESS_TOKEN');
+
+$api_instance = new com.sphereon.sdk.template-processor\Api\MergeApi();
+$templateId = templateId_example; // String | templateId
+
+try {
+    $result = $api_instance->deleteTemplateContext($templateId);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling MergeApi->deleteTemplateContext: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + +
Path parameters
+ + + + + + + + + + +
NameDescription
templateId* + + + +
+
+ + + + + +

Responses

+ +

Status: 200 - Template context deleted

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 404 - Template context not found

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 500 - Internal server error

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

getJob

+
+
+ +
+
+ +

+

Get the merge job definition and current state. Please not that you can differentiate based on http response status

+

+
+ +
/template-processor/merge/0.1/jobs/{jobId}
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template-processor/merge/0.1/jobs/{jobId}"
+
+
+
+
+ +
+

+import com.sphereon.sdk.template-processor.*;
+import com.sphereon.sdk.template-processor.auth.*;
+import com.sphereon.sdk.template-processor.model.*;
+import api.MergeApi;
+
+import java.io.File;
+import java.util.*;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        ApiClient defaultClient = Configuration.getDefaultApiClient();
+        
+        // Configure OAuth2 access token for authorization: oauth2schema
+        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
+        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
+
+        MergeApi apiInstance = new MergeApi();
+        String jobId = jobId_example; // String | jobId
+        try {
+            MergeJobResponse result = apiInstance.getJob(jobId);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#getJob");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import api.MergeApi;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        MergeApi apiInstance = new MergeApi();
+        String jobId = jobId_example; // String | jobId
+        try {
+            MergeJobResponse result = apiInstance.getJob(jobId);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#getJob");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+
+String *jobId = jobId_example; // jobId
+
+MergeApi *apiInstance = [[MergeApi alloc] init];
+
+// Job definition and state
+[apiInstance getJobWith:jobId
+              completionHandler: ^(MergeJobResponse output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+var defaultClient = .ApiClient.instance;
+
+// Configure OAuth2 access token for authorization: oauth2schema
+var oauth2schema = defaultClient.authentications['oauth2schema'];
+oauth2schema.accessToken = "YOUR ACCESS TOKEN"
+
+var api = new .MergeApi()
+
+var jobId = jobId_example; // {String} jobId
+
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.getJob(jobId, callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using model;
+
+namespace Example
+{
+    public class getJobExample
+    {
+        public void main()
+        {
+            
+            // Configure OAuth2 access token for authorization: oauth2schema
+            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+            var apiInstance = new MergeApi();
+            var jobId = jobId_example;  // String | jobId
+
+            try
+            {
+                // Job definition and state
+                MergeJobResponse result = apiInstance.getJob(jobId);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling MergeApi.getJob: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+setAccessToken('YOUR_ACCESS_TOKEN');
+
+$api_instance = new com.sphereon.sdk.template-processor\Api\MergeApi();
+$jobId = jobId_example; // String | jobId
+
+try {
+    $result = $api_instance->getJob($jobId);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling MergeApi->getJob: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + +
Path parameters
+ + + + + + + + + + +
NameDescription
jobId* + + + +
+
+ + + + + +

Responses

+ +

Status: 200 - Merge job returned and Job is done or in error

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 202 - Merge job returned and Job is still processing

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 404 - Invalid job id

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

getJobs

+
+
+ +
+
+ +

+

Get all office text job definitions and their current state.

+

+
+ +
/template-processor/merge/0.1/jobs
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template-processor/merge/0.1/jobs?status="
+
+
+
+
+ +
+

+import com.sphereon.sdk.template-processor.*;
+import com.sphereon.sdk.template-processor.auth.*;
+import com.sphereon.sdk.template-processor.model.*;
+import api.MergeApi;
+
+import java.io.File;
+import java.util.*;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        ApiClient defaultClient = Configuration.getDefaultApiClient();
+        
+        // Configure OAuth2 access token for authorization: oauth2schema
+        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
+        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
+
+        MergeApi apiInstance = new MergeApi();
+        array[String] status = ; // array[String] | A list of status to filter on.
+        try {
+            array[MergeJobResponse] result = apiInstance.getJobs(status);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#getJobs");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import api.MergeApi;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        MergeApi apiInstance = new MergeApi();
+        array[String] status = ; // array[String] | A list of status to filter on.
+        try {
+            array[MergeJobResponse] result = apiInstance.getJobs(status);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#getJobs");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+
+array[String] *status = ; // A list of status to filter on. (optional)
+
+MergeApi *apiInstance = [[MergeApi alloc] init];
+
+// Get all jobs
+[apiInstance getJobsWith:status
+              completionHandler: ^(array[MergeJobResponse] output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+var defaultClient = .ApiClient.instance;
+
+// Configure OAuth2 access token for authorization: oauth2schema
+var oauth2schema = defaultClient.authentications['oauth2schema'];
+oauth2schema.accessToken = "YOUR ACCESS TOKEN"
+
+var api = new .MergeApi()
+
+var opts = { 
+  'status':  // {array[String]} A list of status to filter on.
+};
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.getJobs(opts, callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using model;
+
+namespace Example
+{
+    public class getJobsExample
+    {
+        public void main()
+        {
+            
+            // Configure OAuth2 access token for authorization: oauth2schema
+            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+            var apiInstance = new MergeApi();
+            var status = new array[String](); // array[String] | A list of status to filter on. (optional) 
+
+            try
+            {
+                // Get all jobs
+                array[MergeJobResponse] result = apiInstance.getJobs(status);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling MergeApi.getJobs: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+setAccessToken('YOUR_ACCESS_TOKEN');
+
+$api_instance = new com.sphereon.sdk.template-processor\Api\MergeApi();
+$status = ; // array[String] | A list of status to filter on.
+
+try {
+    $result = $api_instance->getJobs($status);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling MergeApi->getJobs: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + + + + + +
Query parameters
+ + + + + + + + + + +
NameDescription
status + + + +
+
+ +

Responses

+ +

Status: 200 - All office text jobs that have not been deleted

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

getResultStreamById

+
+
+ +
+
+ +

+

Get a merge result document as a binary stream.

+

+
+ +
/template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId}
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X put -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId}"
+
+
+
+
+ +
+

+import com.sphereon.sdk.template-processor.*;
+import com.sphereon.sdk.template-processor.auth.*;
+import com.sphereon.sdk.template-processor.model.*;
+import api.MergeApi;
+
+import java.io.File;
+import java.util.*;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        ApiClient defaultClient = Configuration.getDefaultApiClient();
+        
+        // Configure OAuth2 access token for authorization: oauth2schema
+        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
+        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
+
+        MergeApi apiInstance = new MergeApi();
+        String jobId = jobId_example; // String | jobId
+        String streamId = streamId_example; // String | streamId
+        OutputSettings outputSettings = ; // OutputSettings | outputSettings
+        try {
+            byte[] result = apiInstance.getResultStreamById(jobId, streamId, outputSettings);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#getResultStreamById");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import api.MergeApi;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        MergeApi apiInstance = new MergeApi();
+        String jobId = jobId_example; // String | jobId
+        String streamId = streamId_example; // String | streamId
+        OutputSettings outputSettings = ; // OutputSettings | outputSettings
+        try {
+            byte[] result = apiInstance.getResultStreamById(jobId, streamId, outputSettings);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#getResultStreamById");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+
+String *jobId = jobId_example; // jobId
+String *streamId = streamId_example; // streamId
+OutputSettings *outputSettings = ; // outputSettings (optional)
+
+MergeApi *apiInstance = [[MergeApi alloc] init];
+
+// Get the result file
+[apiInstance getResultStreamByIdWith:jobId
+    streamId:streamId
+    outputSettings:outputSettings
+              completionHandler: ^(byte[] output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+var defaultClient = .ApiClient.instance;
+
+// Configure OAuth2 access token for authorization: oauth2schema
+var oauth2schema = defaultClient.authentications['oauth2schema'];
+oauth2schema.accessToken = "YOUR ACCESS TOKEN"
+
+var api = new .MergeApi()
+
+var jobId = jobId_example; // {String} jobId
+
+var streamId = streamId_example; // {String} streamId
+
+var opts = { 
+  'outputSettings':  // {OutputSettings} outputSettings
+};
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.getResultStreamById(jobId, streamId, opts, callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using model;
+
+namespace Example
+{
+    public class getResultStreamByIdExample
+    {
+        public void main()
+        {
+            
+            // Configure OAuth2 access token for authorization: oauth2schema
+            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+            var apiInstance = new MergeApi();
+            var jobId = jobId_example;  // String | jobId
+            var streamId = streamId_example;  // String | streamId
+            var outputSettings = new OutputSettings(); // OutputSettings | outputSettings (optional) 
+
+            try
+            {
+                // Get the result file
+                byte[] result = apiInstance.getResultStreamById(jobId, streamId, outputSettings);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling MergeApi.getResultStreamById: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+setAccessToken('YOUR_ACCESS_TOKEN');
+
+$api_instance = new com.sphereon.sdk.template-processor\Api\MergeApi();
+$jobId = jobId_example; // String | jobId
+$streamId = streamId_example; // String | streamId
+$outputSettings = ; // OutputSettings | outputSettings
+
+try {
+    $result = $api_instance->getResultStreamById($jobId, $streamId, $outputSettings);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling MergeApi->getResultStreamById: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + +
Path parameters
+ + + + + + + + + + + + + + +
NameDescription
jobId* + + + +
+
streamId* + + + +
+
+ + + +
Body parameters
+ + + + + + + + + + + +
NameDescription
outputSettings + + + +
+
+ + +

Responses

+ +

Status: 200 - Result file successfully returned

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 202 - Result file not yet created. Job is still executing.

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 400 - Result file could not be created.

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

getResultStreamsAsContainer

+
+
+ +
+
+ +

+

Get all documents inside a compressed container as a binary stream.

+

+
+ +
/template-processor/merge/0.1/jobs/{jobId}/result/container
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X put -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template-processor/merge/0.1/jobs/{jobId}/result/container"
+
+
+
+
+ +
+

+import com.sphereon.sdk.template-processor.*;
+import com.sphereon.sdk.template-processor.auth.*;
+import com.sphereon.sdk.template-processor.model.*;
+import api.MergeApi;
+
+import java.io.File;
+import java.util.*;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        ApiClient defaultClient = Configuration.getDefaultApiClient();
+        
+        // Configure OAuth2 access token for authorization: oauth2schema
+        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
+        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
+
+        MergeApi apiInstance = new MergeApi();
+        String jobId = jobId_example; // String | jobId
+        OutputSettings outputSettings = ; // OutputSettings | outputSettings
+        try {
+            byte[] result = apiInstance.getResultStreamsAsContainer(jobId, outputSettings);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#getResultStreamsAsContainer");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import api.MergeApi;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        MergeApi apiInstance = new MergeApi();
+        String jobId = jobId_example; // String | jobId
+        OutputSettings outputSettings = ; // OutputSettings | outputSettings
+        try {
+            byte[] result = apiInstance.getResultStreamsAsContainer(jobId, outputSettings);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#getResultStreamsAsContainer");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+
+String *jobId = jobId_example; // jobId
+OutputSettings *outputSettings = ; // outputSettings (optional)
+
+MergeApi *apiInstance = [[MergeApi alloc] init];
+
+// Get the result file
+[apiInstance getResultStreamsAsContainerWith:jobId
+    outputSettings:outputSettings
+              completionHandler: ^(byte[] output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+var defaultClient = .ApiClient.instance;
+
+// Configure OAuth2 access token for authorization: oauth2schema
+var oauth2schema = defaultClient.authentications['oauth2schema'];
+oauth2schema.accessToken = "YOUR ACCESS TOKEN"
+
+var api = new .MergeApi()
+
+var jobId = jobId_example; // {String} jobId
+
+var opts = { 
+  'outputSettings':  // {OutputSettings} outputSettings
+};
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.getResultStreamsAsContainer(jobId, opts, callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using model;
+
+namespace Example
+{
+    public class getResultStreamsAsContainerExample
+    {
+        public void main()
+        {
+            
+            // Configure OAuth2 access token for authorization: oauth2schema
+            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+            var apiInstance = new MergeApi();
+            var jobId = jobId_example;  // String | jobId
+            var outputSettings = new OutputSettings(); // OutputSettings | outputSettings (optional) 
+
+            try
+            {
+                // Get the result file
+                byte[] result = apiInstance.getResultStreamsAsContainer(jobId, outputSettings);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling MergeApi.getResultStreamsAsContainer: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+setAccessToken('YOUR_ACCESS_TOKEN');
+
+$api_instance = new com.sphereon.sdk.template-processor\Api\MergeApi();
+$jobId = jobId_example; // String | jobId
+$outputSettings = ; // OutputSettings | outputSettings
+
+try {
+    $result = $api_instance->getResultStreamsAsContainer($jobId, $outputSettings);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling MergeApi->getResultStreamsAsContainer: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + +
Path parameters
+ + + + + + + + + + +
NameDescription
jobId* + + + +
+
+ + + +
Body parameters
+ + + + + + + + + + + +
NameDescription
outputSettings + + + +
+
+ + +

Responses

+ +

Status: 200 - Result package successfully created and returned

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 202 - Result file not yet created. Job is still executing.

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 400 - Result file could not be created.

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

getTemplateContext

+
+
+ +
+
+ +

+

Get an existing template context

+

+
+ +
/template-processor/merge/0.1/templates/{templateId}
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template-processor/merge/0.1/templates/{templateId}"
+
+
+
+
+ +
+

+import com.sphereon.sdk.template-processor.*;
+import com.sphereon.sdk.template-processor.auth.*;
+import com.sphereon.sdk.template-processor.model.*;
+import api.MergeApi;
+
+import java.io.File;
+import java.util.*;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        ApiClient defaultClient = Configuration.getDefaultApiClient();
+        
+        // Configure OAuth2 access token for authorization: oauth2schema
+        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
+        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
+
+        MergeApi apiInstance = new MergeApi();
+        String templateId = templateId_example; // String | The template context name unique for your environment
+        try {
+            TemplateContextResponse result = apiInstance.getTemplateContext(templateId);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#getTemplateContext");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import api.MergeApi;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        MergeApi apiInstance = new MergeApi();
+        String templateId = templateId_example; // String | The template context name unique for your environment
+        try {
+            TemplateContextResponse result = apiInstance.getTemplateContext(templateId);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#getTemplateContext");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+
+String *templateId = templateId_example; // The template context name unique for your environment
+
+MergeApi *apiInstance = [[MergeApi alloc] init];
+
+// Get template context
+[apiInstance getTemplateContextWith:templateId
+              completionHandler: ^(TemplateContextResponse output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+var defaultClient = .ApiClient.instance;
+
+// Configure OAuth2 access token for authorization: oauth2schema
+var oauth2schema = defaultClient.authentications['oauth2schema'];
+oauth2schema.accessToken = "YOUR ACCESS TOKEN"
+
+var api = new .MergeApi()
+
+var templateId = templateId_example; // {String} The template context name unique for your environment
+
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.getTemplateContext(templateId, callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using model;
+
+namespace Example
+{
+    public class getTemplateContextExample
+    {
+        public void main()
+        {
+            
+            // Configure OAuth2 access token for authorization: oauth2schema
+            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+            var apiInstance = new MergeApi();
+            var templateId = templateId_example;  // String | The template context name unique for your environment
+
+            try
+            {
+                // Get template context
+                TemplateContextResponse result = apiInstance.getTemplateContext(templateId);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling MergeApi.getTemplateContext: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+setAccessToken('YOUR_ACCESS_TOKEN');
+
+$api_instance = new com.sphereon.sdk.template-processor\Api\MergeApi();
+$templateId = templateId_example; // String | The template context name unique for your environment
+
+try {
+    $result = $api_instance->getTemplateContext($templateId);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling MergeApi->getTemplateContext: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + +
Path parameters
+ + + + + + + + + + +
NameDescription
templateId* + + + +
+
+ + + + + +

Responses

+ +

Status: 200 - Template context found

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 404 - Template context not found

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 500 - Internal server error

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

submitJob

+
+
+ +
+
+ +

+

Submit merge job run.

+

+
+ +
/template-processor/merge/0.1/jobs
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X put -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template-processor/merge/0.1/jobs"
+
+
+
+
+ +
+

+import com.sphereon.sdk.template-processor.*;
+import com.sphereon.sdk.template-processor.auth.*;
+import com.sphereon.sdk.template-processor.model.*;
+import api.MergeApi;
+
+import java.io.File;
+import java.util.*;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        ApiClient defaultClient = Configuration.getDefaultApiClient();
+        
+        // Configure OAuth2 access token for authorization: oauth2schema
+        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
+        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
+
+        MergeApi apiInstance = new MergeApi();
+        MergeSettings mergesettings = ; // MergeSettings | The merge- and output settings
+        try {
+            MergeJobResponse result = apiInstance.submitJob(mergesettings);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#submitJob");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import api.MergeApi;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        MergeApi apiInstance = new MergeApi();
+        MergeSettings mergesettings = ; // MergeSettings | The merge- and output settings
+        try {
+            MergeJobResponse result = apiInstance.submitJob(mergesettings);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#submitJob");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+
+MergeSettings *mergesettings = ; // The merge- and output settings
+
+MergeApi *apiInstance = [[MergeApi alloc] init];
+
+// Submit merge job for processing
+[apiInstance submitJobWith:mergesettings
+              completionHandler: ^(MergeJobResponse output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+var defaultClient = .ApiClient.instance;
+
+// Configure OAuth2 access token for authorization: oauth2schema
+var oauth2schema = defaultClient.authentications['oauth2schema'];
+oauth2schema.accessToken = "YOUR ACCESS TOKEN"
+
+var api = new .MergeApi()
+
+var mergesettings = ; // {MergeSettings} The merge- and output settings
+
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.submitJob(mergesettings, callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using model;
+
+namespace Example
+{
+    public class submitJobExample
+    {
+        public void main()
+        {
+            
+            // Configure OAuth2 access token for authorization: oauth2schema
+            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+            var apiInstance = new MergeApi();
+            var mergesettings = new MergeSettings(); // MergeSettings | The merge- and output settings
+
+            try
+            {
+                // Submit merge job for processing
+                MergeJobResponse result = apiInstance.submitJob(mergesettings);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling MergeApi.submitJob: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+setAccessToken('YOUR_ACCESS_TOKEN');
+
+$api_instance = new com.sphereon.sdk.template-processor\Api\MergeApi();
+$mergesettings = ; // MergeSettings | The merge- and output settings
+
+try {
+    $result = $api_instance->submitJob($mergesettings);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling MergeApi->submitJob: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + + + + +
Body parameters
+ + + + + + + + + + + +
NameDescription
mergesettings * + + + +
+
+ + +

Responses

+ +

Status: 200 - Merge job submitted

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

updateTemplateContext

+
+
+ +
+
+ +

+

Update an existing template context for your environment

+

+
+ +
/template-processor/merge/0.1/templates
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X put -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template-processor/merge/0.1/templates"
+
+
+
+
+ +
+

+import com.sphereon.sdk.template-processor.*;
+import com.sphereon.sdk.template-processor.auth.*;
+import com.sphereon.sdk.template-processor.model.*;
+import api.MergeApi;
+
+import java.io.File;
+import java.util.*;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        ApiClient defaultClient = Configuration.getDefaultApiClient();
+        
+        // Configure OAuth2 access token for authorization: oauth2schema
+        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
+        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
+
+        MergeApi apiInstance = new MergeApi();
+        TemplateContextRequest templateContextRequest = ; // TemplateContextRequest | templateContextRequest
+        try {
+            TemplateContextResponse result = apiInstance.updateTemplateContext(templateContextRequest);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#updateTemplateContext");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import api.MergeApi;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        MergeApi apiInstance = new MergeApi();
+        TemplateContextRequest templateContextRequest = ; // TemplateContextRequest | templateContextRequest
+        try {
+            TemplateContextResponse result = apiInstance.updateTemplateContext(templateContextRequest);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#updateTemplateContext");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+
+TemplateContextRequest *templateContextRequest = ; // templateContextRequest
+
+MergeApi *apiInstance = [[MergeApi alloc] init];
+
+// Update template context
+[apiInstance updateTemplateContextWith:templateContextRequest
+              completionHandler: ^(TemplateContextResponse output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+var defaultClient = .ApiClient.instance;
+
+// Configure OAuth2 access token for authorization: oauth2schema
+var oauth2schema = defaultClient.authentications['oauth2schema'];
+oauth2schema.accessToken = "YOUR ACCESS TOKEN"
+
+var api = new .MergeApi()
+
+var templateContextRequest = ; // {TemplateContextRequest} templateContextRequest
+
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.updateTemplateContext(templateContextRequest, callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using model;
+
+namespace Example
+{
+    public class updateTemplateContextExample
+    {
+        public void main()
+        {
+            
+            // Configure OAuth2 access token for authorization: oauth2schema
+            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+            var apiInstance = new MergeApi();
+            var templateContextRequest = new TemplateContextRequest(); // TemplateContextRequest | templateContextRequest
+
+            try
+            {
+                // Update template context
+                TemplateContextResponse result = apiInstance.updateTemplateContext(templateContextRequest);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling MergeApi.updateTemplateContext: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+setAccessToken('YOUR_ACCESS_TOKEN');
+
+$api_instance = new com.sphereon.sdk.template-processor\Api\MergeApi();
+$templateContextRequest = ; // TemplateContextRequest | templateContextRequest
+
+try {
+    $result = $api_instance->updateTemplateContext($templateContextRequest);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling MergeApi->updateTemplateContext: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + + + + +
Body parameters
+ + + + + + + + + + + +
NameDescription
templateContextRequest * + + + +
+
+ + +

Responses

+ +

Status: 200 - Template context updated

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 404 - Template context not found

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 500 - Internal server error

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ + + + + + + + +
+ +
+
+

uploadTemplateFile

+
+
+ +
+
+ +

+

Upload the Office template file

+

+
+ +
/template-processor/merge/0.1/templates/{templateId}
+ +

+

Usage and SDK Samples

+

+ + + +
+
+

+curl -X post -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template-processor/merge/0.1/templates/{templateId}"
+
+
+
+
+ +
+

+import com.sphereon.sdk.template-processor.*;
+import com.sphereon.sdk.template-processor.auth.*;
+import com.sphereon.sdk.template-processor.model.*;
+import api.MergeApi;
+
+import java.io.File;
+import java.util.*;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        ApiClient defaultClient = Configuration.getDefaultApiClient();
+        
+        // Configure OAuth2 access token for authorization: oauth2schema
+        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
+        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
+
+        MergeApi apiInstance = new MergeApi();
+        String templateId = templateId_example; // String | The template context name unique for your environment
+        file stream = /path/to/file.txt; // file | The template (file/inputstream) to store
+        try {
+            TemplateContextResponse result = apiInstance.uploadTemplateFile(templateId, stream);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#uploadTemplateFile");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + +
+

+import api.MergeApi;
+
+public class MergeApiExample {
+
+    public static void main(String[] args) {
+        MergeApi apiInstance = new MergeApi();
+        String templateId = templateId_example; // String | The template context name unique for your environment
+        file stream = /path/to/file.txt; // file | The template (file/inputstream) to store
+        try {
+            TemplateContextResponse result = apiInstance.uploadTemplateFile(templateId, stream);
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling MergeApi#uploadTemplateFile");
+            e.printStackTrace();
+        }
+    }
+}
+
+                                                  
+
+ + + + +
+

+Configuration *apiConfig = [Configuration sharedConfig];
+
+// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
+[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
+
+
+String *templateId = templateId_example; // The template context name unique for your environment
+file *stream = /path/to/file.txt; // The template (file/inputstream) to store
+
+MergeApi *apiInstance = [[MergeApi alloc] init];
+
+// Upload template file
+[apiInstance uploadTemplateFileWith:templateId
+    stream:stream
+              completionHandler: ^(TemplateContextResponse output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+                                                    
+
+
+

+var  = require('');
+var defaultClient = .ApiClient.instance;
+
+// Configure OAuth2 access token for authorization: oauth2schema
+var oauth2schema = defaultClient.authentications['oauth2schema'];
+oauth2schema.accessToken = "YOUR ACCESS TOKEN"
+
+var api = new .MergeApi()
+
+var templateId = templateId_example; // {String} The template context name unique for your environment
+
+var stream = /path/to/file.txt; // {file} The template (file/inputstream) to store
+
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.uploadTemplateFile(templateId, stream, callback);
+
+                                                    
+
+ + + +
+

+using System;
+using System.Diagnostics;
+using .Api;
+using .Client;
+using model;
+
+namespace Example
+{
+    public class uploadTemplateFileExample
+    {
+        public void main()
+        {
+            
+            // Configure OAuth2 access token for authorization: oauth2schema
+            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
+
+            var apiInstance = new MergeApi();
+            var templateId = templateId_example;  // String | The template context name unique for your environment
+            var stream = new file(); // file | The template (file/inputstream) to store
+
+            try
+            {
+                // Upload template file
+                TemplateContextResponse result = apiInstance.uploadTemplateFile(templateId, stream);
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling MergeApi.uploadTemplateFile: " + e.Message );
+            }
+        }
+    }
+}
+
+                                                    
+
+ + +
+

+setAccessToken('YOUR_ACCESS_TOKEN');
+
+$api_instance = new com.sphereon.sdk.template-processor\Api\MergeApi();
+$templateId = templateId_example; // String | The template context name unique for your environment
+$stream = /path/to/file.txt; // file | The template (file/inputstream) to store
+
+try {
+    $result = $api_instance->uploadTemplateFile($templateId, $stream);
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling MergeApi->uploadTemplateFile: ', $e->getMessage(), PHP_EOL;
+}
+
+                                                  
+
+ +
+ + + + + +

Parameters

+ + + +
Path parameters
+ + + + + + + + + + +
NameDescription
templateId* + + + +
+
+ + + + + +

Responses

+ +

Status: 200 - Template uploaded and stored

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 404 - Template context not found

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + +

Status: 500 - Internal server error

+ + + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+ +
+ + + + + + +
+ + + + + + + +
+
+ Generated 2017-07-28T16:30:14.795+02:00 +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + diff --git a/java8-jersey2/.gitignore b/java8-jersey2/.gitignore new file mode 100644 index 0000000..a530464 --- /dev/null +++ b/java8-jersey2/.gitignore @@ -0,0 +1,21 @@ +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# exclude jar for gradle wrapper +!gradle/wrapper/*.jar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +# build files +**/target +target +.gradle +build diff --git a/java8-jersey2/.swagger-codegen-ignore b/java8-jersey2/.swagger-codegen-ignore new file mode 100644 index 0000000..c5fa491 --- /dev/null +++ b/java8-jersey2/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/java8-jersey2/.travis.yml b/java8-jersey2/.travis.yml new file mode 100644 index 0000000..33e7947 --- /dev/null +++ b/java8-jersey2/.travis.yml @@ -0,0 +1,29 @@ +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +language: java +jdk: + - oraclejdk8 + - oraclejdk7 +before_install: + # ensure gradlew has proper permission + - chmod a+x ./gradlew +script: + # test using maven + - mvn test + # uncomment below to test using gradle + # - gradle test + # uncomment below to test using sbt + # - sbt test diff --git a/java8-jersey2/LICENSE b/java8-jersey2/LICENSE new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/java8-jersey2/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/java8-jersey2/README.md b/java8-jersey2/README.md new file mode 100644 index 0000000..3417e86 --- /dev/null +++ b/java8-jersey2/README.md @@ -0,0 +1,149 @@ +# template-processor-sdk-java8-jersey2 + +## Requirements + +Building the API client library requires [Maven](https://maven.apache.org/) to be installed. + +## Installation + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn install +``` + +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: + +```shell +mvn deploy +``` + +Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information. + +### Maven users + +Add this dependency to your project's POM: + +```xml + + com.sphereon.sdk + template-processor-sdk-java8-jersey2 + 0.1.0 + compile + +``` + +### Gradle users + +Add this dependency to your project's build file: + +```groovy +compile "com.sphereon.sdk:template-processor-sdk-java8-jersey2:0.1.0" +``` + +### Others + +At first generate the JAR by executing: + + mvn package + +Then manually install the following JARs: + +* target/template-processor-sdk-java8-jersey2-0.1.0.jar +* target/lib/*.jar + +## Getting Started + +Please follow the [installation](#installation) instruction and execute the following Java code: + +```java + +import com.sphereon.sdk.template_processor.handler.*; +import com.sphereon.sdk.template_processor.handler.auth.*; +import com.sphereon.sdk.template_processor.model.*; +import com.sphereon.sdk.template_processor.api.MergeApi; + +import java.io.File; +import java.util.*; + +public class MergeApiExample { + + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + + // Configure OAuth2 access token for authorization: oauth2schema + OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); + oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + + MergeApi apiInstance = new MergeApi(); + String payload = "payload_example"; // String | The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] + try { + DataSetResponse result = apiInstance.createDataSet(payload); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MergeApi#createDataSet"); + e.printStackTrace(); + } + } +} + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://gw.api.cloud.sphereon.com/* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*MergeApi* | [**createDataSet**](docs/MergeApi.md#createDataSet) | **POST** /template-processor/merge/0.1/datasets | Store dataset +*MergeApi* | [**createTemplateContext**](docs/MergeApi.md#createTemplateContext) | **POST** /template-processor/merge/0.1/templates | Create template context +*MergeApi* | [**deleteDataSet**](docs/MergeApi.md#deleteDataSet) | **DELETE** /template-processor/merge/0.1/datasets/{dataSetId} | Delete a stored data set +*MergeApi* | [**deleteJob**](docs/MergeApi.md#deleteJob) | **DELETE** /template-processor/merge/0.1/jobs/{jobId} | Delete a job manually +*MergeApi* | [**deleteTemplateContext**](docs/MergeApi.md#deleteTemplateContext) | **DELETE** /template-processor/merge/0.1/templates/{templateId} | Delete template context +*MergeApi* | [**getJob**](docs/MergeApi.md#getJob) | **GET** /template-processor/merge/0.1/jobs/{jobId} | Job definition and state +*MergeApi* | [**getJobs**](docs/MergeApi.md#getJobs) | **GET** /template-processor/merge/0.1/jobs | Get all jobs +*MergeApi* | [**getResultStreamById**](docs/MergeApi.md#getResultStreamById) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file +*MergeApi* | [**getResultStreamsAsContainer**](docs/MergeApi.md#getResultStreamsAsContainer) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/container | Get the result file +*MergeApi* | [**getTemplateContext**](docs/MergeApi.md#getTemplateContext) | **GET** /template-processor/merge/0.1/templates/{templateId} | Get template context +*MergeApi* | [**submitJob**](docs/MergeApi.md#submitJob) | **PUT** /template-processor/merge/0.1/jobs | Submit merge job for processing +*MergeApi* | [**updateTemplateContext**](docs/MergeApi.md#updateTemplateContext) | **PUT** /template-processor/merge/0.1/templates | Update template context +*MergeApi* | [**uploadTemplateFile**](docs/MergeApi.md#uploadTemplateFile) | **POST** /template-processor/merge/0.1/templates/{templateId} | Upload template file + + +## Documentation for Models + + - [DataSetResponse](docs/DataSetResponse.md) + - [Error](docs/Error.md) + - [ErrorResponse](docs/ErrorResponse.md) + - [Lifecycle](docs/Lifecycle.md) + - [MergeJob](docs/MergeJob.md) + - [MergeJobResponse](docs/MergeJobResponse.md) + - [MergeSettings](docs/MergeSettings.md) + - [OutputSettings](docs/OutputSettings.md) + - [OwnerInfo](docs/OwnerInfo.md) + - [StreamLocation](docs/StreamLocation.md) + - [TemplateContext](docs/TemplateContext.md) + - [TemplateContextRequest](docs/TemplateContextRequest.md) + - [TemplateContextResponse](docs/TemplateContextResponse.md) + + +## Documentation for Authorization + +Authentication schemes defined for the API: +### oauth2schema + +- **Type**: OAuth +- **Flow**: application +- **Authorizatoin URL**: +- **Scopes**: + - global: accessEverything + + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. + +## Author + +dev@sphereon.com + diff --git a/java8-jersey2/build.gradle b/java8-jersey2/build.gradle new file mode 100644 index 0000000..42e00d0 --- /dev/null +++ b/java8-jersey2/build.gradle @@ -0,0 +1,113 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' + +group = 'com.sphereon.sdk' +version = '0.1.0' + +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.5.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' + } +} + +repositories { + jcenter() +} + + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 23 + buildToolsVersion '23.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 23 + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided 'javax.annotation:jsr250-api:1.0' + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDir + task.destinationDir = project.file("${project.buildDir}/outputs/jar") + task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task); + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven' + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + install { + repositories.mavenInstaller { + pom.artifactId = 'template-processor-sdk-java8-jersey2' + } + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +ext { + swagger_annotations_version = "1.5.8" + jackson_version = "2.7.5" + jersey_version = "2.22.2" + junit_version = "4.12" +} + +dependencies { + compile "io.swagger:swagger-annotations:$swagger_annotations_version" + compile "org.glassfish.jersey.core:jersey-client:$jersey_version" + compile "org.glassfish.jersey.media:jersey-media-multipart:$jersey_version" + compile "org.glassfish.jersey.media:jersey-media-json-jackson:$jersey_version" + compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" + compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" + compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version" + compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" + compile "com.brsanthu:migbase64:2.2" + testCompile "junit:junit:$junit_version" +} diff --git a/java8-jersey2/build.sbt b/java8-jersey2/build.sbt new file mode 100644 index 0000000..df5521b --- /dev/null +++ b/java8-jersey2/build.sbt @@ -0,0 +1,24 @@ +lazy val root = (project in file(".")). + settings( + organization := "com.sphereon.sdk", + name := "template-processor-sdk-java8-jersey2", + version := "0.1.0", + scalaVersion := "2.11.4", + scalacOptions ++= Seq("-feature"), + javacOptions in compile ++= Seq("-Xlint:deprecation"), + publishArtifact in (Compile, packageDoc) := false, + resolvers += Resolver.mavenLocal, + libraryDependencies ++= Seq( + "io.swagger" % "swagger-annotations" % "1.5.8", + "org.glassfish.jersey.core" % "jersey-client" % "2.22.2", + "org.glassfish.jersey.media" % "jersey-media-multipart" % "2.22.2", + "org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.22.2", + "com.fasterxml.jackson.core" % "jackson-core" % "2.7.5", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.7.5", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.7.5", + "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.7.5", + "com.brsanthu" % "migbase64" % "2.2", + "junit" % "junit" % "4.12" % "test", + "com.novocode" % "junit-interface" % "0.10" % "test" + ) + ) diff --git a/java8-jersey2/docs/DataSetResponse.md b/java8-jersey2/docs/DataSetResponse.md new file mode 100644 index 0000000..3e7502d --- /dev/null +++ b/java8-jersey2/docs/DataSetResponse.md @@ -0,0 +1,22 @@ + +# DataSetResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**completionTime** | [**OffsetDateTime**](OffsetDateTime.md) | The completion date/time of this template in ISO 8601 format | [optional] +**creationTime** | [**OffsetDateTime**](OffsetDateTime.md) | The creation date/time of this template in ISO 8601 format | [optional] +**id** | **String** | Unique dataset id | +**status** | [**StatusEnum**](#StatusEnum) | The status of the template | + + + +## Enum: StatusEnum +Name | Value +---- | ----- +CREATED | "CREATED" +UPDATED | "UPDATED" +DELETED | "DELETED" + + + diff --git a/java8-jersey2/docs/Error.md b/java8-jersey2/docs/Error.md new file mode 100644 index 0000000..249e09f --- /dev/null +++ b/java8-jersey2/docs/Error.md @@ -0,0 +1,22 @@ + +# Error + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **String** | | +**level** | [**LevelEnum**](#LevelEnum) | | +**cause** | [**Error**](Error.md) | | [optional] +**message** | **String** | | + + + +## Enum: LevelEnum +Name | Value +---- | ----- +INFO | "INFO" +WARNING | "WARNING" +FATAL | "FATAL" + + + diff --git a/java8-jersey2/docs/ErrorResponse.md b/java8-jersey2/docs/ErrorResponse.md new file mode 100644 index 0000000..7132a3b --- /dev/null +++ b/java8-jersey2/docs/ErrorResponse.md @@ -0,0 +1,10 @@ + +# ErrorResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**List<Error>**](Error.md) | | [optional] + + + diff --git a/java8-jersey2/docs/Lifecycle.md b/java8-jersey2/docs/Lifecycle.md new file mode 100644 index 0000000..b53a347 --- /dev/null +++ b/java8-jersey2/docs/Lifecycle.md @@ -0,0 +1,27 @@ + +# Lifecycle + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**actionTime** | [**OffsetDateTime**](OffsetDateTime.md) | The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation | [optional] +**action** | [**ActionEnum**](#ActionEnum) | | [optional] +**type** | [**TypeEnum**](#TypeEnum) | | [optional] + + + +## Enum: ActionEnum +Name | Value +---- | ----- +DELETE | "DELETE" + + + +## Enum: TypeEnum +Name | Value +---- | ----- +RETRIEVAL | "RETRIEVAL" +TIME | "TIME" + + + diff --git a/java8-jersey2/docs/MergeApi.md b/java8-jersey2/docs/MergeApi.md new file mode 100644 index 0000000..846fa0a --- /dev/null +++ b/java8-jersey2/docs/MergeApi.md @@ -0,0 +1,718 @@ +# MergeApi + +All URIs are relative to *https://gw.api.cloud.sphereon.com/* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createDataSet**](MergeApi.md#createDataSet) | **POST** /template-processor/merge/0.1/datasets | Store dataset +[**createTemplateContext**](MergeApi.md#createTemplateContext) | **POST** /template-processor/merge/0.1/templates | Create template context +[**deleteDataSet**](MergeApi.md#deleteDataSet) | **DELETE** /template-processor/merge/0.1/datasets/{dataSetId} | Delete a stored data set +[**deleteJob**](MergeApi.md#deleteJob) | **DELETE** /template-processor/merge/0.1/jobs/{jobId} | Delete a job manually +[**deleteTemplateContext**](MergeApi.md#deleteTemplateContext) | **DELETE** /template-processor/merge/0.1/templates/{templateId} | Delete template context +[**getJob**](MergeApi.md#getJob) | **GET** /template-processor/merge/0.1/jobs/{jobId} | Job definition and state +[**getJobs**](MergeApi.md#getJobs) | **GET** /template-processor/merge/0.1/jobs | Get all jobs +[**getResultStreamById**](MergeApi.md#getResultStreamById) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file +[**getResultStreamsAsContainer**](MergeApi.md#getResultStreamsAsContainer) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/container | Get the result file +[**getTemplateContext**](MergeApi.md#getTemplateContext) | **GET** /template-processor/merge/0.1/templates/{templateId} | Get template context +[**submitJob**](MergeApi.md#submitJob) | **PUT** /template-processor/merge/0.1/jobs | Submit merge job for processing +[**updateTemplateContext**](MergeApi.md#updateTemplateContext) | **PUT** /template-processor/merge/0.1/templates | Update template context +[**uploadTemplateFile**](MergeApi.md#uploadTemplateFile) | **POST** /template-processor/merge/0.1/templates/{templateId} | Upload template file + + + +# **createDataSet** +> DataSetResponse createDataSet(payload) + +Store dataset + +Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String payload = "payload_example"; // String | The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] +try { + DataSetResponse result = apiInstance.createDataSet(payload); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#createDataSet"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **payload** | **String**| The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] | + +### Return type + +[**DataSetResponse**](DataSetResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + + +# **createTemplateContext** +> TemplateContextResponse createTemplateContext(templateRequest) + +Create template context + +Create a unique template context for your environment + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +TemplateContextRequest templateRequest = new TemplateContextRequest(); // TemplateContextRequest | The template request +try { + TemplateContextResponse result = apiInstance.createTemplateContext(templateRequest); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#createTemplateContext"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| The template request | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + + +# **deleteDataSet** +> DataSetResponse deleteDataSet(dataSetId) + +Delete a stored data set + +Delete a stored data set + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String dataSetId = "dataSetId_example"; // String | dataSetId +try { + DataSetResponse result = apiInstance.deleteDataSet(dataSetId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#deleteDataSet"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dataSetId** | **String**| dataSetId | + +### Return type + +[**DataSetResponse**](DataSetResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + + +# **deleteJob** +> MergeJobResponse deleteJob(jobId) + +Delete a job manually + +Delete the merge job and all related files + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String jobId = "jobId_example"; // String | jobId +try { + MergeJobResponse result = apiInstance.deleteJob(jobId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#deleteJob"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **String**| jobId | + +### Return type + +[**MergeJobResponse**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + + +# **deleteTemplateContext** +> TemplateContextResponse deleteTemplateContext(templateId) + +Delete template context + +Delete a template context with all history + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String templateId = "templateId_example"; // String | templateId +try { + TemplateContextResponse result = apiInstance.deleteTemplateContext(templateId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#deleteTemplateContext"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **String**| templateId | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + + +# **getJob** +> MergeJobResponse getJob(jobId) + +Job definition and state + +Get the merge job definition and current state. Please not that you can differentiate based on http response status + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String jobId = "jobId_example"; // String | jobId +try { + MergeJobResponse result = apiInstance.getJob(jobId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#getJob"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **String**| jobId | + +### Return type + +[**MergeJobResponse**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + + +# **getJobs** +> List<MergeJobResponse> getJobs(status) + +Get all jobs + +Get all office text job definitions and their current state. + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +List status = Arrays.asList("status_example"); // List | A list of status to filter on. +try { + List result = apiInstance.getJobs(status); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#getJobs"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**List<String>**](String.md)| A list of status to filter on. | [optional] [enum: CREATED, UPDATED, PROCESSING, DONE, ERROR, DELETED] + +### Return type + +[**List<MergeJobResponse>**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + + +# **getResultStreamById** +> byte[] getResultStreamById(jobId, streamId, outputSettings) + +Get the result file + +Get a merge result document as a binary stream. + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String jobId = "jobId_example"; // String | jobId +String streamId = "streamId_example"; // String | streamId +OutputSettings outputSettings = new OutputSettings(); // OutputSettings | outputSettings +try { + byte[] result = apiInstance.getResultStreamById(jobId, streamId, outputSettings); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#getResultStreamById"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **String**| jobId | + **streamId** | **String**| streamId | + **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] + +### Return type + +**byte[]** + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/octet-stream + + +# **getResultStreamsAsContainer** +> byte[] getResultStreamsAsContainer(jobId, outputSettings) + +Get the result file + +Get all documents inside a compressed container as a binary stream. + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String jobId = "jobId_example"; // String | jobId +OutputSettings outputSettings = new OutputSettings(); // OutputSettings | outputSettings +try { + byte[] result = apiInstance.getResultStreamsAsContainer(jobId, outputSettings); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#getResultStreamsAsContainer"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **String**| jobId | + **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] + +### Return type + +**byte[]** + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/octet-stream + + +# **getTemplateContext** +> TemplateContextResponse getTemplateContext(templateId) + +Get template context + +Get an existing template context + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String templateId = "templateId_example"; // String | The template context name unique for your environment +try { + TemplateContextResponse result = apiInstance.getTemplateContext(templateId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#getTemplateContext"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **String**| The template context name unique for your environment | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + + +# **submitJob** +> MergeJobResponse submitJob(mergesettings) + +Submit merge job for processing + +Submit merge job run. + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +MergeSettings mergesettings = new MergeSettings(); // MergeSettings | The merge- and output settings +try { + MergeJobResponse result = apiInstance.submitJob(mergesettings); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#submitJob"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **mergesettings** | [**MergeSettings**](MergeSettings.md)| The merge- and output settings | + +### Return type + +[**MergeJobResponse**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + + +# **updateTemplateContext** +> TemplateContextResponse updateTemplateContext(templateContextRequest) + +Update template context + +Update an existing template context for your environment + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +TemplateContextRequest templateContextRequest = new TemplateContextRequest(); // TemplateContextRequest | templateContextRequest +try { + TemplateContextResponse result = apiInstance.updateTemplateContext(templateContextRequest); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#updateTemplateContext"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateContextRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| templateContextRequest | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + + +# **uploadTemplateFile** +> TemplateContextResponse uploadTemplateFile(templateId, stream) + +Upload template file + +Upload the Office template file + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String templateId = "templateId_example"; // String | The template context name unique for your environment +File stream = new File("/path/to/file.txt"); // File | The template (file/inputstream) to store +try { + TemplateContextResponse result = apiInstance.uploadTemplateFile(templateId, stream); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#uploadTemplateFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **String**| The template context name unique for your environment | + **stream** | **File**| The template (file/inputstream) to store | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json;charset=UTF-8 + diff --git a/java8-jersey2/docs/MergeJob.md b/java8-jersey2/docs/MergeJob.md new file mode 100644 index 0000000..1cebcea --- /dev/null +++ b/java8-jersey2/docs/MergeJob.md @@ -0,0 +1,32 @@ + +# MergeJob + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resultFolderPath** | **String** | The target folder path of result files | [optional] +**completionTime** | [**OffsetDateTime**](OffsetDateTime.md) | The completion date/time of this job in ISO 8601 format | [optional] +**jobId** | **String** | The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation | +**resultContainerId** | **String** | The target container id of result files | [optional] +**creationTime** | [**OffsetDateTime**](OffsetDateTime.md) | The creation date/time of this job in ISO 8601 format | [optional] +**dataSetId** | **String** | Data set id | [optional] +**resultStreams** | [**List<StreamLocation>**](StreamLocation.md) | The storage locations of the result files. | +**headerDataSetIds** | **List<String>** | Header data set ids | [optional] +**mergeSettings** | [**MergeSettings**](MergeSettings.md) | | [optional] +**statusMessage** | **String** | A status message, which can be informational, warning or error. A message here does not indicate an error perse | [optional] +**status** | [**StatusEnum**](#StatusEnum) | The status of the job | + + + +## Enum: StatusEnum +Name | Value +---- | ----- +CREATED | "CREATED" +UPDATED | "UPDATED" +PROCESSING | "PROCESSING" +DONE | "DONE" +ERROR | "ERROR" +DELETED | "DELETED" + + + diff --git a/java8-jersey2/docs/MergeJobResponse.md b/java8-jersey2/docs/MergeJobResponse.md new file mode 100644 index 0000000..9926809 --- /dev/null +++ b/java8-jersey2/docs/MergeJobResponse.md @@ -0,0 +1,25 @@ + +# MergeJobResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**jobId** | **String** | The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation | +**job** | [**MergeJob**](MergeJob.md) | | [optional] +**statusMessage** | **String** | A status message, which can be informational, warning or error. AA message here does not indicate an error perse | [optional] +**status** | [**StatusEnum**](#StatusEnum) | The status of the job | + + + +## Enum: StatusEnum +Name | Value +---- | ----- +CREATED | "CREATED" +UPDATED | "UPDATED" +PROCESSING | "PROCESSING" +DONE | "DONE" +ERROR | "ERROR" +DELETED | "DELETED" + + + diff --git a/java8-jersey2/docs/MergeSettings.md b/java8-jersey2/docs/MergeSettings.md new file mode 100644 index 0000000..3192e2d --- /dev/null +++ b/java8-jersey2/docs/MergeSettings.md @@ -0,0 +1,34 @@ + +# MergeSettings + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lifecycle** | [**Lifecycle**](Lifecycle.md) | | [optional] +**mergeResult** | [**MergeResultEnum**](#MergeResultEnum) | | [optional] +**dataSetId** | **String** | Data set id | +**engine** | [**EngineEnum**](#EngineEnum) | | [optional] +**headerDataSetIds** | **List<String>** | optional header data set ids | [optional] +**templateVersion** | **Integer** | Template version | [optional] +**resultStreamLocation** | [**StreamLocation**](StreamLocation.md) | The output location of the result files. | +**templateId** | **String** | Template id | +**outputSettings** | [**OutputSettings**](OutputSettings.md) | | + + + +## Enum: MergeResultEnum +Name | Value +---- | ----- +SINGLE_FILE | "SINGLE_FILE" +SEPARATE_FILES | "SEPARATE_FILES" + + + +## Enum: EngineEnum +Name | Value +---- | ----- +BASIC | "BASIC" +PREMIUM | "PREMIUM" + + + diff --git a/java8-jersey2/docs/OutputSettings.md b/java8-jersey2/docs/OutputSettings.md new file mode 100644 index 0000000..e1a9c9e --- /dev/null +++ b/java8-jersey2/docs/OutputSettings.md @@ -0,0 +1,42 @@ + +# OutputSettings + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**deliveryFormat** | [**DeliveryFormatEnum**](#DeliveryFormatEnum) | | [optional] +**outputFormat** | [**OutputFormatEnum**](#OutputFormatEnum) | | [optional] + + + +## Enum: DeliveryFormatEnum +Name | Value +---- | ----- +PLAIN | "PLAIN" +ZIP | "ZIP" +_7ZIP | "_7ZIP" + + + +## Enum: OutputFormatEnum +Name | Value +---- | ----- +DOC | "DOC" +DOCX | "DOCX" +RTF | "RTF" +PDF | "PDF" +XPS | "XPS" +SVG | "SVG" +HTML | "HTML" +ODT | "ODT" +TIFF | "TIFF" +PNG | "PNG" +BMP | "BMP" +JPEG | "JPEG" +TXT | "TXT" +XML | "XML" +JSON | "JSON" +DEFAULT | "DEFAULT" + + + diff --git a/java8-jersey2/docs/OwnerInfo.md b/java8-jersey2/docs/OwnerInfo.md new file mode 100644 index 0000000..245929a --- /dev/null +++ b/java8-jersey2/docs/OwnerInfo.md @@ -0,0 +1,13 @@ + +# OwnerInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**phone** | **String** | The owner's phone number | [optional] +**companyDepartment** | **String** | The owner's company/department | [optional] +**name** | **String** | The owner's name | [optional] +**email** | **String** | The owner's email address | [optional] + + + diff --git a/java8-jersey2/docs/StreamLocation.md b/java8-jersey2/docs/StreamLocation.md new file mode 100644 index 0000000..9bfe3a2 --- /dev/null +++ b/java8-jersey2/docs/StreamLocation.md @@ -0,0 +1,13 @@ + +# StreamLocation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**folderPath** | **String** | | [optional] +**originalFileName** | **String** | | [optional] +**containerId** | **String** | | [optional] +**fileId** | **String** | | [optional] + + + diff --git a/java8-jersey2/docs/TemplateContext.md b/java8-jersey2/docs/TemplateContext.md new file mode 100644 index 0000000..e0e23c7 --- /dev/null +++ b/java8-jersey2/docs/TemplateContext.md @@ -0,0 +1,23 @@ + +# TemplateContext + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**templateType** | [**TemplateTypeEnum**](#TemplateTypeEnum) | | +**templateFileLocations** | [**Map<String, StreamLocation>**](StreamLocation.md) | The template files (versioned) | [optional] +**description** | **String** | The template description | [optional] +**ownerInfo** | [**OwnerInfo**](OwnerInfo.md) | | [optional] +**id** | **String** | | [optional] +**templateId** | **String** | The template context id | [optional] + + + +## Enum: TemplateTypeEnum +Name | Value +---- | ----- +OFFICE | "OFFICE" +FREEMARKER | "FREEMARKER" + + + diff --git a/java8-jersey2/docs/TemplateContextRequest.md b/java8-jersey2/docs/TemplateContextRequest.md new file mode 100644 index 0000000..534cbd2 --- /dev/null +++ b/java8-jersey2/docs/TemplateContextRequest.md @@ -0,0 +1,21 @@ + +# TemplateContextRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**templateType** | [**TemplateTypeEnum**](#TemplateTypeEnum) | | +**description** | **String** | | [optional] +**ownerInfo** | [**OwnerInfo**](OwnerInfo.md) | | [optional] +**templateId** | **String** | The template context id | [optional] + + + +## Enum: TemplateTypeEnum +Name | Value +---- | ----- +OFFICE | "OFFICE" +FREEMARKER | "FREEMARKER" + + + diff --git a/java8-jersey2/docs/TemplateContextResponse.md b/java8-jersey2/docs/TemplateContextResponse.md new file mode 100644 index 0000000..8814408 --- /dev/null +++ b/java8-jersey2/docs/TemplateContextResponse.md @@ -0,0 +1,23 @@ + +# TemplateContextResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**creationTime** | [**OffsetDateTime**](OffsetDateTime.md) | The creation date/time of this response in ISO 8601 format | [optional] +**context** | [**TemplateContext**](TemplateContext.md) | | [optional] +**id** | **String** | Unique template context id | +**status** | [**StatusEnum**](#StatusEnum) | The status of the template | + + + +## Enum: StatusEnum +Name | Value +---- | ----- +CREATED | "CREATED" +UPDATED | "UPDATED" +DELETED | "DELETED" +PROCESSING | "PROCESSING" + + + diff --git a/java8-jersey2/git_push.sh b/java8-jersey2/git_push.sh new file mode 100644 index 0000000..ed37461 --- /dev/null +++ b/java8-jersey2/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/java8-jersey2/gradle.properties b/java8-jersey2/gradle.properties new file mode 100644 index 0000000..05644f0 --- /dev/null +++ b/java8-jersey2/gradle.properties @@ -0,0 +1,2 @@ +# Uncomment to build for Android +#target = android \ No newline at end of file diff --git a/java8-jersey2/gradle/wrapper/gradle-wrapper.jar b/java8-jersey2/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..2c6137b87896c8f70315ae454e00a969ef5f6019 GIT binary patch literal 53639 zcmafaW0a=B^559DjdyI@wr$%scWm3Xy<^+Pj_sKpY&N+!|K#4>Bz;ajPk*RBjZ;RV75EK*;qpZCo(BB5~-#>pF^k0$_Qx&3rs}{XFZ)$uJU-ZpbB>L3?|knJ{J+ge{%=bI`#Yn9v&Fxx>fd=_|H)(FY-DO{ z_Wxu>{a02GXCp^PGw1(fh-I*;dGTM?mA^##pNEJ#c-Y%I7@3kW(VN&Bxw!bn$iWOU zB8BZ)vT4(}GX%q~h3EYwbR?$d6|xnvg_e@4>dl5l+%FtPbGqa`;Uk##t$#g&CK4GO zz%my0ZR1Fv@~b2_>T0cBP)ECz-Uc^nW9e+`W4!=mSJPopgoe3A(NMzBd0mR?$&3XA zRL1}bJ2Q%R#bWHrC`j_)tPKMEyHuGSpdJMhT(Ob(e9H+#=Skp%#jzj=BVvc(-RSWB z{_T`UcEeWD{z`!3-y;_N|Ljr4%f;2qPSM%n?_s%GnYsM!d3p)CxmudpyIPqTxjH!i z;}A+!>>N;pko++K5n~I7m4>yco2%Zc$59RohB(l%KcJc9s^nw^?2JGy>O4#x5+CZH zqU~7kA>WE)ngvsdfKhLUX0Lc3r+In0Uyn}LZhm?n){&LHNJws546du%pia=j zyH8CD{^Qx%kFe@kX*$B!DxLa(Y?BO32sm8%#_ynjU-m>PJbabL`~0Ai zeJm<6okftSJUd2!X(>}i#KAh-NR2!Kg%c2JD=G|T%@Q0JQzqKB)Qc4E-{ZF=#PGZg zior4-caRB-Jj;l}Xb_!)TjB`jC}})6z~3AsRE&t~CO&)g{dqM0iK;lvav8?kE1< zmCrHxDZe?&rEK7M4tG-i!`Zk-*IzSk0M0&Ul8+J>*UD(A^;bAFDcz>d&lzAlw}b## zjfu@)rAou-86EN%8_Nv;%bNUmy*<6sbgB9)ZCihdSh_VT2iGFv+T8p&Z&wO02nKtdx?eZh^=*<>SZHSn(Pv)bgn{ zb15>YnVnJ^PO025c~^uK&W1C1XTs1az44L~-9Z-fU3{VvA?T& zdpi&S`mZ|$tMuN{{i|O}fAx#*KkroHe;6z^7c*x`2Rk!a2L~HB$A4@(Rz*hvM+og( zJW+4;S-A$#+Gec-rn8}at+q5gRrNy^iU?Z4Gz_|qzS~sG_EV#m%-VW!jQ>f3jc-Vq zW;~>OqI1Th&*fx#`c^=|A4GGoDp+ZH!n0_fDo-ks3d&GlT=(qzr(?Qw`PHvo3PoU6YJE zu{35)=P`LRm@+=ziAI)7jktM6KHx*v&WHVBYp<~UtR3c?Wv_{a0(k&NF!o#+@|Y6Y z>{||-i0v8N2ntXRrVx~#Z1JMA3C2ki}OkJ4W`WjZIuLByNUEL2HqqKrbi{9a8` zk-w0I$a<6;W6&X<&EbIqul`;nvc+D~{g5al{0oOSp~ zhg;6nG1Bh-XyOBM63jb_z`7apSsta``K{!Q{}mZ!m4rTmWi^<*BN2dh#PLZ)oXIJY zl#I3@$+8Fvi)m<}lK_}7q~VN%BvT^{q~ayRA7mwHO;*r0ePSK*OFv_{`3m+96HKgt z=nD-=Pv90Ae1p)+SPLT&g(Fdqbcc(Vnk5SFyc|Tq08qS;FJ1K4rBmtns%Su=GZchE zR(^9W-y!{QfeVPBeHpaBA{TZpQ*(d$H-*GI)Y}>X2Lk&27aFkqXE7D?G_iGav2r&P zx3V=8GBGi8agj5!H?lDMr`1nYmvKZj!~0{GMPb!tM=VIJXbTk9q8JRoSPD*CH@4I+ zfG-6{Z=Yb->)MIUmXq-#;=lNCyF1G*W+tW6gdD||kQfW$J_@=Y9KmMD!(t#9-fPcJ z>%&KQC-`%E`{y^i!1u=rJP_hhGErM$GYE3Y@ZzzA2a-PC>yaoDziZT#l+y)tfyR}U z5Epq`ACY|VUVISHESM5$BpWC0FpDRK&qi?G-q%Rd8UwIq&`d(Mqa<@(fH!OfNIgFICEG?j_Gj7FS()kY^P(I!zbl`%HB z7Rx=q2vZFjy^XypORT$^NJv_`Vm7-gkJWYsN5xg>snt5%oG?w1K#l_UH<>4@d0G@3 z)r?|yba6;ksyc+5+8YZ?)NZ+ER!4fIzK>>cs^(;ib7M}asT&)+J=J@U^~ffJ>65V# zt_lyUp52t`vT&gcQ%a6Ca)p8u6v}3iJzf?zsx#e9t)-1OtqD$Mky&Lpz6_v?p0|y4 zI{Nq9z89OxQbsqX)UYj z(BGu`28f8C^e9R2jf0Turq;v+fPCWD*z8!8-Q-_s`ILgwo@mtnjpC_D$J zCz7-()9@8rQ{4qy<5;*%bvX3k$grUQ{Bt;B#w))A+7ih631uN?!_~?i^g+zO^lGK$>O1T1$6VdF~%FKR6~Px%M`ibJG*~uQ>o^r9qLo*`@^ry@KX^$LH0>NGPL%MG8|;8 z@_)h2uvB1M!qjGtZgy~7-O=GUa`&;xEFvC zwIt?+O;Fjwgn3aE%`_XfZEw5ayP+JS8x?I|V3ARbQ5@{JAl1E*5a{Ytc(UkoDKtD# zu)K4XIYno7h3)0~5&93}pMJMDr*mcYM|#(FXS@Pj)(2!cl$)R-GwwrpOW!zZ2|wN) zE|B38xr4_NBv|%_Lpnm$We<_~S{F1x42tph3PAS`0saF^PisF6EDtce+9y6jdITmu zqI-CLeTn2%I3t3z_=e=YGzUX6i5SEujY`j|=aqv#(Q=iWPkKhau@g|%#xVC2$6<{2 zAoimy5vLq6rvBo3rv&^VqtaKt_@Vx^gWN{f4^@i6H??!ra^_KC-ShWC(GBNt3o~T^ zudX<0v!;s$rIflR?~Tu4-D=%~E=glv+1|pg*ea30re-2K@8EqQ{8#WY4X-br_!qpq zL;PRCi^e~EClLpGb1MrsXCqfD2m615mt;EyR3W6XKU=4(A^gFCMMWgn#5o1~EYOH* zOlolGlD;B!j%lRFaoc)q_bOH-O!r}g1Bhlhy*dRoTf-bI%`A`kU)Q=HA9HgCKqq&A z2$_rtL-uIA7`PiJfw380j@M4Fff-?(Xe(aR`4>BZyDN2$2E7QQ1}95@X819fnA(}= za=5VF-%;l}aHSRHCfs(#Qf%dPue~fGpy7qPs*eLX2Aa0+@mPxnS4Wm8@kP7KEL)8s z@tNmawLHST-FS4h%20%lVvd zkXpxWa43E`zX{6-{2c+L9C`l(ZRG8`kO9g7t&hx?>j~5_C;y5u*Bvl79)Bq?@T7bN z=G2?QDa0J3VwCfZG0BjOFP>xz4jtv3LS>jz#1x~b9u1*n9>Y6?u8W?I^~;N{GC<1y} zc&Wz{L`kJUSt=oA=5ZHtNj3PSB%w5^=0(U7GC^zUgcdkujo>ruzyBurtTjKuNf1-+ zzn~oZFXCbR&xq&W{ar~T`@fNef5M$u^-C92HMBo=*``D8Q^ktX z(qT{_R=*EI?-R9nNUFNR#{(Qb;27bM14bjI`c#4RiinHbnS445Jy^%krK%kpE zFw%RVQd6kqsNbiBtH*#jiPu3(%}P7Vhs0G9&Dwb4E-hXO!|whZ!O$J-PU@j#;GrzN zwP9o=l~Nv}4OPvv5rVNoFN>Oj0TC%P>ykicmFOx*dyCs@7XBH|w1k2hb`|3|i^GEL zyg7PRl9eV ztQ1z)v~NwH$ebcMSKc-4D=?G^3sKVG47ZWldhR@SHCr}SwWuj5t!W$&HAA*Wo_9tM zw5vs`2clw`z@~R-#W8d4B8!rFtO}+-$-{6f_`O-^-EhGraqg%$D618&<9KG``D|Rb zQJ&TSE3cfgf8i}I^DLu+-z{{;QM>K3I9~3R9!0~=Y`A1=6`CF#XVH@MWO?3@xa6ev zdw08_9L=>3%)iXA(_CE@ipRQ{Tb+@mxoN^3ktgmt^mJ(u#=_Plt?5qMZOA3&I1&NU zOG+0XTsIkbhGsp(ApF2MphRG^)>vqagn!-%pRnppa%`-l@DLS0KUm8*e9jGT0F%0J z*-6E@Z*YyeZ{eP7DGmxQedo}^+w zM~>&E$5&SW6MxP##J56Eo@0P34XG})MLCuhMyDFf**?tziO?_Ad&Jhd z`jok^B{3ff*7cydrxYjdxX`14`S+34kW^$fxDmNn2%fsQ6+Zou0%U{3Y>L}UIbQbw z*E#{Von}~UEAL?vvihW)4?Kr-R?_?JSN?B?QzhUWj==1VNEieTMuTJ#-nl*c@qP+` zGk@aE0oAD5!9_fO=tDQAt9g0rKTr{Z0t~S#oy5?F3&aWm+igqKi| zK9W3KRS|1so|~dx%90o9+FVuN7)O@by^mL=IX_m^M87i&kT1^#9TCpI@diZ_p$uW3 zbA+-ER9vJ{ii?QIZF=cfZT3#vJEKC|BQhNd zGmxBDLEMnuc*AET~k8g-P-K+S~_(+GE9q6jyIMka(dr}(H% z$*z;JDnyI@6BQ7KGcrv03Hn(abJ_-vqS>5~m*;ZJmH$W`@csQ8ejiC8S#sYTB;AoF zXsd!kDTG#3FOo-iJJpd$C~@8}GQJ$b1A85MXp?1#dHWQu@j~i4L*LG40J}+V=&-(g zh~Hzk(l1$_y}PX}Ypluyiib0%vwSqPaJdy9EZ;?+;lFF8%Kb7cwPD17C}@N z2OF;}QCM4;CDx~d;XnunQAx5mQbL#);}H57I+uB9^v|cmZwuXGkoH-cAJ%nIjSO$E z{BpYdC9poyO5pvdL+ZPWFuK}c8WGEq-#I3myONq^BL%uG`RIoSBTEK9sAeU4UBh7f zzM$s|&NtAGN&>`lp5Ruc%qO^oL;VGnzo9A8{fQn@YoORA>qw;^n2pydq>;Ji9(sPH zLGsEeTIH?_6C3uyWoW(gkmM(RhFkiDuQPXmL7Oes(+4)YIHt+B@i`*%0KcgL&A#ua zAjb8l_tO^Ag!ai3f54t?@{aoW%&Hdst}dglRzQlS=M{O!=?l z*xY2vJ?+#!70RO8<&N^R4p+f=z z*&_e}QT%6-R5Wt66moGfvorp$yE|3=-2_(y`FnL0-7A?h%4NMZ#F#Rcb^}971t5ib zw<20w|C?HVv%|)Q)Pef8tGjwQ+!+<{>IVjr@&SRVO*PyC?Efnsq;Eq{r;U2)1+tgp z)@pZ}gJmzf{m=K@7YA_8X#XK+)F465h%z38{V-K8k%&_GF+g^s&9o6^B-&|MDFI)H zj1ofQL>W(MJLOu3xkkJZV@$}GEG~XBz~WvRjxhT0$jKKZKjuKi$rmR-al}Hb3xDL) z^xGG2?5+vUAo4I;$(JgeVQe9+e)vvJ={pO~05f|J={%dsSLVcF>@F9p4|nYK&hMua zWjNvRod}l~WmGo|LX2j#w$r$y?v^H?Gu(_?(WR_%D@1I@$yMTKqD=Ca2) zWBQmx#A$gMrHe^A8kxAgB}c2R5)14G6%HfpDf$(Di|p8ntcN;Hnk)DR1;toC9zo77 zcWb?&&3h65(bLAte%hstI9o%hZ*{y=8t$^!y2E~tz^XUY2N2NChy;EIBmf(Kl zfU~&jf*}p(r;#MP4x5dI>i`vjo`w?`9^5(vfFjmWp`Ch!2Ig}rkpS|T%g@2h-%V~R zg!*o7OZSU-%)M8D>F^|z+2F|!u1mOt?5^zG%;{^CrV^J?diz9AmF!UsO?Pl79DKvD zo-2==yjbcF5oJY!oF?g)BKmC8-v|iL6VT|Gj!Gk5yaXfhs&GeR)OkZ}=q{exBPv)& zV!QTQBMNs>QQ))>(rZOn0PK+-`|7vKvrjky3-Kmuf8uJ`x6&wsA5S(tMf=m;79Hzv za%lZ(OhM&ZUCHtM~FRd#Uk3Iy%oXe^)!Jci39D(a$51WER+%gIZYP)!}nDtDw_FgPL3e>1ilFN=M(j~V` zjOtRhOB8bX8}*FD0oy}+s@r4XQT;OFH__cEn-G#aYHpJDI4&Zo4y2>uJdbPYe zOMGMvbA6#(p00i1{t~^;RaHmgZtE@we39mFaO0r|CJ0zUk$|1Pp60Q&$A;dm>MfP# zkfdw?=^9;jsLEXsccMOi<+0-z|NZb(#wwkcO)nVxJxkF3g(OvW4`m36ytfPx5e-ujFXf($)cVOn|qt9LL zNr!InmcuVkxEg8=_;E)+`>n2Y0eAIDrklnE=T9Pyct>^4h$VDDy>}JiA=W9JE79<6 zv%hpzeJC)TGX|(gP!MGWRhJV}!fa1mcvY%jC^(tbG3QIcQnTy&8UpPPvIekWM!R?R zKQanRv+YZn%s4bqv1LBgQ1PWcEa;-MVeCk`$^FLYR~v%9b-@&M%giqnFHV;5P5_et z@R`%W>@G<6GYa=JZ)JsNMN?47)5Y3@RY`EVOPzxj;z6bn#jZv|D?Fn#$b}F!a}D9{ ztB_roYj%34c-@~ehWM_z;B{G5;udhY`rBH0|+u#!&KLdnw z;!A%tG{%Ua;}OW$BG`B#^8#K$1wX2K$m`OwL-6;hmh{aiuyTz;U|EKES= z9UsxUpT^ZZyWk0;GO;Fe=hC`kPSL&1GWS7kGX0>+votm@V-lg&OR>0*!Iay>_|5OT zF0w~t01mupvy4&HYKnrG?sOsip%=<>nK}Bxth~}g)?=Ax94l_=mC{M@`bqiKtV5vf zIP!>8I;zHdxsaVt9K?{lXCc$%kKfIwh&WM__JhsA?o$!dzxP znoRU4ZdzeN3-W{6h~QQSos{-!W@sIMaM z4o?97?W5*cL~5%q+T@>q%L{Yvw(a2l&68hI0Ra*H=ZjU!-o@3(*7hIKo?I7$gfB(Vlr!62-_R-+T;I0eiE^><*1_t|scfB{r9+a%UxP~CBr zl1!X^l01w8o(|2da~Mca)>Mn}&rF!PhsP_RIU~7)B~VwKIruwlUIlOI5-yd4ci^m{ zBT(H*GvKNt=l7a~GUco)C*2t~7>2t?;V{gJm=WNtIhm4x%KY>Rm(EC^w3uA{0^_>p zM;Na<+I<&KwZOUKM-b0y6;HRov=GeEi&CqEG9^F_GR*0RSM3ukm2c2s{)0<%{+g78 zOyKO%^P(-(U09FO!75Pg@xA{p+1$*cD!3=CgW4NO*p}&H8&K`(HL&$TH2N-bf%?JL zVEWs;@_UDD7IoM&P^(k-U?Gs*sk=bLm+f1p$ggYKeR_7W>Zz|Dl{{o*iYiB1LHq`? ztT)b^6Pgk!Kn~ozynV`O(hsUI52|g{0{cwdQ+=&@$|!y8{pvUC_a5zCemee6?E{;P zVE9;@3w92Nu9m_|x24gtm23{ST8Bp;;iJlhaiH2DVcnYqot`tv>!xiUJXFEIMMP(ZV!_onqyQtB_&x}j9 z?LXw;&z%kyYjyP8CQ6X);-QW^?P1w}&HgM}irG~pOJ()IwwaDp!i2$|_{Ggvw$-%K zp=8N>0Fv-n%W6{A8g-tu7{73N#KzURZl;sb^L*d%leKXp2Ai(ZvO96T#6*!73GqCU z&U-NB*0p@?f;m~1MUN}mfdpBS5Q-dbhZ$$OWW=?t8bT+R5^vMUy$q$xY}ABi60bb_ z9;fj~2T2Ogtg8EDNr4j96{@+9bRP#Li7YDK1Jh8|Mo%NON|bYXi~D(W8oiC2SSE#p z=yQ0EP*}Z)$K$v?MJp8s=xroI@gSp&y!De;aik!U7?>3!sup&HY{6!eElc+?ZW*|3 zjJ;Nx>Kn@)3WP`{R821FpY6p1)yeJPi6yfq=EffesCZjO$#c;p!sc8{$>M-i#@fCt zw?GQV4MTSvDH(NlD2S*g-YnxCDp*%|z9^+|HQ(#XI0Pa8-Io=pz8C&Lp?23Y5JopL z!z_O3s+AY&`HT%KO}EB73{oTar{hg)6J7*KI;_Gy%V%-oO3t+vcyZ?;&%L z3t4A%Ltf=2+f8qITmoRfolL;I__Q8Z&K9*+_f#Sue$2C;xTS@%Z*z-lOAF-+gj1C$ zKEpt`_qg;q^41dggeNsJv#n=5i+6Wyf?4P_a=>s9n(ET_K|*zvh633Mv3Xm3OE!n` zFk^y65tStyk4aamG*+=5V^UePR2e0Fbt7g$({L1SjOel~1^9SmP2zGJ)RZX(>6u4^ zQ78wF_qtS~6b+t&mKM=w&Dt=k(oWMA^e&V#&Y5dFDc>oUn+OU0guB~h3};G1;X=v+ zs_8IR_~Y}&zD^=|P;U_xMA{Ekj+lHN@_n-4)_cHNj0gY4(Lx1*NJ^z9vO>+2_lm4N zo5^}vL2G%7EiPINrH-qX77{y2c*#;|bSa~fRN2)v=)>U@;YF}9H0XR@(+=C+kT5_1 zy?ZhA&_&mTY7O~ad|LX+%+F{GTgE0K8OKaC2@NlC1{j4Co8;2vcUbGpA}+hBiDGCS zl~yxngtG}PI$M*JZYOi{Ta<*0f{3dzV0R}yIV7V>M$aX=TNPo|kS;!!LP3-kbKWj` zR;R%bSf%+AA#LMkG$-o88&k4bF-uIO1_OrXb%uFp((Pkvl@nVyI&^-r5p}XQh`9wL zKWA0SMJ9X|rBICxLwhS6gCTVUGjH&)@nofEcSJ-t4LTj&#NETb#Z;1xu(_?NV@3WH z;c(@t$2zlY@$o5Gy1&pvja&AM`YXr3aFK|wc+u?%JGHLRM$J2vKN~}5@!jdKBlA>;10A(*-o2>n_hIQ7&>E>TKcQoWhx7um zx+JKx)mAsP3Kg{Prb(Z7b};vw&>Tl_WN)E^Ew#Ro{-Otsclp%Ud%bb`8?%r>kLpjh z@2<($JO9+%V+To>{K?m76vT>8qAxhypYw;Yl^JH@v9^QeU01$3lyvRt^C#(Kr#1&2 ziOa@LG9p6O=jO6YCVm-d1OB+_c858dtHm>!h6DUQ zj?dKJvwa2OUJ@qv4!>l1I?bS$Rj zdUU&mofGqgLqZ2jGREYM>;ubg@~XE>T~B)9tM*t-GmFJLO%^tMWh-iWD9tiYqN>eZ zuCTF%GahsUr#3r3I5D*SaA75=3lfE!SpchB~1Xk>a7Ik!R%vTAqhO z#H?Q}PPN8~@>ZQ^rAm^I=*z>a(M4Hxj+BKrRjJcRr42J@DkVoLhUeVWjEI~+)UCRs zja$08$Ff@s9!r47##j1A5^B6br{<%L5uW&8t%_te(t@c|4Fane;UzM{jKhXfC zQa|k^)d*t}!<)K)(nnDxQh+Q?e@YftzoGIIG?V?~$cDY_;kPF>N}C9u7YcZzjzc7t zx3Xi|M5m@PioC>dCO$ia&r=5ZLdGE8PXlgab`D}>z`dy(+;Q%tz^^s*@5D)gll+QL z6@O3@K6&zrhitg~{t*EQ>-YN zy&k{89XF*^mdeRJp{#;EAFi_U<7}|>dl^*QFg**9wzlA#N9!`Qnc68+XRbO-Za=t zy@wz`mi0MmgE?4b>L$q&!%B!6MC7JjyG#Qvwj{d8)bdF`hA`LWSv+lBIs(3~hKSQ^0Se!@QOt;z5`!;Wjy1l8w=(|6%GPeK)b)2&Ula zoJ#7UYiJf>EDwi%YFd4u5wo;2_gb`)QdsyTm-zIX954I&vLMw&_@qLHd?I~=2X}%1 zcd?XuDYM)(2^~9!3z)1@hrW`%-TcpKB1^;IEbz=d0hv4+jtH;wX~%=2q7YW^C67Fk zyxhyP=Au*oC7n_O>l)aQgISa=B$Be8x3eCv5vzC%fSCn|h2H#0`+P1D*PPuPJ!7Hs z{6WlvyS?!zF-KfiP31)E&xYs<)C03BT)N6YQYR*Be?;bPp>h?%RAeQ7@N?;|sEoQ% z4FbO`m}Ae_S79!jErpzDJ)d`-!A8BZ+ASx>I%lITl;$st<;keU6oXJgVi?CJUCotEY>)blbj&;Qh zN*IKSe7UpxWPOCl1!d0I*VjT?k6n3opl8el=lonT&1Xt8T{(7rpV(?%jE~nEAx_mK z2x=-+Sl-h<%IAsBz1ciQ_jr9+nX57O=bO_%VtCzheWyA}*Sw!kN-S9_+tM}G?KEqqx1H036ELVw3Ja0!*Kr-Qo>)t*?aj2$x;CajQ@t`vbVbNp1Oczu@ zIKB+{5l$S;n(ny4#$RSd#g$@+V+qpAU&pBORg2o@QMHYLxS;zGOPnTA`lURgS{%VA zujqnT8gx7vw18%wg2)A>Kn|F{yCToqC2%)srDX&HV#^`^CyAG4XBxu7QNb(Ngc)kN zPoAhkoqR;4KUlU%%|t2D8CYQ2tS2|N#4ya9zsd~cIR=9X1m~a zq1vs3Y@UjgzTk#$YOubL*)YvaAO`Tw+x8GwYPEqbiAH~JNB?Q@9k{nAuAbv)M=kKn zMgOOeEKdf8OTO|`sVCnx_UqR>pFDlXMXG*KdhoM9NRiwYgkFg7%1%0B2UWn_9{BBW zi(Ynp7L|1~Djhg=G&K=N`~Bgoz}Bu0TR6WsI&MC@&)~>7%@S4zHRZxEpO(sp7d)R- zTm)))1Z^NHOYIU?+b2HZL0u1k>{4VGqQJAQ(V6y6+O+>ftKzA`v~wyV{?_@hx>Wy# zE(L|zidSHTux00of7+wJ4YHnk%)G~x)Cq^7ADk{S-wSpBiR2u~n=gpqG~f=6Uc7^N zxd$7)6Cro%?=xyF>PL6z&$ik^I_QIRx<=gRAS8P$G0YnY@PvBt$7&%M`ao@XGWvuE zi5mkN_5kYHJCgC;f_Ho&!s%CF7`#|B`tbUp4>88a8m$kE_O+i@pmEOT*_r0PhCjRvYxN*d5+w5 z<+S)w+1pvfxU6u{0}0sknRj8t^$uf?FCLg<%7SQ-gR~Y6u|f!Abx5U{*KyZ8o(S{G znhQx#Zs_b8jEk`5jd9CUYo>05&e69Ys&-x_*|!PoX$msbdBEGgPSpIl93~>ndH;t5 z?g>S+H^$HtoWcj4>WYo*Gu;Y#8LcoaP!HO?SFS&F9TkZnX`WBhh2jea0Vy%vVx~36 z-!7X*!Tw{Zdsl3qOsK&lf!nnI(lud){Cp$j$@cKrIh@#?+cEyC*m$8tnZIbhG~Zb8 z95)0Fa=3ddJQjW)9W+G{80kq`gZT`XNM=8eTkr^fzdU%d5p>J}v#h&h$)O+oYYaiC z7~hr4Q0PtTg(Xne6E%E@0lhv-CW^o0@EI3>0ZbxAwd2Q zkaU2c{THdFUnut_q0l+0DpJ5KMWNTa^i@v%r`~}fxdmmVFzq6{%vbv?MJ+Q86h6qf zKiGz6Vrb>!7)}8~9}bEy^#HSP)Z^_vqKg2tAfO^GWSN3hV4YzUz)N3m`%I&UEux{a z>>tz9rJBg(&!@S9o5=M@E&|@v2N+w+??UBa3)CDVmgO9(CkCr+a1(#edYE( z7=AAYEV$R1hHyNrAbMnG^0>@S_nLgY&p9vv_XH7|y*X)!GnkY0Fc_(e)0~)Y5B0?S zO)wZqg+nr7PiYMe}!Rb@(l zV=3>ZI(0z_siWqdi(P_*0k&+_l5k``E8WC(s`@v6N3tCfOjJkZ3E2+js++(KEL|!7 z6JZg>9o=$0`A#$_E(Rn7Q78lD1>F}$MhL@|()$cYY`aSA3FK&;&tk3-Fn$m?|G11= z8+AqH86^TNcY64-<)aD>Edj$nbSh>V#yTIi)@m1b2n%j-NCQ51$9C^L6pt|!FCI>S z>LoMC0n<0)p?dWQRLwQC%6wI02x4wAos$QHQ-;4>dBqO9*-d+<429tbfq7d4!Bz~A zw@R_I;~C=vgM@4fK?a|@=Zkm=3H1<#sg`7IM7zB#6JKC*lUC)sA&P)nfwMko15q^^TlLnl5fY75&oPQ4IH{}dT3fc% z!h+Ty;cx9$M$}mW~k$k(($-MeP_DwDJ zXi|*ZdNa$(kiU?}x0*G^XK!i{P4vJzF|aR+T{)yA8LBH!cMjJGpt~YNM$%jK0HK@r z-Au8gN>$8)y;2q-NU&vH`htwS%|ypsMWjg@&jytzR(I|Tx_0(w74iE~aGx%A^s*&- zk#_zHpF8|67{l$Xc;OU^XI`QB5XTUxen~bSmAL6J;tvJSkCU0gM3d#(oWW$IfQXE{ zn3IEWgD|FFf_r2i$iY`bA~B0m zA9y069nq|>2M~U#o)a3V_J?v!I5Y|FZVrj|IbzwDCPTFEP<}#;MDK$4+z+?k5&t!TFS*)Iw)D3Ij}!|C2=Jft4F4=K74tMRar>_~W~mxphIne& zf8?4b?Aez>?UUN5sA$RU7H7n!cG5_tRB*;uY!|bNRwr&)wbrjfH#P{MU;qH>B0Lf_ zQL)-~p>v4Hz#@zh+}jWS`$15LyVn_6_U0`+_<*bI*WTCO+c&>4pO0TIhypN%y(kYy zbpG4O13DpqpSk|q=%UyN5QY2pTAgF@?ck2}gbs*@_?{L>=p77^(s)ltdP1s4hTvR# zbVEL-oMb~j$4?)op8XBJM1hEtuOdwkMwxzOf!Oc63_}v2ZyCOX3D-l+QxJ?adyrSiIJ$W&@WV>oH&K3-1w<073L3DpnPP)xVQVzJG{i)57QSd0e;Nk z4Nk0qcUDTVj@R-&%Z>&u6)a5x3E!|b;-$@ezGJ?J9L zJ#_Lt*u#&vpp2IxBL7fA$a~aJ*1&wKioHc#eC(TR9Q<>9ymdbA?RFnaPsa)iPg7Z; zid$y8`qji`WmJ5nDcKSVb}G$9yOPDUv?h1UiI_S=v%J8%S<83{;qMd0({c8>lc=7V zv$okC+*w{557!ohpAUMyBHhKLAwzs&D11ENhrvr_OtsnS!U{B+CmDH-C=+po+uSqt z+WVVXl8fKe5iCZoP;>}4OVen6_|uw8*ff-r;)O2W+6p7BPT7sT<|Qv=6lgV#3`Ch${(-Wy#6NA$YanDSFV_3aa=PAn%l@^l(XxVdh!TyFFE&->QRkk@GKyy( zC3N%PhyJf^y9iSI;o|)q9U-;Akk>;M>C8E6=3T!vc?1( zyKE(2vV5X_-HDSB2>a6LR9MvCfda}}+bZ>X z+S(fTl)S})HZM`YM`uzRw>!i~X71Kb^FnwAlOM;!g_+l~ri;+f44XrdZb4Lj% zLnTNWm+yi8c7CSidV%@Y+C$j{{Yom*(15277jE z9jJKoT4E%31A+HcljnWqvFsatET*zaYtpHAWtF|1s_}q8!<94D>pAzlt1KT6*zLQF z+QCva$ffV8NM}D4kPEFY+viR{G!wCcp_=a#|l?MwO^f4^EqV7OCWWFn3rmjW=&X+g|Pp(!m2b#9mg zf|*G(z#%g%U^ET)RCAU^ki|7_Do17Ada$cv$~( zHG#hw*H+aJSX`fwUs+fCgF0bc3Yz3eQqR@qIogSt10 znM-VrdE@vOy!0O4tT{+7Ds-+4yp}DT-60aRoqOe@?ZqeW1xR{Vf(S+~+JYGJ&R1-*anVaMt_zSKsob;XbReSb02#(OZ z#D3Aev@!944qL=76Ns-<0PJ;dXn&sw6vB9Wte1{(ah0OPDEDY9J!WVsm`axr_=>uc zQRIf|m;>km2Ivs`a<#Kq@8qn&IeDumS6!2y$8=YgK;QNDcTU}8B zepl6erp@*v{>?ixmx1RS_1rkQC<(hHfN%u_tsNcRo^O<2n71wFlb-^F2vLUoIfB|Hjxm#aY&*+um7eR@%00 zR;6vT(zb2ewr$(CwbHgKRf#X(?%wBgzk8qWw=d@1x>$40h?wIUG2;Jxys__b)vnPF z{VWvLyXGjG4LRo}MH@AP-GOti6rPu^F04vaIukReB|8<7&5cebX<)Zk(VysCOLBuL zW9pEvRa--4vwT?k6P??+#lGMUYE;EsaU~=i_|j!1qCVS_UjMVhKT%CuovR;6*~rP0)s5eX zxVhGZv+qtpZ{_FDf9p{m`ravh=h>mPMVR7J-U@%MaAOU2eY@`s-M3Oi>oRtT?Y&9o({nn~qU4FaEq|l^qnkXer)Cf0IZw;GaBt)}EIen=1lqeg zAHD~nbloktsjFh&*2iYVZ=l1yo%{RK#rgTg8a2WRS8>kl03$CS(p3}E-18`!UpyOg zcH=`UYwn0b@K1`E&aQ%*riO|F-hq;S;kE7UwYd~Ox(u)>VyaE7DA6h_V3_kW2vAR} zBZi_RC*l3!t;JPD;<*z1FiZt;=KK-xuZ`j>?c5oxC^E2R=d`f68!-X=Xw2ONC@;@V zu|Svg4StiAD$#wGarWU~exyzzchb#8=V6F<6*nAca@x}!zXN}k1t78xaOX1yloahl zC4{Ifib;g}#xqD)@Jej<+wsP+JlAn)&WO=qSu>9eKRnm6IOjwOiU=bzd;3R{^cl5* zc9kR~Gd9x`Q$_G^uwc4T9JQhvz3~XG+XpwCgz98Z>Pez=J{DD)((r(!ICFKrmR-;} zL^`7lPsSmZT?p&QpVY&Ps~!n($zaAM8X@%z!}!>;B|CbIl!Y={$prE7WS)cgB{?+| zFnW-KRB-9zM5!L+t{e~B$5lu-N8Yvbu<+|l;OcJH_P;}LdB~2?zAK67?L8YvX})BM zW1=g!&!aNylEkx#95zN~R=D=_+g^bvi(`m0Cxv2EiSJ>&ruObdT4&wfCLa2Vm*a{H z8w@~1h9cs&FqyLbv7}{R)aH=Bo80E3&u_CAxNMrTy_$&cgxR10Gj9c7F~{hm#j+lj z#){r0Qz?MaCV}f2TyRvb=Eh|GNa8M(rqpMPVxnYugYHqe!G`M@x(;>F%H46LGM_cU z{*0k6-F!7r3;j{KOaDxrV16WUIiFAfcx?^t*}ca4B8!-d?R|$UxwV8tyHdKL zhx;7%0Zn#qtx;S)REtEP-meAlV8*1qGFbRJ*eeX&+hsiLF*g9%r0Zl`L^Kn`4I)ul z32#3pg6Mu$LEI@hssUb?T$di_z zHgaB3zw;*0Lnzo$a~T_cFT&y%rdb*kR`|6opI#Pbq~F%t%*KnyUNu|G?-I#~C=i#L zEfu}ckXK+#bWo11e+-E$oobK=nX!q;YZhp}LSm6&Qe-w0XCN{-KL}l?AOUNppM-)A zyTRT@xvO=k&Zj|3XKebEPKZrJDrta?GFKYrlpnSt zA8VzCoU+3vT$%E;kH)pzIV7ZD6MIRB#w`0dViS6g^&rI_mEQjP!m=f>u=Hd04PU^cb>f|JhZ19Vl zkx66rj+G-*9z{b6?PBfYnZ4m6(y*&kN`VB?SiqFiJ#@hegDUqAh4f!+AXW*NgLQGs z>XrzVFqg&m>FT^*5DAgmMCMuFkN4y*!rK^eevG!HFvs7nC672ACBBu5h(+#G@{0J- zPLsJ{ohQEr2N|PmEHw9 znQ`qe-xyv93I;Ym=WnoVU8dau&S^(*Wp=}PSGw;&DtaKz-);y)zjD|@-RT`*6nowj z7B%)h3>Lro-}5THC@BLymuL&3~kh8M}ZrZGtYKAmrT^cym$^O!$eeK$q5X2JF1w5a}4Z6yJ<=8&J?(m6U?;+ z{+*B;P@yGffMz;OSfm7NDhkGR5|7&~FNvel8Yj{F!DWnHG>%?ReZ$1w5I$Bt_u|4v z-ow>!SF!pCGrD&K8=-<;Gp@oB<@9C&%>vPHrp4sQEJj2FdedjC=0FqD>EG?NCf=KQKVd^stDZP7KNCAP-uEO*!?vgwvdp&Dm3h5Cldn!cIOL@u>1!HSfK+~kn-9Ekr|MWNApAJCJ5&5#izmjm z$CI|Boo@;O?Z(Bo9ejP>bbH|jRKn7W3y0L1!O6v$RUtt;%5R#**`+39c$JuO`SMU+ zbzu$7Eu`JQ+ri_ap{w(R_juHcw0X8~e$48TzBX%Yd+HkSSYt2){)+rYm48G^^G#W* zFiC0%tJs0q3%fX_Mt8A=!ODeM?}KLDt@ot6_%aAdLgJ7jCqh_1O`#DT`IGhP2LIMhF* z=l?}r%Tl#)!CpcItYE2!^N8bo`z9X(%0NK9Dgg^cA|rsz?aR+dD6=;#tvNhT5W}1; zFG@_F2cO&7Pdp1;lJ8?TYlI(VI8nbx_FIGRX^Z(d zyWyJi58uPgr>8w$ugIGhX1kr*po@^F>fntO1j&ocjyK za8Z*GGvQt+q~@R@Y=LdQt&v=8-&4WOU^_-YOuT9Fx-H7c;7%(nzWD(B%>dgQ^ zU6~0sR24(ANJ?U>HZ#m8%EmD1X{uL{igUzdbi+JN=G9t`kZMGk!iLCQQiVMhOP&(*~gU(d+&V4$(z=>4zqh(GX+9C&;~g2 z9K2$`gyTRJpG_)fYq=9sG^1I{*I=s%0NX^}8!mJVc?y$OYM^n!x(2jw$$;}n&dh%D;St+FA;eW=+28j#G^YLi@Gdk*H#r-#6u?7sF7#_pv?WS^K7feY1F^;!;$rgU%J zS$lZ(hmo$F>zg$V^`25cS|=QKO1Qj((VZ;&RB*9tS;OXa7 zy(n<$4O;q>q5{{H>n}1-PoFt;=5Ap+$K8LoiaJV7w8Gb%y5icLxGD~6=6hgYQv`ZI z2Opn57nS-1{bJUr(syi^;dv+XcX8?rQRLbhfk1py8M(gkz{TH#=lTd;K=dr!mwk2s z#XnC){9$x)tjD0cUQ90|hE2BkJ9+_tIVobRGD6OQ-uKJ#4fQy!4P;tSC6Az)q?c>E zXt(59YUKD?U}Ssn(3hs&fD$i3I*L_Et-%lx%HDe%#|)*q+ZM-v%Ds3u1LPpPKe-q} zc!9Rt)FvptekA2s+NXxF7I;sH1CNPpN@RT+-*|6h*ZWL{jgu9vth{q)u=E<7D(F06 zN~UUfzhsK)`=W%Z-vr#IIVwmdb(q7k+FX-lciYO%NE!xl25SV53Hwdql-3>8y5X1U zWa3_Qfp2Z;jVX+N+1?`(dx-EJL)%oQsI0G3S=ad&v{dzNal~flHvq(0HjY!v;oE>n z4gQSa2FdJI52Weu$+lED4VYSW;D`5Zn`C#@7Hxa1Ls*#TLBjje(%NYFF+4uOc~dK! zlnyxE4NWVz0c8yx`=sP2t)fHW(PPKZPp{SCwT-on2sEM9tyGO4AW7|R;Iw5|n1KpV zR^S>`h}rxcNv2u+7H6rCvMLMV3p*H#WcN}}t0@Us{w}{20i<-v> zyos+Ev_>@CA**@JrZ6Jzm=pWd6ys`c!7-@jf<~3;!|A_`221MFp-IPg28ABf6kj-Y#eaRcQ!t!|0SRtkQK^pz;YiTC@@lJ4MDpI(++=}nTC zRb4Ak&K16t*d-P(s5zPs+vbqk1u>e5Y&a!;cO(x;E4A4}_Cgp_VoIFwhA z-o^7)=BRYu)zLT8>-5os4@Ss8R&I^?#p?bY1H-c;$NNdXK%RNCJHh)2LhC?B9yL2y z(P-1t9f~NV0_bQ{4zF|-e^9LG9qqevchug76wtFn95+@{PtD)XESnR2u}QuG0jYoh z0df4#&dz_FStgOPG0?LVGW&{znCUzHU%*b1f~F+)7aefg7_j76Vb|2WuG#1oYH_~4 zrzy#g1WMQ#gof`)Ar((3)4m3mARX~3(Ij=>-BC zR@&7dF70|)q>tI$wIr?&;>+!pE`i6CkomA1zEb&JOkmg9!>#z-nB{%!&T@S-2@Q)9 z)ekri>9QUuaHM{bWu&pZ+3|z@e2YjVG^?8F$0qad4oO9UI|R~2)ujGKZiX)9P2;pk z-kPg%FQ23x*$PhgM_1uIBbuz3YC z#9Rz(hzqTU{b28?PeO)PZWzB~VXM5)*}eUt_|uff_A8M4v&@iY{kshk{7dHX1vgHs zC%vd9vD^c;%!7NNz=JX9Q{?$~G@6h!`N>72MR*!Q{xE7IV*?trmw>3qWCP*?>qb01 zqe|3!Y0nv7sp|Md9c z4J5EJA%TD-;emh%|L2kLpA^g>)i56v6HIU8h7M+KSWYw~HHz3`ILj*{==jD(l33>r zmOdINZ8^Jo?ll^~q@{^5l#*3f`ETncJmo?iRLz*=W=o3MJ!K^xjVcw*H}p63#p4XX z1)|C%{Y&)IpRIk5oMVsUi6oyKAFy8MH$@|Zpjr^lxlMX3O{0AZTjc{gso{KRuo30V zUJxq2K=_CwV*Qx_D!hJCBTuQ}5oMNrWUBNVaa8zyMg5lrXgv8Zw@rm5NAcFplYa>P zmUNB>EB|r?#Z!Gq^`(HZl__UJ*K5 z=>`{UTlt0;Y+LmP1Wb19IWK(SIWDrqh=+K81c`t@BCS|2#@K0u5eEwQ7CG92=Axx4 zQ?CPaVE5!XY`2r!Ce@m(tRtB=&+c>a09WzP-Ys!~i;V0hEq}PU8n1a;bVbJ17rYW1 zjz|KkLZoO7-S6oQp_ocIzS43P@CJJxQ$k;$!fS3*V)m|VtBIEgCtU@W`AG9VMU_d znB-Zs3I)I(Wg=xj)Wcx03h}U3i5{D@*udPLg?Jx7dp&KEIwJiW=eh}Ps#FxbsS?F}7z<;<5RP6-UAD+_An$s3y-JAC zh{JlAX3e^CDJl1gJDbH`e=hD88ER_6+Mw8CwK&^|$BnzA|AvDV`#xF^z9b6iWb)0@ z+gir=oSUaVcJi%1k+9!pd`(3|h~4}!NM7NHPNV6rI(W4~Ie5 zl@(Xg2`OSq|HJRUg3qgr-c!}9@W?pEJXKtxP7f(aE2Es33gRSu#~XiCIpV-J;JLM{(@qK2wEvsi@6-9(cyXX!6YS0n7;TK0Ldf*JGmlvrF0 zGQ+Z509rmWa)O}r`z2W3!6u{^ZQrY`KR#VlTRmllG2v$R!7%B~IU@XnNi!E1qM$J8 z%{XFU4vy_*M0tKjDY3E*7N!d%&vnx5qr#=!IKWZfoRo8j=7ji1{xW?g^)A|7 zaaA5Rg6rwCF?y33Kz-90z!ze`@5N916S)(fHPa>{F`UEF8N5PTNjbo)PF5W_YLB*# z?o`qxQTIzokhSdBa1QGmn9b;O#g}y_4d*j*j`cx^bk(=%QwiFxlAhFSNhO0$g|ue> zDh=p|hUow5Knbclx8V;+^H6N_GHwOi!S>Qxv&}FeG-?F7bbOWud`NCE6Tv-~ud&PS6 z;F*l>WT4zvv39&RTmCZQLE67$bwxRykz(UkGzx}(C23?iLR}S-43{WT80c$J*Q`XT zVy-3mu&#j}wp^p0G%NAiIVP2_PN{*!R%t7*IJBVvWVD#wxNRyF9aXsIAl)YpxfQr$d%Rt20U@UE}@w?|8^FMT%k36 zcGi_Mw+vMvA@#}0SfIiy0KEKwQ|`iR++|PF2;LtiH7ea($I{z z32QPp-FlEQ**K_A@OC943z`Qy7wC~&v z*a`z;(`5(e#M|qb4bkN6sWR_|(7W~8<)GnX)cJAt``gu8gqP(AheO-SjJMYlQsGs0 z!;RBZwy>bfw)!(Abmna(pwAh^-;&+#$vChUEXs5QOQi8TZfgQHK$tspm+rc%ee0gy zjTq5y20IJ`i{ogd8l?~8Sbt^R_6Fx*!n6~Jl#rIt@w@qu2eHeyEKhrzqLtEPdFrzy z9*I^6dIZ z)8Gdw1V^@xGue9trS?=(#e5(O#tCJv9fRvP=`a{mnOTboq<-W$-ES7)!Xhi*#}R#6 zS&7hR(QeUetr=$Pt6uV%N&}tC;(iKI>U!y$j6RW&%@8W|29wXe@~{QlQ0OjzS;_>q z(B!=A71r|@CmR7eWdu9n0;OJ zP@VOOo#T+N$s{`3m`3Li+HA4owg&>YqCwsA5|E$b;J&v#6RbT$D!x$Yaflo92wU?A zvgD8g(aY`g7}Y2^2i31ocm&k9Km`NQipEsjU>MuRzD35*Jk7^Q(O;M32!gt1cEB@- zBOHd@@Qo{fQ^7o{FiNdS)_vTiP8toqZ`iNi^1-4(hp+s751}Tf34b z_UYQ1q0~*jIp9pRIpI8ue}$|~uu0#p>-y8t{yEwB(8yAjMXrJ{`{rp7*-wlh8&bso zHV`LnAF7Bw+w}Wm9ii3U@lEvcc-i$0&h+eUmlQuREzg!ao)ZjwThhqIKA})}akyX7 zcbuIw9K}9aUZ;hvAxk~rqpk?bYMWr-@b-pMTR8))ggQa$kBv=IinobKCR0?S&g*+Al2J`VR7he{}0Pu zae7LYa!OoTOk8?ma)M@Ta%NxQacV~KMw&)}fkmF7wvmagnTbWo))`Kofr)`-pNe99 zMnam7vRRs5LTXHWNqTzhfQo90dTdg<=@9teXaX2tyziuRI?UOxKZ5fmd%yNGf%Kis zEDdSxjSP&;Y#smYU$Dk>Sr0J42D)@hAo|7QaAGz(Qp*{d%{I-#UsBYP2*yY8d0&$4 zI^(l62Q-y4>!>S{ zn;iO%>={D42;(0h@P{>EZnIzpFV|^F%-OJADQz(1GpUqqg#t!*i zcK}eD_qV$RmK}-y_}f$Xy7B+hY~f4s{iCD7zq%C|SepGu`+>h6TI}dUGS3%oOYsZ0 z#rWTU&aeMhM%=(r(8kK@3rr|wW^MFE;dK5&^Z!>`JV{CWi^Gq?3jz~C-5hFFwLJ@e zSm3z9mnI+vIcF+RjyOL!VuZP3rJDjPSm4vYolnm)H;BIz!?dLyE0^5(pm)5*>2clW zaI^*Z;p6iGZW~Gr0(Eh+%8Jkz{S9{}=}Ewi6W0wF3|BbVb?CR2x>4xST?woP;Mz8L zDfs+0L9ga3jcM)zCC=`-ah9#oulxt9bZq9zH*fJK$bhT=%(2bPMY~}cPfTyE{_4p+ zc}3pPX`B04z+T>XwRQ4$(`U~037JrmN`)3F8vu_OcBE}M&B;1Vd%|I|1tni?f_b&$ z5wpdJ6F*oif)r=IzB$ytT72GuZi$y>H0p_#amQcJLZ^4KZySOUrRyXy3A2(i=$zB9 znZnGFLC34k?N@s@`)u8aZN({9Hfe}|^@Xk(TmCqNBR*Bter>opM!SGiDU8ShK6FNp zvod~z>Tj!GOXB^#R>6}_D@j67f5cNc#P;yMV}`S*A_OmXk_BIq3I$C}3M~aPU)agY zWC+0JA-)}O@e4XTtjzen&g=J0GIVNjG`_gS6ErXj3cGxeDN*4xEk0PNzfzO@6gb&N zB$S-WV-@efQWs%UX$AVjFN5M@8U>+?Mcqg?@=Z-R`~n~;mQGVJT_vBL|3^fHxZ?#T zE(Sd`8%2WHG)TcNaCHmv_Id%D+K}H3s&c`bxKs(_ScZzyCTpvU zHv~yhtKF9G{s+GC*7>_D@F+qEq@YmXiKTV(j#X7^?WpvIg!Yxi6uBAhh7<91{8vFL zfT?Y~vwmE;(WOL!V5Ag&#@U$mP~T=*#_ ze#QynX>tO#4IJqSj^UB>8ubSEn>Nk!Z?jZE01CJCYuY`1S3 zf%2eyXaWoAQUw)KYO;wi<&+R3_7E%h(7F?xq!8l>!^3Jqj_tNPrG= z+y2S-0j;(AilOo;>SCQu#;Cn?y4Eu za`??!yHz)qFH1Z(3KMqgn+B$&t+5s0zY|}<1kB^Q8FEAumh;^;Yr~amTx1K2%2JUk z@7uIE&0DVch|1R=ro5rjr)w!iU{_09PqfhnGqhAN^$^oz#wVNdTRQ!8^nF};4);Jz#=dTBTMMW7icnZ$dK1E0UEgP4&DNk9MFoKOhtAkVUR`d_vc!x zc|1mY&%{PBxepp^JPHmFDBQ8t@DD-3!C)-ZhGJt)?{)^0MvC%RzI;4}>XoOUF;6~j z{S20Ra%PaiGvM$pFbH;N6)b1J(N;{+Gp^^Qk34JAuPKH}Ap}fen!WlC5vrQ0$pnyq z5poi8VG>>PnGw2^-CY3XdG3<;|0xU}#WBPqn{mO=z0RwL=MXn3=;oA(1C@V^6F;ogwB4EBUpltu=)(MC@To2kSPbL zDdGz|C<@`&!MmQ*e>H>2Qkwa~K%;yZw;SnM<=qwNHu-Dh$r(}-d}T}u!=UOAkzvEOiZ6>{)t$$# zlAmjO$1)&1Zh^zdh8uhmZ>OBA1T4%s9Jex_y4|ifY_=XoX6UzpP;MuC5su(6%;)NI z4d#4aW<*)L6o7w?MY2+jRx6-3S4i zC(~)A`|)5(s?)pBvTfYjwvr@Z-Dx-F7uq}z#WJB6&}0TIi6sGXFWOxD!As%cUg)_A zI)sRCf-5kPBU|rVm0A{!s=W2){AJwvShr6Tsvbg|NrXi!7zoMde_n>-+XFX0fiQy~ zjRp|;6~pR()0a>ETtC7mZD|i$Emj!r-gq!yhAFdV1uR*M<4O?t83N1JRT~8Cy8Vha z+STlcw&CoCJt$k^#ar+~DBmvtC5tr{(>|W6wHq*NSE!^#8*rs>!oYj%fl9~Nu*d4t zdk!|mGJehKW8xJE5ZOcHRfp4plI+l1Pct;rK={=P`YH8&1hNW*YE)4yF2@wa7JFaL zLHJH6ZWc1j|nQ55Znh#>tV`!~N7lY_05Cq%|8I-yN}yf@EzDG zBL z(b0sjh+ui^*s(rg)=l8fU<%cPfba<7y?>}j3R83$2KHzWbVF*`!x^V8JY`D0itC?ZSTYH|w3lUD#$5G$@!v(Lphex2O1;%>w;Qh$t7YF3EjFuySPC$>~%EspW}@Ctn1Bghd5*HVJ=tZK~8oMiZ@9IxfFLSk~>p9cT9gOSPLyP!^bOah`U-6{}C_ zmyhS7S_-tYDm|9C6(Wu2Qe=*g5@{**z@#Ekz3Y{o7fw!^4z$yi z&=a^zmtOpsRO0lFr&c=khr)cL2v9LFKXRDdE}tWlOgpR%}oWHCeJ4;(9U_HeJYl! zwz$p|t6?#eCju@0{IF0gbk>So3C{Ror~JTpuOW!G@^?lBVrf zf?%rDK2E3x=xGC)J_lEk{(ESh-Uw*#k-n4l42f3oC3BJX0-2NMZo?P)-6y1v+?|+< zfFHX8(bw;H@;6K!?=!B#eZrkowcdn7)roPT=WM@MK?>T-cUa$oQdYp&3YRdWu~rhA z@rZKmqj8Ftz-*@`&iH|) zC(H;QiqYx4{Mz@rm`qs~*Ue~4EHM^J7i{QnL~t)O)tnwIQC;23p}TBoc=9rcuS!cQ zQgl)_F@t9{c)ESLtAcg1AbCXqVS%i1ZZRiy$*?Bu=r2ad13e|ZeWV=3pSL>YAk>X& zQZAY4kJD`CYrK-nNti&;uJ*e{cRILOFk@z?B@fNO(exjUhf!b=yuC`@(RS#ko1HA+ zOwsym7?F)}ufcD5&IV+qr+i7Mo3)6M2oI)*3?@-%ah^0rL#0PIn}XmOTP9Xsg5C;t zqkFe6yT##_ZG5KuhVQY)89LfWOeXpXVNWX2PmiRqq<$C!<^WlyO~Q=pk${$DsWY-7 zZ->4<+c@KPgKzKosGPF+&Q*>L>WaN6_FC~SP~3gH7bvg6>QgPzp`&QTpf3W>HjxDxj!y zZb`O;&XZzI2YJ4!^Mq5~Vz7lLv`StN|TSP@jdF}@9;ql?u*#Q+_E}~hak(3B%AQNq)t7PKgAWTYp>EJz^VIj67KcZ3^vvZ7{b;; zcOOArcAw2$T+$UwIib|pt3i#NAuP#3?Z@Oaz?Mt(H&u7HZu!03kV7`t5IRcf7hwck zf{Ujp*YsH;dvcW0q|=o$;z#Cg52;n5t1phY44To!sQ99h`iVzXd+v(L%?A$Ks|Ne; z7fby7IVUXqN8gzsnL-s?uIv>=Qh!qAxoe{fRaI&EcSGCTdggq-Qq?DU%SBOummO5cRa9NW}V>A0IH#pxch)!$2p8=^-XYjsB%$S$U5nI zlJEMBb!BZ_O4@87cEYUBH7}Y_MF$+(~gdf-!7)D-D)+O{*18TC{HGZFF+`%IPcmK{O{YxR> zSfJHSeQCChuPUAWe_x~gy*f!!wvt_tL-Dp=nUm+juu;4L6N1IIG4dsVMat#T^p7p1n*Tx2a!YaivBTqLsSJAF=kJej?@QWf)Y-8Ks>WkC456{B#hW-ML zI+f23(}F=MeSdbWQ>R98TOzv#Haw}ua+17H=P5|~#BDmoEPkzl#lBTvCoyj`XU|IS zHn?dXbq>rqUW8^kQN01zL~6!Vxn4!$Pu|F&#XbiF{{>T z)&khW&2Y?d8^jC|phWKQ4!CM9b66+l*HTdPm+)M|e5yT)I32Q~2ENVJ*ZH;JF^Y907{XNHLoQ+85J~!w@3h_5d04o=~|1 zCBAvjnXMn`S#qMkPZE}9#RX`%al{`J=oFKk(aJYT&Ss`4iBrXa_pQ=3lS1IUFA|Rr zgnh;c8nkGH)|*yyoUZ?tE1XKwkF$n6`sdkf^7)(wZ52xtm86N>o&&jG_@#ue(B`xPM|8oGz94>*kl17-|d^y0`D=&hScq6gGQ%Z6|LU zG@<~h-R{xW)y7k1x7XFw!TWW~HPC^bCO_;xG#A4he?=xkLjS=~U!uR+q>vqJxCN~J z+I}|P5RTv*qRT{k2N^Kz8OX*mz$hYR!aYq-f5bN4R4=omUVP19L|)EZq?O0#B9 z<3G&oAZ`UeIqZWlujz8UNNSK#{=_c`*(&TwlIr3ZpC0sfS5Jy?;t+&wb1g4Q91rRNiEt1|L zisgH;)V()S&(TSB|1yAxZLH%BY`nnhUw_6sz~zdKCCc!ZV*Ws6`U4u|CBpv4pYIX1 z5*)5C*N#D}gj<@pdZxtw!`5aFVQ^Jj?1W z+EsBx6>WV`%wnP@Fp{XlqFkbHf%LfCgIi_|w?uPPjHAgOF+lDnAb+WEB+i_53PFmu zj!=umx@ez9mVxC&jA_RtKRfQG>Cz`A77S2SpOt7%Rt*}fG|yO+2t7CMuK$^}D#i}k zZmO9yUwK6%!LbRsULVnxUxfxso5KFES=!WCm>y&YSR@0CS|iON0v59pkQ7dVA{j*+ zmcRtD@lxXuFq@#$DKKSal#ApSJLw58m_NIJ?z;eD3Z8u*-#}EaK zyG~L>-7laE`Y}{g#FPs9YA-wT4>X>xRNtTHp8_rhvWA|eJH(!o-G~C&tvHB9$UEJI{ngD>QjBz=wl~x-j1MB z4)L_#jZSvaQkbmVbN)4{#^r&ZmfhhV%?tet3`xJ;#jI}DsS94qc&s)#2kXv5pkt;K zaY6emqzF1JWMxI(7h}mk*MQ5C8WLAol60!DPj|u0jMrLTkU7G?ud**S@bYx-vp$+r zMVXWc4H}2=yF+YML9!k~LT(|<#By?F2bS~weMi9dD@DA&k#0e&MM1YT!qoQDeNLwB zA;{KvwSzP?-K(>@_b@4vTkIX7xwj}ckrusCw!k=#;Krt6;}3q4d*)?c{>I|C2I^4p zR(o48TqHbw?4Z`c`>?P{`cT;FpJoFW1wJ3IVO#5Q`wsB>o>zsRDDATmct`aaYQbTL zJVlHeok9_?w83#Z*J(_BMs-;N;mNeq{;f3S zSy{i5hNY5s`c#)~KhQZ{0_hNmrMD2b7CLC2+x#EmLcNa8V1Q=jz@e~VV)Yq!Z|$nv$TEG3j6K4opW+mH z3~z?*H$qobb652kQ}ZHFHUVj$%JAwS-Ie=Vh&Iivx3hjMCZ1k)4dRjdhxRb17P;Gz zZCsB4J=l1S8`O|(g!8c$aOMaYeUoCJj&n#kbDxe(^GQ)E)$Rq+i-wbPKeaQvL!`Y- zcL=QOLcWBdDq_`HLow9P5BG2EMY$v;w9cR$C{ zMv)5zrmYv!uzHFAxDI>aftAp&ad>GYoPt!d;A*$s)^6E5l5ct#&O7A0p^8J1ceXa) znIq{NgKbbOSC`6E_af2bCoI(gD@(krDr^mDVw>cRz3zJ^&9kbuf6)J@Cd#zbnko5m zdyD^j^!9J7`oH!u{~wlOl7jYM(OcdI^#*5Y>BjUumq_g&tx<#_pkzQL3{!g?50d=#eCov*uIw$N*glXJe1F{FuUF_wCElS)Z2X= z8&w0?WkCX%HfL)#n-m1tiLy!jDMqH$LikJF=#lu@k5%&vN zOEmQQ^n*t^76E;JhHPzQqbY0+m8GQ9;~dJLLZ@*sqVX0ui5yz%8Hyn87vqUisY_0- zDtUu5haWdOvDBOX9Y;=s;7ul^_xLxfU(?k(HStRfk0Ab!pY(scal?Nz{Qu?etFHNA ztD=60Y>dte)hUle1IUyYIFgMxgGpvx%Odv4q;WPV?Zj<0pph+zWMfSd=SIUcB_#7^ zgNlm4(v!WIBm4?kpvZnCvp?TXW7~Azs3LT8Gh<0Ew=&W*e+4X_xQ{(e+UCESTaWwz zd1ly>%|#A|W%fgeL_3gAwxjeb?Wi3rAR3U#9Rie*)dfz7YxUK;ex+a4F>@qyQAL0^ zZncndzG56R$F&?R4SOX>&%UDdBid6 zIn=GRfcto+s-%gMB)Wx7!_Z+SS)f3IG!&s%P2eNfHI6~E*=>e`^RpvJQY?T95IOKL zeX-_BCdRE#f06_QAoDyMH;#IIBnT#PWSOtks+PCo`04X-brsea32I~@X(Bwl*Q`$c z{Al@04k=Mmd0}}ts=u%dCO;qn-;qh>Hr7bB6!NOVxy@Yi#GK2vusj7iU9757HTqN~ zNMoKeZY}o)nA*{CqTTPKnWi*JgZFZj&EjD$V;O9zqHV#tB#r5Ur$V3To8iP-bO*Gl_d%qc2$SoU`Hu-6*hWbuWzAn(83_jZ%>P{PY3XVV!q$~ALE^GC( zdIGgR(HnV8Rn*P^7b8#AzONo*U_W}{Ne!=#*qNJIRZzapu_fOkvki(|8NDg>&D=OZ zL3G)1WS*8CFh`-sb*#8*hIN7WDjw6<$D&T|B>JPi`K!*5DF(O*^A+r*Jfnt))c8|M zQKtgEytAqpy@~XZGnVYMJmZSG0U~uvP?i*?DhgDOSYtx6s%6u*vL$SW87`&xJ9cmDLrPHI@G7Pb*cizPGf|!5th41a2ijel>Xfk3i?7Bd*{|)@>|ZBi zH6gO9a2Yd&_ZeKmNQC^e&S$cl!3D2oBCX)C;Ve{0qc|4+*fwK!x{=QYtb#3QD1|Yi z%r?t<$-Mjbli1fF(C?V&w#;Gq3-**PgsGPPsXN(0fb?pIDc{s6b<9{t%6D*47A9ZHlc4rEGU<}u;tiom3^lA-&)1i=j z|I#)cctK)AH-b2*a3Wm%Gt*;#GWjNF6q0q^Evid`6G2yhMg_4TaMUK&x*D*5+KtlF#!)86A7pn~&yvD-Rh%`@(o!Wc#9t=t;(9_y*(MWS;4cPU&cJcE+h} z6fZHrjH@7{6~n40#qgL(yA-oVrt;Kcu=fV1WQ0QY`_I8lVds$PYR7KDvhsTbkC8q6 zct`{-n;z2!($SBZ?;(ZMu1sY(VY)KJ@%p)!LEBL+M{ck-$kHEx=3N+%$#msc!LKD> z?(7`Owu6Iuf-Nb|5wFxCm}U)Du@JO|nHV?%8lk(y3x-=F_d}u8>#AU~iWtSD6|VuV&YM=#_v-HDjZ4mS|L2%K2K}Mhz zVb)f#Q>%4Du>|ea6cbNYrpi<6A!rSmbeh7+xGZ{-TPG);DG9qg=>9!44ScDdh49-_ z;|KUp*RQ-So$jyV%Ss5FnJa^|LYAl%8niBhd%(W!x$Rpq@pcp6(XF^fHFRF2KQP>$ zo@`Qi&QlkFxp%0@2)7RlN4+NzCWo{?_x}5$E?kh!!UM3Vg9R+=xPLWty|S}5Gt_qg z+-v~8k*0?Bf0^Q+IZS56Ny~Q$pap&c2NUt&f7P9P+zEz*>bOO!5J8(uhIJ#%lgMNl z3;y^@Yht z_Dko1D=J@nc@`zIXz6dWsr`Kdt!m8`gGlx59A(t5ZjDVmrsjl#0wT@It~$j=uGRM! z@XJK@Q})NA_sQpEZkNduP-h{cP|l+Qqwr{g--LeHY2&||4dJFD34ZCj7@+4ZH4}La zjfr1gHXr8j#ppOa+gkiuHYf$a+VGA${f!~LtdO!~|X+>{b zY8=`^(0d9`z1f!nNzD`;4&65cNlg)@h5m5oOj&gG%mslXlc+jou#n#`d_l6}hwB+CG5k*Sr36Yrz zP2B)Pq#G?*Iwb)FJiXU@lTvTrdR&WRpV8sUz(Sx3C%f;BHSLY@I$!TqSg!%IetroG zD$gu&K<>-imH@Bh&}f!zwO-`w8Dt>MMZ>8V@{X1g?!2BS0S;GtXTW(%@{L=6uC*fB znj>TvA9Cj80~Hn`A5GSVpyqA$*6rlEa`u=Z!{-DRtCo0{jnK|3KxpDEi3&^DwWNg4 z%|~wf=EtEq^ku$fbX{@*EYr&TP@j@?OyLdVKVk*&H23K=xzmgV8p0Y|jK+@cNaPE1 zovLSR73MssgV04G7S-h7L}ID!!8|-X7U6-7?t~caWg)yk6*s=m)9us~kZ7pC6I1+@ zd&wXWPx{8Z>47wN=yJJ;BgQ&`z)H7hxm}Jq_9GiAq)9R- z7(@1=H+oqdJ(YFEq(LiJW=s}h(Yx~}5%_cQ&3xV0VUT%{sXE!% zVMqItDE@pLL%E2I2<48s8InBVbnt|shpL|$wrvbdWe!LJMr$c+e86OWy77OJ6k_2&3KMqL9=QFd2QUVwwR8X*sgj}5OpiFWK zkiv)DX__mAlH9kRszqfgqLLvBrDbP&mL;Amd=_UXSF4&!?$+*0ZswW?9oH!-BQgjS z*IQf1yzUikvx`UPXLZi2UvHaGMOee-cPA0C5fni_Q zcj2Hhbit;RZ5t^!?2;o_*D4W$VcsfIc+m?Z?b!Uv2;-s&XYSCUiczc2-b0I0g-hNj z@xi1}g6j<*=Dr7UMa-%w&YN`cBbWT>BQ~p;QyS!^#eQ>q9dy!?Nrh+?bfo*_kEe;nyR%9=3OTAD90?RT8#Bk}X#Pkr(TqBF2&!V=` z^iWLr%Yk96POnG@bEb?cv#Uk)5}bP0=~;%g>Sm{t#hoNp#yeFj7UxuD?en)EXw2%= zTS`>YY)#O023TqIXj@8o2KAM29NQM4QH=;sYP$pcqtRoxg?ZK@CWy{=P7(uI7%TOp; zP-^!0wmMVv-f2E>6tEj7ZTG#-KaZMuUUgl1|nl&p%3Dc8tZ4 zW{0iAY38oin5YwiQlKRrH8RP-h95fX$>v!l2*6R~)3vTQ7V(gjstAxGVc>U<8Jwb) zPTqZIfoIV>X`vA2EuAW0Ghj||3;hwn0w`nHnL~5Xr-xuSDNmuyhoZWBBa|hf3)-7$ z6nhe93c?Vv(WT4=mKowy$9Fu8Y)h5yEW6z&zzB7;Yf(a|ei#jb>!ayFWo?MkgWxQK z47{-ws_k4#8xv#$x229MEUK#x*X1k=2QLLnaWhYREFj!ta9&)3I+w+wuB-hQ0SFLZ zlvuP9c*O0k+Bm_8bPyfY2o>Ts&0yRSIg4c@Rv71IVHGS{L3?%!54(HvY;tru5FCHC z9_ER%i7@?-Tq&gCLBVg_3g3?9Gu6P$T^70*)YqUQTN$IHtc4g5UG7WN_J&c!4-lZ& z0a=#~p%2D>Wvx?z(9bP0Z<&FgpEnI^CYsg{+)}t}Teb>kj&)7NNmPz4Zv@MJA2cA4 zE{uQ3IbdMxWrxK|%90Rdmx)yBJ3FI$YLuF4DF~35POQtBilKK{44PuvYIHjt?~mW& zzNwc$LazTnX6dO-hE|>Wu0KO)5xDdvCq>WTfkeI85j!LDvSNHy0&TTnCpr_Y@_=eYt;}dhqY5=4^QRl&pzt9Bed!EmviR=h>B6ynC7MGc`x^9c*)$$|imA)E z9KmcfaDlPY6j0i|;UW8=8oO5$aRyZaYTM*qBd?3;u=u(KdjqYJ_fLd`tRoym(-gX) zqoT2Ua$jR%Ibg0>jte$VWiyOhLaYcnGe^pQ(V0O%I}YnENL$+J%d>ulP(v~JZtnH_wYk$}A_OsQn5BbzOkG2(!baa2N({4d%BrLdzn_qpUhmGmod2kf3s)xrh|=VU=smdZ ze#hs3hAI5A(;4e45x>FbZjXU=hACbM{;p^HFvP31DFz6_lHCVuZC63Xv9`wzN@Y6rcuoPF<~3V<@&m2~m3D5&4GW7GA+XXs{sPo!wDK z85d-&4Og)(j6Q8x3f?Ooxm7VJf?Nw>3_s3fV9y_1xSDfCy31yBhkr2LI_&)xUpcLxXfuNl6z9z^w)MF}E8U)#3YWS4&8 z{-CVR?>0{F?ccm>oP#mMTY-&w90y~vwccFmV3Wd60@~aufc|xzwLI_AA^-goYhcMf z>+D@$bjnFLRX|X?6oMyaW_}(z!Ys&@5~HmlWUY|}!wJnBP8YPsWvf1%(iPjQZ2#s7 zd=-ANqy%pCwL5&H8Tzs{Ux(<1et1ny> z?C%$W*FgAI%!nl0a{QuH&7L*cr$DOVP-67{8fQkKPfPD$L+Lv zSnj#tSMG<%-tcmKzH8dSPFO)VC^+Dw0|si;bY^#=`Ilum3dEF5!JrA9J z^7-aQuXu7vwaQBlnT>)~G|scmodeOzMFBpiJ_`6WePZh+=vMX276uFz4Vd%}>sndc z95j(>Uq_*mC-r*$6iUb)5mCYRy8>n-Y?K==}9iFFRN zB_u(i5p)JpS@Is*ArpnM&nOOwsI6t6IAmTNaVm+)*gWI?2fN{+=&1n$oGYcUGS!0y znn-1azfTgI zyHQk7RQGW=l@WF&jO?B1KXJa9;4BdKcfcpq35}=O+x=GE;TGw}Ub3M+AbPW8_LG;zZ%{IenPEAQ0yCE`_ z5medk+}GQkcA+x*kGZgwAC&01r6-zspCxwld`4~iEZGot%8<4p%sS7d>FR_YB` z1Ifjyuvj`fc|U|FGJ>_SBP*e_IMD*V%9fftjgs&{b6*4#VT3Vun6n`CvL$#d*2ygL z)7eoDSMZ1NGifW#;&EW?%%%0BG5R6&cx8T(iz?c$ah{_eCRo%Dp%dN0c9w$xeo))f z!{R2?4ug`a98BH;1&H}cNC!iP7dTNKFKcpxcOl6#wP-SCOy% z!JYwOsHXEGr4S3cKrNjJ=%MF4T z@!bVaWe=0&6`nIQ;)FZc{l;u(ho}|4c%t0S8wEmM$g~?uCNTxxtk^R4o;IIHXg4Nb zZhIyY?230y#03^WP!{XWxKemhpfBjbwIDOpx8d|`8Pt~dI`s(SzLBSax8yVhRmu9{ zw$*00x8`h$)GaBWP=7&dA{3Isa5b890UcZ}9{lKpxjTOUjiBd@0mQR5q$sBg0u@Iy zwll8RkI|Pv!)|-}!4Q;*3w)M>CtQ|YfuY*dE7B89}m%)-8C#3~yUl6@M z@$xCS^_0V!62E%u6hMI}Baijc^H8CqqH=??%n$8DrN(@_lxx_H?j+3I+s>0uS4W-> zq0;-tBt+ZUCJDUZPCC#K`72}xS)J822;Tq5LaYD!CkRo6su~3oN zg&ag$fC3ZxSR5uvsAWN7eFh2^)f87O^;9TTDscs|OpfUC5ghp1K49VjDrt>4fKO=L zLxxhlumLD^ZNtMYZExK9PV1gvZsMjXa&<%d^2M4I|F-IW|5xsB0rGy*D60s$dYsg6 zMdyH$$qnp@ADG-=TiGN!GTMc$NnfrNngX>@GClAFT;EKG&5U1Bb*)IV83-ppR>OmP z;mE%>wS^m>hiH7_YYVSpTmR5U_95QXcNL(22X&|AmEtABFNSh^r+yF3YBOQc4!O80 zW_5fFeqSWTBALo%V#({BIC-%Lq^vp1z-V;gLfX5Rua>+TgW*Re+49!T|9sLVQu&ivPtDwn<# zB=%%^7~>Vd1WyRru7m;?SybRpuTdTkp!CqN?qy2_^y(`WSe9uYa9qE|o zcGg`Ff;qg;-$@F&9QY~YAiHAU+kZCb9ucTo{Gb6k#xmH@V2*O=2$V9hv3N!FG!${7 zTp-rnDN>xcgi;~=_Mxb*sFFSwD6?;CdR1Cbi8F3{DehvaW-t1+1l`nx@J2Uuss#I} z7YEQopO?lmS-vrY<18fFZQj;RUYHV1%R8M@0Tkd>SU5a}8CH-r{t1(N7NT#$sq)^w zmVCLx`_@z>k8uq?b|oJ{kgpSC_o3O$%4V2RH#rTN1lnS2uTuJCihJod=< zbK*bD&;BL?vnWrN{SD(*)sBR6Em-F63?LK}2oSl&aN^HYHdZan2q(BF z)D7uS5-tMDl2IECM|7gx%2> zc};Ho`i;kR%Dy)GUpF~6W1Ki*Wd%6#FMi5xBe)PX;SaussO4z3-v?U!u2?q%8AwgJaANO0!?)r6)*$^idCj}7^=gi;C5G{41QB@Q*c8MR zn@7|~dhs0<3%J0Tf=dI8%-XKKYj#sRI^D}q0b6V;M(o(HwO9@8wBzAG+cAYdGz_#F+444xshfBlAac=NZ;*fOTY9TtZ05z^pR5AEUigsEZVK|3P%EN69l9T#rt ztMj^w%zcjN9ADJ>WP_UYuZX&jZR@ji&u>=*IXGQau?w2zE-No+$nTgu_GgZsa&$M# zZYvI)dh>Bd=#L)dh+N*aEL{^5`qD^U_KpbEKUE%6$K7WS@R1G!nIcLmnv5J+Ack3a z2%04+f%{()h=i%kj`tsqCkKKoh%KE`ZGs_5p$zYHg~mcPi@d*l{hE-c6mFY*IgBX* zL6~^BD26Gh26+p)EPJ2IL;Sue$6HLwX#VB^s1h4Q+Hww|5(zlpA&M+;`=Svm=S+;v zJkHERRBWx#%q|GpK%F+Rc$V1Q(oO+`kKp_?Haa3}B9gaq1r)nI#4!25hPe^VDlLJ6 z5!=XtON&dC5`5o5js^}ccFq*%Q{E2ZcqcfHG;3~hzIV1Smr2JnUrzA}qvJS0pHByD zCj6^D|3`QKV-Mkn7l`7C+;{KiDa87OI_;q(s#HJaMS4T(P0Ely98^+ZR5*wy_!G56 z3+J?z-u?HtV2|%ah$ea4I0FGlLpsR$NLzoiQt?zYqY;)WuKzk zX&zj^7gwX#;?y|AsCmpgmqu;LL}sQV%xExYp;~&@;1uwbc*ZH@^yP4QVY8iniz)@m z`NT(X?G-$aA(h8Yb5{k|ODM1t4fD*k+EhMk&aPsfdgTiZ`crm;aE@iffH$0xl)xzk zP;cf1mo~EIT*L1pFr>c)6bMypnY#=C1chd$F z%xSI__^fdrclZD!Ywh;nrQKS)Gv4n`Ga?-lrHjRFhZVaU8$}1Fr&DC&0+5EHg+pD* z&pKO@6Taone5>3KFT+$B7Il<7`8grSj`|R;58(C6d48Z%;pV6 zj;G<~o22D(mZ@K0+17Z31aLV+Ib~<-!z5SSzQzTB0}{rh&2duz%ly zaG}^#dJ9k$#eoF^;`w!0|1(z1zu5!@L z@tL*vL%QefR>d1{NE>i|3C`dpl0@?KUi{TkiN6mGNRUDey67%i8-Y4@?C?4BK3S) zfr7HErec}l`_~GWBpfXk`;cTxqhQ@?lDsP1%O4g~b66sRNmD#`1VWS0+t5BO78E2& zICkZ`iPxc*m11BQxRt7dE1Ik0(P7<}s}!ezaiQ@+*Mlw==xGFmqi$4i>jy2&9mUsA z*j>?_P%uwoz{pMh_#KrelvNTR1Opo6mb0SRdK0M!Onk`Fp z=ys4!Z0vaFCTK~5b`EdIQS#2A*Qxqp3-@B7aA|=0WBE1wz(P~(nkuXl$tH%v&|#9R zeLm0olbua(?JgZv2G?R6yz3gVQMwP#Y?)mq-k6@gOK|{k8!R#T#dqf~3JgcyYV_!1 zp9v$!CMgIg^wGUhsG`m7QN0#1VZJ^W5m6TdZ-x>ULth(W{8-URkIild7h~&lW-x6# zkamVW=Fm$^>gUSsTS%jcc8$w;GJ85Mm6ERkFl=0h8YO#a*X7vZdhL(NZ^$yXf-l)ch{DbY`+M4q6{fN>WVq;uQz|Q)ZP2YT2wh+vZ+$wOqNyK`2r(RlH>uebaK2avbVcg z{@;W^5h;qUc)ExRI?u}9`&={vL4h#9%kfVg8oSDKpXrtx)=Dkv95RS`c6_Ya%CPQC zTS5MSS`B|Ys|SBOr^kwpi#7i^XAT5X7Z2tT*1m^K5{>uKVM+tlmjz}bI(8LGIh*ms zsMRF~)Z zhf64Z9SiFjJH1?Ww#3?_{~Ehqr&!d1@{PteLg{| z77qv)uM`QvK+3m{7!R~TPcnJ&7Vd@$JSpSW?&Q|)()t24_zF+GMe1DJe9u=JL((pz z4@A;xoiw;3?LGCEciG5$Z{N|`rA>OUUZZTmgJoTfSjMXtou~^{@2Gdt3#}aVPkp&$ z;<#mYqWv~IR4PWq6R@TK>G(xHnxscc2G>Kz zna3IzOUIMP6YyJPT55w=uM}j6{e%$j8MAVCg2K`y>GEQHGW+Q1C~P&o&OS8KcHC@N z=WVu!LBgQ8k675M3KmokUnj4A2`EwxIHITBFM{dT(;41?F>3Zo@~au76RvQJs*KoS z&L@-VLeWtdWPLNQgrr$_l(4LdjNv_DW?{dFzQj%)S2oXPWW_8#V2>5y%Hx-?Of->d(WT$~az&0U;asF!k=o??sn0dY zP~Sai?n7|WSX9ty2<<9(n`Ys=AX@RNRjzxYcMjsFZ?*klo(9`Xy0pz%+dO3^(+0== zbA1P2Ogj6>A;Xc#xtnp7B~iZ?OK=h>aDmEqi5QqA&V7UYaQwbvoMw%fid2k?v=$&W zU9LC1N7!8#Q-WfmkA|V1){F$W1nSN@5^O7TnxTnpys|30Y$U>gDEnU0u7`$EzCUgxKF=SKK zc(M!e{m6AkXWHEu3NF(2SA@7<23J^(Jg^;%h5KGp(c)gN$N7PNs6sUOs-M(%hY-0? z|B;LE-P5z_yS}s1J{j;76a!AP{;PNwe>?_)&boGne>lMWCEi7uGGMK$fW+GXaJzP@ zLeKG9htxxEMuTA+D1<>_B7;wzX8q{haH4_P(6W0v8!dhg{dEgbRwR;)&j-;kT{BT* zGF5alYiw*J#lFCK_w@1W)i+2V*HX%u9(Z`}>My23@3YcyD46nzA%%NuA6 z$lONl=$>A5cNf{XGkwN zKJmz+b(iE7?Za|mYx@aj!F+AgUP^!_!U^+IR_LR7^Wd6_?3V!V5M8Vknv-+Y*0=VB z3RDkWb~q(Xg>VWlaH=;l$s&6kowW8sh+In-9=`2&@$jt{s5oin8d<4-abf1&S1-yY z4Xll-Q5$CpVd1vYSL)4;BBv`+o2Uw73krO-6KUK|T~D`hx1+))!2)*!D_zF}$3nUF z@+Bco^6H5c!eU*o;#dsv6N7QlCIKiGMYk#s&zjCk;|@N&6P?8zHiT>2<9Z~6OW+dy z1;en?LH?maVakQZ=w<717oPTVD5{odQy#~CajBt5Rs?}0C1?oiNK3OWSt#y7$R%ayCbDQ7oAH<-&`Wp2>)fn@T+)hdW? zvE+)d2_$+7ALBDazH-i|WSMsT%KI8p;uxa*y6SzABt(4(r{>`#y^}+@uNBzb65Cdz zz%0=Yndh4^T4e5FymIOP2e;OLU$IhxNx)$Py!MR08zX)l`2XVJ z^~^~xQbAU_TL8%u;DbF~QB3)XgcU}tLY7)W0SyEOdbQ!8*+P<|dL`kJ9q|#!JE2iF z2P|F)Gcm)p=B!P3ckkv1x081a-vK`zC7nzWwj4fZ4YttY{*0j83 z`PT;>OuT#X3hZf2Y|#0OO*KdOdF<`w8GXTMqD!jidZDjP_B-7vFClC@%wCpeyiVBR z-jHXmyT>GNns9^GS}Ruz7(N+Gs|YythV2@4+Vsb`i=eGpP)ZXpdFz-;FN8{;cCt`v zc+QT8%U1bDX*pG@Uj@NNt;c*Ds=wF$3*_JHS9k(r_YmL_=>d2n_*Y@vV3A``LM;>6=Nn|z zre+N07A%UrbNF+fy2fh#6N|1jjqmfH-t*^9**oh)QB;1kEqHS}+ypo@-}EWd{rd6h z%$flx&-P89`bb8uk&YOaJsvhT3Wg!wx(1MRS$J~<4L!=WM+XbG8e#Rw9dqM9!@ z+#_6QHns5>W898fQL8nHugDl&2EBr0Q&x_YDt@cktT5=HQP5iCd`p4gHB$_A!2NZi zfd&6%=r+PKcF zcD>}A2!}ZrljP{g7lSURAIQNm87b5}hmrWXJFAsVr&+soJYUbIW<3f`8Rn&64AN|n zSdEEN^c|s2!F}}qI+8?SVwkqY15P7FqL;E!ycf$J%{gv!1HO@T*!_;91hNgu4&Yv_ zLVv=T^B%)U-s|Imj%(pjRp^!<7P~u*P@4{oI(<@|8!tD9aMICh#2eS4$eGG3v%|!D z3A9hb5HtqpqehMMa#N!Ts_sj&kZ`-;{^vSa$2KvUzQTu(^Rn+6Ub!urJ5;1XyfGF+ zPk&ug5Jz{R?Xt?FQ>0Rd;JiS)`RxM2aDHoU{Tt$KM~`fJ4=u@MHp~=H1h{{0>(l^Z z)`#oM8@Fg94%5>@ozPzIKn4u?Z9^Kdq zb>z6+;*Il{_Z$%8;%)VaMOgBcyqA`}UcP78_o$yfdftM9!cK-_c98twa zHqXs$;lCQr75r$Jq!!*D1TBMN$&{KKiwJy76aO*8aAD0)##01^2jiQZ=S6PyL9z`dPCX(PcIvRFR%Q%oq&J*9@-?yiy6KV#!b`ri50d zRQ+HHJA+XuO_7QOd(_ieE+CfY<*sY!`#?Q6B zy5398or>DtM&>Pt;fqQzX%#y7TO~D@!Q8N`jsznSaHVV@QII_GY`mUV{igy`NP(A}J%X}?5&&wsZWPQiBz zc?)>svRp9m2Q!__B)myK^VmyYTJ!dL1hE0?7sFX%XPzI+HQT~=qMN2?g-TJ)yv&^o zP-?RkV&wTaPG0K7dqAKQ@lbwGb9HunYmN}@dk%i*Y6CgtG26<8lS=_zY90qI7DfB}ire6El{#mc z;nEwoLQ&~Dc`v!lIOL$!8Cqc^q1h(sj5ncZeba?%Dy69??%`Jp?ZZZ>TN*R4Ep}sI zw{?js2HG>`K26%gY%2}$aMg~J`MfG&2;w$5vc%2GLM?tmm92FD7>Lt&#@luqnUb7n zMTH2f?x*aH%6_dW3+wKB{N5x-bY8Q7_w;nlC+dFhl!&BN&Ff1*S?}lyRicHzJ65=f zO#y?AA+n$PMh7kEH#NpfC>Lnwc{{Z)Vlk`VfVXgIAuJw^YU76nsxsw4)XG69SOl3M zXsToc7Sjz)_Km2o@OS4l8Pk|X#8Bcodlqp{eX(rt5%t!Csf6D|iO(IUR*jxn8u2KO zQ2ElC42(){N+?>x3X&7oo+mgooiaS zIvzb95Qu_Akw-&VCsEKR{6ZwE1sQ^Dq&q8pmb6%CggTRbctH9@U2Nq8LLNW}pd=Wl z)2ye3h=#^9CL^`Tj0Z|w$>T;#V)NRoh|No=l@&1z-e+UkRuibQ&9wG2&Ky}hRs@pk z&{u^6Votln-4}O_cY$AM;?jnlE9nfz_he1h*m+5^E44Gg@Gffy)%TbyGEpeMe`{2) z5*7nD8Bstj#>{{T1EU_vd5^`35WIP5gh(GPDeFoGC)=FJWY{fZomyNDEx}y7*y@Q+ zE!*X`kfss8HWb@hx{mGnzB$zNE*{{roGJ) z74vfpFx-*xmyL|>aP{5|H_RRB2nK&RUyU)Q5Nyxk0h)N4isUHfG~i4EXs`76b>R{p zaTE$B^0yjYa0Dz4T!#L-BNMU4i_Hbr=KTo*#^mn;q#H-@)7~#Sw!WzJVyR2QRWHPVe)!r_j!+mZ)-gCwne;e2sekE2s#u zBB@|AlL)>RmIfI%!jyQ9yJ=36Y=kjt3Ss$!7>SBfYIXZ3iz10mkjP@voHl-|)^tIh z#IY2OH0SyP1y$O`Gex+}Lv)?dR?e$O)x$1IK~cET zQ>(H{FhP9X=x~9~8;=t1n2V;CyWI65+}B__iGq-W+!Er~oYCPvy%Po`*xl&OqhjBD zAY4Ky{Ib^XLF8{~54CQ6@9!S7KA#DyA;cCC4>(OU)A_lDLI*%?VKI zVF7!a^&(NWCGBf}7T177CBQTaEqJ;4=I>8sWt6@0_tP^XfDa+y^Fs#!aMb<(TLYk) zx#~9>06Tw+{0|I*1`1Fvhk^oP1X%b0y#E*V9xyumxR8KO1iyck6;%?Xmy{C&9Mu1N zvW7l2DgnShC<8udfX|;-p6~a!#s5ntD<~%^CaS3PLRRdr2;|R*0khqY3km3(U>e}N zwVm0c5a{ypIj35H*oP5cau-UI%12Jj*Mk^K9u z))ybJ{`#KRAIyIO{HY7|XQcJ#IqF>voJ9l7^EQBze{cRjuUcPVz+e9f@cF6^u)cF~ z6?Akk0mQyF)&CjT`8ng>v6_7`fMyBsA^DRIaIf`s2IS#4jFNwr;g6Th=XhX6ZYx@V zyea@v)Bg=m7ho&?4W782u7QQ2G9diCgteuijJ377qs{N3@iw)WdI2E!fL{82L-^0D z))&xce+LbS`D@{54>(sQW@=$5sIPBmZ!fEBrEC1B(!%q+kHG7QeUG4h2e9Y;J?{hn zQPbb#UG)!X4uGk{$kf;o5I!3aO8)nGSMbC)-2qeyHX!eee`XwTul2o0`YrVH_LKmK zMOgf|jOV*DHmd+K4g{#3?<2;aSFJBS#&6MOtd0L`EsWV6g`ordOsoK9{(da#&#TtA z6CeWen_Bpr?A`B+&$(K^f(v-Wjsc?p(Vu{Td#x`v;OB2J0fzz|bS*4?kG9e&6WRl) z%y)o+>F@1i2j~~SK@+mJcK9y4VI!++Y6Y;l{uJAI-UTFP8_1>rZA1zv>UYV6Kd)L} zU(Vk`|L6juE{6J!{}(;|Icfk-UP(0oRS1Ae^Cu+WUhA7G{9DvN9*Q5>-!uLDig>QM z`zLg*ZvsF><~J4bqgwyl@bg^b@F$)FU_k#3-rt)3zbPI*uZ`#Wc|TdaRDa9z&m+!r z*_@wnvv2-y^87IX|8@fXYyQ4(ZatU1`3Y$J_P>kZJV*JS>iZ-4{rWB&^T+jl9<$W_ zTPeSXuz8;Nxrof4$!mSne@*(7j@&*7g7gZzZ2H25WNe}Vn+a>?{-Z~R_w z&m}m1qM{o93)FuQ46!nEyV!!gHSIhx~u?BuD(h^XuU8ua5jb=X`!t`zNPZ^#A7k{c!c% zr}ii2dCvdF{Edh0^GrW?VEjq2llLzO{yIwiz68(R$9@tF6#hc+=PdDW48PAy^4#6y zCy{UIFGRm|*MEB4o^PT5L=LX_1^L&`^au3sH`JdO;`!F)Pb#&ybLsOPyPvR& zHU9+rW5D=_{k!J{cy8DK$wbij3)A!WhriU_|0vLNTk}tv^QK>D{sQ}>K!4o+VeETu zbo_}g(fTj&|GNqDd3`;%qx>XV1sDeYcrynq2!C%?c_j@FcnkclF2e+b1PDE++xh+1 F{{tUq7iIte literal 0 HcmV?d00001 diff --git a/java8-jersey2/gradle/wrapper/gradle-wrapper.properties b/java8-jersey2/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..b7a3647 --- /dev/null +++ b/java8-jersey2/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Tue May 17 23:08:05 CST 2016 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip diff --git a/java8-jersey2/gradlew b/java8-jersey2/gradlew new file mode 100644 index 0000000..9d82f78 --- /dev/null +++ b/java8-jersey2/gradlew @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/java8-jersey2/gradlew.bat b/java8-jersey2/gradlew.bat new file mode 100644 index 0000000..5f19212 --- /dev/null +++ b/java8-jersey2/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/java8-jersey2/pom.xml b/java8-jersey2/pom.xml new file mode 100644 index 0000000..41b8545 --- /dev/null +++ b/java8-jersey2/pom.xml @@ -0,0 +1,182 @@ + + 4.0.0 + com.sphereon.sdk + template-processor-sdk-java8-jersey2 + jar + template-processor-sdk-java8-jersey2 + 0.1.0 + + scm:git:git@github.com:swagger-api/swagger-mustache.git + scm:git:git@github.com:swagger-api/swagger-codegen.git + https://github.com/swagger-api/swagger-codegen + + + 2.2.0 + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.12 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + pertest + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.6 + + + + jar + test-jar + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.5.1 + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + + + + + io.swagger + swagger-annotations + ${swagger-core-version} + + + + + org.glassfish.jersey.core + jersey-client + ${jersey-version} + + + org.glassfish.jersey.media + jersey-media-multipart + ${jersey-version} + + + org.glassfish.jersey.media + jersey-media-json-jackson + ${jersey-version} + + + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + + + + com.brsanthu + migbase64 + 2.2 + + + + + junit + junit + ${junit-version} + test + + + + 1.5.9 + 2.22.2 + 2.7.5 + 1.0.0 + 4.12 + + diff --git a/java8-jersey2/settings.gradle b/java8-jersey2/settings.gradle new file mode 100644 index 0000000..006a9e3 --- /dev/null +++ b/java8-jersey2/settings.gradle @@ -0,0 +1 @@ +rootProject.name = "template-processor-sdk-java8-jersey2" \ No newline at end of file diff --git a/java8-jersey2/src/main/AndroidManifest.xml b/java8-jersey2/src/main/AndroidManifest.xml new file mode 100644 index 0000000..f59485d --- /dev/null +++ b/java8-jersey2/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/MergeApi.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/MergeApi.java new file mode 100644 index 0000000..48693d0 --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/MergeApi.java @@ -0,0 +1,598 @@ +package com.sphereon.sdk.template_processor.api; + +import com.sphereon.sdk.template_processor.handler.ApiException; +import com.sphereon.sdk.template_processor.handler.ApiClient; +import com.sphereon.sdk.template_processor.handler.Configuration; +import com.sphereon.sdk.template_processor.handler.Pair; + +import javax.ws.rs.core.GenericType; + +import com.sphereon.sdk.template_processor.model.DataSetResponse; +import com.sphereon.sdk.template_processor.model.ErrorResponse; +import com.sphereon.sdk.template_processor.model.TemplateContextResponse; +import com.sphereon.sdk.template_processor.model.TemplateContextRequest; +import com.sphereon.sdk.template_processor.model.MergeJobResponse; +import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.MergeSettings; +import java.io.File; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:29:49.515+02:00") +public class MergeApi { + private ApiClient apiClient; + + public MergeApi() { + this(Configuration.getDefaultApiClient()); + } + + public MergeApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Store dataset + * Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + * @param payload The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] (required) + * @return DataSetResponse + * @throws ApiException if fails to make API call + */ + public DataSetResponse createDataSet(String payload) throws ApiException { + Object localVarPostBody = payload; + + // verify the required parameter 'payload' is set + if (payload == null) { + throw new ApiException(400, "Missing the required parameter 'payload' when calling createDataSet"); + } + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/datasets".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + final String[] localVarAccepts = { + "application/json;charset=UTF-8" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json;charset=UTF-8" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Create template context + * Create a unique template context for your environment + * @param templateRequest The template request (required) + * @return TemplateContextResponse + * @throws ApiException if fails to make API call + */ + public TemplateContextResponse createTemplateContext(TemplateContextRequest templateRequest) throws ApiException { + Object localVarPostBody = templateRequest; + + // verify the required parameter 'templateRequest' is set + if (templateRequest == null) { + throw new ApiException(400, "Missing the required parameter 'templateRequest' when calling createTemplateContext"); + } + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/templates".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + final String[] localVarAccepts = { + "application/json;charset=UTF-8" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json;charset=UTF-8" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Delete a stored data set + * Delete a stored data set + * @param dataSetId dataSetId (required) + * @return DataSetResponse + * @throws ApiException if fails to make API call + */ + public DataSetResponse deleteDataSet(String dataSetId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'dataSetId' is set + if (dataSetId == null) { + throw new ApiException(400, "Missing the required parameter 'dataSetId' when calling deleteDataSet"); + } + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/datasets/{dataSetId}".replaceAll("\\{format\\}","json") + .replaceAll("\\{" + "dataSetId" + "\\}", apiClient.escapeString(dataSetId.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + final String[] localVarAccepts = { + "application/json;charset=UTF-8" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Delete a job manually + * Delete the merge job and all related files + * @param jobId jobId (required) + * @return MergeJobResponse + * @throws ApiException if fails to make API call + */ + public MergeJobResponse deleteJob(String jobId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException(400, "Missing the required parameter 'jobId' when calling deleteJob"); + } + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/jobs/{jobId}".replaceAll("\\{format\\}","json") + .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + final String[] localVarAccepts = { + "application/json;charset=UTF-8" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Delete template context + * Delete a template context with all history + * @param templateId templateId (required) + * @return TemplateContextResponse + * @throws ApiException if fails to make API call + */ + public TemplateContextResponse deleteTemplateContext(String templateId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException(400, "Missing the required parameter 'templateId' when calling deleteTemplateContext"); + } + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/templates/{templateId}".replaceAll("\\{format\\}","json") + .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + final String[] localVarAccepts = { + "application/json;charset=UTF-8" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Job definition and state + * Get the merge job definition and current state. Please not that you can differentiate based on http response status + * @param jobId jobId (required) + * @return MergeJobResponse + * @throws ApiException if fails to make API call + */ + public MergeJobResponse getJob(String jobId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException(400, "Missing the required parameter 'jobId' when calling getJob"); + } + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/jobs/{jobId}".replaceAll("\\{format\\}","json") + .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + final String[] localVarAccepts = { + "application/json;charset=UTF-8" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Get all jobs + * Get all office text job definitions and their current state. + * @param status A list of status to filter on. (optional) + * @return List + * @throws ApiException if fails to make API call + */ + public List getJobs(List status) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/jobs".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "status", status)); + + + + final String[] localVarAccepts = { + "application/json;charset=UTF-8" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + + GenericType> localVarReturnType = new GenericType>() {}; + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Get the result file + * Get a merge result document as a binary stream. + * @param jobId jobId (required) + * @param streamId streamId (required) + * @param outputSettings outputSettings (optional) + * @return byte[] + * @throws ApiException if fails to make API call + */ + public byte[] getResultStreamById(String jobId, String streamId, OutputSettings outputSettings) throws ApiException { + Object localVarPostBody = outputSettings; + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException(400, "Missing the required parameter 'jobId' when calling getResultStreamById"); + } + + // verify the required parameter 'streamId' is set + if (streamId == null) { + throw new ApiException(400, "Missing the required parameter 'streamId' when calling getResultStreamById"); + } + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId}".replaceAll("\\{format\\}","json") + .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())) + .replaceAll("\\{" + "streamId" + "\\}", apiClient.escapeString(streamId.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + final String[] localVarAccepts = { + "application/octet-stream" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json;charset=UTF-8" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Get the result file + * Get all documents inside a compressed container as a binary stream. + * @param jobId jobId (required) + * @param outputSettings outputSettings (optional) + * @return byte[] + * @throws ApiException if fails to make API call + */ + public byte[] getResultStreamsAsContainer(String jobId, OutputSettings outputSettings) throws ApiException { + Object localVarPostBody = outputSettings; + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException(400, "Missing the required parameter 'jobId' when calling getResultStreamsAsContainer"); + } + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/jobs/{jobId}/result/container".replaceAll("\\{format\\}","json") + .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + final String[] localVarAccepts = { + "application/octet-stream" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json;charset=UTF-8" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Get template context + * Get an existing template context + * @param templateId The template context name unique for your environment (required) + * @return TemplateContextResponse + * @throws ApiException if fails to make API call + */ + public TemplateContextResponse getTemplateContext(String templateId) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException(400, "Missing the required parameter 'templateId' when calling getTemplateContext"); + } + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/templates/{templateId}".replaceAll("\\{format\\}","json") + .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + final String[] localVarAccepts = { + "application/json;charset=UTF-8" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Submit merge job for processing + * Submit merge job run. + * @param mergesettings The merge- and output settings (required) + * @return MergeJobResponse + * @throws ApiException if fails to make API call + */ + public MergeJobResponse submitJob(MergeSettings mergesettings) throws ApiException { + Object localVarPostBody = mergesettings; + + // verify the required parameter 'mergesettings' is set + if (mergesettings == null) { + throw new ApiException(400, "Missing the required parameter 'mergesettings' when calling submitJob"); + } + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/jobs".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + final String[] localVarAccepts = { + "application/json;charset=UTF-8" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json;charset=UTF-8" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Update template context + * Update an existing template context for your environment + * @param templateContextRequest templateContextRequest (required) + * @return TemplateContextResponse + * @throws ApiException if fails to make API call + */ + public TemplateContextResponse updateTemplateContext(TemplateContextRequest templateContextRequest) throws ApiException { + Object localVarPostBody = templateContextRequest; + + // verify the required parameter 'templateContextRequest' is set + if (templateContextRequest == null) { + throw new ApiException(400, "Missing the required parameter 'templateContextRequest' when calling updateTemplateContext"); + } + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/templates".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + final String[] localVarAccepts = { + "application/json;charset=UTF-8" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json;charset=UTF-8" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Upload template file + * Upload the Office template file + * @param templateId The template context name unique for your environment (required) + * @param stream The template (file/inputstream) to store (required) + * @return TemplateContextResponse + * @throws ApiException if fails to make API call + */ + public TemplateContextResponse uploadTemplateFile(String templateId, File stream) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException(400, "Missing the required parameter 'templateId' when calling uploadTemplateFile"); + } + + // verify the required parameter 'stream' is set + if (stream == null) { + throw new ApiException(400, "Missing the required parameter 'stream' when calling uploadTemplateFile"); + } + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/templates/{templateId}".replaceAll("\\{format\\}","json") + .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + if (stream != null) + localVarFormParams.put("stream", stream); + + final String[] localVarAccepts = { + "application/json;charset=UTF-8" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } +} diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java new file mode 100644 index 0000000..67a5007 --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java @@ -0,0 +1,699 @@ +package com.sphereon.sdk.template_processor.handler; + +import javax.ws.rs.client.Client; +import javax.ws.rs.client.ClientBuilder; +import javax.ws.rs.client.Entity; +import javax.ws.rs.client.Invocation; +import javax.ws.rs.client.WebTarget; +import javax.ws.rs.core.Form; +import javax.ws.rs.core.GenericType; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.Response.Status; + +import org.glassfish.jersey.client.ClientConfig; +import org.glassfish.jersey.client.ClientProperties; +import org.glassfish.jersey.filter.LoggingFilter; +import org.glassfish.jersey.jackson.JacksonFeature; +import org.glassfish.jersey.media.multipart.FormDataBodyPart; +import org.glassfish.jersey.media.multipart.FormDataContentDisposition; +import org.glassfish.jersey.media.multipart.MultiPart; +import org.glassfish.jersey.media.multipart.MultiPartFeature; + +import java.io.IOException; +import java.io.InputStream; + +import java.nio.file.Files; +import java.util.Collection; +import java.util.Collections; +import java.util.Map; +import java.util.Map.Entry; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Date; +import java.util.TimeZone; + +import java.net.URLEncoder; + +import java.io.File; +import java.io.UnsupportedEncodingException; + +import java.text.DateFormat; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import com.sphereon.sdk.template_processor.handler.auth.Authentication; +import com.sphereon.sdk.template_processor.handler.auth.HttpBasicAuth; +import com.sphereon.sdk.template_processor.handler.auth.ApiKeyAuth; +import com.sphereon.sdk.template_processor.handler.auth.OAuth; + +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:29:49.515+02:00") +public class ApiClient { + private Map defaultHeaderMap = new HashMap(); + private String basePath = "https://gw.api.cloud.sphereon.com/"; + private boolean debugging = false; + private int connectionTimeout = 0; + + private Client httpClient; + private JSON json; + private String tempFolderPath = null; + + private Map authentications; + + private int statusCode; + private Map> responseHeaders; + + private DateFormat dateFormat; + + public ApiClient() { + json = new JSON(); + httpClient = buildHttpClient(debugging); + + this.dateFormat = new RFC3339DateFormat(); + + // Set default User-Agent. + setUserAgent("Swagger-Codegen/0.1.0/java"); + + // Setup authentications (key: authentication name, value: authentication). + authentications = new HashMap(); + authentications.put("oauth2schema", new OAuth()); + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + /** + * Gets the JSON instance to do JSON serialization and deserialization. + */ + public JSON getJSON() { + return json; + } + + public Client getHttpClient() { + return httpClient; + } + + public ApiClient setHttpClient(Client httpClient) { + this.httpClient = httpClient; + return this; + } + + public String getBasePath() { + return basePath; + } + + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + return this; + } + + /** + * Gets the status code of the previous request + */ + public int getStatusCode() { + return statusCode; + } + + /** + * Gets the response headers of the previous request + */ + public Map> getResponseHeaders() { + return responseHeaders; + } + + /** + * Get authentications (key: authentication name, value: authentication). + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + /** + * Helper method to set username for the first HTTP basic authentication. + */ + public void setUsername(String username) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setUsername(username); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set password for the first HTTP basic authentication. + */ + public void setPassword(String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setPassword(password); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set API key value for the first API key authentication. + */ + public void setApiKey(String apiKey) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKey(apiKey); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set API key prefix for the first API key authentication. + */ + public void setApiKeyPrefix(String apiKeyPrefix) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set access token for the first OAuth2 authentication. + */ + public void setAccessToken(String accessToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setAccessToken(accessToken); + return; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Set the User-Agent header's value (by adding to the default header map). + */ + public ApiClient setUserAgent(String userAgent) { + addDefaultHeader("User-Agent", userAgent); + return this; + } + + /** + * Add a default header. + * + * @param key The header's key + * @param value The header's value + */ + public ApiClient addDefaultHeader(String key, String value) { + defaultHeaderMap.put(key, value); + return this; + } + + /** + * Check that whether debugging is enabled for this API client. + */ + public boolean isDebugging() { + return debugging; + } + + /** + * Enable/disable debugging for this API client. + * + * @param debugging To enable (true) or disable (false) debugging + */ + public ApiClient setDebugging(boolean debugging) { + this.debugging = debugging; + // Rebuild HTTP Client according to the new "debugging" value. + this.httpClient = buildHttpClient(debugging); + return this; + } + + /** + * The path of temporary folder used to store downloaded files from endpoints + * with file response. The default value is null, i.e. using + * the system's default tempopary folder. + * + * @see https://docs.oracle.com/javase/7/docs/api/java/io/File.html#createTempFile(java.lang.String,%20java.lang.String,%20java.io.File) + */ + public String getTempFolderPath() { + return tempFolderPath; + } + + public ApiClient setTempFolderPath(String tempFolderPath) { + this.tempFolderPath = tempFolderPath; + return this; + } + + /** + * Connect timeout (in milliseconds). + */ + public int getConnectTimeout() { + return connectionTimeout; + } + + /** + * Set the connect timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link Integer#MAX_VALUE}. + */ + public ApiClient setConnectTimeout(int connectionTimeout) { + this.connectionTimeout = connectionTimeout; + httpClient.property(ClientProperties.CONNECT_TIMEOUT, connectionTimeout); + return this; + } + + /** + * Get the date format used to parse/format date parameters. + */ + public DateFormat getDateFormat() { + return dateFormat; + } + + /** + * Set the date format used to parse/format date parameters. + */ + public ApiClient setDateFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + // also set the date format for model (de)serialization with Date properties + this.json.setDateFormat((DateFormat) dateFormat.clone()); + return this; + } + + /** + * Parse the given string into Date object. + */ + public Date parseDate(String str) { + try { + return dateFormat.parse(str); + } catch (java.text.ParseException e) { + throw new RuntimeException(e); + } + } + + /** + * Format the given Date object into string. + */ + public String formatDate(Date date) { + return dateFormat.format(date); + } + + /** + * Format the given parameter object into string. + */ + public String parameterToString(Object param) { + if (param == null) { + return ""; + } else if (param instanceof Date) { + return formatDate((Date) param); + } else if (param instanceof Collection) { + StringBuilder b = new StringBuilder(); + for(Object o : (Collection)param) { + if(b.length() > 0) { + b.append(","); + } + b.append(String.valueOf(o)); + } + return b.toString(); + } else { + return String.valueOf(param); + } + } + + /* + Format to {@code Pair} objects. + */ + public List parameterToPairs(String collectionFormat, String name, Object value){ + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null) return params; + + Collection valueCollection = null; + if (value instanceof Collection) { + valueCollection = (Collection) value; + } else { + params.add(new Pair(name, parameterToString(value))); + return params; + } + + if (valueCollection.isEmpty()){ + return params; + } + + // get the collection format + collectionFormat = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat); // default: csv + + // create the params based on the collection format + if (collectionFormat.equals("multi")) { + for (Object item : valueCollection) { + params.add(new Pair(name, parameterToString(item))); + } + + return params; + } + + String delimiter = ","; + + if (collectionFormat.equals("csv")) { + delimiter = ","; + } else if (collectionFormat.equals("ssv")) { + delimiter = " "; + } else if (collectionFormat.equals("tsv")) { + delimiter = "\t"; + } else if (collectionFormat.equals("pipes")) { + delimiter = "|"; + } + + StringBuilder sb = new StringBuilder() ; + for (Object item : valueCollection) { + sb.append(delimiter); + sb.append(parameterToString(item)); + } + + params.add(new Pair(name, sb.substring(1))); + + return params; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + */ + public boolean isJsonMime(String mime) { + return mime != null && mime.matches("(?i)application\\/json(;.*)?"); + } + + /** + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) + * + * @param accepts The accepts array to select from + * @return The Accept header to use. If the given array is empty, + * null will be returned (not to set the Accept header explicitly). + */ + public String selectHeaderAccept(String[] accepts) { + if (accepts.length == 0) { + return null; + } + for (String accept : accepts) { + if (isJsonMime(accept)) { + return accept; + } + } + return StringUtil.join(accepts, ","); + } + + /** + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. + * + * @param contentTypes The Content-Type array to select from + * @return The Content-Type header to use. If the given array is empty, + * JSON will be used. + */ + public String selectHeaderContentType(String[] contentTypes) { + if (contentTypes.length == 0) { + return "application/json"; + } + for (String contentType : contentTypes) { + if (isJsonMime(contentType)) { + return contentType; + } + } + return contentTypes[0]; + } + + /** + * Escape the given string to be used as URL query value. + */ + public String escapeString(String str) { + try { + return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); + } catch (UnsupportedEncodingException e) { + return str; + } + } + + /** + * Serialize the given Java object into string entity according the given + * Content-Type (only JSON is supported for now). + */ + public Entity serialize(Object obj, Map formParams, String contentType) throws ApiException { + Entity entity = null; + if (contentType.startsWith("multipart/form-data")) { + MultiPart multiPart = new MultiPart(); + for (Entry param: formParams.entrySet()) { + if (param.getValue() instanceof File) { + File file = (File) param.getValue(); + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()) + .fileName(file.getName()).size(file.length()).build(); + multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, MediaType.APPLICATION_OCTET_STREAM_TYPE)); + } else { + FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()).build(); + multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(param.getValue()))); + } + } + entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE); + } else if (contentType.startsWith("application/x-www-form-urlencoded")) { + Form form = new Form(); + for (Entry param: formParams.entrySet()) { + form.param(param.getKey(), parameterToString(param.getValue())); + } + entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE); + } else { + // We let jersey handle the serialization + entity = Entity.entity(obj, contentType); + } + return entity; + } + + /** + * Deserialize response body to Java object according to the Content-Type. + */ + public T deserialize(Response response, GenericType returnType) throws ApiException { + if (response == null || returnType == null) { + return null; + } + + if ("byte[]".equals(returnType.toString())) { + // Handle binary response (byte array). + return (T) response.readEntity(byte[].class); + } else if (returnType.equals(File.class)) { + // Handle file downloading. + @SuppressWarnings("unchecked") + T file = (T) downloadFileFromResponse(response); + return file; + } + + String contentType = null; + List contentTypes = response.getHeaders().get("Content-Type"); + if (contentTypes != null && !contentTypes.isEmpty()) + contentType = String.valueOf(contentTypes.get(0)); + if (contentType == null) + throw new ApiException(500, "missing Content-Type in response"); + + return response.readEntity(returnType); + } + + /** + * Download file from the given response. + * @throws ApiException If fail to read file content from response and write to disk + */ + public File downloadFileFromResponse(Response response) throws ApiException { + try { + File file = prepareDownloadFile(response); + Files.copy(response.readEntity(InputStream.class), file.toPath()); + return file; + } catch (IOException e) { + throw new ApiException(e); + } + } + + public File prepareDownloadFile(Response response) throws IOException { + String filename = null; + String contentDisposition = (String) response.getHeaders().getFirst("Content-Disposition"); + if (contentDisposition != null && !"".equals(contentDisposition)) { + // Get filename from the Content-Disposition header. + Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); + Matcher matcher = pattern.matcher(contentDisposition); + if (matcher.find()) + filename = matcher.group(1); + } + + String prefix = null; + String suffix = null; + if (filename == null) { + prefix = "download-"; + suffix = ""; + } else { + int pos = filename.lastIndexOf("."); + if (pos == -1) { + prefix = filename + "-"; + } else { + prefix = filename.substring(0, pos) + "-"; + suffix = filename.substring(pos); + } + // File.createTempFile requires the prefix to be at least three characters long + if (prefix.length() < 3) + prefix = "download-"; + } + + if (tempFolderPath == null) + return File.createTempFile(prefix, suffix); + else + return File.createTempFile(prefix, suffix, new File(tempFolderPath)); + } + + /** + * Invoke API by sending HTTP request with the given options. + * + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "POST", "PUT", and "DELETE" + * @param queryParams The query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param formParams The form parameters + * @param accept The request's Accept header + * @param contentType The request's Content-Type header + * @param authNames The authentications to apply + * @param returnType The return type into which to deserialize the response + * @return The response body in type of string + */ + public T invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException { + updateParamsForAuth(authNames, queryParams, headerParams); + + // Not using `.target(this.basePath).path(path)` below, + // to support (constant) query string in `path`, e.g. "/posts?draft=1" + WebTarget target = httpClient.target(this.basePath + path); + + if (queryParams != null) { + for (Pair queryParam : queryParams) { + if (queryParam.getValue() != null) { + target = target.queryParam(queryParam.getName(), queryParam.getValue()); + } + } + } + + Invocation.Builder invocationBuilder = target.request().accept(accept); + + for (String key : headerParams.keySet()) { + String value = headerParams.get(key); + if (value != null) { + invocationBuilder = invocationBuilder.header(key, value); + } + } + + for (String key : defaultHeaderMap.keySet()) { + if (!headerParams.containsKey(key)) { + String value = defaultHeaderMap.get(key); + if (value != null) { + invocationBuilder = invocationBuilder.header(key, value); + } + } + } + + Entity entity = serialize(body, formParams, contentType); + + Response response = null; + + if ("GET".equals(method)) { + response = invocationBuilder.get(); + } else if ("POST".equals(method)) { + response = invocationBuilder.post(entity); + } else if ("PUT".equals(method)) { + response = invocationBuilder.put(entity); + } else if ("DELETE".equals(method)) { + response = invocationBuilder.delete(); + } else if ("PATCH".equals(method)) { + response = invocationBuilder.header("X-HTTP-Method-Override", "PATCH").post(entity); + } else { + throw new ApiException(500, "unknown method type " + method); + } + + statusCode = response.getStatusInfo().getStatusCode(); + responseHeaders = buildResponseHeaders(response); + + if (response.getStatus() == Status.NO_CONTENT.getStatusCode()) { + return null; + } else if (response.getStatusInfo().getFamily().equals(Status.Family.SUCCESSFUL)) { + if (returnType == null) + return null; + else + return deserialize(response, returnType); + } else { + String message = "error"; + String respBody = null; + if (response.hasEntity()) { + try { + respBody = String.valueOf(response.readEntity(String.class)); + message = respBody; + } catch (RuntimeException e) { + // e.printStackTrace(); + } + } + throw new ApiException( + response.getStatus(), + message, + buildResponseHeaders(response), + respBody); + } + } + + /** + * Build the Client used to make HTTP requests. + */ + private Client buildHttpClient(boolean debugging) { + final ClientConfig clientConfig = new ClientConfig(); + clientConfig.register(MultiPartFeature.class); + clientConfig.register(json); + clientConfig.register(JacksonFeature.class); + if (debugging) { + clientConfig.register(LoggingFilter.class); + } + return ClientBuilder.newClient(clientConfig); + } + + private Map> buildResponseHeaders(Response response) { + Map> responseHeaders = new HashMap>(); + for (Entry> entry: response.getHeaders().entrySet()) { + List values = entry.getValue(); + List headers = new ArrayList(); + for (Object o : values) { + headers.add(String.valueOf(o)); + } + responseHeaders.put(entry.getKey(), headers); + } + return responseHeaders; + } + + /** + * Update query and header parameters based on authentication settings. + * + * @param authNames The authentications to apply + */ + private void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams) { + for (String authName : authNames) { + Authentication auth = authentications.get(authName); + if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); + auth.applyToParams(queryParams, headerParams); + } + } +} diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiException.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiException.java new file mode 100644 index 0000000..c0b575f --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiException.java @@ -0,0 +1,103 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler; + +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:29:49.515+02:00") +public class ApiException extends Exception { + private int code = 0; + private Map> responseHeaders = null; + private String responseBody = null; + + public ApiException() {} + + public ApiException(Throwable throwable) { + super(throwable); + } + + public ApiException(String message) { + super(message); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { + super(message, throwable); + this.code = code; + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + public ApiException(String message, int code, Map> responseHeaders, String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + public ApiException(int code, Map> responseHeaders, String responseBody) { + this((String) null, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + public ApiException(int code, String message, Map> responseHeaders, String responseBody) { + this(code, message); + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } + + /** + * Get the HTTP response headers. + * + * @return A map of list of string + */ + public Map> getResponseHeaders() { + return responseHeaders; + } + + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } +} diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/Configuration.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/Configuration.java new file mode 100644 index 0000000..67ac1ff --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/Configuration.java @@ -0,0 +1,51 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler; + +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:29:49.515+02:00") +public class Configuration { + private static ApiClient defaultApiClient = new ApiClient(); + + /** + * Get the default API client, which would be used when creating API + * instances without providing an API client. + * + * @return Default API client + */ + public static ApiClient getDefaultApiClient() { + return defaultApiClient; + } + + /** + * Set the default API client, which would be used when creating API + * instances without providing an API client. + * + * @param apiClient API client + */ + public static void setDefaultApiClient(ApiClient apiClient) { + defaultApiClient = apiClient; + } +} diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/JSON.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/JSON.java new file mode 100644 index 0000000..5362357 --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/JSON.java @@ -0,0 +1,37 @@ +package com.sphereon.sdk.template_processor.handler; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.*; +import com.fasterxml.jackson.datatype.jsr310.*; + +import java.text.DateFormat; + +import javax.ws.rs.ext.ContextResolver; + +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:29:49.515+02:00") +public class JSON implements ContextResolver { + private ObjectMapper mapper; + + public JSON() { + mapper = new ObjectMapper(); + mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); + mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); + mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); + mapper.setDateFormat(new RFC3339DateFormat()); + mapper.registerModule(new JavaTimeModule()); + } + + /** + * Set the date format for JSON (de)serialization with Date properties. + */ + public void setDateFormat(DateFormat dateFormat) { + mapper.setDateFormat(dateFormat); + } + + @Override + public ObjectMapper getContext(Class type) { + return mapper; + } +} diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/Pair.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/Pair.java new file mode 100644 index 0000000..04f95ec --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/Pair.java @@ -0,0 +1,64 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler; + +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:29:49.515+02:00") +public class Pair { + private String name = ""; + private String value = ""; + + public Pair (String name, String value) { + setName(name); + setValue(value); + } + + private void setName(String name) { + if (!isValidString(name)) return; + + this.name = name; + } + + private void setValue(String value) { + if (!isValidString(value)) return; + + this.value = value; + } + + public String getName() { + return this.name; + } + + public String getValue() { + return this.value; + } + + private boolean isValidString(String arg) { + if (arg == null) return false; + if (arg.trim().isEmpty()) return false; + + return true; + } +} diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/RFC3339DateFormat.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/RFC3339DateFormat.java new file mode 100644 index 0000000..be0e355 --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/RFC3339DateFormat.java @@ -0,0 +1,44 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.sphereon.sdk.template_processor.handler; + +import com.fasterxml.jackson.databind.util.ISO8601DateFormat; +import com.fasterxml.jackson.databind.util.ISO8601Utils; + +import java.text.FieldPosition; +import java.util.Date; + + +public class RFC3339DateFormat extends ISO8601DateFormat { + + // Same as ISO8601DateFormat but serializing milliseconds. + @Override + public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { + String value = ISO8601Utils.format(date, true); + toAppendTo.append(value); + return toAppendTo; + } + +} \ No newline at end of file diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java new file mode 100644 index 0000000..69adadc --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java @@ -0,0 +1,67 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler; + +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:29:49.515+02:00") +public class StringUtil { + /** + * Check if the given array contains the given value (with case-insensitive comparison). + * + * @param array The array + * @param value The value to search + * @return true if the array contains the value + */ + public static boolean containsIgnoreCase(String[] array, String value) { + for (String str : array) { + if (value == null && str == null) return true; + if (value != null && value.equalsIgnoreCase(str)) return true; + } + return false; + } + + /** + * Join an array of strings with the given separator. + *

+ * Note: This might be replaced by utility method from commons-lang or guava someday + * if one of those libraries is added as dependency. + *

+ * + * @param array The array of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(String[] array, String separator) { + int len = array.length; + if (len == 0) return ""; + + StringBuilder out = new StringBuilder(); + out.append(array[0]); + for (int i = 1; i < len; i++) { + out.append(separator).append(array[i]); + } + return out.toString(); + } +} diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java new file mode 100644 index 0000000..fa2d587 --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java @@ -0,0 +1,87 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler.auth; + +import com.sphereon.sdk.template_processor.handler.Pair; + +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:29:49.515+02:00") +public class ApiKeyAuth implements Authentication { + private final String location; + private final String paramName; + + private String apiKey; + private String apiKeyPrefix; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getApiKeyPrefix() { + return apiKeyPrefix; + } + + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } + + @Override + public void applyToParams(List queryParams, Map headerParams) { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if ("query".equals(location)) { + queryParams.add(new Pair(paramName, value)); + } else if ("header".equals(location)) { + headerParams.put(paramName, value); + } + } +} diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/Authentication.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/Authentication.java new file mode 100644 index 0000000..9b3ec10 --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/Authentication.java @@ -0,0 +1,41 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler.auth; + +import com.sphereon.sdk.template_processor.handler.Pair; + +import java.util.Map; +import java.util.List; + +public interface Authentication { + /** + * Apply authentication settings to header and query params. + * + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + */ + void applyToParams(List queryParams, Map headerParams); +} diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/HttpBasicAuth.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/HttpBasicAuth.java new file mode 100644 index 0000000..532a58c --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/HttpBasicAuth.java @@ -0,0 +1,70 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler.auth; + +import com.sphereon.sdk.template_processor.handler.Pair; + +import com.migcomponents.migbase64.Base64; + +import java.util.Map; +import java.util.List; + +import java.io.UnsupportedEncodingException; + +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:29:49.515+02:00") +public class HttpBasicAuth implements Authentication { + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public void applyToParams(List queryParams, Map headerParams) { + if (username == null && password == null) { + return; + } + String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); + try { + headerParams.put("Authorization", "Basic " + Base64.encodeToString(str.getBytes("UTF-8"), false)); + } catch (UnsupportedEncodingException e) { + throw new RuntimeException(e); + } + } +} diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java new file mode 100644 index 0000000..00f59fc --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java @@ -0,0 +1,51 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler.auth; + +import com.sphereon.sdk.template_processor.handler.Pair; + +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:29:49.515+02:00") +public class OAuth implements Authentication { + private String accessToken; + + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + @Override + public void applyToParams(List queryParams, Map headerParams) { + if (accessToken != null) { + headerParams.put("Authorization", "Bearer " + accessToken); + } + } +} diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java new file mode 100644 index 0000000..87db0fa --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java @@ -0,0 +1,30 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler.auth; + +public enum OAuthFlow { + accessCode, implicit, password, application +} diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java new file mode 100644 index 0000000..b25de16 --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java @@ -0,0 +1,177 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; + +/** + * The merge template response. + */ +@ApiModel(description = "The merge template response.") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:29:49.515+02:00") +public class DataSetResponse { + @JsonProperty("completionTime") + private OffsetDateTime completionTime = null; + + @JsonProperty("creationTime") + private OffsetDateTime creationTime = null; + + @JsonProperty("id") + private String id = null; + + /** + * The status of the template + */ + public enum StatusEnum { + CREATED("CREATED"), + + UPDATED("UPDATED"), + + DELETED("DELETED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("status") + private StatusEnum status = null; + + /** + * The completion date/time of this template in ISO 8601 format + * @return completionTime + **/ + @ApiModelProperty(example = "null", value = "The completion date/time of this template in ISO 8601 format") + public OffsetDateTime getCompletionTime() { + return completionTime; + } + + /** + * The creation date/time of this template in ISO 8601 format + * @return creationTime + **/ + @ApiModelProperty(example = "null", value = "The creation date/time of this template in ISO 8601 format") + public OffsetDateTime getCreationTime() { + return creationTime; + } + + public DataSetResponse id(String id) { + this.id = id; + return this; + } + + /** + * Unique dataset id + * @return id + **/ + @ApiModelProperty(example = "null", required = true, value = "Unique dataset id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + /** + * The status of the template + * @return status + **/ + @ApiModelProperty(example = "null", required = true, value = "The status of the template") + public StatusEnum getStatus() { + return status; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataSetResponse dataSetResponse = (DataSetResponse) o; + return Objects.equals(this.completionTime, dataSetResponse.completionTime) && + Objects.equals(this.creationTime, dataSetResponse.creationTime) && + Objects.equals(this.id, dataSetResponse.id) && + Objects.equals(this.status, dataSetResponse.status); + } + + @Override + public int hashCode() { + return Objects.hash(completionTime, creationTime, id, status); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataSetResponse {\n"); + + sb.append(" completionTime: ").append(toIndentedString(completionTime)).append("\n"); + sb.append(" creationTime: ").append(toIndentedString(creationTime)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/Error.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/Error.java new file mode 100644 index 0000000..f44b587 --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/Error.java @@ -0,0 +1,204 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.sphereon.sdk.template_processor.model.Error; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * An error + */ +@ApiModel(description = "An error") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:29:49.515+02:00") +public class Error { + @JsonProperty("code") + private String code = null; + + /** + * Gets or Sets level + */ + public enum LevelEnum { + INFO("INFO"), + + WARNING("WARNING"), + + FATAL("FATAL"); + + private String value; + + LevelEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LevelEnum fromValue(String text) { + for (LevelEnum b : LevelEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("level") + private LevelEnum level = null; + + @JsonProperty("cause") + private Error cause = null; + + @JsonProperty("message") + private String message = null; + + public Error code(String code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + **/ + @ApiModelProperty(example = "null", required = true, value = "") + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public Error level(LevelEnum level) { + this.level = level; + return this; + } + + /** + * Get level + * @return level + **/ + @ApiModelProperty(example = "null", required = true, value = "") + public LevelEnum getLevel() { + return level; + } + + public void setLevel(LevelEnum level) { + this.level = level; + } + + public Error cause(Error cause) { + this.cause = cause; + return this; + } + + /** + * Get cause + * @return cause + **/ + @ApiModelProperty(example = "null", value = "") + public Error getCause() { + return cause; + } + + public void setCause(Error cause) { + this.cause = cause; + } + + public Error message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + **/ + @ApiModelProperty(example = "null", required = true, value = "") + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Error error = (Error) o; + return Objects.equals(this.code, error.code) && + Objects.equals(this.level, error.level) && + Objects.equals(this.cause, error.cause) && + Objects.equals(this.message, error.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, level, cause, message); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Error {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" level: ").append(toIndentedString(level)).append("\n"); + sb.append(" cause: ").append(toIndentedString(cause)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java new file mode 100644 index 0000000..21783af --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java @@ -0,0 +1,110 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.sphereon.sdk.template_processor.model.Error; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +/** + * The error response + */ +@ApiModel(description = "The error response") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:29:49.515+02:00") +public class ErrorResponse { + @JsonProperty("errors") + private List errors = new ArrayList(); + + public ErrorResponse errors(List errors) { + this.errors = errors; + return this; + } + + public ErrorResponse addErrorsItem(Error errorsItem) { + this.errors.add(errorsItem); + return this; + } + + /** + * Get errors + * @return errors + **/ + @ApiModelProperty(example = "null", value = "") + public List getErrors() { + return errors; + } + + public void setErrors(List errors) { + this.errors = errors; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ErrorResponse errorResponse = (ErrorResponse) o; + return Objects.equals(this.errors, errorResponse.errors); + } + + @Override + public int hashCode() { + return Objects.hash(errors); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ErrorResponse {\n"); + + sb.append(" errors: ").append(toIndentedString(errors)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java new file mode 100644 index 0000000..d8eabb4 --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java @@ -0,0 +1,207 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; + +/** + * Lifecycle settings. When no lifecycle settings are supplied, the job and files will be deleted directly after retrieval of the file + */ +@ApiModel(description = "Lifecycle settings. When no lifecycle settings are supplied, the job and files will be deleted directly after retrieval of the file") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:29:49.515+02:00") +public class Lifecycle { + @JsonProperty("actionTime") + private OffsetDateTime actionTime = null; + + /** + * Gets or Sets action + */ + public enum ActionEnum { + DELETE("DELETE"); + + private String value; + + ActionEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ActionEnum fromValue(String text) { + for (ActionEnum b : ActionEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("action") + private ActionEnum action = null; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + RETRIEVAL("RETRIEVAL"), + + TIME("TIME"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TypeEnum fromValue(String text) { + for (TypeEnum b : TypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("type") + private TypeEnum type = null; + + public Lifecycle actionTime(OffsetDateTime actionTime) { + this.actionTime = actionTime; + return this; + } + + /** + * The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation + * @return actionTime + **/ + @ApiModelProperty(example = "null", value = "The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation") + public OffsetDateTime getActionTime() { + return actionTime; + } + + public void setActionTime(OffsetDateTime actionTime) { + this.actionTime = actionTime; + } + + public Lifecycle action(ActionEnum action) { + this.action = action; + return this; + } + + /** + * Get action + * @return action + **/ + @ApiModelProperty(example = "null", value = "") + public ActionEnum getAction() { + return action; + } + + public void setAction(ActionEnum action) { + this.action = action; + } + + public Lifecycle type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @ApiModelProperty(example = "null", value = "") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Lifecycle lifecycle = (Lifecycle) o; + return Objects.equals(this.actionTime, lifecycle.actionTime) && + Objects.equals(this.action, lifecycle.action) && + Objects.equals(this.type, lifecycle.type); + } + + @Override + public int hashCode() { + return Objects.hash(actionTime, action, type); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Lifecycle {\n"); + + sb.append(" actionTime: ").append(toIndentedString(actionTime)).append("\n"); + sb.append(" action: ").append(toIndentedString(action)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java new file mode 100644 index 0000000..3d6c6b3 --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java @@ -0,0 +1,349 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.sphereon.sdk.template_processor.model.MergeSettings; +import com.sphereon.sdk.template_processor.model.StreamLocation; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; + +/** + * The merge job. Has access to the job merge data. + */ +@ApiModel(description = "The merge job. Has access to the job merge data.") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:29:49.515+02:00") +public class MergeJob { + @JsonProperty("resultFolderPath") + private String resultFolderPath = null; + + @JsonProperty("completionTime") + private OffsetDateTime completionTime = null; + + @JsonProperty("jobId") + private String jobId = null; + + @JsonProperty("resultContainerId") + private String resultContainerId = null; + + @JsonProperty("creationTime") + private OffsetDateTime creationTime = null; + + @JsonProperty("dataSetId") + private String dataSetId = null; + + @JsonProperty("resultStreams") + private List resultStreams = new ArrayList(); + + @JsonProperty("headerDataSetIds") + private List headerDataSetIds = new ArrayList(); + + @JsonProperty("mergeSettings") + private MergeSettings mergeSettings = null; + + @JsonProperty("statusMessage") + private String statusMessage = null; + + /** + * The status of the job + */ + public enum StatusEnum { + CREATED("CREATED"), + + UPDATED("UPDATED"), + + PROCESSING("PROCESSING"), + + DONE("DONE"), + + ERROR("ERROR"), + + DELETED("DELETED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("status") + private StatusEnum status = null; + + public MergeJob resultFolderPath(String resultFolderPath) { + this.resultFolderPath = resultFolderPath; + return this; + } + + /** + * The target folder path of result files + * @return resultFolderPath + **/ + @ApiModelProperty(example = "null", value = "The target folder path of result files") + public String getResultFolderPath() { + return resultFolderPath; + } + + public void setResultFolderPath(String resultFolderPath) { + this.resultFolderPath = resultFolderPath; + } + + /** + * The completion date/time of this job in ISO 8601 format + * @return completionTime + **/ + @ApiModelProperty(example = "null", value = "The completion date/time of this job in ISO 8601 format") + public OffsetDateTime getCompletionTime() { + return completionTime; + } + + public MergeJob jobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation + * @return jobId + **/ + @ApiModelProperty(example = "null", required = true, value = "The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation") + public String getJobId() { + return jobId; + } + + public void setJobId(String jobId) { + this.jobId = jobId; + } + + public MergeJob resultContainerId(String resultContainerId) { + this.resultContainerId = resultContainerId; + return this; + } + + /** + * The target container id of result files + * @return resultContainerId + **/ + @ApiModelProperty(example = "null", value = "The target container id of result files") + public String getResultContainerId() { + return resultContainerId; + } + + public void setResultContainerId(String resultContainerId) { + this.resultContainerId = resultContainerId; + } + + /** + * The creation date/time of this job in ISO 8601 format + * @return creationTime + **/ + @ApiModelProperty(example = "null", value = "The creation date/time of this job in ISO 8601 format") + public OffsetDateTime getCreationTime() { + return creationTime; + } + + public MergeJob dataSetId(String dataSetId) { + this.dataSetId = dataSetId; + return this; + } + + /** + * Data set id + * @return dataSetId + **/ + @ApiModelProperty(example = "null", value = "Data set id") + public String getDataSetId() { + return dataSetId; + } + + public void setDataSetId(String dataSetId) { + this.dataSetId = dataSetId; + } + + public MergeJob resultStreams(List resultStreams) { + this.resultStreams = resultStreams; + return this; + } + + public MergeJob addResultStreamsItem(StreamLocation resultStreamsItem) { + this.resultStreams.add(resultStreamsItem); + return this; + } + + /** + * The storage locations of the result files. + * @return resultStreams + **/ + @ApiModelProperty(example = "null", required = true, value = "The storage locations of the result files.") + public List getResultStreams() { + return resultStreams; + } + + public void setResultStreams(List resultStreams) { + this.resultStreams = resultStreams; + } + + public MergeJob headerDataSetIds(List headerDataSetIds) { + this.headerDataSetIds = headerDataSetIds; + return this; + } + + public MergeJob addHeaderDataSetIdsItem(String headerDataSetIdsItem) { + this.headerDataSetIds.add(headerDataSetIdsItem); + return this; + } + + /** + * Header data set ids + * @return headerDataSetIds + **/ + @ApiModelProperty(example = "null", value = "Header data set ids") + public List getHeaderDataSetIds() { + return headerDataSetIds; + } + + public void setHeaderDataSetIds(List headerDataSetIds) { + this.headerDataSetIds = headerDataSetIds; + } + + public MergeJob mergeSettings(MergeSettings mergeSettings) { + this.mergeSettings = mergeSettings; + return this; + } + + /** + * Get mergeSettings + * @return mergeSettings + **/ + @ApiModelProperty(example = "null", value = "") + public MergeSettings getMergeSettings() { + return mergeSettings; + } + + public void setMergeSettings(MergeSettings mergeSettings) { + this.mergeSettings = mergeSettings; + } + + /** + * A status message, which can be informational, warning or error. A message here does not indicate an error perse + * @return statusMessage + **/ + @ApiModelProperty(example = "null", value = "A status message, which can be informational, warning or error. A message here does not indicate an error perse") + public String getStatusMessage() { + return statusMessage; + } + + /** + * The status of the job + * @return status + **/ + @ApiModelProperty(example = "null", required = true, value = "The status of the job") + public StatusEnum getStatus() { + return status; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MergeJob mergeJob = (MergeJob) o; + return Objects.equals(this.resultFolderPath, mergeJob.resultFolderPath) && + Objects.equals(this.completionTime, mergeJob.completionTime) && + Objects.equals(this.jobId, mergeJob.jobId) && + Objects.equals(this.resultContainerId, mergeJob.resultContainerId) && + Objects.equals(this.creationTime, mergeJob.creationTime) && + Objects.equals(this.dataSetId, mergeJob.dataSetId) && + Objects.equals(this.resultStreams, mergeJob.resultStreams) && + Objects.equals(this.headerDataSetIds, mergeJob.headerDataSetIds) && + Objects.equals(this.mergeSettings, mergeJob.mergeSettings) && + Objects.equals(this.statusMessage, mergeJob.statusMessage) && + Objects.equals(this.status, mergeJob.status); + } + + @Override + public int hashCode() { + return Objects.hash(resultFolderPath, completionTime, jobId, resultContainerId, creationTime, dataSetId, resultStreams, headerDataSetIds, mergeSettings, statusMessage, status); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MergeJob {\n"); + + sb.append(" resultFolderPath: ").append(toIndentedString(resultFolderPath)).append("\n"); + sb.append(" completionTime: ").append(toIndentedString(completionTime)).append("\n"); + sb.append(" jobId: ").append(toIndentedString(jobId)).append("\n"); + sb.append(" resultContainerId: ").append(toIndentedString(resultContainerId)).append("\n"); + sb.append(" creationTime: ").append(toIndentedString(creationTime)).append("\n"); + sb.append(" dataSetId: ").append(toIndentedString(dataSetId)).append("\n"); + sb.append(" resultStreams: ").append(toIndentedString(resultStreams)).append("\n"); + sb.append(" headerDataSetIds: ").append(toIndentedString(headerDataSetIds)).append("\n"); + sb.append(" mergeSettings: ").append(toIndentedString(mergeSettings)).append("\n"); + sb.append(" statusMessage: ").append(toIndentedString(statusMessage)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java new file mode 100644 index 0000000..fc5a095 --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java @@ -0,0 +1,192 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.sphereon.sdk.template_processor.model.MergeJob; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * The merge job response. + */ +@ApiModel(description = "The merge job response.") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:29:49.515+02:00") +public class MergeJobResponse { + @JsonProperty("jobId") + private String jobId = null; + + @JsonProperty("job") + private MergeJob job = null; + + @JsonProperty("statusMessage") + private String statusMessage = null; + + /** + * The status of the job + */ + public enum StatusEnum { + CREATED("CREATED"), + + UPDATED("UPDATED"), + + PROCESSING("PROCESSING"), + + DONE("DONE"), + + ERROR("ERROR"), + + DELETED("DELETED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("status") + private StatusEnum status = null; + + public MergeJobResponse jobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation + * @return jobId + **/ + @ApiModelProperty(example = "null", required = true, value = "The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation") + public String getJobId() { + return jobId; + } + + public void setJobId(String jobId) { + this.jobId = jobId; + } + + public MergeJobResponse job(MergeJob job) { + this.job = job; + return this; + } + + /** + * Get job + * @return job + **/ + @ApiModelProperty(example = "null", value = "") + public MergeJob getJob() { + return job; + } + + public void setJob(MergeJob job) { + this.job = job; + } + + /** + * A status message, which can be informational, warning or error. AA message here does not indicate an error perse + * @return statusMessage + **/ + @ApiModelProperty(example = "null", value = "A status message, which can be informational, warning or error. AA message here does not indicate an error perse") + public String getStatusMessage() { + return statusMessage; + } + + /** + * The status of the job + * @return status + **/ + @ApiModelProperty(example = "null", required = true, value = "The status of the job") + public StatusEnum getStatus() { + return status; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MergeJobResponse mergeJobResponse = (MergeJobResponse) o; + return Objects.equals(this.jobId, mergeJobResponse.jobId) && + Objects.equals(this.job, mergeJobResponse.job) && + Objects.equals(this.statusMessage, mergeJobResponse.statusMessage) && + Objects.equals(this.status, mergeJobResponse.status); + } + + @Override + public int hashCode() { + return Objects.hash(jobId, job, statusMessage, status); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MergeJobResponse {\n"); + + sb.append(" jobId: ").append(toIndentedString(jobId)).append("\n"); + sb.append(" job: ").append(toIndentedString(job)).append("\n"); + sb.append(" statusMessage: ").append(toIndentedString(statusMessage)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java new file mode 100644 index 0000000..b14637f --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java @@ -0,0 +1,356 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.sphereon.sdk.template_processor.model.Lifecycle; +import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.StreamLocation; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +/** + * Merge settings + */ +@ApiModel(description = "Merge settings") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:29:49.515+02:00") +public class MergeSettings { + @JsonProperty("lifecycle") + private Lifecycle lifecycle = null; + + /** + * Gets or Sets mergeResult + */ + public enum MergeResultEnum { + SINGLE_FILE("SINGLE_FILE"), + + SEPARATE_FILES("SEPARATE_FILES"); + + private String value; + + MergeResultEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static MergeResultEnum fromValue(String text) { + for (MergeResultEnum b : MergeResultEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("mergeResult") + private MergeResultEnum mergeResult = null; + + @JsonProperty("dataSetId") + private String dataSetId = null; + + /** + * Gets or Sets engine + */ + public enum EngineEnum { + BASIC("BASIC"), + + PREMIUM("PREMIUM"); + + private String value; + + EngineEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static EngineEnum fromValue(String text) { + for (EngineEnum b : EngineEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("engine") + private EngineEnum engine = null; + + @JsonProperty("headerDataSetIds") + private List headerDataSetIds = new ArrayList(); + + @JsonProperty("templateVersion") + private Integer templateVersion = null; + + @JsonProperty("resultStreamLocation") + private StreamLocation resultStreamLocation = null; + + @JsonProperty("templateId") + private String templateId = null; + + @JsonProperty("outputSettings") + private OutputSettings outputSettings = null; + + public MergeSettings lifecycle(Lifecycle lifecycle) { + this.lifecycle = lifecycle; + return this; + } + + /** + * Get lifecycle + * @return lifecycle + **/ + @ApiModelProperty(example = "null", value = "") + public Lifecycle getLifecycle() { + return lifecycle; + } + + public void setLifecycle(Lifecycle lifecycle) { + this.lifecycle = lifecycle; + } + + public MergeSettings mergeResult(MergeResultEnum mergeResult) { + this.mergeResult = mergeResult; + return this; + } + + /** + * Get mergeResult + * @return mergeResult + **/ + @ApiModelProperty(example = "null", value = "") + public MergeResultEnum getMergeResult() { + return mergeResult; + } + + public void setMergeResult(MergeResultEnum mergeResult) { + this.mergeResult = mergeResult; + } + + public MergeSettings dataSetId(String dataSetId) { + this.dataSetId = dataSetId; + return this; + } + + /** + * Data set id + * @return dataSetId + **/ + @ApiModelProperty(example = "null", required = true, value = "Data set id") + public String getDataSetId() { + return dataSetId; + } + + public void setDataSetId(String dataSetId) { + this.dataSetId = dataSetId; + } + + public MergeSettings engine(EngineEnum engine) { + this.engine = engine; + return this; + } + + /** + * Get engine + * @return engine + **/ + @ApiModelProperty(example = "null", value = "") + public EngineEnum getEngine() { + return engine; + } + + public void setEngine(EngineEnum engine) { + this.engine = engine; + } + + public MergeSettings headerDataSetIds(List headerDataSetIds) { + this.headerDataSetIds = headerDataSetIds; + return this; + } + + public MergeSettings addHeaderDataSetIdsItem(String headerDataSetIdsItem) { + this.headerDataSetIds.add(headerDataSetIdsItem); + return this; + } + + /** + * optional header data set ids + * @return headerDataSetIds + **/ + @ApiModelProperty(example = "null", value = "optional header data set ids") + public List getHeaderDataSetIds() { + return headerDataSetIds; + } + + public void setHeaderDataSetIds(List headerDataSetIds) { + this.headerDataSetIds = headerDataSetIds; + } + + public MergeSettings templateVersion(Integer templateVersion) { + this.templateVersion = templateVersion; + return this; + } + + /** + * Template version + * @return templateVersion + **/ + @ApiModelProperty(example = "null", value = "Template version") + public Integer getTemplateVersion() { + return templateVersion; + } + + public void setTemplateVersion(Integer templateVersion) { + this.templateVersion = templateVersion; + } + + public MergeSettings resultStreamLocation(StreamLocation resultStreamLocation) { + this.resultStreamLocation = resultStreamLocation; + return this; + } + + /** + * The output location of the result files. + * @return resultStreamLocation + **/ + @ApiModelProperty(example = "null", required = true, value = "The output location of the result files.") + public StreamLocation getResultStreamLocation() { + return resultStreamLocation; + } + + public void setResultStreamLocation(StreamLocation resultStreamLocation) { + this.resultStreamLocation = resultStreamLocation; + } + + public MergeSettings templateId(String templateId) { + this.templateId = templateId; + return this; + } + + /** + * Template id + * @return templateId + **/ + @ApiModelProperty(example = "null", required = true, value = "Template id") + public String getTemplateId() { + return templateId; + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + public MergeSettings outputSettings(OutputSettings outputSettings) { + this.outputSettings = outputSettings; + return this; + } + + /** + * Get outputSettings + * @return outputSettings + **/ + @ApiModelProperty(example = "null", required = true, value = "") + public OutputSettings getOutputSettings() { + return outputSettings; + } + + public void setOutputSettings(OutputSettings outputSettings) { + this.outputSettings = outputSettings; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MergeSettings mergeSettings = (MergeSettings) o; + return Objects.equals(this.lifecycle, mergeSettings.lifecycle) && + Objects.equals(this.mergeResult, mergeSettings.mergeResult) && + Objects.equals(this.dataSetId, mergeSettings.dataSetId) && + Objects.equals(this.engine, mergeSettings.engine) && + Objects.equals(this.headerDataSetIds, mergeSettings.headerDataSetIds) && + Objects.equals(this.templateVersion, mergeSettings.templateVersion) && + Objects.equals(this.resultStreamLocation, mergeSettings.resultStreamLocation) && + Objects.equals(this.templateId, mergeSettings.templateId) && + Objects.equals(this.outputSettings, mergeSettings.outputSettings); + } + + @Override + public int hashCode() { + return Objects.hash(lifecycle, mergeResult, dataSetId, engine, headerDataSetIds, templateVersion, resultStreamLocation, templateId, outputSettings); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MergeSettings {\n"); + + sb.append(" lifecycle: ").append(toIndentedString(lifecycle)).append("\n"); + sb.append(" mergeResult: ").append(toIndentedString(mergeResult)).append("\n"); + sb.append(" dataSetId: ").append(toIndentedString(dataSetId)).append("\n"); + sb.append(" engine: ").append(toIndentedString(engine)).append("\n"); + sb.append(" headerDataSetIds: ").append(toIndentedString(headerDataSetIds)).append("\n"); + sb.append(" templateVersion: ").append(toIndentedString(templateVersion)).append("\n"); + sb.append(" resultStreamLocation: ").append(toIndentedString(resultStreamLocation)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); + sb.append(" outputSettings: ").append(toIndentedString(outputSettings)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java new file mode 100644 index 0000000..4f413ff --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java @@ -0,0 +1,215 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Output settings + */ +@ApiModel(description = "Output settings") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:29:49.515+02:00") +public class OutputSettings { + /** + * Gets or Sets deliveryFormat + */ + public enum DeliveryFormatEnum { + PLAIN("PLAIN"), + + ZIP("ZIP"), + + _7ZIP("_7ZIP"); + + private String value; + + DeliveryFormatEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static DeliveryFormatEnum fromValue(String text) { + for (DeliveryFormatEnum b : DeliveryFormatEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("deliveryFormat") + private DeliveryFormatEnum deliveryFormat = null; + + /** + * Gets or Sets outputFormat + */ + public enum OutputFormatEnum { + DOC("DOC"), + + DOCX("DOCX"), + + RTF("RTF"), + + PDF("PDF"), + + XPS("XPS"), + + SVG("SVG"), + + HTML("HTML"), + + ODT("ODT"), + + TIFF("TIFF"), + + PNG("PNG"), + + BMP("BMP"), + + JPEG("JPEG"), + + TXT("TXT"), + + XML("XML"), + + JSON("JSON"), + + DEFAULT("DEFAULT"); + + private String value; + + OutputFormatEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OutputFormatEnum fromValue(String text) { + for (OutputFormatEnum b : OutputFormatEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("outputFormat") + private OutputFormatEnum outputFormat = null; + + public OutputSettings deliveryFormat(DeliveryFormatEnum deliveryFormat) { + this.deliveryFormat = deliveryFormat; + return this; + } + + /** + * Get deliveryFormat + * @return deliveryFormat + **/ + @ApiModelProperty(example = "null", value = "") + public DeliveryFormatEnum getDeliveryFormat() { + return deliveryFormat; + } + + public void setDeliveryFormat(DeliveryFormatEnum deliveryFormat) { + this.deliveryFormat = deliveryFormat; + } + + public OutputSettings outputFormat(OutputFormatEnum outputFormat) { + this.outputFormat = outputFormat; + return this; + } + + /** + * Get outputFormat + * @return outputFormat + **/ + @ApiModelProperty(example = "null", value = "") + public OutputFormatEnum getOutputFormat() { + return outputFormat; + } + + public void setOutputFormat(OutputFormatEnum outputFormat) { + this.outputFormat = outputFormat; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OutputSettings outputSettings = (OutputSettings) o; + return Objects.equals(this.deliveryFormat, outputSettings.deliveryFormat) && + Objects.equals(this.outputFormat, outputSettings.outputFormat); + } + + @Override + public int hashCode() { + return Objects.hash(deliveryFormat, outputFormat); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OutputSettings {\n"); + + sb.append(" deliveryFormat: ").append(toIndentedString(deliveryFormat)).append("\n"); + sb.append(" outputFormat: ").append(toIndentedString(outputFormat)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java new file mode 100644 index 0000000..162a077 --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java @@ -0,0 +1,171 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Owner info + */ +@ApiModel(description = "Owner info") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:29:49.515+02:00") +public class OwnerInfo { + @JsonProperty("phone") + private String phone = null; + + @JsonProperty("companyDepartment") + private String companyDepartment = null; + + @JsonProperty("name") + private String name = null; + + @JsonProperty("email") + private String email = null; + + public OwnerInfo phone(String phone) { + this.phone = phone; + return this; + } + + /** + * The owner's phone number + * @return phone + **/ + @ApiModelProperty(example = "null", value = "The owner's phone number") + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public OwnerInfo companyDepartment(String companyDepartment) { + this.companyDepartment = companyDepartment; + return this; + } + + /** + * The owner's company/department + * @return companyDepartment + **/ + @ApiModelProperty(example = "null", value = "The owner's company/department") + public String getCompanyDepartment() { + return companyDepartment; + } + + public void setCompanyDepartment(String companyDepartment) { + this.companyDepartment = companyDepartment; + } + + public OwnerInfo name(String name) { + this.name = name; + return this; + } + + /** + * The owner's name + * @return name + **/ + @ApiModelProperty(example = "null", value = "The owner's name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public OwnerInfo email(String email) { + this.email = email; + return this; + } + + /** + * The owner's email address + * @return email + **/ + @ApiModelProperty(example = "null", value = "The owner's email address") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OwnerInfo ownerInfo = (OwnerInfo) o; + return Objects.equals(this.phone, ownerInfo.phone) && + Objects.equals(this.companyDepartment, ownerInfo.companyDepartment) && + Objects.equals(this.name, ownerInfo.name) && + Objects.equals(this.email, ownerInfo.email); + } + + @Override + public int hashCode() { + return Objects.hash(phone, companyDepartment, name, email); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OwnerInfo {\n"); + + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" companyDepartment: ").append(toIndentedString(companyDepartment)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java new file mode 100644 index 0000000..5a0d874 --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java @@ -0,0 +1,171 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Location record of data stream + */ +@ApiModel(description = "Location record of data stream") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:29:49.515+02:00") +public class StreamLocation { + @JsonProperty("folderPath") + private String folderPath = null; + + @JsonProperty("originalFileName") + private String originalFileName = null; + + @JsonProperty("containerId") + private String containerId = null; + + @JsonProperty("fileId") + private String fileId = null; + + public StreamLocation folderPath(String folderPath) { + this.folderPath = folderPath; + return this; + } + + /** + * Get folderPath + * @return folderPath + **/ + @ApiModelProperty(example = "null", value = "") + public String getFolderPath() { + return folderPath; + } + + public void setFolderPath(String folderPath) { + this.folderPath = folderPath; + } + + public StreamLocation originalFileName(String originalFileName) { + this.originalFileName = originalFileName; + return this; + } + + /** + * Get originalFileName + * @return originalFileName + **/ + @ApiModelProperty(example = "null", value = "") + public String getOriginalFileName() { + return originalFileName; + } + + public void setOriginalFileName(String originalFileName) { + this.originalFileName = originalFileName; + } + + public StreamLocation containerId(String containerId) { + this.containerId = containerId; + return this; + } + + /** + * Get containerId + * @return containerId + **/ + @ApiModelProperty(example = "null", value = "") + public String getContainerId() { + return containerId; + } + + public void setContainerId(String containerId) { + this.containerId = containerId; + } + + public StreamLocation fileId(String fileId) { + this.fileId = fileId; + return this; + } + + /** + * Get fileId + * @return fileId + **/ + @ApiModelProperty(example = "null", value = "") + public String getFileId() { + return fileId; + } + + public void setFileId(String fileId) { + this.fileId = fileId; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StreamLocation streamLocation = (StreamLocation) o; + return Objects.equals(this.folderPath, streamLocation.folderPath) && + Objects.equals(this.originalFileName, streamLocation.originalFileName) && + Objects.equals(this.containerId, streamLocation.containerId) && + Objects.equals(this.fileId, streamLocation.fileId); + } + + @Override + public int hashCode() { + return Objects.hash(folderPath, originalFileName, containerId, fileId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StreamLocation {\n"); + + sb.append(" folderPath: ").append(toIndentedString(folderPath)).append("\n"); + sb.append(" originalFileName: ").append(toIndentedString(originalFileName)).append("\n"); + sb.append(" containerId: ").append(toIndentedString(containerId)).append("\n"); + sb.append(" fileId: ").append(toIndentedString(fileId)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java new file mode 100644 index 0000000..0644de5 --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java @@ -0,0 +1,256 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.sphereon.sdk.template_processor.model.OwnerInfo; +import com.sphereon.sdk.template_processor.model.StreamLocation; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * TemplateContext + */ +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:29:49.515+02:00") +public class TemplateContext { + /** + * Gets or Sets templateType + */ + public enum TemplateTypeEnum { + OFFICE("OFFICE"), + + FREEMARKER("FREEMARKER"); + + private String value; + + TemplateTypeEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TemplateTypeEnum fromValue(String text) { + for (TemplateTypeEnum b : TemplateTypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("templateType") + private TemplateTypeEnum templateType = null; + + @JsonProperty("templateFileLocations") + private Map templateFileLocations = new HashMap(); + + @JsonProperty("description") + private String description = null; + + @JsonProperty("ownerInfo") + private OwnerInfo ownerInfo = null; + + @JsonProperty("id") + private String id = null; + + @JsonProperty("templateId") + private String templateId = null; + + public TemplateContext templateType(TemplateTypeEnum templateType) { + this.templateType = templateType; + return this; + } + + /** + * Get templateType + * @return templateType + **/ + @ApiModelProperty(example = "null", required = true, value = "") + public TemplateTypeEnum getTemplateType() { + return templateType; + } + + public void setTemplateType(TemplateTypeEnum templateType) { + this.templateType = templateType; + } + + public TemplateContext templateFileLocations(Map templateFileLocations) { + this.templateFileLocations = templateFileLocations; + return this; + } + + public TemplateContext putTemplateFileLocationsItem(String key, StreamLocation templateFileLocationsItem) { + this.templateFileLocations.put(key, templateFileLocationsItem); + return this; + } + + /** + * The template files (versioned) + * @return templateFileLocations + **/ + @ApiModelProperty(example = "null", value = "The template files (versioned)") + public Map getTemplateFileLocations() { + return templateFileLocations; + } + + public void setTemplateFileLocations(Map templateFileLocations) { + this.templateFileLocations = templateFileLocations; + } + + public TemplateContext description(String description) { + this.description = description; + return this; + } + + /** + * The template description + * @return description + **/ + @ApiModelProperty(example = "null", value = "The template description") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public TemplateContext ownerInfo(OwnerInfo ownerInfo) { + this.ownerInfo = ownerInfo; + return this; + } + + /** + * Get ownerInfo + * @return ownerInfo + **/ + @ApiModelProperty(example = "null", value = "") + public OwnerInfo getOwnerInfo() { + return ownerInfo; + } + + public void setOwnerInfo(OwnerInfo ownerInfo) { + this.ownerInfo = ownerInfo; + } + + public TemplateContext id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @ApiModelProperty(example = "null", value = "") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public TemplateContext templateId(String templateId) { + this.templateId = templateId; + return this; + } + + /** + * The template context id + * @return templateId + **/ + @ApiModelProperty(example = "null", value = "The template context id") + public String getTemplateId() { + return templateId; + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TemplateContext templateContext = (TemplateContext) o; + return Objects.equals(this.templateType, templateContext.templateType) && + Objects.equals(this.templateFileLocations, templateContext.templateFileLocations) && + Objects.equals(this.description, templateContext.description) && + Objects.equals(this.ownerInfo, templateContext.ownerInfo) && + Objects.equals(this.id, templateContext.id) && + Objects.equals(this.templateId, templateContext.templateId); + } + + @Override + public int hashCode() { + return Objects.hash(templateType, templateFileLocations, description, ownerInfo, id, templateId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TemplateContext {\n"); + + sb.append(" templateType: ").append(toIndentedString(templateType)).append("\n"); + sb.append(" templateFileLocations: ").append(toIndentedString(templateFileLocations)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" ownerInfo: ").append(toIndentedString(ownerInfo)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java new file mode 100644 index 0000000..889e5a5 --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java @@ -0,0 +1,202 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.sphereon.sdk.template_processor.model.OwnerInfo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * The merge template request. + */ +@ApiModel(description = "The merge template request.") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:29:49.515+02:00") +public class TemplateContextRequest { + /** + * Gets or Sets templateType + */ + public enum TemplateTypeEnum { + OFFICE("OFFICE"), + + FREEMARKER("FREEMARKER"); + + private String value; + + TemplateTypeEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static TemplateTypeEnum fromValue(String text) { + for (TemplateTypeEnum b : TemplateTypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("templateType") + private TemplateTypeEnum templateType = null; + + @JsonProperty("description") + private String description = null; + + @JsonProperty("ownerInfo") + private OwnerInfo ownerInfo = null; + + @JsonProperty("templateId") + private String templateId = null; + + public TemplateContextRequest templateType(TemplateTypeEnum templateType) { + this.templateType = templateType; + return this; + } + + /** + * Get templateType + * @return templateType + **/ + @ApiModelProperty(example = "null", required = true, value = "") + public TemplateTypeEnum getTemplateType() { + return templateType; + } + + public void setTemplateType(TemplateTypeEnum templateType) { + this.templateType = templateType; + } + + public TemplateContextRequest description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @ApiModelProperty(example = "null", value = "") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public TemplateContextRequest ownerInfo(OwnerInfo ownerInfo) { + this.ownerInfo = ownerInfo; + return this; + } + + /** + * Get ownerInfo + * @return ownerInfo + **/ + @ApiModelProperty(example = "null", value = "") + public OwnerInfo getOwnerInfo() { + return ownerInfo; + } + + public void setOwnerInfo(OwnerInfo ownerInfo) { + this.ownerInfo = ownerInfo; + } + + public TemplateContextRequest templateId(String templateId) { + this.templateId = templateId; + return this; + } + + /** + * The template context id + * @return templateId + **/ + @ApiModelProperty(example = "null", value = "The template context id") + public String getTemplateId() { + return templateId; + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TemplateContextRequest templateContextRequest = (TemplateContextRequest) o; + return Objects.equals(this.templateType, templateContextRequest.templateType) && + Objects.equals(this.description, templateContextRequest.description) && + Objects.equals(this.ownerInfo, templateContextRequest.ownerInfo) && + Objects.equals(this.templateId, templateContextRequest.templateId); + } + + @Override + public int hashCode() { + return Objects.hash(templateType, description, ownerInfo, templateId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TemplateContextRequest {\n"); + + sb.append(" templateType: ").append(toIndentedString(templateType)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" ownerInfo: ").append(toIndentedString(ownerInfo)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java new file mode 100644 index 0000000..9b19924 --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java @@ -0,0 +1,189 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.sphereon.sdk.template_processor.model.TemplateContext; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; + +/** + * The merge template response. + */ +@ApiModel(description = "The merge template response.") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:29:49.515+02:00") +public class TemplateContextResponse { + @JsonProperty("creationTime") + private OffsetDateTime creationTime = null; + + @JsonProperty("context") + private TemplateContext context = null; + + @JsonProperty("id") + private String id = null; + + /** + * The status of the template + */ + public enum StatusEnum { + CREATED("CREATED"), + + UPDATED("UPDATED"), + + DELETED("DELETED"), + + PROCESSING("PROCESSING"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("status") + private StatusEnum status = null; + + /** + * The creation date/time of this response in ISO 8601 format + * @return creationTime + **/ + @ApiModelProperty(example = "null", value = "The creation date/time of this response in ISO 8601 format") + public OffsetDateTime getCreationTime() { + return creationTime; + } + + public TemplateContextResponse context(TemplateContext context) { + this.context = context; + return this; + } + + /** + * Get context + * @return context + **/ + @ApiModelProperty(example = "null", value = "") + public TemplateContext getContext() { + return context; + } + + public void setContext(TemplateContext context) { + this.context = context; + } + + public TemplateContextResponse id(String id) { + this.id = id; + return this; + } + + /** + * Unique template context id + * @return id + **/ + @ApiModelProperty(example = "null", required = true, value = "Unique template context id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + /** + * The status of the template + * @return status + **/ + @ApiModelProperty(example = "null", required = true, value = "The status of the template") + public StatusEnum getStatus() { + return status; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TemplateContextResponse templateContextResponse = (TemplateContextResponse) o; + return Objects.equals(this.creationTime, templateContextResponse.creationTime) && + Objects.equals(this.context, templateContextResponse.context) && + Objects.equals(this.id, templateContextResponse.id) && + Objects.equals(this.status, templateContextResponse.status); + } + + @Override + public int hashCode() { + return Objects.hash(creationTime, context, id, status); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TemplateContextResponse {\n"); + + sb.append(" creationTime: ").append(toIndentedString(creationTime)).append("\n"); + sb.append(" context: ").append(toIndentedString(context)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/MergeApiTest.java b/java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/MergeApiTest.java new file mode 100644 index 0000000..7f52b33 --- /dev/null +++ b/java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/MergeApiTest.java @@ -0,0 +1,264 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.api; + +import com.sphereon.sdk.template_processor.handler.ApiException; +import com.sphereon.sdk.template_processor.model.DataSetResponse; +import com.sphereon.sdk.template_processor.model.ErrorResponse; +import com.sphereon.sdk.template_processor.model.TemplateContextResponse; +import com.sphereon.sdk.template_processor.model.TemplateContextRequest; +import com.sphereon.sdk.template_processor.model.MergeJobResponse; +import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.MergeSettings; +import java.io.File; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for MergeApi + */ +public class MergeApiTest { + + private final MergeApi api = new MergeApi(); + + + /** + * Store dataset + * + * Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createDataSetTest() throws ApiException { + String payload = null; + // DataSetResponse response = api.createDataSet(payload); + + // TODO: test validations + } + + /** + * Create template context + * + * Create a unique template context for your environment + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createTemplateContextTest() throws ApiException { + TemplateContextRequest templateRequest = null; + // TemplateContextResponse response = api.createTemplateContext(templateRequest); + + // TODO: test validations + } + + /** + * Delete a stored data set + * + * Delete a stored data set + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteDataSetTest() throws ApiException { + String dataSetId = null; + // DataSetResponse response = api.deleteDataSet(dataSetId); + + // TODO: test validations + } + + /** + * Delete a job manually + * + * Delete the merge job and all related files + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteJobTest() throws ApiException { + String jobId = null; + // MergeJobResponse response = api.deleteJob(jobId); + + // TODO: test validations + } + + /** + * Delete template context + * + * Delete a template context with all history + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteTemplateContextTest() throws ApiException { + String templateId = null; + // TemplateContextResponse response = api.deleteTemplateContext(templateId); + + // TODO: test validations + } + + /** + * Job definition and state + * + * Get the merge job definition and current state. Please not that you can differentiate based on http response status + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getJobTest() throws ApiException { + String jobId = null; + // MergeJobResponse response = api.getJob(jobId); + + // TODO: test validations + } + + /** + * Get all jobs + * + * Get all office text job definitions and their current state. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getJobsTest() throws ApiException { + List status = null; + // List response = api.getJobs(status); + + // TODO: test validations + } + + /** + * Get the result file + * + * Get a merge result document as a binary stream. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getResultStreamByIdTest() throws ApiException { + String jobId = null; + String streamId = null; + OutputSettings outputSettings = null; + // byte[] response = api.getResultStreamById(jobId, streamId, outputSettings); + + // TODO: test validations + } + + /** + * Get the result file + * + * Get all documents inside a compressed container as a binary stream. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getResultStreamsAsContainerTest() throws ApiException { + String jobId = null; + OutputSettings outputSettings = null; + // byte[] response = api.getResultStreamsAsContainer(jobId, outputSettings); + + // TODO: test validations + } + + /** + * Get template context + * + * Get an existing template context + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getTemplateContextTest() throws ApiException { + String templateId = null; + // TemplateContextResponse response = api.getTemplateContext(templateId); + + // TODO: test validations + } + + /** + * Submit merge job for processing + * + * Submit merge job run. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void submitJobTest() throws ApiException { + MergeSettings mergesettings = null; + // MergeJobResponse response = api.submitJob(mergesettings); + + // TODO: test validations + } + + /** + * Update template context + * + * Update an existing template context for your environment + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateTemplateContextTest() throws ApiException { + TemplateContextRequest templateContextRequest = null; + // TemplateContextResponse response = api.updateTemplateContext(templateContextRequest); + + // TODO: test validations + } + + /** + * Upload template file + * + * Upload the Office template file + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void uploadTemplateFileTest() throws ApiException { + String templateId = null; + File stream = null; + // TemplateContextResponse response = api.uploadTemplateFile(templateId, stream); + + // TODO: test validations + } + +} diff --git a/java8-okhttp-gson/.gitignore b/java8-okhttp-gson/.gitignore new file mode 100644 index 0000000..a530464 --- /dev/null +++ b/java8-okhttp-gson/.gitignore @@ -0,0 +1,21 @@ +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# exclude jar for gradle wrapper +!gradle/wrapper/*.jar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +# build files +**/target +target +.gradle +build diff --git a/java8-okhttp-gson/.swagger-codegen-ignore b/java8-okhttp-gson/.swagger-codegen-ignore new file mode 100644 index 0000000..c5fa491 --- /dev/null +++ b/java8-okhttp-gson/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/java8-okhttp-gson/.travis.yml b/java8-okhttp-gson/.travis.yml new file mode 100644 index 0000000..33e7947 --- /dev/null +++ b/java8-okhttp-gson/.travis.yml @@ -0,0 +1,29 @@ +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +language: java +jdk: + - oraclejdk8 + - oraclejdk7 +before_install: + # ensure gradlew has proper permission + - chmod a+x ./gradlew +script: + # test using maven + - mvn test + # uncomment below to test using gradle + # - gradle test + # uncomment below to test using sbt + # - sbt test diff --git a/java8-okhttp-gson/LICENSE b/java8-okhttp-gson/LICENSE new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/java8-okhttp-gson/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/java8-okhttp-gson/README.md b/java8-okhttp-gson/README.md new file mode 100644 index 0000000..0bbd58c --- /dev/null +++ b/java8-okhttp-gson/README.md @@ -0,0 +1,149 @@ +# template-processor-sdk-java8 + +## Requirements + +Building the API client library requires [Maven](https://maven.apache.org/) to be installed. + +## Installation + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn install +``` + +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: + +```shell +mvn deploy +``` + +Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information. + +### Maven users + +Add this dependency to your project's POM: + +```xml + + com.sphereon.sdk + template-processor-sdk-java8 + 0.1.0 + compile + +``` + +### Gradle users + +Add this dependency to your project's build file: + +```groovy +compile "com.sphereon.sdk:template-processor-sdk-java8:0.1.0" +``` + +### Others + +At first generate the JAR by executing: + + mvn package + +Then manually install the following JARs: + +* target/template-processor-sdk-java8-0.1.0.jar +* target/lib/*.jar + +## Getting Started + +Please follow the [installation](#installation) instruction and execute the following Java code: + +```java + +import com.sphereon.sdk.template_processor.handler.*; +import com.sphereon.sdk.template_processor.handler.auth.*; +import com.sphereon.sdk.template_processor.model.*; +import com.sphereon.sdk.template_processor.api.MergeApi; + +import java.io.File; +import java.util.*; + +public class MergeApiExample { + + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + + // Configure OAuth2 access token for authorization: oauth2schema + OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); + oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + + MergeApi apiInstance = new MergeApi(); + String payload = "payload_example"; // String | The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] + try { + DataSetResponse result = apiInstance.createDataSet(payload); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling MergeApi#createDataSet"); + e.printStackTrace(); + } + } +} + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://gw.api.cloud.sphereon.com/* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*MergeApi* | [**createDataSet**](docs/MergeApi.md#createDataSet) | **POST** /template-processor/merge/0.1/datasets | Store dataset +*MergeApi* | [**createTemplateContext**](docs/MergeApi.md#createTemplateContext) | **POST** /template-processor/merge/0.1/templates | Create template context +*MergeApi* | [**deleteDataSet**](docs/MergeApi.md#deleteDataSet) | **DELETE** /template-processor/merge/0.1/datasets/{dataSetId} | Delete a stored data set +*MergeApi* | [**deleteJob**](docs/MergeApi.md#deleteJob) | **DELETE** /template-processor/merge/0.1/jobs/{jobId} | Delete a job manually +*MergeApi* | [**deleteTemplateContext**](docs/MergeApi.md#deleteTemplateContext) | **DELETE** /template-processor/merge/0.1/templates/{templateId} | Delete template context +*MergeApi* | [**getJob**](docs/MergeApi.md#getJob) | **GET** /template-processor/merge/0.1/jobs/{jobId} | Job definition and state +*MergeApi* | [**getJobs**](docs/MergeApi.md#getJobs) | **GET** /template-processor/merge/0.1/jobs | Get all jobs +*MergeApi* | [**getResultStreamById**](docs/MergeApi.md#getResultStreamById) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file +*MergeApi* | [**getResultStreamsAsContainer**](docs/MergeApi.md#getResultStreamsAsContainer) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/container | Get the result file +*MergeApi* | [**getTemplateContext**](docs/MergeApi.md#getTemplateContext) | **GET** /template-processor/merge/0.1/templates/{templateId} | Get template context +*MergeApi* | [**submitJob**](docs/MergeApi.md#submitJob) | **PUT** /template-processor/merge/0.1/jobs | Submit merge job for processing +*MergeApi* | [**updateTemplateContext**](docs/MergeApi.md#updateTemplateContext) | **PUT** /template-processor/merge/0.1/templates | Update template context +*MergeApi* | [**uploadTemplateFile**](docs/MergeApi.md#uploadTemplateFile) | **POST** /template-processor/merge/0.1/templates/{templateId} | Upload template file + + +## Documentation for Models + + - [DataSetResponse](docs/DataSetResponse.md) + - [Error](docs/Error.md) + - [ErrorResponse](docs/ErrorResponse.md) + - [Lifecycle](docs/Lifecycle.md) + - [MergeJob](docs/MergeJob.md) + - [MergeJobResponse](docs/MergeJobResponse.md) + - [MergeSettings](docs/MergeSettings.md) + - [OutputSettings](docs/OutputSettings.md) + - [OwnerInfo](docs/OwnerInfo.md) + - [StreamLocation](docs/StreamLocation.md) + - [TemplateContext](docs/TemplateContext.md) + - [TemplateContextRequest](docs/TemplateContextRequest.md) + - [TemplateContextResponse](docs/TemplateContextResponse.md) + + +## Documentation for Authorization + +Authentication schemes defined for the API: +### oauth2schema + +- **Type**: OAuth +- **Flow**: application +- **Authorizatoin URL**: +- **Scopes**: + - global: accessEverything + + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. + +## Author + +dev@sphereon.com + diff --git a/java8-okhttp-gson/build.gradle b/java8-okhttp-gson/build.gradle new file mode 100644 index 0000000..f6ebdb9 --- /dev/null +++ b/java8-okhttp-gson/build.gradle @@ -0,0 +1,102 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' + +group = 'com.sphereon.sdk' +version = '0.1.0' + +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.5.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' + } +} + +repositories { + jcenter() +} + + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 23 + buildToolsVersion '23.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 23 + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_7 + targetCompatibility JavaVersion.VERSION_1_7 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided 'javax.annotation:jsr250-api:1.0' + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDir + task.destinationDir = project.file("${project.buildDir}/outputs/jar") + task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task); + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven' + + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + install { + repositories.mavenInstaller { + pom.artifactId = 'template-processor-sdk-java8' + } + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +dependencies { + compile 'io.swagger:swagger-annotations:1.5.8' + compile 'com.squareup.okhttp:okhttp:2.7.5' + compile 'com.squareup.okhttp:logging-interceptor:2.7.5' + compile 'com.google.code.gson:gson:2.6.2' + testCompile 'junit:junit:4.12' +} diff --git a/java8-okhttp-gson/build.sbt b/java8-okhttp-gson/build.sbt new file mode 100644 index 0000000..16dc9d6 --- /dev/null +++ b/java8-okhttp-gson/build.sbt @@ -0,0 +1,19 @@ +lazy val root = (project in file(".")). + settings( + organization := "com.sphereon.sdk", + name := "template-processor-sdk-java8", + version := "0.1.0", + scalaVersion := "2.11.4", + scalacOptions ++= Seq("-feature"), + javacOptions in compile ++= Seq("-Xlint:deprecation"), + publishArtifact in (Compile, packageDoc) := false, + resolvers += Resolver.mavenLocal, + libraryDependencies ++= Seq( + "io.swagger" % "swagger-annotations" % "1.5.8", + "com.squareup.okhttp" % "okhttp" % "2.7.5", + "com.squareup.okhttp" % "logging-interceptor" % "2.7.5", + "com.google.code.gson" % "gson" % "2.6.2", + "junit" % "junit" % "4.12" % "test", + "com.novocode" % "junit-interface" % "0.10" % "test" + ) + ) diff --git a/java8-okhttp-gson/docs/DataSetResponse.md b/java8-okhttp-gson/docs/DataSetResponse.md new file mode 100644 index 0000000..3e7502d --- /dev/null +++ b/java8-okhttp-gson/docs/DataSetResponse.md @@ -0,0 +1,22 @@ + +# DataSetResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**completionTime** | [**OffsetDateTime**](OffsetDateTime.md) | The completion date/time of this template in ISO 8601 format | [optional] +**creationTime** | [**OffsetDateTime**](OffsetDateTime.md) | The creation date/time of this template in ISO 8601 format | [optional] +**id** | **String** | Unique dataset id | +**status** | [**StatusEnum**](#StatusEnum) | The status of the template | + + + +## Enum: StatusEnum +Name | Value +---- | ----- +CREATED | "CREATED" +UPDATED | "UPDATED" +DELETED | "DELETED" + + + diff --git a/java8-okhttp-gson/docs/Error.md b/java8-okhttp-gson/docs/Error.md new file mode 100644 index 0000000..249e09f --- /dev/null +++ b/java8-okhttp-gson/docs/Error.md @@ -0,0 +1,22 @@ + +# Error + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **String** | | +**level** | [**LevelEnum**](#LevelEnum) | | +**cause** | [**Error**](Error.md) | | [optional] +**message** | **String** | | + + + +## Enum: LevelEnum +Name | Value +---- | ----- +INFO | "INFO" +WARNING | "WARNING" +FATAL | "FATAL" + + + diff --git a/java8-okhttp-gson/docs/ErrorResponse.md b/java8-okhttp-gson/docs/ErrorResponse.md new file mode 100644 index 0000000..7132a3b --- /dev/null +++ b/java8-okhttp-gson/docs/ErrorResponse.md @@ -0,0 +1,10 @@ + +# ErrorResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**List<Error>**](Error.md) | | [optional] + + + diff --git a/java8-okhttp-gson/docs/Lifecycle.md b/java8-okhttp-gson/docs/Lifecycle.md new file mode 100644 index 0000000..b53a347 --- /dev/null +++ b/java8-okhttp-gson/docs/Lifecycle.md @@ -0,0 +1,27 @@ + +# Lifecycle + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**actionTime** | [**OffsetDateTime**](OffsetDateTime.md) | The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation | [optional] +**action** | [**ActionEnum**](#ActionEnum) | | [optional] +**type** | [**TypeEnum**](#TypeEnum) | | [optional] + + + +## Enum: ActionEnum +Name | Value +---- | ----- +DELETE | "DELETE" + + + +## Enum: TypeEnum +Name | Value +---- | ----- +RETRIEVAL | "RETRIEVAL" +TIME | "TIME" + + + diff --git a/java8-okhttp-gson/docs/MergeApi.md b/java8-okhttp-gson/docs/MergeApi.md new file mode 100644 index 0000000..846fa0a --- /dev/null +++ b/java8-okhttp-gson/docs/MergeApi.md @@ -0,0 +1,718 @@ +# MergeApi + +All URIs are relative to *https://gw.api.cloud.sphereon.com/* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createDataSet**](MergeApi.md#createDataSet) | **POST** /template-processor/merge/0.1/datasets | Store dataset +[**createTemplateContext**](MergeApi.md#createTemplateContext) | **POST** /template-processor/merge/0.1/templates | Create template context +[**deleteDataSet**](MergeApi.md#deleteDataSet) | **DELETE** /template-processor/merge/0.1/datasets/{dataSetId} | Delete a stored data set +[**deleteJob**](MergeApi.md#deleteJob) | **DELETE** /template-processor/merge/0.1/jobs/{jobId} | Delete a job manually +[**deleteTemplateContext**](MergeApi.md#deleteTemplateContext) | **DELETE** /template-processor/merge/0.1/templates/{templateId} | Delete template context +[**getJob**](MergeApi.md#getJob) | **GET** /template-processor/merge/0.1/jobs/{jobId} | Job definition and state +[**getJobs**](MergeApi.md#getJobs) | **GET** /template-processor/merge/0.1/jobs | Get all jobs +[**getResultStreamById**](MergeApi.md#getResultStreamById) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file +[**getResultStreamsAsContainer**](MergeApi.md#getResultStreamsAsContainer) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/container | Get the result file +[**getTemplateContext**](MergeApi.md#getTemplateContext) | **GET** /template-processor/merge/0.1/templates/{templateId} | Get template context +[**submitJob**](MergeApi.md#submitJob) | **PUT** /template-processor/merge/0.1/jobs | Submit merge job for processing +[**updateTemplateContext**](MergeApi.md#updateTemplateContext) | **PUT** /template-processor/merge/0.1/templates | Update template context +[**uploadTemplateFile**](MergeApi.md#uploadTemplateFile) | **POST** /template-processor/merge/0.1/templates/{templateId} | Upload template file + + + +# **createDataSet** +> DataSetResponse createDataSet(payload) + +Store dataset + +Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String payload = "payload_example"; // String | The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] +try { + DataSetResponse result = apiInstance.createDataSet(payload); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#createDataSet"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **payload** | **String**| The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] | + +### Return type + +[**DataSetResponse**](DataSetResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + + +# **createTemplateContext** +> TemplateContextResponse createTemplateContext(templateRequest) + +Create template context + +Create a unique template context for your environment + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +TemplateContextRequest templateRequest = new TemplateContextRequest(); // TemplateContextRequest | The template request +try { + TemplateContextResponse result = apiInstance.createTemplateContext(templateRequest); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#createTemplateContext"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| The template request | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + + +# **deleteDataSet** +> DataSetResponse deleteDataSet(dataSetId) + +Delete a stored data set + +Delete a stored data set + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String dataSetId = "dataSetId_example"; // String | dataSetId +try { + DataSetResponse result = apiInstance.deleteDataSet(dataSetId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#deleteDataSet"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dataSetId** | **String**| dataSetId | + +### Return type + +[**DataSetResponse**](DataSetResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + + +# **deleteJob** +> MergeJobResponse deleteJob(jobId) + +Delete a job manually + +Delete the merge job and all related files + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String jobId = "jobId_example"; // String | jobId +try { + MergeJobResponse result = apiInstance.deleteJob(jobId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#deleteJob"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **String**| jobId | + +### Return type + +[**MergeJobResponse**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + + +# **deleteTemplateContext** +> TemplateContextResponse deleteTemplateContext(templateId) + +Delete template context + +Delete a template context with all history + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String templateId = "templateId_example"; // String | templateId +try { + TemplateContextResponse result = apiInstance.deleteTemplateContext(templateId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#deleteTemplateContext"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **String**| templateId | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + + +# **getJob** +> MergeJobResponse getJob(jobId) + +Job definition and state + +Get the merge job definition and current state. Please not that you can differentiate based on http response status + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String jobId = "jobId_example"; // String | jobId +try { + MergeJobResponse result = apiInstance.getJob(jobId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#getJob"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **String**| jobId | + +### Return type + +[**MergeJobResponse**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + + +# **getJobs** +> List<MergeJobResponse> getJobs(status) + +Get all jobs + +Get all office text job definitions and their current state. + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +List status = Arrays.asList("status_example"); // List | A list of status to filter on. +try { + List result = apiInstance.getJobs(status); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#getJobs"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**List<String>**](String.md)| A list of status to filter on. | [optional] [enum: CREATED, UPDATED, PROCESSING, DONE, ERROR, DELETED] + +### Return type + +[**List<MergeJobResponse>**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + + +# **getResultStreamById** +> byte[] getResultStreamById(jobId, streamId, outputSettings) + +Get the result file + +Get a merge result document as a binary stream. + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String jobId = "jobId_example"; // String | jobId +String streamId = "streamId_example"; // String | streamId +OutputSettings outputSettings = new OutputSettings(); // OutputSettings | outputSettings +try { + byte[] result = apiInstance.getResultStreamById(jobId, streamId, outputSettings); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#getResultStreamById"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **String**| jobId | + **streamId** | **String**| streamId | + **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] + +### Return type + +**byte[]** + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/octet-stream + + +# **getResultStreamsAsContainer** +> byte[] getResultStreamsAsContainer(jobId, outputSettings) + +Get the result file + +Get all documents inside a compressed container as a binary stream. + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String jobId = "jobId_example"; // String | jobId +OutputSettings outputSettings = new OutputSettings(); // OutputSettings | outputSettings +try { + byte[] result = apiInstance.getResultStreamsAsContainer(jobId, outputSettings); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#getResultStreamsAsContainer"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **String**| jobId | + **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] + +### Return type + +**byte[]** + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/octet-stream + + +# **getTemplateContext** +> TemplateContextResponse getTemplateContext(templateId) + +Get template context + +Get an existing template context + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String templateId = "templateId_example"; // String | The template context name unique for your environment +try { + TemplateContextResponse result = apiInstance.getTemplateContext(templateId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#getTemplateContext"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **String**| The template context name unique for your environment | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + + +# **submitJob** +> MergeJobResponse submitJob(mergesettings) + +Submit merge job for processing + +Submit merge job run. + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +MergeSettings mergesettings = new MergeSettings(); // MergeSettings | The merge- and output settings +try { + MergeJobResponse result = apiInstance.submitJob(mergesettings); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#submitJob"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **mergesettings** | [**MergeSettings**](MergeSettings.md)| The merge- and output settings | + +### Return type + +[**MergeJobResponse**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + + +# **updateTemplateContext** +> TemplateContextResponse updateTemplateContext(templateContextRequest) + +Update template context + +Update an existing template context for your environment + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +TemplateContextRequest templateContextRequest = new TemplateContextRequest(); // TemplateContextRequest | templateContextRequest +try { + TemplateContextResponse result = apiInstance.updateTemplateContext(templateContextRequest); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#updateTemplateContext"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateContextRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| templateContextRequest | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + + +# **uploadTemplateFile** +> TemplateContextResponse uploadTemplateFile(templateId, stream) + +Upload template file + +Upload the Office template file + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String templateId = "templateId_example"; // String | The template context name unique for your environment +File stream = new File("/path/to/file.txt"); // File | The template (file/inputstream) to store +try { + TemplateContextResponse result = apiInstance.uploadTemplateFile(templateId, stream); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#uploadTemplateFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **String**| The template context name unique for your environment | + **stream** | **File**| The template (file/inputstream) to store | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json;charset=UTF-8 + diff --git a/java8-okhttp-gson/docs/MergeJob.md b/java8-okhttp-gson/docs/MergeJob.md new file mode 100644 index 0000000..1cebcea --- /dev/null +++ b/java8-okhttp-gson/docs/MergeJob.md @@ -0,0 +1,32 @@ + +# MergeJob + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resultFolderPath** | **String** | The target folder path of result files | [optional] +**completionTime** | [**OffsetDateTime**](OffsetDateTime.md) | The completion date/time of this job in ISO 8601 format | [optional] +**jobId** | **String** | The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation | +**resultContainerId** | **String** | The target container id of result files | [optional] +**creationTime** | [**OffsetDateTime**](OffsetDateTime.md) | The creation date/time of this job in ISO 8601 format | [optional] +**dataSetId** | **String** | Data set id | [optional] +**resultStreams** | [**List<StreamLocation>**](StreamLocation.md) | The storage locations of the result files. | +**headerDataSetIds** | **List<String>** | Header data set ids | [optional] +**mergeSettings** | [**MergeSettings**](MergeSettings.md) | | [optional] +**statusMessage** | **String** | A status message, which can be informational, warning or error. A message here does not indicate an error perse | [optional] +**status** | [**StatusEnum**](#StatusEnum) | The status of the job | + + + +## Enum: StatusEnum +Name | Value +---- | ----- +CREATED | "CREATED" +UPDATED | "UPDATED" +PROCESSING | "PROCESSING" +DONE | "DONE" +ERROR | "ERROR" +DELETED | "DELETED" + + + diff --git a/java8-okhttp-gson/docs/MergeJobResponse.md b/java8-okhttp-gson/docs/MergeJobResponse.md new file mode 100644 index 0000000..9926809 --- /dev/null +++ b/java8-okhttp-gson/docs/MergeJobResponse.md @@ -0,0 +1,25 @@ + +# MergeJobResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**jobId** | **String** | The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation | +**job** | [**MergeJob**](MergeJob.md) | | [optional] +**statusMessage** | **String** | A status message, which can be informational, warning or error. AA message here does not indicate an error perse | [optional] +**status** | [**StatusEnum**](#StatusEnum) | The status of the job | + + + +## Enum: StatusEnum +Name | Value +---- | ----- +CREATED | "CREATED" +UPDATED | "UPDATED" +PROCESSING | "PROCESSING" +DONE | "DONE" +ERROR | "ERROR" +DELETED | "DELETED" + + + diff --git a/java8-okhttp-gson/docs/MergeSettings.md b/java8-okhttp-gson/docs/MergeSettings.md new file mode 100644 index 0000000..3192e2d --- /dev/null +++ b/java8-okhttp-gson/docs/MergeSettings.md @@ -0,0 +1,34 @@ + +# MergeSettings + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lifecycle** | [**Lifecycle**](Lifecycle.md) | | [optional] +**mergeResult** | [**MergeResultEnum**](#MergeResultEnum) | | [optional] +**dataSetId** | **String** | Data set id | +**engine** | [**EngineEnum**](#EngineEnum) | | [optional] +**headerDataSetIds** | **List<String>** | optional header data set ids | [optional] +**templateVersion** | **Integer** | Template version | [optional] +**resultStreamLocation** | [**StreamLocation**](StreamLocation.md) | The output location of the result files. | +**templateId** | **String** | Template id | +**outputSettings** | [**OutputSettings**](OutputSettings.md) | | + + + +## Enum: MergeResultEnum +Name | Value +---- | ----- +SINGLE_FILE | "SINGLE_FILE" +SEPARATE_FILES | "SEPARATE_FILES" + + + +## Enum: EngineEnum +Name | Value +---- | ----- +BASIC | "BASIC" +PREMIUM | "PREMIUM" + + + diff --git a/java8-okhttp-gson/docs/OutputSettings.md b/java8-okhttp-gson/docs/OutputSettings.md new file mode 100644 index 0000000..e1a9c9e --- /dev/null +++ b/java8-okhttp-gson/docs/OutputSettings.md @@ -0,0 +1,42 @@ + +# OutputSettings + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**deliveryFormat** | [**DeliveryFormatEnum**](#DeliveryFormatEnum) | | [optional] +**outputFormat** | [**OutputFormatEnum**](#OutputFormatEnum) | | [optional] + + + +## Enum: DeliveryFormatEnum +Name | Value +---- | ----- +PLAIN | "PLAIN" +ZIP | "ZIP" +_7ZIP | "_7ZIP" + + + +## Enum: OutputFormatEnum +Name | Value +---- | ----- +DOC | "DOC" +DOCX | "DOCX" +RTF | "RTF" +PDF | "PDF" +XPS | "XPS" +SVG | "SVG" +HTML | "HTML" +ODT | "ODT" +TIFF | "TIFF" +PNG | "PNG" +BMP | "BMP" +JPEG | "JPEG" +TXT | "TXT" +XML | "XML" +JSON | "JSON" +DEFAULT | "DEFAULT" + + + diff --git a/java8-okhttp-gson/docs/OwnerInfo.md b/java8-okhttp-gson/docs/OwnerInfo.md new file mode 100644 index 0000000..245929a --- /dev/null +++ b/java8-okhttp-gson/docs/OwnerInfo.md @@ -0,0 +1,13 @@ + +# OwnerInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**phone** | **String** | The owner's phone number | [optional] +**companyDepartment** | **String** | The owner's company/department | [optional] +**name** | **String** | The owner's name | [optional] +**email** | **String** | The owner's email address | [optional] + + + diff --git a/java8-okhttp-gson/docs/StreamLocation.md b/java8-okhttp-gson/docs/StreamLocation.md new file mode 100644 index 0000000..9bfe3a2 --- /dev/null +++ b/java8-okhttp-gson/docs/StreamLocation.md @@ -0,0 +1,13 @@ + +# StreamLocation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**folderPath** | **String** | | [optional] +**originalFileName** | **String** | | [optional] +**containerId** | **String** | | [optional] +**fileId** | **String** | | [optional] + + + diff --git a/java8-okhttp-gson/docs/TemplateContext.md b/java8-okhttp-gson/docs/TemplateContext.md new file mode 100644 index 0000000..e0e23c7 --- /dev/null +++ b/java8-okhttp-gson/docs/TemplateContext.md @@ -0,0 +1,23 @@ + +# TemplateContext + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**templateType** | [**TemplateTypeEnum**](#TemplateTypeEnum) | | +**templateFileLocations** | [**Map<String, StreamLocation>**](StreamLocation.md) | The template files (versioned) | [optional] +**description** | **String** | The template description | [optional] +**ownerInfo** | [**OwnerInfo**](OwnerInfo.md) | | [optional] +**id** | **String** | | [optional] +**templateId** | **String** | The template context id | [optional] + + + +## Enum: TemplateTypeEnum +Name | Value +---- | ----- +OFFICE | "OFFICE" +FREEMARKER | "FREEMARKER" + + + diff --git a/java8-okhttp-gson/docs/TemplateContextRequest.md b/java8-okhttp-gson/docs/TemplateContextRequest.md new file mode 100644 index 0000000..534cbd2 --- /dev/null +++ b/java8-okhttp-gson/docs/TemplateContextRequest.md @@ -0,0 +1,21 @@ + +# TemplateContextRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**templateType** | [**TemplateTypeEnum**](#TemplateTypeEnum) | | +**description** | **String** | | [optional] +**ownerInfo** | [**OwnerInfo**](OwnerInfo.md) | | [optional] +**templateId** | **String** | The template context id | [optional] + + + +## Enum: TemplateTypeEnum +Name | Value +---- | ----- +OFFICE | "OFFICE" +FREEMARKER | "FREEMARKER" + + + diff --git a/java8-okhttp-gson/docs/TemplateContextResponse.md b/java8-okhttp-gson/docs/TemplateContextResponse.md new file mode 100644 index 0000000..8814408 --- /dev/null +++ b/java8-okhttp-gson/docs/TemplateContextResponse.md @@ -0,0 +1,23 @@ + +# TemplateContextResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**creationTime** | [**OffsetDateTime**](OffsetDateTime.md) | The creation date/time of this response in ISO 8601 format | [optional] +**context** | [**TemplateContext**](TemplateContext.md) | | [optional] +**id** | **String** | Unique template context id | +**status** | [**StatusEnum**](#StatusEnum) | The status of the template | + + + +## Enum: StatusEnum +Name | Value +---- | ----- +CREATED | "CREATED" +UPDATED | "UPDATED" +DELETED | "DELETED" +PROCESSING | "PROCESSING" + + + diff --git a/java8-okhttp-gson/git_push.sh b/java8-okhttp-gson/git_push.sh new file mode 100644 index 0000000..ed37461 --- /dev/null +++ b/java8-okhttp-gson/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/java8-okhttp-gson/gradle.properties b/java8-okhttp-gson/gradle.properties new file mode 100644 index 0000000..05644f0 --- /dev/null +++ b/java8-okhttp-gson/gradle.properties @@ -0,0 +1,2 @@ +# Uncomment to build for Android +#target = android \ No newline at end of file diff --git a/java8-okhttp-gson/gradle/wrapper/gradle-wrapper.jar b/java8-okhttp-gson/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..2c6137b87896c8f70315ae454e00a969ef5f6019 GIT binary patch literal 53639 zcmafaW0a=B^559DjdyI@wr$%scWm3Xy<^+Pj_sKpY&N+!|K#4>Bz;ajPk*RBjZ;RV75EK*;qpZCo(BB5~-#>pF^k0$_Qx&3rs}{XFZ)$uJU-ZpbB>L3?|knJ{J+ge{%=bI`#Yn9v&Fxx>fd=_|H)(FY-DO{ z_Wxu>{a02GXCp^PGw1(fh-I*;dGTM?mA^##pNEJ#c-Y%I7@3kW(VN&Bxw!bn$iWOU zB8BZ)vT4(}GX%q~h3EYwbR?$d6|xnvg_e@4>dl5l+%FtPbGqa`;Uk##t$#g&CK4GO zz%my0ZR1Fv@~b2_>T0cBP)ECz-Uc^nW9e+`W4!=mSJPopgoe3A(NMzBd0mR?$&3XA zRL1}bJ2Q%R#bWHrC`j_)tPKMEyHuGSpdJMhT(Ob(e9H+#=Skp%#jzj=BVvc(-RSWB z{_T`UcEeWD{z`!3-y;_N|Ljr4%f;2qPSM%n?_s%GnYsM!d3p)CxmudpyIPqTxjH!i z;}A+!>>N;pko++K5n~I7m4>yco2%Zc$59RohB(l%KcJc9s^nw^?2JGy>O4#x5+CZH zqU~7kA>WE)ngvsdfKhLUX0Lc3r+In0Uyn}LZhm?n){&LHNJws546du%pia=j zyH8CD{^Qx%kFe@kX*$B!DxLa(Y?BO32sm8%#_ynjU-m>PJbabL`~0Ai zeJm<6okftSJUd2!X(>}i#KAh-NR2!Kg%c2JD=G|T%@Q0JQzqKB)Qc4E-{ZF=#PGZg zior4-caRB-Jj;l}Xb_!)TjB`jC}})6z~3AsRE&t~CO&)g{dqM0iK;lvav8?kE1< zmCrHxDZe?&rEK7M4tG-i!`Zk-*IzSk0M0&Ul8+J>*UD(A^;bAFDcz>d&lzAlw}b## zjfu@)rAou-86EN%8_Nv;%bNUmy*<6sbgB9)ZCihdSh_VT2iGFv+T8p&Z&wO02nKtdx?eZh^=*<>SZHSn(Pv)bgn{ zb15>YnVnJ^PO025c~^uK&W1C1XTs1az44L~-9Z-fU3{VvA?T& zdpi&S`mZ|$tMuN{{i|O}fAx#*KkroHe;6z^7c*x`2Rk!a2L~HB$A4@(Rz*hvM+og( zJW+4;S-A$#+Gec-rn8}at+q5gRrNy^iU?Z4Gz_|qzS~sG_EV#m%-VW!jQ>f3jc-Vq zW;~>OqI1Th&*fx#`c^=|A4GGoDp+ZH!n0_fDo-ks3d&GlT=(qzr(?Qw`PHvo3PoU6YJE zu{35)=P`LRm@+=ziAI)7jktM6KHx*v&WHVBYp<~UtR3c?Wv_{a0(k&NF!o#+@|Y6Y z>{||-i0v8N2ntXRrVx~#Z1JMA3C2ki}OkJ4W`WjZIuLByNUEL2HqqKrbi{9a8` zk-w0I$a<6;W6&X<&EbIqul`;nvc+D~{g5al{0oOSp~ zhg;6nG1Bh-XyOBM63jb_z`7apSsta``K{!Q{}mZ!m4rTmWi^<*BN2dh#PLZ)oXIJY zl#I3@$+8Fvi)m<}lK_}7q~VN%BvT^{q~ayRA7mwHO;*r0ePSK*OFv_{`3m+96HKgt z=nD-=Pv90Ae1p)+SPLT&g(Fdqbcc(Vnk5SFyc|Tq08qS;FJ1K4rBmtns%Su=GZchE zR(^9W-y!{QfeVPBeHpaBA{TZpQ*(d$H-*GI)Y}>X2Lk&27aFkqXE7D?G_iGav2r&P zx3V=8GBGi8agj5!H?lDMr`1nYmvKZj!~0{GMPb!tM=VIJXbTk9q8JRoSPD*CH@4I+ zfG-6{Z=Yb->)MIUmXq-#;=lNCyF1G*W+tW6gdD||kQfW$J_@=Y9KmMD!(t#9-fPcJ z>%&KQC-`%E`{y^i!1u=rJP_hhGErM$GYE3Y@ZzzA2a-PC>yaoDziZT#l+y)tfyR}U z5Epq`ACY|VUVISHESM5$BpWC0FpDRK&qi?G-q%Rd8UwIq&`d(Mqa<@(fH!OfNIgFICEG?j_Gj7FS()kY^P(I!zbl`%HB z7Rx=q2vZFjy^XypORT$^NJv_`Vm7-gkJWYsN5xg>snt5%oG?w1K#l_UH<>4@d0G@3 z)r?|yba6;ksyc+5+8YZ?)NZ+ER!4fIzK>>cs^(;ib7M}asT&)+J=J@U^~ffJ>65V# zt_lyUp52t`vT&gcQ%a6Ca)p8u6v}3iJzf?zsx#e9t)-1OtqD$Mky&Lpz6_v?p0|y4 zI{Nq9z89OxQbsqX)UYj z(BGu`28f8C^e9R2jf0Turq;v+fPCWD*z8!8-Q-_s`ILgwo@mtnjpC_D$J zCz7-()9@8rQ{4qy<5;*%bvX3k$grUQ{Bt;B#w))A+7ih631uN?!_~?i^g+zO^lGK$>O1T1$6VdF~%FKR6~Px%M`ibJG*~uQ>o^r9qLo*`@^ry@KX^$LH0>NGPL%MG8|;8 z@_)h2uvB1M!qjGtZgy~7-O=GUa`&;xEFvC zwIt?+O;Fjwgn3aE%`_XfZEw5ayP+JS8x?I|V3ARbQ5@{JAl1E*5a{Ytc(UkoDKtD# zu)K4XIYno7h3)0~5&93}pMJMDr*mcYM|#(FXS@Pj)(2!cl$)R-GwwrpOW!zZ2|wN) zE|B38xr4_NBv|%_Lpnm$We<_~S{F1x42tph3PAS`0saF^PisF6EDtce+9y6jdITmu zqI-CLeTn2%I3t3z_=e=YGzUX6i5SEujY`j|=aqv#(Q=iWPkKhau@g|%#xVC2$6<{2 zAoimy5vLq6rvBo3rv&^VqtaKt_@Vx^gWN{f4^@i6H??!ra^_KC-ShWC(GBNt3o~T^ zudX<0v!;s$rIflR?~Tu4-D=%~E=glv+1|pg*ea30re-2K@8EqQ{8#WY4X-br_!qpq zL;PRCi^e~EClLpGb1MrsXCqfD2m615mt;EyR3W6XKU=4(A^gFCMMWgn#5o1~EYOH* zOlolGlD;B!j%lRFaoc)q_bOH-O!r}g1Bhlhy*dRoTf-bI%`A`kU)Q=HA9HgCKqq&A z2$_rtL-uIA7`PiJfw380j@M4Fff-?(Xe(aR`4>BZyDN2$2E7QQ1}95@X819fnA(}= za=5VF-%;l}aHSRHCfs(#Qf%dPue~fGpy7qPs*eLX2Aa0+@mPxnS4Wm8@kP7KEL)8s z@tNmawLHST-FS4h%20%lVvd zkXpxWa43E`zX{6-{2c+L9C`l(ZRG8`kO9g7t&hx?>j~5_C;y5u*Bvl79)Bq?@T7bN z=G2?QDa0J3VwCfZG0BjOFP>xz4jtv3LS>jz#1x~b9u1*n9>Y6?u8W?I^~;N{GC<1y} zc&Wz{L`kJUSt=oA=5ZHtNj3PSB%w5^=0(U7GC^zUgcdkujo>ruzyBurtTjKuNf1-+ zzn~oZFXCbR&xq&W{ar~T`@fNef5M$u^-C92HMBo=*``D8Q^ktX z(qT{_R=*EI?-R9nNUFNR#{(Qb;27bM14bjI`c#4RiinHbnS445Jy^%krK%kpE zFw%RVQd6kqsNbiBtH*#jiPu3(%}P7Vhs0G9&Dwb4E-hXO!|whZ!O$J-PU@j#;GrzN zwP9o=l~Nv}4OPvv5rVNoFN>Oj0TC%P>ykicmFOx*dyCs@7XBH|w1k2hb`|3|i^GEL zyg7PRl9eV ztQ1z)v~NwH$ebcMSKc-4D=?G^3sKVG47ZWldhR@SHCr}SwWuj5t!W$&HAA*Wo_9tM zw5vs`2clw`z@~R-#W8d4B8!rFtO}+-$-{6f_`O-^-EhGraqg%$D618&<9KG``D|Rb zQJ&TSE3cfgf8i}I^DLu+-z{{;QM>K3I9~3R9!0~=Y`A1=6`CF#XVH@MWO?3@xa6ev zdw08_9L=>3%)iXA(_CE@ipRQ{Tb+@mxoN^3ktgmt^mJ(u#=_Plt?5qMZOA3&I1&NU zOG+0XTsIkbhGsp(ApF2MphRG^)>vqagn!-%pRnppa%`-l@DLS0KUm8*e9jGT0F%0J z*-6E@Z*YyeZ{eP7DGmxQedo}^+w zM~>&E$5&SW6MxP##J56Eo@0P34XG})MLCuhMyDFf**?tziO?_Ad&Jhd z`jok^B{3ff*7cydrxYjdxX`14`S+34kW^$fxDmNn2%fsQ6+Zou0%U{3Y>L}UIbQbw z*E#{Von}~UEAL?vvihW)4?Kr-R?_?JSN?B?QzhUWj==1VNEieTMuTJ#-nl*c@qP+` zGk@aE0oAD5!9_fO=tDQAt9g0rKTr{Z0t~S#oy5?F3&aWm+igqKi| zK9W3KRS|1so|~dx%90o9+FVuN7)O@by^mL=IX_m^M87i&kT1^#9TCpI@diZ_p$uW3 zbA+-ER9vJ{ii?QIZF=cfZT3#vJEKC|BQhNd zGmxBDLEMnuc*AET~k8g-P-K+S~_(+GE9q6jyIMka(dr}(H% z$*z;JDnyI@6BQ7KGcrv03Hn(abJ_-vqS>5~m*;ZJmH$W`@csQ8ejiC8S#sYTB;AoF zXsd!kDTG#3FOo-iJJpd$C~@8}GQJ$b1A85MXp?1#dHWQu@j~i4L*LG40J}+V=&-(g zh~Hzk(l1$_y}PX}Ypluyiib0%vwSqPaJdy9EZ;?+;lFF8%Kb7cwPD17C}@N z2OF;}QCM4;CDx~d;XnunQAx5mQbL#);}H57I+uB9^v|cmZwuXGkoH-cAJ%nIjSO$E z{BpYdC9poyO5pvdL+ZPWFuK}c8WGEq-#I3myONq^BL%uG`RIoSBTEK9sAeU4UBh7f zzM$s|&NtAGN&>`lp5Ruc%qO^oL;VGnzo9A8{fQn@YoORA>qw;^n2pydq>;Ji9(sPH zLGsEeTIH?_6C3uyWoW(gkmM(RhFkiDuQPXmL7Oes(+4)YIHt+B@i`*%0KcgL&A#ua zAjb8l_tO^Ag!ai3f54t?@{aoW%&Hdst}dglRzQlS=M{O!=?l z*xY2vJ?+#!70RO8<&N^R4p+f=z z*&_e}QT%6-R5Wt66moGfvorp$yE|3=-2_(y`FnL0-7A?h%4NMZ#F#Rcb^}971t5ib zw<20w|C?HVv%|)Q)Pef8tGjwQ+!+<{>IVjr@&SRVO*PyC?Efnsq;Eq{r;U2)1+tgp z)@pZ}gJmzf{m=K@7YA_8X#XK+)F465h%z38{V-K8k%&_GF+g^s&9o6^B-&|MDFI)H zj1ofQL>W(MJLOu3xkkJZV@$}GEG~XBz~WvRjxhT0$jKKZKjuKi$rmR-al}Hb3xDL) z^xGG2?5+vUAo4I;$(JgeVQe9+e)vvJ={pO~05f|J={%dsSLVcF>@F9p4|nYK&hMua zWjNvRod}l~WmGo|LX2j#w$r$y?v^H?Gu(_?(WR_%D@1I@$yMTKqD=Ca2) zWBQmx#A$gMrHe^A8kxAgB}c2R5)14G6%HfpDf$(Di|p8ntcN;Hnk)DR1;toC9zo77 zcWb?&&3h65(bLAte%hstI9o%hZ*{y=8t$^!y2E~tz^XUY2N2NChy;EIBmf(Kl zfU~&jf*}p(r;#MP4x5dI>i`vjo`w?`9^5(vfFjmWp`Ch!2Ig}rkpS|T%g@2h-%V~R zg!*o7OZSU-%)M8D>F^|z+2F|!u1mOt?5^zG%;{^CrV^J?diz9AmF!UsO?Pl79DKvD zo-2==yjbcF5oJY!oF?g)BKmC8-v|iL6VT|Gj!Gk5yaXfhs&GeR)OkZ}=q{exBPv)& zV!QTQBMNs>QQ))>(rZOn0PK+-`|7vKvrjky3-Kmuf8uJ`x6&wsA5S(tMf=m;79Hzv za%lZ(OhM&ZUCHtM~FRd#Uk3Iy%oXe^)!Jci39D(a$51WER+%gIZYP)!}nDtDw_FgPL3e>1ilFN=M(j~V` zjOtRhOB8bX8}*FD0oy}+s@r4XQT;OFH__cEn-G#aYHpJDI4&Zo4y2>uJdbPYe zOMGMvbA6#(p00i1{t~^;RaHmgZtE@we39mFaO0r|CJ0zUk$|1Pp60Q&$A;dm>MfP# zkfdw?=^9;jsLEXsccMOi<+0-z|NZb(#wwkcO)nVxJxkF3g(OvW4`m36ytfPx5e-ujFXf($)cVOn|qt9LL zNr!InmcuVkxEg8=_;E)+`>n2Y0eAIDrklnE=T9Pyct>^4h$VDDy>}JiA=W9JE79<6 zv%hpzeJC)TGX|(gP!MGWRhJV}!fa1mcvY%jC^(tbG3QIcQnTy&8UpPPvIekWM!R?R zKQanRv+YZn%s4bqv1LBgQ1PWcEa;-MVeCk`$^FLYR~v%9b-@&M%giqnFHV;5P5_et z@R`%W>@G<6GYa=JZ)JsNMN?47)5Y3@RY`EVOPzxj;z6bn#jZv|D?Fn#$b}F!a}D9{ ztB_roYj%34c-@~ehWM_z;B{G5;udhY`rBH0|+u#!&KLdnw z;!A%tG{%Ua;}OW$BG`B#^8#K$1wX2K$m`OwL-6;hmh{aiuyTz;U|EKES= z9UsxUpT^ZZyWk0;GO;Fe=hC`kPSL&1GWS7kGX0>+votm@V-lg&OR>0*!Iay>_|5OT zF0w~t01mupvy4&HYKnrG?sOsip%=<>nK}Bxth~}g)?=Ax94l_=mC{M@`bqiKtV5vf zIP!>8I;zHdxsaVt9K?{lXCc$%kKfIwh&WM__JhsA?o$!dzxP znoRU4ZdzeN3-W{6h~QQSos{-!W@sIMaM z4o?97?W5*cL~5%q+T@>q%L{Yvw(a2l&68hI0Ra*H=ZjU!-o@3(*7hIKo?I7$gfB(Vlr!62-_R-+T;I0eiE^><*1_t|scfB{r9+a%UxP~CBr zl1!X^l01w8o(|2da~Mca)>Mn}&rF!PhsP_RIU~7)B~VwKIruwlUIlOI5-yd4ci^m{ zBT(H*GvKNt=l7a~GUco)C*2t~7>2t?;V{gJm=WNtIhm4x%KY>Rm(EC^w3uA{0^_>p zM;Na<+I<&KwZOUKM-b0y6;HRov=GeEi&CqEG9^F_GR*0RSM3ukm2c2s{)0<%{+g78 zOyKO%^P(-(U09FO!75Pg@xA{p+1$*cD!3=CgW4NO*p}&H8&K`(HL&$TH2N-bf%?JL zVEWs;@_UDD7IoM&P^(k-U?Gs*sk=bLm+f1p$ggYKeR_7W>Zz|Dl{{o*iYiB1LHq`? ztT)b^6Pgk!Kn~ozynV`O(hsUI52|g{0{cwdQ+=&@$|!y8{pvUC_a5zCemee6?E{;P zVE9;@3w92Nu9m_|x24gtm23{ST8Bp;;iJlhaiH2DVcnYqot`tv>!xiUJXFEIMMP(ZV!_onqyQtB_&x}j9 z?LXw;&z%kyYjyP8CQ6X);-QW^?P1w}&HgM}irG~pOJ()IwwaDp!i2$|_{Ggvw$-%K zp=8N>0Fv-n%W6{A8g-tu7{73N#KzURZl;sb^L*d%leKXp2Ai(ZvO96T#6*!73GqCU z&U-NB*0p@?f;m~1MUN}mfdpBS5Q-dbhZ$$OWW=?t8bT+R5^vMUy$q$xY}ABi60bb_ z9;fj~2T2Ogtg8EDNr4j96{@+9bRP#Li7YDK1Jh8|Mo%NON|bYXi~D(W8oiC2SSE#p z=yQ0EP*}Z)$K$v?MJp8s=xroI@gSp&y!De;aik!U7?>3!sup&HY{6!eElc+?ZW*|3 zjJ;Nx>Kn@)3WP`{R821FpY6p1)yeJPi6yfq=EffesCZjO$#c;p!sc8{$>M-i#@fCt zw?GQV4MTSvDH(NlD2S*g-YnxCDp*%|z9^+|HQ(#XI0Pa8-Io=pz8C&Lp?23Y5JopL z!z_O3s+AY&`HT%KO}EB73{oTar{hg)6J7*KI;_Gy%V%-oO3t+vcyZ?;&%L z3t4A%Ltf=2+f8qITmoRfolL;I__Q8Z&K9*+_f#Sue$2C;xTS@%Z*z-lOAF-+gj1C$ zKEpt`_qg;q^41dggeNsJv#n=5i+6Wyf?4P_a=>s9n(ET_K|*zvh633Mv3Xm3OE!n` zFk^y65tStyk4aamG*+=5V^UePR2e0Fbt7g$({L1SjOel~1^9SmP2zGJ)RZX(>6u4^ zQ78wF_qtS~6b+t&mKM=w&Dt=k(oWMA^e&V#&Y5dFDc>oUn+OU0guB~h3};G1;X=v+ zs_8IR_~Y}&zD^=|P;U_xMA{Ekj+lHN@_n-4)_cHNj0gY4(Lx1*NJ^z9vO>+2_lm4N zo5^}vL2G%7EiPINrH-qX77{y2c*#;|bSa~fRN2)v=)>U@;YF}9H0XR@(+=C+kT5_1 zy?ZhA&_&mTY7O~ad|LX+%+F{GTgE0K8OKaC2@NlC1{j4Co8;2vcUbGpA}+hBiDGCS zl~yxngtG}PI$M*JZYOi{Ta<*0f{3dzV0R}yIV7V>M$aX=TNPo|kS;!!LP3-kbKWj` zR;R%bSf%+AA#LMkG$-o88&k4bF-uIO1_OrXb%uFp((Pkvl@nVyI&^-r5p}XQh`9wL zKWA0SMJ9X|rBICxLwhS6gCTVUGjH&)@nofEcSJ-t4LTj&#NETb#Z;1xu(_?NV@3WH z;c(@t$2zlY@$o5Gy1&pvja&AM`YXr3aFK|wc+u?%JGHLRM$J2vKN~}5@!jdKBlA>;10A(*-o2>n_hIQ7&>E>TKcQoWhx7um zx+JKx)mAsP3Kg{Prb(Z7b};vw&>Tl_WN)E^Ew#Ro{-Otsclp%Ud%bb`8?%r>kLpjh z@2<($JO9+%V+To>{K?m76vT>8qAxhypYw;Yl^JH@v9^QeU01$3lyvRt^C#(Kr#1&2 ziOa@LG9p6O=jO6YCVm-d1OB+_c858dtHm>!h6DUQ zj?dKJvwa2OUJ@qv4!>l1I?bS$Rj zdUU&mofGqgLqZ2jGREYM>;ubg@~XE>T~B)9tM*t-GmFJLO%^tMWh-iWD9tiYqN>eZ zuCTF%GahsUr#3r3I5D*SaA75=3lfE!SpchB~1Xk>a7Ik!R%vTAqhO z#H?Q}PPN8~@>ZQ^rAm^I=*z>a(M4Hxj+BKrRjJcRr42J@DkVoLhUeVWjEI~+)UCRs zja$08$Ff@s9!r47##j1A5^B6br{<%L5uW&8t%_te(t@c|4Fane;UzM{jKhXfC zQa|k^)d*t}!<)K)(nnDxQh+Q?e@YftzoGIIG?V?~$cDY_;kPF>N}C9u7YcZzjzc7t zx3Xi|M5m@PioC>dCO$ia&r=5ZLdGE8PXlgab`D}>z`dy(+;Q%tz^^s*@5D)gll+QL z6@O3@K6&zrhitg~{t*EQ>-YN zy&k{89XF*^mdeRJp{#;EAFi_U<7}|>dl^*QFg**9wzlA#N9!`Qnc68+XRbO-Za=t zy@wz`mi0MmgE?4b>L$q&!%B!6MC7JjyG#Qvwj{d8)bdF`hA`LWSv+lBIs(3~hKSQ^0Se!@QOt;z5`!;Wjy1l8w=(|6%GPeK)b)2&Ula zoJ#7UYiJf>EDwi%YFd4u5wo;2_gb`)QdsyTm-zIX954I&vLMw&_@qLHd?I~=2X}%1 zcd?XuDYM)(2^~9!3z)1@hrW`%-TcpKB1^;IEbz=d0hv4+jtH;wX~%=2q7YW^C67Fk zyxhyP=Au*oC7n_O>l)aQgISa=B$Be8x3eCv5vzC%fSCn|h2H#0`+P1D*PPuPJ!7Hs z{6WlvyS?!zF-KfiP31)E&xYs<)C03BT)N6YQYR*Be?;bPp>h?%RAeQ7@N?;|sEoQ% z4FbO`m}Ae_S79!jErpzDJ)d`-!A8BZ+ASx>I%lITl;$st<;keU6oXJgVi?CJUCotEY>)blbj&;Qh zN*IKSe7UpxWPOCl1!d0I*VjT?k6n3opl8el=lonT&1Xt8T{(7rpV(?%jE~nEAx_mK z2x=-+Sl-h<%IAsBz1ciQ_jr9+nX57O=bO_%VtCzheWyA}*Sw!kN-S9_+tM}G?KEqqx1H036ELVw3Ja0!*Kr-Qo>)t*?aj2$x;CajQ@t`vbVbNp1Oczu@ zIKB+{5l$S;n(ny4#$RSd#g$@+V+qpAU&pBORg2o@QMHYLxS;zGOPnTA`lURgS{%VA zujqnT8gx7vw18%wg2)A>Kn|F{yCToqC2%)srDX&HV#^`^CyAG4XBxu7QNb(Ngc)kN zPoAhkoqR;4KUlU%%|t2D8CYQ2tS2|N#4ya9zsd~cIR=9X1m~a zq1vs3Y@UjgzTk#$YOubL*)YvaAO`Tw+x8GwYPEqbiAH~JNB?Q@9k{nAuAbv)M=kKn zMgOOeEKdf8OTO|`sVCnx_UqR>pFDlXMXG*KdhoM9NRiwYgkFg7%1%0B2UWn_9{BBW zi(Ynp7L|1~Djhg=G&K=N`~Bgoz}Bu0TR6WsI&MC@&)~>7%@S4zHRZxEpO(sp7d)R- zTm)))1Z^NHOYIU?+b2HZL0u1k>{4VGqQJAQ(V6y6+O+>ftKzA`v~wyV{?_@hx>Wy# zE(L|zidSHTux00of7+wJ4YHnk%)G~x)Cq^7ADk{S-wSpBiR2u~n=gpqG~f=6Uc7^N zxd$7)6Cro%?=xyF>PL6z&$ik^I_QIRx<=gRAS8P$G0YnY@PvBt$7&%M`ao@XGWvuE zi5mkN_5kYHJCgC;f_Ho&!s%CF7`#|B`tbUp4>88a8m$kE_O+i@pmEOT*_r0PhCjRvYxN*d5+w5 z<+S)w+1pvfxU6u{0}0sknRj8t^$uf?FCLg<%7SQ-gR~Y6u|f!Abx5U{*KyZ8o(S{G znhQx#Zs_b8jEk`5jd9CUYo>05&e69Ys&-x_*|!PoX$msbdBEGgPSpIl93~>ndH;t5 z?g>S+H^$HtoWcj4>WYo*Gu;Y#8LcoaP!HO?SFS&F9TkZnX`WBhh2jea0Vy%vVx~36 z-!7X*!Tw{Zdsl3qOsK&lf!nnI(lud){Cp$j$@cKrIh@#?+cEyC*m$8tnZIbhG~Zb8 z95)0Fa=3ddJQjW)9W+G{80kq`gZT`XNM=8eTkr^fzdU%d5p>J}v#h&h$)O+oYYaiC z7~hr4Q0PtTg(Xne6E%E@0lhv-CW^o0@EI3>0ZbxAwd2Q zkaU2c{THdFUnut_q0l+0DpJ5KMWNTa^i@v%r`~}fxdmmVFzq6{%vbv?MJ+Q86h6qf zKiGz6Vrb>!7)}8~9}bEy^#HSP)Z^_vqKg2tAfO^GWSN3hV4YzUz)N3m`%I&UEux{a z>>tz9rJBg(&!@S9o5=M@E&|@v2N+w+??UBa3)CDVmgO9(CkCr+a1(#edYE( z7=AAYEV$R1hHyNrAbMnG^0>@S_nLgY&p9vv_XH7|y*X)!GnkY0Fc_(e)0~)Y5B0?S zO)wZqg+nr7PiYMe}!Rb@(l zV=3>ZI(0z_siWqdi(P_*0k&+_l5k``E8WC(s`@v6N3tCfOjJkZ3E2+js++(KEL|!7 z6JZg>9o=$0`A#$_E(Rn7Q78lD1>F}$MhL@|()$cYY`aSA3FK&;&tk3-Fn$m?|G11= z8+AqH86^TNcY64-<)aD>Edj$nbSh>V#yTIi)@m1b2n%j-NCQ51$9C^L6pt|!FCI>S z>LoMC0n<0)p?dWQRLwQC%6wI02x4wAos$QHQ-;4>dBqO9*-d+<429tbfq7d4!Bz~A zw@R_I;~C=vgM@4fK?a|@=Zkm=3H1<#sg`7IM7zB#6JKC*lUC)sA&P)nfwMko15q^^TlLnl5fY75&oPQ4IH{}dT3fc% z!h+Ty;cx9$M$}mW~k$k(($-MeP_DwDJ zXi|*ZdNa$(kiU?}x0*G^XK!i{P4vJzF|aR+T{)yA8LBH!cMjJGpt~YNM$%jK0HK@r z-Au8gN>$8)y;2q-NU&vH`htwS%|ypsMWjg@&jytzR(I|Tx_0(w74iE~aGx%A^s*&- zk#_zHpF8|67{l$Xc;OU^XI`QB5XTUxen~bSmAL6J;tvJSkCU0gM3d#(oWW$IfQXE{ zn3IEWgD|FFf_r2i$iY`bA~B0m zA9y069nq|>2M~U#o)a3V_J?v!I5Y|FZVrj|IbzwDCPTFEP<}#;MDK$4+z+?k5&t!TFS*)Iw)D3Ij}!|C2=Jft4F4=K74tMRar>_~W~mxphIne& zf8?4b?Aez>?UUN5sA$RU7H7n!cG5_tRB*;uY!|bNRwr&)wbrjfH#P{MU;qH>B0Lf_ zQL)-~p>v4Hz#@zh+}jWS`$15LyVn_6_U0`+_<*bI*WTCO+c&>4pO0TIhypN%y(kYy zbpG4O13DpqpSk|q=%UyN5QY2pTAgF@?ck2}gbs*@_?{L>=p77^(s)ltdP1s4hTvR# zbVEL-oMb~j$4?)op8XBJM1hEtuOdwkMwxzOf!Oc63_}v2ZyCOX3D-l+QxJ?adyrSiIJ$W&@WV>oH&K3-1w<073L3DpnPP)xVQVzJG{i)57QSd0e;Nk z4Nk0qcUDTVj@R-&%Z>&u6)a5x3E!|b;-$@ezGJ?J9L zJ#_Lt*u#&vpp2IxBL7fA$a~aJ*1&wKioHc#eC(TR9Q<>9ymdbA?RFnaPsa)iPg7Z; zid$y8`qji`WmJ5nDcKSVb}G$9yOPDUv?h1UiI_S=v%J8%S<83{;qMd0({c8>lc=7V zv$okC+*w{557!ohpAUMyBHhKLAwzs&D11ENhrvr_OtsnS!U{B+CmDH-C=+po+uSqt z+WVVXl8fKe5iCZoP;>}4OVen6_|uw8*ff-r;)O2W+6p7BPT7sT<|Qv=6lgV#3`Ch${(-Wy#6NA$YanDSFV_3aa=PAn%l@^l(XxVdh!TyFFE&->QRkk@GKyy( zC3N%PhyJf^y9iSI;o|)q9U-;Akk>;M>C8E6=3T!vc?1( zyKE(2vV5X_-HDSB2>a6LR9MvCfda}}+bZ>X z+S(fTl)S})HZM`YM`uzRw>!i~X71Kb^FnwAlOM;!g_+l~ri;+f44XrdZb4Lj% zLnTNWm+yi8c7CSidV%@Y+C$j{{Yom*(15277jE z9jJKoT4E%31A+HcljnWqvFsatET*zaYtpHAWtF|1s_}q8!<94D>pAzlt1KT6*zLQF z+QCva$ffV8NM}D4kPEFY+viR{G!wCcp_=a#|l?MwO^f4^EqV7OCWWFn3rmjW=&X+g|Pp(!m2b#9mg zf|*G(z#%g%U^ET)RCAU^ki|7_Do17Ada$cv$~( zHG#hw*H+aJSX`fwUs+fCgF0bc3Yz3eQqR@qIogSt10 znM-VrdE@vOy!0O4tT{+7Ds-+4yp}DT-60aRoqOe@?ZqeW1xR{Vf(S+~+JYGJ&R1-*anVaMt_zSKsob;XbReSb02#(OZ z#D3Aev@!944qL=76Ns-<0PJ;dXn&sw6vB9Wte1{(ah0OPDEDY9J!WVsm`axr_=>uc zQRIf|m;>km2Ivs`a<#Kq@8qn&IeDumS6!2y$8=YgK;QNDcTU}8B zepl6erp@*v{>?ixmx1RS_1rkQC<(hHfN%u_tsNcRo^O<2n71wFlb-^F2vLUoIfB|Hjxm#aY&*+um7eR@%00 zR;6vT(zb2ewr$(CwbHgKRf#X(?%wBgzk8qWw=d@1x>$40h?wIUG2;Jxys__b)vnPF z{VWvLyXGjG4LRo}MH@AP-GOti6rPu^F04vaIukReB|8<7&5cebX<)Zk(VysCOLBuL zW9pEvRa--4vwT?k6P??+#lGMUYE;EsaU~=i_|j!1qCVS_UjMVhKT%CuovR;6*~rP0)s5eX zxVhGZv+qtpZ{_FDf9p{m`ravh=h>mPMVR7J-U@%MaAOU2eY@`s-M3Oi>oRtT?Y&9o({nn~qU4FaEq|l^qnkXer)Cf0IZw;GaBt)}EIen=1lqeg zAHD~nbloktsjFh&*2iYVZ=l1yo%{RK#rgTg8a2WRS8>kl03$CS(p3}E-18`!UpyOg zcH=`UYwn0b@K1`E&aQ%*riO|F-hq;S;kE7UwYd~Ox(u)>VyaE7DA6h_V3_kW2vAR} zBZi_RC*l3!t;JPD;<*z1FiZt;=KK-xuZ`j>?c5oxC^E2R=d`f68!-X=Xw2ONC@;@V zu|Svg4StiAD$#wGarWU~exyzzchb#8=V6F<6*nAca@x}!zXN}k1t78xaOX1yloahl zC4{Ifib;g}#xqD)@Jej<+wsP+JlAn)&WO=qSu>9eKRnm6IOjwOiU=bzd;3R{^cl5* zc9kR~Gd9x`Q$_G^uwc4T9JQhvz3~XG+XpwCgz98Z>Pez=J{DD)((r(!ICFKrmR-;} zL^`7lPsSmZT?p&QpVY&Ps~!n($zaAM8X@%z!}!>;B|CbIl!Y={$prE7WS)cgB{?+| zFnW-KRB-9zM5!L+t{e~B$5lu-N8Yvbu<+|l;OcJH_P;}LdB~2?zAK67?L8YvX})BM zW1=g!&!aNylEkx#95zN~R=D=_+g^bvi(`m0Cxv2EiSJ>&ruObdT4&wfCLa2Vm*a{H z8w@~1h9cs&FqyLbv7}{R)aH=Bo80E3&u_CAxNMrTy_$&cgxR10Gj9c7F~{hm#j+lj z#){r0Qz?MaCV}f2TyRvb=Eh|GNa8M(rqpMPVxnYugYHqe!G`M@x(;>F%H46LGM_cU z{*0k6-F!7r3;j{KOaDxrV16WUIiFAfcx?^t*}ca4B8!-d?R|$UxwV8tyHdKL zhx;7%0Zn#qtx;S)REtEP-meAlV8*1qGFbRJ*eeX&+hsiLF*g9%r0Zl`L^Kn`4I)ul z32#3pg6Mu$LEI@hssUb?T$di_z zHgaB3zw;*0Lnzo$a~T_cFT&y%rdb*kR`|6opI#Pbq~F%t%*KnyUNu|G?-I#~C=i#L zEfu}ckXK+#bWo11e+-E$oobK=nX!q;YZhp}LSm6&Qe-w0XCN{-KL}l?AOUNppM-)A zyTRT@xvO=k&Zj|3XKebEPKZrJDrta?GFKYrlpnSt zA8VzCoU+3vT$%E;kH)pzIV7ZD6MIRB#w`0dViS6g^&rI_mEQjP!m=f>u=Hd04PU^cb>f|JhZ19Vl zkx66rj+G-*9z{b6?PBfYnZ4m6(y*&kN`VB?SiqFiJ#@hegDUqAh4f!+AXW*NgLQGs z>XrzVFqg&m>FT^*5DAgmMCMuFkN4y*!rK^eevG!HFvs7nC672ACBBu5h(+#G@{0J- zPLsJ{ohQEr2N|PmEHw9 znQ`qe-xyv93I;Ym=WnoVU8dau&S^(*Wp=}PSGw;&DtaKz-);y)zjD|@-RT`*6nowj z7B%)h3>Lro-}5THC@BLymuL&3~kh8M}ZrZGtYKAmrT^cym$^O!$eeK$q5X2JF1w5a}4Z6yJ<=8&J?(m6U?;+ z{+*B;P@yGffMz;OSfm7NDhkGR5|7&~FNvel8Yj{F!DWnHG>%?ReZ$1w5I$Bt_u|4v z-ow>!SF!pCGrD&K8=-<;Gp@oB<@9C&%>vPHrp4sQEJj2FdedjC=0FqD>EG?NCf=KQKVd^stDZP7KNCAP-uEO*!?vgwvdp&Dm3h5Cldn!cIOL@u>1!HSfK+~kn-9Ekr|MWNApAJCJ5&5#izmjm z$CI|Boo@;O?Z(Bo9ejP>bbH|jRKn7W3y0L1!O6v$RUtt;%5R#**`+39c$JuO`SMU+ zbzu$7Eu`JQ+ri_ap{w(R_juHcw0X8~e$48TzBX%Yd+HkSSYt2){)+rYm48G^^G#W* zFiC0%tJs0q3%fX_Mt8A=!ODeM?}KLDt@ot6_%aAdLgJ7jCqh_1O`#DT`IGhP2LIMhF* z=l?}r%Tl#)!CpcItYE2!^N8bo`z9X(%0NK9Dgg^cA|rsz?aR+dD6=;#tvNhT5W}1; zFG@_F2cO&7Pdp1;lJ8?TYlI(VI8nbx_FIGRX^Z(d zyWyJi58uPgr>8w$ugIGhX1kr*po@^F>fntO1j&ocjyK za8Z*GGvQt+q~@R@Y=LdQt&v=8-&4WOU^_-YOuT9Fx-H7c;7%(nzWD(B%>dgQ^ zU6~0sR24(ANJ?U>HZ#m8%EmD1X{uL{igUzdbi+JN=G9t`kZMGk!iLCQQiVMhOP&(*~gU(d+&V4$(z=>4zqh(GX+9C&;~g2 z9K2$`gyTRJpG_)fYq=9sG^1I{*I=s%0NX^}8!mJVc?y$OYM^n!x(2jw$$;}n&dh%D;St+FA;eW=+28j#G^YLi@Gdk*H#r-#6u?7sF7#_pv?WS^K7feY1F^;!;$rgU%J zS$lZ(hmo$F>zg$V^`25cS|=QKO1Qj((VZ;&RB*9tS;OXa7 zy(n<$4O;q>q5{{H>n}1-PoFt;=5Ap+$K8LoiaJV7w8Gb%y5icLxGD~6=6hgYQv`ZI z2Opn57nS-1{bJUr(syi^;dv+XcX8?rQRLbhfk1py8M(gkz{TH#=lTd;K=dr!mwk2s z#XnC){9$x)tjD0cUQ90|hE2BkJ9+_tIVobRGD6OQ-uKJ#4fQy!4P;tSC6Az)q?c>E zXt(59YUKD?U}Ssn(3hs&fD$i3I*L_Et-%lx%HDe%#|)*q+ZM-v%Ds3u1LPpPKe-q} zc!9Rt)FvptekA2s+NXxF7I;sH1CNPpN@RT+-*|6h*ZWL{jgu9vth{q)u=E<7D(F06 zN~UUfzhsK)`=W%Z-vr#IIVwmdb(q7k+FX-lciYO%NE!xl25SV53Hwdql-3>8y5X1U zWa3_Qfp2Z;jVX+N+1?`(dx-EJL)%oQsI0G3S=ad&v{dzNal~flHvq(0HjY!v;oE>n z4gQSa2FdJI52Weu$+lED4VYSW;D`5Zn`C#@7Hxa1Ls*#TLBjje(%NYFF+4uOc~dK! zlnyxE4NWVz0c8yx`=sP2t)fHW(PPKZPp{SCwT-on2sEM9tyGO4AW7|R;Iw5|n1KpV zR^S>`h}rxcNv2u+7H6rCvMLMV3p*H#WcN}}t0@Us{w}{20i<-v> zyos+Ev_>@CA**@JrZ6Jzm=pWd6ys`c!7-@jf<~3;!|A_`221MFp-IPg28ABf6kj-Y#eaRcQ!t!|0SRtkQK^pz;YiTC@@lJ4MDpI(++=}nTC zRb4Ak&K16t*d-P(s5zPs+vbqk1u>e5Y&a!;cO(x;E4A4}_Cgp_VoIFwhA z-o^7)=BRYu)zLT8>-5os4@Ss8R&I^?#p?bY1H-c;$NNdXK%RNCJHh)2LhC?B9yL2y z(P-1t9f~NV0_bQ{4zF|-e^9LG9qqevchug76wtFn95+@{PtD)XESnR2u}QuG0jYoh z0df4#&dz_FStgOPG0?LVGW&{znCUzHU%*b1f~F+)7aefg7_j76Vb|2WuG#1oYH_~4 zrzy#g1WMQ#gof`)Ar((3)4m3mARX~3(Ij=>-BC zR@&7dF70|)q>tI$wIr?&;>+!pE`i6CkomA1zEb&JOkmg9!>#z-nB{%!&T@S-2@Q)9 z)ekri>9QUuaHM{bWu&pZ+3|z@e2YjVG^?8F$0qad4oO9UI|R~2)ujGKZiX)9P2;pk z-kPg%FQ23x*$PhgM_1uIBbuz3YC z#9Rz(hzqTU{b28?PeO)PZWzB~VXM5)*}eUt_|uff_A8M4v&@iY{kshk{7dHX1vgHs zC%vd9vD^c;%!7NNz=JX9Q{?$~G@6h!`N>72MR*!Q{xE7IV*?trmw>3qWCP*?>qb01 zqe|3!Y0nv7sp|Md9c z4J5EJA%TD-;emh%|L2kLpA^g>)i56v6HIU8h7M+KSWYw~HHz3`ILj*{==jD(l33>r zmOdINZ8^Jo?ll^~q@{^5l#*3f`ETncJmo?iRLz*=W=o3MJ!K^xjVcw*H}p63#p4XX z1)|C%{Y&)IpRIk5oMVsUi6oyKAFy8MH$@|Zpjr^lxlMX3O{0AZTjc{gso{KRuo30V zUJxq2K=_CwV*Qx_D!hJCBTuQ}5oMNrWUBNVaa8zyMg5lrXgv8Zw@rm5NAcFplYa>P zmUNB>EB|r?#Z!Gq^`(HZl__UJ*K5 z=>`{UTlt0;Y+LmP1Wb19IWK(SIWDrqh=+K81c`t@BCS|2#@K0u5eEwQ7CG92=Axx4 zQ?CPaVE5!XY`2r!Ce@m(tRtB=&+c>a09WzP-Ys!~i;V0hEq}PU8n1a;bVbJ17rYW1 zjz|KkLZoO7-S6oQp_ocIzS43P@CJJxQ$k;$!fS3*V)m|VtBIEgCtU@W`AG9VMU_d znB-Zs3I)I(Wg=xj)Wcx03h}U3i5{D@*udPLg?Jx7dp&KEIwJiW=eh}Ps#FxbsS?F}7z<;<5RP6-UAD+_An$s3y-JAC zh{JlAX3e^CDJl1gJDbH`e=hD88ER_6+Mw8CwK&^|$BnzA|AvDV`#xF^z9b6iWb)0@ z+gir=oSUaVcJi%1k+9!pd`(3|h~4}!NM7NHPNV6rI(W4~Ie5 zl@(Xg2`OSq|HJRUg3qgr-c!}9@W?pEJXKtxP7f(aE2Es33gRSu#~XiCIpV-J;JLM{(@qK2wEvsi@6-9(cyXX!6YS0n7;TK0Ldf*JGmlvrF0 zGQ+Z509rmWa)O}r`z2W3!6u{^ZQrY`KR#VlTRmllG2v$R!7%B~IU@XnNi!E1qM$J8 z%{XFU4vy_*M0tKjDY3E*7N!d%&vnx5qr#=!IKWZfoRo8j=7ji1{xW?g^)A|7 zaaA5Rg6rwCF?y33Kz-90z!ze`@5N916S)(fHPa>{F`UEF8N5PTNjbo)PF5W_YLB*# z?o`qxQTIzokhSdBa1QGmn9b;O#g}y_4d*j*j`cx^bk(=%QwiFxlAhFSNhO0$g|ue> zDh=p|hUow5Knbclx8V;+^H6N_GHwOi!S>Qxv&}FeG-?F7bbOWud`NCE6Tv-~ud&PS6 z;F*l>WT4zvv39&RTmCZQLE67$bwxRykz(UkGzx}(C23?iLR}S-43{WT80c$J*Q`XT zVy-3mu&#j}wp^p0G%NAiIVP2_PN{*!R%t7*IJBVvWVD#wxNRyF9aXsIAl)YpxfQr$d%Rt20U@UE}@w?|8^FMT%k36 zcGi_Mw+vMvA@#}0SfIiy0KEKwQ|`iR++|PF2;LtiH7ea($I{z z32QPp-FlEQ**K_A@OC943z`Qy7wC~&v z*a`z;(`5(e#M|qb4bkN6sWR_|(7W~8<)GnX)cJAt``gu8gqP(AheO-SjJMYlQsGs0 z!;RBZwy>bfw)!(Abmna(pwAh^-;&+#$vChUEXs5QOQi8TZfgQHK$tspm+rc%ee0gy zjTq5y20IJ`i{ogd8l?~8Sbt^R_6Fx*!n6~Jl#rIt@w@qu2eHeyEKhrzqLtEPdFrzy z9*I^6dIZ z)8Gdw1V^@xGue9trS?=(#e5(O#tCJv9fRvP=`a{mnOTboq<-W$-ES7)!Xhi*#}R#6 zS&7hR(QeUetr=$Pt6uV%N&}tC;(iKI>U!y$j6RW&%@8W|29wXe@~{QlQ0OjzS;_>q z(B!=A71r|@CmR7eWdu9n0;OJ zP@VOOo#T+N$s{`3m`3Li+HA4owg&>YqCwsA5|E$b;J&v#6RbT$D!x$Yaflo92wU?A zvgD8g(aY`g7}Y2^2i31ocm&k9Km`NQipEsjU>MuRzD35*Jk7^Q(O;M32!gt1cEB@- zBOHd@@Qo{fQ^7o{FiNdS)_vTiP8toqZ`iNi^1-4(hp+s751}Tf34b z_UYQ1q0~*jIp9pRIpI8ue}$|~uu0#p>-y8t{yEwB(8yAjMXrJ{`{rp7*-wlh8&bso zHV`LnAF7Bw+w}Wm9ii3U@lEvcc-i$0&h+eUmlQuREzg!ao)ZjwThhqIKA})}akyX7 zcbuIw9K}9aUZ;hvAxk~rqpk?bYMWr-@b-pMTR8))ggQa$kBv=IinobKCR0?S&g*+Al2J`VR7he{}0Pu zae7LYa!OoTOk8?ma)M@Ta%NxQacV~KMw&)}fkmF7wvmagnTbWo))`Kofr)`-pNe99 zMnam7vRRs5LTXHWNqTzhfQo90dTdg<=@9teXaX2tyziuRI?UOxKZ5fmd%yNGf%Kis zEDdSxjSP&;Y#smYU$Dk>Sr0J42D)@hAo|7QaAGz(Qp*{d%{I-#UsBYP2*yY8d0&$4 zI^(l62Q-y4>!>S{ zn;iO%>={D42;(0h@P{>EZnIzpFV|^F%-OJADQz(1GpUqqg#t!*i zcK}eD_qV$RmK}-y_}f$Xy7B+hY~f4s{iCD7zq%C|SepGu`+>h6TI}dUGS3%oOYsZ0 z#rWTU&aeMhM%=(r(8kK@3rr|wW^MFE;dK5&^Z!>`JV{CWi^Gq?3jz~C-5hFFwLJ@e zSm3z9mnI+vIcF+RjyOL!VuZP3rJDjPSm4vYolnm)H;BIz!?dLyE0^5(pm)5*>2clW zaI^*Z;p6iGZW~Gr0(Eh+%8Jkz{S9{}=}Ewi6W0wF3|BbVb?CR2x>4xST?woP;Mz8L zDfs+0L9ga3jcM)zCC=`-ah9#oulxt9bZq9zH*fJK$bhT=%(2bPMY~}cPfTyE{_4p+ zc}3pPX`B04z+T>XwRQ4$(`U~037JrmN`)3F8vu_OcBE}M&B;1Vd%|I|1tni?f_b&$ z5wpdJ6F*oif)r=IzB$ytT72GuZi$y>H0p_#amQcJLZ^4KZySOUrRyXy3A2(i=$zB9 znZnGFLC34k?N@s@`)u8aZN({9Hfe}|^@Xk(TmCqNBR*Bter>opM!SGiDU8ShK6FNp zvod~z>Tj!GOXB^#R>6}_D@j67f5cNc#P;yMV}`S*A_OmXk_BIq3I$C}3M~aPU)agY zWC+0JA-)}O@e4XTtjzen&g=J0GIVNjG`_gS6ErXj3cGxeDN*4xEk0PNzfzO@6gb&N zB$S-WV-@efQWs%UX$AVjFN5M@8U>+?Mcqg?@=Z-R`~n~;mQGVJT_vBL|3^fHxZ?#T zE(Sd`8%2WHG)TcNaCHmv_Id%D+K}H3s&c`bxKs(_ScZzyCTpvU zHv~yhtKF9G{s+GC*7>_D@F+qEq@YmXiKTV(j#X7^?WpvIg!Yxi6uBAhh7<91{8vFL zfT?Y~vwmE;(WOL!V5Ag&#@U$mP~T=*#_ ze#QynX>tO#4IJqSj^UB>8ubSEn>Nk!Z?jZE01CJCYuY`1S3 zf%2eyXaWoAQUw)KYO;wi<&+R3_7E%h(7F?xq!8l>!^3Jqj_tNPrG= z+y2S-0j;(AilOo;>SCQu#;Cn?y4Eu za`??!yHz)qFH1Z(3KMqgn+B$&t+5s0zY|}<1kB^Q8FEAumh;^;Yr~amTx1K2%2JUk z@7uIE&0DVch|1R=ro5rjr)w!iU{_09PqfhnGqhAN^$^oz#wVNdTRQ!8^nF};4);Jz#=dTBTMMW7icnZ$dK1E0UEgP4&DNk9MFoKOhtAkVUR`d_vc!x zc|1mY&%{PBxepp^JPHmFDBQ8t@DD-3!C)-ZhGJt)?{)^0MvC%RzI;4}>XoOUF;6~j z{S20Ra%PaiGvM$pFbH;N6)b1J(N;{+Gp^^Qk34JAuPKH}Ap}fen!WlC5vrQ0$pnyq z5poi8VG>>PnGw2^-CY3XdG3<;|0xU}#WBPqn{mO=z0RwL=MXn3=;oA(1C@V^6F;ogwB4EBUpltu=)(MC@To2kSPbL zDdGz|C<@`&!MmQ*e>H>2Qkwa~K%;yZw;SnM<=qwNHu-Dh$r(}-d}T}u!=UOAkzvEOiZ6>{)t$$# zlAmjO$1)&1Zh^zdh8uhmZ>OBA1T4%s9Jex_y4|ifY_=XoX6UzpP;MuC5su(6%;)NI z4d#4aW<*)L6o7w?MY2+jRx6-3S4i zC(~)A`|)5(s?)pBvTfYjwvr@Z-Dx-F7uq}z#WJB6&}0TIi6sGXFWOxD!As%cUg)_A zI)sRCf-5kPBU|rVm0A{!s=W2){AJwvShr6Tsvbg|NrXi!7zoMde_n>-+XFX0fiQy~ zjRp|;6~pR()0a>ETtC7mZD|i$Emj!r-gq!yhAFdV1uR*M<4O?t83N1JRT~8Cy8Vha z+STlcw&CoCJt$k^#ar+~DBmvtC5tr{(>|W6wHq*NSE!^#8*rs>!oYj%fl9~Nu*d4t zdk!|mGJehKW8xJE5ZOcHRfp4plI+l1Pct;rK={=P`YH8&1hNW*YE)4yF2@wa7JFaL zLHJH6ZWc1j|nQ55Znh#>tV`!~N7lY_05Cq%|8I-yN}yf@EzDG zBL z(b0sjh+ui^*s(rg)=l8fU<%cPfba<7y?>}j3R83$2KHzWbVF*`!x^V8JY`D0itC?ZSTYH|w3lUD#$5G$@!v(Lphex2O1;%>w;Qh$t7YF3EjFuySPC$>~%EspW}@Ctn1Bghd5*HVJ=tZK~8oMiZ@9IxfFLSk~>p9cT9gOSPLyP!^bOah`U-6{}C_ zmyhS7S_-tYDm|9C6(Wu2Qe=*g5@{**z@#Ekz3Y{o7fw!^4z$yi z&=a^zmtOpsRO0lFr&c=khr)cL2v9LFKXRDdE}tWlOgpR%}oWHCeJ4;(9U_HeJYl! zwz$p|t6?#eCju@0{IF0gbk>So3C{Ror~JTpuOW!G@^?lBVrf zf?%rDK2E3x=xGC)J_lEk{(ESh-Uw*#k-n4l42f3oC3BJX0-2NMZo?P)-6y1v+?|+< zfFHX8(bw;H@;6K!?=!B#eZrkowcdn7)roPT=WM@MK?>T-cUa$oQdYp&3YRdWu~rhA z@rZKmqj8Ftz-*@`&iH|) zC(H;QiqYx4{Mz@rm`qs~*Ue~4EHM^J7i{QnL~t)O)tnwIQC;23p}TBoc=9rcuS!cQ zQgl)_F@t9{c)ESLtAcg1AbCXqVS%i1ZZRiy$*?Bu=r2ad13e|ZeWV=3pSL>YAk>X& zQZAY4kJD`CYrK-nNti&;uJ*e{cRILOFk@z?B@fNO(exjUhf!b=yuC`@(RS#ko1HA+ zOwsym7?F)}ufcD5&IV+qr+i7Mo3)6M2oI)*3?@-%ah^0rL#0PIn}XmOTP9Xsg5C;t zqkFe6yT##_ZG5KuhVQY)89LfWOeXpXVNWX2PmiRqq<$C!<^WlyO~Q=pk${$DsWY-7 zZ->4<+c@KPgKzKosGPF+&Q*>L>WaN6_FC~SP~3gH7bvg6>QgPzp`&QTpf3W>HjxDxj!y zZb`O;&XZzI2YJ4!^Mq5~Vz7lLv`StN|TSP@jdF}@9;ql?u*#Q+_E}~hak(3B%AQNq)t7PKgAWTYp>EJz^VIj67KcZ3^vvZ7{b;; zcOOArcAw2$T+$UwIib|pt3i#NAuP#3?Z@Oaz?Mt(H&u7HZu!03kV7`t5IRcf7hwck zf{Ujp*YsH;dvcW0q|=o$;z#Cg52;n5t1phY44To!sQ99h`iVzXd+v(L%?A$Ks|Ne; z7fby7IVUXqN8gzsnL-s?uIv>=Qh!qAxoe{fRaI&EcSGCTdggq-Qq?DU%SBOummO5cRa9NW}V>A0IH#pxch)!$2p8=^-XYjsB%$S$U5nI zlJEMBb!BZ_O4@87cEYUBH7}Y_MF$+(~gdf-!7)D-D)+O{*18TC{HGZFF+`%IPcmK{O{YxR> zSfJHSeQCChuPUAWe_x~gy*f!!wvt_tL-Dp=nUm+juu;4L6N1IIG4dsVMat#T^p7p1n*Tx2a!YaivBTqLsSJAF=kJej?@QWf)Y-8Ks>WkC456{B#hW-ML zI+f23(}F=MeSdbWQ>R98TOzv#Haw}ua+17H=P5|~#BDmoEPkzl#lBTvCoyj`XU|IS zHn?dXbq>rqUW8^kQN01zL~6!Vxn4!$Pu|F&#XbiF{{>T z)&khW&2Y?d8^jC|phWKQ4!CM9b66+l*HTdPm+)M|e5yT)I32Q~2ENVJ*ZH;JF^Y907{XNHLoQ+85J~!w@3h_5d04o=~|1 zCBAvjnXMn`S#qMkPZE}9#RX`%al{`J=oFKk(aJYT&Ss`4iBrXa_pQ=3lS1IUFA|Rr zgnh;c8nkGH)|*yyoUZ?tE1XKwkF$n6`sdkf^7)(wZ52xtm86N>o&&jG_@#ue(B`xPM|8oGz94>*kl17-|d^y0`D=&hScq6gGQ%Z6|LU zG@<~h-R{xW)y7k1x7XFw!TWW~HPC^bCO_;xG#A4he?=xkLjS=~U!uR+q>vqJxCN~J z+I}|P5RTv*qRT{k2N^Kz8OX*mz$hYR!aYq-f5bN4R4=omUVP19L|)EZq?O0#B9 z<3G&oAZ`UeIqZWlujz8UNNSK#{=_c`*(&TwlIr3ZpC0sfS5Jy?;t+&wb1g4Q91rRNiEt1|L zisgH;)V()S&(TSB|1yAxZLH%BY`nnhUw_6sz~zdKCCc!ZV*Ws6`U4u|CBpv4pYIX1 z5*)5C*N#D}gj<@pdZxtw!`5aFVQ^Jj?1W z+EsBx6>WV`%wnP@Fp{XlqFkbHf%LfCgIi_|w?uPPjHAgOF+lDnAb+WEB+i_53PFmu zj!=umx@ez9mVxC&jA_RtKRfQG>Cz`A77S2SpOt7%Rt*}fG|yO+2t7CMuK$^}D#i}k zZmO9yUwK6%!LbRsULVnxUxfxso5KFES=!WCm>y&YSR@0CS|iON0v59pkQ7dVA{j*+ zmcRtD@lxXuFq@#$DKKSal#ApSJLw58m_NIJ?z;eD3Z8u*-#}EaK zyG~L>-7laE`Y}{g#FPs9YA-wT4>X>xRNtTHp8_rhvWA|eJH(!o-G~C&tvHB9$UEJI{ngD>QjBz=wl~x-j1MB z4)L_#jZSvaQkbmVbN)4{#^r&ZmfhhV%?tet3`xJ;#jI}DsS94qc&s)#2kXv5pkt;K zaY6emqzF1JWMxI(7h}mk*MQ5C8WLAol60!DPj|u0jMrLTkU7G?ud**S@bYx-vp$+r zMVXWc4H}2=yF+YML9!k~LT(|<#By?F2bS~weMi9dD@DA&k#0e&MM1YT!qoQDeNLwB zA;{KvwSzP?-K(>@_b@4vTkIX7xwj}ckrusCw!k=#;Krt6;}3q4d*)?c{>I|C2I^4p zR(o48TqHbw?4Z`c`>?P{`cT;FpJoFW1wJ3IVO#5Q`wsB>o>zsRDDATmct`aaYQbTL zJVlHeok9_?w83#Z*J(_BMs-;N;mNeq{;f3S zSy{i5hNY5s`c#)~KhQZ{0_hNmrMD2b7CLC2+x#EmLcNa8V1Q=jz@e~VV)Yq!Z|$nv$TEG3j6K4opW+mH z3~z?*H$qobb652kQ}ZHFHUVj$%JAwS-Ie=Vh&Iivx3hjMCZ1k)4dRjdhxRb17P;Gz zZCsB4J=l1S8`O|(g!8c$aOMaYeUoCJj&n#kbDxe(^GQ)E)$Rq+i-wbPKeaQvL!`Y- zcL=QOLcWBdDq_`HLow9P5BG2EMY$v;w9cR$C{ zMv)5zrmYv!uzHFAxDI>aftAp&ad>GYoPt!d;A*$s)^6E5l5ct#&O7A0p^8J1ceXa) znIq{NgKbbOSC`6E_af2bCoI(gD@(krDr^mDVw>cRz3zJ^&9kbuf6)J@Cd#zbnko5m zdyD^j^!9J7`oH!u{~wlOl7jYM(OcdI^#*5Y>BjUumq_g&tx<#_pkzQL3{!g?50d=#eCov*uIw$N*glXJe1F{FuUF_wCElS)Z2X= z8&w0?WkCX%HfL)#n-m1tiLy!jDMqH$LikJF=#lu@k5%&vN zOEmQQ^n*t^76E;JhHPzQqbY0+m8GQ9;~dJLLZ@*sqVX0ui5yz%8Hyn87vqUisY_0- zDtUu5haWdOvDBOX9Y;=s;7ul^_xLxfU(?k(HStRfk0Ab!pY(scal?Nz{Qu?etFHNA ztD=60Y>dte)hUle1IUyYIFgMxgGpvx%Odv4q;WPV?Zj<0pph+zWMfSd=SIUcB_#7^ zgNlm4(v!WIBm4?kpvZnCvp?TXW7~Azs3LT8Gh<0Ew=&W*e+4X_xQ{(e+UCESTaWwz zd1ly>%|#A|W%fgeL_3gAwxjeb?Wi3rAR3U#9Rie*)dfz7YxUK;ex+a4F>@qyQAL0^ zZncndzG56R$F&?R4SOX>&%UDdBid6 zIn=GRfcto+s-%gMB)Wx7!_Z+SS)f3IG!&s%P2eNfHI6~E*=>e`^RpvJQY?T95IOKL zeX-_BCdRE#f06_QAoDyMH;#IIBnT#PWSOtks+PCo`04X-brsea32I~@X(Bwl*Q`$c z{Al@04k=Mmd0}}ts=u%dCO;qn-;qh>Hr7bB6!NOVxy@Yi#GK2vusj7iU9757HTqN~ zNMoKeZY}o)nA*{CqTTPKnWi*JgZFZj&EjD$V;O9zqHV#tB#r5Ur$V3To8iP-bO*Gl_d%qc2$SoU`Hu-6*hWbuWzAn(83_jZ%>P{PY3XVV!q$~ALE^GC( zdIGgR(HnV8Rn*P^7b8#AzONo*U_W}{Ne!=#*qNJIRZzapu_fOkvki(|8NDg>&D=OZ zL3G)1WS*8CFh`-sb*#8*hIN7WDjw6<$D&T|B>JPi`K!*5DF(O*^A+r*Jfnt))c8|M zQKtgEytAqpy@~XZGnVYMJmZSG0U~uvP?i*?DhgDOSYtx6s%6u*vL$SW87`&xJ9cmDLrPHI@G7Pb*cizPGf|!5th41a2ijel>Xfk3i?7Bd*{|)@>|ZBi zH6gO9a2Yd&_ZeKmNQC^e&S$cl!3D2oBCX)C;Ve{0qc|4+*fwK!x{=QYtb#3QD1|Yi z%r?t<$-Mjbli1fF(C?V&w#;Gq3-**PgsGPPsXN(0fb?pIDc{s6b<9{t%6D*47A9ZHlc4rEGU<}u;tiom3^lA-&)1i=j z|I#)cctK)AH-b2*a3Wm%Gt*;#GWjNF6q0q^Evid`6G2yhMg_4TaMUK&x*D*5+KtlF#!)86A7pn~&yvD-Rh%`@(o!Wc#9t=t;(9_y*(MWS;4cPU&cJcE+h} z6fZHrjH@7{6~n40#qgL(yA-oVrt;Kcu=fV1WQ0QY`_I8lVds$PYR7KDvhsTbkC8q6 zct`{-n;z2!($SBZ?;(ZMu1sY(VY)KJ@%p)!LEBL+M{ck-$kHEx=3N+%$#msc!LKD> z?(7`Owu6Iuf-Nb|5wFxCm}U)Du@JO|nHV?%8lk(y3x-=F_d}u8>#AU~iWtSD6|VuV&YM=#_v-HDjZ4mS|L2%K2K}Mhz zVb)f#Q>%4Du>|ea6cbNYrpi<6A!rSmbeh7+xGZ{-TPG);DG9qg=>9!44ScDdh49-_ z;|KUp*RQ-So$jyV%Ss5FnJa^|LYAl%8niBhd%(W!x$Rpq@pcp6(XF^fHFRF2KQP>$ zo@`Qi&QlkFxp%0@2)7RlN4+NzCWo{?_x}5$E?kh!!UM3Vg9R+=xPLWty|S}5Gt_qg z+-v~8k*0?Bf0^Q+IZS56Ny~Q$pap&c2NUt&f7P9P+zEz*>bOO!5J8(uhIJ#%lgMNl z3;y^@Yht z_Dko1D=J@nc@`zIXz6dWsr`Kdt!m8`gGlx59A(t5ZjDVmrsjl#0wT@It~$j=uGRM! z@XJK@Q})NA_sQpEZkNduP-h{cP|l+Qqwr{g--LeHY2&||4dJFD34ZCj7@+4ZH4}La zjfr1gHXr8j#ppOa+gkiuHYf$a+VGA${f!~LtdO!~|X+>{b zY8=`^(0d9`z1f!nNzD`;4&65cNlg)@h5m5oOj&gG%mslXlc+jou#n#`d_l6}hwB+CG5k*Sr36Yrz zP2B)Pq#G?*Iwb)FJiXU@lTvTrdR&WRpV8sUz(Sx3C%f;BHSLY@I$!TqSg!%IetroG zD$gu&K<>-imH@Bh&}f!zwO-`w8Dt>MMZ>8V@{X1g?!2BS0S;GtXTW(%@{L=6uC*fB znj>TvA9Cj80~Hn`A5GSVpyqA$*6rlEa`u=Z!{-DRtCo0{jnK|3KxpDEi3&^DwWNg4 z%|~wf=EtEq^ku$fbX{@*EYr&TP@j@?OyLdVKVk*&H23K=xzmgV8p0Y|jK+@cNaPE1 zovLSR73MssgV04G7S-h7L}ID!!8|-X7U6-7?t~caWg)yk6*s=m)9us~kZ7pC6I1+@ zd&wXWPx{8Z>47wN=yJJ;BgQ&`z)H7hxm}Jq_9GiAq)9R- z7(@1=H+oqdJ(YFEq(LiJW=s}h(Yx~}5%_cQ&3xV0VUT%{sXE!% zVMqItDE@pLL%E2I2<48s8InBVbnt|shpL|$wrvbdWe!LJMr$c+e86OWy77OJ6k_2&3KMqL9=QFd2QUVwwR8X*sgj}5OpiFWK zkiv)DX__mAlH9kRszqfgqLLvBrDbP&mL;Amd=_UXSF4&!?$+*0ZswW?9oH!-BQgjS z*IQf1yzUikvx`UPXLZi2UvHaGMOee-cPA0C5fni_Q zcj2Hhbit;RZ5t^!?2;o_*D4W$VcsfIc+m?Z?b!Uv2;-s&XYSCUiczc2-b0I0g-hNj z@xi1}g6j<*=Dr7UMa-%w&YN`cBbWT>BQ~p;QyS!^#eQ>q9dy!?Nrh+?bfo*_kEe;nyR%9=3OTAD90?RT8#Bk}X#Pkr(TqBF2&!V=` z^iWLr%Yk96POnG@bEb?cv#Uk)5}bP0=~;%g>Sm{t#hoNp#yeFj7UxuD?en)EXw2%= zTS`>YY)#O023TqIXj@8o2KAM29NQM4QH=;sYP$pcqtRoxg?ZK@CWy{=P7(uI7%TOp; zP-^!0wmMVv-f2E>6tEj7ZTG#-KaZMuUUgl1|nl&p%3Dc8tZ4 zW{0iAY38oin5YwiQlKRrH8RP-h95fX$>v!l2*6R~)3vTQ7V(gjstAxGVc>U<8Jwb) zPTqZIfoIV>X`vA2EuAW0Ghj||3;hwn0w`nHnL~5Xr-xuSDNmuyhoZWBBa|hf3)-7$ z6nhe93c?Vv(WT4=mKowy$9Fu8Y)h5yEW6z&zzB7;Yf(a|ei#jb>!ayFWo?MkgWxQK z47{-ws_k4#8xv#$x229MEUK#x*X1k=2QLLnaWhYREFj!ta9&)3I+w+wuB-hQ0SFLZ zlvuP9c*O0k+Bm_8bPyfY2o>Ts&0yRSIg4c@Rv71IVHGS{L3?%!54(HvY;tru5FCHC z9_ER%i7@?-Tq&gCLBVg_3g3?9Gu6P$T^70*)YqUQTN$IHtc4g5UG7WN_J&c!4-lZ& z0a=#~p%2D>Wvx?z(9bP0Z<&FgpEnI^CYsg{+)}t}Teb>kj&)7NNmPz4Zv@MJA2cA4 zE{uQ3IbdMxWrxK|%90Rdmx)yBJ3FI$YLuF4DF~35POQtBilKK{44PuvYIHjt?~mW& zzNwc$LazTnX6dO-hE|>Wu0KO)5xDdvCq>WTfkeI85j!LDvSNHy0&TTnCpr_Y@_=eYt;}dhqY5=4^QRl&pzt9Bed!EmviR=h>B6ynC7MGc`x^9c*)$$|imA)E z9KmcfaDlPY6j0i|;UW8=8oO5$aRyZaYTM*qBd?3;u=u(KdjqYJ_fLd`tRoym(-gX) zqoT2Ua$jR%Ibg0>jte$VWiyOhLaYcnGe^pQ(V0O%I}YnENL$+J%d>ulP(v~JZtnH_wYk$}A_OsQn5BbzOkG2(!baa2N({4d%BrLdzn_qpUhmGmod2kf3s)xrh|=VU=smdZ ze#hs3hAI5A(;4e45x>FbZjXU=hACbM{;p^HFvP31DFz6_lHCVuZC63Xv9`wzN@Y6rcuoPF<~3V<@&m2~m3D5&4GW7GA+XXs{sPo!wDK z85d-&4Og)(j6Q8x3f?Ooxm7VJf?Nw>3_s3fV9y_1xSDfCy31yBhkr2LI_&)xUpcLxXfuNl6z9z^w)MF}E8U)#3YWS4&8 z{-CVR?>0{F?ccm>oP#mMTY-&w90y~vwccFmV3Wd60@~aufc|xzwLI_AA^-goYhcMf z>+D@$bjnFLRX|X?6oMyaW_}(z!Ys&@5~HmlWUY|}!wJnBP8YPsWvf1%(iPjQZ2#s7 zd=-ANqy%pCwL5&H8Tzs{Ux(<1et1ny> z?C%$W*FgAI%!nl0a{QuH&7L*cr$DOVP-67{8fQkKPfPD$L+Lv zSnj#tSMG<%-tcmKzH8dSPFO)VC^+Dw0|si;bY^#=`Ilum3dEF5!JrA9J z^7-aQuXu7vwaQBlnT>)~G|scmodeOzMFBpiJ_`6WePZh+=vMX276uFz4Vd%}>sndc z95j(>Uq_*mC-r*$6iUb)5mCYRy8>n-Y?K==}9iFFRN zB_u(i5p)JpS@Is*ArpnM&nOOwsI6t6IAmTNaVm+)*gWI?2fN{+=&1n$oGYcUGS!0y znn-1azfTgI zyHQk7RQGW=l@WF&jO?B1KXJa9;4BdKcfcpq35}=O+x=GE;TGw}Ub3M+AbPW8_LG;zZ%{IenPEAQ0yCE`_ z5medk+}GQkcA+x*kGZgwAC&01r6-zspCxwld`4~iEZGot%8<4p%sS7d>FR_YB` z1Ifjyuvj`fc|U|FGJ>_SBP*e_IMD*V%9fftjgs&{b6*4#VT3Vun6n`CvL$#d*2ygL z)7eoDSMZ1NGifW#;&EW?%%%0BG5R6&cx8T(iz?c$ah{_eCRo%Dp%dN0c9w$xeo))f z!{R2?4ug`a98BH;1&H}cNC!iP7dTNKFKcpxcOl6#wP-SCOy% z!JYwOsHXEGr4S3cKrNjJ=%MF4T z@!bVaWe=0&6`nIQ;)FZc{l;u(ho}|4c%t0S8wEmM$g~?uCNTxxtk^R4o;IIHXg4Nb zZhIyY?230y#03^WP!{XWxKemhpfBjbwIDOpx8d|`8Pt~dI`s(SzLBSax8yVhRmu9{ zw$*00x8`h$)GaBWP=7&dA{3Isa5b890UcZ}9{lKpxjTOUjiBd@0mQR5q$sBg0u@Iy zwll8RkI|Pv!)|-}!4Q;*3w)M>CtQ|YfuY*dE7B89}m%)-8C#3~yUl6@M z@$xCS^_0V!62E%u6hMI}Baijc^H8CqqH=??%n$8DrN(@_lxx_H?j+3I+s>0uS4W-> zq0;-tBt+ZUCJDUZPCC#K`72}xS)J822;Tq5LaYD!CkRo6su~3oN zg&ag$fC3ZxSR5uvsAWN7eFh2^)f87O^;9TTDscs|OpfUC5ghp1K49VjDrt>4fKO=L zLxxhlumLD^ZNtMYZExK9PV1gvZsMjXa&<%d^2M4I|F-IW|5xsB0rGy*D60s$dYsg6 zMdyH$$qnp@ADG-=TiGN!GTMc$NnfrNngX>@GClAFT;EKG&5U1Bb*)IV83-ppR>OmP z;mE%>wS^m>hiH7_YYVSpTmR5U_95QXcNL(22X&|AmEtABFNSh^r+yF3YBOQc4!O80 zW_5fFeqSWTBALo%V#({BIC-%Lq^vp1z-V;gLfX5Rua>+TgW*Re+49!T|9sLVQu&ivPtDwn<# zB=%%^7~>Vd1WyRru7m;?SybRpuTdTkp!CqN?qy2_^y(`WSe9uYa9qE|o zcGg`Ff;qg;-$@F&9QY~YAiHAU+kZCb9ucTo{Gb6k#xmH@V2*O=2$V9hv3N!FG!${7 zTp-rnDN>xcgi;~=_Mxb*sFFSwD6?;CdR1Cbi8F3{DehvaW-t1+1l`nx@J2Uuss#I} z7YEQopO?lmS-vrY<18fFZQj;RUYHV1%R8M@0Tkd>SU5a}8CH-r{t1(N7NT#$sq)^w zmVCLx`_@z>k8uq?b|oJ{kgpSC_o3O$%4V2RH#rTN1lnS2uTuJCihJod=< zbK*bD&;BL?vnWrN{SD(*)sBR6Em-F63?LK}2oSl&aN^HYHdZan2q(BF z)D7uS5-tMDl2IECM|7gx%2> zc};Ho`i;kR%Dy)GUpF~6W1Ki*Wd%6#FMi5xBe)PX;SaussO4z3-v?U!u2?q%8AwgJaANO0!?)r6)*$^idCj}7^=gi;C5G{41QB@Q*c8MR zn@7|~dhs0<3%J0Tf=dI8%-XKKYj#sRI^D}q0b6V;M(o(HwO9@8wBzAG+cAYdGz_#F+444xshfBlAac=NZ;*fOTY9TtZ05z^pR5AEUigsEZVK|3P%EN69l9T#rt ztMj^w%zcjN9ADJ>WP_UYuZX&jZR@ji&u>=*IXGQau?w2zE-No+$nTgu_GgZsa&$M# zZYvI)dh>Bd=#L)dh+N*aEL{^5`qD^U_KpbEKUE%6$K7WS@R1G!nIcLmnv5J+Ack3a z2%04+f%{()h=i%kj`tsqCkKKoh%KE`ZGs_5p$zYHg~mcPi@d*l{hE-c6mFY*IgBX* zL6~^BD26Gh26+p)EPJ2IL;Sue$6HLwX#VB^s1h4Q+Hww|5(zlpA&M+;`=Svm=S+;v zJkHERRBWx#%q|GpK%F+Rc$V1Q(oO+`kKp_?Haa3}B9gaq1r)nI#4!25hPe^VDlLJ6 z5!=XtON&dC5`5o5js^}ccFq*%Q{E2ZcqcfHG;3~hzIV1Smr2JnUrzA}qvJS0pHByD zCj6^D|3`QKV-Mkn7l`7C+;{KiDa87OI_;q(s#HJaMS4T(P0Ely98^+ZR5*wy_!G56 z3+J?z-u?HtV2|%ah$ea4I0FGlLpsR$NLzoiQt?zYqY;)WuKzk zX&zj^7gwX#;?y|AsCmpgmqu;LL}sQV%xExYp;~&@;1uwbc*ZH@^yP4QVY8iniz)@m z`NT(X?G-$aA(h8Yb5{k|ODM1t4fD*k+EhMk&aPsfdgTiZ`crm;aE@iffH$0xl)xzk zP;cf1mo~EIT*L1pFr>c)6bMypnY#=C1chd$F z%xSI__^fdrclZD!Ywh;nrQKS)Gv4n`Ga?-lrHjRFhZVaU8$}1Fr&DC&0+5EHg+pD* z&pKO@6Taone5>3KFT+$B7Il<7`8grSj`|R;58(C6d48Z%;pV6 zj;G<~o22D(mZ@K0+17Z31aLV+Ib~<-!z5SSzQzTB0}{rh&2duz%ly zaG}^#dJ9k$#eoF^;`w!0|1(z1zu5!@L z@tL*vL%QefR>d1{NE>i|3C`dpl0@?KUi{TkiN6mGNRUDey67%i8-Y4@?C?4BK3S) zfr7HErec}l`_~GWBpfXk`;cTxqhQ@?lDsP1%O4g~b66sRNmD#`1VWS0+t5BO78E2& zICkZ`iPxc*m11BQxRt7dE1Ik0(P7<}s}!ezaiQ@+*Mlw==xGFmqi$4i>jy2&9mUsA z*j>?_P%uwoz{pMh_#KrelvNTR1Opo6mb0SRdK0M!Onk`Fp z=ys4!Z0vaFCTK~5b`EdIQS#2A*Qxqp3-@B7aA|=0WBE1wz(P~(nkuXl$tH%v&|#9R zeLm0olbua(?JgZv2G?R6yz3gVQMwP#Y?)mq-k6@gOK|{k8!R#T#dqf~3JgcyYV_!1 zp9v$!CMgIg^wGUhsG`m7QN0#1VZJ^W5m6TdZ-x>ULth(W{8-URkIild7h~&lW-x6# zkamVW=Fm$^>gUSsTS%jcc8$w;GJ85Mm6ERkFl=0h8YO#a*X7vZdhL(NZ^$yXf-l)ch{DbY`+M4q6{fN>WVq;uQz|Q)ZP2YT2wh+vZ+$wOqNyK`2r(RlH>uebaK2avbVcg z{@;W^5h;qUc)ExRI?u}9`&={vL4h#9%kfVg8oSDKpXrtx)=Dkv95RS`c6_Ya%CPQC zTS5MSS`B|Ys|SBOr^kwpi#7i^XAT5X7Z2tT*1m^K5{>uKVM+tlmjz}bI(8LGIh*ms zsMRF~)Z zhf64Z9SiFjJH1?Ww#3?_{~Ehqr&!d1@{PteLg{| z77qv)uM`QvK+3m{7!R~TPcnJ&7Vd@$JSpSW?&Q|)()t24_zF+GMe1DJe9u=JL((pz z4@A;xoiw;3?LGCEciG5$Z{N|`rA>OUUZZTmgJoTfSjMXtou~^{@2Gdt3#}aVPkp&$ z;<#mYqWv~IR4PWq6R@TK>G(xHnxscc2G>Kz zna3IzOUIMP6YyJPT55w=uM}j6{e%$j8MAVCg2K`y>GEQHGW+Q1C~P&o&OS8KcHC@N z=WVu!LBgQ8k675M3KmokUnj4A2`EwxIHITBFM{dT(;41?F>3Zo@~au76RvQJs*KoS z&L@-VLeWtdWPLNQgrr$_l(4LdjNv_DW?{dFzQj%)S2oXPWW_8#V2>5y%Hx-?Of->d(WT$~az&0U;asF!k=o??sn0dY zP~Sai?n7|WSX9ty2<<9(n`Ys=AX@RNRjzxYcMjsFZ?*klo(9`Xy0pz%+dO3^(+0== zbA1P2Ogj6>A;Xc#xtnp7B~iZ?OK=h>aDmEqi5QqA&V7UYaQwbvoMw%fid2k?v=$&W zU9LC1N7!8#Q-WfmkA|V1){F$W1nSN@5^O7TnxTnpys|30Y$U>gDEnU0u7`$EzCUgxKF=SKK zc(M!e{m6AkXWHEu3NF(2SA@7<23J^(Jg^;%h5KGp(c)gN$N7PNs6sUOs-M(%hY-0? z|B;LE-P5z_yS}s1J{j;76a!AP{;PNwe>?_)&boGne>lMWCEi7uGGMK$fW+GXaJzP@ zLeKG9htxxEMuTA+D1<>_B7;wzX8q{haH4_P(6W0v8!dhg{dEgbRwR;)&j-;kT{BT* zGF5alYiw*J#lFCK_w@1W)i+2V*HX%u9(Z`}>My23@3YcyD46nzA%%NuA6 z$lONl=$>A5cNf{XGkwN zKJmz+b(iE7?Za|mYx@aj!F+AgUP^!_!U^+IR_LR7^Wd6_?3V!V5M8Vknv-+Y*0=VB z3RDkWb~q(Xg>VWlaH=;l$s&6kowW8sh+In-9=`2&@$jt{s5oin8d<4-abf1&S1-yY z4Xll-Q5$CpVd1vYSL)4;BBv`+o2Uw73krO-6KUK|T~D`hx1+))!2)*!D_zF}$3nUF z@+Bco^6H5c!eU*o;#dsv6N7QlCIKiGMYk#s&zjCk;|@N&6P?8zHiT>2<9Z~6OW+dy z1;en?LH?maVakQZ=w<717oPTVD5{odQy#~CajBt5Rs?}0C1?oiNK3OWSt#y7$R%ayCbDQ7oAH<-&`Wp2>)fn@T+)hdW? zvE+)d2_$+7ALBDazH-i|WSMsT%KI8p;uxa*y6SzABt(4(r{>`#y^}+@uNBzb65Cdz zz%0=Yndh4^T4e5FymIOP2e;OLU$IhxNx)$Py!MR08zX)l`2XVJ z^~^~xQbAU_TL8%u;DbF~QB3)XgcU}tLY7)W0SyEOdbQ!8*+P<|dL`kJ9q|#!JE2iF z2P|F)Gcm)p=B!P3ckkv1x081a-vK`zC7nzWwj4fZ4YttY{*0j83 z`PT;>OuT#X3hZf2Y|#0OO*KdOdF<`w8GXTMqD!jidZDjP_B-7vFClC@%wCpeyiVBR z-jHXmyT>GNns9^GS}Ruz7(N+Gs|YythV2@4+Vsb`i=eGpP)ZXpdFz-;FN8{;cCt`v zc+QT8%U1bDX*pG@Uj@NNt;c*Ds=wF$3*_JHS9k(r_YmL_=>d2n_*Y@vV3A``LM;>6=Nn|z zre+N07A%UrbNF+fy2fh#6N|1jjqmfH-t*^9**oh)QB;1kEqHS}+ypo@-}EWd{rd6h z%$flx&-P89`bb8uk&YOaJsvhT3Wg!wx(1MRS$J~<4L!=WM+XbG8e#Rw9dqM9!@ z+#_6QHns5>W898fQL8nHugDl&2EBr0Q&x_YDt@cktT5=HQP5iCd`p4gHB$_A!2NZi zfd&6%=r+PKcF zcD>}A2!}ZrljP{g7lSURAIQNm87b5}hmrWXJFAsVr&+soJYUbIW<3f`8Rn&64AN|n zSdEEN^c|s2!F}}qI+8?SVwkqY15P7FqL;E!ycf$J%{gv!1HO@T*!_;91hNgu4&Yv_ zLVv=T^B%)U-s|Imj%(pjRp^!<7P~u*P@4{oI(<@|8!tD9aMICh#2eS4$eGG3v%|!D z3A9hb5HtqpqehMMa#N!Ts_sj&kZ`-;{^vSa$2KvUzQTu(^Rn+6Ub!urJ5;1XyfGF+ zPk&ug5Jz{R?Xt?FQ>0Rd;JiS)`RxM2aDHoU{Tt$KM~`fJ4=u@MHp~=H1h{{0>(l^Z z)`#oM8@Fg94%5>@ozPzIKn4u?Z9^Kdq zb>z6+;*Il{_Z$%8;%)VaMOgBcyqA`}UcP78_o$yfdftM9!cK-_c98twa zHqXs$;lCQr75r$Jq!!*D1TBMN$&{KKiwJy76aO*8aAD0)##01^2jiQZ=S6PyL9z`dPCX(PcIvRFR%Q%oq&J*9@-?yiy6KV#!b`ri50d zRQ+HHJA+XuO_7QOd(_ieE+CfY<*sY!`#?Q6B zy5398or>DtM&>Pt;fqQzX%#y7TO~D@!Q8N`jsznSaHVV@QII_GY`mUV{igy`NP(A}J%X}?5&&wsZWPQiBz zc?)>svRp9m2Q!__B)myK^VmyYTJ!dL1hE0?7sFX%XPzI+HQT~=qMN2?g-TJ)yv&^o zP-?RkV&wTaPG0K7dqAKQ@lbwGb9HunYmN}@dk%i*Y6CgtG26<8lS=_zY90qI7DfB}ire6El{#mc z;nEwoLQ&~Dc`v!lIOL$!8Cqc^q1h(sj5ncZeba?%Dy69??%`Jp?ZZZ>TN*R4Ep}sI zw{?js2HG>`K26%gY%2}$aMg~J`MfG&2;w$5vc%2GLM?tmm92FD7>Lt&#@luqnUb7n zMTH2f?x*aH%6_dW3+wKB{N5x-bY8Q7_w;nlC+dFhl!&BN&Ff1*S?}lyRicHzJ65=f zO#y?AA+n$PMh7kEH#NpfC>Lnwc{{Z)Vlk`VfVXgIAuJw^YU76nsxsw4)XG69SOl3M zXsToc7Sjz)_Km2o@OS4l8Pk|X#8Bcodlqp{eX(rt5%t!Csf6D|iO(IUR*jxn8u2KO zQ2ElC42(){N+?>x3X&7oo+mgooiaS zIvzb95Qu_Akw-&VCsEKR{6ZwE1sQ^Dq&q8pmb6%CggTRbctH9@U2Nq8LLNW}pd=Wl z)2ye3h=#^9CL^`Tj0Z|w$>T;#V)NRoh|No=l@&1z-e+UkRuibQ&9wG2&Ky}hRs@pk z&{u^6Votln-4}O_cY$AM;?jnlE9nfz_he1h*m+5^E44Gg@Gffy)%TbyGEpeMe`{2) z5*7nD8Bstj#>{{T1EU_vd5^`35WIP5gh(GPDeFoGC)=FJWY{fZomyNDEx}y7*y@Q+ zE!*X`kfss8HWb@hx{mGnzB$zNE*{{roGJ) z74vfpFx-*xmyL|>aP{5|H_RRB2nK&RUyU)Q5Nyxk0h)N4isUHfG~i4EXs`76b>R{p zaTE$B^0yjYa0Dz4T!#L-BNMU4i_Hbr=KTo*#^mn;q#H-@)7~#Sw!WzJVyR2QRWHPVe)!r_j!+mZ)-gCwne;e2sekE2s#u zBB@|AlL)>RmIfI%!jyQ9yJ=36Y=kjt3Ss$!7>SBfYIXZ3iz10mkjP@voHl-|)^tIh z#IY2OH0SyP1y$O`Gex+}Lv)?dR?e$O)x$1IK~cET zQ>(H{FhP9X=x~9~8;=t1n2V;CyWI65+}B__iGq-W+!Er~oYCPvy%Po`*xl&OqhjBD zAY4Ky{Ib^XLF8{~54CQ6@9!S7KA#DyA;cCC4>(OU)A_lDLI*%?VKI zVF7!a^&(NWCGBf}7T177CBQTaEqJ;4=I>8sWt6@0_tP^XfDa+y^Fs#!aMb<(TLYk) zx#~9>06Tw+{0|I*1`1Fvhk^oP1X%b0y#E*V9xyumxR8KO1iyck6;%?Xmy{C&9Mu1N zvW7l2DgnShC<8udfX|;-p6~a!#s5ntD<~%^CaS3PLRRdr2;|R*0khqY3km3(U>e}N zwVm0c5a{ypIj35H*oP5cau-UI%12Jj*Mk^K9u z))ybJ{`#KRAIyIO{HY7|XQcJ#IqF>voJ9l7^EQBze{cRjuUcPVz+e9f@cF6^u)cF~ z6?Akk0mQyF)&CjT`8ng>v6_7`fMyBsA^DRIaIf`s2IS#4jFNwr;g6Th=XhX6ZYx@V zyea@v)Bg=m7ho&?4W782u7QQ2G9diCgteuijJ377qs{N3@iw)WdI2E!fL{82L-^0D z))&xce+LbS`D@{54>(sQW@=$5sIPBmZ!fEBrEC1B(!%q+kHG7QeUG4h2e9Y;J?{hn zQPbb#UG)!X4uGk{$kf;o5I!3aO8)nGSMbC)-2qeyHX!eee`XwTul2o0`YrVH_LKmK zMOgf|jOV*DHmd+K4g{#3?<2;aSFJBS#&6MOtd0L`EsWV6g`ordOsoK9{(da#&#TtA z6CeWen_Bpr?A`B+&$(K^f(v-Wjsc?p(Vu{Td#x`v;OB2J0fzz|bS*4?kG9e&6WRl) z%y)o+>F@1i2j~~SK@+mJcK9y4VI!++Y6Y;l{uJAI-UTFP8_1>rZA1zv>UYV6Kd)L} zU(Vk`|L6juE{6J!{}(;|Icfk-UP(0oRS1Ae^Cu+WUhA7G{9DvN9*Q5>-!uLDig>QM z`zLg*ZvsF><~J4bqgwyl@bg^b@F$)FU_k#3-rt)3zbPI*uZ`#Wc|TdaRDa9z&m+!r z*_@wnvv2-y^87IX|8@fXYyQ4(ZatU1`3Y$J_P>kZJV*JS>iZ-4{rWB&^T+jl9<$W_ zTPeSXuz8;Nxrof4$!mSne@*(7j@&*7g7gZzZ2H25WNe}Vn+a>?{-Z~R_w z&m}m1qM{o93)FuQ46!nEyV!!gHSIhx~u?BuD(h^XuU8ua5jb=X`!t`zNPZ^#A7k{c!c% zr}ii2dCvdF{Edh0^GrW?VEjq2llLzO{yIwiz68(R$9@tF6#hc+=PdDW48PAy^4#6y zCy{UIFGRm|*MEB4o^PT5L=LX_1^L&`^au3sH`JdO;`!F)Pb#&ybLsOPyPvR& zHU9+rW5D=_{k!J{cy8DK$wbij3)A!WhriU_|0vLNTk}tv^QK>D{sQ}>K!4o+VeETu zbo_}g(fTj&|GNqDd3`;%qx>XV1sDeYcrynq2!C%?c_j@FcnkclF2e+b1PDE++xh+1 F{{tUq7iIte literal 0 HcmV?d00001 diff --git a/java8-okhttp-gson/gradle/wrapper/gradle-wrapper.properties b/java8-okhttp-gson/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..b7a3647 --- /dev/null +++ b/java8-okhttp-gson/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Tue May 17 23:08:05 CST 2016 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip diff --git a/java8-okhttp-gson/gradlew b/java8-okhttp-gson/gradlew new file mode 100644 index 0000000..9d82f78 --- /dev/null +++ b/java8-okhttp-gson/gradlew @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/java8-okhttp-gson/gradlew.bat b/java8-okhttp-gson/gradlew.bat new file mode 100644 index 0000000..5f19212 --- /dev/null +++ b/java8-okhttp-gson/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/java8-okhttp-gson/pom.xml b/java8-okhttp-gson/pom.xml new file mode 100644 index 0000000..c43e8d5 --- /dev/null +++ b/java8-okhttp-gson/pom.xml @@ -0,0 +1,148 @@ + + 4.0.0 + com.sphereon.sdk + template-processor-sdk-java8 + jar + template-processor-sdk-java8 + 0.1.0 + + scm:git:git@github.com:swagger-api/swagger-mustache.git + scm:git:git@github.com:swagger-api/swagger-codegen.git + https://github.com/swagger-api/swagger-codegen + + + 2.2.0 + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.12 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + pertest + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + jar + test-jar + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + + + + + io.swagger + swagger-annotations + ${swagger-core-version} + + + com.squareup.okhttp + okhttp + ${okhttp-version} + + + com.squareup.okhttp + logging-interceptor + ${okhttp-version} + + + com.google.code.gson + gson + ${gson-version} + + + + + junit + junit + ${junit-version} + test + + + + 1.8 + ${java.version} + ${java.version} + 1.5.9 + 2.7.5 + 2.6.2 + 2.9.3 + 1.0.0 + 4.12 + UTF-8 + + \ No newline at end of file diff --git a/java8-okhttp-gson/settings.gradle b/java8-okhttp-gson/settings.gradle new file mode 100644 index 0000000..41ece0e --- /dev/null +++ b/java8-okhttp-gson/settings.gradle @@ -0,0 +1 @@ +rootProject.name = "template-processor-sdk-java8" \ No newline at end of file diff --git a/java8-okhttp-gson/src/main/AndroidManifest.xml b/java8-okhttp-gson/src/main/AndroidManifest.xml new file mode 100644 index 0000000..f59485d --- /dev/null +++ b/java8-okhttp-gson/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/MergeApi.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/MergeApi.java new file mode 100644 index 0000000..cab4a16 --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/MergeApi.java @@ -0,0 +1,1483 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.api; + +import com.sphereon.sdk.template_processor.handler.ApiCallback; +import com.sphereon.sdk.template_processor.handler.ApiClient; +import com.sphereon.sdk.template_processor.handler.ApiException; +import com.sphereon.sdk.template_processor.handler.ApiResponse; +import com.sphereon.sdk.template_processor.handler.Configuration; +import com.sphereon.sdk.template_processor.handler.Pair; +import com.sphereon.sdk.template_processor.handler.ProgressRequestBody; +import com.sphereon.sdk.template_processor.handler.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + +import com.sphereon.sdk.template_processor.model.DataSetResponse; +import com.sphereon.sdk.template_processor.model.ErrorResponse; +import com.sphereon.sdk.template_processor.model.TemplateContextResponse; +import com.sphereon.sdk.template_processor.model.TemplateContextRequest; +import com.sphereon.sdk.template_processor.model.MergeJobResponse; +import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.MergeSettings; +import java.io.File; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class MergeApi { + private ApiClient apiClient; + + public MergeApi() { + this(Configuration.getDefaultApiClient()); + } + + public MergeApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /* Build call for createDataSet */ + private com.squareup.okhttp.Call createDataSetCall(String payload, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = payload; + + // verify the required parameter 'payload' is set + if (payload == null) { + throw new ApiException("Missing the required parameter 'payload' when calling createDataSet(Async)"); + } + + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/datasets".replaceAll("\\{format\\}","json"); + + List localVarQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json;charset=UTF-8" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json;charset=UTF-8" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + /** + * Store dataset + * Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + * @param payload The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] (required) + * @return DataSetResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public DataSetResponse createDataSet(String payload) throws ApiException { + ApiResponse resp = createDataSetWithHttpInfo(payload); + return resp.getData(); + } + + /** + * Store dataset + * Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + * @param payload The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] (required) + * @return ApiResponse<DataSetResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse createDataSetWithHttpInfo(String payload) throws ApiException { + com.squareup.okhttp.Call call = createDataSetCall(payload, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Store dataset (asynchronously) + * Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + * @param payload The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call createDataSetAsync(String payload, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = createDataSetCall(payload, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /* Build call for createTemplateContext */ + private com.squareup.okhttp.Call createTemplateContextCall(TemplateContextRequest templateRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = templateRequest; + + // verify the required parameter 'templateRequest' is set + if (templateRequest == null) { + throw new ApiException("Missing the required parameter 'templateRequest' when calling createTemplateContext(Async)"); + } + + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/templates".replaceAll("\\{format\\}","json"); + + List localVarQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json;charset=UTF-8" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json;charset=UTF-8" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + /** + * Create template context + * Create a unique template context for your environment + * @param templateRequest The template request (required) + * @return TemplateContextResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public TemplateContextResponse createTemplateContext(TemplateContextRequest templateRequest) throws ApiException { + ApiResponse resp = createTemplateContextWithHttpInfo(templateRequest); + return resp.getData(); + } + + /** + * Create template context + * Create a unique template context for your environment + * @param templateRequest The template request (required) + * @return ApiResponse<TemplateContextResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse createTemplateContextWithHttpInfo(TemplateContextRequest templateRequest) throws ApiException { + com.squareup.okhttp.Call call = createTemplateContextCall(templateRequest, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Create template context (asynchronously) + * Create a unique template context for your environment + * @param templateRequest The template request (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call createTemplateContextAsync(TemplateContextRequest templateRequest, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = createTemplateContextCall(templateRequest, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /* Build call for deleteDataSet */ + private com.squareup.okhttp.Call deleteDataSetCall(String dataSetId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'dataSetId' is set + if (dataSetId == null) { + throw new ApiException("Missing the required parameter 'dataSetId' when calling deleteDataSet(Async)"); + } + + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/datasets/{dataSetId}".replaceAll("\\{format\\}","json") + .replaceAll("\\{" + "dataSetId" + "\\}", apiClient.escapeString(dataSetId.toString())); + + List localVarQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json;charset=UTF-8" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + /** + * Delete a stored data set + * Delete a stored data set + * @param dataSetId dataSetId (required) + * @return DataSetResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public DataSetResponse deleteDataSet(String dataSetId) throws ApiException { + ApiResponse resp = deleteDataSetWithHttpInfo(dataSetId); + return resp.getData(); + } + + /** + * Delete a stored data set + * Delete a stored data set + * @param dataSetId dataSetId (required) + * @return ApiResponse<DataSetResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse deleteDataSetWithHttpInfo(String dataSetId) throws ApiException { + com.squareup.okhttp.Call call = deleteDataSetCall(dataSetId, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Delete a stored data set (asynchronously) + * Delete a stored data set + * @param dataSetId dataSetId (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call deleteDataSetAsync(String dataSetId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = deleteDataSetCall(dataSetId, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /* Build call for deleteJob */ + private com.squareup.okhttp.Call deleteJobCall(String jobId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException("Missing the required parameter 'jobId' when calling deleteJob(Async)"); + } + + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/jobs/{jobId}".replaceAll("\\{format\\}","json") + .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); + + List localVarQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json;charset=UTF-8" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + /** + * Delete a job manually + * Delete the merge job and all related files + * @param jobId jobId (required) + * @return MergeJobResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public MergeJobResponse deleteJob(String jobId) throws ApiException { + ApiResponse resp = deleteJobWithHttpInfo(jobId); + return resp.getData(); + } + + /** + * Delete a job manually + * Delete the merge job and all related files + * @param jobId jobId (required) + * @return ApiResponse<MergeJobResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse deleteJobWithHttpInfo(String jobId) throws ApiException { + com.squareup.okhttp.Call call = deleteJobCall(jobId, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Delete a job manually (asynchronously) + * Delete the merge job and all related files + * @param jobId jobId (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call deleteJobAsync(String jobId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = deleteJobCall(jobId, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /* Build call for deleteTemplateContext */ + private com.squareup.okhttp.Call deleteTemplateContextCall(String templateId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException("Missing the required parameter 'templateId' when calling deleteTemplateContext(Async)"); + } + + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/templates/{templateId}".replaceAll("\\{format\\}","json") + .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); + + List localVarQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json;charset=UTF-8" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + /** + * Delete template context + * Delete a template context with all history + * @param templateId templateId (required) + * @return TemplateContextResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public TemplateContextResponse deleteTemplateContext(String templateId) throws ApiException { + ApiResponse resp = deleteTemplateContextWithHttpInfo(templateId); + return resp.getData(); + } + + /** + * Delete template context + * Delete a template context with all history + * @param templateId templateId (required) + * @return ApiResponse<TemplateContextResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse deleteTemplateContextWithHttpInfo(String templateId) throws ApiException { + com.squareup.okhttp.Call call = deleteTemplateContextCall(templateId, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Delete template context (asynchronously) + * Delete a template context with all history + * @param templateId templateId (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call deleteTemplateContextAsync(String templateId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = deleteTemplateContextCall(templateId, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /* Build call for getJob */ + private com.squareup.okhttp.Call getJobCall(String jobId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException("Missing the required parameter 'jobId' when calling getJob(Async)"); + } + + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/jobs/{jobId}".replaceAll("\\{format\\}","json") + .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); + + List localVarQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json;charset=UTF-8" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + /** + * Job definition and state + * Get the merge job definition and current state. Please not that you can differentiate based on http response status + * @param jobId jobId (required) + * @return MergeJobResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public MergeJobResponse getJob(String jobId) throws ApiException { + ApiResponse resp = getJobWithHttpInfo(jobId); + return resp.getData(); + } + + /** + * Job definition and state + * Get the merge job definition and current state. Please not that you can differentiate based on http response status + * @param jobId jobId (required) + * @return ApiResponse<MergeJobResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getJobWithHttpInfo(String jobId) throws ApiException { + com.squareup.okhttp.Call call = getJobCall(jobId, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Job definition and state (asynchronously) + * Get the merge job definition and current state. Please not that you can differentiate based on http response status + * @param jobId jobId (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getJobAsync(String jobId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getJobCall(jobId, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /* Build call for getJobs */ + private com.squareup.okhttp.Call getJobsCall(List status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/jobs".replaceAll("\\{format\\}","json"); + + List localVarQueryParams = new ArrayList(); + if (status != null) + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "status", status)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json;charset=UTF-8" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + /** + * Get all jobs + * Get all office text job definitions and their current state. + * @param status A list of status to filter on. (optional) + * @return List<MergeJobResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List getJobs(List status) throws ApiException { + ApiResponse> resp = getJobsWithHttpInfo(status); + return resp.getData(); + } + + /** + * Get all jobs + * Get all office text job definitions and their current state. + * @param status A list of status to filter on. (optional) + * @return ApiResponse<List<MergeJobResponse>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> getJobsWithHttpInfo(List status) throws ApiException { + com.squareup.okhttp.Call call = getJobsCall(status, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get all jobs (asynchronously) + * Get all office text job definitions and their current state. + * @param status A list of status to filter on. (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getJobsAsync(List status, final ApiCallback> callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getJobsCall(status, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /* Build call for getResultStreamById */ + private com.squareup.okhttp.Call getResultStreamByIdCall(String jobId, String streamId, OutputSettings outputSettings, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = outputSettings; + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException("Missing the required parameter 'jobId' when calling getResultStreamById(Async)"); + } + + // verify the required parameter 'streamId' is set + if (streamId == null) { + throw new ApiException("Missing the required parameter 'streamId' when calling getResultStreamById(Async)"); + } + + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId}".replaceAll("\\{format\\}","json") + .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())) + .replaceAll("\\{" + "streamId" + "\\}", apiClient.escapeString(streamId.toString())); + + List localVarQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/octet-stream" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json;charset=UTF-8" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + /** + * Get the result file + * Get a merge result document as a binary stream. + * @param jobId jobId (required) + * @param streamId streamId (required) + * @param outputSettings outputSettings (optional) + * @return byte[] + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public byte[] getResultStreamById(String jobId, String streamId, OutputSettings outputSettings) throws ApiException { + ApiResponse resp = getResultStreamByIdWithHttpInfo(jobId, streamId, outputSettings); + return resp.getData(); + } + + /** + * Get the result file + * Get a merge result document as a binary stream. + * @param jobId jobId (required) + * @param streamId streamId (required) + * @param outputSettings outputSettings (optional) + * @return ApiResponse<byte[]> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getResultStreamByIdWithHttpInfo(String jobId, String streamId, OutputSettings outputSettings) throws ApiException { + com.squareup.okhttp.Call call = getResultStreamByIdCall(jobId, streamId, outputSettings, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get the result file (asynchronously) + * Get a merge result document as a binary stream. + * @param jobId jobId (required) + * @param streamId streamId (required) + * @param outputSettings outputSettings (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getResultStreamByIdAsync(String jobId, String streamId, OutputSettings outputSettings, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getResultStreamByIdCall(jobId, streamId, outputSettings, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /* Build call for getResultStreamsAsContainer */ + private com.squareup.okhttp.Call getResultStreamsAsContainerCall(String jobId, OutputSettings outputSettings, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = outputSettings; + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException("Missing the required parameter 'jobId' when calling getResultStreamsAsContainer(Async)"); + } + + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/jobs/{jobId}/result/container".replaceAll("\\{format\\}","json") + .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); + + List localVarQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/octet-stream" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json;charset=UTF-8" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + /** + * Get the result file + * Get all documents inside a compressed container as a binary stream. + * @param jobId jobId (required) + * @param outputSettings outputSettings (optional) + * @return byte[] + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public byte[] getResultStreamsAsContainer(String jobId, OutputSettings outputSettings) throws ApiException { + ApiResponse resp = getResultStreamsAsContainerWithHttpInfo(jobId, outputSettings); + return resp.getData(); + } + + /** + * Get the result file + * Get all documents inside a compressed container as a binary stream. + * @param jobId jobId (required) + * @param outputSettings outputSettings (optional) + * @return ApiResponse<byte[]> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getResultStreamsAsContainerWithHttpInfo(String jobId, OutputSettings outputSettings) throws ApiException { + com.squareup.okhttp.Call call = getResultStreamsAsContainerCall(jobId, outputSettings, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get the result file (asynchronously) + * Get all documents inside a compressed container as a binary stream. + * @param jobId jobId (required) + * @param outputSettings outputSettings (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getResultStreamsAsContainerAsync(String jobId, OutputSettings outputSettings, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getResultStreamsAsContainerCall(jobId, outputSettings, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /* Build call for getTemplateContext */ + private com.squareup.okhttp.Call getTemplateContextCall(String templateId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException("Missing the required parameter 'templateId' when calling getTemplateContext(Async)"); + } + + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/templates/{templateId}".replaceAll("\\{format\\}","json") + .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); + + List localVarQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json;charset=UTF-8" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + /** + * Get template context + * Get an existing template context + * @param templateId The template context name unique for your environment (required) + * @return TemplateContextResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public TemplateContextResponse getTemplateContext(String templateId) throws ApiException { + ApiResponse resp = getTemplateContextWithHttpInfo(templateId); + return resp.getData(); + } + + /** + * Get template context + * Get an existing template context + * @param templateId The template context name unique for your environment (required) + * @return ApiResponse<TemplateContextResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getTemplateContextWithHttpInfo(String templateId) throws ApiException { + com.squareup.okhttp.Call call = getTemplateContextCall(templateId, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get template context (asynchronously) + * Get an existing template context + * @param templateId The template context name unique for your environment (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getTemplateContextAsync(String templateId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getTemplateContextCall(templateId, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /* Build call for submitJob */ + private com.squareup.okhttp.Call submitJobCall(MergeSettings mergesettings, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = mergesettings; + + // verify the required parameter 'mergesettings' is set + if (mergesettings == null) { + throw new ApiException("Missing the required parameter 'mergesettings' when calling submitJob(Async)"); + } + + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/jobs".replaceAll("\\{format\\}","json"); + + List localVarQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json;charset=UTF-8" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json;charset=UTF-8" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + /** + * Submit merge job for processing + * Submit merge job run. + * @param mergesettings The merge- and output settings (required) + * @return MergeJobResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public MergeJobResponse submitJob(MergeSettings mergesettings) throws ApiException { + ApiResponse resp = submitJobWithHttpInfo(mergesettings); + return resp.getData(); + } + + /** + * Submit merge job for processing + * Submit merge job run. + * @param mergesettings The merge- and output settings (required) + * @return ApiResponse<MergeJobResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse submitJobWithHttpInfo(MergeSettings mergesettings) throws ApiException { + com.squareup.okhttp.Call call = submitJobCall(mergesettings, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Submit merge job for processing (asynchronously) + * Submit merge job run. + * @param mergesettings The merge- and output settings (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call submitJobAsync(MergeSettings mergesettings, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = submitJobCall(mergesettings, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /* Build call for updateTemplateContext */ + private com.squareup.okhttp.Call updateTemplateContextCall(TemplateContextRequest templateContextRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = templateContextRequest; + + // verify the required parameter 'templateContextRequest' is set + if (templateContextRequest == null) { + throw new ApiException("Missing the required parameter 'templateContextRequest' when calling updateTemplateContext(Async)"); + } + + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/templates".replaceAll("\\{format\\}","json"); + + List localVarQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json;charset=UTF-8" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json;charset=UTF-8" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + /** + * Update template context + * Update an existing template context for your environment + * @param templateContextRequest templateContextRequest (required) + * @return TemplateContextResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public TemplateContextResponse updateTemplateContext(TemplateContextRequest templateContextRequest) throws ApiException { + ApiResponse resp = updateTemplateContextWithHttpInfo(templateContextRequest); + return resp.getData(); + } + + /** + * Update template context + * Update an existing template context for your environment + * @param templateContextRequest templateContextRequest (required) + * @return ApiResponse<TemplateContextResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse updateTemplateContextWithHttpInfo(TemplateContextRequest templateContextRequest) throws ApiException { + com.squareup.okhttp.Call call = updateTemplateContextCall(templateContextRequest, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Update template context (asynchronously) + * Update an existing template context for your environment + * @param templateContextRequest templateContextRequest (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call updateTemplateContextAsync(TemplateContextRequest templateContextRequest, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = updateTemplateContextCall(templateContextRequest, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /* Build call for uploadTemplateFile */ + private com.squareup.okhttp.Call uploadTemplateFileCall(String templateId, File stream, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException("Missing the required parameter 'templateId' when calling uploadTemplateFile(Async)"); + } + + // verify the required parameter 'stream' is set + if (stream == null) { + throw new ApiException("Missing the required parameter 'stream' when calling uploadTemplateFile(Async)"); + } + + + // create path and map variables + String localVarPath = "/template-processor/merge/0.1/templates/{templateId}".replaceAll("\\{format\\}","json") + .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); + + List localVarQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + if (stream != null) + localVarFormParams.put("stream", stream); + + final String[] localVarAccepts = { + "application/json;charset=UTF-8" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "oauth2schema" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + /** + * Upload template file + * Upload the Office template file + * @param templateId The template context name unique for your environment (required) + * @param stream The template (file/inputstream) to store (required) + * @return TemplateContextResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public TemplateContextResponse uploadTemplateFile(String templateId, File stream) throws ApiException { + ApiResponse resp = uploadTemplateFileWithHttpInfo(templateId, stream); + return resp.getData(); + } + + /** + * Upload template file + * Upload the Office template file + * @param templateId The template context name unique for your environment (required) + * @param stream The template (file/inputstream) to store (required) + * @return ApiResponse<TemplateContextResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse uploadTemplateFileWithHttpInfo(String templateId, File stream) throws ApiException { + com.squareup.okhttp.Call call = uploadTemplateFileCall(templateId, stream, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Upload template file (asynchronously) + * Upload the Office template file + * @param templateId The template context name unique for your environment (required) + * @param stream The template (file/inputstream) to store (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call uploadTemplateFileAsync(String templateId, File stream, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = uploadTemplateFileCall(templateId, stream, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } +} diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiCallback.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiCallback.java new file mode 100644 index 0000000..70917be --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiCallback.java @@ -0,0 +1,74 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler; + +import java.io.IOException; + +import java.util.Map; +import java.util.List; + +/** + * Callback for asynchronous API call. + * + * @param The return type + */ +public interface ApiCallback { + /** + * This is called when the API call fails. + * + * @param e The exception causing the failure + * @param statusCode Status code of the response if available, otherwise it would be 0 + * @param responseHeaders Headers of the response if available, otherwise it would be null + */ + void onFailure(ApiException e, int statusCode, Map> responseHeaders); + + /** + * This is called when the API call succeeded. + * + * @param result The result deserialized from response + * @param statusCode Status code of the response + * @param responseHeaders Headers of the response + */ + void onSuccess(T result, int statusCode, Map> responseHeaders); + + /** + * This is called when the API upload processing. + * + * @param bytesWritten bytes Written + * @param contentLength content length of request body + * @param done write end + */ + void onUploadProgress(long bytesWritten, long contentLength, boolean done); + + /** + * This is called when the API downlond processing. + * + * @param bytesRead bytes Read + * @param contentLength content lenngth of the response + * @param done Read end + */ + void onDownloadProgress(long bytesRead, long contentLength, boolean done); +} diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java new file mode 100644 index 0000000..a9cc272 --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java @@ -0,0 +1,1325 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler; + +import com.squareup.okhttp.Call; +import com.squareup.okhttp.Callback; +import com.squareup.okhttp.OkHttpClient; +import com.squareup.okhttp.Request; +import com.squareup.okhttp.Response; +import com.squareup.okhttp.RequestBody; +import com.squareup.okhttp.FormEncodingBuilder; +import com.squareup.okhttp.MultipartBuilder; +import com.squareup.okhttp.MediaType; +import com.squareup.okhttp.Headers; +import com.squareup.okhttp.internal.http.HttpMethod; +import com.squareup.okhttp.logging.HttpLoggingInterceptor; +import com.squareup.okhttp.logging.HttpLoggingInterceptor.Level; + +import java.lang.reflect.Type; + +import java.util.Collection; +import java.util.Collections; +import java.util.Map; +import java.util.Map.Entry; +import java.util.HashMap; +import java.util.List; +import java.util.ArrayList; +import java.util.Date; +import java.util.TimeZone; +import java.util.concurrent.TimeUnit; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import java.net.URLEncoder; +import java.net.URLConnection; + +import java.io.File; +import java.io.InputStream; +import java.io.IOException; +import java.io.UnsupportedEncodingException; + +import java.security.GeneralSecurityException; +import java.security.KeyStore; +import java.security.SecureRandom; +import java.security.cert.Certificate; +import java.security.cert.CertificateException; +import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.text.ParseException; + +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.KeyManager; +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLSession; +import javax.net.ssl.TrustManager; +import javax.net.ssl.TrustManagerFactory; +import javax.net.ssl.X509TrustManager; + +import okio.BufferedSink; +import okio.Okio; + +import com.sphereon.sdk.template_processor.handler.auth.Authentication; +import com.sphereon.sdk.template_processor.handler.auth.HttpBasicAuth; +import com.sphereon.sdk.template_processor.handler.auth.ApiKeyAuth; +import com.sphereon.sdk.template_processor.handler.auth.OAuth; + +public class ApiClient { + public static final double JAVA_VERSION; + public static final boolean IS_ANDROID; + public static final int ANDROID_SDK_VERSION; + + static { + JAVA_VERSION = Double.parseDouble(System.getProperty("java.specification.version")); + boolean isAndroid; + try { + Class.forName("android.app.Activity"); + isAndroid = true; + } catch (ClassNotFoundException e) { + isAndroid = false; + } + IS_ANDROID = isAndroid; + int sdkVersion = 0; + if (IS_ANDROID) { + try { + sdkVersion = Class.forName("android.os.Build$VERSION").getField("SDK_INT").getInt(null); + } catch (Exception e) { + try { + sdkVersion = Integer.parseInt((String) Class.forName("android.os.Build$VERSION").getField("SDK").get(null)); + } catch (Exception e2) { } + } + } + ANDROID_SDK_VERSION = sdkVersion; + } + + /** + * The datetime format to be used when lenientDatetimeFormat is enabled. + */ + public static final String LENIENT_DATETIME_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ"; + + private String basePath = "https://gw.api.cloud.sphereon.com/"; + private boolean lenientOnJson = false; + private boolean debugging = false; + private Map defaultHeaderMap = new HashMap(); + private String tempFolderPath = null; + + private Map authentications; + + private DateFormat dateFormat; + private DateFormat datetimeFormat; + private boolean lenientDatetimeFormat; + private int dateLength; + + private InputStream sslCaCert; + private boolean verifyingSsl; + + private OkHttpClient httpClient; + private JSON json; + + private HttpLoggingInterceptor loggingInterceptor; + + /* + * Constructor for ApiClient + */ + public ApiClient() { + httpClient = new OkHttpClient(); + + verifyingSsl = true; + + json = new JSON(this); + + /* + * Use RFC3339 format for date and datetime. + * See http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14 + */ + this.dateFormat = new SimpleDateFormat("yyyy-MM-dd"); + // Always use UTC as the default time zone when dealing with date (without time). + this.dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); + initDatetimeFormat(); + + // Be lenient on datetime formats when parsing datetime from string. + // See parseDatetime. + this.lenientDatetimeFormat = true; + + // Set default User-Agent. + setUserAgent("Swagger-Codegen/0.1.0/java"); + + // Setup authentications (key: authentication name, value: authentication). + authentications = new HashMap(); + authentications.put("oauth2schema", new OAuth()); + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + /** + * Get base path + * + * @return Baes path + */ + public String getBasePath() { + return basePath; + } + + /** + * Set base path + * + * @param basePath Base path of the URL (e.g https://gw.api.cloud.sphereon.com/ + * @return An instance of OkHttpClient + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + return this; + } + + /** + * Get HTTP client + * + * @return An instance of OkHttpClient + */ + public OkHttpClient getHttpClient() { + return httpClient; + } + + /** + * Set HTTP client + * + * @param httpClient An instance of OkHttpClient + * @return Api Client + */ + public ApiClient setHttpClient(OkHttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /** + * Get JSON + * + * @return JSON object + */ + public JSON getJSON() { + return json; + } + + /** + * Set JSON + * + * @param json JSON object + * @return Api client + */ + public ApiClient setJSON(JSON json) { + this.json = json; + return this; + } + + /** + * True if isVerifyingSsl flag is on + * + * @return True if isVerifySsl flag is on + */ + public boolean isVerifyingSsl() { + return verifyingSsl; + } + + /** + * Configure whether to verify certificate and hostname when making https requests. + * Default to true. + * NOTE: Do NOT set to false in production code, otherwise you would face multiple types of cryptographic attacks. + * + * @param verifyingSsl True to verify TLS/SSL connection + * @return ApiClient + */ + public ApiClient setVerifyingSsl(boolean verifyingSsl) { + this.verifyingSsl = verifyingSsl; + applySslSettings(); + return this; + } + + /** + * Get SSL CA cert. + * + * @return Input stream to the SSL CA cert + */ + public InputStream getSslCaCert() { + return sslCaCert; + } + + /** + * Configure the CA certificate to be trusted when making https requests. + * Use null to reset to default. + * + * @param sslCaCert input stream for SSL CA cert + * @return ApiClient + */ + public ApiClient setSslCaCert(InputStream sslCaCert) { + this.sslCaCert = sslCaCert; + applySslSettings(); + return this; + } + + public DateFormat getDateFormat() { + return dateFormat; + } + + public ApiClient setDateFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + this.dateLength = this.dateFormat.format(new Date()).length(); + return this; + } + + public DateFormat getDatetimeFormat() { + return datetimeFormat; + } + + public ApiClient setDatetimeFormat(DateFormat datetimeFormat) { + this.datetimeFormat = datetimeFormat; + return this; + } + + /** + * Whether to allow various ISO 8601 datetime formats when parsing a datetime string. + * @see #parseDatetime(String) + * @return True if lenientDatetimeFormat flag is set to true + */ + public boolean isLenientDatetimeFormat() { + return lenientDatetimeFormat; + } + + public ApiClient setLenientDatetimeFormat(boolean lenientDatetimeFormat) { + this.lenientDatetimeFormat = lenientDatetimeFormat; + return this; + } + + /** + * Parse the given date string into Date object. + * The default dateFormat supports these ISO 8601 date formats: + * 2015-08-16 + * 2015-8-16 + * @param str String to be parsed + * @return Date + */ + public Date parseDate(String str) { + if (str == null) + return null; + try { + return dateFormat.parse(str); + } catch (ParseException e) { + throw new RuntimeException(e); + } + } + + /** + * Parse the given datetime string into Date object. + * When lenientDatetimeFormat is enabled, the following ISO 8601 datetime formats are supported: + * 2015-08-16T08:20:05Z + * 2015-8-16T8:20:05Z + * 2015-08-16T08:20:05+00:00 + * 2015-08-16T08:20:05+0000 + * 2015-08-16T08:20:05.376Z + * 2015-08-16T08:20:05.376+00:00 + * 2015-08-16T08:20:05.376+00 + * Note: The 3-digit milli-seconds is optional. Time zone is required and can be in one of + * these formats: + * Z (same with +0000) + * +08:00 (same with +0800) + * -02 (same with -0200) + * -0200 + * @see ISO 8601 + * @param str Date time string to be parsed + * @return Date representation of the string + */ + public Date parseDatetime(String str) { + if (str == null) + return null; + + DateFormat format; + if (lenientDatetimeFormat) { + /* + * When lenientDatetimeFormat is enabled, normalize the date string + * into LENIENT_DATETIME_FORMAT to support various formats + * defined by ISO 8601. + */ + // normalize time zone + // trailing "Z": 2015-08-16T08:20:05Z => 2015-08-16T08:20:05+0000 + str = str.replaceAll("[zZ]\\z", "+0000"); + // remove colon in time zone: 2015-08-16T08:20:05+00:00 => 2015-08-16T08:20:05+0000 + str = str.replaceAll("([+-]\\d{2}):(\\d{2})\\z", "$1$2"); + // expand time zone: 2015-08-16T08:20:05+00 => 2015-08-16T08:20:05+0000 + str = str.replaceAll("([+-]\\d{2})\\z", "$100"); + // add milliseconds when missing + // 2015-08-16T08:20:05+0000 => 2015-08-16T08:20:05.000+0000 + str = str.replaceAll("(:\\d{1,2})([+-]\\d{4})\\z", "$1.000$2"); + format = new SimpleDateFormat(LENIENT_DATETIME_FORMAT); + } else { + format = this.datetimeFormat; + } + + try { + return format.parse(str); + } catch (ParseException e) { + throw new RuntimeException(e); + } + } + + /* + * Parse date or date time in string format into Date object. + * + * @param str Date time string to be parsed + * @return Date representation of the string + */ + public Date parseDateOrDatetime(String str) { + if (str == null) + return null; + else if (str.length() <= dateLength) + return parseDate(str); + else + return parseDatetime(str); + } + + /** + * Format the given Date object into string (Date format). + * + * @param date Date object + * @return Formatted date in string representation + */ + public String formatDate(Date date) { + return dateFormat.format(date); + } + + /** + * Format the given Date object into string (Datetime format). + * + * @param date Date object + * @return Formatted datetime in string representation + */ + public String formatDatetime(Date date) { + return datetimeFormat.format(date); + } + + /** + * Get authentications (key: authentication name, value: authentication). + * + * @return Map of authentication objects + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + /** + * Helper method to set username for the first HTTP basic authentication. + * + * @param username Username + */ + public void setUsername(String username) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setUsername(username); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set password for the first HTTP basic authentication. + * + * @param password Password + */ + public void setPassword(String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setPassword(password); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set API key value for the first API key authentication. + * + * @param apiKey API key + */ + public void setApiKey(String apiKey) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKey(apiKey); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set API key prefix for the first API key authentication. + * + * @param apiKeyPrefix API key prefix + */ + public void setApiKeyPrefix(String apiKeyPrefix) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set access token for the first OAuth2 authentication. + * + * @param accessToken Access token + */ + public void setAccessToken(String accessToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof OAuth) { + ((OAuth) auth).setAccessToken(accessToken); + return; + } + } + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Set the User-Agent header's value (by adding to the default header map). + * + * @param userAgent HTTP request's user agent + * @return ApiClient + */ + public ApiClient setUserAgent(String userAgent) { + addDefaultHeader("User-Agent", userAgent); + return this; + } + + /** + * Add a default header. + * + * @param key The header's key + * @param value The header's value + * @return ApiClient + */ + public ApiClient addDefaultHeader(String key, String value) { + defaultHeaderMap.put(key, value); + return this; + } + + /** + * @see setLenient + * + * @return True if lenientOnJson is enabled, false otherwise. + */ + public boolean isLenientOnJson() { + return lenientOnJson; + } + + /** + * Set LenientOnJson + * + * @param lenient True to enable lenientOnJson + * @return ApiClient + */ + public ApiClient setLenientOnJson(boolean lenient) { + this.lenientOnJson = lenient; + return this; + } + + /** + * Check that whether debugging is enabled for this API client. + * + * @return True if debugging is enabled, false otherwise. + */ + public boolean isDebugging() { + return debugging; + } + + /** + * Enable/disable debugging for this API client. + * + * @param debugging To enable (true) or disable (false) debugging + * @return ApiClient + */ + public ApiClient setDebugging(boolean debugging) { + if (debugging != this.debugging) { + if (debugging) { + loggingInterceptor = new HttpLoggingInterceptor(); + loggingInterceptor.setLevel(Level.BODY); + httpClient.interceptors().add(loggingInterceptor); + } else { + httpClient.interceptors().remove(loggingInterceptor); + loggingInterceptor = null; + } + } + this.debugging = debugging; + return this; + } + + /** + * The path of temporary folder used to store downloaded files from endpoints + * with file response. The default value is null, i.e. using + * the system's default tempopary folder. + * + * @see createTempFile + * @return Temporary folder path + */ + public String getTempFolderPath() { + return tempFolderPath; + } + + /** + * Set the tempoaray folder path (for downloading files) + * + * @param tempFolderPath Temporary folder path + * @return ApiClient + */ + public ApiClient setTempFolderPath(String tempFolderPath) { + this.tempFolderPath = tempFolderPath; + return this; + } + + /** + * Get connection timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public int getConnectTimeout() { + return httpClient.getConnectTimeout(); + } + + /** + * Sets the connect timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * + * @param connectionTimeout connection timeout in milliseconds + * @return Api client + */ + public ApiClient setConnectTimeout(int connectionTimeout) { + httpClient.setConnectTimeout(connectionTimeout, TimeUnit.MILLISECONDS); + return this; + } + + /** + * Format the given parameter object into string. + * + * @param param Parameter + * @return String representation of the parameter + */ + public String parameterToString(Object param) { + if (param == null) { + return ""; + } else if (param instanceof Date) { + return formatDatetime((Date) param); + } else if (param instanceof Collection) { + StringBuilder b = new StringBuilder(); + for (Object o : (Collection)param) { + if (b.length() > 0) { + b.append(","); + } + b.append(String.valueOf(o)); + } + return b.toString(); + } else { + return String.valueOf(param); + } + } + + /** + * Format to {@code Pair} objects. + * + * @param collectionFormat collection format (e.g. csv, tsv) + * @param name Name + * @param value Value + * @return A list of Pair objects + */ + public List parameterToPairs(String collectionFormat, String name, Object value){ + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null) return params; + + Collection valueCollection = null; + if (value instanceof Collection) { + valueCollection = (Collection) value; + } else { + params.add(new Pair(name, parameterToString(value))); + return params; + } + + if (valueCollection.isEmpty()){ + return params; + } + + // get the collection format + collectionFormat = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat); // default: csv + + // create the params based on the collection format + if (collectionFormat.equals("multi")) { + for (Object item : valueCollection) { + params.add(new Pair(name, parameterToString(item))); + } + + return params; + } + + String delimiter = ","; + + if (collectionFormat.equals("csv")) { + delimiter = ","; + } else if (collectionFormat.equals("ssv")) { + delimiter = " "; + } else if (collectionFormat.equals("tsv")) { + delimiter = "\t"; + } else if (collectionFormat.equals("pipes")) { + delimiter = "|"; + } + + StringBuilder sb = new StringBuilder() ; + for (Object item : valueCollection) { + sb.append(delimiter); + sb.append(parameterToString(item)); + } + + params.add(new Pair(name, sb.substring(1))); + + return params; + } + + /** + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif + * + * @param filename The filename to be sanitized + * @return The sanitized filename + */ + public String sanitizeFilename(String filename) { + return filename.replaceAll(".*[/\\\\]", ""); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * + * @param mime MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public boolean isJsonMime(String mime) { + return mime != null && mime.matches("(?i)application\\/json(;.*)?"); + } + + /** + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) + * + * @param accepts The accepts array to select from + * @return The Accept header to use. If the given array is empty, + * null will be returned (not to set the Accept header explicitly). + */ + public String selectHeaderAccept(String[] accepts) { + if (accepts.length == 0) { + return null; + } + for (String accept : accepts) { + if (isJsonMime(accept)) { + return accept; + } + } + return StringUtil.join(accepts, ","); + } + + /** + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. + * + * @param contentTypes The Content-Type array to select from + * @return The Content-Type header to use. If the given array is empty, + * JSON will be used. + */ + public String selectHeaderContentType(String[] contentTypes) { + if (contentTypes.length == 0) { + return "application/json"; + } + for (String contentType : contentTypes) { + if (isJsonMime(contentType)) { + return contentType; + } + } + return contentTypes[0]; + } + + /** + * Escape the given string to be used as URL query value. + * + * @param str String to be escaped + * @return Escaped string + */ + public String escapeString(String str) { + try { + return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); + } catch (UnsupportedEncodingException e) { + return str; + } + } + + /** + * Deserialize response body to Java object, according to the return type and + * the Content-Type response header. + * + * @param Type + * @param response HTTP response + * @param returnType The type of the Java object + * @return The deserialized Java object + * @throws ApiException If fail to deserialize response body, i.e. cannot read response body + * or the Content-Type of the response is not supported. + */ + @SuppressWarnings("unchecked") + public T deserialize(Response response, Type returnType) throws ApiException { + if (response == null || returnType == null) { + return null; + } + + if ("byte[]".equals(returnType.toString())) { + // Handle binary response (byte array). + try { + return (T) response.body().bytes(); + } catch (IOException e) { + throw new ApiException(e); + } + } else if (returnType.equals(File.class)) { + // Handle file downloading. + return (T) downloadFileFromResponse(response); + } + + String respBody; + try { + if (response.body() != null) + respBody = response.body().string(); + else + respBody = null; + } catch (IOException e) { + throw new ApiException(e); + } + + if (respBody == null || "".equals(respBody)) { + return null; + } + + String contentType = response.headers().get("Content-Type"); + if (contentType == null) { + // ensuring a default content type + contentType = "application/json"; + } + if (isJsonMime(contentType)) { + return json.deserialize(respBody, returnType); + } else if (returnType.equals(String.class)) { + // Expecting string, return the raw response body. + return (T) respBody; + } else { + throw new ApiException( + "Content type \"" + contentType + "\" is not supported for type: " + returnType, + response.code(), + response.headers().toMultimap(), + respBody); + } + } + + /** + * Serialize the given Java object into request body according to the object's + * class and the request Content-Type. + * + * @param obj The Java object + * @param contentType The request Content-Type + * @return The serialized request body + * @throws ApiException If fail to serialize the given object + */ + public RequestBody serialize(Object obj, String contentType) throws ApiException { + if (obj instanceof byte[]) { + // Binary (byte array) body parameter support. + return RequestBody.create(MediaType.parse(contentType), (byte[]) obj); + } else if (obj instanceof File) { + // File body parameter support. + return RequestBody.create(MediaType.parse(contentType), (File) obj); + } else if (isJsonMime(contentType)) { + String content; + if (obj != null) { + content = json.serialize(obj); + } else { + content = null; + } + return RequestBody.create(MediaType.parse(contentType), content); + } else { + throw new ApiException("Content type \"" + contentType + "\" is not supported"); + } + } + + /** + * Download file from the given response. + * + * @param response An instance of the Response object + * @throws ApiException If fail to read file content from response and write to disk + * @return Downloaded file + */ + public File downloadFileFromResponse(Response response) throws ApiException { + try { + File file = prepareDownloadFile(response); + BufferedSink sink = Okio.buffer(Okio.sink(file)); + sink.writeAll(response.body().source()); + sink.close(); + return file; + } catch (IOException e) { + throw new ApiException(e); + } + } + + /** + * Prepare file for download + * + * @param response An instance of the Response object + * @throws IOException If fail to prepare file for download + * @return Prepared file for the download + */ + public File prepareDownloadFile(Response response) throws IOException { + String filename = null; + String contentDisposition = response.header("Content-Disposition"); + if (contentDisposition != null && !"".equals(contentDisposition)) { + // Get filename from the Content-Disposition header. + Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); + Matcher matcher = pattern.matcher(contentDisposition); + if (matcher.find()) { + filename = sanitizeFilename(matcher.group(1)); + } + } + + String prefix = null; + String suffix = null; + if (filename == null) { + prefix = "download-"; + suffix = ""; + } else { + int pos = filename.lastIndexOf("."); + if (pos == -1) { + prefix = filename + "-"; + } else { + prefix = filename.substring(0, pos) + "-"; + suffix = filename.substring(pos); + } + // File.createTempFile requires the prefix to be at least three characters long + if (prefix.length() < 3) + prefix = "download-"; + } + + if (tempFolderPath == null) + return File.createTempFile(prefix, suffix); + else + return File.createTempFile(prefix, suffix, new File(tempFolderPath)); + } + + /** + * {@link #execute(Call, Type)} + * + * @param Type + * @param call An instance of the Call object + * @throws ApiException If fail to execute the call + * @return ApiResponse<T> + */ + public ApiResponse execute(Call call) throws ApiException { + return execute(call, null); + } + + /** + * Execute HTTP call and deserialize the HTTP response body into the given return type. + * + * @param returnType The return type used to deserialize HTTP response body + * @param The return type corresponding to (same with) returnType + * @param call Call + * @return ApiResponse object containing response status, headers and + * data, which is a Java object deserialized from response body and would be null + * when returnType is null. + * @throws ApiException If fail to execute the call + */ + public ApiResponse execute(Call call, Type returnType) throws ApiException { + try { + Response response = call.execute(); + T data = handleResponse(response, returnType); + return new ApiResponse(response.code(), response.headers().toMultimap(), data); + } catch (IOException e) { + throw new ApiException(e); + } + } + + /** + * {@link #executeAsync(Call, Type, ApiCallback)} + * + * @param Type + * @param call An instance of the Call object + * @param callback ApiCallback<T> + */ + public void executeAsync(Call call, ApiCallback callback) { + executeAsync(call, null, callback); + } + + /** + * Execute HTTP call asynchronously. + * + * @see #execute(Call, Type) + * @param Type + * @param call The callback to be executed when the API call finishes + * @param returnType Return type + * @param callback ApiCallback + */ + @SuppressWarnings("unchecked") + public void executeAsync(Call call, final Type returnType, final ApiCallback callback) { + call.enqueue(new Callback() { + @Override + public void onFailure(Request request, IOException e) { + callback.onFailure(new ApiException(e), 0, null); + } + + @Override + public void onResponse(Response response) throws IOException { + T result; + try { + result = (T) handleResponse(response, returnType); + } catch (ApiException e) { + callback.onFailure(e, response.code(), response.headers().toMultimap()); + return; + } + callback.onSuccess(result, response.code(), response.headers().toMultimap()); + } + }); + } + + /** + * Handle the given response, return the deserialized object when the response is successful. + * + * @param Type + * @param response Response + * @param returnType Return type + * @throws ApiException If the response has a unsuccessful status code or + * fail to deserialize the response body + * @return Type + */ + public T handleResponse(Response response, Type returnType) throws ApiException { + if (response.isSuccessful()) { + if (returnType == null || response.code() == 204) { + // returning null if the returnType is not defined, + // or the status code is 204 (No Content) + return null; + } else { + return deserialize(response, returnType); + } + } else { + String respBody = null; + if (response.body() != null) { + try { + respBody = response.body().string(); + } catch (IOException e) { + throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); + } + } + throw new ApiException(response.message(), response.code(), response.headers().toMultimap(), respBody); + } + } + + /** + * Build HTTP call with the given options. + * + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" + * @param queryParams The query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param formParams The form parameters + * @param authNames The authentications to apply + * @param progressRequestListener Progress request listener + * @return The HTTP call + * @throws ApiException If fail to serialize the request body object + */ + public Call buildCall(String path, String method, List queryParams, Object body, Map headerParams, Map formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + updateParamsForAuth(authNames, queryParams, headerParams); + + final String url = buildUrl(path, queryParams); + final Request.Builder reqBuilder = new Request.Builder().url(url); + processHeaderParams(headerParams, reqBuilder); + + String contentType = (String) headerParams.get("Content-Type"); + // ensuring a default content type + if (contentType == null) { + contentType = "application/json"; + } + + RequestBody reqBody; + if (!HttpMethod.permitsRequestBody(method)) { + reqBody = null; + } else if ("application/x-www-form-urlencoded".equals(contentType)) { + reqBody = buildRequestBodyFormEncoding(formParams); + } else if ("multipart/form-data".equals(contentType)) { + reqBody = buildRequestBodyMultipart(formParams); + } else if (body == null) { + if ("DELETE".equals(method)) { + // allow calling DELETE without sending a request body + reqBody = null; + } else { + // use an empty request body (for POST, PUT and PATCH) + reqBody = RequestBody.create(MediaType.parse(contentType), ""); + } + } else { + reqBody = serialize(body, contentType); + } + + Request request = null; + + if(progressRequestListener != null && reqBody != null) { + ProgressRequestBody progressRequestBody = new ProgressRequestBody(reqBody, progressRequestListener); + request = reqBuilder.method(method, progressRequestBody).build(); + } else { + request = reqBuilder.method(method, reqBody).build(); + } + + return httpClient.newCall(request); + } + + /** + * Build full URL by concatenating base path, the given sub path and query parameters. + * + * @param path The sub path + * @param queryParams The query parameters + * @return The full URL + */ + public String buildUrl(String path, List queryParams) { + final StringBuilder url = new StringBuilder(); + url.append(basePath).append(path); + + if (queryParams != null && !queryParams.isEmpty()) { + // support (constant) query string in `path`, e.g. "/posts?draft=1" + String prefix = path.contains("?") ? "&" : "?"; + for (Pair param : queryParams) { + if (param.getValue() != null) { + if (prefix != null) { + url.append(prefix); + prefix = null; + } else { + url.append("&"); + } + String value = parameterToString(param.getValue()); + url.append(escapeString(param.getName())).append("=").append(escapeString(value)); + } + } + } + + return url.toString(); + } + + /** + * Set header parameters to the request builder, including default headers. + * + * @param headerParams Header parameters in the ofrm of Map + * @param reqBuilder Reqeust.Builder + */ + public void processHeaderParams(Map headerParams, Request.Builder reqBuilder) { + for (Entry param : headerParams.entrySet()) { + reqBuilder.header(param.getKey(), parameterToString(param.getValue())); + } + for (Entry header : defaultHeaderMap.entrySet()) { + if (!headerParams.containsKey(header.getKey())) { + reqBuilder.header(header.getKey(), parameterToString(header.getValue())); + } + } + } + + /** + * Update query and header parameters based on authentication settings. + * + * @param authNames The authentications to apply + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + */ + public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams) { + for (String authName : authNames) { + Authentication auth = authentications.get(authName); + if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); + auth.applyToParams(queryParams, headerParams); + } + } + + /** + * Build a form-encoding request body with the given form parameters. + * + * @param formParams Form parameters in the form of Map + * @return RequestBody + */ + public RequestBody buildRequestBodyFormEncoding(Map formParams) { + FormEncodingBuilder formBuilder = new FormEncodingBuilder(); + for (Entry param : formParams.entrySet()) { + formBuilder.add(param.getKey(), parameterToString(param.getValue())); + } + return formBuilder.build(); + } + + /** + * Build a multipart (file uploading) request body with the given form parameters, + * which could contain text fields and file fields. + * + * @param formParams Form parameters in the form of Map + * @return RequestBody + */ + public RequestBody buildRequestBodyMultipart(Map formParams) { + MultipartBuilder mpBuilder = new MultipartBuilder().type(MultipartBuilder.FORM); + for (Entry param : formParams.entrySet()) { + if (param.getValue() instanceof File) { + File file = (File) param.getValue(); + Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\"; filename=\"" + file.getName() + "\""); + MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); + mpBuilder.addPart(partHeaders, RequestBody.create(mediaType, file)); + } else { + Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\""); + mpBuilder.addPart(partHeaders, RequestBody.create(null, parameterToString(param.getValue()))); + } + } + return mpBuilder.build(); + } + + /** + * Guess Content-Type header from the given file (defaults to "application/octet-stream"). + * + * @param file The given file + * @return The guessed Content-Type + */ + public String guessContentTypeFromFile(File file) { + String contentType = URLConnection.guessContentTypeFromName(file.getName()); + if (contentType == null) { + return "application/octet-stream"; + } else { + return contentType; + } + } + + /** + * Initialize datetime format according to the current environment, e.g. Java 1.7 and Android. + */ + private void initDatetimeFormat() { + String formatWithTimeZone = null; + if (IS_ANDROID) { + if (ANDROID_SDK_VERSION >= 18) { + // The time zone format "ZZZZZ" is available since Android 4.3 (SDK version 18) + formatWithTimeZone = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ"; + } + } else if (JAVA_VERSION >= 1.7) { + // The time zone format "XXX" is available since Java 1.7 + formatWithTimeZone = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"; + } + if (formatWithTimeZone != null) { + this.datetimeFormat = new SimpleDateFormat(formatWithTimeZone); + // NOTE: Use the system's default time zone (mainly for datetime formatting). + } else { + // Use a common format that works across all systems. + this.datetimeFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); + // Always use the UTC time zone as we are using a constant trailing "Z" here. + this.datetimeFormat.setTimeZone(TimeZone.getTimeZone("UTC")); + } + } + + /** + * Apply SSL related settings to httpClient according to the current values of + * verifyingSsl and sslCaCert. + */ + private void applySslSettings() { + try { + KeyManager[] keyManagers = null; + TrustManager[] trustManagers = null; + HostnameVerifier hostnameVerifier = null; + if (!verifyingSsl) { + TrustManager trustAll = new X509TrustManager() { + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {} + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {} + @Override + public X509Certificate[] getAcceptedIssuers() { return null; } + }; + SSLContext sslContext = SSLContext.getInstance("TLS"); + trustManagers = new TrustManager[]{ trustAll }; + hostnameVerifier = new HostnameVerifier() { + @Override + public boolean verify(String hostname, SSLSession session) { return true; } + }; + } else if (sslCaCert != null) { + char[] password = null; // Any password will work. + CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); + Collection certificates = certificateFactory.generateCertificates(sslCaCert); + if (certificates.isEmpty()) { + throw new IllegalArgumentException("expected non-empty set of trusted certificates"); + } + KeyStore caKeyStore = newEmptyKeyStore(password); + int index = 0; + for (Certificate certificate : certificates) { + String certificateAlias = "ca" + Integer.toString(index++); + caKeyStore.setCertificateEntry(certificateAlias, certificate); + } + TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); + trustManagerFactory.init(caKeyStore); + trustManagers = trustManagerFactory.getTrustManagers(); + } + + if (keyManagers != null || trustManagers != null) { + SSLContext sslContext = SSLContext.getInstance("TLS"); + sslContext.init(keyManagers, trustManagers, new SecureRandom()); + httpClient.setSslSocketFactory(sslContext.getSocketFactory()); + } else { + httpClient.setSslSocketFactory(null); + } + httpClient.setHostnameVerifier(hostnameVerifier); + } catch (GeneralSecurityException e) { + throw new RuntimeException(e); + } + } + + private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { + try { + KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); + keyStore.load(null, password); + return keyStore; + } catch (IOException e) { + throw new AssertionError(e); + } + } +} diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiException.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiException.java new file mode 100644 index 0000000..0743cb2 --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiException.java @@ -0,0 +1,103 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler; + +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:04.861+02:00") +public class ApiException extends Exception { + private int code = 0; + private Map> responseHeaders = null; + private String responseBody = null; + + public ApiException() {} + + public ApiException(Throwable throwable) { + super(throwable); + } + + public ApiException(String message) { + super(message); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { + super(message, throwable); + this.code = code; + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + public ApiException(String message, int code, Map> responseHeaders, String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + public ApiException(int code, Map> responseHeaders, String responseBody) { + this((String) null, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + public ApiException(int code, String message, Map> responseHeaders, String responseBody) { + this(code, message); + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } + + /** + * Get the HTTP response headers. + * + * @return A map of list of string + */ + public Map> getResponseHeaders() { + return responseHeaders; + } + + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } +} diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiResponse.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiResponse.java new file mode 100644 index 0000000..80181a0 --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiResponse.java @@ -0,0 +1,71 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler; + +import java.util.List; +import java.util.Map; + +/** + * API response returned by API call. + * + * @param The type of data that is deserialized from response body + */ +public class ApiResponse { + final private int statusCode; + final private Map> headers; + final private T data; + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + */ + public ApiResponse(int statusCode, Map> headers) { + this(statusCode, headers, null); + } + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + * @param data The object deserialized from response bod + */ + public ApiResponse(int statusCode, Map> headers, T data) { + this.statusCode = statusCode; + this.headers = headers; + this.data = data; + } + + public int getStatusCode() { + return statusCode; + } + + public Map> getHeaders() { + return headers; + } + + public T getData() { + return data; + } +} diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Configuration.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Configuration.java new file mode 100644 index 0000000..497d294 --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Configuration.java @@ -0,0 +1,51 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler; + +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:04.861+02:00") +public class Configuration { + private static ApiClient defaultApiClient = new ApiClient(); + + /** + * Get the default API client, which would be used when creating API + * instances without providing an API client. + * + * @return Default API client + */ + public static ApiClient getDefaultApiClient() { + return defaultApiClient; + } + + /** + * Set the default API client, which would be used when creating API + * instances without providing an API client. + * + * @param apiClient API client + */ + public static void setDefaultApiClient(ApiClient apiClient) { + defaultApiClient = apiClient; + } +} diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/JSON.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/JSON.java new file mode 100644 index 0000000..9641e7b --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/JSON.java @@ -0,0 +1,239 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonNull; +import com.google.gson.JsonParseException; +import com.google.gson.JsonPrimitive; +import com.google.gson.JsonSerializationContext; +import com.google.gson.JsonSerializer; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +import java.io.IOException; +import java.io.StringReader; +import java.lang.reflect.Type; +import java.util.Date; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +public class JSON { + private ApiClient apiClient; + private Gson gson; + + /** + * JSON constructor. + * + * @param apiClient An instance of ApiClient + */ + public JSON(ApiClient apiClient) { + this.apiClient = apiClient; + gson = new GsonBuilder() + .registerTypeAdapter(Date.class, new DateAdapter(apiClient)) + .registerTypeAdapter(OffsetDateTime.class, new OffsetDateTimeTypeAdapter()) + .registerTypeAdapter(LocalDate.class, new LocalDateTypeAdapter()) + .create(); + } + + /** + * Get Gson. + * + * @return Gson + */ + public Gson getGson() { + return gson; + } + + /** + * Set Gson. + * + * @param gson Gson + */ + public void setGson(Gson gson) { + this.gson = gson; + } + + /** + * Serialize the given Java object into JSON string. + * + * @param obj Object + * @return String representation of the JSON + */ + public String serialize(Object obj) { + return gson.toJson(obj); + } + + /** + * Deserialize the given JSON string to Java object. + * + * @param Type + * @param body The JSON string + * @param returnType The type to deserialize into + * @return The deserialized Java object + */ + @SuppressWarnings("unchecked") + public T deserialize(String body, Type returnType) { + try { + if (apiClient.isLenientOnJson()) { + JsonReader jsonReader = new JsonReader(new StringReader(body)); + // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) + jsonReader.setLenient(true); + return gson.fromJson(jsonReader, returnType); + } else { + return gson.fromJson(body, returnType); + } + } catch (JsonParseException e) { + // Fallback processing when failed to parse JSON form response body: + // return the response body string directly for the String return type; + // parse response body into date or datetime for the Date return type. + if (returnType.equals(String.class)) + return (T) body; + else if (returnType.equals(Date.class)) + return (T) apiClient.parseDateOrDatetime(body); + else throw(e); + } + } +} + +class DateAdapter implements JsonSerializer, JsonDeserializer { + private final ApiClient apiClient; + + /** + * Constructor for DateAdapter + * + * @param apiClient Api client + */ + public DateAdapter(ApiClient apiClient) { + super(); + this.apiClient = apiClient; + } + + /** + * Serialize + * + * @param src Date + * @param typeOfSrc Type + * @param context Json Serialization Context + * @return Json Element + */ + @Override + public JsonElement serialize(Date src, Type typeOfSrc, JsonSerializationContext context) { + if (src == null) { + return JsonNull.INSTANCE; + } else { + return new JsonPrimitive(apiClient.formatDatetime(src)); + } + } + + /** + * Deserialize + * + * @param json Json element + * @param date Type + * @param context Json Serialization Context + * @return Date + * @throws JsonParseException if fail to parse + */ + @Override + public Date deserialize(JsonElement json, Type date, JsonDeserializationContext context) throws JsonParseException { + String str = json.getAsJsonPrimitive().getAsString(); + try { + return apiClient.parseDateOrDatetime(str); + } catch (RuntimeException e) { + throw new JsonParseException(e); + } + } +} + +/** + * Gson TypeAdapter for jsr310 OffsetDateTime type + */ +class OffsetDateTimeTypeAdapter extends TypeAdapter { + + private final DateTimeFormatter formatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME; + + @Override + public void write(JsonWriter out, OffsetDateTime date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public OffsetDateTime read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + if (date.endsWith("+0000")) { + date = date.substring(0, date.length()-5) + "Z"; + } + + return OffsetDateTime.parse(date, formatter); + } + } +} + +/** + * Gson TypeAdapter for jsr310 LocalDate type + */ +class LocalDateTypeAdapter extends TypeAdapter { + + private final DateTimeFormatter formatter = DateTimeFormatter.ISO_LOCAL_DATE; + + @Override + public void write(JsonWriter out, LocalDate date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public LocalDate read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + return LocalDate.parse(date, formatter); + } + } +} diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Pair.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Pair.java new file mode 100644 index 0000000..339358b --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Pair.java @@ -0,0 +1,64 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler; + +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:04.861+02:00") +public class Pair { + private String name = ""; + private String value = ""; + + public Pair (String name, String value) { + setName(name); + setValue(value); + } + + private void setName(String name) { + if (!isValidString(name)) return; + + this.name = name; + } + + private void setValue(String value) { + if (!isValidString(value)) return; + + this.value = value; + } + + public String getName() { + return this.name; + } + + public String getValue() { + return this.value; + } + + private boolean isValidString(String arg) { + if (arg == null) return false; + if (arg.trim().isEmpty()) return false; + + return true; + } +} diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ProgressRequestBody.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ProgressRequestBody.java new file mode 100644 index 0000000..9fddc08 --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ProgressRequestBody.java @@ -0,0 +1,95 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler; + +import com.squareup.okhttp.MediaType; +import com.squareup.okhttp.RequestBody; + +import java.io.IOException; + +import okio.Buffer; +import okio.BufferedSink; +import okio.ForwardingSink; +import okio.Okio; +import okio.Sink; + +public class ProgressRequestBody extends RequestBody { + + public interface ProgressRequestListener { + void onRequestProgress(long bytesWritten, long contentLength, boolean done); + } + + private final RequestBody requestBody; + + private final ProgressRequestListener progressListener; + + private BufferedSink bufferedSink; + + public ProgressRequestBody(RequestBody requestBody, ProgressRequestListener progressListener) { + this.requestBody = requestBody; + this.progressListener = progressListener; + } + + @Override + public MediaType contentType() { + return requestBody.contentType(); + } + + @Override + public long contentLength() throws IOException { + return requestBody.contentLength(); + } + + @Override + public void writeTo(BufferedSink sink) throws IOException { + if (bufferedSink == null) { + bufferedSink = Okio.buffer(sink(sink)); + } + + requestBody.writeTo(bufferedSink); + bufferedSink.flush(); + + } + + private Sink sink(Sink sink) { + return new ForwardingSink(sink) { + + long bytesWritten = 0L; + long contentLength = 0L; + + @Override + public void write(Buffer source, long byteCount) throws IOException { + super.write(source, byteCount); + if (contentLength == 0) { + contentLength = contentLength(); + } + + bytesWritten += byteCount; + progressListener.onRequestProgress(bytesWritten, contentLength, bytesWritten == contentLength); + } + }; + } +} diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ProgressResponseBody.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ProgressResponseBody.java new file mode 100644 index 0000000..feb52a9 --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ProgressResponseBody.java @@ -0,0 +1,88 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler; + +import com.squareup.okhttp.MediaType; +import com.squareup.okhttp.ResponseBody; + +import java.io.IOException; + +import okio.Buffer; +import okio.BufferedSource; +import okio.ForwardingSource; +import okio.Okio; +import okio.Source; + +public class ProgressResponseBody extends ResponseBody { + + public interface ProgressListener { + void update(long bytesRead, long contentLength, boolean done); + } + + private final ResponseBody responseBody; + private final ProgressListener progressListener; + private BufferedSource bufferedSource; + + public ProgressResponseBody(ResponseBody responseBody, ProgressListener progressListener) { + this.responseBody = responseBody; + this.progressListener = progressListener; + } + + @Override + public MediaType contentType() { + return responseBody.contentType(); + } + + @Override + public long contentLength() throws IOException { + return responseBody.contentLength(); + } + + @Override + public BufferedSource source() throws IOException { + if (bufferedSource == null) { + bufferedSource = Okio.buffer(source(responseBody.source())); + } + return bufferedSource; + } + + private Source source(Source source) { + return new ForwardingSource(source) { + long totalBytesRead = 0L; + + @Override + public long read(Buffer sink, long byteCount) throws IOException { + long bytesRead = super.read(sink, byteCount); + // read() returns the number of bytes read, or -1 if this source is exhausted. + totalBytesRead += bytesRead != -1 ? bytesRead : 0; + progressListener.update(totalBytesRead, responseBody.contentLength(), bytesRead == -1); + return bytesRead; + } + }; + } +} + + diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java new file mode 100644 index 0000000..4c2f59f --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java @@ -0,0 +1,67 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler; + +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:04.861+02:00") +public class StringUtil { + /** + * Check if the given array contains the given value (with case-insensitive comparison). + * + * @param array The array + * @param value The value to search + * @return true if the array contains the value + */ + public static boolean containsIgnoreCase(String[] array, String value) { + for (String str : array) { + if (value == null && str == null) return true; + if (value != null && value.equalsIgnoreCase(str)) return true; + } + return false; + } + + /** + * Join an array of strings with the given separator. + *

+ * Note: This might be replaced by utility method from commons-lang or guava someday + * if one of those libraries is added as dependency. + *

+ * + * @param array The array of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(String[] array, String separator) { + int len = array.length; + if (len == 0) return ""; + + StringBuilder out = new StringBuilder(); + out.append(array[0]); + for (int i = 1; i < len; i++) { + out.append(separator).append(array[i]); + } + return out.toString(); + } +} diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java new file mode 100644 index 0000000..ba0a71b --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java @@ -0,0 +1,87 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler.auth; + +import com.sphereon.sdk.template_processor.handler.Pair; + +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:04.861+02:00") +public class ApiKeyAuth implements Authentication { + private final String location; + private final String paramName; + + private String apiKey; + private String apiKeyPrefix; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getApiKeyPrefix() { + return apiKeyPrefix; + } + + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } + + @Override + public void applyToParams(List queryParams, Map headerParams) { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if ("query".equals(location)) { + queryParams.add(new Pair(paramName, value)); + } else if ("header".equals(location)) { + headerParams.put(paramName, value); + } + } +} diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/Authentication.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/Authentication.java new file mode 100644 index 0000000..9b3ec10 --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/Authentication.java @@ -0,0 +1,41 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler.auth; + +import com.sphereon.sdk.template_processor.handler.Pair; + +import java.util.Map; +import java.util.List; + +public interface Authentication { + /** + * Apply authentication settings to header and query params. + * + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + */ + void applyToParams(List queryParams, Map headerParams); +} diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/HttpBasicAuth.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/HttpBasicAuth.java new file mode 100644 index 0000000..8cffc3c --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/HttpBasicAuth.java @@ -0,0 +1,66 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler.auth; + +import com.sphereon.sdk.template_processor.handler.Pair; + +import com.squareup.okhttp.Credentials; + +import java.util.Map; +import java.util.List; + +import java.io.UnsupportedEncodingException; + +public class HttpBasicAuth implements Authentication { + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public void applyToParams(List queryParams, Map headerParams) { + if (username == null && password == null) { + return; + } + headerParams.put("Authorization", Credentials.basic( + username == null ? "" : username, + password == null ? "" : password)); + } +} diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java new file mode 100644 index 0000000..2640bbe --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java @@ -0,0 +1,51 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler.auth; + +import com.sphereon.sdk.template_processor.handler.Pair; + +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:04.861+02:00") +public class OAuth implements Authentication { + private String accessToken; + + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + @Override + public void applyToParams(List queryParams, Map headerParams) { + if (accessToken != null) { + headerParams.put("Authorization", "Bearer " + accessToken); + } + } +} diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java new file mode 100644 index 0000000..87db0fa --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java @@ -0,0 +1,30 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler.auth; + +public enum OAuthFlow { + accessCode, implicit, password, application +} diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java new file mode 100644 index 0000000..4d5ea85 --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java @@ -0,0 +1,169 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; + +/** + * The merge template response. + */ +@ApiModel(description = "The merge template response.") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:04.861+02:00") +public class DataSetResponse { + @SerializedName("completionTime") + private OffsetDateTime completionTime = null; + + @SerializedName("creationTime") + private OffsetDateTime creationTime = null; + + @SerializedName("id") + private String id = null; + + /** + * The status of the template + */ + public enum StatusEnum { + @SerializedName("CREATED") + CREATED("CREATED"), + + @SerializedName("UPDATED") + UPDATED("UPDATED"), + + @SerializedName("DELETED") + DELETED("DELETED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("status") + private StatusEnum status = null; + + /** + * The completion date/time of this template in ISO 8601 format + * @return completionTime + **/ + @ApiModelProperty(example = "null", value = "The completion date/time of this template in ISO 8601 format") + public OffsetDateTime getCompletionTime() { + return completionTime; + } + + /** + * The creation date/time of this template in ISO 8601 format + * @return creationTime + **/ + @ApiModelProperty(example = "null", value = "The creation date/time of this template in ISO 8601 format") + public OffsetDateTime getCreationTime() { + return creationTime; + } + + public DataSetResponse id(String id) { + this.id = id; + return this; + } + + /** + * Unique dataset id + * @return id + **/ + @ApiModelProperty(example = "null", required = true, value = "Unique dataset id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + /** + * The status of the template + * @return status + **/ + @ApiModelProperty(example = "null", required = true, value = "The status of the template") + public StatusEnum getStatus() { + return status; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataSetResponse dataSetResponse = (DataSetResponse) o; + return Objects.equals(this.completionTime, dataSetResponse.completionTime) && + Objects.equals(this.creationTime, dataSetResponse.creationTime) && + Objects.equals(this.id, dataSetResponse.id) && + Objects.equals(this.status, dataSetResponse.status); + } + + @Override + public int hashCode() { + return Objects.hash(completionTime, creationTime, id, status); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataSetResponse {\n"); + + sb.append(" completionTime: ").append(toIndentedString(completionTime)).append("\n"); + sb.append(" creationTime: ").append(toIndentedString(creationTime)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Error.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Error.java new file mode 100644 index 0000000..6b48bad --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Error.java @@ -0,0 +1,196 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import com.sphereon.sdk.template_processor.model.Error; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * An error + */ +@ApiModel(description = "An error") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:04.861+02:00") +public class Error { + @SerializedName("code") + private String code = null; + + /** + * Gets or Sets level + */ + public enum LevelEnum { + @SerializedName("INFO") + INFO("INFO"), + + @SerializedName("WARNING") + WARNING("WARNING"), + + @SerializedName("FATAL") + FATAL("FATAL"); + + private String value; + + LevelEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("level") + private LevelEnum level = null; + + @SerializedName("cause") + private Error cause = null; + + @SerializedName("message") + private String message = null; + + public Error code(String code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + **/ + @ApiModelProperty(example = "null", required = true, value = "") + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public Error level(LevelEnum level) { + this.level = level; + return this; + } + + /** + * Get level + * @return level + **/ + @ApiModelProperty(example = "null", required = true, value = "") + public LevelEnum getLevel() { + return level; + } + + public void setLevel(LevelEnum level) { + this.level = level; + } + + public Error cause(Error cause) { + this.cause = cause; + return this; + } + + /** + * Get cause + * @return cause + **/ + @ApiModelProperty(example = "null", value = "") + public Error getCause() { + return cause; + } + + public void setCause(Error cause) { + this.cause = cause; + } + + public Error message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + **/ + @ApiModelProperty(example = "null", required = true, value = "") + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Error error = (Error) o; + return Objects.equals(this.code, error.code) && + Objects.equals(this.level, error.level) && + Objects.equals(this.cause, error.cause) && + Objects.equals(this.message, error.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, level, cause, message); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Error {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" level: ").append(toIndentedString(level)).append("\n"); + sb.append(" cause: ").append(toIndentedString(cause)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java new file mode 100644 index 0000000..ff10a6d --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java @@ -0,0 +1,109 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import com.sphereon.sdk.template_processor.model.Error; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +/** + * The error response + */ +@ApiModel(description = "The error response") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:04.861+02:00") +public class ErrorResponse { + @SerializedName("errors") + private List errors = new ArrayList(); + + public ErrorResponse errors(List errors) { + this.errors = errors; + return this; + } + + public ErrorResponse addErrorsItem(Error errorsItem) { + this.errors.add(errorsItem); + return this; + } + + /** + * Get errors + * @return errors + **/ + @ApiModelProperty(example = "null", value = "") + public List getErrors() { + return errors; + } + + public void setErrors(List errors) { + this.errors = errors; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ErrorResponse errorResponse = (ErrorResponse) o; + return Objects.equals(this.errors, errorResponse.errors); + } + + @Override + public int hashCode() { + return Objects.hash(errors); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ErrorResponse {\n"); + + sb.append(" errors: ").append(toIndentedString(errors)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java new file mode 100644 index 0000000..1647b45 --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java @@ -0,0 +1,189 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; + +/** + * Lifecycle settings. When no lifecycle settings are supplied, the job and files will be deleted directly after retrieval of the file + */ +@ApiModel(description = "Lifecycle settings. When no lifecycle settings are supplied, the job and files will be deleted directly after retrieval of the file") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:04.861+02:00") +public class Lifecycle { + @SerializedName("actionTime") + private OffsetDateTime actionTime = null; + + /** + * Gets or Sets action + */ + public enum ActionEnum { + @SerializedName("DELETE") + DELETE("DELETE"); + + private String value; + + ActionEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("action") + private ActionEnum action = null; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + @SerializedName("RETRIEVAL") + RETRIEVAL("RETRIEVAL"), + + @SerializedName("TIME") + TIME("TIME"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("type") + private TypeEnum type = null; + + public Lifecycle actionTime(OffsetDateTime actionTime) { + this.actionTime = actionTime; + return this; + } + + /** + * The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation + * @return actionTime + **/ + @ApiModelProperty(example = "null", value = "The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation") + public OffsetDateTime getActionTime() { + return actionTime; + } + + public void setActionTime(OffsetDateTime actionTime) { + this.actionTime = actionTime; + } + + public Lifecycle action(ActionEnum action) { + this.action = action; + return this; + } + + /** + * Get action + * @return action + **/ + @ApiModelProperty(example = "null", value = "") + public ActionEnum getAction() { + return action; + } + + public void setAction(ActionEnum action) { + this.action = action; + } + + public Lifecycle type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @ApiModelProperty(example = "null", value = "") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Lifecycle lifecycle = (Lifecycle) o; + return Objects.equals(this.actionTime, lifecycle.actionTime) && + Objects.equals(this.action, lifecycle.action) && + Objects.equals(this.type, lifecycle.type); + } + + @Override + public int hashCode() { + return Objects.hash(actionTime, action, type); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Lifecycle {\n"); + + sb.append(" actionTime: ").append(toIndentedString(actionTime)).append("\n"); + sb.append(" action: ").append(toIndentedString(action)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java new file mode 100644 index 0000000..46290c3 --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java @@ -0,0 +1,344 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import com.sphereon.sdk.template_processor.model.MergeSettings; +import com.sphereon.sdk.template_processor.model.StreamLocation; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; + +/** + * The merge job. Has access to the job merge data. + */ +@ApiModel(description = "The merge job. Has access to the job merge data.") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:04.861+02:00") +public class MergeJob { + @SerializedName("resultFolderPath") + private String resultFolderPath = null; + + @SerializedName("completionTime") + private OffsetDateTime completionTime = null; + + @SerializedName("jobId") + private String jobId = null; + + @SerializedName("resultContainerId") + private String resultContainerId = null; + + @SerializedName("creationTime") + private OffsetDateTime creationTime = null; + + @SerializedName("dataSetId") + private String dataSetId = null; + + @SerializedName("resultStreams") + private List resultStreams = new ArrayList(); + + @SerializedName("headerDataSetIds") + private List headerDataSetIds = new ArrayList(); + + @SerializedName("mergeSettings") + private MergeSettings mergeSettings = null; + + @SerializedName("statusMessage") + private String statusMessage = null; + + /** + * The status of the job + */ + public enum StatusEnum { + @SerializedName("CREATED") + CREATED("CREATED"), + + @SerializedName("UPDATED") + UPDATED("UPDATED"), + + @SerializedName("PROCESSING") + PROCESSING("PROCESSING"), + + @SerializedName("DONE") + DONE("DONE"), + + @SerializedName("ERROR") + ERROR("ERROR"), + + @SerializedName("DELETED") + DELETED("DELETED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("status") + private StatusEnum status = null; + + public MergeJob resultFolderPath(String resultFolderPath) { + this.resultFolderPath = resultFolderPath; + return this; + } + + /** + * The target folder path of result files + * @return resultFolderPath + **/ + @ApiModelProperty(example = "null", value = "The target folder path of result files") + public String getResultFolderPath() { + return resultFolderPath; + } + + public void setResultFolderPath(String resultFolderPath) { + this.resultFolderPath = resultFolderPath; + } + + /** + * The completion date/time of this job in ISO 8601 format + * @return completionTime + **/ + @ApiModelProperty(example = "null", value = "The completion date/time of this job in ISO 8601 format") + public OffsetDateTime getCompletionTime() { + return completionTime; + } + + public MergeJob jobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation + * @return jobId + **/ + @ApiModelProperty(example = "null", required = true, value = "The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation") + public String getJobId() { + return jobId; + } + + public void setJobId(String jobId) { + this.jobId = jobId; + } + + public MergeJob resultContainerId(String resultContainerId) { + this.resultContainerId = resultContainerId; + return this; + } + + /** + * The target container id of result files + * @return resultContainerId + **/ + @ApiModelProperty(example = "null", value = "The target container id of result files") + public String getResultContainerId() { + return resultContainerId; + } + + public void setResultContainerId(String resultContainerId) { + this.resultContainerId = resultContainerId; + } + + /** + * The creation date/time of this job in ISO 8601 format + * @return creationTime + **/ + @ApiModelProperty(example = "null", value = "The creation date/time of this job in ISO 8601 format") + public OffsetDateTime getCreationTime() { + return creationTime; + } + + public MergeJob dataSetId(String dataSetId) { + this.dataSetId = dataSetId; + return this; + } + + /** + * Data set id + * @return dataSetId + **/ + @ApiModelProperty(example = "null", value = "Data set id") + public String getDataSetId() { + return dataSetId; + } + + public void setDataSetId(String dataSetId) { + this.dataSetId = dataSetId; + } + + public MergeJob resultStreams(List resultStreams) { + this.resultStreams = resultStreams; + return this; + } + + public MergeJob addResultStreamsItem(StreamLocation resultStreamsItem) { + this.resultStreams.add(resultStreamsItem); + return this; + } + + /** + * The storage locations of the result files. + * @return resultStreams + **/ + @ApiModelProperty(example = "null", required = true, value = "The storage locations of the result files.") + public List getResultStreams() { + return resultStreams; + } + + public void setResultStreams(List resultStreams) { + this.resultStreams = resultStreams; + } + + public MergeJob headerDataSetIds(List headerDataSetIds) { + this.headerDataSetIds = headerDataSetIds; + return this; + } + + public MergeJob addHeaderDataSetIdsItem(String headerDataSetIdsItem) { + this.headerDataSetIds.add(headerDataSetIdsItem); + return this; + } + + /** + * Header data set ids + * @return headerDataSetIds + **/ + @ApiModelProperty(example = "null", value = "Header data set ids") + public List getHeaderDataSetIds() { + return headerDataSetIds; + } + + public void setHeaderDataSetIds(List headerDataSetIds) { + this.headerDataSetIds = headerDataSetIds; + } + + public MergeJob mergeSettings(MergeSettings mergeSettings) { + this.mergeSettings = mergeSettings; + return this; + } + + /** + * Get mergeSettings + * @return mergeSettings + **/ + @ApiModelProperty(example = "null", value = "") + public MergeSettings getMergeSettings() { + return mergeSettings; + } + + public void setMergeSettings(MergeSettings mergeSettings) { + this.mergeSettings = mergeSettings; + } + + /** + * A status message, which can be informational, warning or error. A message here does not indicate an error perse + * @return statusMessage + **/ + @ApiModelProperty(example = "null", value = "A status message, which can be informational, warning or error. A message here does not indicate an error perse") + public String getStatusMessage() { + return statusMessage; + } + + /** + * The status of the job + * @return status + **/ + @ApiModelProperty(example = "null", required = true, value = "The status of the job") + public StatusEnum getStatus() { + return status; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MergeJob mergeJob = (MergeJob) o; + return Objects.equals(this.resultFolderPath, mergeJob.resultFolderPath) && + Objects.equals(this.completionTime, mergeJob.completionTime) && + Objects.equals(this.jobId, mergeJob.jobId) && + Objects.equals(this.resultContainerId, mergeJob.resultContainerId) && + Objects.equals(this.creationTime, mergeJob.creationTime) && + Objects.equals(this.dataSetId, mergeJob.dataSetId) && + Objects.equals(this.resultStreams, mergeJob.resultStreams) && + Objects.equals(this.headerDataSetIds, mergeJob.headerDataSetIds) && + Objects.equals(this.mergeSettings, mergeJob.mergeSettings) && + Objects.equals(this.statusMessage, mergeJob.statusMessage) && + Objects.equals(this.status, mergeJob.status); + } + + @Override + public int hashCode() { + return Objects.hash(resultFolderPath, completionTime, jobId, resultContainerId, creationTime, dataSetId, resultStreams, headerDataSetIds, mergeSettings, statusMessage, status); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MergeJob {\n"); + + sb.append(" resultFolderPath: ").append(toIndentedString(resultFolderPath)).append("\n"); + sb.append(" completionTime: ").append(toIndentedString(completionTime)).append("\n"); + sb.append(" jobId: ").append(toIndentedString(jobId)).append("\n"); + sb.append(" resultContainerId: ").append(toIndentedString(resultContainerId)).append("\n"); + sb.append(" creationTime: ").append(toIndentedString(creationTime)).append("\n"); + sb.append(" dataSetId: ").append(toIndentedString(dataSetId)).append("\n"); + sb.append(" resultStreams: ").append(toIndentedString(resultStreams)).append("\n"); + sb.append(" headerDataSetIds: ").append(toIndentedString(headerDataSetIds)).append("\n"); + sb.append(" mergeSettings: ").append(toIndentedString(mergeSettings)).append("\n"); + sb.append(" statusMessage: ").append(toIndentedString(statusMessage)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java new file mode 100644 index 0000000..9e0a820 --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java @@ -0,0 +1,187 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import com.sphereon.sdk.template_processor.model.MergeJob; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * The merge job response. + */ +@ApiModel(description = "The merge job response.") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:04.861+02:00") +public class MergeJobResponse { + @SerializedName("jobId") + private String jobId = null; + + @SerializedName("job") + private MergeJob job = null; + + @SerializedName("statusMessage") + private String statusMessage = null; + + /** + * The status of the job + */ + public enum StatusEnum { + @SerializedName("CREATED") + CREATED("CREATED"), + + @SerializedName("UPDATED") + UPDATED("UPDATED"), + + @SerializedName("PROCESSING") + PROCESSING("PROCESSING"), + + @SerializedName("DONE") + DONE("DONE"), + + @SerializedName("ERROR") + ERROR("ERROR"), + + @SerializedName("DELETED") + DELETED("DELETED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("status") + private StatusEnum status = null; + + public MergeJobResponse jobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation + * @return jobId + **/ + @ApiModelProperty(example = "null", required = true, value = "The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation") + public String getJobId() { + return jobId; + } + + public void setJobId(String jobId) { + this.jobId = jobId; + } + + public MergeJobResponse job(MergeJob job) { + this.job = job; + return this; + } + + /** + * Get job + * @return job + **/ + @ApiModelProperty(example = "null", value = "") + public MergeJob getJob() { + return job; + } + + public void setJob(MergeJob job) { + this.job = job; + } + + /** + * A status message, which can be informational, warning or error. AA message here does not indicate an error perse + * @return statusMessage + **/ + @ApiModelProperty(example = "null", value = "A status message, which can be informational, warning or error. AA message here does not indicate an error perse") + public String getStatusMessage() { + return statusMessage; + } + + /** + * The status of the job + * @return status + **/ + @ApiModelProperty(example = "null", required = true, value = "The status of the job") + public StatusEnum getStatus() { + return status; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MergeJobResponse mergeJobResponse = (MergeJobResponse) o; + return Objects.equals(this.jobId, mergeJobResponse.jobId) && + Objects.equals(this.job, mergeJobResponse.job) && + Objects.equals(this.statusMessage, mergeJobResponse.statusMessage) && + Objects.equals(this.status, mergeJobResponse.status); + } + + @Override + public int hashCode() { + return Objects.hash(jobId, job, statusMessage, status); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MergeJobResponse {\n"); + + sb.append(" jobId: ").append(toIndentedString(jobId)).append("\n"); + sb.append(" job: ").append(toIndentedString(job)).append("\n"); + sb.append(" statusMessage: ").append(toIndentedString(statusMessage)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java new file mode 100644 index 0000000..b8922c7 --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java @@ -0,0 +1,339 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import com.sphereon.sdk.template_processor.model.Lifecycle; +import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.StreamLocation; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +/** + * Merge settings + */ +@ApiModel(description = "Merge settings") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:04.861+02:00") +public class MergeSettings { + @SerializedName("lifecycle") + private Lifecycle lifecycle = null; + + /** + * Gets or Sets mergeResult + */ + public enum MergeResultEnum { + @SerializedName("SINGLE_FILE") + SINGLE_FILE("SINGLE_FILE"), + + @SerializedName("SEPARATE_FILES") + SEPARATE_FILES("SEPARATE_FILES"); + + private String value; + + MergeResultEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("mergeResult") + private MergeResultEnum mergeResult = null; + + @SerializedName("dataSetId") + private String dataSetId = null; + + /** + * Gets or Sets engine + */ + public enum EngineEnum { + @SerializedName("BASIC") + BASIC("BASIC"), + + @SerializedName("PREMIUM") + PREMIUM("PREMIUM"); + + private String value; + + EngineEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("engine") + private EngineEnum engine = null; + + @SerializedName("headerDataSetIds") + private List headerDataSetIds = new ArrayList(); + + @SerializedName("templateVersion") + private Integer templateVersion = null; + + @SerializedName("resultStreamLocation") + private StreamLocation resultStreamLocation = null; + + @SerializedName("templateId") + private String templateId = null; + + @SerializedName("outputSettings") + private OutputSettings outputSettings = null; + + public MergeSettings lifecycle(Lifecycle lifecycle) { + this.lifecycle = lifecycle; + return this; + } + + /** + * Get lifecycle + * @return lifecycle + **/ + @ApiModelProperty(example = "null", value = "") + public Lifecycle getLifecycle() { + return lifecycle; + } + + public void setLifecycle(Lifecycle lifecycle) { + this.lifecycle = lifecycle; + } + + public MergeSettings mergeResult(MergeResultEnum mergeResult) { + this.mergeResult = mergeResult; + return this; + } + + /** + * Get mergeResult + * @return mergeResult + **/ + @ApiModelProperty(example = "null", value = "") + public MergeResultEnum getMergeResult() { + return mergeResult; + } + + public void setMergeResult(MergeResultEnum mergeResult) { + this.mergeResult = mergeResult; + } + + public MergeSettings dataSetId(String dataSetId) { + this.dataSetId = dataSetId; + return this; + } + + /** + * Data set id + * @return dataSetId + **/ + @ApiModelProperty(example = "null", required = true, value = "Data set id") + public String getDataSetId() { + return dataSetId; + } + + public void setDataSetId(String dataSetId) { + this.dataSetId = dataSetId; + } + + public MergeSettings engine(EngineEnum engine) { + this.engine = engine; + return this; + } + + /** + * Get engine + * @return engine + **/ + @ApiModelProperty(example = "null", value = "") + public EngineEnum getEngine() { + return engine; + } + + public void setEngine(EngineEnum engine) { + this.engine = engine; + } + + public MergeSettings headerDataSetIds(List headerDataSetIds) { + this.headerDataSetIds = headerDataSetIds; + return this; + } + + public MergeSettings addHeaderDataSetIdsItem(String headerDataSetIdsItem) { + this.headerDataSetIds.add(headerDataSetIdsItem); + return this; + } + + /** + * optional header data set ids + * @return headerDataSetIds + **/ + @ApiModelProperty(example = "null", value = "optional header data set ids") + public List getHeaderDataSetIds() { + return headerDataSetIds; + } + + public void setHeaderDataSetIds(List headerDataSetIds) { + this.headerDataSetIds = headerDataSetIds; + } + + public MergeSettings templateVersion(Integer templateVersion) { + this.templateVersion = templateVersion; + return this; + } + + /** + * Template version + * @return templateVersion + **/ + @ApiModelProperty(example = "null", value = "Template version") + public Integer getTemplateVersion() { + return templateVersion; + } + + public void setTemplateVersion(Integer templateVersion) { + this.templateVersion = templateVersion; + } + + public MergeSettings resultStreamLocation(StreamLocation resultStreamLocation) { + this.resultStreamLocation = resultStreamLocation; + return this; + } + + /** + * The output location of the result files. + * @return resultStreamLocation + **/ + @ApiModelProperty(example = "null", required = true, value = "The output location of the result files.") + public StreamLocation getResultStreamLocation() { + return resultStreamLocation; + } + + public void setResultStreamLocation(StreamLocation resultStreamLocation) { + this.resultStreamLocation = resultStreamLocation; + } + + public MergeSettings templateId(String templateId) { + this.templateId = templateId; + return this; + } + + /** + * Template id + * @return templateId + **/ + @ApiModelProperty(example = "null", required = true, value = "Template id") + public String getTemplateId() { + return templateId; + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + public MergeSettings outputSettings(OutputSettings outputSettings) { + this.outputSettings = outputSettings; + return this; + } + + /** + * Get outputSettings + * @return outputSettings + **/ + @ApiModelProperty(example = "null", required = true, value = "") + public OutputSettings getOutputSettings() { + return outputSettings; + } + + public void setOutputSettings(OutputSettings outputSettings) { + this.outputSettings = outputSettings; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MergeSettings mergeSettings = (MergeSettings) o; + return Objects.equals(this.lifecycle, mergeSettings.lifecycle) && + Objects.equals(this.mergeResult, mergeSettings.mergeResult) && + Objects.equals(this.dataSetId, mergeSettings.dataSetId) && + Objects.equals(this.engine, mergeSettings.engine) && + Objects.equals(this.headerDataSetIds, mergeSettings.headerDataSetIds) && + Objects.equals(this.templateVersion, mergeSettings.templateVersion) && + Objects.equals(this.resultStreamLocation, mergeSettings.resultStreamLocation) && + Objects.equals(this.templateId, mergeSettings.templateId) && + Objects.equals(this.outputSettings, mergeSettings.outputSettings); + } + + @Override + public int hashCode() { + return Objects.hash(lifecycle, mergeResult, dataSetId, engine, headerDataSetIds, templateVersion, resultStreamLocation, templateId, outputSettings); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MergeSettings {\n"); + + sb.append(" lifecycle: ").append(toIndentedString(lifecycle)).append("\n"); + sb.append(" mergeResult: ").append(toIndentedString(mergeResult)).append("\n"); + sb.append(" dataSetId: ").append(toIndentedString(dataSetId)).append("\n"); + sb.append(" engine: ").append(toIndentedString(engine)).append("\n"); + sb.append(" headerDataSetIds: ").append(toIndentedString(headerDataSetIds)).append("\n"); + sb.append(" templateVersion: ").append(toIndentedString(templateVersion)).append("\n"); + sb.append(" resultStreamLocation: ").append(toIndentedString(resultStreamLocation)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); + sb.append(" outputSettings: ").append(toIndentedString(outputSettings)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java new file mode 100644 index 0000000..579664e --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java @@ -0,0 +1,213 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Output settings + */ +@ApiModel(description = "Output settings") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:04.861+02:00") +public class OutputSettings { + /** + * Gets or Sets deliveryFormat + */ + public enum DeliveryFormatEnum { + @SerializedName("PLAIN") + PLAIN("PLAIN"), + + @SerializedName("ZIP") + ZIP("ZIP"), + + @SerializedName("_7ZIP") + _7ZIP("_7ZIP"); + + private String value; + + DeliveryFormatEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("deliveryFormat") + private DeliveryFormatEnum deliveryFormat = null; + + /** + * Gets or Sets outputFormat + */ + public enum OutputFormatEnum { + @SerializedName("DOC") + DOC("DOC"), + + @SerializedName("DOCX") + DOCX("DOCX"), + + @SerializedName("RTF") + RTF("RTF"), + + @SerializedName("PDF") + PDF("PDF"), + + @SerializedName("XPS") + XPS("XPS"), + + @SerializedName("SVG") + SVG("SVG"), + + @SerializedName("HTML") + HTML("HTML"), + + @SerializedName("ODT") + ODT("ODT"), + + @SerializedName("TIFF") + TIFF("TIFF"), + + @SerializedName("PNG") + PNG("PNG"), + + @SerializedName("BMP") + BMP("BMP"), + + @SerializedName("JPEG") + JPEG("JPEG"), + + @SerializedName("TXT") + TXT("TXT"), + + @SerializedName("XML") + XML("XML"), + + @SerializedName("JSON") + JSON("JSON"), + + @SerializedName("DEFAULT") + DEFAULT("DEFAULT"); + + private String value; + + OutputFormatEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("outputFormat") + private OutputFormatEnum outputFormat = null; + + public OutputSettings deliveryFormat(DeliveryFormatEnum deliveryFormat) { + this.deliveryFormat = deliveryFormat; + return this; + } + + /** + * Get deliveryFormat + * @return deliveryFormat + **/ + @ApiModelProperty(example = "null", value = "") + public DeliveryFormatEnum getDeliveryFormat() { + return deliveryFormat; + } + + public void setDeliveryFormat(DeliveryFormatEnum deliveryFormat) { + this.deliveryFormat = deliveryFormat; + } + + public OutputSettings outputFormat(OutputFormatEnum outputFormat) { + this.outputFormat = outputFormat; + return this; + } + + /** + * Get outputFormat + * @return outputFormat + **/ + @ApiModelProperty(example = "null", value = "") + public OutputFormatEnum getOutputFormat() { + return outputFormat; + } + + public void setOutputFormat(OutputFormatEnum outputFormat) { + this.outputFormat = outputFormat; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OutputSettings outputSettings = (OutputSettings) o; + return Objects.equals(this.deliveryFormat, outputSettings.deliveryFormat) && + Objects.equals(this.outputFormat, outputSettings.outputFormat); + } + + @Override + public int hashCode() { + return Objects.hash(deliveryFormat, outputFormat); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OutputSettings {\n"); + + sb.append(" deliveryFormat: ").append(toIndentedString(deliveryFormat)).append("\n"); + sb.append(" outputFormat: ").append(toIndentedString(outputFormat)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java new file mode 100644 index 0000000..9e20d69 --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java @@ -0,0 +1,170 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Owner info + */ +@ApiModel(description = "Owner info") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:04.861+02:00") +public class OwnerInfo { + @SerializedName("phone") + private String phone = null; + + @SerializedName("companyDepartment") + private String companyDepartment = null; + + @SerializedName("name") + private String name = null; + + @SerializedName("email") + private String email = null; + + public OwnerInfo phone(String phone) { + this.phone = phone; + return this; + } + + /** + * The owner's phone number + * @return phone + **/ + @ApiModelProperty(example = "null", value = "The owner's phone number") + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public OwnerInfo companyDepartment(String companyDepartment) { + this.companyDepartment = companyDepartment; + return this; + } + + /** + * The owner's company/department + * @return companyDepartment + **/ + @ApiModelProperty(example = "null", value = "The owner's company/department") + public String getCompanyDepartment() { + return companyDepartment; + } + + public void setCompanyDepartment(String companyDepartment) { + this.companyDepartment = companyDepartment; + } + + public OwnerInfo name(String name) { + this.name = name; + return this; + } + + /** + * The owner's name + * @return name + **/ + @ApiModelProperty(example = "null", value = "The owner's name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public OwnerInfo email(String email) { + this.email = email; + return this; + } + + /** + * The owner's email address + * @return email + **/ + @ApiModelProperty(example = "null", value = "The owner's email address") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OwnerInfo ownerInfo = (OwnerInfo) o; + return Objects.equals(this.phone, ownerInfo.phone) && + Objects.equals(this.companyDepartment, ownerInfo.companyDepartment) && + Objects.equals(this.name, ownerInfo.name) && + Objects.equals(this.email, ownerInfo.email); + } + + @Override + public int hashCode() { + return Objects.hash(phone, companyDepartment, name, email); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OwnerInfo {\n"); + + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" companyDepartment: ").append(toIndentedString(companyDepartment)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java new file mode 100644 index 0000000..e7cc9ec --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java @@ -0,0 +1,170 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Location record of data stream + */ +@ApiModel(description = "Location record of data stream") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:04.861+02:00") +public class StreamLocation { + @SerializedName("folderPath") + private String folderPath = null; + + @SerializedName("originalFileName") + private String originalFileName = null; + + @SerializedName("containerId") + private String containerId = null; + + @SerializedName("fileId") + private String fileId = null; + + public StreamLocation folderPath(String folderPath) { + this.folderPath = folderPath; + return this; + } + + /** + * Get folderPath + * @return folderPath + **/ + @ApiModelProperty(example = "null", value = "") + public String getFolderPath() { + return folderPath; + } + + public void setFolderPath(String folderPath) { + this.folderPath = folderPath; + } + + public StreamLocation originalFileName(String originalFileName) { + this.originalFileName = originalFileName; + return this; + } + + /** + * Get originalFileName + * @return originalFileName + **/ + @ApiModelProperty(example = "null", value = "") + public String getOriginalFileName() { + return originalFileName; + } + + public void setOriginalFileName(String originalFileName) { + this.originalFileName = originalFileName; + } + + public StreamLocation containerId(String containerId) { + this.containerId = containerId; + return this; + } + + /** + * Get containerId + * @return containerId + **/ + @ApiModelProperty(example = "null", value = "") + public String getContainerId() { + return containerId; + } + + public void setContainerId(String containerId) { + this.containerId = containerId; + } + + public StreamLocation fileId(String fileId) { + this.fileId = fileId; + return this; + } + + /** + * Get fileId + * @return fileId + **/ + @ApiModelProperty(example = "null", value = "") + public String getFileId() { + return fileId; + } + + public void setFileId(String fileId) { + this.fileId = fileId; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StreamLocation streamLocation = (StreamLocation) o; + return Objects.equals(this.folderPath, streamLocation.folderPath) && + Objects.equals(this.originalFileName, streamLocation.originalFileName) && + Objects.equals(this.containerId, streamLocation.containerId) && + Objects.equals(this.fileId, streamLocation.fileId); + } + + @Override + public int hashCode() { + return Objects.hash(folderPath, originalFileName, containerId, fileId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StreamLocation {\n"); + + sb.append(" folderPath: ").append(toIndentedString(folderPath)).append("\n"); + sb.append(" originalFileName: ").append(toIndentedString(originalFileName)).append("\n"); + sb.append(" containerId: ").append(toIndentedString(containerId)).append("\n"); + sb.append(" fileId: ").append(toIndentedString(fileId)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java new file mode 100644 index 0000000..f53bcde --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java @@ -0,0 +1,247 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import com.sphereon.sdk.template_processor.model.OwnerInfo; +import com.sphereon.sdk.template_processor.model.StreamLocation; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * TemplateContext + */ +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:04.861+02:00") +public class TemplateContext { + /** + * Gets or Sets templateType + */ + public enum TemplateTypeEnum { + @SerializedName("OFFICE") + OFFICE("OFFICE"), + + @SerializedName("FREEMARKER") + FREEMARKER("FREEMARKER"); + + private String value; + + TemplateTypeEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("templateType") + private TemplateTypeEnum templateType = null; + + @SerializedName("templateFileLocations") + private Map templateFileLocations = new HashMap(); + + @SerializedName("description") + private String description = null; + + @SerializedName("ownerInfo") + private OwnerInfo ownerInfo = null; + + @SerializedName("id") + private String id = null; + + @SerializedName("templateId") + private String templateId = null; + + public TemplateContext templateType(TemplateTypeEnum templateType) { + this.templateType = templateType; + return this; + } + + /** + * Get templateType + * @return templateType + **/ + @ApiModelProperty(example = "null", required = true, value = "") + public TemplateTypeEnum getTemplateType() { + return templateType; + } + + public void setTemplateType(TemplateTypeEnum templateType) { + this.templateType = templateType; + } + + public TemplateContext templateFileLocations(Map templateFileLocations) { + this.templateFileLocations = templateFileLocations; + return this; + } + + public TemplateContext putTemplateFileLocationsItem(String key, StreamLocation templateFileLocationsItem) { + this.templateFileLocations.put(key, templateFileLocationsItem); + return this; + } + + /** + * The template files (versioned) + * @return templateFileLocations + **/ + @ApiModelProperty(example = "null", value = "The template files (versioned)") + public Map getTemplateFileLocations() { + return templateFileLocations; + } + + public void setTemplateFileLocations(Map templateFileLocations) { + this.templateFileLocations = templateFileLocations; + } + + public TemplateContext description(String description) { + this.description = description; + return this; + } + + /** + * The template description + * @return description + **/ + @ApiModelProperty(example = "null", value = "The template description") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public TemplateContext ownerInfo(OwnerInfo ownerInfo) { + this.ownerInfo = ownerInfo; + return this; + } + + /** + * Get ownerInfo + * @return ownerInfo + **/ + @ApiModelProperty(example = "null", value = "") + public OwnerInfo getOwnerInfo() { + return ownerInfo; + } + + public void setOwnerInfo(OwnerInfo ownerInfo) { + this.ownerInfo = ownerInfo; + } + + public TemplateContext id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @ApiModelProperty(example = "null", value = "") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public TemplateContext templateId(String templateId) { + this.templateId = templateId; + return this; + } + + /** + * The template context id + * @return templateId + **/ + @ApiModelProperty(example = "null", value = "The template context id") + public String getTemplateId() { + return templateId; + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TemplateContext templateContext = (TemplateContext) o; + return Objects.equals(this.templateType, templateContext.templateType) && + Objects.equals(this.templateFileLocations, templateContext.templateFileLocations) && + Objects.equals(this.description, templateContext.description) && + Objects.equals(this.ownerInfo, templateContext.ownerInfo) && + Objects.equals(this.id, templateContext.id) && + Objects.equals(this.templateId, templateContext.templateId); + } + + @Override + public int hashCode() { + return Objects.hash(templateType, templateFileLocations, description, ownerInfo, id, templateId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TemplateContext {\n"); + + sb.append(" templateType: ").append(toIndentedString(templateType)).append("\n"); + sb.append(" templateFileLocations: ").append(toIndentedString(templateFileLocations)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" ownerInfo: ").append(toIndentedString(ownerInfo)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java new file mode 100644 index 0000000..9e3d6ed --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java @@ -0,0 +1,193 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import com.sphereon.sdk.template_processor.model.OwnerInfo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * The merge template request. + */ +@ApiModel(description = "The merge template request.") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:04.861+02:00") +public class TemplateContextRequest { + /** + * Gets or Sets templateType + */ + public enum TemplateTypeEnum { + @SerializedName("OFFICE") + OFFICE("OFFICE"), + + @SerializedName("FREEMARKER") + FREEMARKER("FREEMARKER"); + + private String value; + + TemplateTypeEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("templateType") + private TemplateTypeEnum templateType = null; + + @SerializedName("description") + private String description = null; + + @SerializedName("ownerInfo") + private OwnerInfo ownerInfo = null; + + @SerializedName("templateId") + private String templateId = null; + + public TemplateContextRequest templateType(TemplateTypeEnum templateType) { + this.templateType = templateType; + return this; + } + + /** + * Get templateType + * @return templateType + **/ + @ApiModelProperty(example = "null", required = true, value = "") + public TemplateTypeEnum getTemplateType() { + return templateType; + } + + public void setTemplateType(TemplateTypeEnum templateType) { + this.templateType = templateType; + } + + public TemplateContextRequest description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @ApiModelProperty(example = "null", value = "") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public TemplateContextRequest ownerInfo(OwnerInfo ownerInfo) { + this.ownerInfo = ownerInfo; + return this; + } + + /** + * Get ownerInfo + * @return ownerInfo + **/ + @ApiModelProperty(example = "null", value = "") + public OwnerInfo getOwnerInfo() { + return ownerInfo; + } + + public void setOwnerInfo(OwnerInfo ownerInfo) { + this.ownerInfo = ownerInfo; + } + + public TemplateContextRequest templateId(String templateId) { + this.templateId = templateId; + return this; + } + + /** + * The template context id + * @return templateId + **/ + @ApiModelProperty(example = "null", value = "The template context id") + public String getTemplateId() { + return templateId; + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TemplateContextRequest templateContextRequest = (TemplateContextRequest) o; + return Objects.equals(this.templateType, templateContextRequest.templateType) && + Objects.equals(this.description, templateContextRequest.description) && + Objects.equals(this.ownerInfo, templateContextRequest.ownerInfo) && + Objects.equals(this.templateId, templateContextRequest.templateId); + } + + @Override + public int hashCode() { + return Objects.hash(templateType, description, ownerInfo, templateId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TemplateContextRequest {\n"); + + sb.append(" templateType: ").append(toIndentedString(templateType)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" ownerInfo: ").append(toIndentedString(ownerInfo)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java new file mode 100644 index 0000000..9b7c35f --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java @@ -0,0 +1,182 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import com.sphereon.sdk.template_processor.model.TemplateContext; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; + +/** + * The merge template response. + */ +@ApiModel(description = "The merge template response.") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:04.861+02:00") +public class TemplateContextResponse { + @SerializedName("creationTime") + private OffsetDateTime creationTime = null; + + @SerializedName("context") + private TemplateContext context = null; + + @SerializedName("id") + private String id = null; + + /** + * The status of the template + */ + public enum StatusEnum { + @SerializedName("CREATED") + CREATED("CREATED"), + + @SerializedName("UPDATED") + UPDATED("UPDATED"), + + @SerializedName("DELETED") + DELETED("DELETED"), + + @SerializedName("PROCESSING") + PROCESSING("PROCESSING"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("status") + private StatusEnum status = null; + + /** + * The creation date/time of this response in ISO 8601 format + * @return creationTime + **/ + @ApiModelProperty(example = "null", value = "The creation date/time of this response in ISO 8601 format") + public OffsetDateTime getCreationTime() { + return creationTime; + } + + public TemplateContextResponse context(TemplateContext context) { + this.context = context; + return this; + } + + /** + * Get context + * @return context + **/ + @ApiModelProperty(example = "null", value = "") + public TemplateContext getContext() { + return context; + } + + public void setContext(TemplateContext context) { + this.context = context; + } + + public TemplateContextResponse id(String id) { + this.id = id; + return this; + } + + /** + * Unique template context id + * @return id + **/ + @ApiModelProperty(example = "null", required = true, value = "Unique template context id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + /** + * The status of the template + * @return status + **/ + @ApiModelProperty(example = "null", required = true, value = "The status of the template") + public StatusEnum getStatus() { + return status; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TemplateContextResponse templateContextResponse = (TemplateContextResponse) o; + return Objects.equals(this.creationTime, templateContextResponse.creationTime) && + Objects.equals(this.context, templateContextResponse.context) && + Objects.equals(this.id, templateContextResponse.id) && + Objects.equals(this.status, templateContextResponse.status); + } + + @Override + public int hashCode() { + return Objects.hash(creationTime, context, id, status); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TemplateContextResponse {\n"); + + sb.append(" creationTime: ").append(toIndentedString(creationTime)).append("\n"); + sb.append(" context: ").append(toIndentedString(context)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/MergeApiTest.java b/java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/MergeApiTest.java new file mode 100644 index 0000000..7f52b33 --- /dev/null +++ b/java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/MergeApiTest.java @@ -0,0 +1,264 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.api; + +import com.sphereon.sdk.template_processor.handler.ApiException; +import com.sphereon.sdk.template_processor.model.DataSetResponse; +import com.sphereon.sdk.template_processor.model.ErrorResponse; +import com.sphereon.sdk.template_processor.model.TemplateContextResponse; +import com.sphereon.sdk.template_processor.model.TemplateContextRequest; +import com.sphereon.sdk.template_processor.model.MergeJobResponse; +import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.MergeSettings; +import java.io.File; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for MergeApi + */ +public class MergeApiTest { + + private final MergeApi api = new MergeApi(); + + + /** + * Store dataset + * + * Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createDataSetTest() throws ApiException { + String payload = null; + // DataSetResponse response = api.createDataSet(payload); + + // TODO: test validations + } + + /** + * Create template context + * + * Create a unique template context for your environment + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createTemplateContextTest() throws ApiException { + TemplateContextRequest templateRequest = null; + // TemplateContextResponse response = api.createTemplateContext(templateRequest); + + // TODO: test validations + } + + /** + * Delete a stored data set + * + * Delete a stored data set + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteDataSetTest() throws ApiException { + String dataSetId = null; + // DataSetResponse response = api.deleteDataSet(dataSetId); + + // TODO: test validations + } + + /** + * Delete a job manually + * + * Delete the merge job and all related files + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteJobTest() throws ApiException { + String jobId = null; + // MergeJobResponse response = api.deleteJob(jobId); + + // TODO: test validations + } + + /** + * Delete template context + * + * Delete a template context with all history + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteTemplateContextTest() throws ApiException { + String templateId = null; + // TemplateContextResponse response = api.deleteTemplateContext(templateId); + + // TODO: test validations + } + + /** + * Job definition and state + * + * Get the merge job definition and current state. Please not that you can differentiate based on http response status + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getJobTest() throws ApiException { + String jobId = null; + // MergeJobResponse response = api.getJob(jobId); + + // TODO: test validations + } + + /** + * Get all jobs + * + * Get all office text job definitions and their current state. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getJobsTest() throws ApiException { + List status = null; + // List response = api.getJobs(status); + + // TODO: test validations + } + + /** + * Get the result file + * + * Get a merge result document as a binary stream. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getResultStreamByIdTest() throws ApiException { + String jobId = null; + String streamId = null; + OutputSettings outputSettings = null; + // byte[] response = api.getResultStreamById(jobId, streamId, outputSettings); + + // TODO: test validations + } + + /** + * Get the result file + * + * Get all documents inside a compressed container as a binary stream. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getResultStreamsAsContainerTest() throws ApiException { + String jobId = null; + OutputSettings outputSettings = null; + // byte[] response = api.getResultStreamsAsContainer(jobId, outputSettings); + + // TODO: test validations + } + + /** + * Get template context + * + * Get an existing template context + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getTemplateContextTest() throws ApiException { + String templateId = null; + // TemplateContextResponse response = api.getTemplateContext(templateId); + + // TODO: test validations + } + + /** + * Submit merge job for processing + * + * Submit merge job run. + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void submitJobTest() throws ApiException { + MergeSettings mergesettings = null; + // MergeJobResponse response = api.submitJob(mergesettings); + + // TODO: test validations + } + + /** + * Update template context + * + * Update an existing template context for your environment + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateTemplateContextTest() throws ApiException { + TemplateContextRequest templateContextRequest = null; + // TemplateContextResponse response = api.updateTemplateContext(templateContextRequest); + + // TODO: test validations + } + + /** + * Upload template file + * + * Upload the Office template file + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void uploadTemplateFileTest() throws ApiException { + String templateId = null; + File stream = null; + // TemplateContextResponse response = api.uploadTemplateFile(templateId, stream); + + // TODO: test validations + } + +} diff --git a/java8-retrofit2/.gitignore b/java8-retrofit2/.gitignore new file mode 100644 index 0000000..a530464 --- /dev/null +++ b/java8-retrofit2/.gitignore @@ -0,0 +1,21 @@ +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# exclude jar for gradle wrapper +!gradle/wrapper/*.jar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +# build files +**/target +target +.gradle +build diff --git a/java8-retrofit2/.swagger-codegen-ignore b/java8-retrofit2/.swagger-codegen-ignore new file mode 100644 index 0000000..c5fa491 --- /dev/null +++ b/java8-retrofit2/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/java8-retrofit2/.travis.yml b/java8-retrofit2/.travis.yml new file mode 100644 index 0000000..33e7947 --- /dev/null +++ b/java8-retrofit2/.travis.yml @@ -0,0 +1,29 @@ +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +language: java +jdk: + - oraclejdk8 + - oraclejdk7 +before_install: + # ensure gradlew has proper permission + - chmod a+x ./gradlew +script: + # test using maven + - mvn test + # uncomment below to test using gradle + # - gradle test + # uncomment below to test using sbt + # - sbt test diff --git a/java8-retrofit2/LICENSE b/java8-retrofit2/LICENSE new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/java8-retrofit2/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/java8-retrofit2/README.md b/java8-retrofit2/README.md new file mode 100644 index 0000000..0d63129 --- /dev/null +++ b/java8-retrofit2/README.md @@ -0,0 +1,39 @@ +# template-processor-sdk-java8-retrofit2 + +## Requirements + +Building the API client library requires [Maven](https://maven.apache.org/) to be installed. + +## Installation & Usage + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn install +``` + +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: + +```shell +mvn deploy +``` + +Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information. + +After the client library is installed/deployed, you can use it in your Maven project by adding the following to your *pom.xml*: + +```xml + + com.sphereon.sdk + template-processor-sdk-java8-retrofit2 + 0.1.0 + compile + + +``` + +## Author + +dev@sphereon.com + + diff --git a/java8-retrofit2/build.gradle b/java8-retrofit2/build.gradle new file mode 100644 index 0000000..7d832de --- /dev/null +++ b/java8-retrofit2/build.gradle @@ -0,0 +1,111 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' + +group = 'com.sphereon.sdk' +version = '0.1.0' + +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.5.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' + } +} + +repositories { + jcenter() +} + + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 23 + buildToolsVersion '23.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 23 + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_7 + targetCompatibility JavaVersion.VERSION_1_7 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided 'javax.annotation:jsr250-api:1.0' + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDir + task.destinationDir = project.file("${project.buildDir}/outputs/jar") + task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task); + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven' + + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + install { + repositories.mavenInstaller { + pom.artifactId = 'template-processor-sdk-java8-retrofit2' + } + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +ext { + oltu_version = "1.0.1" + retrofit_version = "2.0.2" + swagger_annotations_version = "1.5.8" + junit_version = "4.12" +} + +dependencies { + compile "com.squareup.retrofit2:retrofit:$retrofit_version" + compile "com.squareup.retrofit2:converter-scalars:$retrofit_version" + compile "com.squareup.retrofit2:converter-gson:$retrofit_version" + compile "io.swagger:swagger-annotations:$swagger_annotations_version" + compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version" + + testCompile "junit:junit:$junit_version" +} diff --git a/java8-retrofit2/build.sbt b/java8-retrofit2/build.sbt new file mode 100644 index 0000000..9ee7f3c --- /dev/null +++ b/java8-retrofit2/build.sbt @@ -0,0 +1,20 @@ +lazy val root = (project in file(".")). + settings( + organization := "com.sphereon.sdk", + name := "template-processor-sdk-java8-retrofit2", + version := "0.1.0", + scalaVersion := "2.11.4", + scalacOptions ++= Seq("-feature"), + javacOptions in compile ++= Seq("-Xlint:deprecation"), + publishArtifact in (Compile, packageDoc) := false, + resolvers += Resolver.mavenLocal, + libraryDependencies ++= Seq( + "com.squareup.retrofit2" % "retrofit" % "2.0.2" % "compile", + "com.squareup.retrofit2" % "converter-scalars" % "2.0.2" % "compile", + "com.squareup.retrofit2" % "converter-gson" % "2.0.2" % "compile", + "io.swagger" % "swagger-annotations" % "1.5.8" % "compile", + "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", + "junit" % "junit" % "4.12" % "test", + "com.novocode" % "junit-interface" % "0.10" % "test" + ) + ) diff --git a/java8-retrofit2/docs/DataSetResponse.md b/java8-retrofit2/docs/DataSetResponse.md new file mode 100644 index 0000000..3e7502d --- /dev/null +++ b/java8-retrofit2/docs/DataSetResponse.md @@ -0,0 +1,22 @@ + +# DataSetResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**completionTime** | [**OffsetDateTime**](OffsetDateTime.md) | The completion date/time of this template in ISO 8601 format | [optional] +**creationTime** | [**OffsetDateTime**](OffsetDateTime.md) | The creation date/time of this template in ISO 8601 format | [optional] +**id** | **String** | Unique dataset id | +**status** | [**StatusEnum**](#StatusEnum) | The status of the template | + + + +## Enum: StatusEnum +Name | Value +---- | ----- +CREATED | "CREATED" +UPDATED | "UPDATED" +DELETED | "DELETED" + + + diff --git a/java8-retrofit2/docs/Error.md b/java8-retrofit2/docs/Error.md new file mode 100644 index 0000000..249e09f --- /dev/null +++ b/java8-retrofit2/docs/Error.md @@ -0,0 +1,22 @@ + +# Error + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **String** | | +**level** | [**LevelEnum**](#LevelEnum) | | +**cause** | [**Error**](Error.md) | | [optional] +**message** | **String** | | + + + +## Enum: LevelEnum +Name | Value +---- | ----- +INFO | "INFO" +WARNING | "WARNING" +FATAL | "FATAL" + + + diff --git a/java8-retrofit2/docs/ErrorResponse.md b/java8-retrofit2/docs/ErrorResponse.md new file mode 100644 index 0000000..7132a3b --- /dev/null +++ b/java8-retrofit2/docs/ErrorResponse.md @@ -0,0 +1,10 @@ + +# ErrorResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**List<Error>**](Error.md) | | [optional] + + + diff --git a/java8-retrofit2/docs/Lifecycle.md b/java8-retrofit2/docs/Lifecycle.md new file mode 100644 index 0000000..b53a347 --- /dev/null +++ b/java8-retrofit2/docs/Lifecycle.md @@ -0,0 +1,27 @@ + +# Lifecycle + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**actionTime** | [**OffsetDateTime**](OffsetDateTime.md) | The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation | [optional] +**action** | [**ActionEnum**](#ActionEnum) | | [optional] +**type** | [**TypeEnum**](#TypeEnum) | | [optional] + + + +## Enum: ActionEnum +Name | Value +---- | ----- +DELETE | "DELETE" + + + +## Enum: TypeEnum +Name | Value +---- | ----- +RETRIEVAL | "RETRIEVAL" +TIME | "TIME" + + + diff --git a/java8-retrofit2/docs/MergeApi.md b/java8-retrofit2/docs/MergeApi.md new file mode 100644 index 0000000..255a0ba --- /dev/null +++ b/java8-retrofit2/docs/MergeApi.md @@ -0,0 +1,718 @@ +# MergeApi + +All URIs are relative to *https://gw.api.cloud.sphereon.com/* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createDataSet**](MergeApi.md#createDataSet) | **POST** template-processor/merge/0.1/datasets | Store dataset +[**createTemplateContext**](MergeApi.md#createTemplateContext) | **POST** template-processor/merge/0.1/templates | Create template context +[**deleteDataSet**](MergeApi.md#deleteDataSet) | **DELETE** template-processor/merge/0.1/datasets/{dataSetId} | Delete a stored data set +[**deleteJob**](MergeApi.md#deleteJob) | **DELETE** template-processor/merge/0.1/jobs/{jobId} | Delete a job manually +[**deleteTemplateContext**](MergeApi.md#deleteTemplateContext) | **DELETE** template-processor/merge/0.1/templates/{templateId} | Delete template context +[**getJob**](MergeApi.md#getJob) | **GET** template-processor/merge/0.1/jobs/{jobId} | Job definition and state +[**getJobs**](MergeApi.md#getJobs) | **GET** template-processor/merge/0.1/jobs | Get all jobs +[**getResultStreamById**](MergeApi.md#getResultStreamById) | **PUT** template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file +[**getResultStreamsAsContainer**](MergeApi.md#getResultStreamsAsContainer) | **PUT** template-processor/merge/0.1/jobs/{jobId}/result/container | Get the result file +[**getTemplateContext**](MergeApi.md#getTemplateContext) | **GET** template-processor/merge/0.1/templates/{templateId} | Get template context +[**submitJob**](MergeApi.md#submitJob) | **PUT** template-processor/merge/0.1/jobs | Submit merge job for processing +[**updateTemplateContext**](MergeApi.md#updateTemplateContext) | **PUT** template-processor/merge/0.1/templates | Update template context +[**uploadTemplateFile**](MergeApi.md#uploadTemplateFile) | **POST** template-processor/merge/0.1/templates/{templateId} | Upload template file + + + +# **createDataSet** +> DataSetResponse createDataSet(payload) + +Store dataset + +Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String payload = "payload_example"; // String | The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] +try { + DataSetResponse result = apiInstance.createDataSet(payload); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#createDataSet"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **payload** | **String**| The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] | + +### Return type + +[**DataSetResponse**](DataSetResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + + +# **createTemplateContext** +> TemplateContextResponse createTemplateContext(templateRequest) + +Create template context + +Create a unique template context for your environment + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +TemplateContextRequest templateRequest = new TemplateContextRequest(); // TemplateContextRequest | The template request +try { + TemplateContextResponse result = apiInstance.createTemplateContext(templateRequest); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#createTemplateContext"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| The template request | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + + +# **deleteDataSet** +> DataSetResponse deleteDataSet(dataSetId) + +Delete a stored data set + +Delete a stored data set + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String dataSetId = "dataSetId_example"; // String | dataSetId +try { + DataSetResponse result = apiInstance.deleteDataSet(dataSetId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#deleteDataSet"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dataSetId** | **String**| dataSetId | + +### Return type + +[**DataSetResponse**](DataSetResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + + +# **deleteJob** +> MergeJobResponse deleteJob(jobId) + +Delete a job manually + +Delete the merge job and all related files + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String jobId = "jobId_example"; // String | jobId +try { + MergeJobResponse result = apiInstance.deleteJob(jobId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#deleteJob"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **String**| jobId | + +### Return type + +[**MergeJobResponse**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + + +# **deleteTemplateContext** +> TemplateContextResponse deleteTemplateContext(templateId) + +Delete template context + +Delete a template context with all history + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String templateId = "templateId_example"; // String | templateId +try { + TemplateContextResponse result = apiInstance.deleteTemplateContext(templateId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#deleteTemplateContext"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **String**| templateId | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + + +# **getJob** +> MergeJobResponse getJob(jobId) + +Job definition and state + +Get the merge job definition and current state. Please not that you can differentiate based on http response status + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String jobId = "jobId_example"; // String | jobId +try { + MergeJobResponse result = apiInstance.getJob(jobId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#getJob"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **String**| jobId | + +### Return type + +[**MergeJobResponse**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + + +# **getJobs** +> List<MergeJobResponse> getJobs(status) + +Get all jobs + +Get all office text job definitions and their current state. + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +List status = Arrays.asList("status_example"); // List | A list of status to filter on. +try { + List result = apiInstance.getJobs(status); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#getJobs"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**List<String>**](String.md)| A list of status to filter on. | [optional] [enum: CREATED, UPDATED, PROCESSING, DONE, ERROR, DELETED] + +### Return type + +[**List<MergeJobResponse>**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + + +# **getResultStreamById** +> byte[] getResultStreamById(jobId, streamId, outputSettings) + +Get the result file + +Get a merge result document as a binary stream. + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String jobId = "jobId_example"; // String | jobId +String streamId = "streamId_example"; // String | streamId +OutputSettings outputSettings = new OutputSettings(); // OutputSettings | outputSettings +try { + byte[] result = apiInstance.getResultStreamById(jobId, streamId, outputSettings); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#getResultStreamById"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **String**| jobId | + **streamId** | **String**| streamId | + **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] + +### Return type + +**byte[]** + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/octet-stream + + +# **getResultStreamsAsContainer** +> byte[] getResultStreamsAsContainer(jobId, outputSettings) + +Get the result file + +Get all documents inside a compressed container as a binary stream. + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String jobId = "jobId_example"; // String | jobId +OutputSettings outputSettings = new OutputSettings(); // OutputSettings | outputSettings +try { + byte[] result = apiInstance.getResultStreamsAsContainer(jobId, outputSettings); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#getResultStreamsAsContainer"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **String**| jobId | + **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] + +### Return type + +**byte[]** + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/octet-stream + + +# **getTemplateContext** +> TemplateContextResponse getTemplateContext(templateId) + +Get template context + +Get an existing template context + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String templateId = "templateId_example"; // String | The template context name unique for your environment +try { + TemplateContextResponse result = apiInstance.getTemplateContext(templateId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#getTemplateContext"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **String**| The template context name unique for your environment | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + + +# **submitJob** +> MergeJobResponse submitJob(mergesettings) + +Submit merge job for processing + +Submit merge job run. + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +MergeSettings mergesettings = new MergeSettings(); // MergeSettings | The merge- and output settings +try { + MergeJobResponse result = apiInstance.submitJob(mergesettings); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#submitJob"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **mergesettings** | [**MergeSettings**](MergeSettings.md)| The merge- and output settings | + +### Return type + +[**MergeJobResponse**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + + +# **updateTemplateContext** +> TemplateContextResponse updateTemplateContext(templateContextRequest) + +Update template context + +Update an existing template context for your environment + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +TemplateContextRequest templateContextRequest = new TemplateContextRequest(); // TemplateContextRequest | templateContextRequest +try { + TemplateContextResponse result = apiInstance.updateTemplateContext(templateContextRequest); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#updateTemplateContext"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateContextRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| templateContextRequest | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + + +# **uploadTemplateFile** +> TemplateContextResponse uploadTemplateFile(templateId, stream) + +Upload template file + +Upload the Office template file + +### Example +```java +// Import classes: +//import com.sphereon.sdk.template_processor.handler.ApiClient; +//import com.sphereon.sdk.template_processor.handler.ApiException; +//import com.sphereon.sdk.template_processor.handler.Configuration; +//import com.sphereon.sdk.template_processor.handler.auth.*; +//import com.sphereon.sdk.template_processor.api.MergeApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure OAuth2 access token for authorization: oauth2schema +OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); +oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + +MergeApi apiInstance = new MergeApi(); +String templateId = "templateId_example"; // String | The template context name unique for your environment +File stream = new File("/path/to/file.txt"); // File | The template (file/inputstream) to store +try { + TemplateContextResponse result = apiInstance.uploadTemplateFile(templateId, stream); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MergeApi#uploadTemplateFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **String**| The template context name unique for your environment | + **stream** | **File**| The template (file/inputstream) to store | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json;charset=UTF-8 + diff --git a/java8-retrofit2/docs/MergeJob.md b/java8-retrofit2/docs/MergeJob.md new file mode 100644 index 0000000..1cebcea --- /dev/null +++ b/java8-retrofit2/docs/MergeJob.md @@ -0,0 +1,32 @@ + +# MergeJob + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resultFolderPath** | **String** | The target folder path of result files | [optional] +**completionTime** | [**OffsetDateTime**](OffsetDateTime.md) | The completion date/time of this job in ISO 8601 format | [optional] +**jobId** | **String** | The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation | +**resultContainerId** | **String** | The target container id of result files | [optional] +**creationTime** | [**OffsetDateTime**](OffsetDateTime.md) | The creation date/time of this job in ISO 8601 format | [optional] +**dataSetId** | **String** | Data set id | [optional] +**resultStreams** | [**List<StreamLocation>**](StreamLocation.md) | The storage locations of the result files. | +**headerDataSetIds** | **List<String>** | Header data set ids | [optional] +**mergeSettings** | [**MergeSettings**](MergeSettings.md) | | [optional] +**statusMessage** | **String** | A status message, which can be informational, warning or error. A message here does not indicate an error perse | [optional] +**status** | [**StatusEnum**](#StatusEnum) | The status of the job | + + + +## Enum: StatusEnum +Name | Value +---- | ----- +CREATED | "CREATED" +UPDATED | "UPDATED" +PROCESSING | "PROCESSING" +DONE | "DONE" +ERROR | "ERROR" +DELETED | "DELETED" + + + diff --git a/java8-retrofit2/docs/MergeJobResponse.md b/java8-retrofit2/docs/MergeJobResponse.md new file mode 100644 index 0000000..9926809 --- /dev/null +++ b/java8-retrofit2/docs/MergeJobResponse.md @@ -0,0 +1,25 @@ + +# MergeJobResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**jobId** | **String** | The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation | +**job** | [**MergeJob**](MergeJob.md) | | [optional] +**statusMessage** | **String** | A status message, which can be informational, warning or error. AA message here does not indicate an error perse | [optional] +**status** | [**StatusEnum**](#StatusEnum) | The status of the job | + + + +## Enum: StatusEnum +Name | Value +---- | ----- +CREATED | "CREATED" +UPDATED | "UPDATED" +PROCESSING | "PROCESSING" +DONE | "DONE" +ERROR | "ERROR" +DELETED | "DELETED" + + + diff --git a/java8-retrofit2/docs/MergeSettings.md b/java8-retrofit2/docs/MergeSettings.md new file mode 100644 index 0000000..3192e2d --- /dev/null +++ b/java8-retrofit2/docs/MergeSettings.md @@ -0,0 +1,34 @@ + +# MergeSettings + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lifecycle** | [**Lifecycle**](Lifecycle.md) | | [optional] +**mergeResult** | [**MergeResultEnum**](#MergeResultEnum) | | [optional] +**dataSetId** | **String** | Data set id | +**engine** | [**EngineEnum**](#EngineEnum) | | [optional] +**headerDataSetIds** | **List<String>** | optional header data set ids | [optional] +**templateVersion** | **Integer** | Template version | [optional] +**resultStreamLocation** | [**StreamLocation**](StreamLocation.md) | The output location of the result files. | +**templateId** | **String** | Template id | +**outputSettings** | [**OutputSettings**](OutputSettings.md) | | + + + +## Enum: MergeResultEnum +Name | Value +---- | ----- +SINGLE_FILE | "SINGLE_FILE" +SEPARATE_FILES | "SEPARATE_FILES" + + + +## Enum: EngineEnum +Name | Value +---- | ----- +BASIC | "BASIC" +PREMIUM | "PREMIUM" + + + diff --git a/java8-retrofit2/docs/OutputSettings.md b/java8-retrofit2/docs/OutputSettings.md new file mode 100644 index 0000000..e1a9c9e --- /dev/null +++ b/java8-retrofit2/docs/OutputSettings.md @@ -0,0 +1,42 @@ + +# OutputSettings + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**deliveryFormat** | [**DeliveryFormatEnum**](#DeliveryFormatEnum) | | [optional] +**outputFormat** | [**OutputFormatEnum**](#OutputFormatEnum) | | [optional] + + + +## Enum: DeliveryFormatEnum +Name | Value +---- | ----- +PLAIN | "PLAIN" +ZIP | "ZIP" +_7ZIP | "_7ZIP" + + + +## Enum: OutputFormatEnum +Name | Value +---- | ----- +DOC | "DOC" +DOCX | "DOCX" +RTF | "RTF" +PDF | "PDF" +XPS | "XPS" +SVG | "SVG" +HTML | "HTML" +ODT | "ODT" +TIFF | "TIFF" +PNG | "PNG" +BMP | "BMP" +JPEG | "JPEG" +TXT | "TXT" +XML | "XML" +JSON | "JSON" +DEFAULT | "DEFAULT" + + + diff --git a/java8-retrofit2/docs/OwnerInfo.md b/java8-retrofit2/docs/OwnerInfo.md new file mode 100644 index 0000000..245929a --- /dev/null +++ b/java8-retrofit2/docs/OwnerInfo.md @@ -0,0 +1,13 @@ + +# OwnerInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**phone** | **String** | The owner's phone number | [optional] +**companyDepartment** | **String** | The owner's company/department | [optional] +**name** | **String** | The owner's name | [optional] +**email** | **String** | The owner's email address | [optional] + + + diff --git a/java8-retrofit2/docs/StreamLocation.md b/java8-retrofit2/docs/StreamLocation.md new file mode 100644 index 0000000..9bfe3a2 --- /dev/null +++ b/java8-retrofit2/docs/StreamLocation.md @@ -0,0 +1,13 @@ + +# StreamLocation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**folderPath** | **String** | | [optional] +**originalFileName** | **String** | | [optional] +**containerId** | **String** | | [optional] +**fileId** | **String** | | [optional] + + + diff --git a/java8-retrofit2/docs/TemplateContext.md b/java8-retrofit2/docs/TemplateContext.md new file mode 100644 index 0000000..e0e23c7 --- /dev/null +++ b/java8-retrofit2/docs/TemplateContext.md @@ -0,0 +1,23 @@ + +# TemplateContext + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**templateType** | [**TemplateTypeEnum**](#TemplateTypeEnum) | | +**templateFileLocations** | [**Map<String, StreamLocation>**](StreamLocation.md) | The template files (versioned) | [optional] +**description** | **String** | The template description | [optional] +**ownerInfo** | [**OwnerInfo**](OwnerInfo.md) | | [optional] +**id** | **String** | | [optional] +**templateId** | **String** | The template context id | [optional] + + + +## Enum: TemplateTypeEnum +Name | Value +---- | ----- +OFFICE | "OFFICE" +FREEMARKER | "FREEMARKER" + + + diff --git a/java8-retrofit2/docs/TemplateContextRequest.md b/java8-retrofit2/docs/TemplateContextRequest.md new file mode 100644 index 0000000..534cbd2 --- /dev/null +++ b/java8-retrofit2/docs/TemplateContextRequest.md @@ -0,0 +1,21 @@ + +# TemplateContextRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**templateType** | [**TemplateTypeEnum**](#TemplateTypeEnum) | | +**description** | **String** | | [optional] +**ownerInfo** | [**OwnerInfo**](OwnerInfo.md) | | [optional] +**templateId** | **String** | The template context id | [optional] + + + +## Enum: TemplateTypeEnum +Name | Value +---- | ----- +OFFICE | "OFFICE" +FREEMARKER | "FREEMARKER" + + + diff --git a/java8-retrofit2/docs/TemplateContextResponse.md b/java8-retrofit2/docs/TemplateContextResponse.md new file mode 100644 index 0000000..8814408 --- /dev/null +++ b/java8-retrofit2/docs/TemplateContextResponse.md @@ -0,0 +1,23 @@ + +# TemplateContextResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**creationTime** | [**OffsetDateTime**](OffsetDateTime.md) | The creation date/time of this response in ISO 8601 format | [optional] +**context** | [**TemplateContext**](TemplateContext.md) | | [optional] +**id** | **String** | Unique template context id | +**status** | [**StatusEnum**](#StatusEnum) | The status of the template | + + + +## Enum: StatusEnum +Name | Value +---- | ----- +CREATED | "CREATED" +UPDATED | "UPDATED" +DELETED | "DELETED" +PROCESSING | "PROCESSING" + + + diff --git a/java8-retrofit2/git_push.sh b/java8-retrofit2/git_push.sh new file mode 100644 index 0000000..ed37461 --- /dev/null +++ b/java8-retrofit2/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/java8-retrofit2/gradle.properties b/java8-retrofit2/gradle.properties new file mode 100644 index 0000000..05644f0 --- /dev/null +++ b/java8-retrofit2/gradle.properties @@ -0,0 +1,2 @@ +# Uncomment to build for Android +#target = android \ No newline at end of file diff --git a/java8-retrofit2/gradle/wrapper/gradle-wrapper.jar b/java8-retrofit2/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..2c6137b87896c8f70315ae454e00a969ef5f6019 GIT binary patch literal 53639 zcmafaW0a=B^559DjdyI@wr$%scWm3Xy<^+Pj_sKpY&N+!|K#4>Bz;ajPk*RBjZ;RV75EK*;qpZCo(BB5~-#>pF^k0$_Qx&3rs}{XFZ)$uJU-ZpbB>L3?|knJ{J+ge{%=bI`#Yn9v&Fxx>fd=_|H)(FY-DO{ z_Wxu>{a02GXCp^PGw1(fh-I*;dGTM?mA^##pNEJ#c-Y%I7@3kW(VN&Bxw!bn$iWOU zB8BZ)vT4(}GX%q~h3EYwbR?$d6|xnvg_e@4>dl5l+%FtPbGqa`;Uk##t$#g&CK4GO zz%my0ZR1Fv@~b2_>T0cBP)ECz-Uc^nW9e+`W4!=mSJPopgoe3A(NMzBd0mR?$&3XA zRL1}bJ2Q%R#bWHrC`j_)tPKMEyHuGSpdJMhT(Ob(e9H+#=Skp%#jzj=BVvc(-RSWB z{_T`UcEeWD{z`!3-y;_N|Ljr4%f;2qPSM%n?_s%GnYsM!d3p)CxmudpyIPqTxjH!i z;}A+!>>N;pko++K5n~I7m4>yco2%Zc$59RohB(l%KcJc9s^nw^?2JGy>O4#x5+CZH zqU~7kA>WE)ngvsdfKhLUX0Lc3r+In0Uyn}LZhm?n){&LHNJws546du%pia=j zyH8CD{^Qx%kFe@kX*$B!DxLa(Y?BO32sm8%#_ynjU-m>PJbabL`~0Ai zeJm<6okftSJUd2!X(>}i#KAh-NR2!Kg%c2JD=G|T%@Q0JQzqKB)Qc4E-{ZF=#PGZg zior4-caRB-Jj;l}Xb_!)TjB`jC}})6z~3AsRE&t~CO&)g{dqM0iK;lvav8?kE1< zmCrHxDZe?&rEK7M4tG-i!`Zk-*IzSk0M0&Ul8+J>*UD(A^;bAFDcz>d&lzAlw}b## zjfu@)rAou-86EN%8_Nv;%bNUmy*<6sbgB9)ZCihdSh_VT2iGFv+T8p&Z&wO02nKtdx?eZh^=*<>SZHSn(Pv)bgn{ zb15>YnVnJ^PO025c~^uK&W1C1XTs1az44L~-9Z-fU3{VvA?T& zdpi&S`mZ|$tMuN{{i|O}fAx#*KkroHe;6z^7c*x`2Rk!a2L~HB$A4@(Rz*hvM+og( zJW+4;S-A$#+Gec-rn8}at+q5gRrNy^iU?Z4Gz_|qzS~sG_EV#m%-VW!jQ>f3jc-Vq zW;~>OqI1Th&*fx#`c^=|A4GGoDp+ZH!n0_fDo-ks3d&GlT=(qzr(?Qw`PHvo3PoU6YJE zu{35)=P`LRm@+=ziAI)7jktM6KHx*v&WHVBYp<~UtR3c?Wv_{a0(k&NF!o#+@|Y6Y z>{||-i0v8N2ntXRrVx~#Z1JMA3C2ki}OkJ4W`WjZIuLByNUEL2HqqKrbi{9a8` zk-w0I$a<6;W6&X<&EbIqul`;nvc+D~{g5al{0oOSp~ zhg;6nG1Bh-XyOBM63jb_z`7apSsta``K{!Q{}mZ!m4rTmWi^<*BN2dh#PLZ)oXIJY zl#I3@$+8Fvi)m<}lK_}7q~VN%BvT^{q~ayRA7mwHO;*r0ePSK*OFv_{`3m+96HKgt z=nD-=Pv90Ae1p)+SPLT&g(Fdqbcc(Vnk5SFyc|Tq08qS;FJ1K4rBmtns%Su=GZchE zR(^9W-y!{QfeVPBeHpaBA{TZpQ*(d$H-*GI)Y}>X2Lk&27aFkqXE7D?G_iGav2r&P zx3V=8GBGi8agj5!H?lDMr`1nYmvKZj!~0{GMPb!tM=VIJXbTk9q8JRoSPD*CH@4I+ zfG-6{Z=Yb->)MIUmXq-#;=lNCyF1G*W+tW6gdD||kQfW$J_@=Y9KmMD!(t#9-fPcJ z>%&KQC-`%E`{y^i!1u=rJP_hhGErM$GYE3Y@ZzzA2a-PC>yaoDziZT#l+y)tfyR}U z5Epq`ACY|VUVISHESM5$BpWC0FpDRK&qi?G-q%Rd8UwIq&`d(Mqa<@(fH!OfNIgFICEG?j_Gj7FS()kY^P(I!zbl`%HB z7Rx=q2vZFjy^XypORT$^NJv_`Vm7-gkJWYsN5xg>snt5%oG?w1K#l_UH<>4@d0G@3 z)r?|yba6;ksyc+5+8YZ?)NZ+ER!4fIzK>>cs^(;ib7M}asT&)+J=J@U^~ffJ>65V# zt_lyUp52t`vT&gcQ%a6Ca)p8u6v}3iJzf?zsx#e9t)-1OtqD$Mky&Lpz6_v?p0|y4 zI{Nq9z89OxQbsqX)UYj z(BGu`28f8C^e9R2jf0Turq;v+fPCWD*z8!8-Q-_s`ILgwo@mtnjpC_D$J zCz7-()9@8rQ{4qy<5;*%bvX3k$grUQ{Bt;B#w))A+7ih631uN?!_~?i^g+zO^lGK$>O1T1$6VdF~%FKR6~Px%M`ibJG*~uQ>o^r9qLo*`@^ry@KX^$LH0>NGPL%MG8|;8 z@_)h2uvB1M!qjGtZgy~7-O=GUa`&;xEFvC zwIt?+O;Fjwgn3aE%`_XfZEw5ayP+JS8x?I|V3ARbQ5@{JAl1E*5a{Ytc(UkoDKtD# zu)K4XIYno7h3)0~5&93}pMJMDr*mcYM|#(FXS@Pj)(2!cl$)R-GwwrpOW!zZ2|wN) zE|B38xr4_NBv|%_Lpnm$We<_~S{F1x42tph3PAS`0saF^PisF6EDtce+9y6jdITmu zqI-CLeTn2%I3t3z_=e=YGzUX6i5SEujY`j|=aqv#(Q=iWPkKhau@g|%#xVC2$6<{2 zAoimy5vLq6rvBo3rv&^VqtaKt_@Vx^gWN{f4^@i6H??!ra^_KC-ShWC(GBNt3o~T^ zudX<0v!;s$rIflR?~Tu4-D=%~E=glv+1|pg*ea30re-2K@8EqQ{8#WY4X-br_!qpq zL;PRCi^e~EClLpGb1MrsXCqfD2m615mt;EyR3W6XKU=4(A^gFCMMWgn#5o1~EYOH* zOlolGlD;B!j%lRFaoc)q_bOH-O!r}g1Bhlhy*dRoTf-bI%`A`kU)Q=HA9HgCKqq&A z2$_rtL-uIA7`PiJfw380j@M4Fff-?(Xe(aR`4>BZyDN2$2E7QQ1}95@X819fnA(}= za=5VF-%;l}aHSRHCfs(#Qf%dPue~fGpy7qPs*eLX2Aa0+@mPxnS4Wm8@kP7KEL)8s z@tNmawLHST-FS4h%20%lVvd zkXpxWa43E`zX{6-{2c+L9C`l(ZRG8`kO9g7t&hx?>j~5_C;y5u*Bvl79)Bq?@T7bN z=G2?QDa0J3VwCfZG0BjOFP>xz4jtv3LS>jz#1x~b9u1*n9>Y6?u8W?I^~;N{GC<1y} zc&Wz{L`kJUSt=oA=5ZHtNj3PSB%w5^=0(U7GC^zUgcdkujo>ruzyBurtTjKuNf1-+ zzn~oZFXCbR&xq&W{ar~T`@fNef5M$u^-C92HMBo=*``D8Q^ktX z(qT{_R=*EI?-R9nNUFNR#{(Qb;27bM14bjI`c#4RiinHbnS445Jy^%krK%kpE zFw%RVQd6kqsNbiBtH*#jiPu3(%}P7Vhs0G9&Dwb4E-hXO!|whZ!O$J-PU@j#;GrzN zwP9o=l~Nv}4OPvv5rVNoFN>Oj0TC%P>ykicmFOx*dyCs@7XBH|w1k2hb`|3|i^GEL zyg7PRl9eV ztQ1z)v~NwH$ebcMSKc-4D=?G^3sKVG47ZWldhR@SHCr}SwWuj5t!W$&HAA*Wo_9tM zw5vs`2clw`z@~R-#W8d4B8!rFtO}+-$-{6f_`O-^-EhGraqg%$D618&<9KG``D|Rb zQJ&TSE3cfgf8i}I^DLu+-z{{;QM>K3I9~3R9!0~=Y`A1=6`CF#XVH@MWO?3@xa6ev zdw08_9L=>3%)iXA(_CE@ipRQ{Tb+@mxoN^3ktgmt^mJ(u#=_Plt?5qMZOA3&I1&NU zOG+0XTsIkbhGsp(ApF2MphRG^)>vqagn!-%pRnppa%`-l@DLS0KUm8*e9jGT0F%0J z*-6E@Z*YyeZ{eP7DGmxQedo}^+w zM~>&E$5&SW6MxP##J56Eo@0P34XG})MLCuhMyDFf**?tziO?_Ad&Jhd z`jok^B{3ff*7cydrxYjdxX`14`S+34kW^$fxDmNn2%fsQ6+Zou0%U{3Y>L}UIbQbw z*E#{Von}~UEAL?vvihW)4?Kr-R?_?JSN?B?QzhUWj==1VNEieTMuTJ#-nl*c@qP+` zGk@aE0oAD5!9_fO=tDQAt9g0rKTr{Z0t~S#oy5?F3&aWm+igqKi| zK9W3KRS|1so|~dx%90o9+FVuN7)O@by^mL=IX_m^M87i&kT1^#9TCpI@diZ_p$uW3 zbA+-ER9vJ{ii?QIZF=cfZT3#vJEKC|BQhNd zGmxBDLEMnuc*AET~k8g-P-K+S~_(+GE9q6jyIMka(dr}(H% z$*z;JDnyI@6BQ7KGcrv03Hn(abJ_-vqS>5~m*;ZJmH$W`@csQ8ejiC8S#sYTB;AoF zXsd!kDTG#3FOo-iJJpd$C~@8}GQJ$b1A85MXp?1#dHWQu@j~i4L*LG40J}+V=&-(g zh~Hzk(l1$_y}PX}Ypluyiib0%vwSqPaJdy9EZ;?+;lFF8%Kb7cwPD17C}@N z2OF;}QCM4;CDx~d;XnunQAx5mQbL#);}H57I+uB9^v|cmZwuXGkoH-cAJ%nIjSO$E z{BpYdC9poyO5pvdL+ZPWFuK}c8WGEq-#I3myONq^BL%uG`RIoSBTEK9sAeU4UBh7f zzM$s|&NtAGN&>`lp5Ruc%qO^oL;VGnzo9A8{fQn@YoORA>qw;^n2pydq>;Ji9(sPH zLGsEeTIH?_6C3uyWoW(gkmM(RhFkiDuQPXmL7Oes(+4)YIHt+B@i`*%0KcgL&A#ua zAjb8l_tO^Ag!ai3f54t?@{aoW%&Hdst}dglRzQlS=M{O!=?l z*xY2vJ?+#!70RO8<&N^R4p+f=z z*&_e}QT%6-R5Wt66moGfvorp$yE|3=-2_(y`FnL0-7A?h%4NMZ#F#Rcb^}971t5ib zw<20w|C?HVv%|)Q)Pef8tGjwQ+!+<{>IVjr@&SRVO*PyC?Efnsq;Eq{r;U2)1+tgp z)@pZ}gJmzf{m=K@7YA_8X#XK+)F465h%z38{V-K8k%&_GF+g^s&9o6^B-&|MDFI)H zj1ofQL>W(MJLOu3xkkJZV@$}GEG~XBz~WvRjxhT0$jKKZKjuKi$rmR-al}Hb3xDL) z^xGG2?5+vUAo4I;$(JgeVQe9+e)vvJ={pO~05f|J={%dsSLVcF>@F9p4|nYK&hMua zWjNvRod}l~WmGo|LX2j#w$r$y?v^H?Gu(_?(WR_%D@1I@$yMTKqD=Ca2) zWBQmx#A$gMrHe^A8kxAgB}c2R5)14G6%HfpDf$(Di|p8ntcN;Hnk)DR1;toC9zo77 zcWb?&&3h65(bLAte%hstI9o%hZ*{y=8t$^!y2E~tz^XUY2N2NChy;EIBmf(Kl zfU~&jf*}p(r;#MP4x5dI>i`vjo`w?`9^5(vfFjmWp`Ch!2Ig}rkpS|T%g@2h-%V~R zg!*o7OZSU-%)M8D>F^|z+2F|!u1mOt?5^zG%;{^CrV^J?diz9AmF!UsO?Pl79DKvD zo-2==yjbcF5oJY!oF?g)BKmC8-v|iL6VT|Gj!Gk5yaXfhs&GeR)OkZ}=q{exBPv)& zV!QTQBMNs>QQ))>(rZOn0PK+-`|7vKvrjky3-Kmuf8uJ`x6&wsA5S(tMf=m;79Hzv za%lZ(OhM&ZUCHtM~FRd#Uk3Iy%oXe^)!Jci39D(a$51WER+%gIZYP)!}nDtDw_FgPL3e>1ilFN=M(j~V` zjOtRhOB8bX8}*FD0oy}+s@r4XQT;OFH__cEn-G#aYHpJDI4&Zo4y2>uJdbPYe zOMGMvbA6#(p00i1{t~^;RaHmgZtE@we39mFaO0r|CJ0zUk$|1Pp60Q&$A;dm>MfP# zkfdw?=^9;jsLEXsccMOi<+0-z|NZb(#wwkcO)nVxJxkF3g(OvW4`m36ytfPx5e-ujFXf($)cVOn|qt9LL zNr!InmcuVkxEg8=_;E)+`>n2Y0eAIDrklnE=T9Pyct>^4h$VDDy>}JiA=W9JE79<6 zv%hpzeJC)TGX|(gP!MGWRhJV}!fa1mcvY%jC^(tbG3QIcQnTy&8UpPPvIekWM!R?R zKQanRv+YZn%s4bqv1LBgQ1PWcEa;-MVeCk`$^FLYR~v%9b-@&M%giqnFHV;5P5_et z@R`%W>@G<6GYa=JZ)JsNMN?47)5Y3@RY`EVOPzxj;z6bn#jZv|D?Fn#$b}F!a}D9{ ztB_roYj%34c-@~ehWM_z;B{G5;udhY`rBH0|+u#!&KLdnw z;!A%tG{%Ua;}OW$BG`B#^8#K$1wX2K$m`OwL-6;hmh{aiuyTz;U|EKES= z9UsxUpT^ZZyWk0;GO;Fe=hC`kPSL&1GWS7kGX0>+votm@V-lg&OR>0*!Iay>_|5OT zF0w~t01mupvy4&HYKnrG?sOsip%=<>nK}Bxth~}g)?=Ax94l_=mC{M@`bqiKtV5vf zIP!>8I;zHdxsaVt9K?{lXCc$%kKfIwh&WM__JhsA?o$!dzxP znoRU4ZdzeN3-W{6h~QQSos{-!W@sIMaM z4o?97?W5*cL~5%q+T@>q%L{Yvw(a2l&68hI0Ra*H=ZjU!-o@3(*7hIKo?I7$gfB(Vlr!62-_R-+T;I0eiE^><*1_t|scfB{r9+a%UxP~CBr zl1!X^l01w8o(|2da~Mca)>Mn}&rF!PhsP_RIU~7)B~VwKIruwlUIlOI5-yd4ci^m{ zBT(H*GvKNt=l7a~GUco)C*2t~7>2t?;V{gJm=WNtIhm4x%KY>Rm(EC^w3uA{0^_>p zM;Na<+I<&KwZOUKM-b0y6;HRov=GeEi&CqEG9^F_GR*0RSM3ukm2c2s{)0<%{+g78 zOyKO%^P(-(U09FO!75Pg@xA{p+1$*cD!3=CgW4NO*p}&H8&K`(HL&$TH2N-bf%?JL zVEWs;@_UDD7IoM&P^(k-U?Gs*sk=bLm+f1p$ggYKeR_7W>Zz|Dl{{o*iYiB1LHq`? ztT)b^6Pgk!Kn~ozynV`O(hsUI52|g{0{cwdQ+=&@$|!y8{pvUC_a5zCemee6?E{;P zVE9;@3w92Nu9m_|x24gtm23{ST8Bp;;iJlhaiH2DVcnYqot`tv>!xiUJXFEIMMP(ZV!_onqyQtB_&x}j9 z?LXw;&z%kyYjyP8CQ6X);-QW^?P1w}&HgM}irG~pOJ()IwwaDp!i2$|_{Ggvw$-%K zp=8N>0Fv-n%W6{A8g-tu7{73N#KzURZl;sb^L*d%leKXp2Ai(ZvO96T#6*!73GqCU z&U-NB*0p@?f;m~1MUN}mfdpBS5Q-dbhZ$$OWW=?t8bT+R5^vMUy$q$xY}ABi60bb_ z9;fj~2T2Ogtg8EDNr4j96{@+9bRP#Li7YDK1Jh8|Mo%NON|bYXi~D(W8oiC2SSE#p z=yQ0EP*}Z)$K$v?MJp8s=xroI@gSp&y!De;aik!U7?>3!sup&HY{6!eElc+?ZW*|3 zjJ;Nx>Kn@)3WP`{R821FpY6p1)yeJPi6yfq=EffesCZjO$#c;p!sc8{$>M-i#@fCt zw?GQV4MTSvDH(NlD2S*g-YnxCDp*%|z9^+|HQ(#XI0Pa8-Io=pz8C&Lp?23Y5JopL z!z_O3s+AY&`HT%KO}EB73{oTar{hg)6J7*KI;_Gy%V%-oO3t+vcyZ?;&%L z3t4A%Ltf=2+f8qITmoRfolL;I__Q8Z&K9*+_f#Sue$2C;xTS@%Z*z-lOAF-+gj1C$ zKEpt`_qg;q^41dggeNsJv#n=5i+6Wyf?4P_a=>s9n(ET_K|*zvh633Mv3Xm3OE!n` zFk^y65tStyk4aamG*+=5V^UePR2e0Fbt7g$({L1SjOel~1^9SmP2zGJ)RZX(>6u4^ zQ78wF_qtS~6b+t&mKM=w&Dt=k(oWMA^e&V#&Y5dFDc>oUn+OU0guB~h3};G1;X=v+ zs_8IR_~Y}&zD^=|P;U_xMA{Ekj+lHN@_n-4)_cHNj0gY4(Lx1*NJ^z9vO>+2_lm4N zo5^}vL2G%7EiPINrH-qX77{y2c*#;|bSa~fRN2)v=)>U@;YF}9H0XR@(+=C+kT5_1 zy?ZhA&_&mTY7O~ad|LX+%+F{GTgE0K8OKaC2@NlC1{j4Co8;2vcUbGpA}+hBiDGCS zl~yxngtG}PI$M*JZYOi{Ta<*0f{3dzV0R}yIV7V>M$aX=TNPo|kS;!!LP3-kbKWj` zR;R%bSf%+AA#LMkG$-o88&k4bF-uIO1_OrXb%uFp((Pkvl@nVyI&^-r5p}XQh`9wL zKWA0SMJ9X|rBICxLwhS6gCTVUGjH&)@nofEcSJ-t4LTj&#NETb#Z;1xu(_?NV@3WH z;c(@t$2zlY@$o5Gy1&pvja&AM`YXr3aFK|wc+u?%JGHLRM$J2vKN~}5@!jdKBlA>;10A(*-o2>n_hIQ7&>E>TKcQoWhx7um zx+JKx)mAsP3Kg{Prb(Z7b};vw&>Tl_WN)E^Ew#Ro{-Otsclp%Ud%bb`8?%r>kLpjh z@2<($JO9+%V+To>{K?m76vT>8qAxhypYw;Yl^JH@v9^QeU01$3lyvRt^C#(Kr#1&2 ziOa@LG9p6O=jO6YCVm-d1OB+_c858dtHm>!h6DUQ zj?dKJvwa2OUJ@qv4!>l1I?bS$Rj zdUU&mofGqgLqZ2jGREYM>;ubg@~XE>T~B)9tM*t-GmFJLO%^tMWh-iWD9tiYqN>eZ zuCTF%GahsUr#3r3I5D*SaA75=3lfE!SpchB~1Xk>a7Ik!R%vTAqhO z#H?Q}PPN8~@>ZQ^rAm^I=*z>a(M4Hxj+BKrRjJcRr42J@DkVoLhUeVWjEI~+)UCRs zja$08$Ff@s9!r47##j1A5^B6br{<%L5uW&8t%_te(t@c|4Fane;UzM{jKhXfC zQa|k^)d*t}!<)K)(nnDxQh+Q?e@YftzoGIIG?V?~$cDY_;kPF>N}C9u7YcZzjzc7t zx3Xi|M5m@PioC>dCO$ia&r=5ZLdGE8PXlgab`D}>z`dy(+;Q%tz^^s*@5D)gll+QL z6@O3@K6&zrhitg~{t*EQ>-YN zy&k{89XF*^mdeRJp{#;EAFi_U<7}|>dl^*QFg**9wzlA#N9!`Qnc68+XRbO-Za=t zy@wz`mi0MmgE?4b>L$q&!%B!6MC7JjyG#Qvwj{d8)bdF`hA`LWSv+lBIs(3~hKSQ^0Se!@QOt;z5`!;Wjy1l8w=(|6%GPeK)b)2&Ula zoJ#7UYiJf>EDwi%YFd4u5wo;2_gb`)QdsyTm-zIX954I&vLMw&_@qLHd?I~=2X}%1 zcd?XuDYM)(2^~9!3z)1@hrW`%-TcpKB1^;IEbz=d0hv4+jtH;wX~%=2q7YW^C67Fk zyxhyP=Au*oC7n_O>l)aQgISa=B$Be8x3eCv5vzC%fSCn|h2H#0`+P1D*PPuPJ!7Hs z{6WlvyS?!zF-KfiP31)E&xYs<)C03BT)N6YQYR*Be?;bPp>h?%RAeQ7@N?;|sEoQ% z4FbO`m}Ae_S79!jErpzDJ)d`-!A8BZ+ASx>I%lITl;$st<;keU6oXJgVi?CJUCotEY>)blbj&;Qh zN*IKSe7UpxWPOCl1!d0I*VjT?k6n3opl8el=lonT&1Xt8T{(7rpV(?%jE~nEAx_mK z2x=-+Sl-h<%IAsBz1ciQ_jr9+nX57O=bO_%VtCzheWyA}*Sw!kN-S9_+tM}G?KEqqx1H036ELVw3Ja0!*Kr-Qo>)t*?aj2$x;CajQ@t`vbVbNp1Oczu@ zIKB+{5l$S;n(ny4#$RSd#g$@+V+qpAU&pBORg2o@QMHYLxS;zGOPnTA`lURgS{%VA zujqnT8gx7vw18%wg2)A>Kn|F{yCToqC2%)srDX&HV#^`^CyAG4XBxu7QNb(Ngc)kN zPoAhkoqR;4KUlU%%|t2D8CYQ2tS2|N#4ya9zsd~cIR=9X1m~a zq1vs3Y@UjgzTk#$YOubL*)YvaAO`Tw+x8GwYPEqbiAH~JNB?Q@9k{nAuAbv)M=kKn zMgOOeEKdf8OTO|`sVCnx_UqR>pFDlXMXG*KdhoM9NRiwYgkFg7%1%0B2UWn_9{BBW zi(Ynp7L|1~Djhg=G&K=N`~Bgoz}Bu0TR6WsI&MC@&)~>7%@S4zHRZxEpO(sp7d)R- zTm)))1Z^NHOYIU?+b2HZL0u1k>{4VGqQJAQ(V6y6+O+>ftKzA`v~wyV{?_@hx>Wy# zE(L|zidSHTux00of7+wJ4YHnk%)G~x)Cq^7ADk{S-wSpBiR2u~n=gpqG~f=6Uc7^N zxd$7)6Cro%?=xyF>PL6z&$ik^I_QIRx<=gRAS8P$G0YnY@PvBt$7&%M`ao@XGWvuE zi5mkN_5kYHJCgC;f_Ho&!s%CF7`#|B`tbUp4>88a8m$kE_O+i@pmEOT*_r0PhCjRvYxN*d5+w5 z<+S)w+1pvfxU6u{0}0sknRj8t^$uf?FCLg<%7SQ-gR~Y6u|f!Abx5U{*KyZ8o(S{G znhQx#Zs_b8jEk`5jd9CUYo>05&e69Ys&-x_*|!PoX$msbdBEGgPSpIl93~>ndH;t5 z?g>S+H^$HtoWcj4>WYo*Gu;Y#8LcoaP!HO?SFS&F9TkZnX`WBhh2jea0Vy%vVx~36 z-!7X*!Tw{Zdsl3qOsK&lf!nnI(lud){Cp$j$@cKrIh@#?+cEyC*m$8tnZIbhG~Zb8 z95)0Fa=3ddJQjW)9W+G{80kq`gZT`XNM=8eTkr^fzdU%d5p>J}v#h&h$)O+oYYaiC z7~hr4Q0PtTg(Xne6E%E@0lhv-CW^o0@EI3>0ZbxAwd2Q zkaU2c{THdFUnut_q0l+0DpJ5KMWNTa^i@v%r`~}fxdmmVFzq6{%vbv?MJ+Q86h6qf zKiGz6Vrb>!7)}8~9}bEy^#HSP)Z^_vqKg2tAfO^GWSN3hV4YzUz)N3m`%I&UEux{a z>>tz9rJBg(&!@S9o5=M@E&|@v2N+w+??UBa3)CDVmgO9(CkCr+a1(#edYE( z7=AAYEV$R1hHyNrAbMnG^0>@S_nLgY&p9vv_XH7|y*X)!GnkY0Fc_(e)0~)Y5B0?S zO)wZqg+nr7PiYMe}!Rb@(l zV=3>ZI(0z_siWqdi(P_*0k&+_l5k``E8WC(s`@v6N3tCfOjJkZ3E2+js++(KEL|!7 z6JZg>9o=$0`A#$_E(Rn7Q78lD1>F}$MhL@|()$cYY`aSA3FK&;&tk3-Fn$m?|G11= z8+AqH86^TNcY64-<)aD>Edj$nbSh>V#yTIi)@m1b2n%j-NCQ51$9C^L6pt|!FCI>S z>LoMC0n<0)p?dWQRLwQC%6wI02x4wAos$QHQ-;4>dBqO9*-d+<429tbfq7d4!Bz~A zw@R_I;~C=vgM@4fK?a|@=Zkm=3H1<#sg`7IM7zB#6JKC*lUC)sA&P)nfwMko15q^^TlLnl5fY75&oPQ4IH{}dT3fc% z!h+Ty;cx9$M$}mW~k$k(($-MeP_DwDJ zXi|*ZdNa$(kiU?}x0*G^XK!i{P4vJzF|aR+T{)yA8LBH!cMjJGpt~YNM$%jK0HK@r z-Au8gN>$8)y;2q-NU&vH`htwS%|ypsMWjg@&jytzR(I|Tx_0(w74iE~aGx%A^s*&- zk#_zHpF8|67{l$Xc;OU^XI`QB5XTUxen~bSmAL6J;tvJSkCU0gM3d#(oWW$IfQXE{ zn3IEWgD|FFf_r2i$iY`bA~B0m zA9y069nq|>2M~U#o)a3V_J?v!I5Y|FZVrj|IbzwDCPTFEP<}#;MDK$4+z+?k5&t!TFS*)Iw)D3Ij}!|C2=Jft4F4=K74tMRar>_~W~mxphIne& zf8?4b?Aez>?UUN5sA$RU7H7n!cG5_tRB*;uY!|bNRwr&)wbrjfH#P{MU;qH>B0Lf_ zQL)-~p>v4Hz#@zh+}jWS`$15LyVn_6_U0`+_<*bI*WTCO+c&>4pO0TIhypN%y(kYy zbpG4O13DpqpSk|q=%UyN5QY2pTAgF@?ck2}gbs*@_?{L>=p77^(s)ltdP1s4hTvR# zbVEL-oMb~j$4?)op8XBJM1hEtuOdwkMwxzOf!Oc63_}v2ZyCOX3D-l+QxJ?adyrSiIJ$W&@WV>oH&K3-1w<073L3DpnPP)xVQVzJG{i)57QSd0e;Nk z4Nk0qcUDTVj@R-&%Z>&u6)a5x3E!|b;-$@ezGJ?J9L zJ#_Lt*u#&vpp2IxBL7fA$a~aJ*1&wKioHc#eC(TR9Q<>9ymdbA?RFnaPsa)iPg7Z; zid$y8`qji`WmJ5nDcKSVb}G$9yOPDUv?h1UiI_S=v%J8%S<83{;qMd0({c8>lc=7V zv$okC+*w{557!ohpAUMyBHhKLAwzs&D11ENhrvr_OtsnS!U{B+CmDH-C=+po+uSqt z+WVVXl8fKe5iCZoP;>}4OVen6_|uw8*ff-r;)O2W+6p7BPT7sT<|Qv=6lgV#3`Ch${(-Wy#6NA$YanDSFV_3aa=PAn%l@^l(XxVdh!TyFFE&->QRkk@GKyy( zC3N%PhyJf^y9iSI;o|)q9U-;Akk>;M>C8E6=3T!vc?1( zyKE(2vV5X_-HDSB2>a6LR9MvCfda}}+bZ>X z+S(fTl)S})HZM`YM`uzRw>!i~X71Kb^FnwAlOM;!g_+l~ri;+f44XrdZb4Lj% zLnTNWm+yi8c7CSidV%@Y+C$j{{Yom*(15277jE z9jJKoT4E%31A+HcljnWqvFsatET*zaYtpHAWtF|1s_}q8!<94D>pAzlt1KT6*zLQF z+QCva$ffV8NM}D4kPEFY+viR{G!wCcp_=a#|l?MwO^f4^EqV7OCWWFn3rmjW=&X+g|Pp(!m2b#9mg zf|*G(z#%g%U^ET)RCAU^ki|7_Do17Ada$cv$~( zHG#hw*H+aJSX`fwUs+fCgF0bc3Yz3eQqR@qIogSt10 znM-VrdE@vOy!0O4tT{+7Ds-+4yp}DT-60aRoqOe@?ZqeW1xR{Vf(S+~+JYGJ&R1-*anVaMt_zSKsob;XbReSb02#(OZ z#D3Aev@!944qL=76Ns-<0PJ;dXn&sw6vB9Wte1{(ah0OPDEDY9J!WVsm`axr_=>uc zQRIf|m;>km2Ivs`a<#Kq@8qn&IeDumS6!2y$8=YgK;QNDcTU}8B zepl6erp@*v{>?ixmx1RS_1rkQC<(hHfN%u_tsNcRo^O<2n71wFlb-^F2vLUoIfB|Hjxm#aY&*+um7eR@%00 zR;6vT(zb2ewr$(CwbHgKRf#X(?%wBgzk8qWw=d@1x>$40h?wIUG2;Jxys__b)vnPF z{VWvLyXGjG4LRo}MH@AP-GOti6rPu^F04vaIukReB|8<7&5cebX<)Zk(VysCOLBuL zW9pEvRa--4vwT?k6P??+#lGMUYE;EsaU~=i_|j!1qCVS_UjMVhKT%CuovR;6*~rP0)s5eX zxVhGZv+qtpZ{_FDf9p{m`ravh=h>mPMVR7J-U@%MaAOU2eY@`s-M3Oi>oRtT?Y&9o({nn~qU4FaEq|l^qnkXer)Cf0IZw;GaBt)}EIen=1lqeg zAHD~nbloktsjFh&*2iYVZ=l1yo%{RK#rgTg8a2WRS8>kl03$CS(p3}E-18`!UpyOg zcH=`UYwn0b@K1`E&aQ%*riO|F-hq;S;kE7UwYd~Ox(u)>VyaE7DA6h_V3_kW2vAR} zBZi_RC*l3!t;JPD;<*z1FiZt;=KK-xuZ`j>?c5oxC^E2R=d`f68!-X=Xw2ONC@;@V zu|Svg4StiAD$#wGarWU~exyzzchb#8=V6F<6*nAca@x}!zXN}k1t78xaOX1yloahl zC4{Ifib;g}#xqD)@Jej<+wsP+JlAn)&WO=qSu>9eKRnm6IOjwOiU=bzd;3R{^cl5* zc9kR~Gd9x`Q$_G^uwc4T9JQhvz3~XG+XpwCgz98Z>Pez=J{DD)((r(!ICFKrmR-;} zL^`7lPsSmZT?p&QpVY&Ps~!n($zaAM8X@%z!}!>;B|CbIl!Y={$prE7WS)cgB{?+| zFnW-KRB-9zM5!L+t{e~B$5lu-N8Yvbu<+|l;OcJH_P;}LdB~2?zAK67?L8YvX})BM zW1=g!&!aNylEkx#95zN~R=D=_+g^bvi(`m0Cxv2EiSJ>&ruObdT4&wfCLa2Vm*a{H z8w@~1h9cs&FqyLbv7}{R)aH=Bo80E3&u_CAxNMrTy_$&cgxR10Gj9c7F~{hm#j+lj z#){r0Qz?MaCV}f2TyRvb=Eh|GNa8M(rqpMPVxnYugYHqe!G`M@x(;>F%H46LGM_cU z{*0k6-F!7r3;j{KOaDxrV16WUIiFAfcx?^t*}ca4B8!-d?R|$UxwV8tyHdKL zhx;7%0Zn#qtx;S)REtEP-meAlV8*1qGFbRJ*eeX&+hsiLF*g9%r0Zl`L^Kn`4I)ul z32#3pg6Mu$LEI@hssUb?T$di_z zHgaB3zw;*0Lnzo$a~T_cFT&y%rdb*kR`|6opI#Pbq~F%t%*KnyUNu|G?-I#~C=i#L zEfu}ckXK+#bWo11e+-E$oobK=nX!q;YZhp}LSm6&Qe-w0XCN{-KL}l?AOUNppM-)A zyTRT@xvO=k&Zj|3XKebEPKZrJDrta?GFKYrlpnSt zA8VzCoU+3vT$%E;kH)pzIV7ZD6MIRB#w`0dViS6g^&rI_mEQjP!m=f>u=Hd04PU^cb>f|JhZ19Vl zkx66rj+G-*9z{b6?PBfYnZ4m6(y*&kN`VB?SiqFiJ#@hegDUqAh4f!+AXW*NgLQGs z>XrzVFqg&m>FT^*5DAgmMCMuFkN4y*!rK^eevG!HFvs7nC672ACBBu5h(+#G@{0J- zPLsJ{ohQEr2N|PmEHw9 znQ`qe-xyv93I;Ym=WnoVU8dau&S^(*Wp=}PSGw;&DtaKz-);y)zjD|@-RT`*6nowj z7B%)h3>Lro-}5THC@BLymuL&3~kh8M}ZrZGtYKAmrT^cym$^O!$eeK$q5X2JF1w5a}4Z6yJ<=8&J?(m6U?;+ z{+*B;P@yGffMz;OSfm7NDhkGR5|7&~FNvel8Yj{F!DWnHG>%?ReZ$1w5I$Bt_u|4v z-ow>!SF!pCGrD&K8=-<;Gp@oB<@9C&%>vPHrp4sQEJj2FdedjC=0FqD>EG?NCf=KQKVd^stDZP7KNCAP-uEO*!?vgwvdp&Dm3h5Cldn!cIOL@u>1!HSfK+~kn-9Ekr|MWNApAJCJ5&5#izmjm z$CI|Boo@;O?Z(Bo9ejP>bbH|jRKn7W3y0L1!O6v$RUtt;%5R#**`+39c$JuO`SMU+ zbzu$7Eu`JQ+ri_ap{w(R_juHcw0X8~e$48TzBX%Yd+HkSSYt2){)+rYm48G^^G#W* zFiC0%tJs0q3%fX_Mt8A=!ODeM?}KLDt@ot6_%aAdLgJ7jCqh_1O`#DT`IGhP2LIMhF* z=l?}r%Tl#)!CpcItYE2!^N8bo`z9X(%0NK9Dgg^cA|rsz?aR+dD6=;#tvNhT5W}1; zFG@_F2cO&7Pdp1;lJ8?TYlI(VI8nbx_FIGRX^Z(d zyWyJi58uPgr>8w$ugIGhX1kr*po@^F>fntO1j&ocjyK za8Z*GGvQt+q~@R@Y=LdQt&v=8-&4WOU^_-YOuT9Fx-H7c;7%(nzWD(B%>dgQ^ zU6~0sR24(ANJ?U>HZ#m8%EmD1X{uL{igUzdbi+JN=G9t`kZMGk!iLCQQiVMhOP&(*~gU(d+&V4$(z=>4zqh(GX+9C&;~g2 z9K2$`gyTRJpG_)fYq=9sG^1I{*I=s%0NX^}8!mJVc?y$OYM^n!x(2jw$$;}n&dh%D;St+FA;eW=+28j#G^YLi@Gdk*H#r-#6u?7sF7#_pv?WS^K7feY1F^;!;$rgU%J zS$lZ(hmo$F>zg$V^`25cS|=QKO1Qj((VZ;&RB*9tS;OXa7 zy(n<$4O;q>q5{{H>n}1-PoFt;=5Ap+$K8LoiaJV7w8Gb%y5icLxGD~6=6hgYQv`ZI z2Opn57nS-1{bJUr(syi^;dv+XcX8?rQRLbhfk1py8M(gkz{TH#=lTd;K=dr!mwk2s z#XnC){9$x)tjD0cUQ90|hE2BkJ9+_tIVobRGD6OQ-uKJ#4fQy!4P;tSC6Az)q?c>E zXt(59YUKD?U}Ssn(3hs&fD$i3I*L_Et-%lx%HDe%#|)*q+ZM-v%Ds3u1LPpPKe-q} zc!9Rt)FvptekA2s+NXxF7I;sH1CNPpN@RT+-*|6h*ZWL{jgu9vth{q)u=E<7D(F06 zN~UUfzhsK)`=W%Z-vr#IIVwmdb(q7k+FX-lciYO%NE!xl25SV53Hwdql-3>8y5X1U zWa3_Qfp2Z;jVX+N+1?`(dx-EJL)%oQsI0G3S=ad&v{dzNal~flHvq(0HjY!v;oE>n z4gQSa2FdJI52Weu$+lED4VYSW;D`5Zn`C#@7Hxa1Ls*#TLBjje(%NYFF+4uOc~dK! zlnyxE4NWVz0c8yx`=sP2t)fHW(PPKZPp{SCwT-on2sEM9tyGO4AW7|R;Iw5|n1KpV zR^S>`h}rxcNv2u+7H6rCvMLMV3p*H#WcN}}t0@Us{w}{20i<-v> zyos+Ev_>@CA**@JrZ6Jzm=pWd6ys`c!7-@jf<~3;!|A_`221MFp-IPg28ABf6kj-Y#eaRcQ!t!|0SRtkQK^pz;YiTC@@lJ4MDpI(++=}nTC zRb4Ak&K16t*d-P(s5zPs+vbqk1u>e5Y&a!;cO(x;E4A4}_Cgp_VoIFwhA z-o^7)=BRYu)zLT8>-5os4@Ss8R&I^?#p?bY1H-c;$NNdXK%RNCJHh)2LhC?B9yL2y z(P-1t9f~NV0_bQ{4zF|-e^9LG9qqevchug76wtFn95+@{PtD)XESnR2u}QuG0jYoh z0df4#&dz_FStgOPG0?LVGW&{znCUzHU%*b1f~F+)7aefg7_j76Vb|2WuG#1oYH_~4 zrzy#g1WMQ#gof`)Ar((3)4m3mARX~3(Ij=>-BC zR@&7dF70|)q>tI$wIr?&;>+!pE`i6CkomA1zEb&JOkmg9!>#z-nB{%!&T@S-2@Q)9 z)ekri>9QUuaHM{bWu&pZ+3|z@e2YjVG^?8F$0qad4oO9UI|R~2)ujGKZiX)9P2;pk z-kPg%FQ23x*$PhgM_1uIBbuz3YC z#9Rz(hzqTU{b28?PeO)PZWzB~VXM5)*}eUt_|uff_A8M4v&@iY{kshk{7dHX1vgHs zC%vd9vD^c;%!7NNz=JX9Q{?$~G@6h!`N>72MR*!Q{xE7IV*?trmw>3qWCP*?>qb01 zqe|3!Y0nv7sp|Md9c z4J5EJA%TD-;emh%|L2kLpA^g>)i56v6HIU8h7M+KSWYw~HHz3`ILj*{==jD(l33>r zmOdINZ8^Jo?ll^~q@{^5l#*3f`ETncJmo?iRLz*=W=o3MJ!K^xjVcw*H}p63#p4XX z1)|C%{Y&)IpRIk5oMVsUi6oyKAFy8MH$@|Zpjr^lxlMX3O{0AZTjc{gso{KRuo30V zUJxq2K=_CwV*Qx_D!hJCBTuQ}5oMNrWUBNVaa8zyMg5lrXgv8Zw@rm5NAcFplYa>P zmUNB>EB|r?#Z!Gq^`(HZl__UJ*K5 z=>`{UTlt0;Y+LmP1Wb19IWK(SIWDrqh=+K81c`t@BCS|2#@K0u5eEwQ7CG92=Axx4 zQ?CPaVE5!XY`2r!Ce@m(tRtB=&+c>a09WzP-Ys!~i;V0hEq}PU8n1a;bVbJ17rYW1 zjz|KkLZoO7-S6oQp_ocIzS43P@CJJxQ$k;$!fS3*V)m|VtBIEgCtU@W`AG9VMU_d znB-Zs3I)I(Wg=xj)Wcx03h}U3i5{D@*udPLg?Jx7dp&KEIwJiW=eh}Ps#FxbsS?F}7z<;<5RP6-UAD+_An$s3y-JAC zh{JlAX3e^CDJl1gJDbH`e=hD88ER_6+Mw8CwK&^|$BnzA|AvDV`#xF^z9b6iWb)0@ z+gir=oSUaVcJi%1k+9!pd`(3|h~4}!NM7NHPNV6rI(W4~Ie5 zl@(Xg2`OSq|HJRUg3qgr-c!}9@W?pEJXKtxP7f(aE2Es33gRSu#~XiCIpV-J;JLM{(@qK2wEvsi@6-9(cyXX!6YS0n7;TK0Ldf*JGmlvrF0 zGQ+Z509rmWa)O}r`z2W3!6u{^ZQrY`KR#VlTRmllG2v$R!7%B~IU@XnNi!E1qM$J8 z%{XFU4vy_*M0tKjDY3E*7N!d%&vnx5qr#=!IKWZfoRo8j=7ji1{xW?g^)A|7 zaaA5Rg6rwCF?y33Kz-90z!ze`@5N916S)(fHPa>{F`UEF8N5PTNjbo)PF5W_YLB*# z?o`qxQTIzokhSdBa1QGmn9b;O#g}y_4d*j*j`cx^bk(=%QwiFxlAhFSNhO0$g|ue> zDh=p|hUow5Knbclx8V;+^H6N_GHwOi!S>Qxv&}FeG-?F7bbOWud`NCE6Tv-~ud&PS6 z;F*l>WT4zvv39&RTmCZQLE67$bwxRykz(UkGzx}(C23?iLR}S-43{WT80c$J*Q`XT zVy-3mu&#j}wp^p0G%NAiIVP2_PN{*!R%t7*IJBVvWVD#wxNRyF9aXsIAl)YpxfQr$d%Rt20U@UE}@w?|8^FMT%k36 zcGi_Mw+vMvA@#}0SfIiy0KEKwQ|`iR++|PF2;LtiH7ea($I{z z32QPp-FlEQ**K_A@OC943z`Qy7wC~&v z*a`z;(`5(e#M|qb4bkN6sWR_|(7W~8<)GnX)cJAt``gu8gqP(AheO-SjJMYlQsGs0 z!;RBZwy>bfw)!(Abmna(pwAh^-;&+#$vChUEXs5QOQi8TZfgQHK$tspm+rc%ee0gy zjTq5y20IJ`i{ogd8l?~8Sbt^R_6Fx*!n6~Jl#rIt@w@qu2eHeyEKhrzqLtEPdFrzy z9*I^6dIZ z)8Gdw1V^@xGue9trS?=(#e5(O#tCJv9fRvP=`a{mnOTboq<-W$-ES7)!Xhi*#}R#6 zS&7hR(QeUetr=$Pt6uV%N&}tC;(iKI>U!y$j6RW&%@8W|29wXe@~{QlQ0OjzS;_>q z(B!=A71r|@CmR7eWdu9n0;OJ zP@VOOo#T+N$s{`3m`3Li+HA4owg&>YqCwsA5|E$b;J&v#6RbT$D!x$Yaflo92wU?A zvgD8g(aY`g7}Y2^2i31ocm&k9Km`NQipEsjU>MuRzD35*Jk7^Q(O;M32!gt1cEB@- zBOHd@@Qo{fQ^7o{FiNdS)_vTiP8toqZ`iNi^1-4(hp+s751}Tf34b z_UYQ1q0~*jIp9pRIpI8ue}$|~uu0#p>-y8t{yEwB(8yAjMXrJ{`{rp7*-wlh8&bso zHV`LnAF7Bw+w}Wm9ii3U@lEvcc-i$0&h+eUmlQuREzg!ao)ZjwThhqIKA})}akyX7 zcbuIw9K}9aUZ;hvAxk~rqpk?bYMWr-@b-pMTR8))ggQa$kBv=IinobKCR0?S&g*+Al2J`VR7he{}0Pu zae7LYa!OoTOk8?ma)M@Ta%NxQacV~KMw&)}fkmF7wvmagnTbWo))`Kofr)`-pNe99 zMnam7vRRs5LTXHWNqTzhfQo90dTdg<=@9teXaX2tyziuRI?UOxKZ5fmd%yNGf%Kis zEDdSxjSP&;Y#smYU$Dk>Sr0J42D)@hAo|7QaAGz(Qp*{d%{I-#UsBYP2*yY8d0&$4 zI^(l62Q-y4>!>S{ zn;iO%>={D42;(0h@P{>EZnIzpFV|^F%-OJADQz(1GpUqqg#t!*i zcK}eD_qV$RmK}-y_}f$Xy7B+hY~f4s{iCD7zq%C|SepGu`+>h6TI}dUGS3%oOYsZ0 z#rWTU&aeMhM%=(r(8kK@3rr|wW^MFE;dK5&^Z!>`JV{CWi^Gq?3jz~C-5hFFwLJ@e zSm3z9mnI+vIcF+RjyOL!VuZP3rJDjPSm4vYolnm)H;BIz!?dLyE0^5(pm)5*>2clW zaI^*Z;p6iGZW~Gr0(Eh+%8Jkz{S9{}=}Ewi6W0wF3|BbVb?CR2x>4xST?woP;Mz8L zDfs+0L9ga3jcM)zCC=`-ah9#oulxt9bZq9zH*fJK$bhT=%(2bPMY~}cPfTyE{_4p+ zc}3pPX`B04z+T>XwRQ4$(`U~037JrmN`)3F8vu_OcBE}M&B;1Vd%|I|1tni?f_b&$ z5wpdJ6F*oif)r=IzB$ytT72GuZi$y>H0p_#amQcJLZ^4KZySOUrRyXy3A2(i=$zB9 znZnGFLC34k?N@s@`)u8aZN({9Hfe}|^@Xk(TmCqNBR*Bter>opM!SGiDU8ShK6FNp zvod~z>Tj!GOXB^#R>6}_D@j67f5cNc#P;yMV}`S*A_OmXk_BIq3I$C}3M~aPU)agY zWC+0JA-)}O@e4XTtjzen&g=J0GIVNjG`_gS6ErXj3cGxeDN*4xEk0PNzfzO@6gb&N zB$S-WV-@efQWs%UX$AVjFN5M@8U>+?Mcqg?@=Z-R`~n~;mQGVJT_vBL|3^fHxZ?#T zE(Sd`8%2WHG)TcNaCHmv_Id%D+K}H3s&c`bxKs(_ScZzyCTpvU zHv~yhtKF9G{s+GC*7>_D@F+qEq@YmXiKTV(j#X7^?WpvIg!Yxi6uBAhh7<91{8vFL zfT?Y~vwmE;(WOL!V5Ag&#@U$mP~T=*#_ ze#QynX>tO#4IJqSj^UB>8ubSEn>Nk!Z?jZE01CJCYuY`1S3 zf%2eyXaWoAQUw)KYO;wi<&+R3_7E%h(7F?xq!8l>!^3Jqj_tNPrG= z+y2S-0j;(AilOo;>SCQu#;Cn?y4Eu za`??!yHz)qFH1Z(3KMqgn+B$&t+5s0zY|}<1kB^Q8FEAumh;^;Yr~amTx1K2%2JUk z@7uIE&0DVch|1R=ro5rjr)w!iU{_09PqfhnGqhAN^$^oz#wVNdTRQ!8^nF};4);Jz#=dTBTMMW7icnZ$dK1E0UEgP4&DNk9MFoKOhtAkVUR`d_vc!x zc|1mY&%{PBxepp^JPHmFDBQ8t@DD-3!C)-ZhGJt)?{)^0MvC%RzI;4}>XoOUF;6~j z{S20Ra%PaiGvM$pFbH;N6)b1J(N;{+Gp^^Qk34JAuPKH}Ap}fen!WlC5vrQ0$pnyq z5poi8VG>>PnGw2^-CY3XdG3<;|0xU}#WBPqn{mO=z0RwL=MXn3=;oA(1C@V^6F;ogwB4EBUpltu=)(MC@To2kSPbL zDdGz|C<@`&!MmQ*e>H>2Qkwa~K%;yZw;SnM<=qwNHu-Dh$r(}-d}T}u!=UOAkzvEOiZ6>{)t$$# zlAmjO$1)&1Zh^zdh8uhmZ>OBA1T4%s9Jex_y4|ifY_=XoX6UzpP;MuC5su(6%;)NI z4d#4aW<*)L6o7w?MY2+jRx6-3S4i zC(~)A`|)5(s?)pBvTfYjwvr@Z-Dx-F7uq}z#WJB6&}0TIi6sGXFWOxD!As%cUg)_A zI)sRCf-5kPBU|rVm0A{!s=W2){AJwvShr6Tsvbg|NrXi!7zoMde_n>-+XFX0fiQy~ zjRp|;6~pR()0a>ETtC7mZD|i$Emj!r-gq!yhAFdV1uR*M<4O?t83N1JRT~8Cy8Vha z+STlcw&CoCJt$k^#ar+~DBmvtC5tr{(>|W6wHq*NSE!^#8*rs>!oYj%fl9~Nu*d4t zdk!|mGJehKW8xJE5ZOcHRfp4plI+l1Pct;rK={=P`YH8&1hNW*YE)4yF2@wa7JFaL zLHJH6ZWc1j|nQ55Znh#>tV`!~N7lY_05Cq%|8I-yN}yf@EzDG zBL z(b0sjh+ui^*s(rg)=l8fU<%cPfba<7y?>}j3R83$2KHzWbVF*`!x^V8JY`D0itC?ZSTYH|w3lUD#$5G$@!v(Lphex2O1;%>w;Qh$t7YF3EjFuySPC$>~%EspW}@Ctn1Bghd5*HVJ=tZK~8oMiZ@9IxfFLSk~>p9cT9gOSPLyP!^bOah`U-6{}C_ zmyhS7S_-tYDm|9C6(Wu2Qe=*g5@{**z@#Ekz3Y{o7fw!^4z$yi z&=a^zmtOpsRO0lFr&c=khr)cL2v9LFKXRDdE}tWlOgpR%}oWHCeJ4;(9U_HeJYl! zwz$p|t6?#eCju@0{IF0gbk>So3C{Ror~JTpuOW!G@^?lBVrf zf?%rDK2E3x=xGC)J_lEk{(ESh-Uw*#k-n4l42f3oC3BJX0-2NMZo?P)-6y1v+?|+< zfFHX8(bw;H@;6K!?=!B#eZrkowcdn7)roPT=WM@MK?>T-cUa$oQdYp&3YRdWu~rhA z@rZKmqj8Ftz-*@`&iH|) zC(H;QiqYx4{Mz@rm`qs~*Ue~4EHM^J7i{QnL~t)O)tnwIQC;23p}TBoc=9rcuS!cQ zQgl)_F@t9{c)ESLtAcg1AbCXqVS%i1ZZRiy$*?Bu=r2ad13e|ZeWV=3pSL>YAk>X& zQZAY4kJD`CYrK-nNti&;uJ*e{cRILOFk@z?B@fNO(exjUhf!b=yuC`@(RS#ko1HA+ zOwsym7?F)}ufcD5&IV+qr+i7Mo3)6M2oI)*3?@-%ah^0rL#0PIn}XmOTP9Xsg5C;t zqkFe6yT##_ZG5KuhVQY)89LfWOeXpXVNWX2PmiRqq<$C!<^WlyO~Q=pk${$DsWY-7 zZ->4<+c@KPgKzKosGPF+&Q*>L>WaN6_FC~SP~3gH7bvg6>QgPzp`&QTpf3W>HjxDxj!y zZb`O;&XZzI2YJ4!^Mq5~Vz7lLv`StN|TSP@jdF}@9;ql?u*#Q+_E}~hak(3B%AQNq)t7PKgAWTYp>EJz^VIj67KcZ3^vvZ7{b;; zcOOArcAw2$T+$UwIib|pt3i#NAuP#3?Z@Oaz?Mt(H&u7HZu!03kV7`t5IRcf7hwck zf{Ujp*YsH;dvcW0q|=o$;z#Cg52;n5t1phY44To!sQ99h`iVzXd+v(L%?A$Ks|Ne; z7fby7IVUXqN8gzsnL-s?uIv>=Qh!qAxoe{fRaI&EcSGCTdggq-Qq?DU%SBOummO5cRa9NW}V>A0IH#pxch)!$2p8=^-XYjsB%$S$U5nI zlJEMBb!BZ_O4@87cEYUBH7}Y_MF$+(~gdf-!7)D-D)+O{*18TC{HGZFF+`%IPcmK{O{YxR> zSfJHSeQCChuPUAWe_x~gy*f!!wvt_tL-Dp=nUm+juu;4L6N1IIG4dsVMat#T^p7p1n*Tx2a!YaivBTqLsSJAF=kJej?@QWf)Y-8Ks>WkC456{B#hW-ML zI+f23(}F=MeSdbWQ>R98TOzv#Haw}ua+17H=P5|~#BDmoEPkzl#lBTvCoyj`XU|IS zHn?dXbq>rqUW8^kQN01zL~6!Vxn4!$Pu|F&#XbiF{{>T z)&khW&2Y?d8^jC|phWKQ4!CM9b66+l*HTdPm+)M|e5yT)I32Q~2ENVJ*ZH;JF^Y907{XNHLoQ+85J~!w@3h_5d04o=~|1 zCBAvjnXMn`S#qMkPZE}9#RX`%al{`J=oFKk(aJYT&Ss`4iBrXa_pQ=3lS1IUFA|Rr zgnh;c8nkGH)|*yyoUZ?tE1XKwkF$n6`sdkf^7)(wZ52xtm86N>o&&jG_@#ue(B`xPM|8oGz94>*kl17-|d^y0`D=&hScq6gGQ%Z6|LU zG@<~h-R{xW)y7k1x7XFw!TWW~HPC^bCO_;xG#A4he?=xkLjS=~U!uR+q>vqJxCN~J z+I}|P5RTv*qRT{k2N^Kz8OX*mz$hYR!aYq-f5bN4R4=omUVP19L|)EZq?O0#B9 z<3G&oAZ`UeIqZWlujz8UNNSK#{=_c`*(&TwlIr3ZpC0sfS5Jy?;t+&wb1g4Q91rRNiEt1|L zisgH;)V()S&(TSB|1yAxZLH%BY`nnhUw_6sz~zdKCCc!ZV*Ws6`U4u|CBpv4pYIX1 z5*)5C*N#D}gj<@pdZxtw!`5aFVQ^Jj?1W z+EsBx6>WV`%wnP@Fp{XlqFkbHf%LfCgIi_|w?uPPjHAgOF+lDnAb+WEB+i_53PFmu zj!=umx@ez9mVxC&jA_RtKRfQG>Cz`A77S2SpOt7%Rt*}fG|yO+2t7CMuK$^}D#i}k zZmO9yUwK6%!LbRsULVnxUxfxso5KFES=!WCm>y&YSR@0CS|iON0v59pkQ7dVA{j*+ zmcRtD@lxXuFq@#$DKKSal#ApSJLw58m_NIJ?z;eD3Z8u*-#}EaK zyG~L>-7laE`Y}{g#FPs9YA-wT4>X>xRNtTHp8_rhvWA|eJH(!o-G~C&tvHB9$UEJI{ngD>QjBz=wl~x-j1MB z4)L_#jZSvaQkbmVbN)4{#^r&ZmfhhV%?tet3`xJ;#jI}DsS94qc&s)#2kXv5pkt;K zaY6emqzF1JWMxI(7h}mk*MQ5C8WLAol60!DPj|u0jMrLTkU7G?ud**S@bYx-vp$+r zMVXWc4H}2=yF+YML9!k~LT(|<#By?F2bS~weMi9dD@DA&k#0e&MM1YT!qoQDeNLwB zA;{KvwSzP?-K(>@_b@4vTkIX7xwj}ckrusCw!k=#;Krt6;}3q4d*)?c{>I|C2I^4p zR(o48TqHbw?4Z`c`>?P{`cT;FpJoFW1wJ3IVO#5Q`wsB>o>zsRDDATmct`aaYQbTL zJVlHeok9_?w83#Z*J(_BMs-;N;mNeq{;f3S zSy{i5hNY5s`c#)~KhQZ{0_hNmrMD2b7CLC2+x#EmLcNa8V1Q=jz@e~VV)Yq!Z|$nv$TEG3j6K4opW+mH z3~z?*H$qobb652kQ}ZHFHUVj$%JAwS-Ie=Vh&Iivx3hjMCZ1k)4dRjdhxRb17P;Gz zZCsB4J=l1S8`O|(g!8c$aOMaYeUoCJj&n#kbDxe(^GQ)E)$Rq+i-wbPKeaQvL!`Y- zcL=QOLcWBdDq_`HLow9P5BG2EMY$v;w9cR$C{ zMv)5zrmYv!uzHFAxDI>aftAp&ad>GYoPt!d;A*$s)^6E5l5ct#&O7A0p^8J1ceXa) znIq{NgKbbOSC`6E_af2bCoI(gD@(krDr^mDVw>cRz3zJ^&9kbuf6)J@Cd#zbnko5m zdyD^j^!9J7`oH!u{~wlOl7jYM(OcdI^#*5Y>BjUumq_g&tx<#_pkzQL3{!g?50d=#eCov*uIw$N*glXJe1F{FuUF_wCElS)Z2X= z8&w0?WkCX%HfL)#n-m1tiLy!jDMqH$LikJF=#lu@k5%&vN zOEmQQ^n*t^76E;JhHPzQqbY0+m8GQ9;~dJLLZ@*sqVX0ui5yz%8Hyn87vqUisY_0- zDtUu5haWdOvDBOX9Y;=s;7ul^_xLxfU(?k(HStRfk0Ab!pY(scal?Nz{Qu?etFHNA ztD=60Y>dte)hUle1IUyYIFgMxgGpvx%Odv4q;WPV?Zj<0pph+zWMfSd=SIUcB_#7^ zgNlm4(v!WIBm4?kpvZnCvp?TXW7~Azs3LT8Gh<0Ew=&W*e+4X_xQ{(e+UCESTaWwz zd1ly>%|#A|W%fgeL_3gAwxjeb?Wi3rAR3U#9Rie*)dfz7YxUK;ex+a4F>@qyQAL0^ zZncndzG56R$F&?R4SOX>&%UDdBid6 zIn=GRfcto+s-%gMB)Wx7!_Z+SS)f3IG!&s%P2eNfHI6~E*=>e`^RpvJQY?T95IOKL zeX-_BCdRE#f06_QAoDyMH;#IIBnT#PWSOtks+PCo`04X-brsea32I~@X(Bwl*Q`$c z{Al@04k=Mmd0}}ts=u%dCO;qn-;qh>Hr7bB6!NOVxy@Yi#GK2vusj7iU9757HTqN~ zNMoKeZY}o)nA*{CqTTPKnWi*JgZFZj&EjD$V;O9zqHV#tB#r5Ur$V3To8iP-bO*Gl_d%qc2$SoU`Hu-6*hWbuWzAn(83_jZ%>P{PY3XVV!q$~ALE^GC( zdIGgR(HnV8Rn*P^7b8#AzONo*U_W}{Ne!=#*qNJIRZzapu_fOkvki(|8NDg>&D=OZ zL3G)1WS*8CFh`-sb*#8*hIN7WDjw6<$D&T|B>JPi`K!*5DF(O*^A+r*Jfnt))c8|M zQKtgEytAqpy@~XZGnVYMJmZSG0U~uvP?i*?DhgDOSYtx6s%6u*vL$SW87`&xJ9cmDLrPHI@G7Pb*cizPGf|!5th41a2ijel>Xfk3i?7Bd*{|)@>|ZBi zH6gO9a2Yd&_ZeKmNQC^e&S$cl!3D2oBCX)C;Ve{0qc|4+*fwK!x{=QYtb#3QD1|Yi z%r?t<$-Mjbli1fF(C?V&w#;Gq3-**PgsGPPsXN(0fb?pIDc{s6b<9{t%6D*47A9ZHlc4rEGU<}u;tiom3^lA-&)1i=j z|I#)cctK)AH-b2*a3Wm%Gt*;#GWjNF6q0q^Evid`6G2yhMg_4TaMUK&x*D*5+KtlF#!)86A7pn~&yvD-Rh%`@(o!Wc#9t=t;(9_y*(MWS;4cPU&cJcE+h} z6fZHrjH@7{6~n40#qgL(yA-oVrt;Kcu=fV1WQ0QY`_I8lVds$PYR7KDvhsTbkC8q6 zct`{-n;z2!($SBZ?;(ZMu1sY(VY)KJ@%p)!LEBL+M{ck-$kHEx=3N+%$#msc!LKD> z?(7`Owu6Iuf-Nb|5wFxCm}U)Du@JO|nHV?%8lk(y3x-=F_d}u8>#AU~iWtSD6|VuV&YM=#_v-HDjZ4mS|L2%K2K}Mhz zVb)f#Q>%4Du>|ea6cbNYrpi<6A!rSmbeh7+xGZ{-TPG);DG9qg=>9!44ScDdh49-_ z;|KUp*RQ-So$jyV%Ss5FnJa^|LYAl%8niBhd%(W!x$Rpq@pcp6(XF^fHFRF2KQP>$ zo@`Qi&QlkFxp%0@2)7RlN4+NzCWo{?_x}5$E?kh!!UM3Vg9R+=xPLWty|S}5Gt_qg z+-v~8k*0?Bf0^Q+IZS56Ny~Q$pap&c2NUt&f7P9P+zEz*>bOO!5J8(uhIJ#%lgMNl z3;y^@Yht z_Dko1D=J@nc@`zIXz6dWsr`Kdt!m8`gGlx59A(t5ZjDVmrsjl#0wT@It~$j=uGRM! z@XJK@Q})NA_sQpEZkNduP-h{cP|l+Qqwr{g--LeHY2&||4dJFD34ZCj7@+4ZH4}La zjfr1gHXr8j#ppOa+gkiuHYf$a+VGA${f!~LtdO!~|X+>{b zY8=`^(0d9`z1f!nNzD`;4&65cNlg)@h5m5oOj&gG%mslXlc+jou#n#`d_l6}hwB+CG5k*Sr36Yrz zP2B)Pq#G?*Iwb)FJiXU@lTvTrdR&WRpV8sUz(Sx3C%f;BHSLY@I$!TqSg!%IetroG zD$gu&K<>-imH@Bh&}f!zwO-`w8Dt>MMZ>8V@{X1g?!2BS0S;GtXTW(%@{L=6uC*fB znj>TvA9Cj80~Hn`A5GSVpyqA$*6rlEa`u=Z!{-DRtCo0{jnK|3KxpDEi3&^DwWNg4 z%|~wf=EtEq^ku$fbX{@*EYr&TP@j@?OyLdVKVk*&H23K=xzmgV8p0Y|jK+@cNaPE1 zovLSR73MssgV04G7S-h7L}ID!!8|-X7U6-7?t~caWg)yk6*s=m)9us~kZ7pC6I1+@ zd&wXWPx{8Z>47wN=yJJ;BgQ&`z)H7hxm}Jq_9GiAq)9R- z7(@1=H+oqdJ(YFEq(LiJW=s}h(Yx~}5%_cQ&3xV0VUT%{sXE!% zVMqItDE@pLL%E2I2<48s8InBVbnt|shpL|$wrvbdWe!LJMr$c+e86OWy77OJ6k_2&3KMqL9=QFd2QUVwwR8X*sgj}5OpiFWK zkiv)DX__mAlH9kRszqfgqLLvBrDbP&mL;Amd=_UXSF4&!?$+*0ZswW?9oH!-BQgjS z*IQf1yzUikvx`UPXLZi2UvHaGMOee-cPA0C5fni_Q zcj2Hhbit;RZ5t^!?2;o_*D4W$VcsfIc+m?Z?b!Uv2;-s&XYSCUiczc2-b0I0g-hNj z@xi1}g6j<*=Dr7UMa-%w&YN`cBbWT>BQ~p;QyS!^#eQ>q9dy!?Nrh+?bfo*_kEe;nyR%9=3OTAD90?RT8#Bk}X#Pkr(TqBF2&!V=` z^iWLr%Yk96POnG@bEb?cv#Uk)5}bP0=~;%g>Sm{t#hoNp#yeFj7UxuD?en)EXw2%= zTS`>YY)#O023TqIXj@8o2KAM29NQM4QH=;sYP$pcqtRoxg?ZK@CWy{=P7(uI7%TOp; zP-^!0wmMVv-f2E>6tEj7ZTG#-KaZMuUUgl1|nl&p%3Dc8tZ4 zW{0iAY38oin5YwiQlKRrH8RP-h95fX$>v!l2*6R~)3vTQ7V(gjstAxGVc>U<8Jwb) zPTqZIfoIV>X`vA2EuAW0Ghj||3;hwn0w`nHnL~5Xr-xuSDNmuyhoZWBBa|hf3)-7$ z6nhe93c?Vv(WT4=mKowy$9Fu8Y)h5yEW6z&zzB7;Yf(a|ei#jb>!ayFWo?MkgWxQK z47{-ws_k4#8xv#$x229MEUK#x*X1k=2QLLnaWhYREFj!ta9&)3I+w+wuB-hQ0SFLZ zlvuP9c*O0k+Bm_8bPyfY2o>Ts&0yRSIg4c@Rv71IVHGS{L3?%!54(HvY;tru5FCHC z9_ER%i7@?-Tq&gCLBVg_3g3?9Gu6P$T^70*)YqUQTN$IHtc4g5UG7WN_J&c!4-lZ& z0a=#~p%2D>Wvx?z(9bP0Z<&FgpEnI^CYsg{+)}t}Teb>kj&)7NNmPz4Zv@MJA2cA4 zE{uQ3IbdMxWrxK|%90Rdmx)yBJ3FI$YLuF4DF~35POQtBilKK{44PuvYIHjt?~mW& zzNwc$LazTnX6dO-hE|>Wu0KO)5xDdvCq>WTfkeI85j!LDvSNHy0&TTnCpr_Y@_=eYt;}dhqY5=4^QRl&pzt9Bed!EmviR=h>B6ynC7MGc`x^9c*)$$|imA)E z9KmcfaDlPY6j0i|;UW8=8oO5$aRyZaYTM*qBd?3;u=u(KdjqYJ_fLd`tRoym(-gX) zqoT2Ua$jR%Ibg0>jte$VWiyOhLaYcnGe^pQ(V0O%I}YnENL$+J%d>ulP(v~JZtnH_wYk$}A_OsQn5BbzOkG2(!baa2N({4d%BrLdzn_qpUhmGmod2kf3s)xrh|=VU=smdZ ze#hs3hAI5A(;4e45x>FbZjXU=hACbM{;p^HFvP31DFz6_lHCVuZC63Xv9`wzN@Y6rcuoPF<~3V<@&m2~m3D5&4GW7GA+XXs{sPo!wDK z85d-&4Og)(j6Q8x3f?Ooxm7VJf?Nw>3_s3fV9y_1xSDfCy31yBhkr2LI_&)xUpcLxXfuNl6z9z^w)MF}E8U)#3YWS4&8 z{-CVR?>0{F?ccm>oP#mMTY-&w90y~vwccFmV3Wd60@~aufc|xzwLI_AA^-goYhcMf z>+D@$bjnFLRX|X?6oMyaW_}(z!Ys&@5~HmlWUY|}!wJnBP8YPsWvf1%(iPjQZ2#s7 zd=-ANqy%pCwL5&H8Tzs{Ux(<1et1ny> z?C%$W*FgAI%!nl0a{QuH&7L*cr$DOVP-67{8fQkKPfPD$L+Lv zSnj#tSMG<%-tcmKzH8dSPFO)VC^+Dw0|si;bY^#=`Ilum3dEF5!JrA9J z^7-aQuXu7vwaQBlnT>)~G|scmodeOzMFBpiJ_`6WePZh+=vMX276uFz4Vd%}>sndc z95j(>Uq_*mC-r*$6iUb)5mCYRy8>n-Y?K==}9iFFRN zB_u(i5p)JpS@Is*ArpnM&nOOwsI6t6IAmTNaVm+)*gWI?2fN{+=&1n$oGYcUGS!0y znn-1azfTgI zyHQk7RQGW=l@WF&jO?B1KXJa9;4BdKcfcpq35}=O+x=GE;TGw}Ub3M+AbPW8_LG;zZ%{IenPEAQ0yCE`_ z5medk+}GQkcA+x*kGZgwAC&01r6-zspCxwld`4~iEZGot%8<4p%sS7d>FR_YB` z1Ifjyuvj`fc|U|FGJ>_SBP*e_IMD*V%9fftjgs&{b6*4#VT3Vun6n`CvL$#d*2ygL z)7eoDSMZ1NGifW#;&EW?%%%0BG5R6&cx8T(iz?c$ah{_eCRo%Dp%dN0c9w$xeo))f z!{R2?4ug`a98BH;1&H}cNC!iP7dTNKFKcpxcOl6#wP-SCOy% z!JYwOsHXEGr4S3cKrNjJ=%MF4T z@!bVaWe=0&6`nIQ;)FZc{l;u(ho}|4c%t0S8wEmM$g~?uCNTxxtk^R4o;IIHXg4Nb zZhIyY?230y#03^WP!{XWxKemhpfBjbwIDOpx8d|`8Pt~dI`s(SzLBSax8yVhRmu9{ zw$*00x8`h$)GaBWP=7&dA{3Isa5b890UcZ}9{lKpxjTOUjiBd@0mQR5q$sBg0u@Iy zwll8RkI|Pv!)|-}!4Q;*3w)M>CtQ|YfuY*dE7B89}m%)-8C#3~yUl6@M z@$xCS^_0V!62E%u6hMI}Baijc^H8CqqH=??%n$8DrN(@_lxx_H?j+3I+s>0uS4W-> zq0;-tBt+ZUCJDUZPCC#K`72}xS)J822;Tq5LaYD!CkRo6su~3oN zg&ag$fC3ZxSR5uvsAWN7eFh2^)f87O^;9TTDscs|OpfUC5ghp1K49VjDrt>4fKO=L zLxxhlumLD^ZNtMYZExK9PV1gvZsMjXa&<%d^2M4I|F-IW|5xsB0rGy*D60s$dYsg6 zMdyH$$qnp@ADG-=TiGN!GTMc$NnfrNngX>@GClAFT;EKG&5U1Bb*)IV83-ppR>OmP z;mE%>wS^m>hiH7_YYVSpTmR5U_95QXcNL(22X&|AmEtABFNSh^r+yF3YBOQc4!O80 zW_5fFeqSWTBALo%V#({BIC-%Lq^vp1z-V;gLfX5Rua>+TgW*Re+49!T|9sLVQu&ivPtDwn<# zB=%%^7~>Vd1WyRru7m;?SybRpuTdTkp!CqN?qy2_^y(`WSe9uYa9qE|o zcGg`Ff;qg;-$@F&9QY~YAiHAU+kZCb9ucTo{Gb6k#xmH@V2*O=2$V9hv3N!FG!${7 zTp-rnDN>xcgi;~=_Mxb*sFFSwD6?;CdR1Cbi8F3{DehvaW-t1+1l`nx@J2Uuss#I} z7YEQopO?lmS-vrY<18fFZQj;RUYHV1%R8M@0Tkd>SU5a}8CH-r{t1(N7NT#$sq)^w zmVCLx`_@z>k8uq?b|oJ{kgpSC_o3O$%4V2RH#rTN1lnS2uTuJCihJod=< zbK*bD&;BL?vnWrN{SD(*)sBR6Em-F63?LK}2oSl&aN^HYHdZan2q(BF z)D7uS5-tMDl2IECM|7gx%2> zc};Ho`i;kR%Dy)GUpF~6W1Ki*Wd%6#FMi5xBe)PX;SaussO4z3-v?U!u2?q%8AwgJaANO0!?)r6)*$^idCj}7^=gi;C5G{41QB@Q*c8MR zn@7|~dhs0<3%J0Tf=dI8%-XKKYj#sRI^D}q0b6V;M(o(HwO9@8wBzAG+cAYdGz_#F+444xshfBlAac=NZ;*fOTY9TtZ05z^pR5AEUigsEZVK|3P%EN69l9T#rt ztMj^w%zcjN9ADJ>WP_UYuZX&jZR@ji&u>=*IXGQau?w2zE-No+$nTgu_GgZsa&$M# zZYvI)dh>Bd=#L)dh+N*aEL{^5`qD^U_KpbEKUE%6$K7WS@R1G!nIcLmnv5J+Ack3a z2%04+f%{()h=i%kj`tsqCkKKoh%KE`ZGs_5p$zYHg~mcPi@d*l{hE-c6mFY*IgBX* zL6~^BD26Gh26+p)EPJ2IL;Sue$6HLwX#VB^s1h4Q+Hww|5(zlpA&M+;`=Svm=S+;v zJkHERRBWx#%q|GpK%F+Rc$V1Q(oO+`kKp_?Haa3}B9gaq1r)nI#4!25hPe^VDlLJ6 z5!=XtON&dC5`5o5js^}ccFq*%Q{E2ZcqcfHG;3~hzIV1Smr2JnUrzA}qvJS0pHByD zCj6^D|3`QKV-Mkn7l`7C+;{KiDa87OI_;q(s#HJaMS4T(P0Ely98^+ZR5*wy_!G56 z3+J?z-u?HtV2|%ah$ea4I0FGlLpsR$NLzoiQt?zYqY;)WuKzk zX&zj^7gwX#;?y|AsCmpgmqu;LL}sQV%xExYp;~&@;1uwbc*ZH@^yP4QVY8iniz)@m z`NT(X?G-$aA(h8Yb5{k|ODM1t4fD*k+EhMk&aPsfdgTiZ`crm;aE@iffH$0xl)xzk zP;cf1mo~EIT*L1pFr>c)6bMypnY#=C1chd$F z%xSI__^fdrclZD!Ywh;nrQKS)Gv4n`Ga?-lrHjRFhZVaU8$}1Fr&DC&0+5EHg+pD* z&pKO@6Taone5>3KFT+$B7Il<7`8grSj`|R;58(C6d48Z%;pV6 zj;G<~o22D(mZ@K0+17Z31aLV+Ib~<-!z5SSzQzTB0}{rh&2duz%ly zaG}^#dJ9k$#eoF^;`w!0|1(z1zu5!@L z@tL*vL%QefR>d1{NE>i|3C`dpl0@?KUi{TkiN6mGNRUDey67%i8-Y4@?C?4BK3S) zfr7HErec}l`_~GWBpfXk`;cTxqhQ@?lDsP1%O4g~b66sRNmD#`1VWS0+t5BO78E2& zICkZ`iPxc*m11BQxRt7dE1Ik0(P7<}s}!ezaiQ@+*Mlw==xGFmqi$4i>jy2&9mUsA z*j>?_P%uwoz{pMh_#KrelvNTR1Opo6mb0SRdK0M!Onk`Fp z=ys4!Z0vaFCTK~5b`EdIQS#2A*Qxqp3-@B7aA|=0WBE1wz(P~(nkuXl$tH%v&|#9R zeLm0olbua(?JgZv2G?R6yz3gVQMwP#Y?)mq-k6@gOK|{k8!R#T#dqf~3JgcyYV_!1 zp9v$!CMgIg^wGUhsG`m7QN0#1VZJ^W5m6TdZ-x>ULth(W{8-URkIild7h~&lW-x6# zkamVW=Fm$^>gUSsTS%jcc8$w;GJ85Mm6ERkFl=0h8YO#a*X7vZdhL(NZ^$yXf-l)ch{DbY`+M4q6{fN>WVq;uQz|Q)ZP2YT2wh+vZ+$wOqNyK`2r(RlH>uebaK2avbVcg z{@;W^5h;qUc)ExRI?u}9`&={vL4h#9%kfVg8oSDKpXrtx)=Dkv95RS`c6_Ya%CPQC zTS5MSS`B|Ys|SBOr^kwpi#7i^XAT5X7Z2tT*1m^K5{>uKVM+tlmjz}bI(8LGIh*ms zsMRF~)Z zhf64Z9SiFjJH1?Ww#3?_{~Ehqr&!d1@{PteLg{| z77qv)uM`QvK+3m{7!R~TPcnJ&7Vd@$JSpSW?&Q|)()t24_zF+GMe1DJe9u=JL((pz z4@A;xoiw;3?LGCEciG5$Z{N|`rA>OUUZZTmgJoTfSjMXtou~^{@2Gdt3#}aVPkp&$ z;<#mYqWv~IR4PWq6R@TK>G(xHnxscc2G>Kz zna3IzOUIMP6YyJPT55w=uM}j6{e%$j8MAVCg2K`y>GEQHGW+Q1C~P&o&OS8KcHC@N z=WVu!LBgQ8k675M3KmokUnj4A2`EwxIHITBFM{dT(;41?F>3Zo@~au76RvQJs*KoS z&L@-VLeWtdWPLNQgrr$_l(4LdjNv_DW?{dFzQj%)S2oXPWW_8#V2>5y%Hx-?Of->d(WT$~az&0U;asF!k=o??sn0dY zP~Sai?n7|WSX9ty2<<9(n`Ys=AX@RNRjzxYcMjsFZ?*klo(9`Xy0pz%+dO3^(+0== zbA1P2Ogj6>A;Xc#xtnp7B~iZ?OK=h>aDmEqi5QqA&V7UYaQwbvoMw%fid2k?v=$&W zU9LC1N7!8#Q-WfmkA|V1){F$W1nSN@5^O7TnxTnpys|30Y$U>gDEnU0u7`$EzCUgxKF=SKK zc(M!e{m6AkXWHEu3NF(2SA@7<23J^(Jg^;%h5KGp(c)gN$N7PNs6sUOs-M(%hY-0? z|B;LE-P5z_yS}s1J{j;76a!AP{;PNwe>?_)&boGne>lMWCEi7uGGMK$fW+GXaJzP@ zLeKG9htxxEMuTA+D1<>_B7;wzX8q{haH4_P(6W0v8!dhg{dEgbRwR;)&j-;kT{BT* zGF5alYiw*J#lFCK_w@1W)i+2V*HX%u9(Z`}>My23@3YcyD46nzA%%NuA6 z$lONl=$>A5cNf{XGkwN zKJmz+b(iE7?Za|mYx@aj!F+AgUP^!_!U^+IR_LR7^Wd6_?3V!V5M8Vknv-+Y*0=VB z3RDkWb~q(Xg>VWlaH=;l$s&6kowW8sh+In-9=`2&@$jt{s5oin8d<4-abf1&S1-yY z4Xll-Q5$CpVd1vYSL)4;BBv`+o2Uw73krO-6KUK|T~D`hx1+))!2)*!D_zF}$3nUF z@+Bco^6H5c!eU*o;#dsv6N7QlCIKiGMYk#s&zjCk;|@N&6P?8zHiT>2<9Z~6OW+dy z1;en?LH?maVakQZ=w<717oPTVD5{odQy#~CajBt5Rs?}0C1?oiNK3OWSt#y7$R%ayCbDQ7oAH<-&`Wp2>)fn@T+)hdW? zvE+)d2_$+7ALBDazH-i|WSMsT%KI8p;uxa*y6SzABt(4(r{>`#y^}+@uNBzb65Cdz zz%0=Yndh4^T4e5FymIOP2e;OLU$IhxNx)$Py!MR08zX)l`2XVJ z^~^~xQbAU_TL8%u;DbF~QB3)XgcU}tLY7)W0SyEOdbQ!8*+P<|dL`kJ9q|#!JE2iF z2P|F)Gcm)p=B!P3ckkv1x081a-vK`zC7nzWwj4fZ4YttY{*0j83 z`PT;>OuT#X3hZf2Y|#0OO*KdOdF<`w8GXTMqD!jidZDjP_B-7vFClC@%wCpeyiVBR z-jHXmyT>GNns9^GS}Ruz7(N+Gs|YythV2@4+Vsb`i=eGpP)ZXpdFz-;FN8{;cCt`v zc+QT8%U1bDX*pG@Uj@NNt;c*Ds=wF$3*_JHS9k(r_YmL_=>d2n_*Y@vV3A``LM;>6=Nn|z zre+N07A%UrbNF+fy2fh#6N|1jjqmfH-t*^9**oh)QB;1kEqHS}+ypo@-}EWd{rd6h z%$flx&-P89`bb8uk&YOaJsvhT3Wg!wx(1MRS$J~<4L!=WM+XbG8e#Rw9dqM9!@ z+#_6QHns5>W898fQL8nHugDl&2EBr0Q&x_YDt@cktT5=HQP5iCd`p4gHB$_A!2NZi zfd&6%=r+PKcF zcD>}A2!}ZrljP{g7lSURAIQNm87b5}hmrWXJFAsVr&+soJYUbIW<3f`8Rn&64AN|n zSdEEN^c|s2!F}}qI+8?SVwkqY15P7FqL;E!ycf$J%{gv!1HO@T*!_;91hNgu4&Yv_ zLVv=T^B%)U-s|Imj%(pjRp^!<7P~u*P@4{oI(<@|8!tD9aMICh#2eS4$eGG3v%|!D z3A9hb5HtqpqehMMa#N!Ts_sj&kZ`-;{^vSa$2KvUzQTu(^Rn+6Ub!urJ5;1XyfGF+ zPk&ug5Jz{R?Xt?FQ>0Rd;JiS)`RxM2aDHoU{Tt$KM~`fJ4=u@MHp~=H1h{{0>(l^Z z)`#oM8@Fg94%5>@ozPzIKn4u?Z9^Kdq zb>z6+;*Il{_Z$%8;%)VaMOgBcyqA`}UcP78_o$yfdftM9!cK-_c98twa zHqXs$;lCQr75r$Jq!!*D1TBMN$&{KKiwJy76aO*8aAD0)##01^2jiQZ=S6PyL9z`dPCX(PcIvRFR%Q%oq&J*9@-?yiy6KV#!b`ri50d zRQ+HHJA+XuO_7QOd(_ieE+CfY<*sY!`#?Q6B zy5398or>DtM&>Pt;fqQzX%#y7TO~D@!Q8N`jsznSaHVV@QII_GY`mUV{igy`NP(A}J%X}?5&&wsZWPQiBz zc?)>svRp9m2Q!__B)myK^VmyYTJ!dL1hE0?7sFX%XPzI+HQT~=qMN2?g-TJ)yv&^o zP-?RkV&wTaPG0K7dqAKQ@lbwGb9HunYmN}@dk%i*Y6CgtG26<8lS=_zY90qI7DfB}ire6El{#mc z;nEwoLQ&~Dc`v!lIOL$!8Cqc^q1h(sj5ncZeba?%Dy69??%`Jp?ZZZ>TN*R4Ep}sI zw{?js2HG>`K26%gY%2}$aMg~J`MfG&2;w$5vc%2GLM?tmm92FD7>Lt&#@luqnUb7n zMTH2f?x*aH%6_dW3+wKB{N5x-bY8Q7_w;nlC+dFhl!&BN&Ff1*S?}lyRicHzJ65=f zO#y?AA+n$PMh7kEH#NpfC>Lnwc{{Z)Vlk`VfVXgIAuJw^YU76nsxsw4)XG69SOl3M zXsToc7Sjz)_Km2o@OS4l8Pk|X#8Bcodlqp{eX(rt5%t!Csf6D|iO(IUR*jxn8u2KO zQ2ElC42(){N+?>x3X&7oo+mgooiaS zIvzb95Qu_Akw-&VCsEKR{6ZwE1sQ^Dq&q8pmb6%CggTRbctH9@U2Nq8LLNW}pd=Wl z)2ye3h=#^9CL^`Tj0Z|w$>T;#V)NRoh|No=l@&1z-e+UkRuibQ&9wG2&Ky}hRs@pk z&{u^6Votln-4}O_cY$AM;?jnlE9nfz_he1h*m+5^E44Gg@Gffy)%TbyGEpeMe`{2) z5*7nD8Bstj#>{{T1EU_vd5^`35WIP5gh(GPDeFoGC)=FJWY{fZomyNDEx}y7*y@Q+ zE!*X`kfss8HWb@hx{mGnzB$zNE*{{roGJ) z74vfpFx-*xmyL|>aP{5|H_RRB2nK&RUyU)Q5Nyxk0h)N4isUHfG~i4EXs`76b>R{p zaTE$B^0yjYa0Dz4T!#L-BNMU4i_Hbr=KTo*#^mn;q#H-@)7~#Sw!WzJVyR2QRWHPVe)!r_j!+mZ)-gCwne;e2sekE2s#u zBB@|AlL)>RmIfI%!jyQ9yJ=36Y=kjt3Ss$!7>SBfYIXZ3iz10mkjP@voHl-|)^tIh z#IY2OH0SyP1y$O`Gex+}Lv)?dR?e$O)x$1IK~cET zQ>(H{FhP9X=x~9~8;=t1n2V;CyWI65+}B__iGq-W+!Er~oYCPvy%Po`*xl&OqhjBD zAY4Ky{Ib^XLF8{~54CQ6@9!S7KA#DyA;cCC4>(OU)A_lDLI*%?VKI zVF7!a^&(NWCGBf}7T177CBQTaEqJ;4=I>8sWt6@0_tP^XfDa+y^Fs#!aMb<(TLYk) zx#~9>06Tw+{0|I*1`1Fvhk^oP1X%b0y#E*V9xyumxR8KO1iyck6;%?Xmy{C&9Mu1N zvW7l2DgnShC<8udfX|;-p6~a!#s5ntD<~%^CaS3PLRRdr2;|R*0khqY3km3(U>e}N zwVm0c5a{ypIj35H*oP5cau-UI%12Jj*Mk^K9u z))ybJ{`#KRAIyIO{HY7|XQcJ#IqF>voJ9l7^EQBze{cRjuUcPVz+e9f@cF6^u)cF~ z6?Akk0mQyF)&CjT`8ng>v6_7`fMyBsA^DRIaIf`s2IS#4jFNwr;g6Th=XhX6ZYx@V zyea@v)Bg=m7ho&?4W782u7QQ2G9diCgteuijJ377qs{N3@iw)WdI2E!fL{82L-^0D z))&xce+LbS`D@{54>(sQW@=$5sIPBmZ!fEBrEC1B(!%q+kHG7QeUG4h2e9Y;J?{hn zQPbb#UG)!X4uGk{$kf;o5I!3aO8)nGSMbC)-2qeyHX!eee`XwTul2o0`YrVH_LKmK zMOgf|jOV*DHmd+K4g{#3?<2;aSFJBS#&6MOtd0L`EsWV6g`ordOsoK9{(da#&#TtA z6CeWen_Bpr?A`B+&$(K^f(v-Wjsc?p(Vu{Td#x`v;OB2J0fzz|bS*4?kG9e&6WRl) z%y)o+>F@1i2j~~SK@+mJcK9y4VI!++Y6Y;l{uJAI-UTFP8_1>rZA1zv>UYV6Kd)L} zU(Vk`|L6juE{6J!{}(;|Icfk-UP(0oRS1Ae^Cu+WUhA7G{9DvN9*Q5>-!uLDig>QM z`zLg*ZvsF><~J4bqgwyl@bg^b@F$)FU_k#3-rt)3zbPI*uZ`#Wc|TdaRDa9z&m+!r z*_@wnvv2-y^87IX|8@fXYyQ4(ZatU1`3Y$J_P>kZJV*JS>iZ-4{rWB&^T+jl9<$W_ zTPeSXuz8;Nxrof4$!mSne@*(7j@&*7g7gZzZ2H25WNe}Vn+a>?{-Z~R_w z&m}m1qM{o93)FuQ46!nEyV!!gHSIhx~u?BuD(h^XuU8ua5jb=X`!t`zNPZ^#A7k{c!c% zr}ii2dCvdF{Edh0^GrW?VEjq2llLzO{yIwiz68(R$9@tF6#hc+=PdDW48PAy^4#6y zCy{UIFGRm|*MEB4o^PT5L=LX_1^L&`^au3sH`JdO;`!F)Pb#&ybLsOPyPvR& zHU9+rW5D=_{k!J{cy8DK$wbij3)A!WhriU_|0vLNTk}tv^QK>D{sQ}>K!4o+VeETu zbo_}g(fTj&|GNqDd3`;%qx>XV1sDeYcrynq2!C%?c_j@FcnkclF2e+b1PDE++xh+1 F{{tUq7iIte literal 0 HcmV?d00001 diff --git a/java8-retrofit2/gradle/wrapper/gradle-wrapper.properties b/java8-retrofit2/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..b7a3647 --- /dev/null +++ b/java8-retrofit2/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Tue May 17 23:08:05 CST 2016 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip diff --git a/java8-retrofit2/gradlew b/java8-retrofit2/gradlew new file mode 100644 index 0000000..9d82f78 --- /dev/null +++ b/java8-retrofit2/gradlew @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/java8-retrofit2/gradlew.bat b/java8-retrofit2/gradlew.bat new file mode 100644 index 0000000..5f19212 --- /dev/null +++ b/java8-retrofit2/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/java8-retrofit2/pom.xml b/java8-retrofit2/pom.xml new file mode 100644 index 0000000..a4474ac --- /dev/null +++ b/java8-retrofit2/pom.xml @@ -0,0 +1,151 @@ + + 4.0.0 + com.sphereon.sdk + template-processor-sdk-java8-retrofit2 + jar + template-processor-sdk-java8-retrofit2 + 0.1.0 + + scm:git:git@github.com:swagger-api/swagger-mustache.git + scm:git:git@github.com:swagger-api/swagger-codegen.git + https://github.com/swagger-api/swagger-codegen + + + 2.2.0 + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.12 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + pertest + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + jar + test-jar + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + + + + + io.swagger + swagger-annotations + ${swagger-core-version} + + + com.squareup.retrofit2 + converter-gson + ${retrofit-version} + + + com.squareup.retrofit2 + retrofit + ${retrofit-version} + + + com.squareup.retrofit2 + converter-scalars + ${retrofit-version} + + + org.apache.oltu.oauth2 + org.apache.oltu.oauth2.client + ${oltu-version} + + + + + junit + junit + ${junit-version} + test + + + + UTF-8 + 1.8 + ${java.version} + ${java.version} + 1.5.9 + 2.1.0 + 1.0.1 + 4.12 + + diff --git a/java8-retrofit2/settings.gradle b/java8-retrofit2/settings.gradle new file mode 100644 index 0000000..7e0d801 --- /dev/null +++ b/java8-retrofit2/settings.gradle @@ -0,0 +1 @@ +rootProject.name = "template-processor-sdk-java8-retrofit2" \ No newline at end of file diff --git a/java8-retrofit2/src/main/AndroidManifest.xml b/java8-retrofit2/src/main/AndroidManifest.xml new file mode 100644 index 0000000..f59485d --- /dev/null +++ b/java8-retrofit2/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/MergeApi.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/MergeApi.java new file mode 100644 index 0000000..8ec5109 --- /dev/null +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/MergeApi.java @@ -0,0 +1,223 @@ +package com.sphereon.sdk.template_processor.api; + +import com.sphereon.sdk.template_processor.handler.CollectionFormats.*; + + +import retrofit2.Call; +import retrofit2.http.*; + +import okhttp3.RequestBody; + +import com.sphereon.sdk.template_processor.model.DataSetResponse; +import com.sphereon.sdk.template_processor.model.ErrorResponse; +import com.sphereon.sdk.template_processor.model.TemplateContextResponse; +import com.sphereon.sdk.template_processor.model.TemplateContextRequest; +import com.sphereon.sdk.template_processor.model.MergeJobResponse; +import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.MergeSettings; +import java.io.File; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public interface MergeApi { + /** + * Store dataset + * Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + * @param payload The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] (required) + * @return Call<DataSetResponse> + */ + + @Headers({ + "Content-Type:application/json;charset=UTF-8" + }) + @POST("template-processor/merge/0.1/datasets") + Call createDataSet( + @retrofit2.http.Body String payload + ); + + /** + * Create template context + * Create a unique template context for your environment + * @param templateRequest The template request (required) + * @return Call<TemplateContextResponse> + */ + + @Headers({ + "Content-Type:application/json;charset=UTF-8" + }) + @POST("template-processor/merge/0.1/templates") + Call createTemplateContext( + @retrofit2.http.Body TemplateContextRequest templateRequest + ); + + /** + * Delete a stored data set + * Delete a stored data set + * @param dataSetId dataSetId (required) + * @return Call<DataSetResponse> + */ + + @Headers({ + "Content-Type:application/json" + }) + @DELETE("template-processor/merge/0.1/datasets/{dataSetId}") + Call deleteDataSet( + @retrofit2.http.Path("dataSetId") String dataSetId + ); + + /** + * Delete a job manually + * Delete the merge job and all related files + * @param jobId jobId (required) + * @return Call<MergeJobResponse> + */ + + @Headers({ + "Content-Type:application/json" + }) + @DELETE("template-processor/merge/0.1/jobs/{jobId}") + Call deleteJob( + @retrofit2.http.Path("jobId") String jobId + ); + + /** + * Delete template context + * Delete a template context with all history + * @param templateId templateId (required) + * @return Call<TemplateContextResponse> + */ + + @Headers({ + "Content-Type:application/json" + }) + @DELETE("template-processor/merge/0.1/templates/{templateId}") + Call deleteTemplateContext( + @retrofit2.http.Path("templateId") String templateId + ); + + /** + * Job definition and state + * Get the merge job definition and current state. Please not that you can differentiate based on http response status + * @param jobId jobId (required) + * @return Call<MergeJobResponse> + */ + + @Headers({ + "Content-Type:application/json" + }) + @GET("template-processor/merge/0.1/jobs/{jobId}") + Call getJob( + @retrofit2.http.Path("jobId") String jobId + ); + + /** + * Get all jobs + * Get all office text job definitions and their current state. + * @param status A list of status to filter on. (optional) + * @return Call<List> + */ + + @Headers({ + "Content-Type:application/json" + }) + @GET("template-processor/merge/0.1/jobs") + Call> getJobs( + @retrofit2.http.Query("status") List status + ); + + /** + * Get the result file + * Get a merge result document as a binary stream. + * @param jobId jobId (required) + * @param streamId streamId (required) + * @param outputSettings outputSettings (optional) + * @return Call<byte[]> + */ + + @Headers({ + "Content-Type:application/json;charset=UTF-8" + }) + @PUT("template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId}") + Call getResultStreamById( + @retrofit2.http.Path("jobId") String jobId, @retrofit2.http.Path("streamId") String streamId, @retrofit2.http.Body OutputSettings outputSettings + ); + + /** + * Get the result file + * Get all documents inside a compressed container as a binary stream. + * @param jobId jobId (required) + * @param outputSettings outputSettings (optional) + * @return Call<byte[]> + */ + + @Headers({ + "Content-Type:application/json;charset=UTF-8" + }) + @PUT("template-processor/merge/0.1/jobs/{jobId}/result/container") + Call getResultStreamsAsContainer( + @retrofit2.http.Path("jobId") String jobId, @retrofit2.http.Body OutputSettings outputSettings + ); + + /** + * Get template context + * Get an existing template context + * @param templateId The template context name unique for your environment (required) + * @return Call<TemplateContextResponse> + */ + + @Headers({ + "Content-Type:application/json" + }) + @GET("template-processor/merge/0.1/templates/{templateId}") + Call getTemplateContext( + @retrofit2.http.Path("templateId") String templateId + ); + + /** + * Submit merge job for processing + * Submit merge job run. + * @param mergesettings The merge- and output settings (required) + * @return Call<MergeJobResponse> + */ + + @Headers({ + "Content-Type:application/json;charset=UTF-8" + }) + @PUT("template-processor/merge/0.1/jobs") + Call submitJob( + @retrofit2.http.Body MergeSettings mergesettings + ); + + /** + * Update template context + * Update an existing template context for your environment + * @param templateContextRequest templateContextRequest (required) + * @return Call<TemplateContextResponse> + */ + + @Headers({ + "Content-Type:application/json;charset=UTF-8" + }) + @PUT("template-processor/merge/0.1/templates") + Call updateTemplateContext( + @retrofit2.http.Body TemplateContextRequest templateContextRequest + ); + + /** + * Upload template file + * Upload the Office template file + * @param templateId The template context name unique for your environment (required) + * @param stream The template (file/inputstream) to store (required) + * @return Call<TemplateContextResponse> + */ + + @retrofit2.http.Multipart + @POST("template-processor/merge/0.1/templates/{templateId}") + Call uploadTemplateFile( + @retrofit2.http.Path("templateId") String templateId, @retrofit2.http.Part("stream\"; filename=\"stream") RequestBody stream + ); + +} diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java new file mode 100644 index 0000000..00f054a --- /dev/null +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java @@ -0,0 +1,415 @@ +package com.sphereon.sdk.template_processor.handler; + +import java.io.IOException; +import java.lang.annotation.Annotation; +import java.lang.reflect.Type; +import java.util.Date; +import java.util.LinkedHashMap; +import java.util.Map; + +import org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import retrofit2.Converter; +import retrofit2.Retrofit; + +import retrofit2.converter.gson.GsonConverterFactory; +import retrofit2.converter.scalars.ScalarsConverterFactory; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import okhttp3.Interceptor; +import okhttp3.OkHttpClient; +import okhttp3.RequestBody; +import okhttp3.ResponseBody; + + +import com.sphereon.sdk.template_processor.handler.auth.HttpBasicAuth; +import com.sphereon.sdk.template_processor.handler.auth.ApiKeyAuth; +import com.sphereon.sdk.template_processor.handler.auth.OAuth; +import com.sphereon.sdk.template_processor.handler.auth.OAuth.AccessTokenListener; +import com.sphereon.sdk.template_processor.handler.auth.OAuthFlow; + + +public class ApiClient { + + private Map apiAuthorizations; + private OkHttpClient.Builder okBuilder; + private Retrofit.Builder adapterBuilder; + + public ApiClient() { + apiAuthorizations = new LinkedHashMap(); + createDefaultAdapter(); + } + + public ApiClient(String[] authNames) { + this(); + for(String authName : authNames) { + Interceptor auth; + if (authName == "oauth2schema") { + auth = new OAuth(OAuthFlow.application, "", "https://gw.api.cloud.sphereon.com/token", "global"); + } else { + throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names"); + } + addAuthorization(authName, auth); + } + } + + /** + * Basic constructor for single auth name + * @param authName Authentication name + */ + public ApiClient(String authName) { + this(new String[]{authName}); + } + + /** + * Helper constructor for single api key + * @param authName Authentication name + * @param apiKey API key + */ + public ApiClient(String authName, String apiKey) { + this(authName); + this.setApiKey(apiKey); + } + + /** + * Helper constructor for single basic auth or password oauth2 + * @param authName Authentication name + * @param username Username + * @param password Password + */ + public ApiClient(String authName, String username, String password) { + this(authName); + this.setCredentials(username, password); + } + + /** + * Helper constructor for single password oauth2 + * @param authName Authentication name + * @param clientId Client ID + * @param secret Client Secret + * @param username Username + * @param password Password + */ + public ApiClient(String authName, String clientId, String secret, String username, String password) { + this(authName); + this.getTokenEndPoint() + .setClientId(clientId) + .setClientSecret(secret) + .setUsername(username) + .setPassword(password); + } + + public void createDefaultAdapter() { + Gson gson = new GsonBuilder() + .setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") + .registerTypeAdapter(OffsetDateTime.class, new OffsetDateTimeTypeAdapter()) + .registerTypeAdapter(LocalDate.class, new LocalDateTypeAdapter()) + .create(); + + okBuilder = new OkHttpClient.Builder(); + + String baseUrl = "https://gw.api.cloud.sphereon.com/"; + if(!baseUrl.endsWith("/")) + baseUrl = baseUrl + "/"; + + adapterBuilder = new Retrofit + .Builder() + .baseUrl(baseUrl) + + .addConverterFactory(ScalarsConverterFactory.create()) + .addConverterFactory(GsonCustomConverterFactory.create(gson)); + } + + public S createService(Class serviceClass) { + return adapterBuilder + .client(okBuilder.build()) + .build() + .create(serviceClass); + + } + + /** + * Helper method to configure the first api key found + * @param apiKey API key + */ + private void setApiKey(String apiKey) { + for(Interceptor apiAuthorization : apiAuthorizations.values()) { + if (apiAuthorization instanceof ApiKeyAuth) { + ApiKeyAuth keyAuth = (ApiKeyAuth) apiAuthorization; + keyAuth.setApiKey(apiKey); + return; + } + } + } + + /** + * Helper method to configure the username/password for basic auth or password oauth + * @param username Username + * @param password Password + */ + private void setCredentials(String username, String password) { + for(Interceptor apiAuthorization : apiAuthorizations.values()) { + if (apiAuthorization instanceof HttpBasicAuth) { + HttpBasicAuth basicAuth = (HttpBasicAuth) apiAuthorization; + basicAuth.setCredentials(username, password); + return; + } + if (apiAuthorization instanceof OAuth) { + OAuth oauth = (OAuth) apiAuthorization; + oauth.getTokenRequestBuilder().setUsername(username).setPassword(password); + return; + } + } + } + + /** + * Helper method to configure the token endpoint of the first oauth found in the apiAuthorizations (there should be only one) + * @return Token request builder + */ + public TokenRequestBuilder getTokenEndPoint() { + for(Interceptor apiAuthorization : apiAuthorizations.values()) { + if (apiAuthorization instanceof OAuth) { + OAuth oauth = (OAuth) apiAuthorization; + return oauth.getTokenRequestBuilder(); + } + } + return null; + } + + /** + * Helper method to configure authorization endpoint of the first oauth found in the apiAuthorizations (there should be only one) + * @return Authentication request builder + */ + public AuthenticationRequestBuilder getAuthorizationEndPoint() { + for(Interceptor apiAuthorization : apiAuthorizations.values()) { + if (apiAuthorization instanceof OAuth) { + OAuth oauth = (OAuth) apiAuthorization; + return oauth.getAuthenticationRequestBuilder(); + } + } + return null; + } + + /** + * Helper method to pre-set the oauth access token of the first oauth found in the apiAuthorizations (there should be only one) + * @param accessToken Access token + */ + public void setAccessToken(String accessToken) { + for(Interceptor apiAuthorization : apiAuthorizations.values()) { + if (apiAuthorization instanceof OAuth) { + OAuth oauth = (OAuth) apiAuthorization; + oauth.setAccessToken(accessToken); + return; + } + } + } + + /** + * Helper method to configure the oauth accessCode/implicit flow parameters + * @param clientId Client ID + * @param clientSecret Client secret + * @param redirectURI Redirect URI + */ + public void configureAuthorizationFlow(String clientId, String clientSecret, String redirectURI) { + for(Interceptor apiAuthorization : apiAuthorizations.values()) { + if (apiAuthorization instanceof OAuth) { + OAuth oauth = (OAuth) apiAuthorization; + oauth.getTokenRequestBuilder() + .setClientId(clientId) + .setClientSecret(clientSecret) + .setRedirectURI(redirectURI); + oauth.getAuthenticationRequestBuilder() + .setClientId(clientId) + .setRedirectURI(redirectURI); + return; + } + } + } + + /** + * Configures a listener which is notified when a new access token is received. + * @param accessTokenListener Access token listener + */ + public void registerAccessTokenListener(AccessTokenListener accessTokenListener) { + for(Interceptor apiAuthorization : apiAuthorizations.values()) { + if (apiAuthorization instanceof OAuth) { + OAuth oauth = (OAuth) apiAuthorization; + oauth.registerAccessTokenListener(accessTokenListener); + return; + } + } + } + + /** + * Adds an authorization to be used by the client + * @param authName Authentication name + * @param authorization Authorization interceptor + */ + public void addAuthorization(String authName, Interceptor authorization) { + if (apiAuthorizations.containsKey(authName)) { + throw new RuntimeException("auth name \"" + authName + "\" already in api authorizations"); + } + apiAuthorizations.put(authName, authorization); + okBuilder.addInterceptor(authorization); + } + + public Map getApiAuthorizations() { + return apiAuthorizations; + } + + public void setApiAuthorizations(Map apiAuthorizations) { + this.apiAuthorizations = apiAuthorizations; + } + + public Retrofit.Builder getAdapterBuilder() { + return adapterBuilder; + } + + public void setAdapterBuilder(Retrofit.Builder adapterBuilder) { + this.adapterBuilder = adapterBuilder; + } + + public OkHttpClient.Builder getOkBuilder() { + return okBuilder; + } + + public void addAuthsToOkBuilder(OkHttpClient.Builder okBuilder) { + for(Interceptor apiAuthorization : apiAuthorizations.values()) { + okBuilder.addInterceptor(apiAuthorization); + } + } + + /** + * Clones the okBuilder given in parameter, adds the auth interceptors and uses it to configure the Retrofit + * @param okClient An instance of OK HTTP client + */ + public void configureFromOkclient(OkHttpClient okClient) { + this.okBuilder = okClient.newBuilder(); + addAuthsToOkBuilder(this.okBuilder); + + } +} + +/** + * This wrapper is to take care of this case: + * when the deserialization fails due to JsonParseException and the + * expected type is String, then just return the body string. + */ +class GsonResponseBodyConverterToString implements Converter { + private final Gson gson; + private final Type type; + + GsonResponseBodyConverterToString(Gson gson, Type type) { + this.gson = gson; + this.type = type; + } + + @Override public T convert(ResponseBody value) throws IOException { + String returned = value.string(); + try { + return gson.fromJson(returned, type); + } + catch (JsonParseException e) { + return (T) returned; + } + } +} + +class GsonCustomConverterFactory extends Converter.Factory +{ + public static GsonCustomConverterFactory create(Gson gson) { + return new GsonCustomConverterFactory(gson); + } + + private final Gson gson; + private final GsonConverterFactory gsonConverterFactory; + + private GsonCustomConverterFactory(Gson gson) { + if (gson == null) throw new NullPointerException("gson == null"); + this.gson = gson; + this.gsonConverterFactory = GsonConverterFactory.create(gson); + } + + @Override + public Converter responseBodyConverter(Type type, Annotation[] annotations, Retrofit retrofit) { + if(type.equals(String.class)) + return new GsonResponseBodyConverterToString(gson, type); + else + return gsonConverterFactory.responseBodyConverter(type, annotations, retrofit); + } + + @Override + public Converter requestBodyConverter(Type type, Annotation[] parameterAnnotations, Annotation[] methodAnnotations, Retrofit retrofit) { + return gsonConverterFactory.requestBodyConverter(type, parameterAnnotations, methodAnnotations, retrofit); + } +} + +/** + * Gson TypeAdapter for jsr310 OffsetDateTime type + */ +class OffsetDateTimeTypeAdapter extends TypeAdapter { + + private final DateTimeFormatter formatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME; + + @Override + public void write(JsonWriter out, OffsetDateTime date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public OffsetDateTime read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + if (date.endsWith("+0000")) { + date = date.substring(0, date.length()-5) + "Z"; + } + + return OffsetDateTime.parse(date, formatter); + } + } +} + +/** + * Gson TypeAdapter for jsr310 LocalDate type + */ +class LocalDateTypeAdapter extends TypeAdapter { + + private final DateTimeFormatter formatter = DateTimeFormatter.ISO_LOCAL_DATE; + + @Override + public void write(JsonWriter out, LocalDate date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public LocalDate read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + return LocalDate.parse(date, formatter); + } + } +} diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/CollectionFormats.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/CollectionFormats.java new file mode 100644 index 0000000..fdc012f --- /dev/null +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/CollectionFormats.java @@ -0,0 +1,95 @@ +package com.sphereon.sdk.template_processor.handler; + +import java.util.Arrays; +import java.util.List; + +public class CollectionFormats { + + public static class CSVParams { + + protected List params; + + public CSVParams() { + } + + public CSVParams(List params) { + this.params = params; + } + + public CSVParams(String... params) { + this.params = Arrays.asList(params); + } + + public List getParams() { + return params; + } + + public void setParams(List params) { + this.params = params; + } + + @Override + public String toString() { + return StringUtil.join(params.toArray(new String[0]), ","); + } + + } + + public static class SSVParams extends CSVParams { + + public SSVParams() { + } + + public SSVParams(List params) { + super(params); + } + + public SSVParams(String... params) { + super(params); + } + + @Override + public String toString() { + return StringUtil.join(params.toArray(new String[0]), " "); + } + } + + public static class TSVParams extends CSVParams { + + public TSVParams() { + } + + public TSVParams(List params) { + super(params); + } + + public TSVParams(String... params) { + super(params); + } + + @Override + public String toString() { + return StringUtil.join( params.toArray(new String[0]), "\t"); + } + } + + public static class PIPESParams extends CSVParams { + + public PIPESParams() { + } + + public PIPESParams(List params) { + super(params); + } + + public PIPESParams(String... params) { + super(params); + } + + @Override + public String toString() { + return StringUtil.join(params.toArray(new String[0]), "|"); + } + } + +} diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java new file mode 100644 index 0000000..dfbad66 --- /dev/null +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java @@ -0,0 +1,67 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler; + +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:12.470+02:00") +public class StringUtil { + /** + * Check if the given array contains the given value (with case-insensitive comparison). + * + * @param array The array + * @param value The value to search + * @return true if the array contains the value + */ + public static boolean containsIgnoreCase(String[] array, String value) { + for (String str : array) { + if (value == null && str == null) return true; + if (value != null && value.equalsIgnoreCase(str)) return true; + } + return false; + } + + /** + * Join an array of strings with the given separator. + *

+ * Note: This might be replaced by utility method from commons-lang or guava someday + * if one of those libraries is added as dependency. + *

+ * + * @param array The array of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(String[] array, String separator) { + int len = array.length; + if (len == 0) return ""; + + StringBuilder out = new StringBuilder(); + out.append(array[0]); + for (int i = 1; i < len; i++) { + out.append(separator).append(array[i]); + } + return out.toString(); + } +} diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java new file mode 100644 index 0000000..571ceda --- /dev/null +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java @@ -0,0 +1,68 @@ +package com.sphereon.sdk.template_processor.handler.auth; + +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; + +import okhttp3.Interceptor; +import okhttp3.Request; +import okhttp3.Response; + +public class ApiKeyAuth implements Interceptor { + private final String location; + private final String paramName; + + private String apiKey; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + @Override + public Response intercept(Chain chain) throws IOException { + String paramValue; + Request request = chain.request(); + + if ("query".equals(location)) { + String newQuery = request.url().uri().getQuery(); + paramValue = paramName + "=" + apiKey; + if (newQuery == null) { + newQuery = paramValue; + } else { + newQuery += "&" + paramValue; + } + + URI newUri; + try { + newUri = new URI(request.url().uri().getScheme(), request.url().uri().getAuthority(), + request.url().uri().getPath(), newQuery, request.url().uri().getFragment()); + } catch (URISyntaxException e) { + throw new IOException(e); + } + + request = request.newBuilder().url(newUri.toURL()).build(); + } else if ("header".equals(location)) { + request = request.newBuilder() + .addHeader(paramName, apiKey) + .build(); + } + return chain.proceed(request); + } +} diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/HttpBasicAuth.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/HttpBasicAuth.java new file mode 100644 index 0000000..e8c962e --- /dev/null +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/HttpBasicAuth.java @@ -0,0 +1,50 @@ +package com.sphereon.sdk.template_processor.handler.auth; + +import java.io.IOException; + +import okhttp3.Interceptor; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Response; +import okhttp3.Credentials; + +public class HttpBasicAuth implements Interceptor { + + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public void setCredentials(String username, String password) { + this.username = username; + this.password = password; + } + + @Override + public Response intercept(Chain chain) throws IOException { + Request request = chain.request(); + + // If the request already have an authorization (eg. Basic auth), do nothing + if (request.header("Authorization") == null) { + String credentials = Credentials.basic(username, password); + request = request.newBuilder() + .addHeader("Authorization", credentials) + .build(); + } + return chain.proceed(request); + } +} diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java new file mode 100644 index 0000000..0ee6dea --- /dev/null +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java @@ -0,0 +1,176 @@ +package com.sphereon.sdk.template_processor.handler.auth; + +import static java.net.HttpURLConnection.HTTP_UNAUTHORIZED; +import static java.net.HttpURLConnection.HTTP_FORBIDDEN; + +import java.io.IOException; +import java.util.Map; + +import org.apache.oltu.oauth2.client.OAuthClient; +import org.apache.oltu.oauth2.client.request.OAuthBearerClientRequest; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder; +import org.apache.oltu.oauth2.client.response.OAuthJSONAccessTokenResponse; +import org.apache.oltu.oauth2.common.exception.OAuthProblemException; +import org.apache.oltu.oauth2.common.exception.OAuthSystemException; +import org.apache.oltu.oauth2.common.message.types.GrantType; +import org.apache.oltu.oauth2.common.token.BasicOAuthToken; + +import okhttp3.Interceptor; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Request.Builder; +import okhttp3.Response; + +public class OAuth implements Interceptor { + + public interface AccessTokenListener { + public void notify(BasicOAuthToken token); + } + + private volatile String accessToken; + private OAuthClient oauthClient; + + private TokenRequestBuilder tokenRequestBuilder; + private AuthenticationRequestBuilder authenticationRequestBuilder; + + private AccessTokenListener accessTokenListener; + + public OAuth( OkHttpClient client, TokenRequestBuilder requestBuilder ) { + this.oauthClient = new OAuthClient(new OAuthOkHttpClient(client)); + this.tokenRequestBuilder = requestBuilder; + } + + public OAuth(TokenRequestBuilder requestBuilder ) { + this(new OkHttpClient(), requestBuilder); + } + + public OAuth(OAuthFlow flow, String authorizationUrl, String tokenUrl, String scopes) { + this(OAuthClientRequest.tokenLocation(tokenUrl).setScope(scopes)); + setFlow(flow); + authenticationRequestBuilder = OAuthClientRequest.authorizationLocation(authorizationUrl); + } + + public void setFlow(OAuthFlow flow) { + switch(flow) { + case accessCode: + case implicit: + tokenRequestBuilder.setGrantType(GrantType.AUTHORIZATION_CODE); + break; + case password: + tokenRequestBuilder.setGrantType(GrantType.PASSWORD); + break; + case application: + tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS); + break; + default: + break; + } + } + + @Override + public Response intercept(Chain chain) + throws IOException { + + Request request = chain.request(); + + // If the request already have an authorization (eg. Basic auth), do nothing + if (request.header("Authorization") != null) { + return chain.proceed(request); + } + + // If first time, get the token + OAuthClientRequest oAuthRequest; + if (getAccessToken() == null) { + updateAccessToken(null); + } + + if (getAccessToken() != null) { + // Build the request + Builder rb = request.newBuilder(); + + String requestAccessToken = new String(getAccessToken()); + try { + oAuthRequest = new OAuthBearerClientRequest(request.url().toString()) + .setAccessToken(requestAccessToken) + .buildHeaderMessage(); + } catch (OAuthSystemException e) { + throw new IOException(e); + } + + for ( Map.Entry header : oAuthRequest.getHeaders().entrySet() ) { + rb.addHeader(header.getKey(), header.getValue()); + } + rb.url( oAuthRequest.getLocationUri()); + + //Execute the request + Response response = chain.proceed(rb.build()); + + // 401 most likely indicates that access token has expired. + // Time to refresh and resend the request + if ( response != null && (response.code() == HTTP_UNAUTHORIZED | response.code() == HTTP_FORBIDDEN) ) { + if (updateAccessToken(requestAccessToken)) { + return intercept( chain ); + } + } + return response; + } else { + return chain.proceed(chain.request()); + } + } + + /* + * Returns true if the access token has been updated + */ + public synchronized boolean updateAccessToken(String requestAccessToken) throws IOException { + if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) { + try { + OAuthJSONAccessTokenResponse accessTokenResponse = oauthClient.accessToken(this.tokenRequestBuilder.buildBodyMessage()); + if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) { + setAccessToken(accessTokenResponse.getAccessToken()); + if (accessTokenListener != null) { + accessTokenListener.notify((BasicOAuthToken) accessTokenResponse.getOAuthToken()); + } + return getAccessToken().equals(requestAccessToken); + } else { + return false; + } + } catch (OAuthSystemException e) { + throw new IOException(e); + } catch (OAuthProblemException e) { + throw new IOException(e); + } + } + return true; + } + + public void registerAccessTokenListener(AccessTokenListener accessTokenListener) { + this.accessTokenListener = accessTokenListener; + } + + public synchronized String getAccessToken() { + return accessToken; + } + + public synchronized void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + public TokenRequestBuilder getTokenRequestBuilder() { + return tokenRequestBuilder; + } + + public void setTokenRequestBuilder(TokenRequestBuilder tokenRequestBuilder) { + this.tokenRequestBuilder = tokenRequestBuilder; + } + + public AuthenticationRequestBuilder getAuthenticationRequestBuilder() { + return authenticationRequestBuilder; + } + + public void setAuthenticationRequestBuilder(AuthenticationRequestBuilder authenticationRequestBuilder) { + this.authenticationRequestBuilder = authenticationRequestBuilder; + } + +} diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java new file mode 100644 index 0000000..87db0fa --- /dev/null +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java @@ -0,0 +1,30 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.handler.auth; + +public enum OAuthFlow { + accessCode, implicit, password, application +} diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthOkHttpClient.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthOkHttpClient.java new file mode 100644 index 0000000..24fdb35 --- /dev/null +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthOkHttpClient.java @@ -0,0 +1,72 @@ +package com.sphereon.sdk.template_processor.handler.auth; + +import java.io.IOException; +import java.util.Map; +import java.util.Map.Entry; + +import org.apache.oltu.oauth2.client.HttpClient; +import org.apache.oltu.oauth2.client.request.OAuthClientRequest; +import org.apache.oltu.oauth2.client.response.OAuthClientResponse; +import org.apache.oltu.oauth2.client.response.OAuthClientResponseFactory; +import org.apache.oltu.oauth2.common.exception.OAuthProblemException; +import org.apache.oltu.oauth2.common.exception.OAuthSystemException; + + +import okhttp3.Interceptor; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.Request.Builder; +import okhttp3.Response; +import okhttp3.MediaType; +import okhttp3.RequestBody; + + +public class OAuthOkHttpClient implements HttpClient { + + private OkHttpClient client; + + public OAuthOkHttpClient() { + this.client = new OkHttpClient(); + } + + public OAuthOkHttpClient(OkHttpClient client) { + this.client = client; + } + + public T execute(OAuthClientRequest request, Map headers, + String requestMethod, Class responseClass) + throws OAuthSystemException, OAuthProblemException { + + MediaType mediaType = MediaType.parse("application/json"); + Request.Builder requestBuilder = new Request.Builder().url(request.getLocationUri()); + + if(headers != null) { + for (Entry entry : headers.entrySet()) { + if (entry.getKey().equalsIgnoreCase("Content-Type")) { + mediaType = MediaType.parse(entry.getValue()); + } else { + requestBuilder.addHeader(entry.getKey(), entry.getValue()); + } + } + } + + RequestBody body = request.getBody() != null ? RequestBody.create(mediaType, request.getBody()) : null; + requestBuilder.method(requestMethod, body); + + try { + Response response = client.newCall(requestBuilder.build()).execute(); + return OAuthClientResponseFactory.createCustomResponse( + response.body().string(), + response.body().contentType().toString(), + response.code(), + responseClass); + } catch (IOException e) { + throw new OAuthSystemException(e); + } + } + + public void shutdown() { + // Nothing to do here + } + +} diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java new file mode 100644 index 0000000..f7bcb96 --- /dev/null +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java @@ -0,0 +1,169 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; + +/** + * The merge template response. + */ +@ApiModel(description = "The merge template response.") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:12.470+02:00") +public class DataSetResponse { + @SerializedName("completionTime") + private OffsetDateTime completionTime = null; + + @SerializedName("creationTime") + private OffsetDateTime creationTime = null; + + @SerializedName("id") + private String id = null; + + /** + * The status of the template + */ + public enum StatusEnum { + @SerializedName("CREATED") + CREATED("CREATED"), + + @SerializedName("UPDATED") + UPDATED("UPDATED"), + + @SerializedName("DELETED") + DELETED("DELETED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("status") + private StatusEnum status = null; + + /** + * The completion date/time of this template in ISO 8601 format + * @return completionTime + **/ + @ApiModelProperty(example = "null", value = "The completion date/time of this template in ISO 8601 format") + public OffsetDateTime getCompletionTime() { + return completionTime; + } + + /** + * The creation date/time of this template in ISO 8601 format + * @return creationTime + **/ + @ApiModelProperty(example = "null", value = "The creation date/time of this template in ISO 8601 format") + public OffsetDateTime getCreationTime() { + return creationTime; + } + + public DataSetResponse id(String id) { + this.id = id; + return this; + } + + /** + * Unique dataset id + * @return id + **/ + @ApiModelProperty(example = "null", required = true, value = "Unique dataset id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + /** + * The status of the template + * @return status + **/ + @ApiModelProperty(example = "null", required = true, value = "The status of the template") + public StatusEnum getStatus() { + return status; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataSetResponse dataSetResponse = (DataSetResponse) o; + return Objects.equals(this.completionTime, dataSetResponse.completionTime) && + Objects.equals(this.creationTime, dataSetResponse.creationTime) && + Objects.equals(this.id, dataSetResponse.id) && + Objects.equals(this.status, dataSetResponse.status); + } + + @Override + public int hashCode() { + return Objects.hash(completionTime, creationTime, id, status); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataSetResponse {\n"); + + sb.append(" completionTime: ").append(toIndentedString(completionTime)).append("\n"); + sb.append(" creationTime: ").append(toIndentedString(creationTime)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/Error.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/Error.java new file mode 100644 index 0000000..68fa8d4 --- /dev/null +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/Error.java @@ -0,0 +1,196 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import com.sphereon.sdk.template_processor.model.Error; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * An error + */ +@ApiModel(description = "An error") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:12.470+02:00") +public class Error { + @SerializedName("code") + private String code = null; + + /** + * Gets or Sets level + */ + public enum LevelEnum { + @SerializedName("INFO") + INFO("INFO"), + + @SerializedName("WARNING") + WARNING("WARNING"), + + @SerializedName("FATAL") + FATAL("FATAL"); + + private String value; + + LevelEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("level") + private LevelEnum level = null; + + @SerializedName("cause") + private Error cause = null; + + @SerializedName("message") + private String message = null; + + public Error code(String code) { + this.code = code; + return this; + } + + /** + * Get code + * @return code + **/ + @ApiModelProperty(example = "null", required = true, value = "") + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public Error level(LevelEnum level) { + this.level = level; + return this; + } + + /** + * Get level + * @return level + **/ + @ApiModelProperty(example = "null", required = true, value = "") + public LevelEnum getLevel() { + return level; + } + + public void setLevel(LevelEnum level) { + this.level = level; + } + + public Error cause(Error cause) { + this.cause = cause; + return this; + } + + /** + * Get cause + * @return cause + **/ + @ApiModelProperty(example = "null", value = "") + public Error getCause() { + return cause; + } + + public void setCause(Error cause) { + this.cause = cause; + } + + public Error message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + **/ + @ApiModelProperty(example = "null", required = true, value = "") + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Error error = (Error) o; + return Objects.equals(this.code, error.code) && + Objects.equals(this.level, error.level) && + Objects.equals(this.cause, error.cause) && + Objects.equals(this.message, error.message); + } + + @Override + public int hashCode() { + return Objects.hash(code, level, cause, message); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Error {\n"); + + sb.append(" code: ").append(toIndentedString(code)).append("\n"); + sb.append(" level: ").append(toIndentedString(level)).append("\n"); + sb.append(" cause: ").append(toIndentedString(cause)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java new file mode 100644 index 0000000..ab6e9bd --- /dev/null +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java @@ -0,0 +1,109 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import com.sphereon.sdk.template_processor.model.Error; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +/** + * The error response + */ +@ApiModel(description = "The error response") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:12.470+02:00") +public class ErrorResponse { + @SerializedName("errors") + private List errors = new ArrayList(); + + public ErrorResponse errors(List errors) { + this.errors = errors; + return this; + } + + public ErrorResponse addErrorsItem(Error errorsItem) { + this.errors.add(errorsItem); + return this; + } + + /** + * Get errors + * @return errors + **/ + @ApiModelProperty(example = "null", value = "") + public List getErrors() { + return errors; + } + + public void setErrors(List errors) { + this.errors = errors; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ErrorResponse errorResponse = (ErrorResponse) o; + return Objects.equals(this.errors, errorResponse.errors); + } + + @Override + public int hashCode() { + return Objects.hash(errors); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ErrorResponse {\n"); + + sb.append(" errors: ").append(toIndentedString(errors)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java new file mode 100644 index 0000000..2cc7dab --- /dev/null +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java @@ -0,0 +1,189 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; + +/** + * Lifecycle settings. When no lifecycle settings are supplied, the job and files will be deleted directly after retrieval of the file + */ +@ApiModel(description = "Lifecycle settings. When no lifecycle settings are supplied, the job and files will be deleted directly after retrieval of the file") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:12.470+02:00") +public class Lifecycle { + @SerializedName("actionTime") + private OffsetDateTime actionTime = null; + + /** + * Gets or Sets action + */ + public enum ActionEnum { + @SerializedName("DELETE") + DELETE("DELETE"); + + private String value; + + ActionEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("action") + private ActionEnum action = null; + + /** + * Gets or Sets type + */ + public enum TypeEnum { + @SerializedName("RETRIEVAL") + RETRIEVAL("RETRIEVAL"), + + @SerializedName("TIME") + TIME("TIME"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("type") + private TypeEnum type = null; + + public Lifecycle actionTime(OffsetDateTime actionTime) { + this.actionTime = actionTime; + return this; + } + + /** + * The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation + * @return actionTime + **/ + @ApiModelProperty(example = "null", value = "The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation") + public OffsetDateTime getActionTime() { + return actionTime; + } + + public void setActionTime(OffsetDateTime actionTime) { + this.actionTime = actionTime; + } + + public Lifecycle action(ActionEnum action) { + this.action = action; + return this; + } + + /** + * Get action + * @return action + **/ + @ApiModelProperty(example = "null", value = "") + public ActionEnum getAction() { + return action; + } + + public void setAction(ActionEnum action) { + this.action = action; + } + + public Lifecycle type(TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @ApiModelProperty(example = "null", value = "") + public TypeEnum getType() { + return type; + } + + public void setType(TypeEnum type) { + this.type = type; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Lifecycle lifecycle = (Lifecycle) o; + return Objects.equals(this.actionTime, lifecycle.actionTime) && + Objects.equals(this.action, lifecycle.action) && + Objects.equals(this.type, lifecycle.type); + } + + @Override + public int hashCode() { + return Objects.hash(actionTime, action, type); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Lifecycle {\n"); + + sb.append(" actionTime: ").append(toIndentedString(actionTime)).append("\n"); + sb.append(" action: ").append(toIndentedString(action)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java new file mode 100644 index 0000000..91a64c4 --- /dev/null +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java @@ -0,0 +1,344 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import com.sphereon.sdk.template_processor.model.MergeSettings; +import com.sphereon.sdk.template_processor.model.StreamLocation; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.List; + +/** + * The merge job. Has access to the job merge data. + */ +@ApiModel(description = "The merge job. Has access to the job merge data.") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:12.470+02:00") +public class MergeJob { + @SerializedName("resultFolderPath") + private String resultFolderPath = null; + + @SerializedName("completionTime") + private OffsetDateTime completionTime = null; + + @SerializedName("jobId") + private String jobId = null; + + @SerializedName("resultContainerId") + private String resultContainerId = null; + + @SerializedName("creationTime") + private OffsetDateTime creationTime = null; + + @SerializedName("dataSetId") + private String dataSetId = null; + + @SerializedName("resultStreams") + private List resultStreams = new ArrayList(); + + @SerializedName("headerDataSetIds") + private List headerDataSetIds = new ArrayList(); + + @SerializedName("mergeSettings") + private MergeSettings mergeSettings = null; + + @SerializedName("statusMessage") + private String statusMessage = null; + + /** + * The status of the job + */ + public enum StatusEnum { + @SerializedName("CREATED") + CREATED("CREATED"), + + @SerializedName("UPDATED") + UPDATED("UPDATED"), + + @SerializedName("PROCESSING") + PROCESSING("PROCESSING"), + + @SerializedName("DONE") + DONE("DONE"), + + @SerializedName("ERROR") + ERROR("ERROR"), + + @SerializedName("DELETED") + DELETED("DELETED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("status") + private StatusEnum status = null; + + public MergeJob resultFolderPath(String resultFolderPath) { + this.resultFolderPath = resultFolderPath; + return this; + } + + /** + * The target folder path of result files + * @return resultFolderPath + **/ + @ApiModelProperty(example = "null", value = "The target folder path of result files") + public String getResultFolderPath() { + return resultFolderPath; + } + + public void setResultFolderPath(String resultFolderPath) { + this.resultFolderPath = resultFolderPath; + } + + /** + * The completion date/time of this job in ISO 8601 format + * @return completionTime + **/ + @ApiModelProperty(example = "null", value = "The completion date/time of this job in ISO 8601 format") + public OffsetDateTime getCompletionTime() { + return completionTime; + } + + public MergeJob jobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation + * @return jobId + **/ + @ApiModelProperty(example = "null", required = true, value = "The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation") + public String getJobId() { + return jobId; + } + + public void setJobId(String jobId) { + this.jobId = jobId; + } + + public MergeJob resultContainerId(String resultContainerId) { + this.resultContainerId = resultContainerId; + return this; + } + + /** + * The target container id of result files + * @return resultContainerId + **/ + @ApiModelProperty(example = "null", value = "The target container id of result files") + public String getResultContainerId() { + return resultContainerId; + } + + public void setResultContainerId(String resultContainerId) { + this.resultContainerId = resultContainerId; + } + + /** + * The creation date/time of this job in ISO 8601 format + * @return creationTime + **/ + @ApiModelProperty(example = "null", value = "The creation date/time of this job in ISO 8601 format") + public OffsetDateTime getCreationTime() { + return creationTime; + } + + public MergeJob dataSetId(String dataSetId) { + this.dataSetId = dataSetId; + return this; + } + + /** + * Data set id + * @return dataSetId + **/ + @ApiModelProperty(example = "null", value = "Data set id") + public String getDataSetId() { + return dataSetId; + } + + public void setDataSetId(String dataSetId) { + this.dataSetId = dataSetId; + } + + public MergeJob resultStreams(List resultStreams) { + this.resultStreams = resultStreams; + return this; + } + + public MergeJob addResultStreamsItem(StreamLocation resultStreamsItem) { + this.resultStreams.add(resultStreamsItem); + return this; + } + + /** + * The storage locations of the result files. + * @return resultStreams + **/ + @ApiModelProperty(example = "null", required = true, value = "The storage locations of the result files.") + public List getResultStreams() { + return resultStreams; + } + + public void setResultStreams(List resultStreams) { + this.resultStreams = resultStreams; + } + + public MergeJob headerDataSetIds(List headerDataSetIds) { + this.headerDataSetIds = headerDataSetIds; + return this; + } + + public MergeJob addHeaderDataSetIdsItem(String headerDataSetIdsItem) { + this.headerDataSetIds.add(headerDataSetIdsItem); + return this; + } + + /** + * Header data set ids + * @return headerDataSetIds + **/ + @ApiModelProperty(example = "null", value = "Header data set ids") + public List getHeaderDataSetIds() { + return headerDataSetIds; + } + + public void setHeaderDataSetIds(List headerDataSetIds) { + this.headerDataSetIds = headerDataSetIds; + } + + public MergeJob mergeSettings(MergeSettings mergeSettings) { + this.mergeSettings = mergeSettings; + return this; + } + + /** + * Get mergeSettings + * @return mergeSettings + **/ + @ApiModelProperty(example = "null", value = "") + public MergeSettings getMergeSettings() { + return mergeSettings; + } + + public void setMergeSettings(MergeSettings mergeSettings) { + this.mergeSettings = mergeSettings; + } + + /** + * A status message, which can be informational, warning or error. A message here does not indicate an error perse + * @return statusMessage + **/ + @ApiModelProperty(example = "null", value = "A status message, which can be informational, warning or error. A message here does not indicate an error perse") + public String getStatusMessage() { + return statusMessage; + } + + /** + * The status of the job + * @return status + **/ + @ApiModelProperty(example = "null", required = true, value = "The status of the job") + public StatusEnum getStatus() { + return status; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MergeJob mergeJob = (MergeJob) o; + return Objects.equals(this.resultFolderPath, mergeJob.resultFolderPath) && + Objects.equals(this.completionTime, mergeJob.completionTime) && + Objects.equals(this.jobId, mergeJob.jobId) && + Objects.equals(this.resultContainerId, mergeJob.resultContainerId) && + Objects.equals(this.creationTime, mergeJob.creationTime) && + Objects.equals(this.dataSetId, mergeJob.dataSetId) && + Objects.equals(this.resultStreams, mergeJob.resultStreams) && + Objects.equals(this.headerDataSetIds, mergeJob.headerDataSetIds) && + Objects.equals(this.mergeSettings, mergeJob.mergeSettings) && + Objects.equals(this.statusMessage, mergeJob.statusMessage) && + Objects.equals(this.status, mergeJob.status); + } + + @Override + public int hashCode() { + return Objects.hash(resultFolderPath, completionTime, jobId, resultContainerId, creationTime, dataSetId, resultStreams, headerDataSetIds, mergeSettings, statusMessage, status); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MergeJob {\n"); + + sb.append(" resultFolderPath: ").append(toIndentedString(resultFolderPath)).append("\n"); + sb.append(" completionTime: ").append(toIndentedString(completionTime)).append("\n"); + sb.append(" jobId: ").append(toIndentedString(jobId)).append("\n"); + sb.append(" resultContainerId: ").append(toIndentedString(resultContainerId)).append("\n"); + sb.append(" creationTime: ").append(toIndentedString(creationTime)).append("\n"); + sb.append(" dataSetId: ").append(toIndentedString(dataSetId)).append("\n"); + sb.append(" resultStreams: ").append(toIndentedString(resultStreams)).append("\n"); + sb.append(" headerDataSetIds: ").append(toIndentedString(headerDataSetIds)).append("\n"); + sb.append(" mergeSettings: ").append(toIndentedString(mergeSettings)).append("\n"); + sb.append(" statusMessage: ").append(toIndentedString(statusMessage)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java new file mode 100644 index 0000000..bcbfc16 --- /dev/null +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java @@ -0,0 +1,187 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import com.sphereon.sdk.template_processor.model.MergeJob; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * The merge job response. + */ +@ApiModel(description = "The merge job response.") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:12.470+02:00") +public class MergeJobResponse { + @SerializedName("jobId") + private String jobId = null; + + @SerializedName("job") + private MergeJob job = null; + + @SerializedName("statusMessage") + private String statusMessage = null; + + /** + * The status of the job + */ + public enum StatusEnum { + @SerializedName("CREATED") + CREATED("CREATED"), + + @SerializedName("UPDATED") + UPDATED("UPDATED"), + + @SerializedName("PROCESSING") + PROCESSING("PROCESSING"), + + @SerializedName("DONE") + DONE("DONE"), + + @SerializedName("ERROR") + ERROR("ERROR"), + + @SerializedName("DELETED") + DELETED("DELETED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("status") + private StatusEnum status = null; + + public MergeJobResponse jobId(String jobId) { + this.jobId = jobId; + return this; + } + + /** + * The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation + * @return jobId + **/ + @ApiModelProperty(example = "null", required = true, value = "The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation") + public String getJobId() { + return jobId; + } + + public void setJobId(String jobId) { + this.jobId = jobId; + } + + public MergeJobResponse job(MergeJob job) { + this.job = job; + return this; + } + + /** + * Get job + * @return job + **/ + @ApiModelProperty(example = "null", value = "") + public MergeJob getJob() { + return job; + } + + public void setJob(MergeJob job) { + this.job = job; + } + + /** + * A status message, which can be informational, warning or error. AA message here does not indicate an error perse + * @return statusMessage + **/ + @ApiModelProperty(example = "null", value = "A status message, which can be informational, warning or error. AA message here does not indicate an error perse") + public String getStatusMessage() { + return statusMessage; + } + + /** + * The status of the job + * @return status + **/ + @ApiModelProperty(example = "null", required = true, value = "The status of the job") + public StatusEnum getStatus() { + return status; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MergeJobResponse mergeJobResponse = (MergeJobResponse) o; + return Objects.equals(this.jobId, mergeJobResponse.jobId) && + Objects.equals(this.job, mergeJobResponse.job) && + Objects.equals(this.statusMessage, mergeJobResponse.statusMessage) && + Objects.equals(this.status, mergeJobResponse.status); + } + + @Override + public int hashCode() { + return Objects.hash(jobId, job, statusMessage, status); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MergeJobResponse {\n"); + + sb.append(" jobId: ").append(toIndentedString(jobId)).append("\n"); + sb.append(" job: ").append(toIndentedString(job)).append("\n"); + sb.append(" statusMessage: ").append(toIndentedString(statusMessage)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java new file mode 100644 index 0000000..b57e9f1 --- /dev/null +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java @@ -0,0 +1,339 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import com.sphereon.sdk.template_processor.model.Lifecycle; +import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.StreamLocation; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.ArrayList; +import java.util.List; + +/** + * Merge settings + */ +@ApiModel(description = "Merge settings") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:12.470+02:00") +public class MergeSettings { + @SerializedName("lifecycle") + private Lifecycle lifecycle = null; + + /** + * Gets or Sets mergeResult + */ + public enum MergeResultEnum { + @SerializedName("SINGLE_FILE") + SINGLE_FILE("SINGLE_FILE"), + + @SerializedName("SEPARATE_FILES") + SEPARATE_FILES("SEPARATE_FILES"); + + private String value; + + MergeResultEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("mergeResult") + private MergeResultEnum mergeResult = null; + + @SerializedName("dataSetId") + private String dataSetId = null; + + /** + * Gets or Sets engine + */ + public enum EngineEnum { + @SerializedName("BASIC") + BASIC("BASIC"), + + @SerializedName("PREMIUM") + PREMIUM("PREMIUM"); + + private String value; + + EngineEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("engine") + private EngineEnum engine = null; + + @SerializedName("headerDataSetIds") + private List headerDataSetIds = new ArrayList(); + + @SerializedName("templateVersion") + private Integer templateVersion = null; + + @SerializedName("resultStreamLocation") + private StreamLocation resultStreamLocation = null; + + @SerializedName("templateId") + private String templateId = null; + + @SerializedName("outputSettings") + private OutputSettings outputSettings = null; + + public MergeSettings lifecycle(Lifecycle lifecycle) { + this.lifecycle = lifecycle; + return this; + } + + /** + * Get lifecycle + * @return lifecycle + **/ + @ApiModelProperty(example = "null", value = "") + public Lifecycle getLifecycle() { + return lifecycle; + } + + public void setLifecycle(Lifecycle lifecycle) { + this.lifecycle = lifecycle; + } + + public MergeSettings mergeResult(MergeResultEnum mergeResult) { + this.mergeResult = mergeResult; + return this; + } + + /** + * Get mergeResult + * @return mergeResult + **/ + @ApiModelProperty(example = "null", value = "") + public MergeResultEnum getMergeResult() { + return mergeResult; + } + + public void setMergeResult(MergeResultEnum mergeResult) { + this.mergeResult = mergeResult; + } + + public MergeSettings dataSetId(String dataSetId) { + this.dataSetId = dataSetId; + return this; + } + + /** + * Data set id + * @return dataSetId + **/ + @ApiModelProperty(example = "null", required = true, value = "Data set id") + public String getDataSetId() { + return dataSetId; + } + + public void setDataSetId(String dataSetId) { + this.dataSetId = dataSetId; + } + + public MergeSettings engine(EngineEnum engine) { + this.engine = engine; + return this; + } + + /** + * Get engine + * @return engine + **/ + @ApiModelProperty(example = "null", value = "") + public EngineEnum getEngine() { + return engine; + } + + public void setEngine(EngineEnum engine) { + this.engine = engine; + } + + public MergeSettings headerDataSetIds(List headerDataSetIds) { + this.headerDataSetIds = headerDataSetIds; + return this; + } + + public MergeSettings addHeaderDataSetIdsItem(String headerDataSetIdsItem) { + this.headerDataSetIds.add(headerDataSetIdsItem); + return this; + } + + /** + * optional header data set ids + * @return headerDataSetIds + **/ + @ApiModelProperty(example = "null", value = "optional header data set ids") + public List getHeaderDataSetIds() { + return headerDataSetIds; + } + + public void setHeaderDataSetIds(List headerDataSetIds) { + this.headerDataSetIds = headerDataSetIds; + } + + public MergeSettings templateVersion(Integer templateVersion) { + this.templateVersion = templateVersion; + return this; + } + + /** + * Template version + * @return templateVersion + **/ + @ApiModelProperty(example = "null", value = "Template version") + public Integer getTemplateVersion() { + return templateVersion; + } + + public void setTemplateVersion(Integer templateVersion) { + this.templateVersion = templateVersion; + } + + public MergeSettings resultStreamLocation(StreamLocation resultStreamLocation) { + this.resultStreamLocation = resultStreamLocation; + return this; + } + + /** + * The output location of the result files. + * @return resultStreamLocation + **/ + @ApiModelProperty(example = "null", required = true, value = "The output location of the result files.") + public StreamLocation getResultStreamLocation() { + return resultStreamLocation; + } + + public void setResultStreamLocation(StreamLocation resultStreamLocation) { + this.resultStreamLocation = resultStreamLocation; + } + + public MergeSettings templateId(String templateId) { + this.templateId = templateId; + return this; + } + + /** + * Template id + * @return templateId + **/ + @ApiModelProperty(example = "null", required = true, value = "Template id") + public String getTemplateId() { + return templateId; + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + public MergeSettings outputSettings(OutputSettings outputSettings) { + this.outputSettings = outputSettings; + return this; + } + + /** + * Get outputSettings + * @return outputSettings + **/ + @ApiModelProperty(example = "null", required = true, value = "") + public OutputSettings getOutputSettings() { + return outputSettings; + } + + public void setOutputSettings(OutputSettings outputSettings) { + this.outputSettings = outputSettings; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MergeSettings mergeSettings = (MergeSettings) o; + return Objects.equals(this.lifecycle, mergeSettings.lifecycle) && + Objects.equals(this.mergeResult, mergeSettings.mergeResult) && + Objects.equals(this.dataSetId, mergeSettings.dataSetId) && + Objects.equals(this.engine, mergeSettings.engine) && + Objects.equals(this.headerDataSetIds, mergeSettings.headerDataSetIds) && + Objects.equals(this.templateVersion, mergeSettings.templateVersion) && + Objects.equals(this.resultStreamLocation, mergeSettings.resultStreamLocation) && + Objects.equals(this.templateId, mergeSettings.templateId) && + Objects.equals(this.outputSettings, mergeSettings.outputSettings); + } + + @Override + public int hashCode() { + return Objects.hash(lifecycle, mergeResult, dataSetId, engine, headerDataSetIds, templateVersion, resultStreamLocation, templateId, outputSettings); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MergeSettings {\n"); + + sb.append(" lifecycle: ").append(toIndentedString(lifecycle)).append("\n"); + sb.append(" mergeResult: ").append(toIndentedString(mergeResult)).append("\n"); + sb.append(" dataSetId: ").append(toIndentedString(dataSetId)).append("\n"); + sb.append(" engine: ").append(toIndentedString(engine)).append("\n"); + sb.append(" headerDataSetIds: ").append(toIndentedString(headerDataSetIds)).append("\n"); + sb.append(" templateVersion: ").append(toIndentedString(templateVersion)).append("\n"); + sb.append(" resultStreamLocation: ").append(toIndentedString(resultStreamLocation)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); + sb.append(" outputSettings: ").append(toIndentedString(outputSettings)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java new file mode 100644 index 0000000..e989781 --- /dev/null +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java @@ -0,0 +1,213 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Output settings + */ +@ApiModel(description = "Output settings") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:12.470+02:00") +public class OutputSettings { + /** + * Gets or Sets deliveryFormat + */ + public enum DeliveryFormatEnum { + @SerializedName("PLAIN") + PLAIN("PLAIN"), + + @SerializedName("ZIP") + ZIP("ZIP"), + + @SerializedName("_7ZIP") + _7ZIP("_7ZIP"); + + private String value; + + DeliveryFormatEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("deliveryFormat") + private DeliveryFormatEnum deliveryFormat = null; + + /** + * Gets or Sets outputFormat + */ + public enum OutputFormatEnum { + @SerializedName("DOC") + DOC("DOC"), + + @SerializedName("DOCX") + DOCX("DOCX"), + + @SerializedName("RTF") + RTF("RTF"), + + @SerializedName("PDF") + PDF("PDF"), + + @SerializedName("XPS") + XPS("XPS"), + + @SerializedName("SVG") + SVG("SVG"), + + @SerializedName("HTML") + HTML("HTML"), + + @SerializedName("ODT") + ODT("ODT"), + + @SerializedName("TIFF") + TIFF("TIFF"), + + @SerializedName("PNG") + PNG("PNG"), + + @SerializedName("BMP") + BMP("BMP"), + + @SerializedName("JPEG") + JPEG("JPEG"), + + @SerializedName("TXT") + TXT("TXT"), + + @SerializedName("XML") + XML("XML"), + + @SerializedName("JSON") + JSON("JSON"), + + @SerializedName("DEFAULT") + DEFAULT("DEFAULT"); + + private String value; + + OutputFormatEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("outputFormat") + private OutputFormatEnum outputFormat = null; + + public OutputSettings deliveryFormat(DeliveryFormatEnum deliveryFormat) { + this.deliveryFormat = deliveryFormat; + return this; + } + + /** + * Get deliveryFormat + * @return deliveryFormat + **/ + @ApiModelProperty(example = "null", value = "") + public DeliveryFormatEnum getDeliveryFormat() { + return deliveryFormat; + } + + public void setDeliveryFormat(DeliveryFormatEnum deliveryFormat) { + this.deliveryFormat = deliveryFormat; + } + + public OutputSettings outputFormat(OutputFormatEnum outputFormat) { + this.outputFormat = outputFormat; + return this; + } + + /** + * Get outputFormat + * @return outputFormat + **/ + @ApiModelProperty(example = "null", value = "") + public OutputFormatEnum getOutputFormat() { + return outputFormat; + } + + public void setOutputFormat(OutputFormatEnum outputFormat) { + this.outputFormat = outputFormat; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OutputSettings outputSettings = (OutputSettings) o; + return Objects.equals(this.deliveryFormat, outputSettings.deliveryFormat) && + Objects.equals(this.outputFormat, outputSettings.outputFormat); + } + + @Override + public int hashCode() { + return Objects.hash(deliveryFormat, outputFormat); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OutputSettings {\n"); + + sb.append(" deliveryFormat: ").append(toIndentedString(deliveryFormat)).append("\n"); + sb.append(" outputFormat: ").append(toIndentedString(outputFormat)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java new file mode 100644 index 0000000..f25ae92 --- /dev/null +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java @@ -0,0 +1,170 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Owner info + */ +@ApiModel(description = "Owner info") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:12.470+02:00") +public class OwnerInfo { + @SerializedName("phone") + private String phone = null; + + @SerializedName("companyDepartment") + private String companyDepartment = null; + + @SerializedName("name") + private String name = null; + + @SerializedName("email") + private String email = null; + + public OwnerInfo phone(String phone) { + this.phone = phone; + return this; + } + + /** + * The owner's phone number + * @return phone + **/ + @ApiModelProperty(example = "null", value = "The owner's phone number") + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public OwnerInfo companyDepartment(String companyDepartment) { + this.companyDepartment = companyDepartment; + return this; + } + + /** + * The owner's company/department + * @return companyDepartment + **/ + @ApiModelProperty(example = "null", value = "The owner's company/department") + public String getCompanyDepartment() { + return companyDepartment; + } + + public void setCompanyDepartment(String companyDepartment) { + this.companyDepartment = companyDepartment; + } + + public OwnerInfo name(String name) { + this.name = name; + return this; + } + + /** + * The owner's name + * @return name + **/ + @ApiModelProperty(example = "null", value = "The owner's name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public OwnerInfo email(String email) { + this.email = email; + return this; + } + + /** + * The owner's email address + * @return email + **/ + @ApiModelProperty(example = "null", value = "The owner's email address") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OwnerInfo ownerInfo = (OwnerInfo) o; + return Objects.equals(this.phone, ownerInfo.phone) && + Objects.equals(this.companyDepartment, ownerInfo.companyDepartment) && + Objects.equals(this.name, ownerInfo.name) && + Objects.equals(this.email, ownerInfo.email); + } + + @Override + public int hashCode() { + return Objects.hash(phone, companyDepartment, name, email); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OwnerInfo {\n"); + + sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); + sb.append(" companyDepartment: ").append(toIndentedString(companyDepartment)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java new file mode 100644 index 0000000..cc49a1d --- /dev/null +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java @@ -0,0 +1,170 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Location record of data stream + */ +@ApiModel(description = "Location record of data stream") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:12.470+02:00") +public class StreamLocation { + @SerializedName("folderPath") + private String folderPath = null; + + @SerializedName("originalFileName") + private String originalFileName = null; + + @SerializedName("containerId") + private String containerId = null; + + @SerializedName("fileId") + private String fileId = null; + + public StreamLocation folderPath(String folderPath) { + this.folderPath = folderPath; + return this; + } + + /** + * Get folderPath + * @return folderPath + **/ + @ApiModelProperty(example = "null", value = "") + public String getFolderPath() { + return folderPath; + } + + public void setFolderPath(String folderPath) { + this.folderPath = folderPath; + } + + public StreamLocation originalFileName(String originalFileName) { + this.originalFileName = originalFileName; + return this; + } + + /** + * Get originalFileName + * @return originalFileName + **/ + @ApiModelProperty(example = "null", value = "") + public String getOriginalFileName() { + return originalFileName; + } + + public void setOriginalFileName(String originalFileName) { + this.originalFileName = originalFileName; + } + + public StreamLocation containerId(String containerId) { + this.containerId = containerId; + return this; + } + + /** + * Get containerId + * @return containerId + **/ + @ApiModelProperty(example = "null", value = "") + public String getContainerId() { + return containerId; + } + + public void setContainerId(String containerId) { + this.containerId = containerId; + } + + public StreamLocation fileId(String fileId) { + this.fileId = fileId; + return this; + } + + /** + * Get fileId + * @return fileId + **/ + @ApiModelProperty(example = "null", value = "") + public String getFileId() { + return fileId; + } + + public void setFileId(String fileId) { + this.fileId = fileId; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + StreamLocation streamLocation = (StreamLocation) o; + return Objects.equals(this.folderPath, streamLocation.folderPath) && + Objects.equals(this.originalFileName, streamLocation.originalFileName) && + Objects.equals(this.containerId, streamLocation.containerId) && + Objects.equals(this.fileId, streamLocation.fileId); + } + + @Override + public int hashCode() { + return Objects.hash(folderPath, originalFileName, containerId, fileId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class StreamLocation {\n"); + + sb.append(" folderPath: ").append(toIndentedString(folderPath)).append("\n"); + sb.append(" originalFileName: ").append(toIndentedString(originalFileName)).append("\n"); + sb.append(" containerId: ").append(toIndentedString(containerId)).append("\n"); + sb.append(" fileId: ").append(toIndentedString(fileId)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java new file mode 100644 index 0000000..32cf968 --- /dev/null +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java @@ -0,0 +1,247 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import com.sphereon.sdk.template_processor.model.OwnerInfo; +import com.sphereon.sdk.template_processor.model.StreamLocation; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * TemplateContext + */ +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:12.470+02:00") +public class TemplateContext { + /** + * Gets or Sets templateType + */ + public enum TemplateTypeEnum { + @SerializedName("OFFICE") + OFFICE("OFFICE"), + + @SerializedName("FREEMARKER") + FREEMARKER("FREEMARKER"); + + private String value; + + TemplateTypeEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("templateType") + private TemplateTypeEnum templateType = null; + + @SerializedName("templateFileLocations") + private Map templateFileLocations = new HashMap(); + + @SerializedName("description") + private String description = null; + + @SerializedName("ownerInfo") + private OwnerInfo ownerInfo = null; + + @SerializedName("id") + private String id = null; + + @SerializedName("templateId") + private String templateId = null; + + public TemplateContext templateType(TemplateTypeEnum templateType) { + this.templateType = templateType; + return this; + } + + /** + * Get templateType + * @return templateType + **/ + @ApiModelProperty(example = "null", required = true, value = "") + public TemplateTypeEnum getTemplateType() { + return templateType; + } + + public void setTemplateType(TemplateTypeEnum templateType) { + this.templateType = templateType; + } + + public TemplateContext templateFileLocations(Map templateFileLocations) { + this.templateFileLocations = templateFileLocations; + return this; + } + + public TemplateContext putTemplateFileLocationsItem(String key, StreamLocation templateFileLocationsItem) { + this.templateFileLocations.put(key, templateFileLocationsItem); + return this; + } + + /** + * The template files (versioned) + * @return templateFileLocations + **/ + @ApiModelProperty(example = "null", value = "The template files (versioned)") + public Map getTemplateFileLocations() { + return templateFileLocations; + } + + public void setTemplateFileLocations(Map templateFileLocations) { + this.templateFileLocations = templateFileLocations; + } + + public TemplateContext description(String description) { + this.description = description; + return this; + } + + /** + * The template description + * @return description + **/ + @ApiModelProperty(example = "null", value = "The template description") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public TemplateContext ownerInfo(OwnerInfo ownerInfo) { + this.ownerInfo = ownerInfo; + return this; + } + + /** + * Get ownerInfo + * @return ownerInfo + **/ + @ApiModelProperty(example = "null", value = "") + public OwnerInfo getOwnerInfo() { + return ownerInfo; + } + + public void setOwnerInfo(OwnerInfo ownerInfo) { + this.ownerInfo = ownerInfo; + } + + public TemplateContext id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @ApiModelProperty(example = "null", value = "") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public TemplateContext templateId(String templateId) { + this.templateId = templateId; + return this; + } + + /** + * The template context id + * @return templateId + **/ + @ApiModelProperty(example = "null", value = "The template context id") + public String getTemplateId() { + return templateId; + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TemplateContext templateContext = (TemplateContext) o; + return Objects.equals(this.templateType, templateContext.templateType) && + Objects.equals(this.templateFileLocations, templateContext.templateFileLocations) && + Objects.equals(this.description, templateContext.description) && + Objects.equals(this.ownerInfo, templateContext.ownerInfo) && + Objects.equals(this.id, templateContext.id) && + Objects.equals(this.templateId, templateContext.templateId); + } + + @Override + public int hashCode() { + return Objects.hash(templateType, templateFileLocations, description, ownerInfo, id, templateId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TemplateContext {\n"); + + sb.append(" templateType: ").append(toIndentedString(templateType)).append("\n"); + sb.append(" templateFileLocations: ").append(toIndentedString(templateFileLocations)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" ownerInfo: ").append(toIndentedString(ownerInfo)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java new file mode 100644 index 0000000..116b645 --- /dev/null +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java @@ -0,0 +1,193 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import com.sphereon.sdk.template_processor.model.OwnerInfo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * The merge template request. + */ +@ApiModel(description = "The merge template request.") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:12.470+02:00") +public class TemplateContextRequest { + /** + * Gets or Sets templateType + */ + public enum TemplateTypeEnum { + @SerializedName("OFFICE") + OFFICE("OFFICE"), + + @SerializedName("FREEMARKER") + FREEMARKER("FREEMARKER"); + + private String value; + + TemplateTypeEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("templateType") + private TemplateTypeEnum templateType = null; + + @SerializedName("description") + private String description = null; + + @SerializedName("ownerInfo") + private OwnerInfo ownerInfo = null; + + @SerializedName("templateId") + private String templateId = null; + + public TemplateContextRequest templateType(TemplateTypeEnum templateType) { + this.templateType = templateType; + return this; + } + + /** + * Get templateType + * @return templateType + **/ + @ApiModelProperty(example = "null", required = true, value = "") + public TemplateTypeEnum getTemplateType() { + return templateType; + } + + public void setTemplateType(TemplateTypeEnum templateType) { + this.templateType = templateType; + } + + public TemplateContextRequest description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @ApiModelProperty(example = "null", value = "") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public TemplateContextRequest ownerInfo(OwnerInfo ownerInfo) { + this.ownerInfo = ownerInfo; + return this; + } + + /** + * Get ownerInfo + * @return ownerInfo + **/ + @ApiModelProperty(example = "null", value = "") + public OwnerInfo getOwnerInfo() { + return ownerInfo; + } + + public void setOwnerInfo(OwnerInfo ownerInfo) { + this.ownerInfo = ownerInfo; + } + + public TemplateContextRequest templateId(String templateId) { + this.templateId = templateId; + return this; + } + + /** + * The template context id + * @return templateId + **/ + @ApiModelProperty(example = "null", value = "The template context id") + public String getTemplateId() { + return templateId; + } + + public void setTemplateId(String templateId) { + this.templateId = templateId; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TemplateContextRequest templateContextRequest = (TemplateContextRequest) o; + return Objects.equals(this.templateType, templateContextRequest.templateType) && + Objects.equals(this.description, templateContextRequest.description) && + Objects.equals(this.ownerInfo, templateContextRequest.ownerInfo) && + Objects.equals(this.templateId, templateContextRequest.templateId); + } + + @Override + public int hashCode() { + return Objects.hash(templateType, description, ownerInfo, templateId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TemplateContextRequest {\n"); + + sb.append(" templateType: ").append(toIndentedString(templateType)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" ownerInfo: ").append(toIndentedString(ownerInfo)).append("\n"); + sb.append(" templateId: ").append(toIndentedString(templateId)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java new file mode 100644 index 0000000..79dd26d --- /dev/null +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java @@ -0,0 +1,182 @@ +/* + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.google.gson.annotations.SerializedName; +import com.sphereon.sdk.template_processor.model.TemplateContext; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.time.OffsetDateTime; + +/** + * The merge template response. + */ +@ApiModel(description = "The merge template response.") +@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-07-28T16:30:12.470+02:00") +public class TemplateContextResponse { + @SerializedName("creationTime") + private OffsetDateTime creationTime = null; + + @SerializedName("context") + private TemplateContext context = null; + + @SerializedName("id") + private String id = null; + + /** + * The status of the template + */ + public enum StatusEnum { + @SerializedName("CREATED") + CREATED("CREATED"), + + @SerializedName("UPDATED") + UPDATED("UPDATED"), + + @SerializedName("DELETED") + DELETED("DELETED"), + + @SerializedName("PROCESSING") + PROCESSING("PROCESSING"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + } + + @SerializedName("status") + private StatusEnum status = null; + + /** + * The creation date/time of this response in ISO 8601 format + * @return creationTime + **/ + @ApiModelProperty(example = "null", value = "The creation date/time of this response in ISO 8601 format") + public OffsetDateTime getCreationTime() { + return creationTime; + } + + public TemplateContextResponse context(TemplateContext context) { + this.context = context; + return this; + } + + /** + * Get context + * @return context + **/ + @ApiModelProperty(example = "null", value = "") + public TemplateContext getContext() { + return context; + } + + public void setContext(TemplateContext context) { + this.context = context; + } + + public TemplateContextResponse id(String id) { + this.id = id; + return this; + } + + /** + * Unique template context id + * @return id + **/ + @ApiModelProperty(example = "null", required = true, value = "Unique template context id") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + /** + * The status of the template + * @return status + **/ + @ApiModelProperty(example = "null", required = true, value = "The status of the template") + public StatusEnum getStatus() { + return status; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TemplateContextResponse templateContextResponse = (TemplateContextResponse) o; + return Objects.equals(this.creationTime, templateContextResponse.creationTime) && + Objects.equals(this.context, templateContextResponse.context) && + Objects.equals(this.id, templateContextResponse.id) && + Objects.equals(this.status, templateContextResponse.status); + } + + @Override + public int hashCode() { + return Objects.hash(creationTime, context, id, status); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TemplateContextResponse {\n"); + + sb.append(" creationTime: ").append(toIndentedString(creationTime)).append("\n"); + sb.append(" context: ").append(toIndentedString(context)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-retrofit2/src/test/java/com/sphereon/sdk/template_processor/api/MergeApiTest.java b/java8-retrofit2/src/test/java/com/sphereon/sdk/template_processor/api/MergeApiTest.java new file mode 100644 index 0000000..08d4aa5 --- /dev/null +++ b/java8-retrofit2/src/test/java/com/sphereon/sdk/template_processor/api/MergeApiTest.java @@ -0,0 +1,206 @@ +package com.sphereon.sdk.template_processor.api; + +import com.sphereon.sdk.template_processor.handler.ApiClient; +import com.sphereon.sdk.template_processor.model.DataSetResponse; +import com.sphereon.sdk.template_processor.model.ErrorResponse; +import com.sphereon.sdk.template_processor.model.TemplateContextResponse; +import com.sphereon.sdk.template_processor.model.TemplateContextRequest; +import com.sphereon.sdk.template_processor.model.MergeJobResponse; +import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.MergeSettings; +import java.io.File; +import org.junit.Before; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for MergeApi + */ +public class MergeApiTest { + + private MergeApi api; + + @Before + public void setup() { + api = new ApiClient().createService(MergeApi.class); + } + + + /** + * Store dataset + * + * Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + */ + @Test + public void createDataSetTest() { + String payload = null; + // DataSetResponse response = api.createDataSet(payload); + + // TODO: test validations + } + + /** + * Create template context + * + * Create a unique template context for your environment + */ + @Test + public void createTemplateContextTest() { + TemplateContextRequest templateRequest = null; + // TemplateContextResponse response = api.createTemplateContext(templateRequest); + + // TODO: test validations + } + + /** + * Delete a stored data set + * + * Delete a stored data set + */ + @Test + public void deleteDataSetTest() { + String dataSetId = null; + // DataSetResponse response = api.deleteDataSet(dataSetId); + + // TODO: test validations + } + + /** + * Delete a job manually + * + * Delete the merge job and all related files + */ + @Test + public void deleteJobTest() { + String jobId = null; + // MergeJobResponse response = api.deleteJob(jobId); + + // TODO: test validations + } + + /** + * Delete template context + * + * Delete a template context with all history + */ + @Test + public void deleteTemplateContextTest() { + String templateId = null; + // TemplateContextResponse response = api.deleteTemplateContext(templateId); + + // TODO: test validations + } + + /** + * Job definition and state + * + * Get the merge job definition and current state. Please not that you can differentiate based on http response status + */ + @Test + public void getJobTest() { + String jobId = null; + // MergeJobResponse response = api.getJob(jobId); + + // TODO: test validations + } + + /** + * Get all jobs + * + * Get all office text job definitions and their current state. + */ + @Test + public void getJobsTest() { + List status = null; + // List response = api.getJobs(status); + + // TODO: test validations + } + + /** + * Get the result file + * + * Get a merge result document as a binary stream. + */ + @Test + public void getResultStreamByIdTest() { + String jobId = null; + String streamId = null; + OutputSettings outputSettings = null; + // byte[] response = api.getResultStreamById(jobId, streamId, outputSettings); + + // TODO: test validations + } + + /** + * Get the result file + * + * Get all documents inside a compressed container as a binary stream. + */ + @Test + public void getResultStreamsAsContainerTest() { + String jobId = null; + OutputSettings outputSettings = null; + // byte[] response = api.getResultStreamsAsContainer(jobId, outputSettings); + + // TODO: test validations + } + + /** + * Get template context + * + * Get an existing template context + */ + @Test + public void getTemplateContextTest() { + String templateId = null; + // TemplateContextResponse response = api.getTemplateContext(templateId); + + // TODO: test validations + } + + /** + * Submit merge job for processing + * + * Submit merge job run. + */ + @Test + public void submitJobTest() { + MergeSettings mergesettings = null; + // MergeJobResponse response = api.submitJob(mergesettings); + + // TODO: test validations + } + + /** + * Update template context + * + * Update an existing template context for your environment + */ + @Test + public void updateTemplateContextTest() { + TemplateContextRequest templateContextRequest = null; + // TemplateContextResponse response = api.updateTemplateContext(templateContextRequest); + + // TODO: test validations + } + + /** + * Upload template file + * + * Upload the Office template file + */ + @Test + public void uploadTemplateFileTest() { + String templateId = null; + File stream = null; + // TemplateContextResponse response = api.uploadTemplateFile(templateId, stream); + + // TODO: test validations + } + +} diff --git a/javascript/.swagger-codegen-ignore b/javascript/.swagger-codegen-ignore new file mode 100644 index 0000000..c5fa491 --- /dev/null +++ b/javascript/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/javascript/.travis.yml b/javascript/.travis.yml new file mode 100644 index 0000000..e49f469 --- /dev/null +++ b/javascript/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +node_js: + - "6" + - "6.1" + - "5" + - "5.11" + diff --git a/javascript/LICENSE b/javascript/LICENSE new file mode 100644 index 0000000..8dada3e --- /dev/null +++ b/javascript/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/javascript/README.md b/javascript/README.md new file mode 100644 index 0000000..43437d5 --- /dev/null +++ b/javascript/README.md @@ -0,0 +1,127 @@ +# office_text_merge + +OfficeTextMerge - JavaScript client for office_text_merge +The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store +This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: + +- API version: 0.1 +- Package version: 0.1 +- Build date: 2017-07-28T16:30:09.888+02:00 +- Build package: class io.swagger.codegen.languages.JavascriptClientCodegen +For more information, please visit [https://sphereon.com](https://sphereon.com) + +## Installation + +### For [Node.js](https://nodejs.org/) + +#### npm + +To publish the library as a [npm](https://www.npmjs.com/), +please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages). + +Then install it via: + +```shell +npm install office_text_merge --save +``` + +#### git +# +If the library is hosted at a git repository, e.g. +https://github.com/GIT_USER_ID/GIT_REPO_ID +then install it via: + +```shell + npm install GIT_USER_ID/GIT_REPO_ID --save +``` + +### For browser + +The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following +the above steps with Node.js and installing browserify with `npm install -g browserify`, +perform the following (assuming *main.js* is your entry file): + +```shell +browserify main.js > bundle.js +``` + +Then include *bundle.js* in the HTML pages. + +## Getting Started + +Please follow the [installation](#installation) instruction and execute the following JS code: + +```javascript +var OfficeTextMerge = require('office_text_merge'); + +var defaultClient = OfficeTextMerge.ApiClient.instance; + +// Configure OAuth2 access token for authorization: oauth2schema +var oauth2schema = defaultClient.authentications['oauth2schema']; +oauth2schema.accessToken = "YOUR ACCESS TOKEN" + +var api = new OfficeTextMerge.MergeApi() + +var payload = "payload_example"; // {String} The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] + + +var callback = function(error, data, response) { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}; +api.createDataSet(payload, callback); + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://gw.api.cloud.sphereon.com/* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*OfficeTextMerge.MergeApi* | [**createDataSet**](docs/MergeApi.md#createDataSet) | **POST** /template-processor/merge/0.1/datasets | Store dataset +*OfficeTextMerge.MergeApi* | [**createTemplateContext**](docs/MergeApi.md#createTemplateContext) | **POST** /template-processor/merge/0.1/templates | Create template context +*OfficeTextMerge.MergeApi* | [**deleteDataSet**](docs/MergeApi.md#deleteDataSet) | **DELETE** /template-processor/merge/0.1/datasets/{dataSetId} | Delete a stored data set +*OfficeTextMerge.MergeApi* | [**deleteJob**](docs/MergeApi.md#deleteJob) | **DELETE** /template-processor/merge/0.1/jobs/{jobId} | Delete a job manually +*OfficeTextMerge.MergeApi* | [**deleteTemplateContext**](docs/MergeApi.md#deleteTemplateContext) | **DELETE** /template-processor/merge/0.1/templates/{templateId} | Delete template context +*OfficeTextMerge.MergeApi* | [**getJob**](docs/MergeApi.md#getJob) | **GET** /template-processor/merge/0.1/jobs/{jobId} | Job definition and state +*OfficeTextMerge.MergeApi* | [**getJobs**](docs/MergeApi.md#getJobs) | **GET** /template-processor/merge/0.1/jobs | Get all jobs +*OfficeTextMerge.MergeApi* | [**getResultStreamById**](docs/MergeApi.md#getResultStreamById) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file +*OfficeTextMerge.MergeApi* | [**getResultStreamsAsContainer**](docs/MergeApi.md#getResultStreamsAsContainer) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/container | Get the result file +*OfficeTextMerge.MergeApi* | [**getTemplateContext**](docs/MergeApi.md#getTemplateContext) | **GET** /template-processor/merge/0.1/templates/{templateId} | Get template context +*OfficeTextMerge.MergeApi* | [**submitJob**](docs/MergeApi.md#submitJob) | **PUT** /template-processor/merge/0.1/jobs | Submit merge job for processing +*OfficeTextMerge.MergeApi* | [**updateTemplateContext**](docs/MergeApi.md#updateTemplateContext) | **PUT** /template-processor/merge/0.1/templates | Update template context +*OfficeTextMerge.MergeApi* | [**uploadTemplateFile**](docs/MergeApi.md#uploadTemplateFile) | **POST** /template-processor/merge/0.1/templates/{templateId} | Upload template file + + +## Documentation for Models + + - [OfficeTextMerge.DataSetResponse](docs/DataSetResponse.md) + - [OfficeTextMerge.Error](docs/Error.md) + - [OfficeTextMerge.ErrorResponse](docs/ErrorResponse.md) + - [OfficeTextMerge.Lifecycle](docs/Lifecycle.md) + - [OfficeTextMerge.MergeJob](docs/MergeJob.md) + - [OfficeTextMerge.MergeJobResponse](docs/MergeJobResponse.md) + - [OfficeTextMerge.MergeSettings](docs/MergeSettings.md) + - [OfficeTextMerge.OutputSettings](docs/OutputSettings.md) + - [OfficeTextMerge.OwnerInfo](docs/OwnerInfo.md) + - [OfficeTextMerge.StreamLocation](docs/StreamLocation.md) + - [OfficeTextMerge.TemplateContext](docs/TemplateContext.md) + - [OfficeTextMerge.TemplateContextRequest](docs/TemplateContextRequest.md) + - [OfficeTextMerge.TemplateContextResponse](docs/TemplateContextResponse.md) + + +## Documentation for Authorization + + +### oauth2schema + +- **Type**: OAuth +- **Flow**: application +- **Authorization URL**: +- **Scopes**: + - global: accessEverything + diff --git a/javascript/docs/DataSetResponse.md b/javascript/docs/DataSetResponse.md new file mode 100644 index 0000000..44327c5 --- /dev/null +++ b/javascript/docs/DataSetResponse.md @@ -0,0 +1,24 @@ +# OfficeTextMerge.DataSetResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**completionTime** | **Date** | The completion date/time of this template in ISO 8601 format | [optional] +**creationTime** | **Date** | The creation date/time of this template in ISO 8601 format | [optional] +**id** | **String** | Unique dataset id | +**status** | **String** | The status of the template | + + + +## Enum: StatusEnum + + +* `CREATED` (value: `"CREATED"`) + +* `UPDATED` (value: `"UPDATED"`) + +* `DELETED` (value: `"DELETED"`) + + + + diff --git a/javascript/docs/Error.md b/javascript/docs/Error.md new file mode 100644 index 0000000..79a8dcf --- /dev/null +++ b/javascript/docs/Error.md @@ -0,0 +1,24 @@ +# OfficeTextMerge.Error + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **String** | | +**level** | **String** | | +**cause** | [**Error**](Error.md) | | [optional] +**message** | **String** | | + + + +## Enum: LevelEnum + + +* `INFO` (value: `"INFO"`) + +* `WARNING` (value: `"WARNING"`) + +* `FATAL` (value: `"FATAL"`) + + + + diff --git a/javascript/docs/ErrorResponse.md b/javascript/docs/ErrorResponse.md new file mode 100644 index 0000000..c1a1c73 --- /dev/null +++ b/javascript/docs/ErrorResponse.md @@ -0,0 +1,8 @@ +# OfficeTextMerge.ErrorResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**errors** | [**[Error]**](Error.md) | | [optional] + + diff --git a/javascript/docs/Lifecycle.md b/javascript/docs/Lifecycle.md new file mode 100644 index 0000000..ae49b7a --- /dev/null +++ b/javascript/docs/Lifecycle.md @@ -0,0 +1,30 @@ +# OfficeTextMerge.Lifecycle + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**actionTime** | **Date** | The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation | [optional] +**action** | **String** | | [optional] +**type** | **String** | | [optional] + + + +## Enum: ActionEnum + + +* `DELETE` (value: `"DELETE"`) + + + + + +## Enum: TypeEnum + + +* `RETRIEVAL` (value: `"RETRIEVAL"`) + +* `TIME` (value: `"TIME"`) + + + + diff --git a/javascript/docs/MergeApi.md b/javascript/docs/MergeApi.md new file mode 100644 index 0000000..2dd6544 --- /dev/null +++ b/javascript/docs/MergeApi.md @@ -0,0 +1,699 @@ +# OfficeTextMerge.MergeApi + +All URIs are relative to *https://gw.api.cloud.sphereon.com/* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createDataSet**](MergeApi.md#createDataSet) | **POST** /template-processor/merge/0.1/datasets | Store dataset +[**createTemplateContext**](MergeApi.md#createTemplateContext) | **POST** /template-processor/merge/0.1/templates | Create template context +[**deleteDataSet**](MergeApi.md#deleteDataSet) | **DELETE** /template-processor/merge/0.1/datasets/{dataSetId} | Delete a stored data set +[**deleteJob**](MergeApi.md#deleteJob) | **DELETE** /template-processor/merge/0.1/jobs/{jobId} | Delete a job manually +[**deleteTemplateContext**](MergeApi.md#deleteTemplateContext) | **DELETE** /template-processor/merge/0.1/templates/{templateId} | Delete template context +[**getJob**](MergeApi.md#getJob) | **GET** /template-processor/merge/0.1/jobs/{jobId} | Job definition and state +[**getJobs**](MergeApi.md#getJobs) | **GET** /template-processor/merge/0.1/jobs | Get all jobs +[**getResultStreamById**](MergeApi.md#getResultStreamById) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file +[**getResultStreamsAsContainer**](MergeApi.md#getResultStreamsAsContainer) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/container | Get the result file +[**getTemplateContext**](MergeApi.md#getTemplateContext) | **GET** /template-processor/merge/0.1/templates/{templateId} | Get template context +[**submitJob**](MergeApi.md#submitJob) | **PUT** /template-processor/merge/0.1/jobs | Submit merge job for processing +[**updateTemplateContext**](MergeApi.md#updateTemplateContext) | **PUT** /template-processor/merge/0.1/templates | Update template context +[**uploadTemplateFile**](MergeApi.md#uploadTemplateFile) | **POST** /template-processor/merge/0.1/templates/{templateId} | Upload template file + + + +# **createDataSet** +> DataSetResponse createDataSet(payload) + +Store dataset + +Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + +### Example +```javascript +var OfficeTextMerge = require('office_text_merge'); +var defaultClient = OfficeTextMerge.ApiClient.default; + +// Configure OAuth2 access token for authorization: oauth2schema +var oauth2schema = defaultClient.authentications['oauth2schema']; +oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; + +var apiInstance = new OfficeTextMerge.MergeApi(); + +var payload = "payload_example"; // String | The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] + + +var callback = function(error, data, response) { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}; +apiInstance.createDataSet(payload, callback); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **payload** | **String**| The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] | + +### Return type + +[**DataSetResponse**](DataSetResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + + +# **createTemplateContext** +> TemplateContextResponse createTemplateContext(templateRequest) + +Create template context + +Create a unique template context for your environment + +### Example +```javascript +var OfficeTextMerge = require('office_text_merge'); +var defaultClient = OfficeTextMerge.ApiClient.default; + +// Configure OAuth2 access token for authorization: oauth2schema +var oauth2schema = defaultClient.authentications['oauth2schema']; +oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; + +var apiInstance = new OfficeTextMerge.MergeApi(); + +var templateRequest = new OfficeTextMerge.TemplateContextRequest(); // TemplateContextRequest | The template request + + +var callback = function(error, data, response) { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}; +apiInstance.createTemplateContext(templateRequest, callback); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| The template request | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + + +# **deleteDataSet** +> DataSetResponse deleteDataSet(dataSetId) + +Delete a stored data set + +Delete a stored data set + +### Example +```javascript +var OfficeTextMerge = require('office_text_merge'); +var defaultClient = OfficeTextMerge.ApiClient.default; + +// Configure OAuth2 access token for authorization: oauth2schema +var oauth2schema = defaultClient.authentications['oauth2schema']; +oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; + +var apiInstance = new OfficeTextMerge.MergeApi(); + +var dataSetId = "dataSetId_example"; // String | dataSetId + + +var callback = function(error, data, response) { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}; +apiInstance.deleteDataSet(dataSetId, callback); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dataSetId** | **String**| dataSetId | + +### Return type + +[**DataSetResponse**](DataSetResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + + +# **deleteJob** +> MergeJobResponse deleteJob(jobId) + +Delete a job manually + +Delete the merge job and all related files + +### Example +```javascript +var OfficeTextMerge = require('office_text_merge'); +var defaultClient = OfficeTextMerge.ApiClient.default; + +// Configure OAuth2 access token for authorization: oauth2schema +var oauth2schema = defaultClient.authentications['oauth2schema']; +oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; + +var apiInstance = new OfficeTextMerge.MergeApi(); + +var jobId = "jobId_example"; // String | jobId + + +var callback = function(error, data, response) { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}; +apiInstance.deleteJob(jobId, callback); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **String**| jobId | + +### Return type + +[**MergeJobResponse**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + + +# **deleteTemplateContext** +> TemplateContextResponse deleteTemplateContext(templateId) + +Delete template context + +Delete a template context with all history + +### Example +```javascript +var OfficeTextMerge = require('office_text_merge'); +var defaultClient = OfficeTextMerge.ApiClient.default; + +// Configure OAuth2 access token for authorization: oauth2schema +var oauth2schema = defaultClient.authentications['oauth2schema']; +oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; + +var apiInstance = new OfficeTextMerge.MergeApi(); + +var templateId = "templateId_example"; // String | templateId + + +var callback = function(error, data, response) { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}; +apiInstance.deleteTemplateContext(templateId, callback); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **String**| templateId | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + + +# **getJob** +> MergeJobResponse getJob(jobId) + +Job definition and state + +Get the merge job definition and current state. Please not that you can differentiate based on http response status + +### Example +```javascript +var OfficeTextMerge = require('office_text_merge'); +var defaultClient = OfficeTextMerge.ApiClient.default; + +// Configure OAuth2 access token for authorization: oauth2schema +var oauth2schema = defaultClient.authentications['oauth2schema']; +oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; + +var apiInstance = new OfficeTextMerge.MergeApi(); + +var jobId = "jobId_example"; // String | jobId + + +var callback = function(error, data, response) { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}; +apiInstance.getJob(jobId, callback); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **String**| jobId | + +### Return type + +[**MergeJobResponse**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + + +# **getJobs** +> [MergeJobResponse] getJobs(opts) + +Get all jobs + +Get all office text job definitions and their current state. + +### Example +```javascript +var OfficeTextMerge = require('office_text_merge'); +var defaultClient = OfficeTextMerge.ApiClient.default; + +// Configure OAuth2 access token for authorization: oauth2schema +var oauth2schema = defaultClient.authentications['oauth2schema']; +oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; + +var apiInstance = new OfficeTextMerge.MergeApi(); + +var opts = { + 'status': ["status_example"] // [String] | A list of status to filter on. +}; + +var callback = function(error, data, response) { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}; +apiInstance.getJobs(opts, callback); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**[String]**](String.md)| A list of status to filter on. | [optional] + +### Return type + +[**[MergeJobResponse]**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + + +# **getResultStreamById** +> 'String' getResultStreamById(jobId, streamId, opts) + +Get the result file + +Get a merge result document as a binary stream. + +### Example +```javascript +var OfficeTextMerge = require('office_text_merge'); +var defaultClient = OfficeTextMerge.ApiClient.default; + +// Configure OAuth2 access token for authorization: oauth2schema +var oauth2schema = defaultClient.authentications['oauth2schema']; +oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; + +var apiInstance = new OfficeTextMerge.MergeApi(); + +var jobId = "jobId_example"; // String | jobId + +var streamId = "streamId_example"; // String | streamId + +var opts = { + 'outputSettings': new OfficeTextMerge.OutputSettings() // OutputSettings | outputSettings +}; + +var callback = function(error, data, response) { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}; +apiInstance.getResultStreamById(jobId, streamId, opts, callback); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **String**| jobId | + **streamId** | **String**| streamId | + **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] + +### Return type + +**'String'** + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/octet-stream + + +# **getResultStreamsAsContainer** +> 'String' getResultStreamsAsContainer(jobId, opts) + +Get the result file + +Get all documents inside a compressed container as a binary stream. + +### Example +```javascript +var OfficeTextMerge = require('office_text_merge'); +var defaultClient = OfficeTextMerge.ApiClient.default; + +// Configure OAuth2 access token for authorization: oauth2schema +var oauth2schema = defaultClient.authentications['oauth2schema']; +oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; + +var apiInstance = new OfficeTextMerge.MergeApi(); + +var jobId = "jobId_example"; // String | jobId + +var opts = { + 'outputSettings': new OfficeTextMerge.OutputSettings() // OutputSettings | outputSettings +}; + +var callback = function(error, data, response) { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}; +apiInstance.getResultStreamsAsContainer(jobId, opts, callback); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **String**| jobId | + **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] + +### Return type + +**'String'** + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/octet-stream + + +# **getTemplateContext** +> TemplateContextResponse getTemplateContext(templateId) + +Get template context + +Get an existing template context + +### Example +```javascript +var OfficeTextMerge = require('office_text_merge'); +var defaultClient = OfficeTextMerge.ApiClient.default; + +// Configure OAuth2 access token for authorization: oauth2schema +var oauth2schema = defaultClient.authentications['oauth2schema']; +oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; + +var apiInstance = new OfficeTextMerge.MergeApi(); + +var templateId = "templateId_example"; // String | The template context name unique for your environment + + +var callback = function(error, data, response) { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}; +apiInstance.getTemplateContext(templateId, callback); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **String**| The template context name unique for your environment | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + + +# **submitJob** +> MergeJobResponse submitJob(mergesettings) + +Submit merge job for processing + +Submit merge job run. + +### Example +```javascript +var OfficeTextMerge = require('office_text_merge'); +var defaultClient = OfficeTextMerge.ApiClient.default; + +// Configure OAuth2 access token for authorization: oauth2schema +var oauth2schema = defaultClient.authentications['oauth2schema']; +oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; + +var apiInstance = new OfficeTextMerge.MergeApi(); + +var mergesettings = new OfficeTextMerge.MergeSettings(); // MergeSettings | The merge- and output settings + + +var callback = function(error, data, response) { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}; +apiInstance.submitJob(mergesettings, callback); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **mergesettings** | [**MergeSettings**](MergeSettings.md)| The merge- and output settings | + +### Return type + +[**MergeJobResponse**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + + +# **updateTemplateContext** +> TemplateContextResponse updateTemplateContext(templateContextRequest) + +Update template context + +Update an existing template context for your environment + +### Example +```javascript +var OfficeTextMerge = require('office_text_merge'); +var defaultClient = OfficeTextMerge.ApiClient.default; + +// Configure OAuth2 access token for authorization: oauth2schema +var oauth2schema = defaultClient.authentications['oauth2schema']; +oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; + +var apiInstance = new OfficeTextMerge.MergeApi(); + +var templateContextRequest = new OfficeTextMerge.TemplateContextRequest(); // TemplateContextRequest | templateContextRequest + + +var callback = function(error, data, response) { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}; +apiInstance.updateTemplateContext(templateContextRequest, callback); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateContextRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| templateContextRequest | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + + +# **uploadTemplateFile** +> TemplateContextResponse uploadTemplateFile(templateId, stream) + +Upload template file + +Upload the Office template file + +### Example +```javascript +var OfficeTextMerge = require('office_text_merge'); +var defaultClient = OfficeTextMerge.ApiClient.default; + +// Configure OAuth2 access token for authorization: oauth2schema +var oauth2schema = defaultClient.authentications['oauth2schema']; +oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; + +var apiInstance = new OfficeTextMerge.MergeApi(); + +var templateId = "templateId_example"; // String | The template context name unique for your environment + +var stream = "/path/to/file.txt"; // File | The template (file/inputstream) to store + + +var callback = function(error, data, response) { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}; +apiInstance.uploadTemplateFile(templateId, stream, callback); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **String**| The template context name unique for your environment | + **stream** | **File**| The template (file/inputstream) to store | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json;charset=UTF-8 + diff --git a/javascript/docs/MergeJob.md b/javascript/docs/MergeJob.md new file mode 100644 index 0000000..fb2535c --- /dev/null +++ b/javascript/docs/MergeJob.md @@ -0,0 +1,37 @@ +# OfficeTextMerge.MergeJob + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**resultFolderPath** | **String** | The target folder path of result files | [optional] +**completionTime** | **Date** | The completion date/time of this job in ISO 8601 format | [optional] +**jobId** | **String** | The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation | +**resultContainerId** | **String** | The target container id of result files | [optional] +**creationTime** | **Date** | The creation date/time of this job in ISO 8601 format | [optional] +**dataSetId** | **String** | Data set id | [optional] +**resultStreams** | [**[StreamLocation]**](StreamLocation.md) | The storage locations of the result files. | +**headerDataSetIds** | **[String]** | Header data set ids | [optional] +**mergeSettings** | [**MergeSettings**](MergeSettings.md) | | [optional] +**statusMessage** | **String** | A status message, which can be informational, warning or error. A message here does not indicate an error perse | [optional] +**status** | **String** | The status of the job | + + + +## Enum: StatusEnum + + +* `CREATED` (value: `"CREATED"`) + +* `UPDATED` (value: `"UPDATED"`) + +* `PROCESSING` (value: `"PROCESSING"`) + +* `DONE` (value: `"DONE"`) + +* `ERROR` (value: `"ERROR"`) + +* `DELETED` (value: `"DELETED"`) + + + + diff --git a/javascript/docs/MergeJobResponse.md b/javascript/docs/MergeJobResponse.md new file mode 100644 index 0000000..944c65a --- /dev/null +++ b/javascript/docs/MergeJobResponse.md @@ -0,0 +1,30 @@ +# OfficeTextMerge.MergeJobResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**jobId** | **String** | The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation | +**job** | [**MergeJob**](MergeJob.md) | | [optional] +**statusMessage** | **String** | A status message, which can be informational, warning or error. AA message here does not indicate an error perse | [optional] +**status** | **String** | The status of the job | + + + +## Enum: StatusEnum + + +* `CREATED` (value: `"CREATED"`) + +* `UPDATED` (value: `"UPDATED"`) + +* `PROCESSING` (value: `"PROCESSING"`) + +* `DONE` (value: `"DONE"`) + +* `ERROR` (value: `"ERROR"`) + +* `DELETED` (value: `"DELETED"`) + + + + diff --git a/javascript/docs/MergeSettings.md b/javascript/docs/MergeSettings.md new file mode 100644 index 0000000..5993c24 --- /dev/null +++ b/javascript/docs/MergeSettings.md @@ -0,0 +1,38 @@ +# OfficeTextMerge.MergeSettings + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**lifecycle** | [**Lifecycle**](Lifecycle.md) | | [optional] +**mergeResult** | **String** | | [optional] +**dataSetId** | **String** | Data set id | +**engine** | **String** | | [optional] +**headerDataSetIds** | **[String]** | optional header data set ids | [optional] +**templateVersion** | **Integer** | Template version | [optional] +**resultStreamLocation** | [**StreamLocation**](StreamLocation.md) | The output location of the result files. | +**templateId** | **String** | Template id | +**outputSettings** | [**OutputSettings**](OutputSettings.md) | | + + + +## Enum: MergeResultEnum + + +* `SINGLE_FILE` (value: `"SINGLE_FILE"`) + +* `SEPARATE_FILES` (value: `"SEPARATE_FILES"`) + + + + + +## Enum: EngineEnum + + +* `BASIC` (value: `"BASIC"`) + +* `PREMIUM` (value: `"PREMIUM"`) + + + + diff --git a/javascript/docs/OutputSettings.md b/javascript/docs/OutputSettings.md new file mode 100644 index 0000000..d01b28d --- /dev/null +++ b/javascript/docs/OutputSettings.md @@ -0,0 +1,61 @@ +# OfficeTextMerge.OutputSettings + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**deliveryFormat** | **String** | | [optional] +**outputFormat** | **String** | | [optional] + + + +## Enum: DeliveryFormatEnum + + +* `PLAIN` (value: `"PLAIN"`) + +* `ZIP` (value: `"ZIP"`) + +* `_7ZIP` (value: `"_7ZIP"`) + + + + + +## Enum: OutputFormatEnum + + +* `DOC` (value: `"DOC"`) + +* `DOCX` (value: `"DOCX"`) + +* `RTF` (value: `"RTF"`) + +* `PDF` (value: `"PDF"`) + +* `XPS` (value: `"XPS"`) + +* `SVG` (value: `"SVG"`) + +* `HTML` (value: `"HTML"`) + +* `ODT` (value: `"ODT"`) + +* `TIFF` (value: `"TIFF"`) + +* `PNG` (value: `"PNG"`) + +* `BMP` (value: `"BMP"`) + +* `JPEG` (value: `"JPEG"`) + +* `TXT` (value: `"TXT"`) + +* `XML` (value: `"XML"`) + +* `JSON` (value: `"JSON"`) + +* `DEFAULT` (value: `"DEFAULT"`) + + + + diff --git a/javascript/docs/OwnerInfo.md b/javascript/docs/OwnerInfo.md new file mode 100644 index 0000000..eedd8df --- /dev/null +++ b/javascript/docs/OwnerInfo.md @@ -0,0 +1,11 @@ +# OfficeTextMerge.OwnerInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**phone** | **String** | The owner's phone number | [optional] +**companyDepartment** | **String** | The owner's company/department | [optional] +**name** | **String** | The owner's name | [optional] +**email** | **String** | The owner's email address | [optional] + + diff --git a/javascript/docs/StreamLocation.md b/javascript/docs/StreamLocation.md new file mode 100644 index 0000000..c8b5725 --- /dev/null +++ b/javascript/docs/StreamLocation.md @@ -0,0 +1,11 @@ +# OfficeTextMerge.StreamLocation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**folderPath** | **String** | | [optional] +**originalFileName** | **String** | | [optional] +**containerId** | **String** | | [optional] +**fileId** | **String** | | [optional] + + diff --git a/javascript/docs/TemplateContext.md b/javascript/docs/TemplateContext.md new file mode 100644 index 0000000..77cb805 --- /dev/null +++ b/javascript/docs/TemplateContext.md @@ -0,0 +1,24 @@ +# OfficeTextMerge.TemplateContext + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**templateType** | **String** | | +**templateFileLocations** | [**{String: StreamLocation}**](StreamLocation.md) | The template files (versioned) | [optional] +**description** | **String** | The template description | [optional] +**ownerInfo** | [**OwnerInfo**](OwnerInfo.md) | | [optional] +**id** | **String** | | [optional] +**templateId** | **String** | The template context id | [optional] + + + +## Enum: TemplateTypeEnum + + +* `OFFICE` (value: `"OFFICE"`) + +* `FREEMARKER` (value: `"FREEMARKER"`) + + + + diff --git a/javascript/docs/TemplateContextRequest.md b/javascript/docs/TemplateContextRequest.md new file mode 100644 index 0000000..7ae93a3 --- /dev/null +++ b/javascript/docs/TemplateContextRequest.md @@ -0,0 +1,22 @@ +# OfficeTextMerge.TemplateContextRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**templateType** | **String** | | +**description** | **String** | | [optional] +**ownerInfo** | [**OwnerInfo**](OwnerInfo.md) | | [optional] +**templateId** | **String** | The template context id | [optional] + + + +## Enum: TemplateTypeEnum + + +* `OFFICE` (value: `"OFFICE"`) + +* `FREEMARKER` (value: `"FREEMARKER"`) + + + + diff --git a/javascript/docs/TemplateContextResponse.md b/javascript/docs/TemplateContextResponse.md new file mode 100644 index 0000000..6ad4918 --- /dev/null +++ b/javascript/docs/TemplateContextResponse.md @@ -0,0 +1,26 @@ +# OfficeTextMerge.TemplateContextResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**creationTime** | **Date** | The creation date/time of this response in ISO 8601 format | [optional] +**context** | [**TemplateContext**](TemplateContext.md) | | [optional] +**id** | **String** | Unique template context id | +**status** | **String** | The status of the template | + + + +## Enum: StatusEnum + + +* `CREATED` (value: `"CREATED"`) + +* `UPDATED` (value: `"UPDATED"`) + +* `DELETED` (value: `"DELETED"`) + +* `PROCESSING` (value: `"PROCESSING"`) + + + + diff --git a/javascript/git_push.sh b/javascript/git_push.sh new file mode 100644 index 0000000..0d041ad --- /dev/null +++ b/javascript/git_push.sh @@ -0,0 +1,52 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the Git credential in your environment." + git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/javascript/mocha.opts b/javascript/mocha.opts new file mode 100644 index 0000000..e69de29 diff --git a/javascript/package.json b/javascript/package.json new file mode 100644 index 0000000..35d0d62 --- /dev/null +++ b/javascript/package.json @@ -0,0 +1,18 @@ +{ + "name": "office_text_merge", + "version": "0.1", + "description": "bThe_Office_Text_API_can_generate_office_documents_from_a_template_and_a_JSON_data_filebThe_flow_is_generally_as_followsbInteractive_testing_bA_web_based_test_console_is_available_in_the_a_hrefhttpsstore_sphereon_comSphereon_API_Storea", + "license": "Apache-2.0", + "main": "src/SphereonTemplateProcessor/index.js", + "scripts": { + "test": "./node_modules/mocha/bin/mocha --recursive" + }, + "dependencies": { + "superagent": "1.7.1" + }, + "devDependencies": { + "mocha": "~2.3.4", + "sinon": "1.17.3", + "expect.js": "~0.3.1" + } +} diff --git a/javascript/src/SphereonTemplateProcessor/ApiClient.js b/javascript/src/SphereonTemplateProcessor/ApiClient.js new file mode 100644 index 0000000..1fa391f --- /dev/null +++ b/javascript/src/SphereonTemplateProcessor/ApiClient.js @@ -0,0 +1,515 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['superagent'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('superagent')); + } else { + // Browser globals (root is window) + if (!root.OfficeTextMerge) { + root.OfficeTextMerge = {}; + } + root.OfficeTextMerge.ApiClient = factory(root.superagent); + } +}(this, function(superagent) { + 'use strict'; + + /** + * @module SphereonTemplateProcessor/ApiClient + * @version 0.1 + */ + + /** + * Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an + * application to use this class directly - the *Api and model classes provide the public API for the service. The + * contents of this file should be regarded as internal but are documented for completeness. + * @alias module:SphereonTemplateProcessor/ApiClient + * @class + */ + var exports = function() { + /** + * The base URL against which to resolve every API call's (relative) path. + * @type {String} + * @default https://gw.api.cloud.sphereon.com/ + */ + this.basePath = 'https://gw.api.cloud.sphereon.com/'.replace(/\/+$/, ''); + + /** + * The authentication methods to be included for all API calls. + * @type {Array.} + */ + this.authentications = { + 'oauth2schema': {type: 'oauth2'} + }; + /** + * The default HTTP headers to be included for all API calls. + * @type {Array.} + * @default {} + */ + this.defaultHeaders = {}; + + /** + * The default HTTP timeout for all API calls. + * @type {Number} + * @default 60000 + */ + this.timeout = 60000; + }; + + /** + * Returns a string representation for an actual parameter. + * @param param The actual parameter. + * @returns {String} The string representation of param. + */ + exports.prototype.paramToString = function(param) { + if (param == undefined || param == null) { + return ''; + } + if (param instanceof Date) { + return param.toJSON(); + } + return param.toString(); + }; + + /** + * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values. + * NOTE: query parameters are not handled here. + * @param {String} path The path to append to the base URL. + * @param {Object} pathParams The parameter values to append. + * @returns {String} The encoded path with parameter values substituted. + */ + exports.prototype.buildUrl = function(path, pathParams) { + if (!path.match(/^\//)) { + path = '/' + path; + } + var url = this.basePath + path; + var _this = this; + url = url.replace(/\{([\w-]+)\}/g, function(fullMatch, key) { + var value; + if (pathParams.hasOwnProperty(key)) { + value = _this.paramToString(pathParams[key]); + } else { + value = fullMatch; + } + return encodeURIComponent(value); + }); + return url; + }; + + /** + * Checks whether the given content type represents JSON.
+ * JSON content type examples:
+ *
    + *
  • application/json
  • + *
  • application/json; charset=UTF8
  • + *
  • APPLICATION/JSON
  • + *
+ * @param {String} contentType The MIME content type to check. + * @returns {Boolean} true if contentType represents JSON, otherwise false. + */ + exports.prototype.isJsonMime = function(contentType) { + return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i)); + }; + + /** + * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first. + * @param {Array.} contentTypes + * @returns {String} The chosen content type, preferring JSON. + */ + exports.prototype.jsonPreferredMime = function(contentTypes) { + for (var i = 0; i < contentTypes.length; i++) { + if (this.isJsonMime(contentTypes[i])) { + return contentTypes[i]; + } + } + return contentTypes[0]; + }; + + /** + * Checks whether the given parameter value represents file-like content. + * @param param The parameter to check. + * @returns {Boolean} true if param represents a file. + */ + exports.prototype.isFileParam = function(param) { + // fs.ReadStream in Node.js (but not in runtime like browserify) + if (typeof window === 'undefined' && + typeof require === 'function' && + require('fs') && + param instanceof require('fs').ReadStream) { + return true; + } + // Buffer in Node.js + if (typeof Buffer === 'function' && param instanceof Buffer) { + return true; + } + // Blob in browser + if (typeof Blob === 'function' && param instanceof Blob) { + return true; + } + // File in browser (it seems File object is also instance of Blob, but keep this for safe) + if (typeof File === 'function' && param instanceof File) { + return true; + } + return false; + }; + + /** + * Normalizes parameter values: + *
    + *
  • remove nils
  • + *
  • keep files and arrays
  • + *
  • format to string with `paramToString` for other cases
  • + *
+ * @param {Object.} params The parameters as object properties. + * @returns {Object.} normalized parameters. + */ + exports.prototype.normalizeParams = function(params) { + var newParams = {}; + for (var key in params) { + if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) { + var value = params[key]; + if (this.isFileParam(value) || Array.isArray(value)) { + newParams[key] = value; + } else { + newParams[key] = this.paramToString(value); + } + } + } + return newParams; + }; + + /** + * Enumeration of collection format separator strategies. + * @enum {String} + * @readonly + */ + exports.CollectionFormatEnum = { + /** + * Comma-separated values. Value: csv + * @const + */ + CSV: ',', + /** + * Space-separated values. Value: ssv + * @const + */ + SSV: ' ', + /** + * Tab-separated values. Value: tsv + * @const + */ + TSV: '\t', + /** + * Pipe(|)-separated values. Value: pipes + * @const + */ + PIPES: '|', + /** + * Native array. Value: multi + * @const + */ + MULTI: 'multi' + }; + + /** + * Builds a string representation of an array-type actual parameter, according to the given collection format. + * @param {Array} param An array parameter. + * @param {module:SphereonTemplateProcessor/ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy. + * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns + * param as is if collectionFormat is multi. + */ + exports.prototype.buildCollectionParam = function buildCollectionParam(param, collectionFormat) { + if (param == null) { + return null; + } + switch (collectionFormat) { + case 'csv': + return param.map(this.paramToString).join(','); + case 'ssv': + return param.map(this.paramToString).join(' '); + case 'tsv': + return param.map(this.paramToString).join('\t'); + case 'pipes': + return param.map(this.paramToString).join('|'); + case 'multi': + // return the array directly as SuperAgent will handle it as expected + return param.map(this.paramToString); + default: + throw new Error('Unknown collection format: ' + collectionFormat); + } + }; + + /** + * Applies authentication headers to the request. + * @param {Object} request The request object created by a superagent() call. + * @param {Array.} authNames An array of authentication method names. + */ + exports.prototype.applyAuthToRequest = function(request, authNames) { + var _this = this; + authNames.forEach(function(authName) { + var auth = _this.authentications[authName]; + switch (auth.type) { + case 'basic': + if (auth.username || auth.password) { + request.auth(auth.username || '', auth.password || ''); + } + break; + case 'apiKey': + if (auth.apiKey) { + var data = {}; + if (auth.apiKeyPrefix) { + data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey; + } else { + data[auth.name] = auth.apiKey; + } + if (auth['in'] === 'header') { + request.set(data); + } else { + request.query(data); + } + } + break; + case 'oauth2': + if (auth.accessToken) { + request.set({'Authorization': 'Bearer ' + auth.accessToken}); + } + break; + default: + throw new Error('Unknown authentication type: ' + auth.type); + } + }); + }; + + /** + * Deserializes an HTTP response body into a value of the specified type. + * @param {Object} response A SuperAgent response object. + * @param {(String|Array.|Object.|Function)} returnType The type to return. Pass a string for simple types + * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To + * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: + * all properties on data will be converted to this type. + * @returns A value of the specified type. + */ + exports.prototype.deserialize = function deserialize(response, returnType) { + if (response == null || returnType == null) { + return null; + } + // Rely on SuperAgent for parsing response body. + // See http://visionmedia.github.io/superagent/#parsing-response-bodies + var data = response.body; + if (data == null) { + // SuperAgent does not always produce a body; use the unparsed response as a fallback + data = response.text; + } + return exports.convertToType(data, returnType); + }; + + /** + * Callback function to receive the result of the operation. + * @callback module:SphereonTemplateProcessor/ApiClient~callApiCallback + * @param {String} error Error message, if any. + * @param data The data returned by the service call. + * @param {String} response The complete HTTP response. + */ + + /** + * Invokes the REST service using the supplied settings and parameters. + * @param {String} path The base URL to invoke. + * @param {String} httpMethod The HTTP method to use. + * @param {Object.} pathParams A map of path parameters and their values. + * @param {Object.} queryParams A map of query parameters and their values. + * @param {Object.} headerParams A map of header parameters and their values. + * @param {Object.} formParams A map of form parameters and their values. + * @param {Object} bodyParam The value to pass as the request body. + * @param {Array.} authNames An array of authentication type names. + * @param {Array.} contentTypes An array of request MIME types. + * @param {Array.} accepts An array of acceptable response MIME types. + * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the + * constructor for a complex type. + * @param {module:SphereonTemplateProcessor/ApiClient~callApiCallback} callback The callback function. + * @returns {Object} The SuperAgent request object. + */ + exports.prototype.callApi = function callApi(path, httpMethod, pathParams, + queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, + returnType, callback) { + + var _this = this; + var url = this.buildUrl(path, pathParams); + var request = superagent(httpMethod, url); + + // apply authentications + this.applyAuthToRequest(request, authNames); + + // set query parameters + request.query(this.normalizeParams(queryParams)); + + // set header parameters + request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); + + // set request timeout + request.timeout(this.timeout); + + var contentType = this.jsonPreferredMime(contentTypes); + if (contentType) { + request.type(contentType); + } else if (!request.header['Content-Type']) { + request.type('application/json'); + } + + if (contentType === 'application/x-www-form-urlencoded') { + request.send(this.normalizeParams(formParams)); + } else if (contentType == 'multipart/form-data') { + var _formParams = this.normalizeParams(formParams); + for (var key in _formParams) { + if (_formParams.hasOwnProperty(key)) { + if (this.isFileParam(_formParams[key])) { + // file field + request.attach(key, _formParams[key]); + } else { + request.field(key, _formParams[key]); + } + } + } + } else if (bodyParam) { + request.send(bodyParam); + } + + var accept = this.jsonPreferredMime(accepts); + if (accept) { + request.accept(accept); + } + + + request.end(function(error, response) { + if (callback) { + var data = null; + if (!error) { + data = _this.deserialize(response, returnType); + } + callback(error, data, response); + } + }); + + return request; + }; + + /** + * Parses an ISO-8601 string representation of a date value. + * @param {String} str The date value as a string. + * @returns {Date} The parsed date object. + */ + exports.parseDate = function(str) { + return new Date(str.replace(/T/i, ' ')); + }; + + /** + * Converts a value to the specified type. + * @param {(String|Object)} data The data to convert, as a string or object. + * @param {(String|Array.|Object.|Function)} type The type to return. Pass a string for simple types + * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To + * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: + * all properties on data will be converted to this type. + * @returns An instance of the specified type. + */ + exports.convertToType = function(data, type) { + switch (type) { + case 'Boolean': + return Boolean(data); + case 'Integer': + return parseInt(data, 10); + case 'Number': + return parseFloat(data); + case 'String': + return String(data); + case 'Date': + return this.parseDate(String(data)); + default: + if (type === Object) { + // generic object, return directly + return data; + } else if (typeof type === 'function') { + // for model type like: User + return type.constructFromObject(data); + } else if (Array.isArray(type)) { + // for array type like: ['String'] + var itemType = type[0]; + return data.map(function(item) { + return exports.convertToType(item, itemType); + }); + } else if (typeof type === 'object') { + // for plain object type like: {'String': 'Integer'} + var keyType, valueType; + for (var k in type) { + if (type.hasOwnProperty(k)) { + keyType = k; + valueType = type[k]; + break; + } + } + var result = {}; + for (var k in data) { + if (data.hasOwnProperty(k)) { + var key = exports.convertToType(k, keyType); + var value = exports.convertToType(data[k], valueType); + result[key] = value; + } + } + return result; + } else { + // for unknown type, return the data directly + return data; + } + } + }; + + /** + * Constructs a new map or array model from REST data. + * @param data {Object|Array} The REST data. + * @param obj {Object|Array} The target object or array. + */ + exports.constructFromObject = function(data, obj, itemType) { + if (Array.isArray(data)) { + for (var i = 0; i < data.length; i++) { + if (data.hasOwnProperty(i)) + obj[i] = exports.convertToType(data[i], itemType); + } + } else { + for (var k in data) { + if (data.hasOwnProperty(k)) + obj[k] = exports.convertToType(data[k], itemType); + } + } + }; + + /** + * The default API client implementation. + * @type {module:SphereonTemplateProcessor/ApiClient} + */ + exports.instance = new exports(); + + return exports; +})); diff --git a/javascript/src/SphereonTemplateProcessor/api/MergeApi.js b/javascript/src/SphereonTemplateProcessor/api/MergeApi.js new file mode 100644 index 0000000..0c325b6 --- /dev/null +++ b/javascript/src/SphereonTemplateProcessor/api/MergeApi.js @@ -0,0 +1,672 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['SphereonTemplateProcessor/ApiClient', 'SphereonTemplateProcessor/model/DataSetResponse', 'SphereonTemplateProcessor/model/ErrorResponse', 'SphereonTemplateProcessor/model/TemplateContextResponse', 'SphereonTemplateProcessor/model/TemplateContextRequest', 'SphereonTemplateProcessor/model/MergeJobResponse', 'SphereonTemplateProcessor/model/OutputSettings', 'SphereonTemplateProcessor/model/MergeSettings'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/DataSetResponse'), require('../model/ErrorResponse'), require('../model/TemplateContextResponse'), require('../model/TemplateContextRequest'), require('../model/MergeJobResponse'), require('../model/OutputSettings'), require('../model/MergeSettings')); + } else { + // Browser globals (root is window) + if (!root.OfficeTextMerge) { + root.OfficeTextMerge = {}; + } + root.OfficeTextMerge.MergeApi = factory(root.OfficeTextMerge.ApiClient, root.OfficeTextMerge.DataSetResponse, root.OfficeTextMerge.ErrorResponse, root.OfficeTextMerge.TemplateContextResponse, root.OfficeTextMerge.TemplateContextRequest, root.OfficeTextMerge.MergeJobResponse, root.OfficeTextMerge.OutputSettings, root.OfficeTextMerge.MergeSettings); + } +}(this, function(ApiClient, DataSetResponse, ErrorResponse, TemplateContextResponse, TemplateContextRequest, MergeJobResponse, OutputSettings, MergeSettings) { + 'use strict'; + + /** + * Merge service. + * @module SphereonTemplateProcessor/api/MergeApi + * @version 0.1 + */ + + /** + * Constructs a new MergeApi. + * @alias module:SphereonTemplateProcessor/api/MergeApi + * @class + * @param {module:SphereonTemplateProcessor/ApiClient} apiClient Optional API client implementation to use, + * default to {@link module:SphereonTemplateProcessor/ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + /** + * Callback function to receive the result of the createDataSet operation. + * @callback module:SphereonTemplateProcessor/api/MergeApi~createDataSetCallback + * @param {String} error Error message, if any. + * @param {module:SphereonTemplateProcessor/model/DataSetResponse} data The data returned by the service call. + * @param {String} response The complete HTTP response. + */ + + /** + * Store dataset + * Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + * @param {String} payload The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] + * @param {module:SphereonTemplateProcessor/api/MergeApi~createDataSetCallback} callback The callback function, accepting three arguments: error, data, response + * data is of type: {@link module:SphereonTemplateProcessor/model/DataSetResponse} + */ + this.createDataSet = function(payload, callback) { + var postBody = payload; + + // verify the required parameter 'payload' is set + if (payload == undefined || payload == null) { + throw "Missing the required parameter 'payload' when calling createDataSet"; + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['oauth2schema']; + var contentTypes = ['application/json;charset=UTF-8']; + var accepts = ['application/json;charset=UTF-8']; + var returnType = DataSetResponse; + + return this.apiClient.callApi( + '/template-processor/merge/0.1/datasets', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } + + /** + * Callback function to receive the result of the createTemplateContext operation. + * @callback module:SphereonTemplateProcessor/api/MergeApi~createTemplateContextCallback + * @param {String} error Error message, if any. + * @param {module:SphereonTemplateProcessor/model/TemplateContextResponse} data The data returned by the service call. + * @param {String} response The complete HTTP response. + */ + + /** + * Create template context + * Create a unique template context for your environment + * @param {module:SphereonTemplateProcessor/model/TemplateContextRequest} templateRequest The template request + * @param {module:SphereonTemplateProcessor/api/MergeApi~createTemplateContextCallback} callback The callback function, accepting three arguments: error, data, response + * data is of type: {@link module:SphereonTemplateProcessor/model/TemplateContextResponse} + */ + this.createTemplateContext = function(templateRequest, callback) { + var postBody = templateRequest; + + // verify the required parameter 'templateRequest' is set + if (templateRequest == undefined || templateRequest == null) { + throw "Missing the required parameter 'templateRequest' when calling createTemplateContext"; + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['oauth2schema']; + var contentTypes = ['application/json;charset=UTF-8']; + var accepts = ['application/json;charset=UTF-8']; + var returnType = TemplateContextResponse; + + return this.apiClient.callApi( + '/template-processor/merge/0.1/templates', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } + + /** + * Callback function to receive the result of the deleteDataSet operation. + * @callback module:SphereonTemplateProcessor/api/MergeApi~deleteDataSetCallback + * @param {String} error Error message, if any. + * @param {module:SphereonTemplateProcessor/model/DataSetResponse} data The data returned by the service call. + * @param {String} response The complete HTTP response. + */ + + /** + * Delete a stored data set + * Delete a stored data set + * @param {String} dataSetId dataSetId + * @param {module:SphereonTemplateProcessor/api/MergeApi~deleteDataSetCallback} callback The callback function, accepting three arguments: error, data, response + * data is of type: {@link module:SphereonTemplateProcessor/model/DataSetResponse} + */ + this.deleteDataSet = function(dataSetId, callback) { + var postBody = null; + + // verify the required parameter 'dataSetId' is set + if (dataSetId == undefined || dataSetId == null) { + throw "Missing the required parameter 'dataSetId' when calling deleteDataSet"; + } + + + var pathParams = { + 'dataSetId': dataSetId + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['oauth2schema']; + var contentTypes = ['application/json']; + var accepts = ['application/json;charset=UTF-8']; + var returnType = DataSetResponse; + + return this.apiClient.callApi( + '/template-processor/merge/0.1/datasets/{dataSetId}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } + + /** + * Callback function to receive the result of the deleteJob operation. + * @callback module:SphereonTemplateProcessor/api/MergeApi~deleteJobCallback + * @param {String} error Error message, if any. + * @param {module:SphereonTemplateProcessor/model/MergeJobResponse} data The data returned by the service call. + * @param {String} response The complete HTTP response. + */ + + /** + * Delete a job manually + * Delete the merge job and all related files + * @param {String} jobId jobId + * @param {module:SphereonTemplateProcessor/api/MergeApi~deleteJobCallback} callback The callback function, accepting three arguments: error, data, response + * data is of type: {@link module:SphereonTemplateProcessor/model/MergeJobResponse} + */ + this.deleteJob = function(jobId, callback) { + var postBody = null; + + // verify the required parameter 'jobId' is set + if (jobId == undefined || jobId == null) { + throw "Missing the required parameter 'jobId' when calling deleteJob"; + } + + + var pathParams = { + 'jobId': jobId + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['oauth2schema']; + var contentTypes = ['application/json']; + var accepts = ['application/json;charset=UTF-8']; + var returnType = MergeJobResponse; + + return this.apiClient.callApi( + '/template-processor/merge/0.1/jobs/{jobId}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } + + /** + * Callback function to receive the result of the deleteTemplateContext operation. + * @callback module:SphereonTemplateProcessor/api/MergeApi~deleteTemplateContextCallback + * @param {String} error Error message, if any. + * @param {module:SphereonTemplateProcessor/model/TemplateContextResponse} data The data returned by the service call. + * @param {String} response The complete HTTP response. + */ + + /** + * Delete template context + * Delete a template context with all history + * @param {String} templateId templateId + * @param {module:SphereonTemplateProcessor/api/MergeApi~deleteTemplateContextCallback} callback The callback function, accepting three arguments: error, data, response + * data is of type: {@link module:SphereonTemplateProcessor/model/TemplateContextResponse} + */ + this.deleteTemplateContext = function(templateId, callback) { + var postBody = null; + + // verify the required parameter 'templateId' is set + if (templateId == undefined || templateId == null) { + throw "Missing the required parameter 'templateId' when calling deleteTemplateContext"; + } + + + var pathParams = { + 'templateId': templateId + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['oauth2schema']; + var contentTypes = ['application/json']; + var accepts = ['application/json;charset=UTF-8']; + var returnType = TemplateContextResponse; + + return this.apiClient.callApi( + '/template-processor/merge/0.1/templates/{templateId}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } + + /** + * Callback function to receive the result of the getJob operation. + * @callback module:SphereonTemplateProcessor/api/MergeApi~getJobCallback + * @param {String} error Error message, if any. + * @param {module:SphereonTemplateProcessor/model/MergeJobResponse} data The data returned by the service call. + * @param {String} response The complete HTTP response. + */ + + /** + * Job definition and state + * Get the merge job definition and current state. Please not that you can differentiate based on http response status + * @param {String} jobId jobId + * @param {module:SphereonTemplateProcessor/api/MergeApi~getJobCallback} callback The callback function, accepting three arguments: error, data, response + * data is of type: {@link module:SphereonTemplateProcessor/model/MergeJobResponse} + */ + this.getJob = function(jobId, callback) { + var postBody = null; + + // verify the required parameter 'jobId' is set + if (jobId == undefined || jobId == null) { + throw "Missing the required parameter 'jobId' when calling getJob"; + } + + + var pathParams = { + 'jobId': jobId + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['oauth2schema']; + var contentTypes = ['application/json']; + var accepts = ['application/json;charset=UTF-8']; + var returnType = MergeJobResponse; + + return this.apiClient.callApi( + '/template-processor/merge/0.1/jobs/{jobId}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } + + /** + * Callback function to receive the result of the getJobs operation. + * @callback module:SphereonTemplateProcessor/api/MergeApi~getJobsCallback + * @param {String} error Error message, if any. + * @param {Array.} data The data returned by the service call. + * @param {String} response The complete HTTP response. + */ + + /** + * Get all jobs + * Get all office text job definitions and their current state. + * @param {Object} opts Optional parameters + * @param {Array.} opts.status A list of status to filter on. + * @param {module:SphereonTemplateProcessor/api/MergeApi~getJobsCallback} callback The callback function, accepting three arguments: error, data, response + * data is of type: {@link Array.} + */ + this.getJobs = function(opts, callback) { + opts = opts || {}; + var postBody = null; + + + var pathParams = { + }; + var queryParams = { + 'status': this.apiClient.buildCollectionParam(opts['status'], 'multi') + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['oauth2schema']; + var contentTypes = ['application/json']; + var accepts = ['application/json;charset=UTF-8']; + var returnType = [MergeJobResponse]; + + return this.apiClient.callApi( + '/template-processor/merge/0.1/jobs', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } + + /** + * Callback function to receive the result of the getResultStreamById operation. + * @callback module:SphereonTemplateProcessor/api/MergeApi~getResultStreamByIdCallback + * @param {String} error Error message, if any. + * @param {'String'} data The data returned by the service call. + * @param {String} response The complete HTTP response. + */ + + /** + * Get the result file + * Get a merge result document as a binary stream. + * @param {String} jobId jobId + * @param {String} streamId streamId + * @param {Object} opts Optional parameters + * @param {module:SphereonTemplateProcessor/model/OutputSettings} opts.outputSettings outputSettings + * @param {module:SphereonTemplateProcessor/api/MergeApi~getResultStreamByIdCallback} callback The callback function, accepting three arguments: error, data, response + * data is of type: {@link 'String'} + */ + this.getResultStreamById = function(jobId, streamId, opts, callback) { + opts = opts || {}; + var postBody = opts['outputSettings']; + + // verify the required parameter 'jobId' is set + if (jobId == undefined || jobId == null) { + throw "Missing the required parameter 'jobId' when calling getResultStreamById"; + } + + // verify the required parameter 'streamId' is set + if (streamId == undefined || streamId == null) { + throw "Missing the required parameter 'streamId' when calling getResultStreamById"; + } + + + var pathParams = { + 'jobId': jobId, + 'streamId': streamId + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['oauth2schema']; + var contentTypes = ['application/json;charset=UTF-8']; + var accepts = ['application/octet-stream']; + var returnType = 'String'; + + return this.apiClient.callApi( + '/template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } + + /** + * Callback function to receive the result of the getResultStreamsAsContainer operation. + * @callback module:SphereonTemplateProcessor/api/MergeApi~getResultStreamsAsContainerCallback + * @param {String} error Error message, if any. + * @param {'String'} data The data returned by the service call. + * @param {String} response The complete HTTP response. + */ + + /** + * Get the result file + * Get all documents inside a compressed container as a binary stream. + * @param {String} jobId jobId + * @param {Object} opts Optional parameters + * @param {module:SphereonTemplateProcessor/model/OutputSettings} opts.outputSettings outputSettings + * @param {module:SphereonTemplateProcessor/api/MergeApi~getResultStreamsAsContainerCallback} callback The callback function, accepting three arguments: error, data, response + * data is of type: {@link 'String'} + */ + this.getResultStreamsAsContainer = function(jobId, opts, callback) { + opts = opts || {}; + var postBody = opts['outputSettings']; + + // verify the required parameter 'jobId' is set + if (jobId == undefined || jobId == null) { + throw "Missing the required parameter 'jobId' when calling getResultStreamsAsContainer"; + } + + + var pathParams = { + 'jobId': jobId + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['oauth2schema']; + var contentTypes = ['application/json;charset=UTF-8']; + var accepts = ['application/octet-stream']; + var returnType = 'String'; + + return this.apiClient.callApi( + '/template-processor/merge/0.1/jobs/{jobId}/result/container', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } + + /** + * Callback function to receive the result of the getTemplateContext operation. + * @callback module:SphereonTemplateProcessor/api/MergeApi~getTemplateContextCallback + * @param {String} error Error message, if any. + * @param {module:SphereonTemplateProcessor/model/TemplateContextResponse} data The data returned by the service call. + * @param {String} response The complete HTTP response. + */ + + /** + * Get template context + * Get an existing template context + * @param {String} templateId The template context name unique for your environment + * @param {module:SphereonTemplateProcessor/api/MergeApi~getTemplateContextCallback} callback The callback function, accepting three arguments: error, data, response + * data is of type: {@link module:SphereonTemplateProcessor/model/TemplateContextResponse} + */ + this.getTemplateContext = function(templateId, callback) { + var postBody = null; + + // verify the required parameter 'templateId' is set + if (templateId == undefined || templateId == null) { + throw "Missing the required parameter 'templateId' when calling getTemplateContext"; + } + + + var pathParams = { + 'templateId': templateId + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['oauth2schema']; + var contentTypes = ['application/json']; + var accepts = ['application/json;charset=UTF-8']; + var returnType = TemplateContextResponse; + + return this.apiClient.callApi( + '/template-processor/merge/0.1/templates/{templateId}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } + + /** + * Callback function to receive the result of the submitJob operation. + * @callback module:SphereonTemplateProcessor/api/MergeApi~submitJobCallback + * @param {String} error Error message, if any. + * @param {module:SphereonTemplateProcessor/model/MergeJobResponse} data The data returned by the service call. + * @param {String} response The complete HTTP response. + */ + + /** + * Submit merge job for processing + * Submit merge job run. + * @param {module:SphereonTemplateProcessor/model/MergeSettings} mergesettings The merge- and output settings + * @param {module:SphereonTemplateProcessor/api/MergeApi~submitJobCallback} callback The callback function, accepting three arguments: error, data, response + * data is of type: {@link module:SphereonTemplateProcessor/model/MergeJobResponse} + */ + this.submitJob = function(mergesettings, callback) { + var postBody = mergesettings; + + // verify the required parameter 'mergesettings' is set + if (mergesettings == undefined || mergesettings == null) { + throw "Missing the required parameter 'mergesettings' when calling submitJob"; + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['oauth2schema']; + var contentTypes = ['application/json;charset=UTF-8']; + var accepts = ['application/json;charset=UTF-8']; + var returnType = MergeJobResponse; + + return this.apiClient.callApi( + '/template-processor/merge/0.1/jobs', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } + + /** + * Callback function to receive the result of the updateTemplateContext operation. + * @callback module:SphereonTemplateProcessor/api/MergeApi~updateTemplateContextCallback + * @param {String} error Error message, if any. + * @param {module:SphereonTemplateProcessor/model/TemplateContextResponse} data The data returned by the service call. + * @param {String} response The complete HTTP response. + */ + + /** + * Update template context + * Update an existing template context for your environment + * @param {module:SphereonTemplateProcessor/model/TemplateContextRequest} templateContextRequest templateContextRequest + * @param {module:SphereonTemplateProcessor/api/MergeApi~updateTemplateContextCallback} callback The callback function, accepting three arguments: error, data, response + * data is of type: {@link module:SphereonTemplateProcessor/model/TemplateContextResponse} + */ + this.updateTemplateContext = function(templateContextRequest, callback) { + var postBody = templateContextRequest; + + // verify the required parameter 'templateContextRequest' is set + if (templateContextRequest == undefined || templateContextRequest == null) { + throw "Missing the required parameter 'templateContextRequest' when calling updateTemplateContext"; + } + + + var pathParams = { + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['oauth2schema']; + var contentTypes = ['application/json;charset=UTF-8']; + var accepts = ['application/json;charset=UTF-8']; + var returnType = TemplateContextResponse; + + return this.apiClient.callApi( + '/template-processor/merge/0.1/templates', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } + + /** + * Callback function to receive the result of the uploadTemplateFile operation. + * @callback module:SphereonTemplateProcessor/api/MergeApi~uploadTemplateFileCallback + * @param {String} error Error message, if any. + * @param {module:SphereonTemplateProcessor/model/TemplateContextResponse} data The data returned by the service call. + * @param {String} response The complete HTTP response. + */ + + /** + * Upload template file + * Upload the Office template file + * @param {String} templateId The template context name unique for your environment + * @param {File} stream The template (file/inputstream) to store + * @param {module:SphereonTemplateProcessor/api/MergeApi~uploadTemplateFileCallback} callback The callback function, accepting three arguments: error, data, response + * data is of type: {@link module:SphereonTemplateProcessor/model/TemplateContextResponse} + */ + this.uploadTemplateFile = function(templateId, stream, callback) { + var postBody = null; + + // verify the required parameter 'templateId' is set + if (templateId == undefined || templateId == null) { + throw "Missing the required parameter 'templateId' when calling uploadTemplateFile"; + } + + // verify the required parameter 'stream' is set + if (stream == undefined || stream == null) { + throw "Missing the required parameter 'stream' when calling uploadTemplateFile"; + } + + + var pathParams = { + 'templateId': templateId + }; + var queryParams = { + }; + var headerParams = { + }; + var formParams = { + 'stream': stream + }; + + var authNames = ['oauth2schema']; + var contentTypes = ['multipart/form-data']; + var accepts = ['application/json;charset=UTF-8']; + var returnType = TemplateContextResponse; + + return this.apiClient.callApi( + '/template-processor/merge/0.1/templates/{templateId}', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } + }; + + return exports; +})); diff --git a/javascript/src/SphereonTemplateProcessor/index.js b/javascript/src/SphereonTemplateProcessor/index.js new file mode 100644 index 0000000..24da7b3 --- /dev/null +++ b/javascript/src/SphereonTemplateProcessor/index.js @@ -0,0 +1,146 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['SphereonTemplateProcessor/ApiClient', 'SphereonTemplateProcessor/model/DataSetResponse', 'SphereonTemplateProcessor/model/Error', 'SphereonTemplateProcessor/model/ErrorResponse', 'SphereonTemplateProcessor/model/Lifecycle', 'SphereonTemplateProcessor/model/MergeJob', 'SphereonTemplateProcessor/model/MergeJobResponse', 'SphereonTemplateProcessor/model/MergeSettings', 'SphereonTemplateProcessor/model/OutputSettings', 'SphereonTemplateProcessor/model/OwnerInfo', 'SphereonTemplateProcessor/model/StreamLocation', 'SphereonTemplateProcessor/model/TemplateContext', 'SphereonTemplateProcessor/model/TemplateContextRequest', 'SphereonTemplateProcessor/model/TemplateContextResponse', 'SphereonTemplateProcessor/api/MergeApi'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('./ApiClient'), require('./model/DataSetResponse'), require('./model/Error'), require('./model/ErrorResponse'), require('./model/Lifecycle'), require('./model/MergeJob'), require('./model/MergeJobResponse'), require('./model/MergeSettings'), require('./model/OutputSettings'), require('./model/OwnerInfo'), require('./model/StreamLocation'), require('./model/TemplateContext'), require('./model/TemplateContextRequest'), require('./model/TemplateContextResponse'), require('./api/MergeApi')); + } +}(function(ApiClient, DataSetResponse, Error, ErrorResponse, Lifecycle, MergeJob, MergeJobResponse, MergeSettings, OutputSettings, OwnerInfo, StreamLocation, TemplateContext, TemplateContextRequest, TemplateContextResponse, MergeApi) { + 'use strict'; + + /** + * bThe_Office_Text_API_can_generate_office_documents_from_a_template_and_a_JSON_data_filebThe_flow_is_generally_as_followsbInteractive_testing_bA_web_based_test_console_is_available_in_the_a_hrefhttpsstore_sphereon_comSphereon_API_Storea.
+ * The index module provides access to constructors for all the classes which comprise the public API. + *

+ * An AMD (recommended!) or CommonJS application will generally do something equivalent to the following: + *

+   * var OfficeTextMerge = require('SphereonTemplateProcessor/index'); // See note below*.
+   * var xxxSvc = new OfficeTextMerge.XxxApi(); // Allocate the API class we're going to use.
+   * var yyyModel = new OfficeTextMerge.Yyy(); // Construct a model instance.
+   * yyyModel.someProperty = 'someValue';
+   * ...
+   * var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
+   * ...
+   * 
+ * *NOTE: For a top-level AMD script, use require(['SphereonTemplateProcessor/index'], function(){...}) + * and put the application logic within the callback function. + *

+ *

+ * A non-AMD browser application (discouraged) might do something like this: + *

+   * var xxxSvc = new OfficeTextMerge.XxxApi(); // Allocate the API class we're going to use.
+   * var yyy = new OfficeTextMerge.Yyy(); // Construct a model instance.
+   * yyyModel.someProperty = 'someValue';
+   * ...
+   * var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
+   * ...
+   * 
+ *

+ * @module SphereonTemplateProcessor/index + * @version 0.1 + */ + var exports = { + /** + * The ApiClient constructor. + * @property {module:SphereonTemplateProcessor/ApiClient} + */ + ApiClient: ApiClient, + /** + * The DataSetResponse model constructor. + * @property {module:SphereonTemplateProcessor/model/DataSetResponse} + */ + DataSetResponse: DataSetResponse, + /** + * The Error model constructor. + * @property {module:SphereonTemplateProcessor/model/Error} + */ + Error: Error, + /** + * The ErrorResponse model constructor. + * @property {module:SphereonTemplateProcessor/model/ErrorResponse} + */ + ErrorResponse: ErrorResponse, + /** + * The Lifecycle model constructor. + * @property {module:SphereonTemplateProcessor/model/Lifecycle} + */ + Lifecycle: Lifecycle, + /** + * The MergeJob model constructor. + * @property {module:SphereonTemplateProcessor/model/MergeJob} + */ + MergeJob: MergeJob, + /** + * The MergeJobResponse model constructor. + * @property {module:SphereonTemplateProcessor/model/MergeJobResponse} + */ + MergeJobResponse: MergeJobResponse, + /** + * The MergeSettings model constructor. + * @property {module:SphereonTemplateProcessor/model/MergeSettings} + */ + MergeSettings: MergeSettings, + /** + * The OutputSettings model constructor. + * @property {module:SphereonTemplateProcessor/model/OutputSettings} + */ + OutputSettings: OutputSettings, + /** + * The OwnerInfo model constructor. + * @property {module:SphereonTemplateProcessor/model/OwnerInfo} + */ + OwnerInfo: OwnerInfo, + /** + * The StreamLocation model constructor. + * @property {module:SphereonTemplateProcessor/model/StreamLocation} + */ + StreamLocation: StreamLocation, + /** + * The TemplateContext model constructor. + * @property {module:SphereonTemplateProcessor/model/TemplateContext} + */ + TemplateContext: TemplateContext, + /** + * The TemplateContextRequest model constructor. + * @property {module:SphereonTemplateProcessor/model/TemplateContextRequest} + */ + TemplateContextRequest: TemplateContextRequest, + /** + * The TemplateContextResponse model constructor. + * @property {module:SphereonTemplateProcessor/model/TemplateContextResponse} + */ + TemplateContextResponse: TemplateContextResponse, + /** + * The MergeApi service constructor. + * @property {module:SphereonTemplateProcessor/api/MergeApi} + */ + MergeApi: MergeApi + }; + + return exports; +})); diff --git a/javascript/src/SphereonTemplateProcessor/model/DataSetResponse.js b/javascript/src/SphereonTemplateProcessor/model/DataSetResponse.js new file mode 100644 index 0000000..472a0f2 --- /dev/null +++ b/javascript/src/SphereonTemplateProcessor/model/DataSetResponse.js @@ -0,0 +1,143 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['SphereonTemplateProcessor/ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.OfficeTextMerge) { + root.OfficeTextMerge = {}; + } + root.OfficeTextMerge.DataSetResponse = factory(root.OfficeTextMerge.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + + /** + * The DataSetResponse model module. + * @module SphereonTemplateProcessor/model/DataSetResponse + * @version 0.1 + */ + + /** + * Constructs a new DataSetResponse. + * The merge template response. + * @alias module:SphereonTemplateProcessor/model/DataSetResponse + * @class + * @param id {String} Unique dataset id + * @param status {module:SphereonTemplateProcessor/model/DataSetResponse.StatusEnum} The status of the template + */ + var exports = function(id, status) { + var _this = this; + + + + _this['id'] = id; + _this['status'] = status; + }; + + /** + * Constructs a DataSetResponse from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:SphereonTemplateProcessor/model/DataSetResponse} obj Optional instance to populate. + * @return {module:SphereonTemplateProcessor/model/DataSetResponse} The populated DataSetResponse instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('completionTime')) { + obj['completionTime'] = ApiClient.convertToType(data['completionTime'], 'Date'); + } + if (data.hasOwnProperty('creationTime')) { + obj['creationTime'] = ApiClient.convertToType(data['creationTime'], 'Date'); + } + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('status')) { + obj['status'] = ApiClient.convertToType(data['status'], 'String'); + } + } + return obj; + } + + /** + * The completion date/time of this template in ISO 8601 format + * @member {Date} completionTime + */ + exports.prototype['completionTime'] = undefined; + /** + * The creation date/time of this template in ISO 8601 format + * @member {Date} creationTime + */ + exports.prototype['creationTime'] = undefined; + /** + * Unique dataset id + * @member {String} id + */ + exports.prototype['id'] = undefined; + /** + * The status of the template + * @member {module:SphereonTemplateProcessor/model/DataSetResponse.StatusEnum} status + */ + exports.prototype['status'] = undefined; + + + /** + * Allowed values for the status property. + * @enum {String} + * @readonly + */ + exports.StatusEnum = { + /** + * value: "CREATED" + * @const + */ + "CREATED": "CREATED", + /** + * value: "UPDATED" + * @const + */ + "UPDATED": "UPDATED", + /** + * value: "DELETED" + * @const + */ + "DELETED": "DELETED" }; + + + return exports; +})); + + diff --git a/javascript/src/SphereonTemplateProcessor/model/Error.js b/javascript/src/SphereonTemplateProcessor/model/Error.js new file mode 100644 index 0000000..1461155 --- /dev/null +++ b/javascript/src/SphereonTemplateProcessor/model/Error.js @@ -0,0 +1,140 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['SphereonTemplateProcessor/ApiClient', 'SphereonTemplateProcessor/model/Error'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('./Error')); + } else { + // Browser globals (root is window) + if (!root.OfficeTextMerge) { + root.OfficeTextMerge = {}; + } + root.OfficeTextMerge.Error = factory(root.OfficeTextMerge.ApiClient, root.OfficeTextMerge.Error); + } +}(this, function(ApiClient, Error) { + 'use strict'; + + + + + /** + * The Error model module. + * @module SphereonTemplateProcessor/model/Error + * @version 0.1 + */ + + /** + * Constructs a new Error. + * An error + * @alias module:SphereonTemplateProcessor/model/Error + * @class + * @param code {String} + * @param level {module:SphereonTemplateProcessor/model/Error.LevelEnum} + * @param message {String} + */ + var exports = function(code, level, message) { + var _this = this; + + _this['code'] = code; + _this['level'] = level; + + _this['message'] = message; + }; + + /** + * Constructs a Error from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:SphereonTemplateProcessor/model/Error} obj Optional instance to populate. + * @return {module:SphereonTemplateProcessor/model/Error} The populated Error instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('code')) { + obj['code'] = ApiClient.convertToType(data['code'], 'String'); + } + if (data.hasOwnProperty('level')) { + obj['level'] = ApiClient.convertToType(data['level'], 'String'); + } + if (data.hasOwnProperty('cause')) { + obj['cause'] = Error.constructFromObject(data['cause']); + } + if (data.hasOwnProperty('message')) { + obj['message'] = ApiClient.convertToType(data['message'], 'String'); + } + } + return obj; + } + + /** + * @member {String} code + */ + exports.prototype['code'] = undefined; + /** + * @member {module:SphereonTemplateProcessor/model/Error.LevelEnum} level + */ + exports.prototype['level'] = undefined; + /** + * @member {module:SphereonTemplateProcessor/model/Error} cause + */ + exports.prototype['cause'] = undefined; + /** + * @member {String} message + */ + exports.prototype['message'] = undefined; + + + /** + * Allowed values for the level property. + * @enum {String} + * @readonly + */ + exports.LevelEnum = { + /** + * value: "INFO" + * @const + */ + "INFO": "INFO", + /** + * value: "WARNING" + * @const + */ + "WARNING": "WARNING", + /** + * value: "FATAL" + * @const + */ + "FATAL": "FATAL" }; + + + return exports; +})); + + diff --git a/javascript/src/SphereonTemplateProcessor/model/ErrorResponse.js b/javascript/src/SphereonTemplateProcessor/model/ErrorResponse.js new file mode 100644 index 0000000..06303db --- /dev/null +++ b/javascript/src/SphereonTemplateProcessor/model/ErrorResponse.js @@ -0,0 +1,91 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['SphereonTemplateProcessor/ApiClient', 'SphereonTemplateProcessor/model/Error'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('./Error')); + } else { + // Browser globals (root is window) + if (!root.OfficeTextMerge) { + root.OfficeTextMerge = {}; + } + root.OfficeTextMerge.ErrorResponse = factory(root.OfficeTextMerge.ApiClient, root.OfficeTextMerge.Error); + } +}(this, function(ApiClient, Error) { + 'use strict'; + + + + + /** + * The ErrorResponse model module. + * @module SphereonTemplateProcessor/model/ErrorResponse + * @version 0.1 + */ + + /** + * Constructs a new ErrorResponse. + * The error response + * @alias module:SphereonTemplateProcessor/model/ErrorResponse + * @class + */ + var exports = function() { + var _this = this; + + + }; + + /** + * Constructs a ErrorResponse from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:SphereonTemplateProcessor/model/ErrorResponse} obj Optional instance to populate. + * @return {module:SphereonTemplateProcessor/model/ErrorResponse} The populated ErrorResponse instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('errors')) { + obj['errors'] = ApiClient.convertToType(data['errors'], [Error]); + } + } + return obj; + } + + /** + * @member {Array.} errors + */ + exports.prototype['errors'] = undefined; + + + + return exports; +})); + + diff --git a/javascript/src/SphereonTemplateProcessor/model/Lifecycle.js b/javascript/src/SphereonTemplateProcessor/model/Lifecycle.js new file mode 100644 index 0000000..2b33d12 --- /dev/null +++ b/javascript/src/SphereonTemplateProcessor/model/Lifecycle.js @@ -0,0 +1,137 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['SphereonTemplateProcessor/ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.OfficeTextMerge) { + root.OfficeTextMerge = {}; + } + root.OfficeTextMerge.Lifecycle = factory(root.OfficeTextMerge.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + + /** + * The Lifecycle model module. + * @module SphereonTemplateProcessor/model/Lifecycle + * @version 0.1 + */ + + /** + * Constructs a new Lifecycle. + * Lifecycle settings. When no lifecycle settings are supplied, the job and files will be deleted directly after retrieval of the file + * @alias module:SphereonTemplateProcessor/model/Lifecycle + * @class + */ + var exports = function() { + var _this = this; + + + + + }; + + /** + * Constructs a Lifecycle from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:SphereonTemplateProcessor/model/Lifecycle} obj Optional instance to populate. + * @return {module:SphereonTemplateProcessor/model/Lifecycle} The populated Lifecycle instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('actionTime')) { + obj['actionTime'] = ApiClient.convertToType(data['actionTime'], 'Date'); + } + if (data.hasOwnProperty('action')) { + obj['action'] = ApiClient.convertToType(data['action'], 'String'); + } + if (data.hasOwnProperty('type')) { + obj['type'] = ApiClient.convertToType(data['type'], 'String'); + } + } + return obj; + } + + /** + * The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation + * @member {Date} actionTime + */ + exports.prototype['actionTime'] = undefined; + /** + * @member {module:SphereonTemplateProcessor/model/Lifecycle.ActionEnum} action + */ + exports.prototype['action'] = undefined; + /** + * @member {module:SphereonTemplateProcessor/model/Lifecycle.TypeEnum} type + */ + exports.prototype['type'] = undefined; + + + /** + * Allowed values for the action property. + * @enum {String} + * @readonly + */ + exports.ActionEnum = { + /** + * value: "DELETE" + * @const + */ + "DELETE": "DELETE" }; + + /** + * Allowed values for the type property. + * @enum {String} + * @readonly + */ + exports.TypeEnum = { + /** + * value: "RETRIEVAL" + * @const + */ + "RETRIEVAL": "RETRIEVAL", + /** + * value: "TIME" + * @const + */ + "TIME": "TIME" }; + + + return exports; +})); + + diff --git a/javascript/src/SphereonTemplateProcessor/model/MergeJob.js b/javascript/src/SphereonTemplateProcessor/model/MergeJob.js new file mode 100644 index 0000000..548b3a5 --- /dev/null +++ b/javascript/src/SphereonTemplateProcessor/model/MergeJob.js @@ -0,0 +1,221 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['SphereonTemplateProcessor/ApiClient', 'SphereonTemplateProcessor/model/MergeSettings', 'SphereonTemplateProcessor/model/StreamLocation'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('./MergeSettings'), require('./StreamLocation')); + } else { + // Browser globals (root is window) + if (!root.OfficeTextMerge) { + root.OfficeTextMerge = {}; + } + root.OfficeTextMerge.MergeJob = factory(root.OfficeTextMerge.ApiClient, root.OfficeTextMerge.MergeSettings, root.OfficeTextMerge.StreamLocation); + } +}(this, function(ApiClient, MergeSettings, StreamLocation) { + 'use strict'; + + + + + /** + * The MergeJob model module. + * @module SphereonTemplateProcessor/model/MergeJob + * @version 0.1 + */ + + /** + * Constructs a new MergeJob. + * The merge job. Has access to the job merge data. + * @alias module:SphereonTemplateProcessor/model/MergeJob + * @class + * @param jobId {String} The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation + * @param resultStreams {Array.} The storage locations of the result files. + * @param status {module:SphereonTemplateProcessor/model/MergeJob.StatusEnum} The status of the job + */ + var exports = function(jobId, resultStreams, status) { + var _this = this; + + + + _this['jobId'] = jobId; + + + + _this['resultStreams'] = resultStreams; + + + + _this['status'] = status; + }; + + /** + * Constructs a MergeJob from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:SphereonTemplateProcessor/model/MergeJob} obj Optional instance to populate. + * @return {module:SphereonTemplateProcessor/model/MergeJob} The populated MergeJob instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('resultFolderPath')) { + obj['resultFolderPath'] = ApiClient.convertToType(data['resultFolderPath'], 'String'); + } + if (data.hasOwnProperty('completionTime')) { + obj['completionTime'] = ApiClient.convertToType(data['completionTime'], 'Date'); + } + if (data.hasOwnProperty('jobId')) { + obj['jobId'] = ApiClient.convertToType(data['jobId'], 'String'); + } + if (data.hasOwnProperty('resultContainerId')) { + obj['resultContainerId'] = ApiClient.convertToType(data['resultContainerId'], 'String'); + } + if (data.hasOwnProperty('creationTime')) { + obj['creationTime'] = ApiClient.convertToType(data['creationTime'], 'Date'); + } + if (data.hasOwnProperty('dataSetId')) { + obj['dataSetId'] = ApiClient.convertToType(data['dataSetId'], 'String'); + } + if (data.hasOwnProperty('resultStreams')) { + obj['resultStreams'] = ApiClient.convertToType(data['resultStreams'], [StreamLocation]); + } + if (data.hasOwnProperty('headerDataSetIds')) { + obj['headerDataSetIds'] = ApiClient.convertToType(data['headerDataSetIds'], ['String']); + } + if (data.hasOwnProperty('mergeSettings')) { + obj['mergeSettings'] = MergeSettings.constructFromObject(data['mergeSettings']); + } + if (data.hasOwnProperty('statusMessage')) { + obj['statusMessage'] = ApiClient.convertToType(data['statusMessage'], 'String'); + } + if (data.hasOwnProperty('status')) { + obj['status'] = ApiClient.convertToType(data['status'], 'String'); + } + } + return obj; + } + + /** + * The target folder path of result files + * @member {String} resultFolderPath + */ + exports.prototype['resultFolderPath'] = undefined; + /** + * The completion date/time of this job in ISO 8601 format + * @member {Date} completionTime + */ + exports.prototype['completionTime'] = undefined; + /** + * The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation + * @member {String} jobId + */ + exports.prototype['jobId'] = undefined; + /** + * The target container id of result files + * @member {String} resultContainerId + */ + exports.prototype['resultContainerId'] = undefined; + /** + * The creation date/time of this job in ISO 8601 format + * @member {Date} creationTime + */ + exports.prototype['creationTime'] = undefined; + /** + * Data set id + * @member {String} dataSetId + */ + exports.prototype['dataSetId'] = undefined; + /** + * The storage locations of the result files. + * @member {Array.} resultStreams + */ + exports.prototype['resultStreams'] = undefined; + /** + * Header data set ids + * @member {Array.} headerDataSetIds + */ + exports.prototype['headerDataSetIds'] = undefined; + /** + * @member {module:SphereonTemplateProcessor/model/MergeSettings} mergeSettings + */ + exports.prototype['mergeSettings'] = undefined; + /** + * A status message, which can be informational, warning or error. A message here does not indicate an error perse + * @member {String} statusMessage + */ + exports.prototype['statusMessage'] = undefined; + /** + * The status of the job + * @member {module:SphereonTemplateProcessor/model/MergeJob.StatusEnum} status + */ + exports.prototype['status'] = undefined; + + + /** + * Allowed values for the status property. + * @enum {String} + * @readonly + */ + exports.StatusEnum = { + /** + * value: "CREATED" + * @const + */ + "CREATED": "CREATED", + /** + * value: "UPDATED" + * @const + */ + "UPDATED": "UPDATED", + /** + * value: "PROCESSING" + * @const + */ + "PROCESSING": "PROCESSING", + /** + * value: "DONE" + * @const + */ + "DONE": "DONE", + /** + * value: "ERROR" + * @const + */ + "ERROR": "ERROR", + /** + * value: "DELETED" + * @const + */ + "DELETED": "DELETED" }; + + + return exports; +})); + + diff --git a/javascript/src/SphereonTemplateProcessor/model/MergeJobResponse.js b/javascript/src/SphereonTemplateProcessor/model/MergeJobResponse.js new file mode 100644 index 0000000..1bc9763 --- /dev/null +++ b/javascript/src/SphereonTemplateProcessor/model/MergeJobResponse.js @@ -0,0 +1,157 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['SphereonTemplateProcessor/ApiClient', 'SphereonTemplateProcessor/model/MergeJob'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('./MergeJob')); + } else { + // Browser globals (root is window) + if (!root.OfficeTextMerge) { + root.OfficeTextMerge = {}; + } + root.OfficeTextMerge.MergeJobResponse = factory(root.OfficeTextMerge.ApiClient, root.OfficeTextMerge.MergeJob); + } +}(this, function(ApiClient, MergeJob) { + 'use strict'; + + + + + /** + * The MergeJobResponse model module. + * @module SphereonTemplateProcessor/model/MergeJobResponse + * @version 0.1 + */ + + /** + * Constructs a new MergeJobResponse. + * The merge job response. + * @alias module:SphereonTemplateProcessor/model/MergeJobResponse + * @class + * @param jobId {String} The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation + * @param status {module:SphereonTemplateProcessor/model/MergeJobResponse.StatusEnum} The status of the job + */ + var exports = function(jobId, status) { + var _this = this; + + _this['jobId'] = jobId; + + + _this['status'] = status; + }; + + /** + * Constructs a MergeJobResponse from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:SphereonTemplateProcessor/model/MergeJobResponse} obj Optional instance to populate. + * @return {module:SphereonTemplateProcessor/model/MergeJobResponse} The populated MergeJobResponse instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('jobId')) { + obj['jobId'] = ApiClient.convertToType(data['jobId'], 'String'); + } + if (data.hasOwnProperty('job')) { + obj['job'] = MergeJob.constructFromObject(data['job']); + } + if (data.hasOwnProperty('statusMessage')) { + obj['statusMessage'] = ApiClient.convertToType(data['statusMessage'], 'String'); + } + if (data.hasOwnProperty('status')) { + obj['status'] = ApiClient.convertToType(data['status'], 'String'); + } + } + return obj; + } + + /** + * The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation + * @member {String} jobId + */ + exports.prototype['jobId'] = undefined; + /** + * @member {module:SphereonTemplateProcessor/model/MergeJob} job + */ + exports.prototype['job'] = undefined; + /** + * A status message, which can be informational, warning or error. AA message here does not indicate an error perse + * @member {String} statusMessage + */ + exports.prototype['statusMessage'] = undefined; + /** + * The status of the job + * @member {module:SphereonTemplateProcessor/model/MergeJobResponse.StatusEnum} status + */ + exports.prototype['status'] = undefined; + + + /** + * Allowed values for the status property. + * @enum {String} + * @readonly + */ + exports.StatusEnum = { + /** + * value: "CREATED" + * @const + */ + "CREATED": "CREATED", + /** + * value: "UPDATED" + * @const + */ + "UPDATED": "UPDATED", + /** + * value: "PROCESSING" + * @const + */ + "PROCESSING": "PROCESSING", + /** + * value: "DONE" + * @const + */ + "DONE": "DONE", + /** + * value: "ERROR" + * @const + */ + "ERROR": "ERROR", + /** + * value: "DELETED" + * @const + */ + "DELETED": "DELETED" }; + + + return exports; +})); + + diff --git a/javascript/src/SphereonTemplateProcessor/model/MergeSettings.js b/javascript/src/SphereonTemplateProcessor/model/MergeSettings.js new file mode 100644 index 0000000..1b59185 --- /dev/null +++ b/javascript/src/SphereonTemplateProcessor/model/MergeSettings.js @@ -0,0 +1,198 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['SphereonTemplateProcessor/ApiClient', 'SphereonTemplateProcessor/model/Lifecycle', 'SphereonTemplateProcessor/model/OutputSettings', 'SphereonTemplateProcessor/model/StreamLocation'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('./Lifecycle'), require('./OutputSettings'), require('./StreamLocation')); + } else { + // Browser globals (root is window) + if (!root.OfficeTextMerge) { + root.OfficeTextMerge = {}; + } + root.OfficeTextMerge.MergeSettings = factory(root.OfficeTextMerge.ApiClient, root.OfficeTextMerge.Lifecycle, root.OfficeTextMerge.OutputSettings, root.OfficeTextMerge.StreamLocation); + } +}(this, function(ApiClient, Lifecycle, OutputSettings, StreamLocation) { + 'use strict'; + + + + + /** + * The MergeSettings model module. + * @module SphereonTemplateProcessor/model/MergeSettings + * @version 0.1 + */ + + /** + * Constructs a new MergeSettings. + * Merge settings + * @alias module:SphereonTemplateProcessor/model/MergeSettings + * @class + * @param dataSetId {String} Data set id + * @param resultStreamLocation {module:SphereonTemplateProcessor/model/StreamLocation} The output location of the result files. + * @param templateId {String} Template id + * @param outputSettings {module:SphereonTemplateProcessor/model/OutputSettings} + */ + var exports = function(dataSetId, resultStreamLocation, templateId, outputSettings) { + var _this = this; + + + + _this['dataSetId'] = dataSetId; + + + + _this['resultStreamLocation'] = resultStreamLocation; + _this['templateId'] = templateId; + _this['outputSettings'] = outputSettings; + }; + + /** + * Constructs a MergeSettings from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:SphereonTemplateProcessor/model/MergeSettings} obj Optional instance to populate. + * @return {module:SphereonTemplateProcessor/model/MergeSettings} The populated MergeSettings instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('lifecycle')) { + obj['lifecycle'] = Lifecycle.constructFromObject(data['lifecycle']); + } + if (data.hasOwnProperty('mergeResult')) { + obj['mergeResult'] = ApiClient.convertToType(data['mergeResult'], 'String'); + } + if (data.hasOwnProperty('dataSetId')) { + obj['dataSetId'] = ApiClient.convertToType(data['dataSetId'], 'String'); + } + if (data.hasOwnProperty('engine')) { + obj['engine'] = ApiClient.convertToType(data['engine'], 'String'); + } + if (data.hasOwnProperty('headerDataSetIds')) { + obj['headerDataSetIds'] = ApiClient.convertToType(data['headerDataSetIds'], ['String']); + } + if (data.hasOwnProperty('templateVersion')) { + obj['templateVersion'] = ApiClient.convertToType(data['templateVersion'], 'Integer'); + } + if (data.hasOwnProperty('resultStreamLocation')) { + obj['resultStreamLocation'] = StreamLocation.constructFromObject(data['resultStreamLocation']); + } + if (data.hasOwnProperty('templateId')) { + obj['templateId'] = ApiClient.convertToType(data['templateId'], 'String'); + } + if (data.hasOwnProperty('outputSettings')) { + obj['outputSettings'] = OutputSettings.constructFromObject(data['outputSettings']); + } + } + return obj; + } + + /** + * @member {module:SphereonTemplateProcessor/model/Lifecycle} lifecycle + */ + exports.prototype['lifecycle'] = undefined; + /** + * @member {module:SphereonTemplateProcessor/model/MergeSettings.MergeResultEnum} mergeResult + */ + exports.prototype['mergeResult'] = undefined; + /** + * Data set id + * @member {String} dataSetId + */ + exports.prototype['dataSetId'] = undefined; + /** + * @member {module:SphereonTemplateProcessor/model/MergeSettings.EngineEnum} engine + */ + exports.prototype['engine'] = undefined; + /** + * optional header data set ids + * @member {Array.} headerDataSetIds + */ + exports.prototype['headerDataSetIds'] = undefined; + /** + * Template version + * @member {Integer} templateVersion + */ + exports.prototype['templateVersion'] = undefined; + /** + * The output location of the result files. + * @member {module:SphereonTemplateProcessor/model/StreamLocation} resultStreamLocation + */ + exports.prototype['resultStreamLocation'] = undefined; + /** + * Template id + * @member {String} templateId + */ + exports.prototype['templateId'] = undefined; + /** + * @member {module:SphereonTemplateProcessor/model/OutputSettings} outputSettings + */ + exports.prototype['outputSettings'] = undefined; + + + /** + * Allowed values for the mergeResult property. + * @enum {String} + * @readonly + */ + exports.MergeResultEnum = { + /** + * value: "SINGLE_FILE" + * @const + */ + "SINGLE_FILE": "SINGLE_FILE", + /** + * value: "SEPARATE_FILES" + * @const + */ + "SEPARATE_FILES": "SEPARATE_FILES" }; + + /** + * Allowed values for the engine property. + * @enum {String} + * @readonly + */ + exports.EngineEnum = { + /** + * value: "BASIC" + * @const + */ + "BASIC": "BASIC", + /** + * value: "PREMIUM" + * @const + */ + "PREMIUM": "PREMIUM" }; + + + return exports; +})); + + diff --git a/javascript/src/SphereonTemplateProcessor/model/OutputSettings.js b/javascript/src/SphereonTemplateProcessor/model/OutputSettings.js new file mode 100644 index 0000000..3c2e65f --- /dev/null +++ b/javascript/src/SphereonTemplateProcessor/model/OutputSettings.js @@ -0,0 +1,208 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['SphereonTemplateProcessor/ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.OfficeTextMerge) { + root.OfficeTextMerge = {}; + } + root.OfficeTextMerge.OutputSettings = factory(root.OfficeTextMerge.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + + /** + * The OutputSettings model module. + * @module SphereonTemplateProcessor/model/OutputSettings + * @version 0.1 + */ + + /** + * Constructs a new OutputSettings. + * Output settings + * @alias module:SphereonTemplateProcessor/model/OutputSettings + * @class + */ + var exports = function() { + var _this = this; + + + + }; + + /** + * Constructs a OutputSettings from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:SphereonTemplateProcessor/model/OutputSettings} obj Optional instance to populate. + * @return {module:SphereonTemplateProcessor/model/OutputSettings} The populated OutputSettings instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('deliveryFormat')) { + obj['deliveryFormat'] = ApiClient.convertToType(data['deliveryFormat'], 'String'); + } + if (data.hasOwnProperty('outputFormat')) { + obj['outputFormat'] = ApiClient.convertToType(data['outputFormat'], 'String'); + } + } + return obj; + } + + /** + * @member {module:SphereonTemplateProcessor/model/OutputSettings.DeliveryFormatEnum} deliveryFormat + */ + exports.prototype['deliveryFormat'] = undefined; + /** + * @member {module:SphereonTemplateProcessor/model/OutputSettings.OutputFormatEnum} outputFormat + */ + exports.prototype['outputFormat'] = undefined; + + + /** + * Allowed values for the deliveryFormat property. + * @enum {String} + * @readonly + */ + exports.DeliveryFormatEnum = { + /** + * value: "PLAIN" + * @const + */ + "PLAIN": "PLAIN", + /** + * value: "ZIP" + * @const + */ + "ZIP": "ZIP", + /** + * value: "_7ZIP" + * @const + */ + "_7ZIP": "_7ZIP" }; + + /** + * Allowed values for the outputFormat property. + * @enum {String} + * @readonly + */ + exports.OutputFormatEnum = { + /** + * value: "DOC" + * @const + */ + "DOC": "DOC", + /** + * value: "DOCX" + * @const + */ + "DOCX": "DOCX", + /** + * value: "RTF" + * @const + */ + "RTF": "RTF", + /** + * value: "PDF" + * @const + */ + "PDF": "PDF", + /** + * value: "XPS" + * @const + */ + "XPS": "XPS", + /** + * value: "SVG" + * @const + */ + "SVG": "SVG", + /** + * value: "HTML" + * @const + */ + "HTML": "HTML", + /** + * value: "ODT" + * @const + */ + "ODT": "ODT", + /** + * value: "TIFF" + * @const + */ + "TIFF": "TIFF", + /** + * value: "PNG" + * @const + */ + "PNG": "PNG", + /** + * value: "BMP" + * @const + */ + "BMP": "BMP", + /** + * value: "JPEG" + * @const + */ + "JPEG": "JPEG", + /** + * value: "TXT" + * @const + */ + "TXT": "TXT", + /** + * value: "XML" + * @const + */ + "XML": "XML", + /** + * value: "JSON" + * @const + */ + "JSON": "JSON", + /** + * value: "DEFAULT" + * @const + */ + "DEFAULT": "DEFAULT" }; + + + return exports; +})); + + diff --git a/javascript/src/SphereonTemplateProcessor/model/OwnerInfo.js b/javascript/src/SphereonTemplateProcessor/model/OwnerInfo.js new file mode 100644 index 0000000..06d5608 --- /dev/null +++ b/javascript/src/SphereonTemplateProcessor/model/OwnerInfo.js @@ -0,0 +1,119 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['SphereonTemplateProcessor/ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.OfficeTextMerge) { + root.OfficeTextMerge = {}; + } + root.OfficeTextMerge.OwnerInfo = factory(root.OfficeTextMerge.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + + /** + * The OwnerInfo model module. + * @module SphereonTemplateProcessor/model/OwnerInfo + * @version 0.1 + */ + + /** + * Constructs a new OwnerInfo. + * Owner info + * @alias module:SphereonTemplateProcessor/model/OwnerInfo + * @class + */ + var exports = function() { + var _this = this; + + + + + + }; + + /** + * Constructs a OwnerInfo from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:SphereonTemplateProcessor/model/OwnerInfo} obj Optional instance to populate. + * @return {module:SphereonTemplateProcessor/model/OwnerInfo} The populated OwnerInfo instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('phone')) { + obj['phone'] = ApiClient.convertToType(data['phone'], 'String'); + } + if (data.hasOwnProperty('companyDepartment')) { + obj['companyDepartment'] = ApiClient.convertToType(data['companyDepartment'], 'String'); + } + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + } + if (data.hasOwnProperty('email')) { + obj['email'] = ApiClient.convertToType(data['email'], 'String'); + } + } + return obj; + } + + /** + * The owner's phone number + * @member {String} phone + */ + exports.prototype['phone'] = undefined; + /** + * The owner's company/department + * @member {String} companyDepartment + */ + exports.prototype['companyDepartment'] = undefined; + /** + * The owner's name + * @member {String} name + */ + exports.prototype['name'] = undefined; + /** + * The owner's email address + * @member {String} email + */ + exports.prototype['email'] = undefined; + + + + return exports; +})); + + diff --git a/javascript/src/SphereonTemplateProcessor/model/StreamLocation.js b/javascript/src/SphereonTemplateProcessor/model/StreamLocation.js new file mode 100644 index 0000000..87124d9 --- /dev/null +++ b/javascript/src/SphereonTemplateProcessor/model/StreamLocation.js @@ -0,0 +1,115 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['SphereonTemplateProcessor/ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.OfficeTextMerge) { + root.OfficeTextMerge = {}; + } + root.OfficeTextMerge.StreamLocation = factory(root.OfficeTextMerge.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + + /** + * The StreamLocation model module. + * @module SphereonTemplateProcessor/model/StreamLocation + * @version 0.1 + */ + + /** + * Constructs a new StreamLocation. + * Location record of data stream + * @alias module:SphereonTemplateProcessor/model/StreamLocation + * @class + */ + var exports = function() { + var _this = this; + + + + + + }; + + /** + * Constructs a StreamLocation from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:SphereonTemplateProcessor/model/StreamLocation} obj Optional instance to populate. + * @return {module:SphereonTemplateProcessor/model/StreamLocation} The populated StreamLocation instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('folderPath')) { + obj['folderPath'] = ApiClient.convertToType(data['folderPath'], 'String'); + } + if (data.hasOwnProperty('originalFileName')) { + obj['originalFileName'] = ApiClient.convertToType(data['originalFileName'], 'String'); + } + if (data.hasOwnProperty('containerId')) { + obj['containerId'] = ApiClient.convertToType(data['containerId'], 'String'); + } + if (data.hasOwnProperty('fileId')) { + obj['fileId'] = ApiClient.convertToType(data['fileId'], 'String'); + } + } + return obj; + } + + /** + * @member {String} folderPath + */ + exports.prototype['folderPath'] = undefined; + /** + * @member {String} originalFileName + */ + exports.prototype['originalFileName'] = undefined; + /** + * @member {String} containerId + */ + exports.prototype['containerId'] = undefined; + /** + * @member {String} fileId + */ + exports.prototype['fileId'] = undefined; + + + + return exports; +})); + + diff --git a/javascript/src/SphereonTemplateProcessor/model/TemplateContext.js b/javascript/src/SphereonTemplateProcessor/model/TemplateContext.js new file mode 100644 index 0000000..3b8d58d --- /dev/null +++ b/javascript/src/SphereonTemplateProcessor/model/TemplateContext.js @@ -0,0 +1,151 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['SphereonTemplateProcessor/ApiClient', 'SphereonTemplateProcessor/model/OwnerInfo', 'SphereonTemplateProcessor/model/StreamLocation'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('./OwnerInfo'), require('./StreamLocation')); + } else { + // Browser globals (root is window) + if (!root.OfficeTextMerge) { + root.OfficeTextMerge = {}; + } + root.OfficeTextMerge.TemplateContext = factory(root.OfficeTextMerge.ApiClient, root.OfficeTextMerge.OwnerInfo, root.OfficeTextMerge.StreamLocation); + } +}(this, function(ApiClient, OwnerInfo, StreamLocation) { + 'use strict'; + + + + + /** + * The TemplateContext model module. + * @module SphereonTemplateProcessor/model/TemplateContext + * @version 0.1 + */ + + /** + * Constructs a new TemplateContext. + * @alias module:SphereonTemplateProcessor/model/TemplateContext + * @class + * @param templateType {module:SphereonTemplateProcessor/model/TemplateContext.TemplateTypeEnum} + */ + var exports = function(templateType) { + var _this = this; + + _this['templateType'] = templateType; + + + + + + }; + + /** + * Constructs a TemplateContext from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:SphereonTemplateProcessor/model/TemplateContext} obj Optional instance to populate. + * @return {module:SphereonTemplateProcessor/model/TemplateContext} The populated TemplateContext instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('templateType')) { + obj['templateType'] = ApiClient.convertToType(data['templateType'], 'String'); + } + if (data.hasOwnProperty('templateFileLocations')) { + obj['templateFileLocations'] = ApiClient.convertToType(data['templateFileLocations'], {'String': StreamLocation}); + } + if (data.hasOwnProperty('description')) { + obj['description'] = ApiClient.convertToType(data['description'], 'String'); + } + if (data.hasOwnProperty('ownerInfo')) { + obj['ownerInfo'] = OwnerInfo.constructFromObject(data['ownerInfo']); + } + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('templateId')) { + obj['templateId'] = ApiClient.convertToType(data['templateId'], 'String'); + } + } + return obj; + } + + /** + * @member {module:SphereonTemplateProcessor/model/TemplateContext.TemplateTypeEnum} templateType + */ + exports.prototype['templateType'] = undefined; + /** + * The template files (versioned) + * @member {Object.} templateFileLocations + */ + exports.prototype['templateFileLocations'] = undefined; + /** + * The template description + * @member {String} description + */ + exports.prototype['description'] = undefined; + /** + * @member {module:SphereonTemplateProcessor/model/OwnerInfo} ownerInfo + */ + exports.prototype['ownerInfo'] = undefined; + /** + * @member {String} id + */ + exports.prototype['id'] = undefined; + /** + * The template context id + * @member {String} templateId + */ + exports.prototype['templateId'] = undefined; + + + /** + * Allowed values for the templateType property. + * @enum {String} + * @readonly + */ + exports.TemplateTypeEnum = { + /** + * value: "OFFICE" + * @const + */ + "OFFICE": "OFFICE", + /** + * value: "FREEMARKER" + * @const + */ + "FREEMARKER": "FREEMARKER" }; + + + return exports; +})); + + diff --git a/javascript/src/SphereonTemplateProcessor/model/TemplateContextRequest.js b/javascript/src/SphereonTemplateProcessor/model/TemplateContextRequest.js new file mode 100644 index 0000000..9d490f0 --- /dev/null +++ b/javascript/src/SphereonTemplateProcessor/model/TemplateContextRequest.js @@ -0,0 +1,134 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['SphereonTemplateProcessor/ApiClient', 'SphereonTemplateProcessor/model/OwnerInfo'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('./OwnerInfo')); + } else { + // Browser globals (root is window) + if (!root.OfficeTextMerge) { + root.OfficeTextMerge = {}; + } + root.OfficeTextMerge.TemplateContextRequest = factory(root.OfficeTextMerge.ApiClient, root.OfficeTextMerge.OwnerInfo); + } +}(this, function(ApiClient, OwnerInfo) { + 'use strict'; + + + + + /** + * The TemplateContextRequest model module. + * @module SphereonTemplateProcessor/model/TemplateContextRequest + * @version 0.1 + */ + + /** + * Constructs a new TemplateContextRequest. + * The merge template request. + * @alias module:SphereonTemplateProcessor/model/TemplateContextRequest + * @class + * @param templateType {module:SphereonTemplateProcessor/model/TemplateContextRequest.TemplateTypeEnum} + */ + var exports = function(templateType) { + var _this = this; + + _this['templateType'] = templateType; + + + + }; + + /** + * Constructs a TemplateContextRequest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:SphereonTemplateProcessor/model/TemplateContextRequest} obj Optional instance to populate. + * @return {module:SphereonTemplateProcessor/model/TemplateContextRequest} The populated TemplateContextRequest instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('templateType')) { + obj['templateType'] = ApiClient.convertToType(data['templateType'], 'String'); + } + if (data.hasOwnProperty('description')) { + obj['description'] = ApiClient.convertToType(data['description'], 'String'); + } + if (data.hasOwnProperty('ownerInfo')) { + obj['ownerInfo'] = OwnerInfo.constructFromObject(data['ownerInfo']); + } + if (data.hasOwnProperty('templateId')) { + obj['templateId'] = ApiClient.convertToType(data['templateId'], 'String'); + } + } + return obj; + } + + /** + * @member {module:SphereonTemplateProcessor/model/TemplateContextRequest.TemplateTypeEnum} templateType + */ + exports.prototype['templateType'] = undefined; + /** + * @member {String} description + */ + exports.prototype['description'] = undefined; + /** + * @member {module:SphereonTemplateProcessor/model/OwnerInfo} ownerInfo + */ + exports.prototype['ownerInfo'] = undefined; + /** + * The template context id + * @member {String} templateId + */ + exports.prototype['templateId'] = undefined; + + + /** + * Allowed values for the templateType property. + * @enum {String} + * @readonly + */ + exports.TemplateTypeEnum = { + /** + * value: "OFFICE" + * @const + */ + "OFFICE": "OFFICE", + /** + * value: "FREEMARKER" + * @const + */ + "FREEMARKER": "FREEMARKER" }; + + + return exports; +})); + + diff --git a/javascript/src/SphereonTemplateProcessor/model/TemplateContextResponse.js b/javascript/src/SphereonTemplateProcessor/model/TemplateContextResponse.js new file mode 100644 index 0000000..d664abe --- /dev/null +++ b/javascript/src/SphereonTemplateProcessor/model/TemplateContextResponse.js @@ -0,0 +1,147 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['SphereonTemplateProcessor/ApiClient', 'SphereonTemplateProcessor/model/TemplateContext'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('./TemplateContext')); + } else { + // Browser globals (root is window) + if (!root.OfficeTextMerge) { + root.OfficeTextMerge = {}; + } + root.OfficeTextMerge.TemplateContextResponse = factory(root.OfficeTextMerge.ApiClient, root.OfficeTextMerge.TemplateContext); + } +}(this, function(ApiClient, TemplateContext) { + 'use strict'; + + + + + /** + * The TemplateContextResponse model module. + * @module SphereonTemplateProcessor/model/TemplateContextResponse + * @version 0.1 + */ + + /** + * Constructs a new TemplateContextResponse. + * The merge template response. + * @alias module:SphereonTemplateProcessor/model/TemplateContextResponse + * @class + * @param id {String} Unique template context id + * @param status {module:SphereonTemplateProcessor/model/TemplateContextResponse.StatusEnum} The status of the template + */ + var exports = function(id, status) { + var _this = this; + + + + _this['id'] = id; + _this['status'] = status; + }; + + /** + * Constructs a TemplateContextResponse from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:SphereonTemplateProcessor/model/TemplateContextResponse} obj Optional instance to populate. + * @return {module:SphereonTemplateProcessor/model/TemplateContextResponse} The populated TemplateContextResponse instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('creationTime')) { + obj['creationTime'] = ApiClient.convertToType(data['creationTime'], 'Date'); + } + if (data.hasOwnProperty('context')) { + obj['context'] = TemplateContext.constructFromObject(data['context']); + } + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('status')) { + obj['status'] = ApiClient.convertToType(data['status'], 'String'); + } + } + return obj; + } + + /** + * The creation date/time of this response in ISO 8601 format + * @member {Date} creationTime + */ + exports.prototype['creationTime'] = undefined; + /** + * @member {module:SphereonTemplateProcessor/model/TemplateContext} context + */ + exports.prototype['context'] = undefined; + /** + * Unique template context id + * @member {String} id + */ + exports.prototype['id'] = undefined; + /** + * The status of the template + * @member {module:SphereonTemplateProcessor/model/TemplateContextResponse.StatusEnum} status + */ + exports.prototype['status'] = undefined; + + + /** + * Allowed values for the status property. + * @enum {String} + * @readonly + */ + exports.StatusEnum = { + /** + * value: "CREATED" + * @const + */ + "CREATED": "CREATED", + /** + * value: "UPDATED" + * @const + */ + "UPDATED": "UPDATED", + /** + * value: "DELETED" + * @const + */ + "DELETED": "DELETED", + /** + * value: "PROCESSING" + * @const + */ + "PROCESSING": "PROCESSING" }; + + + return exports; +})); + + diff --git a/javascript/test/api/MergeApi.spec.js b/javascript/test/api/MergeApi.spec.js new file mode 100644 index 0000000..8a6dece --- /dev/null +++ b/javascript/test/api/MergeApi.spec.js @@ -0,0 +1,194 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', '../../src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require('../../src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OfficeTextMerge); + } +}(this, function(expect, OfficeTextMerge) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OfficeTextMerge.MergeApi(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('MergeApi', function() { + describe('createDataSet', function() { + it('should call createDataSet successfully', function(done) { + //uncomment below and update the code to test createDataSet + //instance.createDataSet(pet, function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('createTemplateContext', function() { + it('should call createTemplateContext successfully', function(done) { + //uncomment below and update the code to test createTemplateContext + //instance.createTemplateContext(pet, function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('deleteDataSet', function() { + it('should call deleteDataSet successfully', function(done) { + //uncomment below and update the code to test deleteDataSet + //instance.deleteDataSet(pet, function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('deleteJob', function() { + it('should call deleteJob successfully', function(done) { + //uncomment below and update the code to test deleteJob + //instance.deleteJob(pet, function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('deleteTemplateContext', function() { + it('should call deleteTemplateContext successfully', function(done) { + //uncomment below and update the code to test deleteTemplateContext + //instance.deleteTemplateContext(pet, function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('getJob', function() { + it('should call getJob successfully', function(done) { + //uncomment below and update the code to test getJob + //instance.getJob(pet, function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('getJobs', function() { + it('should call getJobs successfully', function(done) { + //uncomment below and update the code to test getJobs + //instance.getJobs(pet, function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('getResultStreamById', function() { + it('should call getResultStreamById successfully', function(done) { + //uncomment below and update the code to test getResultStreamById + //instance.getResultStreamById(pet, function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('getResultStreamsAsContainer', function() { + it('should call getResultStreamsAsContainer successfully', function(done) { + //uncomment below and update the code to test getResultStreamsAsContainer + //instance.getResultStreamsAsContainer(pet, function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('getTemplateContext', function() { + it('should call getTemplateContext successfully', function(done) { + //uncomment below and update the code to test getTemplateContext + //instance.getTemplateContext(pet, function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('submitJob', function() { + it('should call submitJob successfully', function(done) { + //uncomment below and update the code to test submitJob + //instance.submitJob(pet, function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('updateTemplateContext', function() { + it('should call updateTemplateContext successfully', function(done) { + //uncomment below and update the code to test updateTemplateContext + //instance.updateTemplateContext(pet, function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('uploadTemplateFile', function() { + it('should call uploadTemplateFile successfully', function(done) { + //uncomment below and update the code to test uploadTemplateFile + //instance.uploadTemplateFile(pet, function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/javascript/test/model/DataSetResponse.spec.js b/javascript/test/model/DataSetResponse.spec.js new file mode 100644 index 0000000..1f83dda --- /dev/null +++ b/javascript/test/model/DataSetResponse.spec.js @@ -0,0 +1,94 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', '../../src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require('../../src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OfficeTextMerge); + } +}(this, function(expect, OfficeTextMerge) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OfficeTextMerge.DataSetResponse(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('DataSetResponse', function() { + it('should create an instance of DataSetResponse', function() { + // uncomment below and update the code to test DataSetResponse + //var instane = new OfficeTextMerge.DataSetResponse(); + //expect(instance).to.be.a(OfficeTextMerge.DataSetResponse); + }); + + it('should have the property completionTime (base name: "completionTime")', function() { + // uncomment below and update the code to test the property completionTime + //var instane = new OfficeTextMerge.DataSetResponse(); + //expect(instance).to.be(); + }); + + it('should have the property creationTime (base name: "creationTime")', function() { + // uncomment below and update the code to test the property creationTime + //var instane = new OfficeTextMerge.DataSetResponse(); + //expect(instance).to.be(); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instane = new OfficeTextMerge.DataSetResponse(); + //expect(instance).to.be(); + }); + + it('should have the property status (base name: "status")', function() { + // uncomment below and update the code to test the property status + //var instane = new OfficeTextMerge.DataSetResponse(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/javascript/test/model/Error.spec.js b/javascript/test/model/Error.spec.js new file mode 100644 index 0000000..c5c52c7 --- /dev/null +++ b/javascript/test/model/Error.spec.js @@ -0,0 +1,94 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', '../../src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require('../../src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OfficeTextMerge); + } +}(this, function(expect, OfficeTextMerge) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OfficeTextMerge.Error(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('Error', function() { + it('should create an instance of Error', function() { + // uncomment below and update the code to test Error + //var instane = new OfficeTextMerge.Error(); + //expect(instance).to.be.a(OfficeTextMerge.Error); + }); + + it('should have the property code (base name: "code")', function() { + // uncomment below and update the code to test the property code + //var instane = new OfficeTextMerge.Error(); + //expect(instance).to.be(); + }); + + it('should have the property level (base name: "level")', function() { + // uncomment below and update the code to test the property level + //var instane = new OfficeTextMerge.Error(); + //expect(instance).to.be(); + }); + + it('should have the property cause (base name: "cause")', function() { + // uncomment below and update the code to test the property cause + //var instane = new OfficeTextMerge.Error(); + //expect(instance).to.be(); + }); + + it('should have the property message (base name: "message")', function() { + // uncomment below and update the code to test the property message + //var instane = new OfficeTextMerge.Error(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/javascript/test/model/ErrorResponse.spec.js b/javascript/test/model/ErrorResponse.spec.js new file mode 100644 index 0000000..00a6661 --- /dev/null +++ b/javascript/test/model/ErrorResponse.spec.js @@ -0,0 +1,76 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', '../../src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require('../../src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OfficeTextMerge); + } +}(this, function(expect, OfficeTextMerge) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OfficeTextMerge.ErrorResponse(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('ErrorResponse', function() { + it('should create an instance of ErrorResponse', function() { + // uncomment below and update the code to test ErrorResponse + //var instane = new OfficeTextMerge.ErrorResponse(); + //expect(instance).to.be.a(OfficeTextMerge.ErrorResponse); + }); + + it('should have the property errors (base name: "errors")', function() { + // uncomment below and update the code to test the property errors + //var instane = new OfficeTextMerge.ErrorResponse(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/javascript/test/model/Lifecycle.spec.js b/javascript/test/model/Lifecycle.spec.js new file mode 100644 index 0000000..b5c9f29 --- /dev/null +++ b/javascript/test/model/Lifecycle.spec.js @@ -0,0 +1,88 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', '../../src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require('../../src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OfficeTextMerge); + } +}(this, function(expect, OfficeTextMerge) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OfficeTextMerge.Lifecycle(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('Lifecycle', function() { + it('should create an instance of Lifecycle', function() { + // uncomment below and update the code to test Lifecycle + //var instane = new OfficeTextMerge.Lifecycle(); + //expect(instance).to.be.a(OfficeTextMerge.Lifecycle); + }); + + it('should have the property actionTime (base name: "actionTime")', function() { + // uncomment below and update the code to test the property actionTime + //var instane = new OfficeTextMerge.Lifecycle(); + //expect(instance).to.be(); + }); + + it('should have the property action (base name: "action")', function() { + // uncomment below and update the code to test the property action + //var instane = new OfficeTextMerge.Lifecycle(); + //expect(instance).to.be(); + }); + + it('should have the property type (base name: "type")', function() { + // uncomment below and update the code to test the property type + //var instane = new OfficeTextMerge.Lifecycle(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/javascript/test/model/MergeJob.spec.js b/javascript/test/model/MergeJob.spec.js new file mode 100644 index 0000000..612618e --- /dev/null +++ b/javascript/test/model/MergeJob.spec.js @@ -0,0 +1,136 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', '../../src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require('../../src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OfficeTextMerge); + } +}(this, function(expect, OfficeTextMerge) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OfficeTextMerge.MergeJob(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('MergeJob', function() { + it('should create an instance of MergeJob', function() { + // uncomment below and update the code to test MergeJob + //var instane = new OfficeTextMerge.MergeJob(); + //expect(instance).to.be.a(OfficeTextMerge.MergeJob); + }); + + it('should have the property resultFolderPath (base name: "resultFolderPath")', function() { + // uncomment below and update the code to test the property resultFolderPath + //var instane = new OfficeTextMerge.MergeJob(); + //expect(instance).to.be(); + }); + + it('should have the property completionTime (base name: "completionTime")', function() { + // uncomment below and update the code to test the property completionTime + //var instane = new OfficeTextMerge.MergeJob(); + //expect(instance).to.be(); + }); + + it('should have the property jobId (base name: "jobId")', function() { + // uncomment below and update the code to test the property jobId + //var instane = new OfficeTextMerge.MergeJob(); + //expect(instance).to.be(); + }); + + it('should have the property resultContainerId (base name: "resultContainerId")', function() { + // uncomment below and update the code to test the property resultContainerId + //var instane = new OfficeTextMerge.MergeJob(); + //expect(instance).to.be(); + }); + + it('should have the property creationTime (base name: "creationTime")', function() { + // uncomment below and update the code to test the property creationTime + //var instane = new OfficeTextMerge.MergeJob(); + //expect(instance).to.be(); + }); + + it('should have the property dataSetId (base name: "dataSetId")', function() { + // uncomment below and update the code to test the property dataSetId + //var instane = new OfficeTextMerge.MergeJob(); + //expect(instance).to.be(); + }); + + it('should have the property resultStreams (base name: "resultStreams")', function() { + // uncomment below and update the code to test the property resultStreams + //var instane = new OfficeTextMerge.MergeJob(); + //expect(instance).to.be(); + }); + + it('should have the property headerDataSetIds (base name: "headerDataSetIds")', function() { + // uncomment below and update the code to test the property headerDataSetIds + //var instane = new OfficeTextMerge.MergeJob(); + //expect(instance).to.be(); + }); + + it('should have the property mergeSettings (base name: "mergeSettings")', function() { + // uncomment below and update the code to test the property mergeSettings + //var instane = new OfficeTextMerge.MergeJob(); + //expect(instance).to.be(); + }); + + it('should have the property statusMessage (base name: "statusMessage")', function() { + // uncomment below and update the code to test the property statusMessage + //var instane = new OfficeTextMerge.MergeJob(); + //expect(instance).to.be(); + }); + + it('should have the property status (base name: "status")', function() { + // uncomment below and update the code to test the property status + //var instane = new OfficeTextMerge.MergeJob(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/javascript/test/model/MergeJobResponse.spec.js b/javascript/test/model/MergeJobResponse.spec.js new file mode 100644 index 0000000..0ae79d5 --- /dev/null +++ b/javascript/test/model/MergeJobResponse.spec.js @@ -0,0 +1,94 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', '../../src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require('../../src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OfficeTextMerge); + } +}(this, function(expect, OfficeTextMerge) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OfficeTextMerge.MergeJobResponse(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('MergeJobResponse', function() { + it('should create an instance of MergeJobResponse', function() { + // uncomment below and update the code to test MergeJobResponse + //var instane = new OfficeTextMerge.MergeJobResponse(); + //expect(instance).to.be.a(OfficeTextMerge.MergeJobResponse); + }); + + it('should have the property jobId (base name: "jobId")', function() { + // uncomment below and update the code to test the property jobId + //var instane = new OfficeTextMerge.MergeJobResponse(); + //expect(instance).to.be(); + }); + + it('should have the property job (base name: "job")', function() { + // uncomment below and update the code to test the property job + //var instane = new OfficeTextMerge.MergeJobResponse(); + //expect(instance).to.be(); + }); + + it('should have the property statusMessage (base name: "statusMessage")', function() { + // uncomment below and update the code to test the property statusMessage + //var instane = new OfficeTextMerge.MergeJobResponse(); + //expect(instance).to.be(); + }); + + it('should have the property status (base name: "status")', function() { + // uncomment below and update the code to test the property status + //var instane = new OfficeTextMerge.MergeJobResponse(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/javascript/test/model/MergeSettings.spec.js b/javascript/test/model/MergeSettings.spec.js new file mode 100644 index 0000000..0b3938d --- /dev/null +++ b/javascript/test/model/MergeSettings.spec.js @@ -0,0 +1,124 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', '../../src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require('../../src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OfficeTextMerge); + } +}(this, function(expect, OfficeTextMerge) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OfficeTextMerge.MergeSettings(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('MergeSettings', function() { + it('should create an instance of MergeSettings', function() { + // uncomment below and update the code to test MergeSettings + //var instane = new OfficeTextMerge.MergeSettings(); + //expect(instance).to.be.a(OfficeTextMerge.MergeSettings); + }); + + it('should have the property lifecycle (base name: "lifecycle")', function() { + // uncomment below and update the code to test the property lifecycle + //var instane = new OfficeTextMerge.MergeSettings(); + //expect(instance).to.be(); + }); + + it('should have the property mergeResult (base name: "mergeResult")', function() { + // uncomment below and update the code to test the property mergeResult + //var instane = new OfficeTextMerge.MergeSettings(); + //expect(instance).to.be(); + }); + + it('should have the property dataSetId (base name: "dataSetId")', function() { + // uncomment below and update the code to test the property dataSetId + //var instane = new OfficeTextMerge.MergeSettings(); + //expect(instance).to.be(); + }); + + it('should have the property engine (base name: "engine")', function() { + // uncomment below and update the code to test the property engine + //var instane = new OfficeTextMerge.MergeSettings(); + //expect(instance).to.be(); + }); + + it('should have the property headerDataSetIds (base name: "headerDataSetIds")', function() { + // uncomment below and update the code to test the property headerDataSetIds + //var instane = new OfficeTextMerge.MergeSettings(); + //expect(instance).to.be(); + }); + + it('should have the property templateVersion (base name: "templateVersion")', function() { + // uncomment below and update the code to test the property templateVersion + //var instane = new OfficeTextMerge.MergeSettings(); + //expect(instance).to.be(); + }); + + it('should have the property resultStreamLocation (base name: "resultStreamLocation")', function() { + // uncomment below and update the code to test the property resultStreamLocation + //var instane = new OfficeTextMerge.MergeSettings(); + //expect(instance).to.be(); + }); + + it('should have the property templateId (base name: "templateId")', function() { + // uncomment below and update the code to test the property templateId + //var instane = new OfficeTextMerge.MergeSettings(); + //expect(instance).to.be(); + }); + + it('should have the property outputSettings (base name: "outputSettings")', function() { + // uncomment below and update the code to test the property outputSettings + //var instane = new OfficeTextMerge.MergeSettings(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/javascript/test/model/OutputSettings.spec.js b/javascript/test/model/OutputSettings.spec.js new file mode 100644 index 0000000..89716e5 --- /dev/null +++ b/javascript/test/model/OutputSettings.spec.js @@ -0,0 +1,82 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', '../../src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require('../../src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OfficeTextMerge); + } +}(this, function(expect, OfficeTextMerge) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OfficeTextMerge.OutputSettings(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('OutputSettings', function() { + it('should create an instance of OutputSettings', function() { + // uncomment below and update the code to test OutputSettings + //var instane = new OfficeTextMerge.OutputSettings(); + //expect(instance).to.be.a(OfficeTextMerge.OutputSettings); + }); + + it('should have the property deliveryFormat (base name: "deliveryFormat")', function() { + // uncomment below and update the code to test the property deliveryFormat + //var instane = new OfficeTextMerge.OutputSettings(); + //expect(instance).to.be(); + }); + + it('should have the property outputFormat (base name: "outputFormat")', function() { + // uncomment below and update the code to test the property outputFormat + //var instane = new OfficeTextMerge.OutputSettings(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/javascript/test/model/OwnerInfo.spec.js b/javascript/test/model/OwnerInfo.spec.js new file mode 100644 index 0000000..9bea7d0 --- /dev/null +++ b/javascript/test/model/OwnerInfo.spec.js @@ -0,0 +1,94 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', '../../src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require('../../src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OfficeTextMerge); + } +}(this, function(expect, OfficeTextMerge) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OfficeTextMerge.OwnerInfo(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('OwnerInfo', function() { + it('should create an instance of OwnerInfo', function() { + // uncomment below and update the code to test OwnerInfo + //var instane = new OfficeTextMerge.OwnerInfo(); + //expect(instance).to.be.a(OfficeTextMerge.OwnerInfo); + }); + + it('should have the property phone (base name: "phone")', function() { + // uncomment below and update the code to test the property phone + //var instane = new OfficeTextMerge.OwnerInfo(); + //expect(instance).to.be(); + }); + + it('should have the property companyDepartment (base name: "companyDepartment")', function() { + // uncomment below and update the code to test the property companyDepartment + //var instane = new OfficeTextMerge.OwnerInfo(); + //expect(instance).to.be(); + }); + + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instane = new OfficeTextMerge.OwnerInfo(); + //expect(instance).to.be(); + }); + + it('should have the property email (base name: "email")', function() { + // uncomment below and update the code to test the property email + //var instane = new OfficeTextMerge.OwnerInfo(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/javascript/test/model/StreamLocation.spec.js b/javascript/test/model/StreamLocation.spec.js new file mode 100644 index 0000000..31f352b --- /dev/null +++ b/javascript/test/model/StreamLocation.spec.js @@ -0,0 +1,94 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', '../../src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require('../../src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OfficeTextMerge); + } +}(this, function(expect, OfficeTextMerge) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OfficeTextMerge.StreamLocation(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('StreamLocation', function() { + it('should create an instance of StreamLocation', function() { + // uncomment below and update the code to test StreamLocation + //var instane = new OfficeTextMerge.StreamLocation(); + //expect(instance).to.be.a(OfficeTextMerge.StreamLocation); + }); + + it('should have the property folderPath (base name: "folderPath")', function() { + // uncomment below and update the code to test the property folderPath + //var instane = new OfficeTextMerge.StreamLocation(); + //expect(instance).to.be(); + }); + + it('should have the property originalFileName (base name: "originalFileName")', function() { + // uncomment below and update the code to test the property originalFileName + //var instane = new OfficeTextMerge.StreamLocation(); + //expect(instance).to.be(); + }); + + it('should have the property containerId (base name: "containerId")', function() { + // uncomment below and update the code to test the property containerId + //var instane = new OfficeTextMerge.StreamLocation(); + //expect(instance).to.be(); + }); + + it('should have the property fileId (base name: "fileId")', function() { + // uncomment below and update the code to test the property fileId + //var instane = new OfficeTextMerge.StreamLocation(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/javascript/test/model/TemplateContext.spec.js b/javascript/test/model/TemplateContext.spec.js new file mode 100644 index 0000000..b2deac0 --- /dev/null +++ b/javascript/test/model/TemplateContext.spec.js @@ -0,0 +1,106 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', '../../src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require('../../src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OfficeTextMerge); + } +}(this, function(expect, OfficeTextMerge) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OfficeTextMerge.TemplateContext(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('TemplateContext', function() { + it('should create an instance of TemplateContext', function() { + // uncomment below and update the code to test TemplateContext + //var instane = new OfficeTextMerge.TemplateContext(); + //expect(instance).to.be.a(OfficeTextMerge.TemplateContext); + }); + + it('should have the property templateType (base name: "templateType")', function() { + // uncomment below and update the code to test the property templateType + //var instane = new OfficeTextMerge.TemplateContext(); + //expect(instance).to.be(); + }); + + it('should have the property templateFileLocations (base name: "templateFileLocations")', function() { + // uncomment below and update the code to test the property templateFileLocations + //var instane = new OfficeTextMerge.TemplateContext(); + //expect(instance).to.be(); + }); + + it('should have the property description (base name: "description")', function() { + // uncomment below and update the code to test the property description + //var instane = new OfficeTextMerge.TemplateContext(); + //expect(instance).to.be(); + }); + + it('should have the property ownerInfo (base name: "ownerInfo")', function() { + // uncomment below and update the code to test the property ownerInfo + //var instane = new OfficeTextMerge.TemplateContext(); + //expect(instance).to.be(); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instane = new OfficeTextMerge.TemplateContext(); + //expect(instance).to.be(); + }); + + it('should have the property templateId (base name: "templateId")', function() { + // uncomment below and update the code to test the property templateId + //var instane = new OfficeTextMerge.TemplateContext(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/javascript/test/model/TemplateContextRequest.spec.js b/javascript/test/model/TemplateContextRequest.spec.js new file mode 100644 index 0000000..4c909d8 --- /dev/null +++ b/javascript/test/model/TemplateContextRequest.spec.js @@ -0,0 +1,94 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', '../../src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require('../../src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OfficeTextMerge); + } +}(this, function(expect, OfficeTextMerge) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OfficeTextMerge.TemplateContextRequest(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('TemplateContextRequest', function() { + it('should create an instance of TemplateContextRequest', function() { + // uncomment below and update the code to test TemplateContextRequest + //var instane = new OfficeTextMerge.TemplateContextRequest(); + //expect(instance).to.be.a(OfficeTextMerge.TemplateContextRequest); + }); + + it('should have the property templateType (base name: "templateType")', function() { + // uncomment below and update the code to test the property templateType + //var instane = new OfficeTextMerge.TemplateContextRequest(); + //expect(instance).to.be(); + }); + + it('should have the property description (base name: "description")', function() { + // uncomment below and update the code to test the property description + //var instane = new OfficeTextMerge.TemplateContextRequest(); + //expect(instance).to.be(); + }); + + it('should have the property ownerInfo (base name: "ownerInfo")', function() { + // uncomment below and update the code to test the property ownerInfo + //var instane = new OfficeTextMerge.TemplateContextRequest(); + //expect(instance).to.be(); + }); + + it('should have the property templateId (base name: "templateId")', function() { + // uncomment below and update the code to test the property templateId + //var instane = new OfficeTextMerge.TemplateContextRequest(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/javascript/test/model/TemplateContextResponse.spec.js b/javascript/test/model/TemplateContextResponse.spec.js new file mode 100644 index 0000000..38ff396 --- /dev/null +++ b/javascript/test/model/TemplateContextResponse.spec.js @@ -0,0 +1,94 @@ +/** + * OfficeTextMerge + * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', '../../src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require('../../src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.OfficeTextMerge); + } +}(this, function(expect, OfficeTextMerge) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new OfficeTextMerge.TemplateContextResponse(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('TemplateContextResponse', function() { + it('should create an instance of TemplateContextResponse', function() { + // uncomment below and update the code to test TemplateContextResponse + //var instane = new OfficeTextMerge.TemplateContextResponse(); + //expect(instance).to.be.a(OfficeTextMerge.TemplateContextResponse); + }); + + it('should have the property creationTime (base name: "creationTime")', function() { + // uncomment below and update the code to test the property creationTime + //var instane = new OfficeTextMerge.TemplateContextResponse(); + //expect(instance).to.be(); + }); + + it('should have the property context (base name: "context")', function() { + // uncomment below and update the code to test the property context + //var instane = new OfficeTextMerge.TemplateContextResponse(); + //expect(instance).to.be(); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instane = new OfficeTextMerge.TemplateContextResponse(); + //expect(instance).to.be(); + }); + + it('should have the property status (base name: "status")', function() { + // uncomment below and update the code to test the property status + //var instane = new OfficeTextMerge.TemplateContextResponse(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/pom.xml b/pom.xml index dd331f5..251d170 100644 --- a/pom.xml +++ b/pom.xml @@ -1,43 +1,40 @@ - 4.0.0 - com.sphereon.sdk - office-text-sdk-generator - jar - 1.0.0-SNAPSHOT - OFFICE TEXT API SDK Generator - - - - 1.5.9 - 2.4.2 - 1.5.9 - 2.7.5 - 2.6.2 - 2.9.3 - 1.0.0 - 4.12 - 0.3.2 - com.sphereon.sdk.office-text - Sphereon.SDK.Office-text - + 4.0.0 + com.sphereon.sdk + template-processor + jar + 0.1.0 + TEMPLATE PROCESSOR API SDK Generator + + + + 1.5.9 + 2.4.2 + 1.5.9 + 2.7.5 + 2.6.2 + 2.9.3 + 1.0.0 + 4.12 + 0.3.2 + com.sphereon.sdk.template-processor + Sphereon.SDK.TemplateProcessor + SphereonTemplateProcessor + + - - snapshots - Inhouse snapshots - http://nexus.qa.sphereon.com/nexus/content/repositories/snapshots - - releases - Inhouse releases - http://nexus.qa.sphereon.com/nexus/content/repositories/releases + sphereon-sdk + http://nexus.qa.sphereon.com/nexus/content/repositories/sphereon-sdk + - java8 + html-docs true @@ -57,7 +54,178 @@ - swagger.json + swagger.sdk.json + + + + + html2 + + + + java8 + + + true + + ${project.basedir}/html-docs + com.sphereon.sdk + template-processor-sdk-html-docs + ${project.version} + true + api + model + ${sdk-package} + + + + + + + + + + java8-okhttp-gson + + true + + + 2.7.5 + 2.6.2 + + + + + io.swagger + swagger-codegen-maven-plugin + 2.2.2-SNAPSHOT + + + + + com.squareup.okhttp + okhttp + ${okhttp-version} + + + com.squareup.okhttp + logging-interceptor + ${okhttp-version} + + + + + com.google.code.gson + gson + ${gson-version} + + + + + + + + generate + + + swagger.sdk.json + + + java + + + java8 + + + okhttp-gson + true + + ${project.basedir}/java8-okhttp-gson + com.sphereon.sdk + template-processor-sdk-java8 + ${project.version} + true + ${sdk-package}.api + ${sdk-package}.model + ${sdk-package}.handler + + + + + + + + + + java8-jersey2 + + true + + + 2.22.2 + 2.7.5 + + + + + + + io.swagger + swagger-codegen-maven-plugin + 2.2.2-SNAPSHOT + + + + + org.glassfish.jersey.core + jersey-client + ${jersey-version} + + + org.glassfish.jersey.media + jersey-media-multipart + ${jersey-version} + + + org.glassfish.jersey.media + jersey-media-json-jackson + ${jersey-version} + + + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-version} + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + ${jackson-version} + + + + + + + + generate + + + + + swagger.sdk.json + @@ -69,12 +237,12 @@ - okhttp-gson + jersey2 true - ${project.basedir}/java8 + ${project.basedir}/java8-jersey2 com.sphereon.sdk - office-text-sdk-java8 + template-processor-sdk-java8-jersey2 ${project.version} true ${sdk-package}.api @@ -87,6 +255,88 @@ + + + + java8-retrofit2 + + true + + + 1.0.1 + 2.1.0 + + + + + + io.swagger + swagger-codegen-maven-plugin + 2.2.2-SNAPSHOT + + + + com.squareup.retrofit2 + converter-gson + ${retrofit-version} + + + com.squareup.retrofit2 + retrofit + ${retrofit-version} + + + com.squareup.retrofit2 + converter-scalars + ${retrofit-version} + + + org.apache.oltu.oauth2 + org.apache.oltu.oauth2.client + ${oltu-version} + + + + + + + generate + + + + swagger.sdk.json + + + + + java + + + + java8 + + + + retrofit2 + true + + ${project.basedir}/java8-retrofit2 + com.sphereon.sdk + template-processor-sdk-java8-retrofit2 + ${project.version} + true + ${sdk-package}.api + ${sdk-package}.model + ${sdk-package}.handler + + + + + + + + + csharp-net45 @@ -108,7 +358,8 @@ - swagger.json + swagger.sdk.json + csharp @@ -118,7 +369,7 @@ Sphereon BV ${sdk-package-csharp}.Api - ${sdk-package-csharp}.TESTTESTModel + ${sdk-package-csharp}.Model ${sdk-package-csharp}.Handler ${sdk-package-csharp} @@ -133,7 +384,7 @@ ${project.basedir}/csharp-net45 com.sphereon.sdk - office-text-sdk-csharp-net45 + template-processor-sdk-csharp-net45 ${project.version} true @@ -147,6 +398,118 @@ + + + csharp-net35 + + true + + + + + + io.swagger + swagger-codegen-maven-plugin + 2.2.1 + + + + + + generate + + + + swagger.sdk.json + + + + csharp + + + + + Sphereon BV + ${sdk-package-csharp}.Api + ${sdk-package-csharp}.Model + ${sdk-package-csharp}.Handler + ${sdk-package-csharp} + v3.5 + + + src/main/resources/config/csharp-net35.json + + + true + + ${project.basedir}/csharp-net35 + com.sphereon.sdk + template-processor-sdk-csharp-net35 + ${project.version} + true + + Api + Model + Handler + + + + + + + + + + javascript + + true + + + + + + io.swagger + swagger-codegen-maven-plugin + 2.2.1 + + + + + + generate + + + + swagger.sdk.json + + + + + javascript + + + + java8 + + + true + + ${project.basedir}/javascript + com.sphereon.sdk + template-processor-sdk-javascript + ${project.version} + true + api + model + ${sdk-package-javascript} + + + + + + + @@ -156,29 +519,6 @@ ${swagger-annotations-version} - - - - com.squareup.okhttp - okhttp - ${okhttp-version} - - - - com.squareup.okhttp - logging-interceptor - ${okhttp-version} - - - - - - com.google.code.gson - gson - ${gson-version} - - - com.brsanthu @@ -192,5 +532,7 @@ ${junit-version} + + diff --git a/src/main/resources/config/csharp-net45.json b/src/main/resources/config/csharp-net45.json index d980ee6..cbcccd1 100644 --- a/src/main/resources/config/csharp-net45.json +++ b/src/main/resources/config/csharp-net45.json @@ -1,17 +1,17 @@ { "lang": "csharp", - "packageTitle": "OFFICE-TEXT SDK C# .net45", + "packageTitle": "TEMPLATE-PROCESSOR SDK C# .net45", "inputSpec": "swagger.json", "outputDir": "csharp-net45", "verbose": true, "skipOverwrite": false, "templateDir": "src/main/resources", "auth": "hello:world", - "apiPackage": "Sphereon.SDK.OFFICE-TEXT.Api", - "modelPackage": "Sphereon.SDK.OFFICE-TEXT.Model", - "invokerPackage": "Sphereon.SDK.OFFICE-TEXT.Invoker", + "apiPackage": "Sphereon.SDK.TEMPLATE-PROCESSOR.Api", + "modelPackage": "Sphereon.SDK.TEMPLATE-PROCESSOR.Model", + "invokerPackage": "Sphereon.SDK.TEMPLATE-PROCESSOR.Invoker", "groupId": "com.sphereon.sdk", - "artifactId": "office-text-sdk-csharp-net45", + "artifactId": "template-processor-sdk-csharp-net45", "artifactVersion": "0.0.1-SNAPSHOT", "systemProperties": { "systemProp1": "value1" diff --git a/swagger.sdk.json b/swagger.sdk.json new file mode 100644 index 0000000..e003a9c --- /dev/null +++ b/swagger.sdk.json @@ -0,0 +1,861 @@ +{ + "basePath": "/", + "paths": { + "/template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId}": {"put": { + "summary": "Get the result file", + "security": [{"oauth2schema": ["global"]}], + "produces": ["application/octet-stream"], + "description": "Get a merge result document as a binary stream.\r\n ", + "operationId": "getResultStreamById", + "responses": { + "200": { + "schema": { + "format": "byte", + "type": "string" + }, + "description": "Result file successfully returned" + }, + "400": { + "schema": {"$ref": "#/definitions/ErrorResponse"}, + "description": "Result file could not be created." + }, + "202": { + "schema": { + "format": "byte", + "type": "string" + }, + "description": "Result file not yet created. Job is still executing." + } + }, + "parameters": [ + { + "in": "path", + "name": "jobId", + "description": "jobId", + "type": "string", + "required": true + }, + { + "in": "path", + "name": "streamId", + "description": "streamId", + "type": "string", + "required": true + }, + { + "schema": {"$ref": "#/definitions/OutputSettings"}, + "in": "body", + "name": "outputSettings", + "description": "outputSettings", + "required": false + } + ], + "tags": ["Merge"], + "consumes": ["application/json;charset=UTF-8"] + }}, + "/template-processor/merge/0.1/templates/{templateId}": { + "post": { + "summary": "Upload template file", + "security": [{"oauth2schema": ["global"]}], + "produces": ["application/json;charset=UTF-8"], + "description": "Upload the Office template file", + "operationId": "uploadTemplateFile", + "responses": { + "200": { + "schema": {"$ref": "#/definitions/TemplateContextResponse"}, + "description": "Template uploaded and stored" + }, + "500": { + "schema": {"$ref": "#/definitions/ErrorResponse"}, + "description": "Internal server error" + }, + "404": { + "schema": {"$ref": "#/definitions/ErrorResponse"}, + "description": "Template context not found" + } + }, + "parameters": [ + { + "in": "path", + "name": "templateId", + "description": "The template context name unique for your environment", + "type": "string", + "required": true + }, + { + "in": "formData", + "name": "stream", + "description": "The template (file/inputstream) to store", + "type": "file", + "required": true + } + ], + "tags": ["Merge"], + "consumes": ["multipart/form-data"] + }, + "get": { + "summary": "Get template context", + "security": [{"oauth2schema": ["global"]}], + "produces": ["application/json;charset=UTF-8"], + "description": "Get an existing template context", + "operationId": "getTemplateContext", + "responses": { + "200": { + "schema": {"$ref": "#/definitions/TemplateContextResponse"}, + "description": "Template context found" + }, + "500": { + "schema": {"$ref": "#/definitions/ErrorResponse"}, + "description": "Internal server error" + }, + "404": { + "schema": {"$ref": "#/definitions/ErrorResponse"}, + "description": "Template context not found" + } + }, + "parameters": [{ + "in": "path", + "name": "templateId", + "description": "The template context name unique for your environment", + "type": "string", + "required": true + }], + "tags": ["Merge"], + "consumes": ["application/json"] + }, + "delete": { + "summary": "Delete template context", + "security": [{"oauth2schema": ["global"]}], + "produces": ["application/json;charset=UTF-8"], + "description": "Delete a template context with all history", + "operationId": "deleteTemplateContext", + "responses": { + "200": { + "schema": {"$ref": "#/definitions/TemplateContextResponse"}, + "description": "Template context deleted" + }, + "500": { + "schema": {"$ref": "#/definitions/ErrorResponse"}, + "description": "Internal server error" + }, + "404": { + "schema": {"$ref": "#/definitions/ErrorResponse"}, + "description": "Template context not found" + } + }, + "parameters": [{ + "in": "path", + "name": "templateId", + "description": "templateId", + "type": "string", + "required": true + }], + "tags": ["Merge"], + "consumes": ["application/json"] + } + }, + "/template-processor/merge/0.1/datasets/{dataSetId}": {"delete": { + "summary": "Delete a stored data set", + "security": [{"oauth2schema": ["global"]}], + "produces": ["application/json;charset=UTF-8"], + "description": "Delete a stored data set", + "operationId": "deleteDataSet", + "responses": { + "200": { + "schema": {"$ref": "#/definitions/DataSetResponse"}, + "description": "Successfully deleted the data set" + }, + "400": { + "schema": {"$ref": "#/definitions/ErrorResponse"}, + "description": "Could not delete data set" + }, + "404": { + "schema": {"$ref": "#/definitions/ErrorResponse"}, + "description": "Invalid data set id" + } + }, + "parameters": [{ + "in": "path", + "name": "dataSetId", + "description": "dataSetId", + "type": "string", + "required": true + }], + "tags": ["Merge"], + "consumes": ["application/json"] + }}, + "/template-processor/merge/0.1/jobs/{jobId}": { + "get": { + "summary": "Job definition and state", + "security": [{"oauth2schema": ["global"]}], + "produces": ["application/json;charset=UTF-8"], + "description": "Get the merge job definition and current state. Please not that you can differentiate based on http response status", + "operationId": "getJob", + "responses": { + "200": { + "schema": {"$ref": "#/definitions/MergeJobResponse"}, + "description": "Merge job returned and Job is done or in error" + }, + "202": { + "schema": {"$ref": "#/definitions/MergeJobResponse"}, + "description": "Merge job returned and Job is still processing" + }, + "404": { + "schema": {"$ref": "#/definitions/ErrorResponse"}, + "description": "Invalid job id" + } + }, + "parameters": [{ + "in": "path", + "name": "jobId", + "description": "jobId", + "type": "string", + "required": true + }], + "tags": ["Merge"], + "consumes": ["application/json"] + }, + "delete": { + "summary": "Delete a job manually", + "security": [{"oauth2schema": ["global"]}], + "produces": ["application/json;charset=UTF-8"], + "description": "Delete the merge job and all related files", + "operationId": "deleteJob", + "responses": { + "200": { + "schema": {"$ref": "#/definitions/MergeJobResponse"}, + "description": "Merge job returned and Job is done or in error" + }, + "400": { + "schema": {"$ref": "#/definitions/ErrorResponse"}, + "description": "Could not delete job" + }, + "404": { + "schema": {"$ref": "#/definitions/ErrorResponse"}, + "description": "Invalid job id" + } + }, + "parameters": [{ + "in": "path", + "name": "jobId", + "description": "jobId", + "type": "string", + "required": true + }], + "tags": ["Merge"], + "consumes": ["application/json"] + } + }, + "/template-processor/merge/0.1/datasets": {"post": { + "summary": "Store dataset", + "security": [{"oauth2schema": ["global"]}], + "produces": ["application/json;charset=UTF-8"], + "description": "Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job.", + "operationId": "createDataSet", + "responses": { + "200": { + "schema": {"$ref": "#/definitions/DataSetResponse"}, + "description": "Data set received and stored" + }, + "400": { + "schema": {"$ref": "#/definitions/ErrorResponse"}, + "description": "Unsupported data set format" + } + }, + "parameters": [{ + "schema": {"type": "string"}, + "in": "body", + "name": "payload", + "description": "The dates for the merge\n[\n {\n \"Field1\": \"Field1 value\",\n \"Field2\": \"Field2 value\",\n },\n {\n \"Field1\": \"Field1 value\",\n \"Field2\": \"Field2 value\",\n }\n]", + "required": true + }], + "tags": ["Merge"], + "consumes": ["application/json;charset=UTF-8"] + }}, + "/template-processor/merge/0.1/jobs/{jobId}/result/container": {"put": { + "summary": "Get the result file", + "security": [{"oauth2schema": ["global"]}], + "produces": ["application/octet-stream"], + "description": "Get all documents inside a compressed container as a binary stream.\r\n ", + "operationId": "getResultStreamsAsContainer", + "responses": { + "200": { + "schema": { + "format": "byte", + "type": "string" + }, + "description": "Result package successfully created and returned" + }, + "400": { + "schema": {"$ref": "#/definitions/ErrorResponse"}, + "description": "Result file could not be created." + }, + "202": { + "schema": { + "format": "byte", + "type": "string" + }, + "description": "Result file not yet created. Job is still executing." + } + }, + "parameters": [ + { + "in": "path", + "name": "jobId", + "description": "jobId", + "type": "string", + "required": true + }, + { + "schema": {"$ref": "#/definitions/OutputSettings"}, + "in": "body", + "name": "outputSettings", + "description": "outputSettings", + "required": false + } + ], + "tags": ["Merge"], + "consumes": ["application/json;charset=UTF-8"] + }}, + "/template-processor/merge/0.1/templates": { + "post": { + "summary": "Create template context", + "security": [{"oauth2schema": ["global"]}], + "produces": ["application/json;charset=UTF-8"], + "description": "Create a unique template context for your environment", + "operationId": "createTemplateContext", + "responses": { + "200": { + "schema": {"$ref": "#/definitions/TemplateContextResponse"}, + "description": "Template context created" + }, + "400": { + "schema": {"$ref": "#/definitions/ErrorResponse"}, + "description": "Template context already exists" + } + }, + "parameters": [{ + "schema": {"$ref": "#/definitions/TemplateContextRequest"}, + "in": "body", + "name": "templateRequest", + "description": "The template request", + "required": true + }], + "tags": ["Merge"], + "consumes": ["application/json;charset=UTF-8"] + }, + "put": { + "summary": "Update template context", + "security": [{"oauth2schema": ["global"]}], + "produces": ["application/json;charset=UTF-8"], + "description": "Update an existing template context for your environment", + "operationId": "updateTemplateContext", + "responses": { + "200": { + "schema": {"$ref": "#/definitions/TemplateContextResponse"}, + "description": "Template context updated" + }, + "500": { + "schema": {"$ref": "#/definitions/ErrorResponse"}, + "description": "Internal server error" + }, + "404": { + "schema": {"$ref": "#/definitions/ErrorResponse"}, + "description": "Template context not found" + } + }, + "parameters": [{ + "schema": {"$ref": "#/definitions/TemplateContextRequest"}, + "in": "body", + "name": "templateContextRequest", + "description": "templateContextRequest", + "required": true + }], + "tags": ["Merge"], + "consumes": ["application/json;charset=UTF-8"] + } + }, + "/template-processor/merge/0.1/jobs": { + "get": { + "summary": "Get all jobs", + "security": [{"oauth2schema": ["global"]}], + "produces": ["application/json;charset=UTF-8"], + "description": "Get all office text job definitions and their current state.", + "operationId": "getJobs", + "responses": {"200": { + "schema": { + "type": "array", + "items": {"$ref": "#/definitions/MergeJobResponse"} + }, + "description": "All office text jobs that have not been deleted" + }}, + "parameters": [{ + "in": "query", + "name": "status", + "description": "A list of status to filter on.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "CREATED", + "UPDATED", + "PROCESSING", + "DONE", + "ERROR", + "DELETED" + ] + }, + "collectionFormat": "multi", + "required": false, + "enum": [ + "CREATED", + "UPDATED", + "PROCESSING", + "DONE", + "ERROR", + "DELETED" + ] + }], + "tags": ["Merge"], + "consumes": ["application/json"] + }, + "put": { + "summary": "Submit merge job for processing", + "security": [{"oauth2schema": ["global"]}], + "produces": ["application/json;charset=UTF-8"], + "description": "Submit merge job run.", + "operationId": "submitJob", + "responses": {"200": { + "schema": {"$ref": "#/definitions/MergeJobResponse"}, + "description": "Merge job submitted" + }}, + "parameters": [{ + "schema": {"$ref": "#/definitions/MergeSettings"}, + "in": "body", + "name": "mergesettings", + "description": "The merge- and output settings", + "required": true + }], + "tags": ["Merge"], + "consumes": ["application/json;charset=UTF-8"] + } + } + }, + "host": "gw.api.cloud.sphereon.com", + "schemes": ["https"], + "securityDefinitions": {"oauth2schema": { + "tokenUrl": "https://gw.api.cloud.sphereon.com/token", + "scopes": {"global": "accessEverything"}, + "type": "oauth2", + "flow": "application" + }}, + "definitions": { + "Lifecycle": { + "description": "Lifecycle settings. When no lifecycle settings are supplied, the job and files will be deleted directly after retrieval of the file", + "type": "object", + "properties": { + "actionTime": { + "format": "date-time", + "description": "The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation", + "type": "string" + }, + "action": { + "type": "string", + "enum": ["DELETE"] + }, + "type": { + "type": "string", + "enum": [ + "RETRIEVAL", + "TIME" + ] + } + } + }, + "Error": { + "description": "An error", + "type": "object", + "required": [ + "code", + "level", + "message" + ], + "properties": { + "code": {"type": "string"}, + "level": { + "type": "string", + "enum": [ + "INFO", + "WARNING", + "FATAL" + ] + }, + "cause": {"$ref": "#/definitions/Error"}, + "message": {"type": "string"} + } + }, + "DataSetResponse": { + "description": "The merge template response.", + "type": "object", + "required": [ + "id", + "status" + ], + "properties": { + "completionTime": { + "format": "date-time", + "description": "The completion date/time of this template in ISO 8601 format", + "readOnly": true, + "type": "string" + }, + "creationTime": { + "format": "date-time", + "description": "The creation date/time of this template in ISO 8601 format", + "readOnly": true, + "type": "string" + }, + "id": { + "description": "Unique dataset id", + "type": "string" + }, + "status": { + "description": "The status of the template", + "readOnly": true, + "type": "string", + "enum": [ + "CREATED", + "UPDATED", + "DELETED" + ] + } + } + }, + "StreamLocation": { + "description": "Location record of data stream", + "type": "object", + "properties": { + "folderPath": {"type": "string"}, + "originalFileName": {"type": "string"}, + "containerId": {"type": "string"}, + "fileId": {"type": "string"} + } + }, + "TemplateContext": { + "type": "object", + "required": ["templateType"], + "properties": { + "templateType": { + "type": "string", + "enum": [ + "OFFICE", + "FREEMARKER" + ] + }, + "templateFileLocations": { + "description": "The template files (versioned)", + "additionalProperties": {"$ref": "#/definitions/StreamLocation"}, + "type": "object" + }, + "description": { + "description": "The template description", + "type": "string" + }, + "ownerInfo": {"$ref": "#/definitions/OwnerInfo"}, + "id": {"type": "string"}, + "templateId": { + "description": "The template context id", + "type": "string" + } + } + }, + "ErrorResponse": { + "description": "The error response", + "type": "object", + "properties": {"errors": { + "type": "array", + "items": {"$ref": "#/definitions/Error"} + }} + }, + "TemplateContextRequest": { + "description": "The merge template request.", + "type": "object", + "required": ["templateType"], + "properties": { + "templateType": { + "type": "string", + "enum": [ + "OFFICE", + "FREEMARKER" + ] + }, + "description": {"type": "string"}, + "ownerInfo": {"$ref": "#/definitions/OwnerInfo"}, + "templateId": { + "description": "The template context id", + "type": "string" + } + } + }, + "TemplateContextResponse": { + "description": "The merge template response.", + "type": "object", + "required": [ + "id", + "status" + ], + "properties": { + "creationTime": { + "format": "date-time", + "description": "The creation date/time of this response in ISO 8601 format", + "readOnly": true, + "type": "string" + }, + "context": {"$ref": "#/definitions/TemplateContext"}, + "id": { + "description": "Unique template context id", + "type": "string" + }, + "status": { + "description": "The status of the template", + "readOnly": true, + "type": "string", + "enum": [ + "CREATED", + "UPDATED", + "DELETED", + "PROCESSING" + ] + } + } + }, + "OutputSettings": { + "description": "Output settings", + "type": "object", + "properties": { + "deliveryFormat": { + "type": "string", + "enum": [ + "PLAIN", + "ZIP", + "_7ZIP" + ] + }, + "outputFormat": { + "type": "string", + "enum": [ + "DOC", + "DOCX", + "RTF", + "PDF", + "XPS", + "SVG", + "HTML", + "ODT", + "TIFF", + "PNG", + "BMP", + "JPEG", + "TXT", + "XML", + "JSON", + "DEFAULT" + ] + } + } + }, + "MergeJob": { + "description": "The merge job. Has access to the job merge data.", + "type": "object", + "required": [ + "jobId", + "resultStreams", + "status" + ], + "properties": { + "resultFolderPath": { + "description": "The target folder path of result files", + "type": "string" + }, + "completionTime": { + "format": "date-time", + "description": "The completion date/time of this job in ISO 8601 format", + "readOnly": true, + "type": "string" + }, + "jobId": { + "description": "The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation", + "type": "string" + }, + "resultContainerId": { + "description": "The target container id of result files", + "type": "string" + }, + "creationTime": { + "format": "date-time", + "description": "The creation date/time of this job in ISO 8601 format", + "readOnly": true, + "type": "string" + }, + "dataSetId": { + "description": "Data set id", + "type": "string" + }, + "resultStreams": { + "description": "The storage locations of the result files.", + "type": "array", + "items": {"$ref": "#/definitions/StreamLocation"} + }, + "headerDataSetIds": { + "description": "Header data set ids", + "readOnly": true, + "type": "array", + "items": {"type": "string"} + }, + "mergeSettings": {"$ref": "#/definitions/MergeSettings"}, + "statusMessage": { + "description": "A status message, which can be informational, warning or error. A message here does not indicate an error perse", + "readOnly": true, + "type": "string" + }, + "status": { + "description": "The status of the job", + "readOnly": true, + "type": "string", + "enum": [ + "CREATED", + "UPDATED", + "PROCESSING", + "DONE", + "ERROR", + "DELETED" + ] + } + } + }, + "OwnerInfo": { + "description": "Owner info", + "type": "object", + "properties": { + "phone": { + "description": "The owner's phone number", + "type": "string" + }, + "companyDepartment": { + "description": "The owner's company/department", + "type": "string" + }, + "name": { + "description": "The owner's name", + "type": "string" + }, + "email": { + "description": "The owner's email address", + "type": "string" + } + } + }, + "MergeSettings": { + "description": "Merge settings", + "type": "object", + "required": [ + "dataSetId", + "outputSettings", + "resultStreamLocation", + "templateId" + ], + "properties": { + "lifecycle": {"$ref": "#/definitions/Lifecycle"}, + "mergeResult": { + "type": "string", + "enum": [ + "SINGLE_FILE", + "SEPARATE_FILES" + ] + }, + "dataSetId": { + "description": "Data set id", + "type": "string" + }, + "engine": { + "type": "string", + "enum": [ + "BASIC", + "PREMIUM" + ] + }, + "headerDataSetIds": { + "description": "optional header data set ids", + "type": "array", + "items": {"type": "string"} + }, + "templateVersion": { + "format": "int32", + "description": "Template version", + "type": "integer" + }, + "resultStreamLocation": { + "description": "The output location of the result files.", + "$ref": "#/definitions/StreamLocation" + }, + "templateId": { + "description": "Template id", + "type": "string" + }, + "outputSettings": {"$ref": "#/definitions/OutputSettings"} + } + }, + "MergeJobResponse": { + "description": "The merge job response.", + "type": "object", + "required": [ + "jobId", + "status" + ], + "properties": { + "jobId": { + "description": "The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation", + "type": "string" + }, + "job": {"$ref": "#/definitions/MergeJob"}, + "statusMessage": { + "description": "A status message, which can be informational, warning or error. AA message here does not indicate an error perse", + "readOnly": true, + "type": "string" + }, + "status": { + "description": "The status of the job", + "readOnly": true, + "type": "string", + "enum": [ + "CREATED", + "UPDATED", + "PROCESSING", + "DONE", + "ERROR", + "DELETED" + ] + } + } + } + }, + "swagger": "2.0", + "info": { + "license": { + "name": "Apache License Version 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0" + }, + "contact": { + "name": "Sphereon DevOps Team", + "url": "https://sphereon.com", + "email": "dev@sphereon.com" + }, + "description": "The Office Text API can generate office documents from a template and a JSON data file<<\/b>\r\n\r\nThe flow is generally as follows:\r\n\r\n\r\nInteractive testing: <\/b>A web based test console is available in the Sphereon API Store<\/a>", + "termsOfService": "https://sphereon.com", + "title": "OfficeTextMerge", + "version": "0.1" + }, + "tags": [{ + "name": "Merge", + "description": "Merge API" + }] +} \ No newline at end of file From 66d6df093b97770039b33c3d41fe874d92f449c4 Mon Sep 17 00:00:00 2001 From: Sander Postma Date: Tue, 5 Sep 2017 15:54:37 +0200 Subject: [PATCH 02/10] Regenerated sdk --- .gitignore | 45 +- csharp-net35/README.md | 49 +- .../Sphereon.SDK.TemplateProcessor.sln | 10 +- csharp-net35/docs/AllApi.md | 874 ++ csharp-net35/docs/DataSetApi.md | 140 + csharp-net35/docs/JobApi.md | 344 + csharp-net35/docs/MergeJob.md | 3 +- csharp-net35/docs/MergeSettings.md | 2 +- csharp-net35/docs/StorageLocation.md | 10 + csharp-net35/docs/StreamLocation.md | 2 +- csharp-net35/docs/TemplateApi.md | 340 + csharp-net35/docs/TemplateContext.md | 1 + .../Api/AllApiTests.cs | 241 + .../Api/DataSetApiTests.cs | 105 + .../Api/JobApiTests.cs | 144 + .../Api/TemplateApiTests.cs | 142 + .../Model/StorageLocationTests.cs | 98 + ...Sphereon.SDK.TemplateProcessor.Test.csproj | 6 +- .../Api/AllApi.cs | 1491 +++ .../Api/DataSetApi.cs | 355 + .../Api/JobApi.cs | 678 ++ .../Api/TemplateApi.cs | 664 ++ .../Client/ApiClient.cs | 4 +- .../Client/ApiException.cs | 4 +- .../Client/ApiResponse.cs | 4 +- .../Client/Configuration.cs | 4 +- .../Client/ExceptionFactory.cs | 4 +- .../Client/IApiAccessor.cs | 4 +- .../Model/DataSetResponse.cs | 4 +- .../Model/Error.cs | 4 +- .../Model/ErrorResponse.cs | 4 +- .../Model/Lifecycle.cs | 4 +- .../Model/MergeJob.cs | 54 +- .../Model/MergeJobResponse.cs | 4 +- .../Model/MergeSettings.cs | 44 +- .../Model/OutputSettings.cs | 4 +- .../Model/OwnerInfo.cs | 4 +- .../Model/StorageLocation.cs | 141 + .../Model/StreamLocation.cs | 36 +- .../Model/TemplateContext.cs | 22 +- .../Model/TemplateContextRequest.cs | 4 +- .../Model/TemplateContextResponse.cs | 4 +- .../Sphereon.SDK.TemplateProcessor.csproj | 6 +- csharp-net45/README.md | 49 +- .../Sphereon.SDK.TemplateProcessor.sln | 10 +- csharp-net45/docs/AllApi.md | 874 ++ csharp-net45/docs/DataSetApi.md | 140 + csharp-net45/docs/JobApi.md | 344 + csharp-net45/docs/MergeJob.md | 3 +- csharp-net45/docs/MergeSettings.md | 2 +- csharp-net45/docs/StorageLocation.md | 10 + csharp-net45/docs/StreamLocation.md | 2 +- csharp-net45/docs/TemplateApi.md | 340 + csharp-net45/docs/TemplateContext.md | 1 + .../Api/AllApiTests.cs | 241 + .../Api/DataSetApiTests.cs | 105 + .../Api/JobApiTests.cs | 144 + .../Api/TemplateApiTests.cs | 142 + .../Model/StorageLocationTests.cs | 98 + ...Sphereon.SDK.TemplateProcessor.Test.csproj | 6 +- .../Api/AllApi.cs | 2845 ++++++ .../Api/DataSetApi.cs | 562 ++ .../Api/JobApi.cs | 1211 +++ .../Api/TemplateApi.cs | 1183 +++ .../Client/ApiClient.cs | 4 +- .../Client/ApiException.cs | 4 +- .../Client/ApiResponse.cs | 4 +- .../Client/Configuration.cs | 4 +- .../Client/ExceptionFactory.cs | 4 +- .../Client/IApiAccessor.cs | 4 +- .../Model/DataSetResponse.cs | 4 +- .../Model/Error.cs | 4 +- .../Model/ErrorResponse.cs | 4 +- .../Model/Lifecycle.cs | 4 +- .../Model/MergeJob.cs | 54 +- .../Model/MergeJobResponse.cs | 4 +- .../Model/MergeSettings.cs | 44 +- .../Model/OutputSettings.cs | 4 +- .../Model/OwnerInfo.cs | 4 +- .../Model/StorageLocation.cs | 141 + .../Model/StreamLocation.cs | 36 +- .../Model/TemplateContext.cs | 22 +- .../Model/TemplateContextRequest.cs | 4 +- .../Model/TemplateContextResponse.cs | 4 +- .../Sphereon.SDK.TemplateProcessor.csproj | 6 +- html-docs/index.html | 7955 +++++++++++++++-- java8-jersey2/docs/AllApi.md | 718 ++ java8-jersey2/docs/DataSetApi.md | 116 + java8-jersey2/docs/JobApi.md | 284 + java8-jersey2/docs/MergeJob.md | 3 +- java8-jersey2/docs/MergeSettings.md | 2 +- java8-jersey2/docs/StorageLocation.md | 11 + java8-jersey2/docs/StreamLocation.md | 2 +- java8-jersey2/docs/TemplateApi.md | 280 + java8-jersey2/docs/TemplateContext.md | 1 + java8-jersey2/pom.xml | 11 +- .../sdk/template_processor/api/AllApi.java | 599 ++ .../template_processor/api/DataSetApi.java | 121 + .../sdk/template_processor/api/JobApi.java | 253 + .../sdk/template_processor/api/MergeApi.java | 2 +- .../template_processor/api/TemplateApi.java | 257 + .../template_processor/handler/ApiClient.java | 2 +- .../handler/ApiException.java | 6 +- .../handler/Configuration.java | 6 +- .../sdk/template_processor/handler/JSON.java | 2 +- .../sdk/template_processor/handler/Pair.java | 6 +- .../handler/RFC3339DateFormat.java | 4 +- .../handler/StringUtil.java | 6 +- .../handler/auth/ApiKeyAuth.java | 6 +- .../handler/auth/Authentication.java | 4 +- .../handler/auth/HttpBasicAuth.java | 6 +- .../handler/auth/OAuth.java | 6 +- .../handler/auth/OAuthFlow.java | 4 +- .../model/DataSetResponse.java | 6 +- .../sdk/template_processor/model/Error.java | 6 +- .../model/ErrorResponse.java | 6 +- .../template_processor/model/Lifecycle.java | 6 +- .../template_processor/model/MergeJob.java | 80 +- .../model/MergeJobResponse.java | 6 +- .../model/MergeSettings.java | 56 +- .../model/OutputSettings.java | 6 +- .../template_processor/model/OwnerInfo.java | 6 +- .../model/StorageLocation.java | 125 + .../model/StreamLocation.java | 52 +- .../model/TemplateContext.java | 32 +- .../model/TemplateContextRequest.java | 6 +- .../model/TemplateContextResponse.java | 6 +- .../template_processor/api/AllApiTest.java | 262 + .../api/DataSetApiTest.java | 78 + .../template_processor/api/JobApiTest.java | 131 + .../api/TemplateApiTest.java | 129 + java8-okhttp-gson/docs/AllApi.md | 718 ++ java8-okhttp-gson/docs/DataSetApi.md | 116 + java8-okhttp-gson/docs/JobApi.md | 284 + java8-okhttp-gson/docs/MergeJob.md | 3 +- java8-okhttp-gson/docs/MergeSettings.md | 2 +- java8-okhttp-gson/docs/StorageLocation.md | 11 + java8-okhttp-gson/docs/StreamLocation.md | 2 +- java8-okhttp-gson/docs/TemplateApi.md | 280 + java8-okhttp-gson/docs/TemplateContext.md | 1 + .../sdk/template_processor/api/AllApi.java | 1484 +++ .../template_processor/api/DataSetApi.java | 282 + .../sdk/template_processor/api/JobApi.java | 616 ++ .../template_processor/api/TemplateApi.java | 615 ++ .../handler/ApiCallback.java | 4 +- .../template_processor/handler/ApiClient.java | 4 +- .../handler/ApiException.java | 6 +- .../handler/ApiResponse.java | 4 +- .../handler/Configuration.java | 6 +- .../sdk/template_processor/handler/JSON.java | 4 +- .../sdk/template_processor/handler/Pair.java | 6 +- .../handler/ProgressRequestBody.java | 4 +- .../handler/ProgressResponseBody.java | 4 +- .../handler/StringUtil.java | 6 +- .../handler/auth/ApiKeyAuth.java | 6 +- .../handler/auth/Authentication.java | 4 +- .../handler/auth/HttpBasicAuth.java | 4 +- .../handler/auth/OAuth.java | 6 +- .../handler/auth/OAuthFlow.java | 4 +- .../model/DataSetResponse.java | 6 +- .../sdk/template_processor/model/Error.java | 6 +- .../model/ErrorResponse.java | 6 +- .../template_processor/model/Lifecycle.java | 6 +- .../template_processor/model/MergeJob.java | 80 +- .../model/MergeJobResponse.java | 6 +- .../model/MergeSettings.java | 56 +- .../model/OutputSettings.java | 6 +- .../template_processor/model/OwnerInfo.java | 6 +- .../model/StorageLocation.java | 124 + .../model/StreamLocation.java | 52 +- .../model/TemplateContext.java | 32 +- .../model/TemplateContextRequest.java | 6 +- .../model/TemplateContextResponse.java | 6 +- .../template_processor/api/AllApiTest.java | 264 + .../api/DataSetApiTest.java | 78 + .../template_processor/api/JobApiTest.java | 131 + .../api/TemplateApiTest.java | 129 + java8-retrofit2/docs/AllApi.md | 718 ++ java8-retrofit2/docs/DataSetApi.md | 116 + java8-retrofit2/docs/JobApi.md | 284 + java8-retrofit2/docs/MergeJob.md | 3 +- java8-retrofit2/docs/MergeSettings.md | 2 +- java8-retrofit2/docs/StorageLocation.md | 11 + java8-retrofit2/docs/StreamLocation.md | 2 +- java8-retrofit2/docs/TemplateApi.md | 280 + java8-retrofit2/docs/TemplateContext.md | 1 + .../sdk/template_processor/api/AllApi.java | 224 + .../template_processor/api/DataSetApi.java | 50 + .../sdk/template_processor/api/JobApi.java | 100 + .../template_processor/api/TemplateApi.java | 97 + .../handler/StringUtil.java | 6 +- .../handler/auth/OAuthFlow.java | 4 +- .../model/DataSetResponse.java | 6 +- .../sdk/template_processor/model/Error.java | 6 +- .../model/ErrorResponse.java | 6 +- .../template_processor/model/Lifecycle.java | 6 +- .../template_processor/model/MergeJob.java | 80 +- .../model/MergeJobResponse.java | 6 +- .../model/MergeSettings.java | 56 +- .../model/OutputSettings.java | 6 +- .../template_processor/model/OwnerInfo.java | 6 +- .../model/StorageLocation.java | 124 + .../model/StreamLocation.java | 52 +- .../model/TemplateContext.java | 32 +- .../model/TemplateContextRequest.java | 6 +- .../model/TemplateContextResponse.java | 6 +- .../template_processor/api/AllApiTest.java | 206 + .../api/DataSetApiTest.java | 53 + .../template_processor/api/JobApiTest.java | 97 + .../api/TemplateApiTest.java | 95 + javascript/README.md | 81 +- javascript/docs/AllApi.md | 699 ++ javascript/docs/DataSetApi.md | 112 + javascript/docs/DataSetResponse.md | 2 +- javascript/docs/Error.md | 2 +- javascript/docs/ErrorResponse.md | 2 +- javascript/docs/JobApi.md | 280 + javascript/docs/Lifecycle.md | 2 +- javascript/docs/MergeJob.md | 5 +- javascript/docs/MergeJobResponse.md | 2 +- javascript/docs/MergeSettings.md | 4 +- javascript/docs/OutputSettings.md | 2 +- javascript/docs/OwnerInfo.md | 2 +- javascript/docs/StorageLocation.md | 9 + javascript/docs/StreamLocation.md | 4 +- javascript/docs/TemplateApi.md | 271 + javascript/docs/TemplateContext.md | 3 +- javascript/docs/TemplateContextRequest.md | 2 +- javascript/docs/TemplateContextResponse.md | 2 +- javascript/package.json | 4 +- .../SphereonTemplateProcessor/ApiClient.js | 10 +- .../SphereonTemplateProcessor/api/AllApi.js | 672 ++ .../api/DataSetApi.js | 152 + .../SphereonTemplateProcessor/api/JobApi.js | 300 + .../api/TemplateApi.js | 296 + .../src/SphereonTemplateProcessor/index.js | 48 +- .../model/DataSetResponse.js | 10 +- .../SphereonTemplateProcessor/model/Error.js | 10 +- .../model/ErrorResponse.js | 10 +- .../model/Lifecycle.js | 10 +- .../model/MergeJob.js | 43 +- .../model/MergeJobResponse.js | 10 +- .../model/MergeSettings.js | 38 +- .../model/OutputSettings.js | 10 +- .../model/OwnerInfo.js | 10 +- .../model/StorageLocation.js | 99 + .../model/StreamLocation.js | 24 +- .../model/TemplateContext.js | 25 +- .../model/TemplateContextRequest.js | 10 +- .../model/TemplateContextResponse.js | 10 +- javascript/test/api/AllApi.spec.js | 194 + javascript/test/api/DataSetApi.spec.js | 84 + javascript/test/api/JobApi.spec.js | 114 + javascript/test/api/TemplateApi.spec.js | 114 + javascript/test/model/StorageLocation.spec.js | 82 + swagger.sdk.json | 604 +- 256 files changed, 37176 insertions(+), 1990 deletions(-) create mode 100644 csharp-net35/docs/AllApi.md create mode 100644 csharp-net35/docs/DataSetApi.md create mode 100644 csharp-net35/docs/JobApi.md create mode 100644 csharp-net35/docs/StorageLocation.md create mode 100644 csharp-net35/docs/TemplateApi.md create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Api/AllApiTests.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Api/DataSetApiTests.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Api/JobApiTests.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Api/TemplateApiTests.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/StorageLocationTests.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Api/AllApi.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Api/DataSetApi.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Api/JobApi.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Api/TemplateApi.cs create mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/StorageLocation.cs create mode 100644 csharp-net45/docs/AllApi.md create mode 100644 csharp-net45/docs/DataSetApi.md create mode 100644 csharp-net45/docs/JobApi.md create mode 100644 csharp-net45/docs/StorageLocation.md create mode 100644 csharp-net45/docs/TemplateApi.md create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Api/AllApiTests.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Api/DataSetApiTests.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Api/JobApiTests.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Api/TemplateApiTests.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Model/StorageLocationTests.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Api/AllApi.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Api/DataSetApi.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Api/JobApi.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Api/TemplateApi.cs create mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/StorageLocation.cs create mode 100644 java8-jersey2/docs/AllApi.md create mode 100644 java8-jersey2/docs/DataSetApi.md create mode 100644 java8-jersey2/docs/JobApi.md create mode 100644 java8-jersey2/docs/StorageLocation.md create mode 100644 java8-jersey2/docs/TemplateApi.md create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/AllApi.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/DataSetApi.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/JobApi.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/TemplateApi.java create mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/StorageLocation.java create mode 100644 java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/AllApiTest.java create mode 100644 java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/DataSetApiTest.java create mode 100644 java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/JobApiTest.java create mode 100644 java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/TemplateApiTest.java create mode 100644 java8-okhttp-gson/docs/AllApi.md create mode 100644 java8-okhttp-gson/docs/DataSetApi.md create mode 100644 java8-okhttp-gson/docs/JobApi.md create mode 100644 java8-okhttp-gson/docs/StorageLocation.md create mode 100644 java8-okhttp-gson/docs/TemplateApi.md create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/AllApi.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/DataSetApi.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/JobApi.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/TemplateApi.java create mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/StorageLocation.java create mode 100644 java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/AllApiTest.java create mode 100644 java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/DataSetApiTest.java create mode 100644 java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/JobApiTest.java create mode 100644 java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/TemplateApiTest.java create mode 100644 java8-retrofit2/docs/AllApi.md create mode 100644 java8-retrofit2/docs/DataSetApi.md create mode 100644 java8-retrofit2/docs/JobApi.md create mode 100644 java8-retrofit2/docs/StorageLocation.md create mode 100644 java8-retrofit2/docs/TemplateApi.md create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/AllApi.java create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/DataSetApi.java create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/JobApi.java create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/TemplateApi.java create mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/StorageLocation.java create mode 100644 java8-retrofit2/src/test/java/com/sphereon/sdk/template_processor/api/AllApiTest.java create mode 100644 java8-retrofit2/src/test/java/com/sphereon/sdk/template_processor/api/DataSetApiTest.java create mode 100644 java8-retrofit2/src/test/java/com/sphereon/sdk/template_processor/api/JobApiTest.java create mode 100644 java8-retrofit2/src/test/java/com/sphereon/sdk/template_processor/api/TemplateApiTest.java create mode 100644 javascript/docs/AllApi.md create mode 100644 javascript/docs/DataSetApi.md create mode 100644 javascript/docs/JobApi.md create mode 100644 javascript/docs/StorageLocation.md create mode 100644 javascript/docs/TemplateApi.md create mode 100644 javascript/src/SphereonTemplateProcessor/api/AllApi.js create mode 100644 javascript/src/SphereonTemplateProcessor/api/DataSetApi.js create mode 100644 javascript/src/SphereonTemplateProcessor/api/JobApi.js create mode 100644 javascript/src/SphereonTemplateProcessor/api/TemplateApi.js create mode 100644 javascript/src/SphereonTemplateProcessor/model/StorageLocation.js create mode 100644 javascript/test/api/AllApi.spec.js create mode 100644 javascript/test/api/DataSetApi.spec.js create mode 100644 javascript/test/api/JobApi.spec.js create mode 100644 javascript/test/api/TemplateApi.spec.js create mode 100644 javascript/test/model/StorageLocation.spec.js diff --git a/.gitignore b/.gitignore index aa7401b..fc3a0b9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,29 +1,42 @@ +config-db/ + +# Compiled class file *.class +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ # Package Files # *.jar *.war *.ear +*.zip +*.tar.gz +*.rar # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* -# Log files -log.* - -#Intellij -*.iml -#Maven target/ -pom.xml.tag -pom.xml.releaseBackup -pom.xml.versionsBackup -pom.xml.next -release.properties -dependency-reduced-pom.xml -buildNumber.properties -.mvn/timing.properties - -applog* +!.mvn/wrapper/maven-wrapper.jar + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr diff --git a/csharp-net35/README.md b/csharp-net35/README.md index 23c3d58..d5dbb12 100644 --- a/csharp-net35/README.md +++ b/csharp-net35/README.md @@ -1,12 +1,12 @@ -# Sphereon.SDK.TemplateProcessor - the C# library for the OfficeTextMerge +# Sphereon.SDK.TemplateProcessor - the C# library for the Template-Processor -The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store +The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store This C# SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - API version: 0.1 - SDK version: 1.0.0 -- Build date: 2017-07-28T16:30:06.518+02:00 +- Build date: 2017-08-31T12:07:52.039+02:00 - Build package: class io.swagger.codegen.languages.CSharpClientCodegen For more information, please visit [https://sphereon.com](https://sphereon.com) @@ -57,7 +57,7 @@ namespace Example // Configure OAuth2 access token for authorization: oauth2schema Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new MergeApi(); + var apiInstance = new AllApi(); var payload = payload_example; // string | The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] try @@ -68,7 +68,7 @@ namespace Example } catch (Exception e) { - Debug.Print("Exception when calling MergeApi.CreateDataSet: " + e.Message ); + Debug.Print("Exception when calling AllApi.CreateDataSet: " + e.Message ); } } } @@ -82,19 +82,31 @@ All URIs are relative to *https://gw.api.cloud.sphereon.com/* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*MergeApi* | [**CreateDataSet**](docs/MergeApi.md#createdataset) | **POST** /template-processor/merge/0.1/datasets | Store dataset -*MergeApi* | [**CreateTemplateContext**](docs/MergeApi.md#createtemplatecontext) | **POST** /template-processor/merge/0.1/templates | Create template context -*MergeApi* | [**DeleteDataSet**](docs/MergeApi.md#deletedataset) | **DELETE** /template-processor/merge/0.1/datasets/{dataSetId} | Delete a stored data set -*MergeApi* | [**DeleteJob**](docs/MergeApi.md#deletejob) | **DELETE** /template-processor/merge/0.1/jobs/{jobId} | Delete a job manually -*MergeApi* | [**DeleteTemplateContext**](docs/MergeApi.md#deletetemplatecontext) | **DELETE** /template-processor/merge/0.1/templates/{templateId} | Delete template context -*MergeApi* | [**GetJob**](docs/MergeApi.md#getjob) | **GET** /template-processor/merge/0.1/jobs/{jobId} | Job definition and state -*MergeApi* | [**GetJobs**](docs/MergeApi.md#getjobs) | **GET** /template-processor/merge/0.1/jobs | Get all jobs -*MergeApi* | [**GetResultStreamById**](docs/MergeApi.md#getresultstreambyid) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file -*MergeApi* | [**GetResultStreamsAsContainer**](docs/MergeApi.md#getresultstreamsascontainer) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/container | Get the result file -*MergeApi* | [**GetTemplateContext**](docs/MergeApi.md#gettemplatecontext) | **GET** /template-processor/merge/0.1/templates/{templateId} | Get template context -*MergeApi* | [**SubmitJob**](docs/MergeApi.md#submitjob) | **PUT** /template-processor/merge/0.1/jobs | Submit merge job for processing -*MergeApi* | [**UpdateTemplateContext**](docs/MergeApi.md#updatetemplatecontext) | **PUT** /template-processor/merge/0.1/templates | Update template context -*MergeApi* | [**UploadTemplateFile**](docs/MergeApi.md#uploadtemplatefile) | **POST** /template-processor/merge/0.1/templates/{templateId} | Upload template file +*AllApi* | [**CreateDataSet**](docs/AllApi.md#createdataset) | **POST** /template/processor/0.1/datasets | Store dataset +*AllApi* | [**CreateTemplateContext**](docs/AllApi.md#createtemplatecontext) | **POST** /template/processor/0.1/templates | Create template context +*AllApi* | [**DeleteDataSet**](docs/AllApi.md#deletedataset) | **DELETE** /template/processor/0.1/datasets/{dataSetId} | Delete a stored data set +*AllApi* | [**DeleteJob**](docs/AllApi.md#deletejob) | **DELETE** /template/processor/0.1/jobs/{jobId} | Delete a job manually +*AllApi* | [**DeleteTemplateContext**](docs/AllApi.md#deletetemplatecontext) | **DELETE** /template/processor/0.1/templates/{templateId} | Delete template context +*AllApi* | [**GetJob**](docs/AllApi.md#getjob) | **GET** /template/processor/0.1/jobs/{jobId} | Job definition and state +*AllApi* | [**GetJobs**](docs/AllApi.md#getjobs) | **GET** /template/processor/0.1/jobs | Get all jobs +*AllApi* | [**GetResultStreamById**](docs/AllApi.md#getresultstreambyid) | **PUT** /template/processor/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file +*AllApi* | [**GetResultStreamsAsContainer**](docs/AllApi.md#getresultstreamsascontainer) | **PUT** /template/processor/0.1/jobs/{jobId}/result/container | Get the result file +*AllApi* | [**GetTemplateContext**](docs/AllApi.md#gettemplatecontext) | **GET** /template/processor/0.1/templates/{templateId} | Get template context +*AllApi* | [**SubmitJob**](docs/AllApi.md#submitjob) | **PUT** /template/processor/0.1/jobs | Submit merge job for processing +*AllApi* | [**UpdateTemplateContext**](docs/AllApi.md#updatetemplatecontext) | **PUT** /template/processor/0.1/templates | Update template context +*AllApi* | [**UploadTemplateFile**](docs/AllApi.md#uploadtemplatefile) | **POST** /template/processor/0.1/templates/{templateId} | Upload template file +*DataSetApi* | [**CreateDataSet**](docs/DataSetApi.md#createdataset) | **POST** /template/processor/0.1/datasets | Store dataset +*DataSetApi* | [**DeleteDataSet**](docs/DataSetApi.md#deletedataset) | **DELETE** /template/processor/0.1/datasets/{dataSetId} | Delete a stored data set +*JobApi* | [**GetJob**](docs/JobApi.md#getjob) | **GET** /template/processor/0.1/jobs/{jobId} | Job definition and state +*JobApi* | [**GetJobs**](docs/JobApi.md#getjobs) | **GET** /template/processor/0.1/jobs | Get all jobs +*JobApi* | [**GetResultStreamById**](docs/JobApi.md#getresultstreambyid) | **PUT** /template/processor/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file +*JobApi* | [**GetResultStreamsAsContainer**](docs/JobApi.md#getresultstreamsascontainer) | **PUT** /template/processor/0.1/jobs/{jobId}/result/container | Get the result file +*JobApi* | [**SubmitJob**](docs/JobApi.md#submitjob) | **PUT** /template/processor/0.1/jobs | Submit merge job for processing +*TemplateApi* | [**CreateTemplateContext**](docs/TemplateApi.md#createtemplatecontext) | **POST** /template/processor/0.1/templates | Create template context +*TemplateApi* | [**DeleteTemplateContext**](docs/TemplateApi.md#deletetemplatecontext) | **DELETE** /template/processor/0.1/templates/{templateId} | Delete template context +*TemplateApi* | [**GetTemplateContext**](docs/TemplateApi.md#gettemplatecontext) | **GET** /template/processor/0.1/templates/{templateId} | Get template context +*TemplateApi* | [**UpdateTemplateContext**](docs/TemplateApi.md#updatetemplatecontext) | **PUT** /template/processor/0.1/templates | Update template context +*TemplateApi* | [**UploadTemplateFile**](docs/TemplateApi.md#uploadtemplatefile) | **POST** /template/processor/0.1/templates/{templateId} | Upload template file @@ -109,6 +121,7 @@ Class | Method | HTTP request | Description - [Model.MergeSettings](docs/MergeSettings.md) - [Model.OutputSettings](docs/OutputSettings.md) - [Model.OwnerInfo](docs/OwnerInfo.md) + - [Model.StorageLocation](docs/StorageLocation.md) - [Model.StreamLocation](docs/StreamLocation.md) - [Model.TemplateContext](docs/TemplateContext.md) - [Model.TemplateContextRequest](docs/TemplateContextRequest.md) diff --git a/csharp-net35/Sphereon.SDK.TemplateProcessor.sln b/csharp-net35/Sphereon.SDK.TemplateProcessor.sln index 362d10f..71fbdc9 100644 --- a/csharp-net35/Sphereon.SDK.TemplateProcessor.sln +++ b/csharp-net35/Sphereon.SDK.TemplateProcessor.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 VisualStudioVersion = 12.0.0.0 MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sphereon.SDK.TemplateProcessor", "src\Sphereon.SDK.TemplateProcessor\Sphereon.SDK.TemplateProcessor.csproj", "{034DD73B-80EA-4824-9D3A-776B31B31505}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sphereon.SDK.TemplateProcessor", "src\Sphereon.SDK.TemplateProcessor\Sphereon.SDK.TemplateProcessor.csproj", "{B5CDE14A-8AE8-4B48-A410-2F9C28AA60A9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sphereon.SDK.TemplateProcessor.Test", "src\Sphereon.SDK.TemplateProcessor.Test\Sphereon.SDK.TemplateProcessor.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" EndProject @@ -12,10 +12,10 @@ Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution -{034DD73B-80EA-4824-9D3A-776B31B31505}.Debug|Any CPU.ActiveCfg = Debug|Any CPU -{034DD73B-80EA-4824-9D3A-776B31B31505}.Debug|Any CPU.Build.0 = Debug|Any CPU -{034DD73B-80EA-4824-9D3A-776B31B31505}.Release|Any CPU.ActiveCfg = Release|Any CPU -{034DD73B-80EA-4824-9D3A-776B31B31505}.Release|Any CPU.Build.0 = Release|Any CPU +{B5CDE14A-8AE8-4B48-A410-2F9C28AA60A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{B5CDE14A-8AE8-4B48-A410-2F9C28AA60A9}.Debug|Any CPU.Build.0 = Debug|Any CPU +{B5CDE14A-8AE8-4B48-A410-2F9C28AA60A9}.Release|Any CPU.ActiveCfg = Release|Any CPU +{B5CDE14A-8AE8-4B48-A410-2F9C28AA60A9}.Release|Any CPU.Build.0 = Release|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/csharp-net35/docs/AllApi.md b/csharp-net35/docs/AllApi.md new file mode 100644 index 0000000..469bc98 --- /dev/null +++ b/csharp-net35/docs/AllApi.md @@ -0,0 +1,874 @@ +# Sphereon.SDK.TemplateProcessor.Api.AllApi + +All URIs are relative to *https://gw.api.cloud.sphereon.com/* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateDataSet**](AllApi.md#createdataset) | **POST** /template/processor/0.1/datasets | Store dataset +[**CreateTemplateContext**](AllApi.md#createtemplatecontext) | **POST** /template/processor/0.1/templates | Create template context +[**DeleteDataSet**](AllApi.md#deletedataset) | **DELETE** /template/processor/0.1/datasets/{dataSetId} | Delete a stored data set +[**DeleteJob**](AllApi.md#deletejob) | **DELETE** /template/processor/0.1/jobs/{jobId} | Delete a job manually +[**DeleteTemplateContext**](AllApi.md#deletetemplatecontext) | **DELETE** /template/processor/0.1/templates/{templateId} | Delete template context +[**GetJob**](AllApi.md#getjob) | **GET** /template/processor/0.1/jobs/{jobId} | Job definition and state +[**GetJobs**](AllApi.md#getjobs) | **GET** /template/processor/0.1/jobs | Get all jobs +[**GetResultStreamById**](AllApi.md#getresultstreambyid) | **PUT** /template/processor/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file +[**GetResultStreamsAsContainer**](AllApi.md#getresultstreamsascontainer) | **PUT** /template/processor/0.1/jobs/{jobId}/result/container | Get the result file +[**GetTemplateContext**](AllApi.md#gettemplatecontext) | **GET** /template/processor/0.1/templates/{templateId} | Get template context +[**SubmitJob**](AllApi.md#submitjob) | **PUT** /template/processor/0.1/jobs | Submit merge job for processing +[**UpdateTemplateContext**](AllApi.md#updatetemplatecontext) | **PUT** /template/processor/0.1/templates | Update template context +[**UploadTemplateFile**](AllApi.md#uploadtemplatefile) | **POST** /template/processor/0.1/templates/{templateId} | Upload template file + + + +# **CreateDataSet** +> DataSetResponse CreateDataSet (string payload) + +Store dataset + +Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class CreateDataSetExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new AllApi(); + var payload = payload_example; // string | The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] + + try + { + // Store dataset + DataSetResponse result = apiInstance.CreateDataSet(payload); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling AllApi.CreateDataSet: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **payload** | **string**| The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] | + +### Return type + +[**DataSetResponse**](DataSetResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **CreateTemplateContext** +> TemplateContextResponse CreateTemplateContext (TemplateContextRequest templateRequest) + +Create template context + +Create a unique template context for your environment + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class CreateTemplateContextExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new AllApi(); + var templateRequest = new TemplateContextRequest(); // TemplateContextRequest | The template request + + try + { + // Create template context + TemplateContextResponse result = apiInstance.CreateTemplateContext(templateRequest); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling AllApi.CreateTemplateContext: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| The template request | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteDataSet** +> DataSetResponse DeleteDataSet (string dataSetId) + +Delete a stored data set + +Delete a stored data set + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class DeleteDataSetExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new AllApi(); + var dataSetId = dataSetId_example; // string | dataSetId + + try + { + // Delete a stored data set + DataSetResponse result = apiInstance.DeleteDataSet(dataSetId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling AllApi.DeleteDataSet: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dataSetId** | **string**| dataSetId | + +### Return type + +[**DataSetResponse**](DataSetResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteJob** +> MergeJobResponse DeleteJob (string jobId) + +Delete a job manually + +Delete the merge job and all related files + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class DeleteJobExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new AllApi(); + var jobId = jobId_example; // string | jobId + + try + { + // Delete a job manually + MergeJobResponse result = apiInstance.DeleteJob(jobId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling AllApi.DeleteJob: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **string**| jobId | + +### Return type + +[**MergeJobResponse**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteTemplateContext** +> TemplateContextResponse DeleteTemplateContext (string templateId) + +Delete template context + +Delete a template context with all history + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class DeleteTemplateContextExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new AllApi(); + var templateId = templateId_example; // string | templateId + + try + { + // Delete template context + TemplateContextResponse result = apiInstance.DeleteTemplateContext(templateId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling AllApi.DeleteTemplateContext: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **string**| templateId | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetJob** +> MergeJobResponse GetJob (string jobId) + +Job definition and state + +Get the merge job definition and current state. Please not that you can differentiate based on http response status + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class GetJobExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new AllApi(); + var jobId = jobId_example; // string | jobId + + try + { + // Job definition and state + MergeJobResponse result = apiInstance.GetJob(jobId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling AllApi.GetJob: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **string**| jobId | + +### Return type + +[**MergeJobResponse**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetJobs** +> List GetJobs (List status = null) + +Get all jobs + +Get all office text job definitions and their current state. + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class GetJobsExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new AllApi(); + var status = new List(); // List | A list of status to filter on. (optional) + + try + { + // Get all jobs + List<MergeJobResponse> result = apiInstance.GetJobs(status); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling AllApi.GetJobs: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**List**](string.md)| A list of status to filter on. | [optional] + +### Return type + +[**List**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetResultStreamById** +> byte[] GetResultStreamById (string jobId, string streamId, OutputSettings outputSettings = null) + +Get the result file + +Get a merge result document as a binary stream. + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class GetResultStreamByIdExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new AllApi(); + var jobId = jobId_example; // string | jobId + var streamId = streamId_example; // string | streamId + var outputSettings = new OutputSettings(); // OutputSettings | outputSettings (optional) + + try + { + // Get the result file + byte[] result = apiInstance.GetResultStreamById(jobId, streamId, outputSettings); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling AllApi.GetResultStreamById: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **string**| jobId | + **streamId** | **string**| streamId | + **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] + +### Return type + +**byte[]** + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/octet-stream + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetResultStreamsAsContainer** +> byte[] GetResultStreamsAsContainer (string jobId, OutputSettings outputSettings = null) + +Get the result file + +Get all documents inside a compressed container as a binary stream. + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class GetResultStreamsAsContainerExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new AllApi(); + var jobId = jobId_example; // string | jobId + var outputSettings = new OutputSettings(); // OutputSettings | outputSettings (optional) + + try + { + // Get the result file + byte[] result = apiInstance.GetResultStreamsAsContainer(jobId, outputSettings); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling AllApi.GetResultStreamsAsContainer: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **string**| jobId | + **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] + +### Return type + +**byte[]** + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/octet-stream + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetTemplateContext** +> TemplateContextResponse GetTemplateContext (string templateId) + +Get template context + +Get an existing template context + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class GetTemplateContextExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new AllApi(); + var templateId = templateId_example; // string | The template context name unique for your environment + + try + { + // Get template context + TemplateContextResponse result = apiInstance.GetTemplateContext(templateId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling AllApi.GetTemplateContext: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **string**| The template context name unique for your environment | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **SubmitJob** +> MergeJobResponse SubmitJob (MergeSettings mergesettings) + +Submit merge job for processing + +Submit merge job run. + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class SubmitJobExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new AllApi(); + var mergesettings = new MergeSettings(); // MergeSettings | The merge- and output settings + + try + { + // Submit merge job for processing + MergeJobResponse result = apiInstance.SubmitJob(mergesettings); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling AllApi.SubmitJob: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **mergesettings** | [**MergeSettings**](MergeSettings.md)| The merge- and output settings | + +### Return type + +[**MergeJobResponse**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UpdateTemplateContext** +> TemplateContextResponse UpdateTemplateContext (TemplateContext templateContext) + +Update template context + +Update an existing template context for your environment + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class UpdateTemplateContextExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new AllApi(); + var templateContext = new TemplateContext(); // TemplateContext | templateContext + + try + { + // Update template context + TemplateContextResponse result = apiInstance.UpdateTemplateContext(templateContext); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling AllApi.UpdateTemplateContext: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateContext** | [**TemplateContext**](TemplateContext.md)| templateContext | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UploadTemplateFile** +> TemplateContextResponse UploadTemplateFile (string templateId, System.IO.Stream stream) + +Upload template file + +Upload the Office template file + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class UploadTemplateFileExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new AllApi(); + var templateId = templateId_example; // string | The template context name unique for your environment + var stream = new System.IO.Stream(); // System.IO.Stream | The template (file/inputstream) to store + + try + { + // Upload template file + TemplateContextResponse result = apiInstance.UploadTemplateFile(templateId, stream); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling AllApi.UploadTemplateFile: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **string**| The template context name unique for your environment | + **stream** | **System.IO.Stream**| The template (file/inputstream) to store | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/csharp-net35/docs/DataSetApi.md b/csharp-net35/docs/DataSetApi.md new file mode 100644 index 0000000..6d71d37 --- /dev/null +++ b/csharp-net35/docs/DataSetApi.md @@ -0,0 +1,140 @@ +# Sphereon.SDK.TemplateProcessor.Api.DataSetApi + +All URIs are relative to *https://gw.api.cloud.sphereon.com/* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateDataSet**](DataSetApi.md#createdataset) | **POST** /template/processor/0.1/datasets | Store dataset +[**DeleteDataSet**](DataSetApi.md#deletedataset) | **DELETE** /template/processor/0.1/datasets/{dataSetId} | Delete a stored data set + + + +# **CreateDataSet** +> DataSetResponse CreateDataSet (string payload) + +Store dataset + +Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class CreateDataSetExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new DataSetApi(); + var payload = payload_example; // string | The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] + + try + { + // Store dataset + DataSetResponse result = apiInstance.CreateDataSet(payload); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling DataSetApi.CreateDataSet: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **payload** | **string**| The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] | + +### Return type + +[**DataSetResponse**](DataSetResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteDataSet** +> DataSetResponse DeleteDataSet (string dataSetId) + +Delete a stored data set + +Delete a stored data set + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class DeleteDataSetExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new DataSetApi(); + var dataSetId = dataSetId_example; // string | dataSetId + + try + { + // Delete a stored data set + DataSetResponse result = apiInstance.DeleteDataSet(dataSetId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling DataSetApi.DeleteDataSet: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dataSetId** | **string**| dataSetId | + +### Return type + +[**DataSetResponse**](DataSetResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/csharp-net35/docs/JobApi.md b/csharp-net35/docs/JobApi.md new file mode 100644 index 0000000..9978cf5 --- /dev/null +++ b/csharp-net35/docs/JobApi.md @@ -0,0 +1,344 @@ +# Sphereon.SDK.TemplateProcessor.Api.JobApi + +All URIs are relative to *https://gw.api.cloud.sphereon.com/* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetJob**](JobApi.md#getjob) | **GET** /template/processor/0.1/jobs/{jobId} | Job definition and state +[**GetJobs**](JobApi.md#getjobs) | **GET** /template/processor/0.1/jobs | Get all jobs +[**GetResultStreamById**](JobApi.md#getresultstreambyid) | **PUT** /template/processor/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file +[**GetResultStreamsAsContainer**](JobApi.md#getresultstreamsascontainer) | **PUT** /template/processor/0.1/jobs/{jobId}/result/container | Get the result file +[**SubmitJob**](JobApi.md#submitjob) | **PUT** /template/processor/0.1/jobs | Submit merge job for processing + + + +# **GetJob** +> MergeJobResponse GetJob (string jobId) + +Job definition and state + +Get the merge job definition and current state. Please not that you can differentiate based on http response status + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class GetJobExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new JobApi(); + var jobId = jobId_example; // string | jobId + + try + { + // Job definition and state + MergeJobResponse result = apiInstance.GetJob(jobId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling JobApi.GetJob: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **string**| jobId | + +### Return type + +[**MergeJobResponse**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetJobs** +> List GetJobs (List status = null) + +Get all jobs + +Get all office text job definitions and their current state. + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class GetJobsExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new JobApi(); + var status = new List(); // List | A list of status to filter on. (optional) + + try + { + // Get all jobs + List<MergeJobResponse> result = apiInstance.GetJobs(status); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling JobApi.GetJobs: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**List**](string.md)| A list of status to filter on. | [optional] + +### Return type + +[**List**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetResultStreamById** +> byte[] GetResultStreamById (string jobId, string streamId, OutputSettings outputSettings = null) + +Get the result file + +Get a merge result document as a binary stream. + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class GetResultStreamByIdExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new JobApi(); + var jobId = jobId_example; // string | jobId + var streamId = streamId_example; // string | streamId + var outputSettings = new OutputSettings(); // OutputSettings | outputSettings (optional) + + try + { + // Get the result file + byte[] result = apiInstance.GetResultStreamById(jobId, streamId, outputSettings); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling JobApi.GetResultStreamById: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **string**| jobId | + **streamId** | **string**| streamId | + **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] + +### Return type + +**byte[]** + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/octet-stream + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetResultStreamsAsContainer** +> byte[] GetResultStreamsAsContainer (string jobId, OutputSettings outputSettings = null) + +Get the result file + +Get all documents inside a compressed container as a binary stream. + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class GetResultStreamsAsContainerExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new JobApi(); + var jobId = jobId_example; // string | jobId + var outputSettings = new OutputSettings(); // OutputSettings | outputSettings (optional) + + try + { + // Get the result file + byte[] result = apiInstance.GetResultStreamsAsContainer(jobId, outputSettings); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling JobApi.GetResultStreamsAsContainer: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **jobId** | **string**| jobId | + **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] + +### Return type + +**byte[]** + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/octet-stream + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **SubmitJob** +> MergeJobResponse SubmitJob (MergeSettings mergesettings) + +Submit merge job for processing + +Submit merge job run. + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class SubmitJobExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new JobApi(); + var mergesettings = new MergeSettings(); // MergeSettings | The merge- and output settings + + try + { + // Submit merge job for processing + MergeJobResponse result = apiInstance.SubmitJob(mergesettings); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling JobApi.SubmitJob: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **mergesettings** | [**MergeSettings**](MergeSettings.md)| The merge- and output settings | + +### Return type + +[**MergeJobResponse**](MergeJobResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/csharp-net35/docs/MergeJob.md b/csharp-net35/docs/MergeJob.md index a5cd506..d051ecd 100644 --- a/csharp-net35/docs/MergeJob.md +++ b/csharp-net35/docs/MergeJob.md @@ -3,14 +3,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ResultFolderPath** | **string** | The target folder path of result files | [optional] **CompletionTime** | **DateTime?** | The completion date/time of this job in ISO 8601 format | [optional] **JobId** | **string** | The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation | -**ResultContainerId** | **string** | The target container id of result files | [optional] **CreationTime** | **DateTime?** | The creation date/time of this job in ISO 8601 format | [optional] **DataSetId** | **string** | Data set id | [optional] **ResultStreams** | [**List<StreamLocation>**](StreamLocation.md) | The storage locations of the result files. | **HeaderDataSetIds** | **List<string>** | Header data set ids | [optional] +**ResultStorageLocation** | [**StorageLocation**](StorageLocation.md) | The storage location. (optional) | [optional] **MergeSettings** | [**MergeSettings**](MergeSettings.md) | | [optional] **StatusMessage** | **string** | A status message, which can be informational, warning or error. A message here does not indicate an error perse | [optional] **Status** | **string** | The status of the job | diff --git a/csharp-net35/docs/MergeSettings.md b/csharp-net35/docs/MergeSettings.md index 964bf17..3c3200d 100644 --- a/csharp-net35/docs/MergeSettings.md +++ b/csharp-net35/docs/MergeSettings.md @@ -8,8 +8,8 @@ Name | Type | Description | Notes **DataSetId** | **string** | Data set id | **Engine** | **string** | | [optional] **HeaderDataSetIds** | **List<string>** | optional header data set ids | [optional] +**ResultStorageLocation** | [**StorageLocation**](StorageLocation.md) | The output location of the result files. | **TemplateVersion** | **int?** | Template version | [optional] -**ResultStreamLocation** | [**StreamLocation**](StreamLocation.md) | The output location of the result files. | **TemplateId** | **string** | Template id | **OutputSettings** | [**OutputSettings**](OutputSettings.md) | | diff --git a/csharp-net35/docs/StorageLocation.md b/csharp-net35/docs/StorageLocation.md new file mode 100644 index 0000000..3197f68 --- /dev/null +++ b/csharp-net35/docs/StorageLocation.md @@ -0,0 +1,10 @@ +# Sphereon.SDK.TemplateProcessor.Model.StorageLocation +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FolderPath** | **string** | | [optional] +**ContainerId** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/csharp-net35/docs/StreamLocation.md b/csharp-net35/docs/StreamLocation.md index e365ada..1f2a59c 100644 --- a/csharp-net35/docs/StreamLocation.md +++ b/csharp-net35/docs/StreamLocation.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **FolderPath** | **string** | | [optional] **OriginalFileName** | **string** | | [optional] +**FileName** | **string** | | [optional] **ContainerId** | **string** | | [optional] -**FileId** | **string** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/csharp-net35/docs/TemplateApi.md b/csharp-net35/docs/TemplateApi.md new file mode 100644 index 0000000..3dc1b86 --- /dev/null +++ b/csharp-net35/docs/TemplateApi.md @@ -0,0 +1,340 @@ +# Sphereon.SDK.TemplateProcessor.Api.TemplateApi + +All URIs are relative to *https://gw.api.cloud.sphereon.com/* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateTemplateContext**](TemplateApi.md#createtemplatecontext) | **POST** /template/processor/0.1/templates | Create template context +[**DeleteTemplateContext**](TemplateApi.md#deletetemplatecontext) | **DELETE** /template/processor/0.1/templates/{templateId} | Delete template context +[**GetTemplateContext**](TemplateApi.md#gettemplatecontext) | **GET** /template/processor/0.1/templates/{templateId} | Get template context +[**UpdateTemplateContext**](TemplateApi.md#updatetemplatecontext) | **PUT** /template/processor/0.1/templates | Update template context +[**UploadTemplateFile**](TemplateApi.md#uploadtemplatefile) | **POST** /template/processor/0.1/templates/{templateId} | Upload template file + + + +# **CreateTemplateContext** +> TemplateContextResponse CreateTemplateContext (TemplateContextRequest templateRequest) + +Create template context + +Create a unique template context for your environment + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class CreateTemplateContextExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new TemplateApi(); + var templateRequest = new TemplateContextRequest(); // TemplateContextRequest | The template request + + try + { + // Create template context + TemplateContextResponse result = apiInstance.CreateTemplateContext(templateRequest); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling TemplateApi.CreateTemplateContext: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| The template request | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **DeleteTemplateContext** +> TemplateContextResponse DeleteTemplateContext (string templateId) + +Delete template context + +Delete a template context with all history + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class DeleteTemplateContextExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new TemplateApi(); + var templateId = templateId_example; // string | templateId + + try + { + // Delete template context + TemplateContextResponse result = apiInstance.DeleteTemplateContext(templateId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling TemplateApi.DeleteTemplateContext: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **string**| templateId | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **GetTemplateContext** +> TemplateContextResponse GetTemplateContext (string templateId) + +Get template context + +Get an existing template context + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class GetTemplateContextExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new TemplateApi(); + var templateId = templateId_example; // string | The template context name unique for your environment + + try + { + // Get template context + TemplateContextResponse result = apiInstance.GetTemplateContext(templateId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling TemplateApi.GetTemplateContext: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **string**| The template context name unique for your environment | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UpdateTemplateContext** +> TemplateContextResponse UpdateTemplateContext (TemplateContext templateContext) + +Update template context + +Update an existing template context for your environment + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class UpdateTemplateContextExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new TemplateApi(); + var templateContext = new TemplateContext(); // TemplateContext | templateContext + + try + { + // Update template context + TemplateContextResponse result = apiInstance.UpdateTemplateContext(templateContext); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling TemplateApi.UpdateTemplateContext: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateContext** | [**TemplateContext**](TemplateContext.md)| templateContext | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: application/json;charset=UTF-8 + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **UploadTemplateFile** +> TemplateContextResponse UploadTemplateFile (string templateId, System.IO.Stream stream) + +Upload template file + +Upload the Office template file + +### Example +```csharp +using System; +using System.Diagnostics; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Example +{ + public class UploadTemplateFileExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + + var apiInstance = new TemplateApi(); + var templateId = templateId_example; // string | The template context name unique for your environment + var stream = new System.IO.Stream(); // System.IO.Stream | The template (file/inputstream) to store + + try + { + // Upload template file + TemplateContextResponse result = apiInstance.UploadTemplateFile(templateId, stream); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling TemplateApi.UploadTemplateFile: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **templateId** | **string**| The template context name unique for your environment | + **stream** | **System.IO.Stream**| The template (file/inputstream) to store | + +### Return type + +[**TemplateContextResponse**](TemplateContextResponse.md) + +### Authorization + +[oauth2schema](../README.md#oauth2schema) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json;charset=UTF-8 + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/csharp-net35/docs/TemplateContext.md b/csharp-net35/docs/TemplateContext.md index 9f56a89..5e1c275 100644 --- a/csharp-net35/docs/TemplateContext.md +++ b/csharp-net35/docs/TemplateContext.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **TemplateFileLocations** | [**Dictionary<string, StreamLocation>**](StreamLocation.md) | The template files (versioned) | [optional] **Description** | **string** | The template description | [optional] **OwnerInfo** | [**OwnerInfo**](OwnerInfo.md) | | [optional] +**StorageLocation** | [**StorageLocation**](StorageLocation.md) | The storage location. (optional) | [optional] **Id** | **string** | | [optional] **TemplateId** | **string** | The template context id | [optional] diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Api/AllApiTests.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Api/AllApiTests.cs new file mode 100644 index 0000000..d9e981b --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Api/AllApiTests.cs @@ -0,0 +1,241 @@ +/* + * Template-Processor + * + * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing AllApi + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the API endpoint. + /// + [TestFixture] + public class AllApiTests + { + private AllApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new AllApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of AllApi + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsInstanceOfType' AllApi + //Assert.IsInstanceOfType(typeof(AllApi), instance, "instance is a AllApi"); + } + + + /// + /// Test CreateDataSet + /// + [Test] + public void CreateDataSetTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string payload = null; + //var response = instance.CreateDataSet(payload); + //Assert.IsInstanceOf (response, "response is DataSetResponse"); + } + + /// + /// Test CreateTemplateContext + /// + [Test] + public void CreateTemplateContextTest() + { + // TODO uncomment below to test the method and replace null with proper value + //TemplateContextRequest templateRequest = null; + //var response = instance.CreateTemplateContext(templateRequest); + //Assert.IsInstanceOf (response, "response is TemplateContextResponse"); + } + + /// + /// Test DeleteDataSet + /// + [Test] + public void DeleteDataSetTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string dataSetId = null; + //var response = instance.DeleteDataSet(dataSetId); + //Assert.IsInstanceOf (response, "response is DataSetResponse"); + } + + /// + /// Test DeleteJob + /// + [Test] + public void DeleteJobTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string jobId = null; + //var response = instance.DeleteJob(jobId); + //Assert.IsInstanceOf (response, "response is MergeJobResponse"); + } + + /// + /// Test DeleteTemplateContext + /// + [Test] + public void DeleteTemplateContextTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string templateId = null; + //var response = instance.DeleteTemplateContext(templateId); + //Assert.IsInstanceOf (response, "response is TemplateContextResponse"); + } + + /// + /// Test GetJob + /// + [Test] + public void GetJobTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string jobId = null; + //var response = instance.GetJob(jobId); + //Assert.IsInstanceOf (response, "response is MergeJobResponse"); + } + + /// + /// Test GetJobs + /// + [Test] + public void GetJobsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //List status = null; + //var response = instance.GetJobs(status); + //Assert.IsInstanceOf> (response, "response is List"); + } + + /// + /// Test GetResultStreamById + /// + [Test] + public void GetResultStreamByIdTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string jobId = null; + //string streamId = null; + //OutputSettings outputSettings = null; + //var response = instance.GetResultStreamById(jobId, streamId, outputSettings); + //Assert.IsInstanceOf (response, "response is byte[]"); + } + + /// + /// Test GetResultStreamsAsContainer + /// + [Test] + public void GetResultStreamsAsContainerTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string jobId = null; + //OutputSettings outputSettings = null; + //var response = instance.GetResultStreamsAsContainer(jobId, outputSettings); + //Assert.IsInstanceOf (response, "response is byte[]"); + } + + /// + /// Test GetTemplateContext + /// + [Test] + public void GetTemplateContextTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string templateId = null; + //var response = instance.GetTemplateContext(templateId); + //Assert.IsInstanceOf (response, "response is TemplateContextResponse"); + } + + /// + /// Test SubmitJob + /// + [Test] + public void SubmitJobTest() + { + // TODO uncomment below to test the method and replace null with proper value + //MergeSettings mergesettings = null; + //var response = instance.SubmitJob(mergesettings); + //Assert.IsInstanceOf (response, "response is MergeJobResponse"); + } + + /// + /// Test UpdateTemplateContext + /// + [Test] + public void UpdateTemplateContextTest() + { + // TODO uncomment below to test the method and replace null with proper value + //TemplateContextRequest templateContextRequest = null; + //var response = instance.UpdateTemplateContext(templateContextRequest); + //Assert.IsInstanceOf (response, "response is TemplateContextResponse"); + } + + /// + /// Test UploadTemplateFile + /// + [Test] + public void UploadTemplateFileTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string templateId = null; + //System.IO.Stream stream = null; + //var response = instance.UploadTemplateFile(templateId, stream); + //Assert.IsInstanceOf (response, "response is TemplateContextResponse"); + } + + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Api/DataSetApiTests.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Api/DataSetApiTests.cs new file mode 100644 index 0000000..5c0d514 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Api/DataSetApiTests.cs @@ -0,0 +1,105 @@ +/* + * Template-Processor + * + * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing DataSetApi + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the API endpoint. + /// + [TestFixture] + public class DataSetApiTests + { + private DataSetApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new DataSetApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of DataSetApi + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsInstanceOfType' DataSetApi + //Assert.IsInstanceOfType(typeof(DataSetApi), instance, "instance is a DataSetApi"); + } + + + /// + /// Test CreateDataSet + /// + [Test] + public void CreateDataSetTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string payload = null; + //var response = instance.CreateDataSet(payload); + //Assert.IsInstanceOf (response, "response is DataSetResponse"); + } + + /// + /// Test DeleteDataSet + /// + [Test] + public void DeleteDataSetTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string dataSetId = null; + //var response = instance.DeleteDataSet(dataSetId); + //Assert.IsInstanceOf (response, "response is DataSetResponse"); + } + + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Api/JobApiTests.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Api/JobApiTests.cs new file mode 100644 index 0000000..f8aadca --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Api/JobApiTests.cs @@ -0,0 +1,144 @@ +/* + * Template-Processor + * + * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing JobApi + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the API endpoint. + /// + [TestFixture] + public class JobApiTests + { + private JobApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new JobApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of JobApi + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsInstanceOfType' JobApi + //Assert.IsInstanceOfType(typeof(JobApi), instance, "instance is a JobApi"); + } + + + /// + /// Test GetJob + /// + [Test] + public void GetJobTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string jobId = null; + //var response = instance.GetJob(jobId); + //Assert.IsInstanceOf (response, "response is MergeJobResponse"); + } + + /// + /// Test GetJobs + /// + [Test] + public void GetJobsTest() + { + // TODO uncomment below to test the method and replace null with proper value + //List status = null; + //var response = instance.GetJobs(status); + //Assert.IsInstanceOf> (response, "response is List"); + } + + /// + /// Test GetResultStreamById + /// + [Test] + public void GetResultStreamByIdTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string jobId = null; + //string streamId = null; + //OutputSettings outputSettings = null; + //var response = instance.GetResultStreamById(jobId, streamId, outputSettings); + //Assert.IsInstanceOf (response, "response is byte[]"); + } + + /// + /// Test GetResultStreamsAsContainer + /// + [Test] + public void GetResultStreamsAsContainerTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string jobId = null; + //OutputSettings outputSettings = null; + //var response = instance.GetResultStreamsAsContainer(jobId, outputSettings); + //Assert.IsInstanceOf (response, "response is byte[]"); + } + + /// + /// Test SubmitJob + /// + [Test] + public void SubmitJobTest() + { + // TODO uncomment below to test the method and replace null with proper value + //MergeSettings mergesettings = null; + //var response = instance.SubmitJob(mergesettings); + //Assert.IsInstanceOf (response, "response is MergeJobResponse"); + } + + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Api/TemplateApiTests.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Api/TemplateApiTests.cs new file mode 100644 index 0000000..c67d47e --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Api/TemplateApiTests.cs @@ -0,0 +1,142 @@ +/* + * Template-Processor + * + * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using Sphereon.SDK.TemplateProcessor.Client; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing TemplateApi + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the API endpoint. + /// + [TestFixture] + public class TemplateApiTests + { + private TemplateApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new TemplateApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of TemplateApi + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsInstanceOfType' TemplateApi + //Assert.IsInstanceOfType(typeof(TemplateApi), instance, "instance is a TemplateApi"); + } + + + /// + /// Test CreateTemplateContext + /// + [Test] + public void CreateTemplateContextTest() + { + // TODO uncomment below to test the method and replace null with proper value + //TemplateContextRequest templateRequest = null; + //var response = instance.CreateTemplateContext(templateRequest); + //Assert.IsInstanceOf (response, "response is TemplateContextResponse"); + } + + /// + /// Test DeleteTemplateContext + /// + [Test] + public void DeleteTemplateContextTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string templateId = null; + //var response = instance.DeleteTemplateContext(templateId); + //Assert.IsInstanceOf (response, "response is TemplateContextResponse"); + } + + /// + /// Test GetTemplateContext + /// + [Test] + public void GetTemplateContextTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string templateId = null; + //var response = instance.GetTemplateContext(templateId); + //Assert.IsInstanceOf (response, "response is TemplateContextResponse"); + } + + /// + /// Test UpdateTemplateContext + /// + [Test] + public void UpdateTemplateContextTest() + { + // TODO uncomment below to test the method and replace null with proper value + //TemplateContextRequest templateContextRequest = null; + //var response = instance.UpdateTemplateContext(templateContextRequest); + //Assert.IsInstanceOf (response, "response is TemplateContextResponse"); + } + + /// + /// Test UploadTemplateFile + /// + [Test] + public void UploadTemplateFileTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string templateId = null; + //System.IO.Stream stream = null; + //var response = instance.UploadTemplateFile(templateId, stream); + //Assert.IsInstanceOf (response, "response is TemplateContextResponse"); + } + + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/StorageLocationTests.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/StorageLocationTests.cs new file mode 100644 index 0000000..8199a08 --- /dev/null +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Model/StorageLocationTests.cs @@ -0,0 +1,98 @@ +/* + * Template-Processor + * + * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * Generated by: https://github.com/swagger-api/swagger-codegen.git + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using Sphereon.SDK.TemplateProcessor.Api; +using Sphereon.SDK.TemplateProcessor.Model; +using Sphereon.SDK.TemplateProcessor.Client; +using System.Reflection; + +namespace Sphereon.SDK.TemplateProcessor.Test +{ + /// + /// Class for testing StorageLocation + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class StorageLocationTests + { + // TODO uncomment below to declare an instance variable for StorageLocation + //private StorageLocation instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of StorageLocation + //instance = new StorageLocation(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of StorageLocation + /// + [Test] + public void StorageLocationInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" StorageLocation + //Assert.IsInstanceOfType (instance, "variable 'instance' is a StorageLocation"); + } + + /// + /// Test the property 'FolderPath' + /// + [Test] + public void FolderPathTest() + { + // TODO unit test for the property 'FolderPath' + } + /// + /// Test the property 'ContainerId' + /// + [Test] + public void ContainerIdTest() + { + // TODO unit test for the property 'ContainerId' + } + + } + +} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Sphereon.SDK.TemplateProcessor.Test.csproj b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Sphereon.SDK.TemplateProcessor.Test.csproj index f0a15f8..bab7ba4 100644 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Sphereon.SDK.TemplateProcessor.Test.csproj +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Sphereon.SDK.TemplateProcessor.Test.csproj @@ -1,8 +1,8 @@
  • - Obj-C + Obj-C
  • - JavaScript + JavaScript
  • - C# + C#
  • - PHP + PHP
  • -
    +
    
    -curl -X post -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template-processor/merge/0.1/datasets"
    +curl -X post -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template/processor/0.1/datasets"
     
     
     
    -
    +
    
     import com.sphereon.sdk.template-processor.*;
     import com.sphereon.sdk.template-processor.auth.*;
     import com.sphereon.sdk.template-processor.model.*;
    -import api.MergeApi;
    +import api.AllApi;
     
     import java.io.File;
     import java.util.*;
     
    -public class MergeApiExample {
    +public class AllApiExample {
     
         public static void main(String[] args) {
             ApiClient defaultClient = Configuration.getDefaultApiClient();
    @@ -1224,13 +1275,13 @@ 

    Usage and SDK Samples

    OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - MergeApi apiInstance = new MergeApi(); + AllApi apiInstance = new AllApi(); String payload = payload_example; // String | The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] try { DataSetResponse result = apiInstance.createDataSet(payload); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling MergeApi#createDataSet"); + System.err.println("Exception when calling AllApi#createDataSet"); e.printStackTrace(); } } @@ -1240,20 +1291,20 @@

    Usage and SDK Samples

    -
    +
    
    -import api.MergeApi;
    +import api.AllApi;
     
    -public class MergeApiExample {
    +public class AllApiExample {
     
         public static void main(String[] args) {
    -        MergeApi apiInstance = new MergeApi();
    +        AllApi apiInstance = new AllApi();
             String payload = payload_example; // String | The dates for the merge [   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   },   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   } ]
             try {
                 DataSetResponse result = apiInstance.createDataSet(payload);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling MergeApi#createDataSet");
    +            System.err.println("Exception when calling AllApi#createDataSet");
                 e.printStackTrace();
             }
         }
    @@ -1263,12 +1314,12 @@ 

    Usage and SDK Samples

    -
    +
    
     Configuration *apiConfig = [Configuration sharedConfig];
     
    @@ -1278,7 +1329,7 @@ 

    Usage and SDK Samples

    String *payload = payload_example; // The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] -MergeApi *apiInstance = [[MergeApi alloc] init]; +AllApi *apiInstance = [[AllApi alloc] init]; // Store dataset [apiInstance createDataSetWith:payload @@ -1293,7 +1344,7 @@

    Usage and SDK Samples

    -
    +
    
     var  = require('');
     var defaultClient = .ApiClient.instance;
    @@ -1302,7 +1353,7 @@ 

    Usage and SDK Samples

    var oauth2schema = defaultClient.authentications['oauth2schema']; oauth2schema.accessToken = "YOUR ACCESS TOKEN" -var api = new .MergeApi() +var api = new .AllApi() var payload = payload_example; // {String} The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] @@ -1319,11 +1370,11 @@

    Usage and SDK Samples

    - -
    +
    
     using System;
     using System.Diagnostics;
    @@ -1341,7 +1392,7 @@ 

    Usage and SDK Samples

    // Configure OAuth2 access token for authorization: oauth2schema Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new MergeApi(); + var apiInstance = new AllApi(); var payload = payload_example; // String | The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] try @@ -1352,7 +1403,7 @@

    Usage and SDK Samples

    } catch (Exception e) { - Debug.Print("Exception when calling MergeApi.createDataSet: " + e.Message ); + Debug.Print("Exception when calling AllApi.createDataSet: " + e.Message ); } } } @@ -1362,7 +1413,7 @@

    Usage and SDK Samples

    -
    +
    
     Usage and SDK Samples
     // Configure OAuth2 access token for authorization: oauth2schema
     com.sphereon.sdk.template-processor\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
     
    -$api_instance = new com.sphereon.sdk.template-processor\Api\MergeApi();
    +$api_instance = new com.sphereon.sdk.template-processor\Api\AllApi();
     $payload = payload_example; // String | The dates for the merge [   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   },   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   } ]
     
     try {
         $result = $api_instance->createDataSet($payload);
         print_r($result);
     } catch (Exception $e) {
    -    echo 'Exception when calling MergeApi->createDataSet: ', $e->getMessage(), PHP_EOL;
    +    echo 'Exception when calling AllApi->createDataSet: ', $e->getMessage(), PHP_EOL;
     }
     
                                                       
    @@ -1416,7 +1467,8 @@

    Parameters

    "required" : true, "schema" : { "type" : "string" - } + }, + "x-codegen-hasMoreRequired" : false }; var schema = schemaWrapper.schema; @@ -1458,7 +1510,7 @@

    Status: 200 - Data set received and stored

    +
    +
    +
    +
    +

    submitJob

    +

    Submit merge job for processing

    +
    +
    +
    +

    +

    Submit merge job run.

    +

    +
    +
    /template/processor/0.1/jobs
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X PUT "https://gw.api.cloud.sphereon.com/template/processor/0.1/jobs"
    +
    +
    +
    import com.sphereon.sdk.template-processor.*;
    +import com.sphereon.sdk.template-processor.auth.*;
    +import com.sphereon.sdk.template-processor.model.*;
    +import com.sphereon.sdk.template-processor.api.AllApi;
     
    -                                                                        //console.log(JSON.stringify(resolved));
    +import java.io.File;
    +import java.util.*;
     
    +public class AllApiExample {
     
    +    public static void main(String[] args) {
    +        ApiClient defaultClient = Configuration.getDefaultApiClient();
    +        
    +        // Configure OAuth2 access token for authorization: oauth2schema
    +        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
    +        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
     
    -                                                                        var view = new JSONSchemaView(resolved.schema, 3);
    -                                                                        $('#examples-All-getJobs-schema-data').val(JSON.stringify(resolved.schema));
    -                                                                        var result = $('#examples-All-getJobs-schema-200');
    -                                                                        result.empty();
    -                                                                        result.append(view.render());
    -                                                                    });
    +        AllApi apiInstance = new AllApi();
    +        MergeSettings mergesettings = ; // MergeSettings | The merge- and output settings
    +        try {
    +            MergeJobResponse result = apiInstance.submitJob(mergesettings);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling AllApi#submitJob");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    +
    +
    import com.sphereon.sdk.template-processor.api.AllApi;
     
    +public class AllApiExample {
     
    +    public static void main(String[] args) {
    +        AllApi apiInstance = new AllApi();
    +        MergeSettings mergesettings = ; // MergeSettings | The merge- and output settings
    +        try {
    +            MergeJobResponse result = apiInstance.submitJob(mergesettings);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling AllApi#submitJob");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
    -                                                                });
    -                                                            
    -                                                        
    - +// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema) +[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; +MergeSettings *mergesettings = ; // The merge- and output settings +AllApi *apiInstance = [[AllApi alloc] init]; +// Submit merge job for processing +[apiInstance submitJobWith:mergesettings + completionHandler: ^(MergeJobResponse output, NSError* error) { + if (output) { + NSLog(@"%@", output); + } + if (error) { + NSLog(@"Error: %@", error); + } + }]; + +
    +
    +
    var TemplateProcessor = require('template_processor');
    +var defaultClient = TemplateProcessor.ApiClient.instance;
     
    +// Configure OAuth2 access token for authorization: oauth2schema
    +var oauth2schema = defaultClient.authentications['oauth2schema'];
    +oauth2schema.accessToken = "YOUR ACCESS TOKEN"
     
    -                                                    
    +var api = new TemplateProcessor.AllApi() +var mergesettings = ; // {MergeSettings} The merge- and output settings +var callback = function(error, data, response) { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}; +api.submitJob(mergesettings, callback); + +
    -
    + +
    +
    using System;
    +using System.Diagnostics;
    +using IO.Swagger.Api;
    +using IO.Swagger.Client;
    +using IO.Swagger.Model;
     
    +namespace Example
    +{
    +    public class submitJobExample
    +    {
    +        public void main()
    +        {
    +            
    +            // Configure OAuth2 access token for authorization: oauth2schema
    +            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
     
    +            var apiInstance = new AllApi();
    +            var mergesettings = new MergeSettings(); // MergeSettings | The merge- and output settings
     
    +            try
    +            {
    +                // Submit merge job for processing
    +                MergeJobResponse result = apiInstance.submitJob(mergesettings);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling AllApi.submitJob: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
     
    +// Configure OAuth2 access token for authorization: oauth2schema
    +Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
     
    +$api_instance = new Swagger\Client\Api\AllApi();
    +$mergesettings = ; // MergeSettings | The merge- and output settings
     
    +try {
    +    $result = $api_instance->submitJob($mergesettings);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling AllApi->submitJob: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    +
    +
    use Data::Dumper;
    +use WWW::SwaggerClient::Configuration;
    +use WWW::SwaggerClient::AllApi;
     
    -                                        
    +# Configure OAuth2 access token for authorization: oauth2schema
    +$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
     
    -                                    
    +my $api_instance = WWW::SwaggerClient::AllApi->new(); +my $mergesettings = WWW::SwaggerClient::Object::MergeSettings->new(); # MergeSettings | The merge- and output settings -
    +eval { + my $result = $api_instance->submitJob(mergesettings => $mergesettings); + print Dumper($result); +}; +if ($@) { + warn "Exception when calling AllApi->submitJob: $@\n"; +}
    +
    +
    +
    from __future__ import print_statement
    +import time
    +import swagger_client
    +from swagger_client.rest import ApiException
    +from pprint import pprint
     
    +# Configure OAuth2 access token for authorization: oauth2schema
    +swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
     
    +# create an instance of the API class
    +api_instance = swagger_client.AllApi()
    +mergesettings =  # MergeSettings | The merge- and output settings
     
    +try: 
    +    # Submit merge job for processing
    +    api_response = api_instance.submit_job(mergesettings)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling AllApi->submitJob: %s\n" % e)
    +
    +
    +

    Parameters

    -
    +
    Body parameters
    + + + + + + + + -
    /template/processor/0.1/jobs/{jobId}/result/file/{streamId}
    +
    NameDescription
    mergesettings * -
    -
    -

    getResultStreamById

    -
    -
    -
    -
    + +
    +
    -

    -

    Usage and SDK Samples

    -

    - -
    -
    -
    
    -curl -X put -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template/processor/0.1/jobs/{jobId}/result/file/{streamId}"
    +                          

    Responses

    +

    Status: 200 - Merge job submitted

    +
    -
    + -
    -
    
    -import com.sphereon.sdk.template-processor.*;
    +                            
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +

    updateTemplateContext

    +

    Update template context

    +
    +
    +
    +

    +

    Update an existing template context for your environment

    +

    +
    +
    /template/processor/0.1/templates
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X PUT "https://gw.api.cloud.sphereon.com/template/processor/0.1/templates"
    +
    +
    +
    import com.sphereon.sdk.template-processor.*;
     import com.sphereon.sdk.template-processor.auth.*;
     import com.sphereon.sdk.template-processor.model.*;
    -import api.AllApi;
    +import com.sphereon.sdk.template-processor.api.AllApi;
     
     import java.io.File;
     import java.util.*;
    @@ -4864,72 +5673,53 @@ 

    Usage and SDK Samples

    oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); AllApi apiInstance = new AllApi(); - String jobId = jobId_example; // String | jobId - String streamId = streamId_example; // String | streamId - OutputSettings outputSettings = ; // OutputSettings | outputSettings + TemplateContext templateContext = ; // TemplateContext | templateContext try { - byte[] result = apiInstance.getResultStreamById(jobId, streamId, outputSettings); + TemplateContextResponse result = apiInstance.updateTemplateContext(templateContext); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AllApi#getResultStreamById"); + System.err.println("Exception when calling AllApi#updateTemplateContext"); e.printStackTrace(); } } -} - -
    -
    - +}
    +
    -
    -
    
    -import api.AllApi;
    +                          
    +
    import com.sphereon.sdk.template-processor.api.AllApi;
     
     public class AllApiExample {
     
         public static void main(String[] args) {
             AllApi apiInstance = new AllApi();
    -        String jobId = jobId_example; // String | jobId
    -        String streamId = streamId_example; // String | streamId
    -        OutputSettings outputSettings = ; // OutputSettings | outputSettings
    +        TemplateContext templateContext = ; // TemplateContext | templateContext
             try {
    -            byte[] result = apiInstance.getResultStreamById(jobId, streamId, outputSettings);
    +            TemplateContextResponse result = apiInstance.updateTemplateContext(templateContext);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling AllApi#getResultStreamById");
    +            System.err.println("Exception when calling AllApi#updateTemplateContext");
                 e.printStackTrace();
             }
         }
    -}
    -
    -                                                  
    -
    - - - - -
    -
    
    -Configuration *apiConfig = [Configuration sharedConfig];
    +}
    +
    + +
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
    -
    -String *jobId = jobId_example; // jobId
    -String *streamId = streamId_example; // streamId
    -OutputSettings *outputSettings = ; // outputSettings (optional)
    +TemplateContext *templateContext = ; // templateContext
     
     AllApi *apiInstance = [[AllApi alloc] init];
     
    -// Get the result file
    -[apiInstance getResultStreamByIdWith:jobId
    -    streamId:streamId
    -    outputSettings:outputSettings
    -              completionHandler: ^(byte[] output, NSError* error) {
    +// Update template context
    +[apiInstance updateTemplateContextWith:templateContext
    +              completionHandler: ^(TemplateContextResponse output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -4937,27 +5727,21 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; +
    +
    -
    -
    -
    -
    
    -var  = require('');
    -var defaultClient = .ApiClient.instance;
    +                            
    +
    var TemplateProcessor = require('template_processor');
    +var defaultClient = TemplateProcessor.ApiClient.instance;
     
     // Configure OAuth2 access token for authorization: oauth2schema
     var oauth2schema = defaultClient.authentications['oauth2schema'];
     oauth2schema.accessToken = "YOUR ACCESS TOKEN"
     
    -var api = new .AllApi()
    -
    -var jobId = jobId_example; // {String} jobId
    +var api = new TemplateProcessor.AllApi()
     
    -var streamId = streamId_example; // {String} streamId
    +var templateContext = ; // {TemplateContext} templateContext
     
    -var opts = { 
    -  'outputSettings':  // {OutputSettings} outputSettings
    -};
     
     var callback = function(error, data, response) {
       if (error) {
    @@ -4966,26 +5750,23 @@ 

    Usage and SDK Samples

    console.log('API called successfully. Returned data: ' + data); } }; -api.getResultStreamById(jobId, streamId, opts, callback); - -
    -
    - - +api.updateTemplateContext(templateContext, callback); +
    +
    -
    -
    
    -using System;
    +                            
    +                            
    +
    using System;
     using System.Diagnostics;
    -using .Api;
    -using .Client;
    -using model;
    +using IO.Swagger.Api;
    +using IO.Swagger.Client;
    +using IO.Swagger.Model;
     
     namespace Example
     {
    -    public class getResultStreamByIdExample
    +    public class updateTemplateContextExample
         {
             public void main()
             {
    @@ -4994,523 +5775,308 @@ 

    Usage and SDK Samples

    Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new AllApi(); - var jobId = jobId_example; // String | jobId - var streamId = streamId_example; // String | streamId - var outputSettings = new OutputSettings(); // OutputSettings | outputSettings (optional) + var templateContext = new TemplateContext(); // TemplateContext | templateContext try { - // Get the result file - byte[] result = apiInstance.getResultStreamById(jobId, streamId, outputSettings); + // Update template context + TemplateContextResponse result = apiInstance.updateTemplateContext(templateContext); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AllApi.getResultStreamById: " + e.Message ); + Debug.Print("Exception when calling AllApi.updateTemplateContext: " + e.Message ); } } } } +
    +
    -
    -
    - - -
    -
    
    -
    +                              
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
     // Configure OAuth2 access token for authorization: oauth2schema
    -com.sphereon.sdk.template-processor\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
    +Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
     
    -$api_instance = new com.sphereon.sdk.template-processor\Api\AllApi();
    -$jobId = jobId_example; // String | jobId
    -$streamId = streamId_example; // String | streamId
    -$outputSettings = ; // OutputSettings | outputSettings
    +$api_instance = new Swagger\Client\Api\AllApi();
    +$templateContext = ; // TemplateContext | templateContext
     
     try {
    -    $result = $api_instance->getResultStreamById($jobId, $streamId, $outputSettings);
    +    $result = $api_instance->updateTemplateContext($templateContext);
         print_r($result);
     } catch (Exception $e) {
    -    echo 'Exception when calling AllApi->getResultStreamById: ', $e->getMessage(), PHP_EOL;
    +    echo 'Exception when calling AllApi->updateTemplateContext: ', $e->getMessage(), PHP_EOL;
     }
    +?>
    +
    - -
    - -
    - - +
    +
    use Data::Dumper;
    +use WWW::SwaggerClient::Configuration;
    +use WWW::SwaggerClient::AllApi;
     
    +# Configure OAuth2 access token for authorization: oauth2schema
    +$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
     
    +my $api_instance = WWW::SwaggerClient::AllApi->new();
    +my $templateContext = WWW::SwaggerClient::Object::TemplateContext->new(); # TemplateContext | templateContext
     
    -                                            

    Parameters

    - - - -
    Path parameters
    - - - - - - - - - - - +
    Body parameters
    +
    NameDescription
    jobId* - - - -
    -
    streamId*
    + + + + + -
    NameDescription
    templateContext * -
    + var view = new JSONSchemaView(schema,2,{isBodyParam: true}); + var result = $('#d2e199_updateTemplateContext_templateContext'); + result.empty(); + result.append(view.render()); +}); + +
    + -
    Body parameters
    - - - - - - - - - - - -
    NameDescription
    outputSettings - - - -
    -
    - - -

    Responses

    - -

    Status: 200 - Result file successfully returned

    - - - - +

    Responses

    +

    Status: 200 - Template context updated

    + - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - -

    Status: 202 - Result file not yet created. Job is still executing.

    - - - - - - - - - -
    - - - -
    - - - - -
    - - +
    + +
    +
    + +

    Status: 404 - Template context not found

    + + + +
    +
    +
    + -
    - - - - - - - -
    - - - - -
    - - - - -

    Status: 400 - Result file could not be created.

    - - - - - - - - - -
    - - - -
    - - - - -
    - - +
    + +
    +
    + +

    Status: 500 - Internal server error

    + + + +
    +
    +
    + -
    - - - - - - - -
    - - - - -
    - - - - - - - - - - - -
    - -
    - - - - - - - - -
    - -
    -
    -

    getResultStreamsAsContainer

    -
    -
    - -
    -
    - -

    -

    Get all documents inside a compressed container as a binary stream.

    -

    -
    - -
    /template/processor/0.1/jobs/{jobId}/result/container
    - -

    -

    Usage and SDK Samples

    -

    - - - -
    -
    -
    
    -curl -X put -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template/processor/0.1/jobs/{jobId}/result/container"
    -
    -
    -
    -
    - -
    -
    
    -import com.sphereon.sdk.template-processor.*;
    +                                        var schema = schemaWrapper.schema;
    +                                        if (schema.$ref != null) {
    +                                          schema = defsParser.$refs.get(schema.$ref);
    +                                        } else {
    +                                          schemaWrapper.definitions = Object.assign({}, defs);
    +                                          $RefParser.dereference(schemaWrapper).catch(function(err) {
    +                                            console.log(err);
    +                                          });
    +                                        }
    +
    +                                        //console.log(JSON.stringify(schema));
    +                                        var view = new JSONSchemaView(schema, 3);
    +                                        $('#responses-updateTemplateContext-500-schema-data').val(stringify(schema));
    +                                        var result = $('#responses-updateTemplateContext-500-schema-500');
    +                                        result.empty();
    +                                        result.append(view.render());
    +                                      });
    +                                    
    +                                  
    + +
    +
    + + +
    +
    +
    +
    +
    +

    uploadTemplateFile

    +

    Upload template file

    +
    +
    +
    +

    +

    Upload the Office template file

    +

    +
    +
    /template/processor/0.1/templates/{templateId}
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X POST "https://gw.api.cloud.sphereon.com/template/processor/0.1/templates/{templateId}"
    +
    +
    +
    import com.sphereon.sdk.template-processor.*;
     import com.sphereon.sdk.template-processor.auth.*;
     import com.sphereon.sdk.template-processor.model.*;
    -import api.AllApi;
    +import com.sphereon.sdk.template-processor.api.AllApi;
     
     import java.io.File;
     import java.util.*;
    @@ -5525,68 +6091,57 @@ 

    Usage and SDK Samples

    oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); AllApi apiInstance = new AllApi(); - String jobId = jobId_example; // String | jobId - OutputSettings outputSettings = ; // OutputSettings | outputSettings + String templateId = templateId_example; // String | The template context name unique for your environment + File stream = /path/to/file.txt; // File | The template (file/inputstream) to store try { - byte[] result = apiInstance.getResultStreamsAsContainer(jobId, outputSettings); + TemplateContextResponse result = apiInstance.uploadTemplateFile(templateId, stream); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AllApi#getResultStreamsAsContainer"); + System.err.println("Exception when calling AllApi#uploadTemplateFile"); e.printStackTrace(); } } -} - -
    -
    +}
    +
    - -
    -
    
    -import api.AllApi;
    +                          
    +
    import com.sphereon.sdk.template-processor.api.AllApi;
     
     public class AllApiExample {
     
         public static void main(String[] args) {
             AllApi apiInstance = new AllApi();
    -        String jobId = jobId_example; // String | jobId
    -        OutputSettings outputSettings = ; // OutputSettings | outputSettings
    +        String templateId = templateId_example; // String | The template context name unique for your environment
    +        File stream = /path/to/file.txt; // File | The template (file/inputstream) to store
             try {
    -            byte[] result = apiInstance.getResultStreamsAsContainer(jobId, outputSettings);
    +            TemplateContextResponse result = apiInstance.uploadTemplateFile(templateId, stream);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling AllApi#getResultStreamsAsContainer");
    +            System.err.println("Exception when calling AllApi#uploadTemplateFile");
                 e.printStackTrace();
             }
         }
    -}
    -
    -                                                  
    -
    - - - - -
    -
    
    -Configuration *apiConfig = [Configuration sharedConfig];
    +}
    +
    + +
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
    -
    -String *jobId = jobId_example; // jobId
    -OutputSettings *outputSettings = ; // outputSettings (optional)
    +String *templateId = templateId_example; // The template context name unique for your environment
    +File *stream = /path/to/file.txt; // The template (file/inputstream) to store
     
     AllApi *apiInstance = [[AllApi alloc] init];
     
    -// Get the result file
    -[apiInstance getResultStreamsAsContainerWith:jobId
    -    outputSettings:outputSettings
    -              completionHandler: ^(byte[] output, NSError* error) {
    +// Upload template file
    +[apiInstance uploadTemplateFileWith:templateId
    +    stream:stream
    +              completionHandler: ^(TemplateContextResponse output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -5594,25 +6149,23 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; +
    +
    -
    -
    -
    -
    
    -var  = require('');
    -var defaultClient = .ApiClient.instance;
    +                            
    +
    var TemplateProcessor = require('template_processor');
    +var defaultClient = TemplateProcessor.ApiClient.instance;
     
     // Configure OAuth2 access token for authorization: oauth2schema
     var oauth2schema = defaultClient.authentications['oauth2schema'];
     oauth2schema.accessToken = "YOUR ACCESS TOKEN"
     
    -var api = new .AllApi()
    +var api = new TemplateProcessor.AllApi()
     
    -var jobId = jobId_example; // {String} jobId
    +var templateId = templateId_example; // {String} The template context name unique for your environment
    +
    +var stream = /path/to/file.txt; // {File} The template (file/inputstream) to store
     
    -var opts = { 
    -  'outputSettings':  // {OutputSettings} outputSettings
    -};
     
     var callback = function(error, data, response) {
       if (error) {
    @@ -5621,26 +6174,23 @@ 

    Usage and SDK Samples

    console.log('API called successfully. Returned data: ' + data); } }; -api.getResultStreamsAsContainer(jobId, opts, callback); - -
    -
    - - +api.uploadTemplateFile(templateId, stream, callback); +
    +
    -
    -
    
    -using System;
    +                            
    +                            
    +
    using System;
     using System.Diagnostics;
    -using .Api;
    -using .Client;
    -using model;
    +using IO.Swagger.Api;
    +using IO.Swagger.Client;
    +using IO.Swagger.Model;
     
     namespace Example
     {
    -    public class getResultStreamsAsContainerExample
    +    public class uploadTemplateFileExample
         {
             public void main()
             {
    @@ -5649,5231 +6199,1194 @@ 

    Usage and SDK Samples

    Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new AllApi(); - var jobId = jobId_example; // String | jobId - var outputSettings = new OutputSettings(); // OutputSettings | outputSettings (optional) + var templateId = templateId_example; // String | The template context name unique for your environment + var stream = new File(); // File | The template (file/inputstream) to store try { - // Get the result file - byte[] result = apiInstance.getResultStreamsAsContainer(jobId, outputSettings); + // Upload template file + TemplateContextResponse result = apiInstance.uploadTemplateFile(templateId, stream); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling AllApi.getResultStreamsAsContainer: " + e.Message ); + Debug.Print("Exception when calling AllApi.uploadTemplateFile: " + e.Message ); } } } } +
    +
    -
    -
    - - -
    -
    
    -
    +                              
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
     // Configure OAuth2 access token for authorization: oauth2schema
    -com.sphereon.sdk.template-processor\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
    +Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
     
    -$api_instance = new com.sphereon.sdk.template-processor\Api\AllApi();
    -$jobId = jobId_example; // String | jobId
    -$outputSettings = ; // OutputSettings | outputSettings
    +$api_instance = new Swagger\Client\Api\AllApi();
    +$templateId = templateId_example; // String | The template context name unique for your environment
    +$stream = /path/to/file.txt; // File | The template (file/inputstream) to store
     
     try {
    -    $result = $api_instance->getResultStreamsAsContainer($jobId, $outputSettings);
    +    $result = $api_instance->uploadTemplateFile($templateId, $stream);
         print_r($result);
     } catch (Exception $e) {
    -    echo 'Exception when calling AllApi->getResultStreamsAsContainer: ', $e->getMessage(), PHP_EOL;
    +    echo 'Exception when calling AllApi->uploadTemplateFile: ', $e->getMessage(), PHP_EOL;
     }
    -
    -                                                  
    -
    - -
    - +?> +
    + +
    +
    use Data::Dumper;
    +use WWW::SwaggerClient::Configuration;
    +use WWW::SwaggerClient::AllApi;
    +
    +# Configure OAuth2 access token for authorization: oauth2schema
    +$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
    +
    +my $api_instance = WWW::SwaggerClient::AllApi->new();
    +my $templateId = templateId_example; # String | The template context name unique for your environment
    +my $stream = /path/to/file.txt; # File | The template (file/inputstream) to store
    +
    +eval { 
    +    my $result = $api_instance->uploadTemplateFile(templateId => $templateId, stream => $stream);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling AllApi->uploadTemplateFile: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_client
    +from swagger_client.rest import ApiException
    +from pprint import pprint
    +
    +# Configure OAuth2 access token for authorization: oauth2schema
    +swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
    +
    +# create an instance of the API class
    +api_instance = swagger_client.AllApi()
    +templateId = templateId_example # String | The template context name unique for your environment
    +stream = /path/to/file.txt # File | The template (file/inputstream) to store
    +
    +try: 
    +    # Upload template file
    +    api_response = api_instance.upload_template_file(templateId, stream)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling AllApi->uploadTemplateFile: %s\n" % e)
    +
    +
    + +

    Parameters

    + +
    Path parameters
    + + + + + + +
    NameDescription
    templateId* +
    +
    +
    + + String + - -

    Parameters

    - - - -
    Path parameters
    - - - - - - - - -
    NameDescription
    jobId* - - - -
    +
    + The template context name unique for your environment +
    + +
    + Required +
    + +
    +
    -
    Body parameters
    - - - - - - - +
    Form parameters
    +
    NameDescription
    outputSettings
    + + + + + - -
    NameDescription
    stream* - -
    +
    + The template (file/inputstream) to store +
    + +
    + Required +
    + +
    - - -

    Responses

    - -

    Status: 200 - Result package successfully created and returned

    - - - - - - - - - -
    - - - -
    + +

    Responses

    +

    Status: 200 - Template uploaded and stored

    + - -
    - - - - - - - -
    - - - - -
    - - - - -

    Status: 202 - Result file not yet created. Job is still executing.

    - - - - - - - - - -
    - - - -
    - - - - -
    - - +
    + +
    +
    + +

    Status: 404 - Template context not found

    + + + +
    +
    +
    + -
    - - - - - - - -
    - - - - -
    - - - - -

    Status: 400 - Result file could not be created.

    - - - - - - - - - -
    - - - -
    - - - - -
    - - +
    + +
    +
    + +

    Status: 500 - Internal server error

    + + + +
    +
    +
    + -
    - - - - - - - -
    - - - - -
    - - - - - - - - - - - -
    - -
    - - - - - - - - -
    - -
    -
    -

    getTemplateContext

    -
    -
    - -
    -
    - -

    -

    Get an existing template context

    -

    -
    - -
    /template/processor/0.1/templates/{templateId}
    - -

    -

    Usage and SDK Samples

    -

    - - - -
    -
    -
    
    -curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template/processor/0.1/templates/{templateId}"
    -
    -
    -
    -
    - -
    -
    
    -import com.sphereon.sdk.template-processor.*;
    +                                        var schema = schemaWrapper.schema;
    +                                        if (schema.$ref != null) {
    +                                          schema = defsParser.$refs.get(schema.$ref);
    +                                        } else {
    +                                          schemaWrapper.definitions = Object.assign({}, defs);
    +                                          $RefParser.dereference(schemaWrapper).catch(function(err) {
    +                                            console.log(err);
    +                                          });
    +                                        }
    +
    +                                        //console.log(JSON.stringify(schema));
    +                                        var view = new JSONSchemaView(schema, 3);
    +                                        $('#responses-uploadTemplateFile-500-schema-data').val(stringify(schema));
    +                                        var result = $('#responses-uploadTemplateFile-500-schema-500');
    +                                        result.empty();
    +                                        result.append(view.render());
    +                                      });
    +                                    
    +                                  
    + +
    +
    + + +
    +
    + +
    +

    DataSet

    +
    +
    +
    +

    createDataSet

    +

    Store dataset

    +
    +
    +
    +

    +

    Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job.

    +

    +
    +
    /template/processor/0.1/datasets
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X POST "https://gw.api.cloud.sphereon.com/template/processor/0.1/datasets"
    +
    +
    +
    import com.sphereon.sdk.template-processor.*;
     import com.sphereon.sdk.template-processor.auth.*;
     import com.sphereon.sdk.template-processor.model.*;
    -import api.AllApi;
    +import com.sphereon.sdk.template-processor.api.DataSetApi;
     
     import java.io.File;
     import java.util.*;
     
    -public class AllApiExample {
    +public class DataSetApiExample {
     
         public static void main(String[] args) {
             ApiClient defaultClient = Configuration.getDefaultApiClient();
             
             // Configure OAuth2 access token for authorization: oauth2schema
    -        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
    -        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
    -
    -        AllApi apiInstance = new AllApi();
    -        String templateId = templateId_example; // String | The template context name unique for your environment
    -        try {
    -            TemplateContextResponse result = apiInstance.getTemplateContext(templateId);
    -            System.out.println(result);
    -        } catch (ApiException e) {
    -            System.err.println("Exception when calling AllApi#getTemplateContext");
    -            e.printStackTrace();
    -        }
    -    }
    -}
    -
    -                                                  
    -
    - - -
    -
    
    -import api.AllApi;
    -
    -public class AllApiExample {
    -
    -    public static void main(String[] args) {
    -        AllApi apiInstance = new AllApi();
    -        String templateId = templateId_example; // String | The template context name unique for your environment
    -        try {
    -            TemplateContextResponse result = apiInstance.getTemplateContext(templateId);
    -            System.out.println(result);
    -        } catch (ApiException e) {
    -            System.err.println("Exception when calling AllApi#getTemplateContext");
    -            e.printStackTrace();
    -        }
    -    }
    -}
    -
    -                                                  
    -
    - - - - -
    -
    
    -Configuration *apiConfig = [Configuration sharedConfig];
    -
    -// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
    -[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
    -
    -
    -String *templateId = templateId_example; // The template context name unique for your environment
    -
    -AllApi *apiInstance = [[AllApi alloc] init];
    -
    -// Get template context
    -[apiInstance getTemplateContextWith:templateId
    -              completionHandler: ^(TemplateContextResponse output, NSError* error) {
    -                            if (output) {
    -                                NSLog(@"%@", output);
    -                            }
    -                            if (error) {
    -                                NSLog(@"Error: %@", error);
    -                            }
    -                        }];
    -
    -                                                    
    -
    -
    -
    
    -var  = require('');
    -var defaultClient = .ApiClient.instance;
    -
    -// Configure OAuth2 access token for authorization: oauth2schema
    -var oauth2schema = defaultClient.authentications['oauth2schema'];
    -oauth2schema.accessToken = "YOUR ACCESS TOKEN"
    -
    -var api = new .AllApi()
    -
    -var templateId = templateId_example; // {String} The template context name unique for your environment
    -
    -
    -var callback = function(error, data, response) {
    -  if (error) {
    -    console.error(error);
    -  } else {
    -    console.log('API called successfully. Returned data: ' + data);
    -  }
    -};
    -api.getTemplateContext(templateId, callback);
    -
    -                                                    
    -
    - - - -
    -
    
    -using System;
    -using System.Diagnostics;
    -using .Api;
    -using .Client;
    -using model;
    -
    -namespace Example
    -{
    -    public class getTemplateContextExample
    -    {
    -        public void main()
    -        {
    -            
    -            // Configure OAuth2 access token for authorization: oauth2schema
    -            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
    -
    -            var apiInstance = new AllApi();
    -            var templateId = templateId_example;  // String | The template context name unique for your environment
    -
    -            try
    -            {
    -                // Get template context
    -                TemplateContextResponse result = apiInstance.getTemplateContext(templateId);
    -                Debug.WriteLine(result);
    -            }
    -            catch (Exception e)
    -            {
    -                Debug.Print("Exception when calling AllApi.getTemplateContext: " + e.Message );
    -            }
    -        }
    -    }
    -}
    -
    -                                                    
    -
    - - -
    -
    
    -setAccessToken('YOUR_ACCESS_TOKEN');
    -
    -$api_instance = new com.sphereon.sdk.template-processor\Api\AllApi();
    -$templateId = templateId_example; // String | The template context name unique for your environment
    -
    -try {
    -    $result = $api_instance->getTemplateContext($templateId);
    -    print_r($result);
    -} catch (Exception $e) {
    -    echo 'Exception when calling AllApi->getTemplateContext: ', $e->getMessage(), PHP_EOL;
    -}
    -
    -                                                  
    -
    - -
    - - - - - -

    Parameters

    - - - -
    Path parameters
    - - - - - - - - - - -
    NameDescription
    templateId* - - - -
    -
    - - - - - -

    Responses

    - -

    Status: 200 - Template context found

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - -

    Status: 404 - Template context not found

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - -

    Status: 500 - Internal server error

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - - - - - - -
    - -
    - -
    - - - - - - - - -
    - -
    -
    -

    submitJob

    -
    -
    - -
    -
    - -

    -

    Submit merge job run.

    -

    -
    - -
    /template/processor/0.1/jobs
    - -

    -

    Usage and SDK Samples

    -

    - - - -
    -
    -
    
    -curl -X put -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template/processor/0.1/jobs"
    -
    -
    -
    -
    - -
    -
    
    -import com.sphereon.sdk.template-processor.*;
    -import com.sphereon.sdk.template-processor.auth.*;
    -import com.sphereon.sdk.template-processor.model.*;
    -import api.AllApi;
    -
    -import java.io.File;
    -import java.util.*;
    -
    -public class AllApiExample {
    -
    -    public static void main(String[] args) {
    -        ApiClient defaultClient = Configuration.getDefaultApiClient();
    -        
    -        // Configure OAuth2 access token for authorization: oauth2schema
    -        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
    -        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
    -
    -        AllApi apiInstance = new AllApi();
    -        MergeSettings mergesettings = ; // MergeSettings | The merge- and output settings
    -        try {
    -            MergeJobResponse result = apiInstance.submitJob(mergesettings);
    -            System.out.println(result);
    -        } catch (ApiException e) {
    -            System.err.println("Exception when calling AllApi#submitJob");
    -            e.printStackTrace();
    -        }
    -    }
    -}
    -
    -                                                  
    -
    - - -
    -
    
    -import api.AllApi;
    -
    -public class AllApiExample {
    -
    -    public static void main(String[] args) {
    -        AllApi apiInstance = new AllApi();
    -        MergeSettings mergesettings = ; // MergeSettings | The merge- and output settings
    -        try {
    -            MergeJobResponse result = apiInstance.submitJob(mergesettings);
    -            System.out.println(result);
    -        } catch (ApiException e) {
    -            System.err.println("Exception when calling AllApi#submitJob");
    -            e.printStackTrace();
    -        }
    -    }
    -}
    -
    -                                                  
    -
    - - - - -
    -
    
    -Configuration *apiConfig = [Configuration sharedConfig];
    -
    -// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
    -[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
    -
    -
    -MergeSettings *mergesettings = ; // The merge- and output settings
    -
    -AllApi *apiInstance = [[AllApi alloc] init];
    -
    -// Submit merge job for processing
    -[apiInstance submitJobWith:mergesettings
    -              completionHandler: ^(MergeJobResponse output, NSError* error) {
    -                            if (output) {
    -                                NSLog(@"%@", output);
    -                            }
    -                            if (error) {
    -                                NSLog(@"Error: %@", error);
    -                            }
    -                        }];
    -
    -                                                    
    -
    -
    -
    
    -var  = require('');
    -var defaultClient = .ApiClient.instance;
    -
    -// Configure OAuth2 access token for authorization: oauth2schema
    -var oauth2schema = defaultClient.authentications['oauth2schema'];
    -oauth2schema.accessToken = "YOUR ACCESS TOKEN"
    -
    -var api = new .AllApi()
    -
    -var mergesettings = ; // {MergeSettings} The merge- and output settings
    -
    -
    -var callback = function(error, data, response) {
    -  if (error) {
    -    console.error(error);
    -  } else {
    -    console.log('API called successfully. Returned data: ' + data);
    -  }
    -};
    -api.submitJob(mergesettings, callback);
    -
    -                                                    
    -
    - - - -
    -
    
    -using System;
    -using System.Diagnostics;
    -using .Api;
    -using .Client;
    -using model;
    -
    -namespace Example
    -{
    -    public class submitJobExample
    -    {
    -        public void main()
    -        {
    -            
    -            // Configure OAuth2 access token for authorization: oauth2schema
    -            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
    -
    -            var apiInstance = new AllApi();
    -            var mergesettings = new MergeSettings(); // MergeSettings | The merge- and output settings
    -
    -            try
    -            {
    -                // Submit merge job for processing
    -                MergeJobResponse result = apiInstance.submitJob(mergesettings);
    -                Debug.WriteLine(result);
    -            }
    -            catch (Exception e)
    -            {
    -                Debug.Print("Exception when calling AllApi.submitJob: " + e.Message );
    -            }
    -        }
    -    }
    -}
    -
    -                                                    
    -
    - - -
    -
    
    -setAccessToken('YOUR_ACCESS_TOKEN');
    -
    -$api_instance = new com.sphereon.sdk.template-processor\Api\AllApi();
    -$mergesettings = ; // MergeSettings | The merge- and output settings
    -
    -try {
    -    $result = $api_instance->submitJob($mergesettings);
    -    print_r($result);
    -} catch (Exception $e) {
    -    echo 'Exception when calling AllApi->submitJob: ', $e->getMessage(), PHP_EOL;
    -}
    -
    -                                                  
    -
    - -
    - - - - - -

    Parameters

    - - - - - - -
    Body parameters
    - - - - - - - - - - - -
    NameDescription
    mergesettings * - - - -
    -
    - - -

    Responses

    - -

    Status: 200 - Merge job submitted

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - - - - - - -
    - -
    - -
    - - - - - - - - -
    - -
    -
    -

    updateTemplateContext

    -
    -
    - -
    -
    - -

    -

    Update an existing template context for your environment

    -

    -
    - -
    /template/processor/0.1/templates
    - -

    -

    Usage and SDK Samples

    -

    - - - -
    -
    -
    
    -curl -X put -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template/processor/0.1/templates"
    -
    -
    -
    -
    - -
    -
    
    -import com.sphereon.sdk.template-processor.*;
    -import com.sphereon.sdk.template-processor.auth.*;
    -import com.sphereon.sdk.template-processor.model.*;
    -import api.AllApi;
    -
    -import java.io.File;
    -import java.util.*;
    -
    -public class AllApiExample {
    -
    -    public static void main(String[] args) {
    -        ApiClient defaultClient = Configuration.getDefaultApiClient();
    -        
    -        // Configure OAuth2 access token for authorization: oauth2schema
    -        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
    -        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
    -
    -        AllApi apiInstance = new AllApi();
    -        TemplateContext templateContext = ; // TemplateContext | templateContext
    -        try {
    -            TemplateContextResponse result = apiInstance.updateTemplateContext(templateContext);
    -            System.out.println(result);
    -        } catch (ApiException e) {
    -            System.err.println("Exception when calling AllApi#updateTemplateContext");
    -            e.printStackTrace();
    -        }
    -    }
    -}
    -
    -                                                  
    -
    - - -
    -
    
    -import api.AllApi;
    -
    -public class AllApiExample {
    -
    -    public static void main(String[] args) {
    -        AllApi apiInstance = new AllApi();
    -        TemplateContext templateContext = ; // TemplateContext | templateContext
    -        try {
    -            TemplateContextResponse result = apiInstance.updateTemplateContext(templateContext);
    -            System.out.println(result);
    -        } catch (ApiException e) {
    -            System.err.println("Exception when calling AllApi#updateTemplateContext");
    -            e.printStackTrace();
    -        }
    -    }
    -}
    -
    -                                                  
    -
    - - - - -
    -
    
    -Configuration *apiConfig = [Configuration sharedConfig];
    -
    -// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
    -[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
    -
    -
    -TemplateContext *templateContext = ; // templateContext
    -
    -AllApi *apiInstance = [[AllApi alloc] init];
    -
    -// Update template context
    -[apiInstance updateTemplateContextWith:templateContext
    -              completionHandler: ^(TemplateContextResponse output, NSError* error) {
    -                            if (output) {
    -                                NSLog(@"%@", output);
    -                            }
    -                            if (error) {
    -                                NSLog(@"Error: %@", error);
    -                            }
    -                        }];
    -
    -                                                    
    -
    -
    -
    
    -var  = require('');
    -var defaultClient = .ApiClient.instance;
    -
    -// Configure OAuth2 access token for authorization: oauth2schema
    -var oauth2schema = defaultClient.authentications['oauth2schema'];
    -oauth2schema.accessToken = "YOUR ACCESS TOKEN"
    -
    -var api = new .AllApi()
    -
    -var templateContext = ; // {TemplateContext} templateContext
    -
    -
    -var callback = function(error, data, response) {
    -  if (error) {
    -    console.error(error);
    -  } else {
    -    console.log('API called successfully. Returned data: ' + data);
    -  }
    -};
    -api.updateTemplateContext(templateContext, callback);
    -
    -                                                    
    -
    - - - -
    -
    
    -using System;
    -using System.Diagnostics;
    -using .Api;
    -using .Client;
    -using model;
    -
    -namespace Example
    -{
    -    public class updateTemplateContextExample
    -    {
    -        public void main()
    -        {
    -            
    -            // Configure OAuth2 access token for authorization: oauth2schema
    -            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
    -
    -            var apiInstance = new AllApi();
    -            var templateContext = new TemplateContext(); // TemplateContext | templateContext
    -
    -            try
    -            {
    -                // Update template context
    -                TemplateContextResponse result = apiInstance.updateTemplateContext(templateContext);
    -                Debug.WriteLine(result);
    -            }
    -            catch (Exception e)
    -            {
    -                Debug.Print("Exception when calling AllApi.updateTemplateContext: " + e.Message );
    -            }
    -        }
    -    }
    -}
    -
    -                                                    
    -
    - - -
    -
    
    -setAccessToken('YOUR_ACCESS_TOKEN');
    -
    -$api_instance = new com.sphereon.sdk.template-processor\Api\AllApi();
    -$templateContext = ; // TemplateContext | templateContext
    -
    -try {
    -    $result = $api_instance->updateTemplateContext($templateContext);
    -    print_r($result);
    -} catch (Exception $e) {
    -    echo 'Exception when calling AllApi->updateTemplateContext: ', $e->getMessage(), PHP_EOL;
    -}
    -
    -                                                  
    -
    - -
    - - - - - -

    Parameters

    - - - - - - -
    Body parameters
    - - - - - - - - - - - -
    NameDescription
    templateContext * - - - -
    -
    - - -

    Responses

    - -

    Status: 200 - Template context updated

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - -

    Status: 404 - Template context not found

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - -

    Status: 500 - Internal server error

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - - - - - - -
    - -
    - -
    - - - - - - - - -
    - -
    -
    -

    uploadTemplateFile

    -
    -
    - -
    -
    - -

    -

    Upload the Office template file

    -

    -
    - -
    /template/processor/0.1/templates/{templateId}
    - -

    -

    Usage and SDK Samples

    -

    - - - -
    -
    -
    
    -curl -X post -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template/processor/0.1/templates/{templateId}"
    -
    -
    -
    -
    - -
    -
    
    -import com.sphereon.sdk.template-processor.*;
    -import com.sphereon.sdk.template-processor.auth.*;
    -import com.sphereon.sdk.template-processor.model.*;
    -import api.AllApi;
    -
    -import java.io.File;
    -import java.util.*;
    -
    -public class AllApiExample {
    -
    -    public static void main(String[] args) {
    -        ApiClient defaultClient = Configuration.getDefaultApiClient();
    -        
    -        // Configure OAuth2 access token for authorization: oauth2schema
    -        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
    -        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
    -
    -        AllApi apiInstance = new AllApi();
    -        String templateId = templateId_example; // String | The template context name unique for your environment
    -        file stream = /path/to/file.txt; // file | The template (file/inputstream) to store
    -        try {
    -            TemplateContextResponse result = apiInstance.uploadTemplateFile(templateId, stream);
    -            System.out.println(result);
    -        } catch (ApiException e) {
    -            System.err.println("Exception when calling AllApi#uploadTemplateFile");
    -            e.printStackTrace();
    -        }
    -    }
    -}
    -
    -                                                  
    -
    - - -
    -
    
    -import api.AllApi;
    -
    -public class AllApiExample {
    -
    -    public static void main(String[] args) {
    -        AllApi apiInstance = new AllApi();
    -        String templateId = templateId_example; // String | The template context name unique for your environment
    -        file stream = /path/to/file.txt; // file | The template (file/inputstream) to store
    -        try {
    -            TemplateContextResponse result = apiInstance.uploadTemplateFile(templateId, stream);
    -            System.out.println(result);
    -        } catch (ApiException e) {
    -            System.err.println("Exception when calling AllApi#uploadTemplateFile");
    -            e.printStackTrace();
    -        }
    -    }
    -}
    -
    -                                                  
    -
    - - - - -
    -
    
    -Configuration *apiConfig = [Configuration sharedConfig];
    -
    -// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
    -[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
    -
    -
    -String *templateId = templateId_example; // The template context name unique for your environment
    -file *stream = /path/to/file.txt; // The template (file/inputstream) to store
    -
    -AllApi *apiInstance = [[AllApi alloc] init];
    -
    -// Upload template file
    -[apiInstance uploadTemplateFileWith:templateId
    -    stream:stream
    -              completionHandler: ^(TemplateContextResponse output, NSError* error) {
    -                            if (output) {
    -                                NSLog(@"%@", output);
    -                            }
    -                            if (error) {
    -                                NSLog(@"Error: %@", error);
    -                            }
    -                        }];
    -
    -                                                    
    -
    -
    -
    
    -var  = require('');
    -var defaultClient = .ApiClient.instance;
    -
    -// Configure OAuth2 access token for authorization: oauth2schema
    -var oauth2schema = defaultClient.authentications['oauth2schema'];
    -oauth2schema.accessToken = "YOUR ACCESS TOKEN"
    -
    -var api = new .AllApi()
    -
    -var templateId = templateId_example; // {String} The template context name unique for your environment
    -
    -var stream = /path/to/file.txt; // {file} The template (file/inputstream) to store
    -
    -
    -var callback = function(error, data, response) {
    -  if (error) {
    -    console.error(error);
    -  } else {
    -    console.log('API called successfully. Returned data: ' + data);
    -  }
    -};
    -api.uploadTemplateFile(templateId, stream, callback);
    -
    -                                                    
    -
    - - - -
    -
    
    -using System;
    -using System.Diagnostics;
    -using .Api;
    -using .Client;
    -using model;
    -
    -namespace Example
    -{
    -    public class uploadTemplateFileExample
    -    {
    -        public void main()
    -        {
    -            
    -            // Configure OAuth2 access token for authorization: oauth2schema
    -            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
    -
    -            var apiInstance = new AllApi();
    -            var templateId = templateId_example;  // String | The template context name unique for your environment
    -            var stream = new file(); // file | The template (file/inputstream) to store
    -
    -            try
    -            {
    -                // Upload template file
    -                TemplateContextResponse result = apiInstance.uploadTemplateFile(templateId, stream);
    -                Debug.WriteLine(result);
    -            }
    -            catch (Exception e)
    -            {
    -                Debug.Print("Exception when calling AllApi.uploadTemplateFile: " + e.Message );
    -            }
    -        }
    -    }
    -}
    -
    -                                                    
    -
    - - -
    -
    
    -setAccessToken('YOUR_ACCESS_TOKEN');
    -
    -$api_instance = new com.sphereon.sdk.template-processor\Api\AllApi();
    -$templateId = templateId_example; // String | The template context name unique for your environment
    -$stream = /path/to/file.txt; // file | The template (file/inputstream) to store
    -
    -try {
    -    $result = $api_instance->uploadTemplateFile($templateId, $stream);
    -    print_r($result);
    -} catch (Exception $e) {
    -    echo 'Exception when calling AllApi->uploadTemplateFile: ', $e->getMessage(), PHP_EOL;
    -}
    -
    -                                                  
    -
    - -
    - - - - - -

    Parameters

    - - - -
    Path parameters
    - - - - - - - - - - -
    NameDescription
    templateId* - - - -
    -
    - - - - - -

    Responses

    - -

    Status: 200 - Template uploaded and stored

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - -

    Status: 404 - Template context not found

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - -

    Status: 500 - Internal server error

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - - - - - - -
    - -
    - -
    - -
    - -
    -

    DataSet

    - - - - - - - -
    - -
    -
    -

    createDataSet

    -
    -
    - -
    -
    - -

    -

    Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job.

    -

    -
    - -
    /template/processor/0.1/datasets
    - -

    -

    Usage and SDK Samples

    -

    - - - -
    -
    -
    
    -curl -X post -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template/processor/0.1/datasets"
    -
    -
    -
    -
    - -
    -
    
    -import com.sphereon.sdk.template-processor.*;
    -import com.sphereon.sdk.template-processor.auth.*;
    -import com.sphereon.sdk.template-processor.model.*;
    -import api.DataSetApi;
    -
    -import java.io.File;
    -import java.util.*;
    -
    -public class DataSetApiExample {
    -
    -    public static void main(String[] args) {
    -        ApiClient defaultClient = Configuration.getDefaultApiClient();
    -        
    -        // Configure OAuth2 access token for authorization: oauth2schema
    -        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
    -        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
    -
    -        DataSetApi apiInstance = new DataSetApi();
    -        String payload = payload_example; // String | The dates for the merge [   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   },   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   } ]
    -        try {
    -            DataSetResponse result = apiInstance.createDataSet(payload);
    -            System.out.println(result);
    -        } catch (ApiException e) {
    -            System.err.println("Exception when calling DataSetApi#createDataSet");
    -            e.printStackTrace();
    -        }
    -    }
    -}
    -
    -                                                  
    -
    - - -
    -
    
    -import api.DataSetApi;
    -
    -public class DataSetApiExample {
    -
    -    public static void main(String[] args) {
    -        DataSetApi apiInstance = new DataSetApi();
    -        String payload = payload_example; // String | The dates for the merge [   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   },   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   } ]
    -        try {
    -            DataSetResponse result = apiInstance.createDataSet(payload);
    -            System.out.println(result);
    -        } catch (ApiException e) {
    -            System.err.println("Exception when calling DataSetApi#createDataSet");
    -            e.printStackTrace();
    -        }
    -    }
    -}
    -
    -                                                  
    -
    - - - - -
    -
    
    -Configuration *apiConfig = [Configuration sharedConfig];
    -
    -// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
    -[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
    -
    -
    -String *payload = payload_example; // The dates for the merge [   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   },   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   } ]
    -
    -DataSetApi *apiInstance = [[DataSetApi alloc] init];
    -
    -// Store dataset
    -[apiInstance createDataSetWith:payload
    -              completionHandler: ^(DataSetResponse output, NSError* error) {
    -                            if (output) {
    -                                NSLog(@"%@", output);
    -                            }
    -                            if (error) {
    -                                NSLog(@"Error: %@", error);
    -                            }
    -                        }];
    -
    -                                                    
    -
    -
    -
    
    -var  = require('');
    -var defaultClient = .ApiClient.instance;
    -
    -// Configure OAuth2 access token for authorization: oauth2schema
    -var oauth2schema = defaultClient.authentications['oauth2schema'];
    -oauth2schema.accessToken = "YOUR ACCESS TOKEN"
    -
    -var api = new .DataSetApi()
    -
    -var payload = payload_example; // {String} The dates for the merge [   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   },   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   } ]
    -
    -
    -var callback = function(error, data, response) {
    -  if (error) {
    -    console.error(error);
    -  } else {
    -    console.log('API called successfully. Returned data: ' + data);
    -  }
    -};
    -api.createDataSet(payload, callback);
    -
    -                                                    
    -
    - - - -
    -
    
    -using System;
    -using System.Diagnostics;
    -using .Api;
    -using .Client;
    -using model;
    -
    -namespace Example
    -{
    -    public class createDataSetExample
    -    {
    -        public void main()
    -        {
    -            
    -            // Configure OAuth2 access token for authorization: oauth2schema
    -            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
    -
    -            var apiInstance = new DataSetApi();
    -            var payload = payload_example;  // String | The dates for the merge [   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   },   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   } ]
    -
    -            try
    -            {
    -                // Store dataset
    -                DataSetResponse result = apiInstance.createDataSet(payload);
    -                Debug.WriteLine(result);
    -            }
    -            catch (Exception e)
    -            {
    -                Debug.Print("Exception when calling DataSetApi.createDataSet: " + e.Message );
    -            }
    -        }
    -    }
    -}
    -
    -                                                    
    -
    - - -
    -
    
    -setAccessToken('YOUR_ACCESS_TOKEN');
    -
    -$api_instance = new com.sphereon.sdk.template-processor\Api\DataSetApi();
    -$payload = payload_example; // String | The dates for the merge [   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   },   {     \"Field1\": \"Field1 value\",     \"Field2\": \"Field2 value\",   } ]
    -
    -try {
    -    $result = $api_instance->createDataSet($payload);
    -    print_r($result);
    -} catch (Exception $e) {
    -    echo 'Exception when calling DataSetApi->createDataSet: ', $e->getMessage(), PHP_EOL;
    -}
    -
    -                                                  
    -
    - -
    - - - - - -

    Parameters

    - - - - - - -
    Body parameters
    - - - - - - - - - - - -
    NameDescription
    payload * - - - -
    -
    - - -

    Responses

    - -

    Status: 200 - Data set received and stored

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - -

    Status: 400 - Unsupported data set format

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - - - - - - -
    - -
    - -
    - - - - - - - - -
    - -
    -
    -

    deleteDataSet

    -
    -
    - -
    -
    - -

    -

    Delete a stored data set

    -

    -
    - -
    /template/processor/0.1/datasets/{dataSetId}
    - -

    -

    Usage and SDK Samples

    -

    - - - -
    -
    -
    
    -curl -X delete -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template/processor/0.1/datasets/{dataSetId}"
    -
    -
    -
    -
    - -
    -
    
    -import com.sphereon.sdk.template-processor.*;
    -import com.sphereon.sdk.template-processor.auth.*;
    -import com.sphereon.sdk.template-processor.model.*;
    -import api.DataSetApi;
    -
    -import java.io.File;
    -import java.util.*;
    -
    -public class DataSetApiExample {
    -
    -    public static void main(String[] args) {
    -        ApiClient defaultClient = Configuration.getDefaultApiClient();
    -        
    -        // Configure OAuth2 access token for authorization: oauth2schema
    -        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
    -        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
    -
    -        DataSetApi apiInstance = new DataSetApi();
    -        String dataSetId = dataSetId_example; // String | dataSetId
    -        try {
    -            DataSetResponse result = apiInstance.deleteDataSet(dataSetId);
    -            System.out.println(result);
    -        } catch (ApiException e) {
    -            System.err.println("Exception when calling DataSetApi#deleteDataSet");
    -            e.printStackTrace();
    -        }
    -    }
    -}
    -
    -                                                  
    -
    - - -
    -
    
    -import api.DataSetApi;
    -
    -public class DataSetApiExample {
    -
    -    public static void main(String[] args) {
    -        DataSetApi apiInstance = new DataSetApi();
    -        String dataSetId = dataSetId_example; // String | dataSetId
    -        try {
    -            DataSetResponse result = apiInstance.deleteDataSet(dataSetId);
    -            System.out.println(result);
    -        } catch (ApiException e) {
    -            System.err.println("Exception when calling DataSetApi#deleteDataSet");
    -            e.printStackTrace();
    -        }
    -    }
    -}
    -
    -                                                  
    -
    - - - - -
    -
    
    -Configuration *apiConfig = [Configuration sharedConfig];
    -
    -// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
    -[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
    -
    -
    -String *dataSetId = dataSetId_example; // dataSetId
    -
    -DataSetApi *apiInstance = [[DataSetApi alloc] init];
    -
    -// Delete a stored data set
    -[apiInstance deleteDataSetWith:dataSetId
    -              completionHandler: ^(DataSetResponse output, NSError* error) {
    -                            if (output) {
    -                                NSLog(@"%@", output);
    -                            }
    -                            if (error) {
    -                                NSLog(@"Error: %@", error);
    -                            }
    -                        }];
    -
    -                                                    
    -
    -
    -
    
    -var  = require('');
    -var defaultClient = .ApiClient.instance;
    -
    -// Configure OAuth2 access token for authorization: oauth2schema
    -var oauth2schema = defaultClient.authentications['oauth2schema'];
    -oauth2schema.accessToken = "YOUR ACCESS TOKEN"
    -
    -var api = new .DataSetApi()
    -
    -var dataSetId = dataSetId_example; // {String} dataSetId
    -
    -
    -var callback = function(error, data, response) {
    -  if (error) {
    -    console.error(error);
    -  } else {
    -    console.log('API called successfully. Returned data: ' + data);
    -  }
    -};
    -api.deleteDataSet(dataSetId, callback);
    -
    -                                                    
    -
    - - - -
    -
    
    -using System;
    -using System.Diagnostics;
    -using .Api;
    -using .Client;
    -using model;
    -
    -namespace Example
    -{
    -    public class deleteDataSetExample
    -    {
    -        public void main()
    -        {
    -            
    -            // Configure OAuth2 access token for authorization: oauth2schema
    -            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
    -
    -            var apiInstance = new DataSetApi();
    -            var dataSetId = dataSetId_example;  // String | dataSetId
    -
    -            try
    -            {
    -                // Delete a stored data set
    -                DataSetResponse result = apiInstance.deleteDataSet(dataSetId);
    -                Debug.WriteLine(result);
    -            }
    -            catch (Exception e)
    -            {
    -                Debug.Print("Exception when calling DataSetApi.deleteDataSet: " + e.Message );
    -            }
    -        }
    -    }
    -}
    -
    -                                                    
    -
    - - -
    -
    
    -setAccessToken('YOUR_ACCESS_TOKEN');
    -
    -$api_instance = new com.sphereon.sdk.template-processor\Api\DataSetApi();
    -$dataSetId = dataSetId_example; // String | dataSetId
    -
    -try {
    -    $result = $api_instance->deleteDataSet($dataSetId);
    -    print_r($result);
    -} catch (Exception $e) {
    -    echo 'Exception when calling DataSetApi->deleteDataSet: ', $e->getMessage(), PHP_EOL;
    -}
    -
    -                                                  
    -
    - -
    - - - - - -

    Parameters

    - - - -
    Path parameters
    - - - - - - - - - - -
    NameDescription
    dataSetId* - - - -
    -
    - - - - - -

    Responses

    - -

    Status: 200 - Successfully deleted the data set

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - -

    Status: 400 - Could not delete data set

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - -

    Status: 404 - Invalid data set id

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - - - - - - -
    - -
    - -
    - -
    - -
    -

    Job

    - - - - - - - -
    - -
    -
    -

    getJob

    -
    -
    - -
    -
    - -

    -

    Get the merge job definition and current state. Please not that you can differentiate based on http response status

    -

    -
    - -
    /template/processor/0.1/jobs/{jobId}
    - -

    -

    Usage and SDK Samples

    -

    - - - -
    -
    -
    
    -curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template/processor/0.1/jobs/{jobId}"
    -
    -
    -
    -
    - -
    -
    
    -import com.sphereon.sdk.template-processor.*;
    -import com.sphereon.sdk.template-processor.auth.*;
    -import com.sphereon.sdk.template-processor.model.*;
    -import api.JobApi;
    -
    -import java.io.File;
    -import java.util.*;
    -
    -public class JobApiExample {
    -
    -    public static void main(String[] args) {
    -        ApiClient defaultClient = Configuration.getDefaultApiClient();
    -        
    -        // Configure OAuth2 access token for authorization: oauth2schema
    -        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
    -        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
    -
    -        JobApi apiInstance = new JobApi();
    -        String jobId = jobId_example; // String | jobId
    -        try {
    -            MergeJobResponse result = apiInstance.getJob(jobId);
    -            System.out.println(result);
    -        } catch (ApiException e) {
    -            System.err.println("Exception when calling JobApi#getJob");
    -            e.printStackTrace();
    -        }
    -    }
    -}
    -
    -                                                  
    -
    - - -
    -
    
    -import api.JobApi;
    -
    -public class JobApiExample {
    -
    -    public static void main(String[] args) {
    -        JobApi apiInstance = new JobApi();
    -        String jobId = jobId_example; // String | jobId
    -        try {
    -            MergeJobResponse result = apiInstance.getJob(jobId);
    -            System.out.println(result);
    -        } catch (ApiException e) {
    -            System.err.println("Exception when calling JobApi#getJob");
    -            e.printStackTrace();
    -        }
    -    }
    -}
    -
    -                                                  
    -
    - - - - -
    -
    
    -Configuration *apiConfig = [Configuration sharedConfig];
    -
    -// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
    -[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
    -
    -
    -String *jobId = jobId_example; // jobId
    -
    -JobApi *apiInstance = [[JobApi alloc] init];
    -
    -// Job definition and state
    -[apiInstance getJobWith:jobId
    -              completionHandler: ^(MergeJobResponse output, NSError* error) {
    -                            if (output) {
    -                                NSLog(@"%@", output);
    -                            }
    -                            if (error) {
    -                                NSLog(@"Error: %@", error);
    -                            }
    -                        }];
    -
    -                                                    
    -
    -
    -
    
    -var  = require('');
    -var defaultClient = .ApiClient.instance;
    -
    -// Configure OAuth2 access token for authorization: oauth2schema
    -var oauth2schema = defaultClient.authentications['oauth2schema'];
    -oauth2schema.accessToken = "YOUR ACCESS TOKEN"
    -
    -var api = new .JobApi()
    -
    -var jobId = jobId_example; // {String} jobId
    -
    -
    -var callback = function(error, data, response) {
    -  if (error) {
    -    console.error(error);
    -  } else {
    -    console.log('API called successfully. Returned data: ' + data);
    -  }
    -};
    -api.getJob(jobId, callback);
    -
    -                                                    
    -
    - - - -
    -
    
    -using System;
    -using System.Diagnostics;
    -using .Api;
    -using .Client;
    -using model;
    -
    -namespace Example
    -{
    -    public class getJobExample
    -    {
    -        public void main()
    -        {
    -            
    -            // Configure OAuth2 access token for authorization: oauth2schema
    -            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
    -
    -            var apiInstance = new JobApi();
    -            var jobId = jobId_example;  // String | jobId
    -
    -            try
    -            {
    -                // Job definition and state
    -                MergeJobResponse result = apiInstance.getJob(jobId);
    -                Debug.WriteLine(result);
    -            }
    -            catch (Exception e)
    -            {
    -                Debug.Print("Exception when calling JobApi.getJob: " + e.Message );
    -            }
    -        }
    -    }
    -}
    -
    -                                                    
    -
    - - -
    -
    
    -setAccessToken('YOUR_ACCESS_TOKEN');
    -
    -$api_instance = new com.sphereon.sdk.template-processor\Api\JobApi();
    -$jobId = jobId_example; // String | jobId
    -
    -try {
    -    $result = $api_instance->getJob($jobId);
    -    print_r($result);
    -} catch (Exception $e) {
    -    echo 'Exception when calling JobApi->getJob: ', $e->getMessage(), PHP_EOL;
    -}
    -
    -                                                  
    -
    - -
    - - - - - -

    Parameters

    - - - -
    Path parameters
    - - - - - - - - - - -
    NameDescription
    jobId* - - - -
    -
    - - - - - -

    Responses

    - -

    Status: 200 - Merge job returned and Job is done or in error

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - -

    Status: 202 - Merge job returned and Job is still processing

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - -

    Status: 404 - Invalid job id

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - - - - - - -
    - -
    - -
    - - - - - - - - -
    - -
    -
    -

    getJobs

    -
    -
    - -
    -
    - -

    -

    Get all office text job definitions and their current state.

    -

    -
    - -
    /template/processor/0.1/jobs
    - -

    -

    Usage and SDK Samples

    -

    - - - -
    -
    -
    
    -curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template/processor/0.1/jobs?status="
    -
    -
    -
    -
    - -
    -
    
    -import com.sphereon.sdk.template-processor.*;
    -import com.sphereon.sdk.template-processor.auth.*;
    -import com.sphereon.sdk.template-processor.model.*;
    -import api.JobApi;
    -
    -import java.io.File;
    -import java.util.*;
    -
    -public class JobApiExample {
    -
    -    public static void main(String[] args) {
    -        ApiClient defaultClient = Configuration.getDefaultApiClient();
    -        
    -        // Configure OAuth2 access token for authorization: oauth2schema
    -        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
    -        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
    -
    -        JobApi apiInstance = new JobApi();
    -        array[String] status = ; // array[String] | A list of status to filter on.
    -        try {
    -            array[MergeJobResponse] result = apiInstance.getJobs(status);
    -            System.out.println(result);
    -        } catch (ApiException e) {
    -            System.err.println("Exception when calling JobApi#getJobs");
    -            e.printStackTrace();
    -        }
    -    }
    -}
    -
    -                                                  
    -
    - - -
    -
    
    -import api.JobApi;
    -
    -public class JobApiExample {
    -
    -    public static void main(String[] args) {
    -        JobApi apiInstance = new JobApi();
    -        array[String] status = ; // array[String] | A list of status to filter on.
    -        try {
    -            array[MergeJobResponse] result = apiInstance.getJobs(status);
    -            System.out.println(result);
    -        } catch (ApiException e) {
    -            System.err.println("Exception when calling JobApi#getJobs");
    -            e.printStackTrace();
    -        }
    -    }
    -}
    -
    -                                                  
    -
    - - - - -
    -
    
    -Configuration *apiConfig = [Configuration sharedConfig];
    -
    -// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
    -[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
    -
    -
    -array[String] *status = ; // A list of status to filter on. (optional)
    -
    -JobApi *apiInstance = [[JobApi alloc] init];
    -
    -// Get all jobs
    -[apiInstance getJobsWith:status
    -              completionHandler: ^(array[MergeJobResponse] output, NSError* error) {
    -                            if (output) {
    -                                NSLog(@"%@", output);
    -                            }
    -                            if (error) {
    -                                NSLog(@"Error: %@", error);
    -                            }
    -                        }];
    -
    -                                                    
    -
    -
    -
    
    -var  = require('');
    -var defaultClient = .ApiClient.instance;
    -
    -// Configure OAuth2 access token for authorization: oauth2schema
    -var oauth2schema = defaultClient.authentications['oauth2schema'];
    -oauth2schema.accessToken = "YOUR ACCESS TOKEN"
    -
    -var api = new .JobApi()
    -
    -var opts = { 
    -  'status':  // {array[String]} A list of status to filter on.
    -};
    -
    -var callback = function(error, data, response) {
    -  if (error) {
    -    console.error(error);
    -  } else {
    -    console.log('API called successfully. Returned data: ' + data);
    -  }
    -};
    -api.getJobs(opts, callback);
    -
    -                                                    
    -
    - - - -
    -
    
    -using System;
    -using System.Diagnostics;
    -using .Api;
    -using .Client;
    -using model;
    -
    -namespace Example
    -{
    -    public class getJobsExample
    -    {
    -        public void main()
    -        {
    -            
    -            // Configure OAuth2 access token for authorization: oauth2schema
    -            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
    -
    -            var apiInstance = new JobApi();
    -            var status = new array[String](); // array[String] | A list of status to filter on. (optional) 
    -
    -            try
    -            {
    -                // Get all jobs
    -                array[MergeJobResponse] result = apiInstance.getJobs(status);
    -                Debug.WriteLine(result);
    -            }
    -            catch (Exception e)
    -            {
    -                Debug.Print("Exception when calling JobApi.getJobs: " + e.Message );
    -            }
    -        }
    -    }
    -}
    -
    -                                                    
    -
    - - -
    -
    
    -setAccessToken('YOUR_ACCESS_TOKEN');
    -
    -$api_instance = new com.sphereon.sdk.template-processor\Api\JobApi();
    -$status = ; // array[String] | A list of status to filter on.
    -
    -try {
    -    $result = $api_instance->getJobs($status);
    -    print_r($result);
    -} catch (Exception $e) {
    -    echo 'Exception when calling JobApi->getJobs: ', $e->getMessage(), PHP_EOL;
    -}
    -
    -                                                  
    -
    - -
    - - - - - -

    Parameters

    - - - - - - - -
    Query parameters
    - - - - - - - - - - -
    NameDescription
    status - - - -
    -
    - -

    Responses

    - -

    Status: 200 - All office text jobs that have not been deleted

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - - - - - - -
    - -
    - -
    - - - - - - - - -
    - -
    -
    -

    getResultStreamById

    -
    -
    - -
    -
    - -

    -

    Get a merge result document as a binary stream.

    -

    -
    - -
    /template/processor/0.1/jobs/{jobId}/result/file/{streamId}
    - -

    -

    Usage and SDK Samples

    -

    - - - -
    -
    -
    
    -curl -X put -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template/processor/0.1/jobs/{jobId}/result/file/{streamId}"
    -
    -
    -
    -
    - -
    -
    
    -import com.sphereon.sdk.template-processor.*;
    -import com.sphereon.sdk.template-processor.auth.*;
    -import com.sphereon.sdk.template-processor.model.*;
    -import api.JobApi;
    -
    -import java.io.File;
    -import java.util.*;
    -
    -public class JobApiExample {
    -
    -    public static void main(String[] args) {
    -        ApiClient defaultClient = Configuration.getDefaultApiClient();
    -        
    -        // Configure OAuth2 access token for authorization: oauth2schema
    -        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
    -        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
    -
    -        JobApi apiInstance = new JobApi();
    -        String jobId = jobId_example; // String | jobId
    -        String streamId = streamId_example; // String | streamId
    -        OutputSettings outputSettings = ; // OutputSettings | outputSettings
    -        try {
    -            byte[] result = apiInstance.getResultStreamById(jobId, streamId, outputSettings);
    -            System.out.println(result);
    -        } catch (ApiException e) {
    -            System.err.println("Exception when calling JobApi#getResultStreamById");
    -            e.printStackTrace();
    -        }
    -    }
    -}
    -
    -                                                  
    -
    - - -
    -
    
    -import api.JobApi;
    -
    -public class JobApiExample {
    -
    -    public static void main(String[] args) {
    -        JobApi apiInstance = new JobApi();
    -        String jobId = jobId_example; // String | jobId
    -        String streamId = streamId_example; // String | streamId
    -        OutputSettings outputSettings = ; // OutputSettings | outputSettings
    -        try {
    -            byte[] result = apiInstance.getResultStreamById(jobId, streamId, outputSettings);
    -            System.out.println(result);
    -        } catch (ApiException e) {
    -            System.err.println("Exception when calling JobApi#getResultStreamById");
    -            e.printStackTrace();
    -        }
    -    }
    -}
    -
    -                                                  
    -
    - - - - -
    -
    
    -Configuration *apiConfig = [Configuration sharedConfig];
    -
    -// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
    -[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
    -
    -
    -String *jobId = jobId_example; // jobId
    -String *streamId = streamId_example; // streamId
    -OutputSettings *outputSettings = ; // outputSettings (optional)
    -
    -JobApi *apiInstance = [[JobApi alloc] init];
    -
    -// Get the result file
    -[apiInstance getResultStreamByIdWith:jobId
    -    streamId:streamId
    -    outputSettings:outputSettings
    -              completionHandler: ^(byte[] output, NSError* error) {
    -                            if (output) {
    -                                NSLog(@"%@", output);
    -                            }
    -                            if (error) {
    -                                NSLog(@"Error: %@", error);
    -                            }
    -                        }];
    -
    -                                                    
    -
    -
    -
    
    -var  = require('');
    -var defaultClient = .ApiClient.instance;
    -
    -// Configure OAuth2 access token for authorization: oauth2schema
    -var oauth2schema = defaultClient.authentications['oauth2schema'];
    -oauth2schema.accessToken = "YOUR ACCESS TOKEN"
    -
    -var api = new .JobApi()
    -
    -var jobId = jobId_example; // {String} jobId
    -
    -var streamId = streamId_example; // {String} streamId
    -
    -var opts = { 
    -  'outputSettings':  // {OutputSettings} outputSettings
    -};
    -
    -var callback = function(error, data, response) {
    -  if (error) {
    -    console.error(error);
    -  } else {
    -    console.log('API called successfully. Returned data: ' + data);
    -  }
    -};
    -api.getResultStreamById(jobId, streamId, opts, callback);
    -
    -                                                    
    -
    - - - -
    -
    
    -using System;
    -using System.Diagnostics;
    -using .Api;
    -using .Client;
    -using model;
    -
    -namespace Example
    -{
    -    public class getResultStreamByIdExample
    -    {
    -        public void main()
    -        {
    -            
    -            // Configure OAuth2 access token for authorization: oauth2schema
    -            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
    -
    -            var apiInstance = new JobApi();
    -            var jobId = jobId_example;  // String | jobId
    -            var streamId = streamId_example;  // String | streamId
    -            var outputSettings = new OutputSettings(); // OutputSettings | outputSettings (optional) 
    -
    -            try
    -            {
    -                // Get the result file
    -                byte[] result = apiInstance.getResultStreamById(jobId, streamId, outputSettings);
    -                Debug.WriteLine(result);
    -            }
    -            catch (Exception e)
    -            {
    -                Debug.Print("Exception when calling JobApi.getResultStreamById: " + e.Message );
    -            }
    -        }
    -    }
    -}
    -
    -                                                    
    -
    - - -
    -
    
    -setAccessToken('YOUR_ACCESS_TOKEN');
    -
    -$api_instance = new com.sphereon.sdk.template-processor\Api\JobApi();
    -$jobId = jobId_example; // String | jobId
    -$streamId = streamId_example; // String | streamId
    -$outputSettings = ; // OutputSettings | outputSettings
    -
    -try {
    -    $result = $api_instance->getResultStreamById($jobId, $streamId, $outputSettings);
    -    print_r($result);
    -} catch (Exception $e) {
    -    echo 'Exception when calling JobApi->getResultStreamById: ', $e->getMessage(), PHP_EOL;
    -}
    -
    -                                                  
    -
    - -
    - - - - - -

    Parameters

    - - - -
    Path parameters
    - - - - - - - - - - - - - - -
    NameDescription
    jobId* - - - -
    -
    streamId* - - - -
    -
    - - - -
    Body parameters
    - - - - - - - - - - - -
    NameDescription
    outputSettings - - - -
    -
    - - -

    Responses

    - -

    Status: 200 - Result file successfully returned

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - -

    Status: 202 - Result file not yet created. Job is still executing.

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - + OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); + oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); + DataSetApi apiInstance = new DataSetApi(); + String payload = payload_example; // String | The dates for the merge +[ + { + "Field1": "Field1 value", + "Field2": "Field2 value", + }, + { + "Field1": "Field1 value", + "Field2": "Field2 value", + } +] + try { + DataSetResponse result = apiInstance.createDataSet(payload); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DataSetApi#createDataSet"); + e.printStackTrace(); + } + } +}
    +
    +
    +
    import com.sphereon.sdk.template-processor.api.DataSetApi;
     
    +public class DataSetApiExample {
     
    -                                                    
    + public static void main(String[] args) { + DataSetApi apiInstance = new DataSetApi(); + String payload = payload_example; // String | The dates for the merge +[ + { + "Field1": "Field1 value", + "Field2": "Field2 value", + }, + { + "Field1": "Field1 value", + "Field2": "Field2 value", + } +] + try { + DataSetResponse result = apiInstance.createDataSet(payload); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DataSetApi#createDataSet"); + e.printStackTrace(); + } + } +} +
    + +
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
    +// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
    +[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
    +String *payload = payload_example; // The dates for the merge
    +[
    +  {
    +    "Field1": "Field1 value",
    +    "Field2": "Field2 value",
    +  },
    +  {
    +    "Field1": "Field1 value",
    +    "Field2": "Field2 value",
    +  }
    +]
     
    +DataSetApi *apiInstance = [[DataSetApi alloc] init];
     
    -                                                
    +// Store dataset +[apiInstance createDataSetWith:payload + completionHandler: ^(DataSetResponse output, NSError* error) { + if (output) { + NSLog(@"%@", output); + } + if (error) { + NSLog(@"Error: %@", error); + } + }]; + +
    +
    +
    var TemplateProcessor = require('template_processor');
    +var defaultClient = TemplateProcessor.ApiClient.instance;
     
    +// Configure OAuth2 access token for authorization: oauth2schema
    +var oauth2schema = defaultClient.authentications['oauth2schema'];
    +oauth2schema.accessToken = "YOUR ACCESS TOKEN"
     
    +var api = new TemplateProcessor.DataSetApi()
     
    -                                                

    Status: 400 - Result file could not be created.

    +var payload = payload_example; // {String} The dates for the merge +[ + { + "Field1": "Field1 value", + "Field2": "Field2 value", + }, + { + "Field1": "Field1 value", + "Field2": "Field2 value", + } +] -
    +
    + +
    +
    using System;
    +using System.Diagnostics;
    +using IO.Swagger.Api;
    +using IO.Swagger.Client;
    +using IO.Swagger.Model;
     
    -                                                
    +namespace Example
    +{
    +    public class createDataSetExample
    +    {
    +        public void main()
    +        {
    +            
    +            // Configure OAuth2 access token for authorization: oauth2schema
    +            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
     
    +            var apiInstance = new DataSetApi();
    +            var payload = payload_example;  // String | The dates for the merge
    +[
    +  {
    +    "Field1": "Field1 value",
    +    "Field2": "Field2 value",
    +  },
    +  {
    +    "Field1": "Field1 value",
    +    "Field2": "Field2 value",
    +  }
    +]
     
    +            try
    +            {
    +                // Store dataset
    +                DataSetResponse result = apiInstance.createDataSet(payload);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling DataSetApi.createDataSet: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
     
    +// Configure OAuth2 access token for authorization: oauth2schema
    +Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
    +
    +$api_instance = new Swagger\Client\Api\DataSetApi();
    +$payload = payload_example; // String | The dates for the merge
    +[
    +  {
    +    "Field1": "Field1 value",
    +    "Field2": "Field2 value",
    +  },
    +  {
    +    "Field1": "Field1 value",
    +    "Field2": "Field2 value",
    +  }
    +]
     
    +try {
    +    $result = $api_instance->createDataSet($payload);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DataSetApi->createDataSet: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    +
    +
    use Data::Dumper;
    +use WWW::SwaggerClient::Configuration;
    +use WWW::SwaggerClient::DataSetApi;
     
    -                                                
    +# Configure OAuth2 access token for authorization: oauth2schema +$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN'; +my $api_instance = WWW::SwaggerClient::DataSetApi->new(); +my $payload = WWW::SwaggerClient::Object::String->new(); # String | The dates for the merge +[ + { + "Field1": "Field1 value", + "Field2": "Field2 value", + }, + { + "Field1": "Field1 value", + "Field2": "Field2 value", + } +] + +eval { + my $result = $api_instance->createDataSet(payload => $payload); + print Dumper($result); +}; +if ($@) { + warn "Exception when calling DataSetApi->createDataSet: $@\n"; +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_client
    +from swagger_client.rest import ApiException
    +from pprint import pprint
    +
    +# Configure OAuth2 access token for authorization: oauth2schema
    +swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
    +
    +# create an instance of the API class
    +api_instance = swagger_client.DataSetApi()
    +payload = payload_example # String | The dates for the merge
    +[
    +  {
    +    "Field1": "Field1 value",
    +    "Field2": "Field2 value",
    +  },
    +  {
    +    "Field1": "Field1 value",
    +    "Field2": "Field2 value",
    +  }
    +]
     
    +try: 
    +    # Store dataset
    +    api_response = api_instance.create_data_set(payload)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DataSetApi->createDataSet: %s\n" % e)
    +
    + -
    +

    Parameters

    +
    Body parameters
    + + + + + + + + - var view = new JSONSchemaView(resolved.schema, 3); - $('#examples-Job-getResultStreamById-schema-data').val(JSON.stringify(resolved.schema)); - var result = $('#examples-Job-getResultStreamById-schema-400'); - result.empty(); - result.append(view.render()); - }); +
    NameDescription
    payload * -
    - +
    +
    +

    Responses

    +

    Status: 200 - Data set received and stored

    - }); - -
    - + +
    +
    +
    + +
    + +
    +
    + +

    Status: 400 - Unsupported data set format

    + + + +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +

    deleteDataSet

    +

    Delete a stored data set

    +
    +
    +
    +

    +

    Delete a stored data set

    +

    +
    +
    /template/processor/0.1/datasets/{dataSetId}
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X DELETE "https://gw.api.cloud.sphereon.com/template/processor/0.1/datasets/{dataSetId}"
    +
    +
    +
    import com.sphereon.sdk.template-processor.*;
    +import com.sphereon.sdk.template-processor.auth.*;
    +import com.sphereon.sdk.template-processor.model.*;
    +import com.sphereon.sdk.template-processor.api.DataSetApi;
     
    +import java.io.File;
    +import java.util.*;
     
    +public class DataSetApiExample {
     
    +    public static void main(String[] args) {
    +        ApiClient defaultClient = Configuration.getDefaultApiClient();
    +        
    +        // Configure OAuth2 access token for authorization: oauth2schema
    +        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
    +        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
     
    -                                                    
    + DataSetApi apiInstance = new DataSetApi(); + String dataSetId = dataSetId_example; // String | dataSetId + try { + DataSetResponse result = apiInstance.deleteDataSet(dataSetId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DataSetApi#deleteDataSet"); + e.printStackTrace(); + } + } +} +
    +
    +
    import com.sphereon.sdk.template-processor.api.DataSetApi;
     
    +public class DataSetApiExample {
     
    +    public static void main(String[] args) {
    +        DataSetApi apiInstance = new DataSetApi();
    +        String dataSetId = dataSetId_example; // String | dataSetId
    +        try {
    +            DataSetResponse result = apiInstance.deleteDataSet(dataSetId);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling DataSetApi#deleteDataSet");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
    -                                                
    +// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema) +[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; +String *dataSetId = dataSetId_example; // dataSetId +DataSetApi *apiInstance = [[DataSetApi alloc] init]; +// Delete a stored data set +[apiInstance deleteDataSetWith:dataSetId + completionHandler: ^(DataSetResponse output, NSError* error) { + if (output) { + NSLog(@"%@", output); + } + if (error) { + NSLog(@"Error: %@", error); + } + }]; + +
    +
    +
    var TemplateProcessor = require('template_processor');
    +var defaultClient = TemplateProcessor.ApiClient.instance;
     
    +// Configure OAuth2 access token for authorization: oauth2schema
    +var oauth2schema = defaultClient.authentications['oauth2schema'];
    +oauth2schema.accessToken = "YOUR ACCESS TOKEN"
     
    +var api = new TemplateProcessor.DataSetApi()
     
    +var dataSetId = dataSetId_example; // {String} dataSetId
     
     
    -                                        
    +var callback = function(error, data, response) {
    +  if (error) {
    +    console.error(error);
    +  } else {
    +    console.log('API called successfully. Returned data: ' + data);
    +  }
    +};
    +api.deleteDataSet(dataSetId, callback);
    +
    +
    - + +
    +
    using System;
    +using System.Diagnostics;
    +using IO.Swagger.Api;
    +using IO.Swagger.Client;
    +using IO.Swagger.Model;
     
    -                                    
    +namespace Example +{ + public class deleteDataSetExample + { + public void main() + { + + // Configure OAuth2 access token for authorization: oauth2schema + Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; + var apiInstance = new DataSetApi(); + var dataSetId = dataSetId_example; // String | dataSetId + try + { + // Delete a stored data set + DataSetResponse result = apiInstance.deleteDataSet(dataSetId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling DataSetApi.deleteDataSet: " + e.Message ); + } + } + } +} +
    +
    +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
     
    +// Configure OAuth2 access token for authorization: oauth2schema
    +Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
     
    +$api_instance = new Swagger\Client\Api\DataSetApi();
    +$dataSetId = dataSetId_example; // String | dataSetId
     
    +try {
    +    $result = $api_instance->deleteDataSet($dataSetId);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling DataSetApi->deleteDataSet: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use WWW::SwaggerClient::Configuration;
    +use WWW::SwaggerClient::DataSetApi;
    +
    +# Configure OAuth2 access token for authorization: oauth2schema
    +$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
    +
    +my $api_instance = WWW::SwaggerClient::DataSetApi->new();
    +my $dataSetId = dataSetId_example; # String | dataSetId
    +
    +eval { 
    +    my $result = $api_instance->deleteDataSet(dataSetId => $dataSetId);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling DataSetApi->deleteDataSet: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_client
    +from swagger_client.rest import ApiException
    +from pprint import pprint
    +
    +# Configure OAuth2 access token for authorization: oauth2schema
    +swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
    +
    +# create an instance of the API class
    +api_instance = swagger_client.DataSetApi()
    +dataSetId = dataSetId_example # String | dataSetId
    +
    +try: 
    +    # Delete a stored data set
    +    api_response = api_instance.delete_data_set(dataSetId)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling DataSetApi->deleteDataSet: %s\n" % e)
    +
    + + +

    Parameters

    + +
    Path parameters
    + + + + + + + + - -
    +
    NameDescription
    dataSetId* -
    +
    +
    +
    + + String + -
    -
    -

    getResultStreamsAsContainer

    -
    -
    +
    + dataSetId +
    +
    +
    + Required +
    +
    +
    +
    -

    -

    Get all documents inside a compressed container as a binary stream.

    -

    -
    -
    /template/processor/0.1/jobs/{jobId}/result/container
    -

    -

    Usage and SDK Samples

    -

    - -
    -
    -
    
    -curl -X put -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template/processor/0.1/jobs/{jobId}/result/container"
    +                          

    Responses

    +

    Status: 200 - Successfully deleted the data set

    +
    -
    + -
    -
    
    -import com.sphereon.sdk.template-processor.*;
    +                            
    +
    +
    + +
    + +
    +
    + +

    Status: 400 - Could not delete data set

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 404 - Invalid data set id

    + + + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +

    Job

    +
    +
    +
    +

    getJob

    +

    Job definition and state

    +
    +
    +
    +

    +

    Get the merge job definition and current state. Please not that you can differentiate based on http response status

    +

    +
    +
    /template/processor/0.1/jobs/{jobId}
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X GET "https://gw.api.cloud.sphereon.com/template/processor/0.1/jobs/{jobId}"
    +
    +
    +
    import com.sphereon.sdk.template-processor.*;
     import com.sphereon.sdk.template-processor.auth.*;
     import com.sphereon.sdk.template-processor.model.*;
    -import api.JobApi;
    +import com.sphereon.sdk.template-processor.api.JobApi;
     
     import java.io.File;
     import java.util.*;
    @@ -10889,67 +7402,52 @@ 

    Usage and SDK Samples

    JobApi apiInstance = new JobApi(); String jobId = jobId_example; // String | jobId - OutputSettings outputSettings = ; // OutputSettings | outputSettings try { - byte[] result = apiInstance.getResultStreamsAsContainer(jobId, outputSettings); + MergeJobResponse result = apiInstance.getJob(jobId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling JobApi#getResultStreamsAsContainer"); + System.err.println("Exception when calling JobApi#getJob"); e.printStackTrace(); } } -} - -
    -
    - +}
    +
    -
    -
    
    -import api.JobApi;
    +                          
    +
    import com.sphereon.sdk.template-processor.api.JobApi;
     
     public class JobApiExample {
     
         public static void main(String[] args) {
             JobApi apiInstance = new JobApi();
             String jobId = jobId_example; // String | jobId
    -        OutputSettings outputSettings = ; // OutputSettings | outputSettings
             try {
    -            byte[] result = apiInstance.getResultStreamsAsContainer(jobId, outputSettings);
    +            MergeJobResponse result = apiInstance.getJob(jobId);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling JobApi#getResultStreamsAsContainer");
    +            System.err.println("Exception when calling JobApi#getJob");
                 e.printStackTrace();
             }
         }
    -}
    -
    -                                                  
    -
    - - - - -
    -
    
    -Configuration *apiConfig = [Configuration sharedConfig];
    +}
    +
    + +
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
    -
     String *jobId = jobId_example; // jobId
    -OutputSettings *outputSettings = ; // outputSettings (optional)
     
     JobApi *apiInstance = [[JobApi alloc] init];
     
    -// Get the result file
    -[apiInstance getResultStreamsAsContainerWith:jobId
    -    outputSettings:outputSettings
    -              completionHandler: ^(byte[] output, NSError* error) {
    +// Job definition and state
    +[apiInstance getJobWith:jobId
    +              completionHandler: ^(MergeJobResponse output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -10957,25 +7455,21 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; +
    +
    -
    -
    -
    -
    
    -var  = require('');
    -var defaultClient = .ApiClient.instance;
    +                            
    +
    var TemplateProcessor = require('template_processor');
    +var defaultClient = TemplateProcessor.ApiClient.instance;
     
     // Configure OAuth2 access token for authorization: oauth2schema
     var oauth2schema = defaultClient.authentications['oauth2schema'];
     oauth2schema.accessToken = "YOUR ACCESS TOKEN"
     
    -var api = new .JobApi()
    +var api = new TemplateProcessor.JobApi()
     
     var jobId = jobId_example; // {String} jobId
     
    -var opts = { 
    -  'outputSettings':  // {OutputSettings} outputSettings
    -};
     
     var callback = function(error, data, response) {
       if (error) {
    @@ -10984,26 +7478,23 @@ 

    Usage and SDK Samples

    console.log('API called successfully. Returned data: ' + data); } }; -api.getResultStreamsAsContainer(jobId, opts, callback); - -
    -
    - - +api.getJob(jobId, callback); +
    +
    -
    -
    
    -using System;
    +                            
    +                            
    +
    using System;
     using System.Diagnostics;
    -using .Api;
    -using .Client;
    -using model;
    +using IO.Swagger.Api;
    +using IO.Swagger.Client;
    +using IO.Swagger.Model;
     
     namespace Example
     {
    -    public class getResultStreamsAsContainerExample
    +    public class getJobExample
         {
             public void main()
             {
    @@ -11013,483 +7504,615 @@ 

    Usage and SDK Samples

    var apiInstance = new JobApi(); var jobId = jobId_example; // String | jobId - var outputSettings = new OutputSettings(); // OutputSettings | outputSettings (optional) try { - // Get the result file - byte[] result = apiInstance.getResultStreamsAsContainer(jobId, outputSettings); + // Job definition and state + MergeJobResponse result = apiInstance.getJob(jobId); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling JobApi.getResultStreamsAsContainer: " + e.Message ); + Debug.Print("Exception when calling JobApi.getJob: " + e.Message ); } } } } +
    +
    -
    -
    - - -
    -
    
    -
    +                              
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
     // Configure OAuth2 access token for authorization: oauth2schema
    -com.sphereon.sdk.template-processor\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
    +Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
     
    -$api_instance = new com.sphereon.sdk.template-processor\Api\JobApi();
    +$api_instance = new Swagger\Client\Api\JobApi();
     $jobId = jobId_example; // String | jobId
    -$outputSettings = ; // OutputSettings | outputSettings
     
     try {
    -    $result = $api_instance->getResultStreamsAsContainer($jobId, $outputSettings);
    +    $result = $api_instance->getJob($jobId);
         print_r($result);
     } catch (Exception $e) {
    -    echo 'Exception when calling JobApi->getResultStreamsAsContainer: ', $e->getMessage(), PHP_EOL;
    +    echo 'Exception when calling JobApi->getJob: ', $e->getMessage(), PHP_EOL;
     }
    -
    -                                                  
    -
    - -
    - - - - - -

    Parameters

    - - - -
    Path parameters
    - - - - - - - - - - -
    NameDescription
    jobId* - - - -
    -
    - - - -
    Body parameters
    - - - - - - - +?> + + +
    +
    use Data::Dumper;
    +use WWW::SwaggerClient::Configuration;
    +use WWW::SwaggerClient::JobApi;
    +
    +# Configure OAuth2 access token for authorization: oauth2schema
    +$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
    +
    +my $api_instance = WWW::SwaggerClient::JobApi->new();
    +my $jobId = jobId_example; # String | jobId
    +
    +eval { 
    +    my $result = $api_instance->getJob(jobId => $jobId);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling JobApi->getJob: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_client
    +from swagger_client.rest import ApiException
    +from pprint import pprint
    +
    +# Configure OAuth2 access token for authorization: oauth2schema
    +swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
    +
    +# create an instance of the API class
    +api_instance = swagger_client.JobApi()
    +jobId = jobId_example # String | jobId
    +
    +try: 
    +    # Job definition and state
    +    api_response = api_instance.get_job(jobId)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling JobApi->getJob: %s\n" % e)
    +
    + + +

    Parameters

    + +
    Path parameters
    +
    NameDescription
    outputSettings
    + + + + + +
    NameDescription
    jobId* - -
    +
    + jobId +
    + +
    + Required +
    + +
    - -

    Responses

    -

    Status: 200 - Result package successfully created and returned

    - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - -

    Status: 202 - Result file not yet created. Job is still executing.

    - - - - - - - - - -
    - - - -
    - - - - -
    - - +
    + +
    +
    + +

    Status: 202 - Merge job returned and Job is still processing

    + + + +
    +
    +
    + -
    - - - - - - - -
    - - - - -
    - - - - -

    Status: 400 - Result file could not be created.

    - - - - - - - - - -
    - - - -
    - - - - -
    - - +
    + +
    +
    + +

    Status: 404 - Invalid job id

    + + + +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +

    getJobs

    +

    Get all jobs

    +
    +
    +
    +

    +

    Get all office text job definitions and their current state.

    +

    +
    +
    /template/processor/0.1/jobs
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X GET "https://gw.api.cloud.sphereon.com/template/processor/0.1/jobs?status="
    +
    +
    +
    import com.sphereon.sdk.template-processor.*;
    +import com.sphereon.sdk.template-processor.auth.*;
    +import com.sphereon.sdk.template-processor.model.*;
    +import com.sphereon.sdk.template-processor.api.JobApi;
     
    +import java.io.File;
    +import java.util.*;
     
    +public class JobApiExample {
     
    -                                                                        var view = new JSONSchemaView(resolved.schema, 3);
    -                                                                        $('#examples-Job-getResultStreamsAsContainer-schema-data').val(JSON.stringify(resolved.schema));
    -                                                                        var result = $('#examples-Job-getResultStreamsAsContainer-schema-400');
    -                                                                        result.empty();
    -                                                                        result.append(view.render());
    -                                                                    });
    +    public static void main(String[] args) {
    +        ApiClient defaultClient = Configuration.getDefaultApiClient();
    +        
    +        // Configure OAuth2 access token for authorization: oauth2schema
    +        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
    +        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
     
    +        JobApi apiInstance = new JobApi();
    +        array[String] status = ; // array[String] | A list of status to filter on.
    +        try {
    +            array[MergeJobResponse] result = apiInstance.getJobs(status);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling JobApi#getJobs");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    +
    +
    import com.sphereon.sdk.template-processor.api.JobApi;
     
    +public class JobApiExample {
     
    -                                                                });
    -                                                            
    -                                                        
    - + public static void main(String[] args) { + JobApi apiInstance = new JobApi(); + array[String] status = ; // array[String] | A list of status to filter on. + try { + array[MergeJobResponse] result = apiInstance.getJobs(status); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JobApi#getJobs"); + e.printStackTrace(); + } + } +} +
    + +
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
    +// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
    +[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
    +array[String] *status = ; // A list of status to filter on. (optional)
     
    +JobApi *apiInstance = [[JobApi alloc] init];
     
    +// Get all jobs
    +[apiInstance getJobsWith:status
    +              completionHandler: ^(array[MergeJobResponse] output, NSError* error) {
    +                            if (output) {
    +                                NSLog(@"%@", output);
    +                            }
    +                            if (error) {
    +                                NSLog(@"Error: %@", error);
    +                            }
    +                        }];
    +
    +
    +
    +
    var TemplateProcessor = require('template_processor');
    +var defaultClient = TemplateProcessor.ApiClient.instance;
     
    -                                                    
    +// Configure OAuth2 access token for authorization: oauth2schema +var oauth2schema = defaultClient.authentications['oauth2schema']; +oauth2schema.accessToken = "YOUR ACCESS TOKEN" +var api = new TemplateProcessor.JobApi() +var opts = { + 'status': // {array[String]} A list of status to filter on. +}; +var callback = function(error, data, response) { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}; +api.getJobs(opts, callback); + +
    - + +
    +
    using System;
    +using System.Diagnostics;
    +using IO.Swagger.Api;
    +using IO.Swagger.Client;
    +using IO.Swagger.Model;
     
    +namespace Example
    +{
    +    public class getJobsExample
    +    {
    +        public void main()
    +        {
    +            
    +            // Configure OAuth2 access token for authorization: oauth2schema
    +            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
     
    +            var apiInstance = new JobApi();
    +            var status = new array[String](); // array[String] | A list of status to filter on. (optional) 
     
    +            try
    +            {
    +                // Get all jobs
    +                array[MergeJobResponse] result = apiInstance.getJobs(status);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling JobApi.getJobs: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
     
    +// Configure OAuth2 access token for authorization: oauth2schema
    +Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
     
    +$api_instance = new Swagger\Client\Api\JobApi();
    +$status = ; // array[String] | A list of status to filter on.
     
    +try {
    +    $result = $api_instance->getJobs($status);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling JobApi->getJobs: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    +
    +
    use Data::Dumper;
    +use WWW::SwaggerClient::Configuration;
    +use WWW::SwaggerClient::JobApi;
     
    -                                        
    +# Configure OAuth2 access token for authorization: oauth2schema
    +$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
     
    -                                    
    +my $api_instance = WWW::SwaggerClient::JobApi->new(); +my $status = []; # array[String] | A list of status to filter on. -
    +eval { + my $result = $api_instance->getJobs(status => $status); + print Dumper($result); +}; +if ($@) { + warn "Exception when calling JobApi->getJobs: $@\n"; +}
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_client
    +from swagger_client.rest import ApiException
    +from pprint import pprint
     
    +# Configure OAuth2 access token for authorization: oauth2schema
    +swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
     
    +# create an instance of the API class
    +api_instance = swagger_client.JobApi()
    +status =  # array[String] | A list of status to filter on. (optional)
     
    +try: 
    +    # Get all jobs
    +    api_response = api_instance.get_jobs(status=status)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling JobApi->getJobs: %s\n" % e)
    +
    + +

    Parameters

    -
    -
    -
    -

    submitJob

    -
    -
    -
    -
    +
    Query parameters
    + + + + + + + + - +
    NameDescription
    status -

    -

    Submit merge job run.

    -

    -
    -
    /template/processor/0.1/jobs
    +
    +
    +
    + + array[String] + -

    -

    Usage and SDK Samples

    -

    +
    + A list of status to filter on. +
    +
    +
    +
    +
    -
    -
    -
    
    -curl -X put -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template/processor/0.1/jobs"
    +                          

    Responses

    +

    Status: 200 - All office text jobs that have not been deleted

    +
    -
    + -
    -
    
    -import com.sphereon.sdk.template-processor.*;
    +                            
    +
    +
    + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +

    getResultStream

    +

    Get the result file

    +
    +
    +
    +

    +

    Get a merge result document as a binary stream. +

    +

    +
    +
    /template/processor/0.1/jobs/{jobId}/result/stream
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X PUT "https://gw.api.cloud.sphereon.com/template/processor/0.1/jobs/{jobId}/result/stream"
    +
    +
    +
    import com.sphereon.sdk.template-processor.*;
     import com.sphereon.sdk.template-processor.auth.*;
     import com.sphereon.sdk.template-processor.model.*;
    -import api.JobApi;
    +import com.sphereon.sdk.template-processor.api.JobApi;
     
     import java.io.File;
     import java.util.*;
    @@ -11504,64 +8127,57 @@ 

    Usage and SDK Samples

    oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); JobApi apiInstance = new JobApi(); - MergeSettings mergesettings = ; // MergeSettings | The merge- and output settings + String jobId = jobId_example; // String | jobId + ResultStreamRequest resultStreamRequest = ; // ResultStreamRequest | resultStreamRequest try { - MergeJobResponse result = apiInstance.submitJob(mergesettings); + byte[] result = apiInstance.getResultStream(jobId, resultStreamRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling JobApi#submitJob"); + System.err.println("Exception when calling JobApi#getResultStream"); e.printStackTrace(); } } -} - -
    -
    +}
    +
    - -
    -
    
    -import api.JobApi;
    +                          
    +
    import com.sphereon.sdk.template-processor.api.JobApi;
     
     public class JobApiExample {
     
         public static void main(String[] args) {
             JobApi apiInstance = new JobApi();
    -        MergeSettings mergesettings = ; // MergeSettings | The merge- and output settings
    +        String jobId = jobId_example; // String | jobId
    +        ResultStreamRequest resultStreamRequest = ; // ResultStreamRequest | resultStreamRequest
             try {
    -            MergeJobResponse result = apiInstance.submitJob(mergesettings);
    +            byte[] result = apiInstance.getResultStream(jobId, resultStreamRequest);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling JobApi#submitJob");
    +            System.err.println("Exception when calling JobApi#getResultStream");
                 e.printStackTrace();
             }
         }
    -}
    -
    -                                                  
    -
    - - - - -
    -
    
    -Configuration *apiConfig = [Configuration sharedConfig];
    +}
    +
    + +
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
    -
    -MergeSettings *mergesettings = ; // The merge- and output settings
    +String *jobId = jobId_example; // jobId
    +ResultStreamRequest *resultStreamRequest = ; // resultStreamRequest
     
     JobApi *apiInstance = [[JobApi alloc] init];
     
    -// Submit merge job for processing
    -[apiInstance submitJobWith:mergesettings
    -              completionHandler: ^(MergeJobResponse output, NSError* error) {
    +// Get the result file
    +[apiInstance getResultStreamWith:jobId
    +    resultStreamRequest:resultStreamRequest
    +              completionHandler: ^(byte[] output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -11569,21 +8185,22 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; +
    +
    -
    -
    -
    -
    
    -var  = require('');
    -var defaultClient = .ApiClient.instance;
    +                            
    +
    var TemplateProcessor = require('template_processor');
    +var defaultClient = TemplateProcessor.ApiClient.instance;
     
     // Configure OAuth2 access token for authorization: oauth2schema
     var oauth2schema = defaultClient.authentications['oauth2schema'];
     oauth2schema.accessToken = "YOUR ACCESS TOKEN"
     
    -var api = new .JobApi()
    +var api = new TemplateProcessor.JobApi()
     
    -var mergesettings = ; // {MergeSettings} The merge- and output settings
    +var jobId = jobId_example; // {String} jobId
    +
    +var resultStreamRequest = ; // {ResultStreamRequest} resultStreamRequest
     
     
     var callback = function(error, data, response) {
    @@ -11593,26 +8210,23 @@ 

    Usage and SDK Samples

    console.log('API called successfully. Returned data: ' + data); } }; -api.submitJob(mergesettings, callback); - -
    -
    - - +api.getResultStream(jobId, resultStreamRequest, callback); +
    +
    -
    -
    
    -using System;
    +                            
    +                            
    +
    using System;
     using System.Diagnostics;
    -using .Api;
    -using .Client;
    -using model;
    +using IO.Swagger.Api;
    +using IO.Swagger.Client;
    +using IO.Swagger.Model;
     
     namespace Example
     {
    -    public class submitJobExample
    +    public class getResultStreamExample
         {
             public void main()
             {
    @@ -11621,290 +8235,351 @@ 

    Usage and SDK Samples

    Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new JobApi(); - var mergesettings = new MergeSettings(); // MergeSettings | The merge- and output settings + var jobId = jobId_example; // String | jobId + var resultStreamRequest = new ResultStreamRequest(); // ResultStreamRequest | resultStreamRequest try { - // Submit merge job for processing - MergeJobResponse result = apiInstance.submitJob(mergesettings); + // Get the result file + byte[] result = apiInstance.getResultStream(jobId, resultStreamRequest); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling JobApi.submitJob: " + e.Message ); + Debug.Print("Exception when calling JobApi.getResultStream: " + e.Message ); } } } } +
    +
    -
    -
    - - -
    -
    
    -
    +                              
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
     // Configure OAuth2 access token for authorization: oauth2schema
    -com.sphereon.sdk.template-processor\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
    +Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
     
    -$api_instance = new com.sphereon.sdk.template-processor\Api\JobApi();
    -$mergesettings = ; // MergeSettings | The merge- and output settings
    +$api_instance = new Swagger\Client\Api\JobApi();
    +$jobId = jobId_example; // String | jobId
    +$resultStreamRequest = ; // ResultStreamRequest | resultStreamRequest
     
     try {
    -    $result = $api_instance->submitJob($mergesettings);
    +    $result = $api_instance->getResultStream($jobId, $resultStreamRequest);
         print_r($result);
     } catch (Exception $e) {
    -    echo 'Exception when calling JobApi->submitJob: ', $e->getMessage(), PHP_EOL;
    -}
    -
    -                                                  
    -
    - -
    - - - - - -

    Parameters

    + echo 'Exception when calling JobApi->getResultStream: ', $e->getMessage(), PHP_EOL; +} +?>
    + + +
    +
    use Data::Dumper;
    +use WWW::SwaggerClient::Configuration;
    +use WWW::SwaggerClient::JobApi;
    +
    +# Configure OAuth2 access token for authorization: oauth2schema
    +$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
    +
    +my $api_instance = WWW::SwaggerClient::JobApi->new();
    +my $jobId = jobId_example; # String | jobId
    +my $resultStreamRequest = WWW::SwaggerClient::Object::ResultStreamRequest->new(); # ResultStreamRequest | resultStreamRequest
    +
    +eval { 
    +    my $result = $api_instance->getResultStream(jobId => $jobId, resultStreamRequest => $resultStreamRequest);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling JobApi->getResultStream: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_client
    +from swagger_client.rest import ApiException
    +from pprint import pprint
    +
    +# Configure OAuth2 access token for authorization: oauth2schema
    +swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
    +
    +# create an instance of the API class
    +api_instance = swagger_client.JobApi()
    +jobId = jobId_example # String | jobId
    +resultStreamRequest =  # ResultStreamRequest | resultStreamRequest
    +
    +try: 
    +    # Get the result file
    +    api_response = api_instance.get_result_stream(jobId, resultStreamRequest)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling JobApi->getResultStream: %s\n" % e)
    +
    + + +

    Parameters

    + +
    Path parameters
    + + + + + + + + +
    NameDescription
    jobId* +
    +
    +
    + + String + +
    + jobId +
    +
    +
    + Required +
    +
    +
    +
    -
    Body parameters
    - - - - - - - +
    Body parameters
    +
    NameDescription
    mergesettings *
    + + + + + +
    NameDescription
    resultStreamRequest * -
    + var view = new JSONSchemaView(schema,2,{isBodyParam: true}); + var result = $('#d2e199_getResultStream_resultStreamRequest'); + result.empty(); + result.append(view.render()); +}); + +
    - - - -

    Responses

    -

    Status: 200 - Merge job submitted

    - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - - - - - - - - - - -
    - -
    - -
    -

    Template

    - - - - - - - -
    - -
    -
    -

    createTemplateContext

    -
    -
    - -
    -
    - -

    -

    Create a unique template context for your environment

    -

    -
    - -
    /template/processor/0.1/templates
    - -

    -

    Usage and SDK Samples

    -

    - - - -
    -
    -
    
    -curl -X post -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template/processor/0.1/templates"
    -
    -
    -
    -
    - -
    -
    
    -import com.sphereon.sdk.template-processor.*;
    +                                        var schema = schemaWrapper.schema;
    +                                        if (schema.$ref != null) {
    +                                          schema = defsParser.$refs.get(schema.$ref);
    +                                        } else {
    +                                          schemaWrapper.definitions = Object.assign({}, defs);
    +                                          $RefParser.dereference(schemaWrapper).catch(function(err) {
    +                                            console.log(err);
    +                                          });
    +                                        }
    +
    +                                        //console.log(JSON.stringify(schema));
    +                                        var view = new JSONSchemaView(schema, 3);
    +                                        $('#responses-getResultStream-200-schema-data').val(stringify(schema));
    +                                        var result = $('#responses-getResultStream-200-schema-200');
    +                                        result.empty();
    +                                        result.append(view.render());
    +                                      });
    +                                    
    +                                  
    + +
    +
    + +

    Status: 202 - Result file not yet created. Job is still executing.

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 400 - Result file could not be created.

    + + + +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +

    getResultStreamsAsContainer

    +

    Get the result file

    +
    +
    +
    +

    +

    Get all documents inside a compressed container as a binary stream. +

    +

    +
    +
    /template/processor/0.1/jobs/{jobId}/result/container
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X PUT "https://gw.api.cloud.sphereon.com/template/processor/0.1/jobs/{jobId}/result/container"
    +
    +
    +
    import com.sphereon.sdk.template-processor.*;
     import com.sphereon.sdk.template-processor.auth.*;
     import com.sphereon.sdk.template-processor.model.*;
    -import api.TemplateApi;
    +import com.sphereon.sdk.template-processor.api.JobApi;
     
     import java.io.File;
     import java.util.*;
     
    -public class TemplateApiExample {
    +public class JobApiExample {
     
         public static void main(String[] args) {
             ApiClient defaultClient = Configuration.getDefaultApiClient();
    @@ -11913,65 +8588,58 @@ 

    Usage and SDK Samples

    OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - TemplateApi apiInstance = new TemplateApi(); - TemplateContextRequest templateRequest = ; // TemplateContextRequest | The template request + JobApi apiInstance = new JobApi(); + String jobId = jobId_example; // String | jobId + OutputSettings outputSettings = ; // OutputSettings | outputSettings try { - TemplateContextResponse result = apiInstance.createTemplateContext(templateRequest); + byte[] result = apiInstance.getResultStreamsAsContainer(jobId, outputSettings); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling TemplateApi#createTemplateContext"); + System.err.println("Exception when calling JobApi#getResultStreamsAsContainer"); e.printStackTrace(); } } -} - -
    -
    +}
    +
    +
    +
    import com.sphereon.sdk.template-processor.api.JobApi;
     
    -                                                
    -
    
    -import api.TemplateApi;
    -
    -public class TemplateApiExample {
    +public class JobApiExample {
     
         public static void main(String[] args) {
    -        TemplateApi apiInstance = new TemplateApi();
    -        TemplateContextRequest templateRequest = ; // TemplateContextRequest | The template request
    +        JobApi apiInstance = new JobApi();
    +        String jobId = jobId_example; // String | jobId
    +        OutputSettings outputSettings = ; // OutputSettings | outputSettings
             try {
    -            TemplateContextResponse result = apiInstance.createTemplateContext(templateRequest);
    +            byte[] result = apiInstance.getResultStreamsAsContainer(jobId, outputSettings);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling TemplateApi#createTemplateContext");
    -            e.printStackTrace();
    -        }
    -    }
    -}
    -
    -                                                  
    -
    - - - - -
    -
    
    -Configuration *apiConfig = [Configuration sharedConfig];
    +            System.err.println("Exception when calling JobApi#getResultStreamsAsContainer");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
    +String *jobId = jobId_example; // jobId
    +OutputSettings *outputSettings = ; // outputSettings (optional)
     
    -TemplateContextRequest *templateRequest = ; // The template request
    -
    -TemplateApi *apiInstance = [[TemplateApi alloc] init];
    +JobApi *apiInstance = [[JobApi alloc] init];
     
    -// Create template context
    -[apiInstance createTemplateContextWith:templateRequest
    -              completionHandler: ^(TemplateContextResponse output, NSError* error) {
    +// Get the result file
    +[apiInstance getResultStreamsAsContainerWith:jobId
    +    outputSettings:outputSettings
    +              completionHandler: ^(byte[] output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
                                 }
    @@ -11979,22 +8647,24 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; +
    +
    -
    -
    -
    -
    
    -var  = require('');
    -var defaultClient = .ApiClient.instance;
    +                            
    +
    var TemplateProcessor = require('template_processor');
    +var defaultClient = TemplateProcessor.ApiClient.instance;
     
     // Configure OAuth2 access token for authorization: oauth2schema
     var oauth2schema = defaultClient.authentications['oauth2schema'];
     oauth2schema.accessToken = "YOUR ACCESS TOKEN"
     
    -var api = new .TemplateApi()
    +var api = new TemplateProcessor.JobApi()
     
    -var templateRequest = ; // {TemplateContextRequest} The template request
    +var jobId = jobId_example; // {String} jobId
     
    +var opts = { 
    +  'outputSettings':  // {OutputSettings} outputSettings
    +};
     
     var callback = function(error, data, response) {
       if (error) {
    @@ -12003,26 +8673,23 @@ 

    Usage and SDK Samples

    console.log('API called successfully. Returned data: ' + data); } }; -api.createTemplateContext(templateRequest, callback); - -
    -
    - - +api.getResultStreamsAsContainer(jobId, opts, callback); +
    +
    -
    -
    
    -using System;
    +                            
    +                            
    +
    using System;
     using System.Diagnostics;
    -using .Api;
    -using .Client;
    -using model;
    +using IO.Swagger.Api;
    +using IO.Swagger.Client;
    +using IO.Swagger.Model;
     
     namespace Example
     {
    -    public class createTemplateContextExample
    +    public class getResultStreamsAsContainerExample
         {
             public void main()
             {
    @@ -12030,361 +8697,680 @@ 

    Usage and SDK Samples

    // Configure OAuth2 access token for authorization: oauth2schema Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - var apiInstance = new TemplateApi(); - var templateRequest = new TemplateContextRequest(); // TemplateContextRequest | The template request + var apiInstance = new JobApi(); + var jobId = jobId_example; // String | jobId + var outputSettings = new OutputSettings(); // OutputSettings | outputSettings (optional) try { - // Create template context - TemplateContextResponse result = apiInstance.createTemplateContext(templateRequest); + // Get the result file + byte[] result = apiInstance.getResultStreamsAsContainer(jobId, outputSettings); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling TemplateApi.createTemplateContext: " + e.Message ); + Debug.Print("Exception when calling JobApi.getResultStreamsAsContainer: " + e.Message ); } } } } +
    +
    -
    -
    - - -
    -
    
    -
    +                              
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
     // Configure OAuth2 access token for authorization: oauth2schema
    -com.sphereon.sdk.template-processor\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
    +Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
     
    -$api_instance = new com.sphereon.sdk.template-processor\Api\TemplateApi();
    -$templateRequest = ; // TemplateContextRequest | The template request
    +$api_instance = new Swagger\Client\Api\JobApi();
    +$jobId = jobId_example; // String | jobId
    +$outputSettings = ; // OutputSettings | outputSettings
     
     try {
    -    $result = $api_instance->createTemplateContext($templateRequest);
    +    $result = $api_instance->getResultStreamsAsContainer($jobId, $outputSettings);
         print_r($result);
     } catch (Exception $e) {
    -    echo 'Exception when calling TemplateApi->createTemplateContext: ', $e->getMessage(), PHP_EOL;
    +    echo 'Exception when calling JobApi->getResultStreamsAsContainer: ', $e->getMessage(), PHP_EOL;
     }
    -
    -                                                  
    -
    - -
    - - - - - -

    Parameters

    +?>
    + + +
    +
    use Data::Dumper;
    +use WWW::SwaggerClient::Configuration;
    +use WWW::SwaggerClient::JobApi;
    +
    +# Configure OAuth2 access token for authorization: oauth2schema
    +$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
    +
    +my $api_instance = WWW::SwaggerClient::JobApi->new();
    +my $jobId = jobId_example; # String | jobId
    +my $outputSettings = WWW::SwaggerClient::Object::OutputSettings->new(); # OutputSettings | outputSettings
    +
    +eval { 
    +    my $result = $api_instance->getResultStreamsAsContainer(jobId => $jobId, outputSettings => $outputSettings);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling JobApi->getResultStreamsAsContainer: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_client
    +from swagger_client.rest import ApiException
    +from pprint import pprint
    +
    +# Configure OAuth2 access token for authorization: oauth2schema
    +swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
    +
    +# create an instance of the API class
    +api_instance = swagger_client.JobApi()
    +jobId = jobId_example # String | jobId
    +outputSettings =  # OutputSettings | outputSettings (optional)
    +
    +try: 
    +    # Get the result file
    +    api_response = api_instance.get_result_streams_as_container(jobId, outputSettings=outputSettings)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling JobApi->getResultStreamsAsContainer: %s\n" % e)
    +
    + + +

    Parameters

    + +
    Path parameters
    + + + + + + + + +
    NameDescription
    jobId* +
    +
    +
    + + String + +
    + jobId +
    +
    +
    + Required +
    +
    +
    +
    -
    Body parameters
    - - - - - - - +
    Body parameters
    +
    NameDescription
    templateRequest *
    + + + + + - -
    NameDescription
    outputSettings -
    + var view = new JSONSchemaView(schema,2,{isBodyParam: true}); + var result = $('#d2e199_getResultStreamsAsContainer_outputSettings'); + result.empty(); + result.append(view.render()); +}); + +
    - - -

    Responses

    - -

    Status: 200 - Template context created

    - - - - + +

    Responses

    +

    Status: 200 - Result package successfully created and returned

    + - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - - - - - - -

    Status: 400 - Template context already exists

    - - - - - - - - - -
    - - - -
    - - - - -
    - - +
    + +
    +
    + +

    Status: 202 - Result file not yet created. Job is still executing.

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 400 - Result file could not be created.

    + + + +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +

    submitJob

    +

    Submit merge job for processing

    +
    +
    +
    +

    +

    Submit merge job run.

    +

    +
    +
    /template/processor/0.1/jobs
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X PUT "https://gw.api.cloud.sphereon.com/template/processor/0.1/jobs"
    +
    +
    +
    import com.sphereon.sdk.template-processor.*;
    +import com.sphereon.sdk.template-processor.auth.*;
    +import com.sphereon.sdk.template-processor.model.*;
    +import com.sphereon.sdk.template-processor.api.JobApi;
     
    -                                                                        //console.log(JSON.stringify(resolved));
    +import java.io.File;
    +import java.util.*;
     
    +public class JobApiExample {
     
    +    public static void main(String[] args) {
    +        ApiClient defaultClient = Configuration.getDefaultApiClient();
    +        
    +        // Configure OAuth2 access token for authorization: oauth2schema
    +        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
    +        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
     
    -                                                                        var view = new JSONSchemaView(resolved.schema, 3);
    -                                                                        $('#examples-Template-createTemplateContext-schema-data').val(JSON.stringify(resolved.schema));
    -                                                                        var result = $('#examples-Template-createTemplateContext-schema-400');
    -                                                                        result.empty();
    -                                                                        result.append(view.render());
    -                                                                    });
    +        JobApi apiInstance = new JobApi();
    +        MergeSettings mergesettings = ; // MergeSettings | The merge- and output settings
    +        try {
    +            MergeJobResponse result = apiInstance.submitJob(mergesettings);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling JobApi#submitJob");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    +
    +
    import com.sphereon.sdk.template-processor.api.JobApi;
     
    +public class JobApiExample {
     
    +    public static void main(String[] args) {
    +        JobApi apiInstance = new JobApi();
    +        MergeSettings mergesettings = ; // MergeSettings | The merge- and output settings
    +        try {
    +            MergeJobResponse result = apiInstance.submitJob(mergesettings);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling JobApi#submitJob");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
    -                                                                });
    -                                                            
    -                                                        
    - +// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema) +[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; +MergeSettings *mergesettings = ; // The merge- and output settings +JobApi *apiInstance = [[JobApi alloc] init]; +// Submit merge job for processing +[apiInstance submitJobWith:mergesettings + completionHandler: ^(MergeJobResponse output, NSError* error) { + if (output) { + NSLog(@"%@", output); + } + if (error) { + NSLog(@"Error: %@", error); + } + }]; + +
    +
    +
    var TemplateProcessor = require('template_processor');
    +var defaultClient = TemplateProcessor.ApiClient.instance;
     
    +// Configure OAuth2 access token for authorization: oauth2schema
    +var oauth2schema = defaultClient.authentications['oauth2schema'];
    +oauth2schema.accessToken = "YOUR ACCESS TOKEN"
     
    -                                                    
    +var api = new TemplateProcessor.JobApi() +var mergesettings = ; // {MergeSettings} The merge- and output settings +var callback = function(error, data, response) { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}; +api.submitJob(mergesettings, callback); + +
    - + +
    +
    using System;
    +using System.Diagnostics;
    +using IO.Swagger.Api;
    +using IO.Swagger.Client;
    +using IO.Swagger.Model;
     
    +namespace Example
    +{
    +    public class submitJobExample
    +    {
    +        public void main()
    +        {
    +            
    +            // Configure OAuth2 access token for authorization: oauth2schema
    +            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
     
    +            var apiInstance = new JobApi();
    +            var mergesettings = new MergeSettings(); // MergeSettings | The merge- and output settings
     
    +            try
    +            {
    +                // Submit merge job for processing
    +                MergeJobResponse result = apiInstance.submitJob(mergesettings);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling JobApi.submitJob: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
     
    +// Configure OAuth2 access token for authorization: oauth2schema
    +Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
     
    +$api_instance = new Swagger\Client\Api\JobApi();
    +$mergesettings = ; // MergeSettings | The merge- and output settings
     
    +try {
    +    $result = $api_instance->submitJob($mergesettings);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling JobApi->submitJob: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    +
    +
    use Data::Dumper;
    +use WWW::SwaggerClient::Configuration;
    +use WWW::SwaggerClient::JobApi;
     
    -                                        
    +# Configure OAuth2 access token for authorization: oauth2schema
    +$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
     
    -                                    
    +my $api_instance = WWW::SwaggerClient::JobApi->new(); +my $mergesettings = WWW::SwaggerClient::Object::MergeSettings->new(); # MergeSettings | The merge- and output settings -
    +eval { + my $result = $api_instance->submitJob(mergesettings => $mergesettings); + print Dumper($result); +}; +if ($@) { + warn "Exception when calling JobApi->submitJob: $@\n"; +}
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_client
    +from swagger_client.rest import ApiException
    +from pprint import pprint
     
    +# Configure OAuth2 access token for authorization: oauth2schema
    +swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
     
    +# create an instance of the API class
    +api_instance = swagger_client.JobApi()
    +mergesettings =  # MergeSettings | The merge- and output settings
     
    +try: 
    +    # Submit merge job for processing
    +    api_response = api_instance.submit_job(mergesettings)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling JobApi->submitJob: %s\n" % e)
    +
    + +

    Parameters

    -
    +
    Body parameters
    + + + + + + + + -
    /template/processor/0.1/templates/{templateId}
    +
    NameDescription
    mergesettings * -
    -
    -

    deleteTemplateContext

    -
    -
    -
    -
    + +
    +
    -

    -

    Usage and SDK Samples

    -

    - -
    -
    -
    
    -curl -X delete -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template/processor/0.1/templates/{templateId}"
    +                          

    Responses

    +

    Status: 200 - Merge job submitted

    +
    -
    + -
    -
    
    -import com.sphereon.sdk.template-processor.*;
    +                            
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +

    Template

    +
    +
    +
    +

    createTemplateContext

    +

    Create template context

    +
    +
    +
    +

    +

    Create a unique template context for your environment

    +

    +
    +
    /template/processor/0.1/templates
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X POST "https://gw.api.cloud.sphereon.com/template/processor/0.1/templates"
    +
    +
    +
    import com.sphereon.sdk.template-processor.*;
     import com.sphereon.sdk.template-processor.auth.*;
     import com.sphereon.sdk.template-processor.model.*;
    -import api.TemplateApi;
    +import com.sphereon.sdk.template-processor.api.TemplateApi;
     
     import java.io.File;
     import java.util.*;
    @@ -12399,63 +9385,52 @@ 

    Usage and SDK Samples

    oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); TemplateApi apiInstance = new TemplateApi(); - String templateId = templateId_example; // String | templateId + TemplateContextRequest templateRequest = ; // TemplateContextRequest | The template request try { - TemplateContextResponse result = apiInstance.deleteTemplateContext(templateId); + TemplateContextResponse result = apiInstance.createTemplateContext(templateRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling TemplateApi#deleteTemplateContext"); + System.err.println("Exception when calling TemplateApi#createTemplateContext"); e.printStackTrace(); } } -} - -
    -
    +}
    +
    - -
    -
    
    -import api.TemplateApi;
    +                          
    +
    import com.sphereon.sdk.template-processor.api.TemplateApi;
     
     public class TemplateApiExample {
     
         public static void main(String[] args) {
             TemplateApi apiInstance = new TemplateApi();
    -        String templateId = templateId_example; // String | templateId
    +        TemplateContextRequest templateRequest = ; // TemplateContextRequest | The template request
             try {
    -            TemplateContextResponse result = apiInstance.deleteTemplateContext(templateId);
    +            TemplateContextResponse result = apiInstance.createTemplateContext(templateRequest);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling TemplateApi#deleteTemplateContext");
    +            System.err.println("Exception when calling TemplateApi#createTemplateContext");
                 e.printStackTrace();
             }
         }
    -}
    -
    -                                                  
    -
    - - - - -
    -
    
    -Configuration *apiConfig = [Configuration sharedConfig];
    +}
    +
    + +
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
    -
    -String *templateId = templateId_example; // templateId
    +TemplateContextRequest *templateRequest = ; // The template request
     
     TemplateApi *apiInstance = [[TemplateApi alloc] init];
     
    -// Delete template context
    -[apiInstance deleteTemplateContextWith:templateId
    +// Create template context
    +[apiInstance createTemplateContextWith:templateRequest
                   completionHandler: ^(TemplateContextResponse output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
    @@ -12464,21 +9439,20 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; +
    +
    -
    -
    -
    -
    
    -var  = require('');
    -var defaultClient = .ApiClient.instance;
    +                            
    +
    var TemplateProcessor = require('template_processor');
    +var defaultClient = TemplateProcessor.ApiClient.instance;
     
     // Configure OAuth2 access token for authorization: oauth2schema
     var oauth2schema = defaultClient.authentications['oauth2schema'];
     oauth2schema.accessToken = "YOUR ACCESS TOKEN"
     
    -var api = new .TemplateApi()
    +var api = new TemplateProcessor.TemplateApi()
     
    -var templateId = templateId_example; // {String} templateId
    +var templateRequest = ; // {TemplateContextRequest} The template request
     
     
     var callback = function(error, data, response) {
    @@ -12488,26 +9462,23 @@ 

    Usage and SDK Samples

    console.log('API called successfully. Returned data: ' + data); } }; -api.deleteTemplateContext(templateId, callback); - -
    -
    - - +api.createTemplateContext(templateRequest, callback); +
    +
    -
    -
    
    -using System;
    +                            
    +                            
    +
    using System;
     using System.Diagnostics;
    -using .Api;
    -using .Client;
    -using model;
    +using IO.Swagger.Api;
    +using IO.Swagger.Client;
    +using IO.Swagger.Model;
     
     namespace Example
     {
    -    public class deleteTemplateContextExample
    +    public class createTemplateContextExample
         {
             public void main()
             {
    @@ -12516,427 +9487,264 @@ 

    Usage and SDK Samples

    Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new TemplateApi(); - var templateId = templateId_example; // String | templateId + var templateRequest = new TemplateContextRequest(); // TemplateContextRequest | The template request try { - // Delete template context - TemplateContextResponse result = apiInstance.deleteTemplateContext(templateId); + // Create template context + TemplateContextResponse result = apiInstance.createTemplateContext(templateRequest); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling TemplateApi.deleteTemplateContext: " + e.Message ); + Debug.Print("Exception when calling TemplateApi.createTemplateContext: " + e.Message ); } } } } +
    +
    -
    -
    - - -
    -
    
    -
    +                              
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
     // Configure OAuth2 access token for authorization: oauth2schema
    -com.sphereon.sdk.template-processor\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
    +Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
     
    -$api_instance = new com.sphereon.sdk.template-processor\Api\TemplateApi();
    -$templateId = templateId_example; // String | templateId
    +$api_instance = new Swagger\Client\Api\TemplateApi();
    +$templateRequest = ; // TemplateContextRequest | The template request
     
     try {
    -    $result = $api_instance->deleteTemplateContext($templateId);
    +    $result = $api_instance->createTemplateContext($templateRequest);
         print_r($result);
     } catch (Exception $e) {
    -    echo 'Exception when calling TemplateApi->deleteTemplateContext: ', $e->getMessage(), PHP_EOL;
    +    echo 'Exception when calling TemplateApi->createTemplateContext: ', $e->getMessage(), PHP_EOL;
     }
    +?>
    +
    - -
    - - - - - - - -

    Parameters

    - - - -
    Path parameters
    - - - - - - - - - - -
    NameDescription
    templateId* - - - -
    -
    - - - - - -

    Responses

    - -

    Status: 200 - Template context deleted

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - -

    Status: 404 - Template context not found

    - - - +
    +
    use Data::Dumper;
    +use WWW::SwaggerClient::Configuration;
    +use WWW::SwaggerClient::TemplateApi;
     
    +# Configure OAuth2 access token for authorization: oauth2schema
    +$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
     
    +my $api_instance = WWW::SwaggerClient::TemplateApi->new();
    +my $templateRequest = WWW::SwaggerClient::Object::TemplateContextRequest->new(); # TemplateContextRequest | The template request
     
    -
    -
    -
    -                                                
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - +if ($@) { + warn "Exception when calling TemplateApi->createTemplateContext: $@\n"; +}
    +
    - +
    +
    from __future__ import print_statement
    +import time
    +import swagger_client
    +from swagger_client.rest import ApiException
    +from pprint import pprint
     
    +# Configure OAuth2 access token for authorization: oauth2schema
    +swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
     
    +# create an instance of the API class
    +api_instance = swagger_client.TemplateApi()
    +templateRequest =  # TemplateContextRequest | The template request
     
    +try: 
    +    # Create template context
    +    api_response = api_instance.create_template_context(templateRequest)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling TemplateApi->createTemplateContext: %s\n" % e)
    +
    + -

    Status: 500 - Internal server error

    - - - - - - - - - -
    - - - -
    +

    Parameters

    +
    Body parameters
    + + + + + + + + -
    /template/processor/0.1/templates/{templateId}
    +
    NameDescription
    templateRequest * -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - -
    - -
    -
    -

    getTemplateContext

    -
    -
    - -
    -
    + var schema = schemaWrapper.schema; + if (schema.$ref != null) { + schema = defsParser.$refs.get(schema.$ref); + } else { + schemaWrapper.definitions = Object.assign({}, defs); + $RefParser.dereference(schemaWrapper).catch(function(err) { + console.log(err); + }); + } -

    -

    Get an existing template context

    -

    -
    + var view = new JSONSchemaView(schema,2,{isBodyParam: true}); + var result = $('#d2e199_createTemplateContext_templateRequest'); + result.empty(); + result.append(view.render()); +}); + +
    +
    -

    -

    Usage and SDK Samples

    -

    - -
    -
    -
    
    -curl -X get -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template/processor/0.1/templates/{templateId}"
    +                          

    Responses

    +

    Status: 200 - Template context created

    +
    -
    + -
    -
    
    -import com.sphereon.sdk.template-processor.*;
    +                            
    +
    +
    + +
    + +
    +
    + +

    Status: 400 - Template context already exists

    + + + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +

    deleteTemplateContext

    +

    Delete template context

    +
    +
    +
    +

    +

    Delete a template context with all history

    +

    +
    +
    /template/processor/0.1/templates/{templateId}
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X DELETE "https://gw.api.cloud.sphereon.com/template/processor/0.1/templates/{templateId}"
    +
    +
    +
    import com.sphereon.sdk.template-processor.*;
     import com.sphereon.sdk.template-processor.auth.*;
     import com.sphereon.sdk.template-processor.model.*;
    -import api.TemplateApi;
    +import com.sphereon.sdk.template-processor.api.TemplateApi;
     
     import java.io.File;
     import java.util.*;
    @@ -12951,63 +9759,52 @@ 

    Usage and SDK Samples

    oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); TemplateApi apiInstance = new TemplateApi(); - String templateId = templateId_example; // String | The template context name unique for your environment + String templateId = templateId_example; // String | templateId try { - TemplateContextResponse result = apiInstance.getTemplateContext(templateId); + TemplateContextResponse result = apiInstance.deleteTemplateContext(templateId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling TemplateApi#getTemplateContext"); + System.err.println("Exception when calling TemplateApi#deleteTemplateContext"); e.printStackTrace(); } } -} - -
    -
    - +}
    +
    -
    -
    
    -import api.TemplateApi;
    +                          
    +
    import com.sphereon.sdk.template-processor.api.TemplateApi;
     
     public class TemplateApiExample {
     
         public static void main(String[] args) {
             TemplateApi apiInstance = new TemplateApi();
    -        String templateId = templateId_example; // String | The template context name unique for your environment
    +        String templateId = templateId_example; // String | templateId
             try {
    -            TemplateContextResponse result = apiInstance.getTemplateContext(templateId);
    +            TemplateContextResponse result = apiInstance.deleteTemplateContext(templateId);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling TemplateApi#getTemplateContext");
    +            System.err.println("Exception when calling TemplateApi#deleteTemplateContext");
                 e.printStackTrace();
             }
         }
    -}
    -
    -                                                  
    -
    - - - - -
    -
    
    -Configuration *apiConfig = [Configuration sharedConfig];
    +}
    +
    + +
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
    -
    -String *templateId = templateId_example; // The template context name unique for your environment
    +String *templateId = templateId_example; // templateId
     
     TemplateApi *apiInstance = [[TemplateApi alloc] init];
     
    -// Get template context
    -[apiInstance getTemplateContextWith:templateId
    +// Delete template context
    +[apiInstance deleteTemplateContextWith:templateId
                   completionHandler: ^(TemplateContextResponse output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
    @@ -13016,21 +9813,20 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; +
    +
    -
    -
    -
    -
    
    -var  = require('');
    -var defaultClient = .ApiClient.instance;
    +                            
    +
    var TemplateProcessor = require('template_processor');
    +var defaultClient = TemplateProcessor.ApiClient.instance;
     
     // Configure OAuth2 access token for authorization: oauth2schema
     var oauth2schema = defaultClient.authentications['oauth2schema'];
     oauth2schema.accessToken = "YOUR ACCESS TOKEN"
     
    -var api = new .TemplateApi()
    +var api = new TemplateProcessor.TemplateApi()
     
    -var templateId = templateId_example; // {String} The template context name unique for your environment
    +var templateId = templateId_example; // {String} templateId
     
     
     var callback = function(error, data, response) {
    @@ -13040,26 +9836,23 @@ 

    Usage and SDK Samples

    console.log('API called successfully. Returned data: ' + data); } }; -api.getTemplateContext(templateId, callback); - -
    -
    - - +api.deleteTemplateContext(templateId, callback); +
    +
    -
    -
    
    -using System;
    +                            
    +                            
    +
    using System;
     using System.Diagnostics;
    -using .Api;
    -using .Client;
    -using model;
    +using IO.Swagger.Api;
    +using IO.Swagger.Client;
    +using IO.Swagger.Model;
     
     namespace Example
     {
    -    public class getTemplateContextExample
    +    public class deleteTemplateContextExample
         {
             public void main()
             {
    @@ -13068,427 +9861,295 @@ 

    Usage and SDK Samples

    Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new TemplateApi(); - var templateId = templateId_example; // String | The template context name unique for your environment + var templateId = templateId_example; // String | templateId try { - // Get template context - TemplateContextResponse result = apiInstance.getTemplateContext(templateId); + // Delete template context + TemplateContextResponse result = apiInstance.deleteTemplateContext(templateId); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling TemplateApi.getTemplateContext: " + e.Message ); + Debug.Print("Exception when calling TemplateApi.deleteTemplateContext: " + e.Message ); } } } } +
    +
    -
    -
    - - -
    -
    
    -
    +                              
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
     // Configure OAuth2 access token for authorization: oauth2schema
    -com.sphereon.sdk.template-processor\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
    +Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
     
    -$api_instance = new com.sphereon.sdk.template-processor\Api\TemplateApi();
    -$templateId = templateId_example; // String | The template context name unique for your environment
    +$api_instance = new Swagger\Client\Api\TemplateApi();
    +$templateId = templateId_example; // String | templateId
     
     try {
    -    $result = $api_instance->getTemplateContext($templateId);
    +    $result = $api_instance->deleteTemplateContext($templateId);
         print_r($result);
     } catch (Exception $e) {
    -    echo 'Exception when calling TemplateApi->getTemplateContext: ', $e->getMessage(), PHP_EOL;
    +    echo 'Exception when calling TemplateApi->deleteTemplateContext: ', $e->getMessage(), PHP_EOL;
     }
    -
    -                                                  
    -
    - -
    - - - - - -

    Parameters

    - - - -
    Path parameters
    - - - - - - - +?> + + +
    +
    use Data::Dumper;
    +use WWW::SwaggerClient::Configuration;
    +use WWW::SwaggerClient::TemplateApi;
    +
    +# Configure OAuth2 access token for authorization: oauth2schema
    +$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
    +
    +my $api_instance = WWW::SwaggerClient::TemplateApi->new();
    +my $templateId = templateId_example; # String | templateId
    +
    +eval { 
    +    my $result = $api_instance->deleteTemplateContext(templateId => $templateId);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling TemplateApi->deleteTemplateContext: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_client
    +from swagger_client.rest import ApiException
    +from pprint import pprint
    +
    +# Configure OAuth2 access token for authorization: oauth2schema
    +swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
    +
    +# create an instance of the API class
    +api_instance = swagger_client.TemplateApi()
    +templateId = templateId_example # String | templateId
    +
    +try: 
    +    # Delete template context
    +    api_response = api_instance.delete_template_context(templateId)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling TemplateApi->deleteTemplateContext: %s\n" % e)
    +
    + + +

    Parameters

    + +
    Path parameters
    +
    NameDescription
    templateId*
    + + + + + -
    NameDescription
    templateId* - -
    +
    + templateId +
    + +
    + Required +
    + +
    - - - - - -

    Responses

    - -

    Status: 200 - Template context found

    - - - - - + -
    +

    Responses

    +

    Status: 200 - Template context deleted

    + - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - -

    Status: 404 - Template context not found

    - - - - - - - - - -
    - - - -
    - - - - -
    - - +
    + +
    +
    + +

    Status: 404 - Template context not found

    + + + +
    +
    +
    + -
    - - - - - - - -
    - - - - -
    - - - - -

    Status: 500 - Internal server error

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - - - - - - - - -
    - -
    - - - - - - - - -
    - -
    -
    -

    updateTemplateContext

    -
    -
    - -
    -
    - -

    -

    Update an existing template context for your environment

    -

    -
    - -
    /template/processor/0.1/templates
    - -

    -

    Usage and SDK Samples

    -

    - - - -
    -
    -
    
    -curl -X put -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template/processor/0.1/templates"
    -
    -
    -
    -
    - -
    -
    
    -import com.sphereon.sdk.template-processor.*;
    +    "$ref" : "#/definitions/ErrorResponse"
    +  }
    +};
    +                                        var schema = schemaWrapper.schema;
    +                                        if (schema.$ref != null) {
    +                                          schema = defsParser.$refs.get(schema.$ref);
    +                                        } else {
    +                                          schemaWrapper.definitions = Object.assign({}, defs);
    +                                          $RefParser.dereference(schemaWrapper).catch(function(err) {
    +                                            console.log(err);
    +                                          });
    +                                        }
    +
    +                                        //console.log(JSON.stringify(schema));
    +                                        var view = new JSONSchemaView(schema, 3);
    +                                        $('#responses-deleteTemplateContext-404-schema-data').val(stringify(schema));
    +                                        var result = $('#responses-deleteTemplateContext-404-schema-404');
    +                                        result.empty();
    +                                        result.append(view.render());
    +                                      });
    +                                    
    +                                  
    + +
    +
    + +

    Status: 500 - Internal server error

    + + + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +

    getTemplateContext

    +

    Get template context

    +
    +
    +
    +

    +

    Get an existing template context

    +

    +
    +
    /template/processor/0.1/templates/{templateId}
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X GET "https://gw.api.cloud.sphereon.com/template/processor/0.1/templates/{templateId}"
    +
    +
    +
    import com.sphereon.sdk.template-processor.*;
     import com.sphereon.sdk.template-processor.auth.*;
     import com.sphereon.sdk.template-processor.model.*;
    -import api.TemplateApi;
    +import com.sphereon.sdk.template-processor.api.TemplateApi;
     
     import java.io.File;
     import java.util.*;
    @@ -13503,63 +10164,52 @@ 

    Usage and SDK Samples

    oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); TemplateApi apiInstance = new TemplateApi(); - TemplateContext templateContext = ; // TemplateContext | templateContext + String templateId = templateId_example; // String | The template context name unique for your environment try { - TemplateContextResponse result = apiInstance.updateTemplateContext(templateContext); + TemplateContextResponse result = apiInstance.getTemplateContext(templateId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling TemplateApi#updateTemplateContext"); + System.err.println("Exception when calling TemplateApi#getTemplateContext"); e.printStackTrace(); } } -} - -
    -
    - +}
    +
    -
    -
    
    -import api.TemplateApi;
    +                          
    +
    import com.sphereon.sdk.template-processor.api.TemplateApi;
     
     public class TemplateApiExample {
     
         public static void main(String[] args) {
             TemplateApi apiInstance = new TemplateApi();
    -        TemplateContext templateContext = ; // TemplateContext | templateContext
    +        String templateId = templateId_example; // String | The template context name unique for your environment
             try {
    -            TemplateContextResponse result = apiInstance.updateTemplateContext(templateContext);
    +            TemplateContextResponse result = apiInstance.getTemplateContext(templateId);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling TemplateApi#updateTemplateContext");
    +            System.err.println("Exception when calling TemplateApi#getTemplateContext");
                 e.printStackTrace();
             }
         }
    -}
    -
    -                                                  
    -
    - - - - -
    -
    
    -Configuration *apiConfig = [Configuration sharedConfig];
    +}
    +
    + +
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
    -
    -TemplateContext *templateContext = ; // templateContext
    +String *templateId = templateId_example; // The template context name unique for your environment
     
     TemplateApi *apiInstance = [[TemplateApi alloc] init];
     
    -// Update template context
    -[apiInstance updateTemplateContextWith:templateContext
    +// Get template context
    +[apiInstance getTemplateContextWith:templateId
                   completionHandler: ^(TemplateContextResponse output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
    @@ -13568,21 +10218,20 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; +
    +
    -
    -
    -
    -
    
    -var  = require('');
    -var defaultClient = .ApiClient.instance;
    +                            
    +
    var TemplateProcessor = require('template_processor');
    +var defaultClient = TemplateProcessor.ApiClient.instance;
     
     // Configure OAuth2 access token for authorization: oauth2schema
     var oauth2schema = defaultClient.authentications['oauth2schema'];
     oauth2schema.accessToken = "YOUR ACCESS TOKEN"
     
    -var api = new .TemplateApi()
    +var api = new TemplateProcessor.TemplateApi()
     
    -var templateContext = ; // {TemplateContext} templateContext
    +var templateId = templateId_example; // {String} The template context name unique for your environment
     
     
     var callback = function(error, data, response) {
    @@ -13592,26 +10241,23 @@ 

    Usage and SDK Samples

    console.log('API called successfully. Returned data: ' + data); } }; -api.updateTemplateContext(templateContext, callback); - -
    -
    - - +api.getTemplateContext(templateId, callback); +
    +
    -
    -
    
    -using System;
    +                            
    +                            
    +
    using System;
     using System.Diagnostics;
    -using .Api;
    -using .Client;
    -using model;
    +using IO.Swagger.Api;
    +using IO.Swagger.Client;
    +using IO.Swagger.Model;
     
     namespace Example
     {
    -    public class updateTemplateContextExample
    +    public class getTemplateContextExample
         {
             public void main()
             {
    @@ -13620,439 +10266,295 @@ 

    Usage and SDK Samples

    Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new TemplateApi(); - var templateContext = new TemplateContext(); // TemplateContext | templateContext + var templateId = templateId_example; // String | The template context name unique for your environment try { - // Update template context - TemplateContextResponse result = apiInstance.updateTemplateContext(templateContext); + // Get template context + TemplateContextResponse result = apiInstance.getTemplateContext(templateId); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling TemplateApi.updateTemplateContext: " + e.Message ); + Debug.Print("Exception when calling TemplateApi.getTemplateContext: " + e.Message ); } } } } +
    +
    -
    -
    - - -
    -
    
    -
    +                              
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
     // Configure OAuth2 access token for authorization: oauth2schema
    -com.sphereon.sdk.template-processor\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
    +Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
     
    -$api_instance = new com.sphereon.sdk.template-processor\Api\TemplateApi();
    -$templateContext = ; // TemplateContext | templateContext
    +$api_instance = new Swagger\Client\Api\TemplateApi();
    +$templateId = templateId_example; // String | The template context name unique for your environment
     
     try {
    -    $result = $api_instance->updateTemplateContext($templateContext);
    +    $result = $api_instance->getTemplateContext($templateId);
         print_r($result);
     } catch (Exception $e) {
    -    echo 'Exception when calling TemplateApi->updateTemplateContext: ', $e->getMessage(), PHP_EOL;
    -}
    -
    -                                                  
    -
    - -
    - - - - - -

    Parameters

    - - - - - - -
    Body parameters
    - - - - - - - - - - - -
    NameDescription
    templateContext * - - - -
    -
    - - -

    Responses

    - -

    Status: 200 - Template context updated

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - -

    Status: 404 - Template context not found

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - -

    Status: 500 - Internal server error

    - - - - - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - - - - - - - - - - -
    - - - - - - + echo 'Exception when calling TemplateApi->getTemplateContext: ', $e->getMessage(), PHP_EOL; +} +?>
    + + +
    +
    use Data::Dumper;
    +use WWW::SwaggerClient::Configuration;
    +use WWW::SwaggerClient::TemplateApi;
    +
    +# Configure OAuth2 access token for authorization: oauth2schema
    +$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
    +
    +my $api_instance = WWW::SwaggerClient::TemplateApi->new();
    +my $templateId = templateId_example; # String | The template context name unique for your environment
    +
    +eval { 
    +    my $result = $api_instance->getTemplateContext(templateId => $templateId);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling TemplateApi->getTemplateContext: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_client
    +from swagger_client.rest import ApiException
    +from pprint import pprint
    +
    +# Configure OAuth2 access token for authorization: oauth2schema
    +swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
    +
    +# create an instance of the API class
    +api_instance = swagger_client.TemplateApi()
    +templateId = templateId_example # String | The template context name unique for your environment
    +
    +try: 
    +    # Get template context
    +    api_response = api_instance.get_template_context(templateId)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling TemplateApi->getTemplateContext: %s\n" % e)
    +
    + + +

    Parameters

    + +
    Path parameters
    + + + + + + + + - -
    +
    NameDescription
    templateId* -
    +
    +
    +
    + + String + -
    -
    -

    uploadTemplateFile

    -
    -
    +
    + The template context name unique for your environment +
    +
    +
    + Required +
    +
    +
    +
    -

    -

    Upload the Office template file

    -

    -
    -
    /template/processor/0.1/templates/{templateId}
    -

    -

    Usage and SDK Samples

    -

    - -
    -
    -
    
    -curl -X post -H "apiKey: [[apiKey]]" -H "apiSecret: [[apiSecret]]" "https://gw.api.cloud.sphereon.com//template/processor/0.1/templates/{templateId}"
    +                          

    Responses

    +

    Status: 200 - Template context found

    +
    -
    + -
    -
    
    -import com.sphereon.sdk.template-processor.*;
    +                            
    +
    +
    + +
    + +
    +
    + +

    Status: 404 - Template context not found

    + + + +
    +
    +
    + +
    + +
    +
    + +

    Status: 500 - Internal server error

    + + + +
    +
    +
    + +
    + +
    +
    + + +
    +
    +
    +
    +
    +

    updateTemplateContext

    +

    Update template context

    +
    +
    +
    +

    +

    Update an existing template context for your environment

    +

    +
    +
    /template/processor/0.1/templates
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X PUT "https://gw.api.cloud.sphereon.com/template/processor/0.1/templates"
    +
    +
    +
    import com.sphereon.sdk.template-processor.*;
     import com.sphereon.sdk.template-processor.auth.*;
     import com.sphereon.sdk.template-processor.model.*;
    -import api.TemplateApi;
    +import com.sphereon.sdk.template-processor.api.TemplateApi;
     
     import java.io.File;
     import java.util.*;
    @@ -14067,67 +10569,52 @@ 

    Usage and SDK Samples

    oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); TemplateApi apiInstance = new TemplateApi(); - String templateId = templateId_example; // String | The template context name unique for your environment - file stream = /path/to/file.txt; // file | The template (file/inputstream) to store + TemplateContext templateContext = ; // TemplateContext | templateContext try { - TemplateContextResponse result = apiInstance.uploadTemplateFile(templateId, stream); + TemplateContextResponse result = apiInstance.updateTemplateContext(templateContext); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling TemplateApi#uploadTemplateFile"); + System.err.println("Exception when calling TemplateApi#updateTemplateContext"); e.printStackTrace(); } } -} - -
    -
    +}
    +
    - -
    -
    
    -import api.TemplateApi;
    +                          
    +
    import com.sphereon.sdk.template-processor.api.TemplateApi;
     
     public class TemplateApiExample {
     
         public static void main(String[] args) {
             TemplateApi apiInstance = new TemplateApi();
    -        String templateId = templateId_example; // String | The template context name unique for your environment
    -        file stream = /path/to/file.txt; // file | The template (file/inputstream) to store
    +        TemplateContext templateContext = ; // TemplateContext | templateContext
             try {
    -            TemplateContextResponse result = apiInstance.uploadTemplateFile(templateId, stream);
    +            TemplateContextResponse result = apiInstance.updateTemplateContext(templateContext);
                 System.out.println(result);
             } catch (ApiException e) {
    -            System.err.println("Exception when calling TemplateApi#uploadTemplateFile");
    +            System.err.println("Exception when calling TemplateApi#updateTemplateContext");
                 e.printStackTrace();
             }
         }
    -}
    -
    -                                                  
    -
    - - - - -
    -
    
    -Configuration *apiConfig = [Configuration sharedConfig];
    +}
    +
    + +
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
     // Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
     [apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
     
    -
    -String *templateId = templateId_example; // The template context name unique for your environment
    -file *stream = /path/to/file.txt; // The template (file/inputstream) to store
    +TemplateContext *templateContext = ; // templateContext
     
     TemplateApi *apiInstance = [[TemplateApi alloc] init];
     
    -// Upload template file
    -[apiInstance uploadTemplateFileWith:templateId
    -    stream:stream
    +// Update template context
    +[apiInstance updateTemplateContextWith:templateContext
                   completionHandler: ^(TemplateContextResponse output, NSError* error) {
                                 if (output) {
                                     NSLog(@"%@", output);
    @@ -14136,23 +10623,20 @@ 

    Usage and SDK Samples

    NSLog(@"Error: %@", error); } }]; +
    +
    -
    -
    -
    -
    
    -var  = require('');
    -var defaultClient = .ApiClient.instance;
    +                            
    +
    var TemplateProcessor = require('template_processor');
    +var defaultClient = TemplateProcessor.ApiClient.instance;
     
     // Configure OAuth2 access token for authorization: oauth2schema
     var oauth2schema = defaultClient.authentications['oauth2schema'];
     oauth2schema.accessToken = "YOUR ACCESS TOKEN"
     
    -var api = new .TemplateApi()
    +var api = new TemplateProcessor.TemplateApi()
     
    -var templateId = templateId_example; // {String} The template context name unique for your environment
    -
    -var stream = /path/to/file.txt; // {file} The template (file/inputstream) to store
    +var templateContext = ; // {TemplateContext} templateContext
     
     
     var callback = function(error, data, response) {
    @@ -14162,26 +10646,23 @@ 

    Usage and SDK Samples

    console.log('API called successfully. Returned data: ' + data); } }; -api.uploadTemplateFile(templateId, stream, callback); - -
    -
    - - +api.updateTemplateContext(templateContext, callback); +
    +
    -
    -
    
    -using System;
    +                            
    +                            
    +
    using System;
     using System.Diagnostics;
    -using .Api;
    -using .Client;
    -using model;
    +using IO.Swagger.Api;
    +using IO.Swagger.Client;
    +using IO.Swagger.Model;
     
     namespace Example
     {
    -    public class uploadTemplateFileExample
    +    public class updateTemplateContextExample
         {
             public void main()
             {
    @@ -14190,394 +10671,1702 @@ 

    Usage and SDK Samples

    Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; var apiInstance = new TemplateApi(); - var templateId = templateId_example; // String | The template context name unique for your environment - var stream = new file(); // file | The template (file/inputstream) to store + var templateContext = new TemplateContext(); // TemplateContext | templateContext try { - // Upload template file - TemplateContextResponse result = apiInstance.uploadTemplateFile(templateId, stream); + // Update template context + TemplateContextResponse result = apiInstance.updateTemplateContext(templateContext); Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling TemplateApi.uploadTemplateFile: " + e.Message ); + Debug.Print("Exception when calling TemplateApi.updateTemplateContext: " + e.Message ); } } } } +
    +
    -
    -
    - - -
    -
    
    -
    +                              
    <?php
     require_once(__DIR__ . '/vendor/autoload.php');
     
     // Configure OAuth2 access token for authorization: oauth2schema
    -com.sphereon.sdk.template-processor\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
    +Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
     
    -$api_instance = new com.sphereon.sdk.template-processor\Api\TemplateApi();
    -$templateId = templateId_example; // String | The template context name unique for your environment
    -$stream = /path/to/file.txt; // file | The template (file/inputstream) to store
    +$api_instance = new Swagger\Client\Api\TemplateApi();
    +$templateContext = ; // TemplateContext | templateContext
     
     try {
    -    $result = $api_instance->uploadTemplateFile($templateId, $stream);
    +    $result = $api_instance->updateTemplateContext($templateContext);
         print_r($result);
     } catch (Exception $e) {
    -    echo 'Exception when calling TemplateApi->uploadTemplateFile: ', $e->getMessage(), PHP_EOL;
    +    echo 'Exception when calling TemplateApi->updateTemplateContext: ', $e->getMessage(), PHP_EOL;
     }
    +?>
    +
    - -
    +
    +
    use Data::Dumper;
    +use WWW::SwaggerClient::Configuration;
    +use WWW::SwaggerClient::TemplateApi;
     
    -                                            
    +# Configure OAuth2 access token for authorization: oauth2schema +$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN'; +my $api_instance = WWW::SwaggerClient::TemplateApi->new(); +my $templateContext = WWW::SwaggerClient::Object::TemplateContext->new(); # TemplateContext | templateContext +eval { + my $result = $api_instance->updateTemplateContext(templateContext => $templateContext); + print Dumper($result); +}; +if ($@) { + warn "Exception when calling TemplateApi->updateTemplateContext: $@\n"; +} +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_client
    +from swagger_client.rest import ApiException
    +from pprint import pprint
     
    +# Configure OAuth2 access token for authorization: oauth2schema
    +swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
     
    +# create an instance of the API class
    +api_instance = swagger_client.TemplateApi()
    +templateContext =  # TemplateContext | templateContext
     
    -                                            

    Parameters

    +try: + # Update template context + api_response = api_instance.update_template_context(templateContext) + pprint(api_response) +except ApiException as e: + print("Exception when calling TemplateApi->updateTemplateContext: %s\n" % e)
    +
    + +

    Parameters

    -
    Path parameters
    - - - - - - - + +
    Body parameters
    +
    NameDescription
    templateId*
    + + + + + -
    NameDescription
    templateContext * -
    + var view = new JSONSchemaView(schema,2,{isBodyParam: true}); + var result = $('#d2e199_updateTemplateContext_templateContext'); + result.empty(); + result.append(view.render()); +}); + +
    - - - - - -

    Responses

    - -

    Status: 200 - Template uploaded and stored

    + - + - - - - - -
    - - - -
    - - - - -
    - - -
    - - - - - - - -
    - - - - -
    - - - - -

    Status: 404 - Template context not found

    - - - - - - - - - -
    - - - -
    - - - - -
    - - +
    + +
    +
    + +

    Status: 404 - Template context not found

    + + + +
    +
    +
    + -
    - - - - - - - -
    - - - - -
    - - - - -

    Status: 500 - Internal server error

    - - - - - - - - - -
    - - - -
    - - - - -
    - - +
    + +
    +
    + +

    Status: 500 - Internal server error

    + + + +
    +
    +
    + +
    + +
    +
    + + + +
    +
    +
    +
    +

    uploadTemplateFile

    +

    Upload template file

    +
    +
    +
    +

    +

    Upload the Office template file

    +

    +
    +
    /template/processor/0.1/templates/{templateId}
    +

    +

    Usage and SDK Samples

    +

    + + +
    +
    +
    curl -X POST "https://gw.api.cloud.sphereon.com/template/processor/0.1/templates/{templateId}"
    +
    +
    +
    import com.sphereon.sdk.template-processor.*;
    +import com.sphereon.sdk.template-processor.auth.*;
    +import com.sphereon.sdk.template-processor.model.*;
    +import com.sphereon.sdk.template-processor.api.TemplateApi;
     
    -                                                                        //console.log(JSON.stringify(resolved));
    +import java.io.File;
    +import java.util.*;
     
    +public class TemplateApiExample {
     
    +    public static void main(String[] args) {
    +        ApiClient defaultClient = Configuration.getDefaultApiClient();
    +        
    +        // Configure OAuth2 access token for authorization: oauth2schema
    +        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
    +        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");
     
    -                                                                        var view = new JSONSchemaView(resolved.schema, 3);
    -                                                                        $('#examples-Template-uploadTemplateFile-schema-data').val(JSON.stringify(resolved.schema));
    -                                                                        var result = $('#examples-Template-uploadTemplateFile-schema-500');
    -                                                                        result.empty();
    -                                                                        result.append(view.render());
    -                                                                    });
    +        TemplateApi apiInstance = new TemplateApi();
    +        String templateId = templateId_example; // String | The template context name unique for your environment
    +        File stream = /path/to/file.txt; // File | The template (file/inputstream) to store
    +        try {
    +            TemplateContextResponse result = apiInstance.uploadTemplateFile(templateId, stream);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling TemplateApi#uploadTemplateFile");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    +
    +
    import com.sphereon.sdk.template-processor.api.TemplateApi;
     
    +public class TemplateApiExample {
     
    +    public static void main(String[] args) {
    +        TemplateApi apiInstance = new TemplateApi();
    +        String templateId = templateId_example; // String | The template context name unique for your environment
    +        File stream = /path/to/file.txt; // File | The template (file/inputstream) to store
    +        try {
    +            TemplateContextResponse result = apiInstance.uploadTemplateFile(templateId, stream);
    +            System.out.println(result);
    +        } catch (ApiException e) {
    +            System.err.println("Exception when calling TemplateApi#uploadTemplateFile");
    +            e.printStackTrace();
    +        }
    +    }
    +}
    +
    + +
    +
    Configuration *apiConfig = [Configuration sharedConfig];
     
    -                                                                });
    -                                                            
    -                                                        
    - +// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema) +[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"]; +String *templateId = templateId_example; // The template context name unique for your environment +File *stream = /path/to/file.txt; // The template (file/inputstream) to store +TemplateApi *apiInstance = [[TemplateApi alloc] init]; +// Upload template file +[apiInstance uploadTemplateFileWith:templateId + stream:stream + completionHandler: ^(TemplateContextResponse output, NSError* error) { + if (output) { + NSLog(@"%@", output); + } + if (error) { + NSLog(@"Error: %@", error); + } + }]; + +
    +
    +
    var TemplateProcessor = require('template_processor');
    +var defaultClient = TemplateProcessor.ApiClient.instance;
     
    +// Configure OAuth2 access token for authorization: oauth2schema
    +var oauth2schema = defaultClient.authentications['oauth2schema'];
    +oauth2schema.accessToken = "YOUR ACCESS TOKEN"
     
    -                                                    
    +var api = new TemplateProcessor.TemplateApi() +var templateId = templateId_example; // {String} The template context name unique for your environment +var stream = /path/to/file.txt; // {File} The template (file/inputstream) to store -
    +var callback = function(error, data, response) { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}; +api.uploadTemplateFile(templateId, stream, callback); + + + +
    +
    using System;
    +using System.Diagnostics;
    +using IO.Swagger.Api;
    +using IO.Swagger.Client;
    +using IO.Swagger.Model;
     
    +namespace Example
    +{
    +    public class uploadTemplateFileExample
    +    {
    +        public void main()
    +        {
    +            
    +            // Configure OAuth2 access token for authorization: oauth2schema
    +            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
     
    +            var apiInstance = new TemplateApi();
    +            var templateId = templateId_example;  // String | The template context name unique for your environment
    +            var stream = new File(); // File | The template (file/inputstream) to store
     
    +            try
    +            {
    +                // Upload template file
    +                TemplateContextResponse result = apiInstance.uploadTemplateFile(templateId, stream);
    +                Debug.WriteLine(result);
    +            }
    +            catch (Exception e)
    +            {
    +                Debug.Print("Exception when calling TemplateApi.uploadTemplateFile: " + e.Message );
    +            }
    +        }
    +    }
    +}
    +
    +
    +
    +
    <?php
    +require_once(__DIR__ . '/vendor/autoload.php');
     
    +// Configure OAuth2 access token for authorization: oauth2schema
    +Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
     
    +$api_instance = new Swagger\Client\Api\TemplateApi();
    +$templateId = templateId_example; // String | The template context name unique for your environment
    +$stream = /path/to/file.txt; // File | The template (file/inputstream) to store
     
    +try {
    +    $result = $api_instance->uploadTemplateFile($templateId, $stream);
    +    print_r($result);
    +} catch (Exception $e) {
    +    echo 'Exception when calling TemplateApi->uploadTemplateFile: ', $e->getMessage(), PHP_EOL;
    +}
    +?>
    +
    + +
    +
    use Data::Dumper;
    +use WWW::SwaggerClient::Configuration;
    +use WWW::SwaggerClient::TemplateApi;
    +
    +# Configure OAuth2 access token for authorization: oauth2schema
    +$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
    +
    +my $api_instance = WWW::SwaggerClient::TemplateApi->new();
    +my $templateId = templateId_example; # String | The template context name unique for your environment
    +my $stream = /path/to/file.txt; # File | The template (file/inputstream) to store
    +
    +eval { 
    +    my $result = $api_instance->uploadTemplateFile(templateId => $templateId, stream => $stream);
    +    print Dumper($result);
    +};
    +if ($@) {
    +    warn "Exception when calling TemplateApi->uploadTemplateFile: $@\n";
    +}
    +
    + +
    +
    from __future__ import print_statement
    +import time
    +import swagger_client
    +from swagger_client.rest import ApiException
    +from pprint import pprint
    +
    +# Configure OAuth2 access token for authorization: oauth2schema
    +swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
    +
    +# create an instance of the API class
    +api_instance = swagger_client.TemplateApi()
    +templateId = templateId_example # String | The template context name unique for your environment
    +stream = /path/to/file.txt # File | The template (file/inputstream) to store
    +
    +try: 
    +    # Upload template file
    +    api_response = api_instance.upload_template_file(templateId, stream)
    +    pprint(api_response)
    +except ApiException as e:
    +    print("Exception when calling TemplateApi->uploadTemplateFile: %s\n" % e)
    +
    + + +

    Parameters

    + +
    Path parameters
    + + + + + + + + - +
    NameDescription
    templateId* - - +
    +
    +
    + + String + -
    +
    + The template context name unique for your environment +
    +
    +
    + Required +
    +
    +
    +
    +
    Form parameters
    + + + + + + + + +
    NameDescription
    stream* +
    +
    +
    + + File + +
    + The template (file/inputstream) to store +
    +
    + Required +
    +
    +
    +
    +

    Responses

    +

    Status: 200 - Template uploaded and stored

    + - +
    +
    + + + - - - - - - + + + - - + + - - - - - + + - diff --git a/java8-jersey2/.swagger-codegen/VERSION b/java8-jersey2/.swagger-codegen/VERSION new file mode 100644 index 0000000..6b4d157 --- /dev/null +++ b/java8-jersey2/.swagger-codegen/VERSION @@ -0,0 +1 @@ +2.2.3 \ No newline at end of file diff --git a/java8-jersey2/.travis.yml b/java8-jersey2/.travis.yml index 33e7947..70cb81a 100644 --- a/java8-jersey2/.travis.yml +++ b/java8-jersey2/.travis.yml @@ -1,18 +1,6 @@ # # Generated by: https://github.com/swagger-api/swagger-codegen.git # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# language: java jdk: - oraclejdk8 diff --git a/java8-jersey2/LICENSE b/java8-jersey2/LICENSE deleted file mode 100644 index 8dada3e..0000000 --- a/java8-jersey2/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/java8-jersey2/README.md b/java8-jersey2/README.md index 3417e86..3f5c749 100644 --- a/java8-jersey2/README.md +++ b/java8-jersey2/README.md @@ -28,7 +28,7 @@ Add this dependency to your project's POM: com.sphereon.sdk template-processor-sdk-java8-jersey2 - 0.1.0 + 0.1.1 compile ``` @@ -38,7 +38,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.sphereon.sdk:template-processor-sdk-java8-jersey2:0.1.0" +compile "com.sphereon.sdk:template-processor-sdk-java8-jersey2:0.1.1" ``` ### Others @@ -49,7 +49,7 @@ At first generate the JAR by executing: Then manually install the following JARs: -* target/template-processor-sdk-java8-jersey2-0.1.0.jar +* target/template-processor-sdk-java8-jersey2-0.1.1.jar * target/lib/*.jar ## Getting Started @@ -61,12 +61,12 @@ Please follow the [installation](#installation) instruction and execute the foll import com.sphereon.sdk.template_processor.handler.*; import com.sphereon.sdk.template_processor.handler.auth.*; import com.sphereon.sdk.template_processor.model.*; -import com.sphereon.sdk.template_processor.api.MergeApi; +import com.sphereon.sdk.template_processor.api.AllApi; import java.io.File; import java.util.*; -public class MergeApiExample { +public class AllApiExample { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); @@ -75,13 +75,13 @@ public class MergeApiExample { OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - MergeApi apiInstance = new MergeApi(); + AllApi apiInstance = new AllApi(); String payload = "payload_example"; // String | The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] try { DataSetResponse result = apiInstance.createDataSet(payload); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling MergeApi#createDataSet"); + System.err.println("Exception when calling AllApi#createDataSet"); e.printStackTrace(); } } @@ -91,23 +91,35 @@ public class MergeApiExample { ## Documentation for API Endpoints -All URIs are relative to *https://gw.api.cloud.sphereon.com/* +All URIs are relative to *https://gw.api.cloud.sphereon.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*MergeApi* | [**createDataSet**](docs/MergeApi.md#createDataSet) | **POST** /template-processor/merge/0.1/datasets | Store dataset -*MergeApi* | [**createTemplateContext**](docs/MergeApi.md#createTemplateContext) | **POST** /template-processor/merge/0.1/templates | Create template context -*MergeApi* | [**deleteDataSet**](docs/MergeApi.md#deleteDataSet) | **DELETE** /template-processor/merge/0.1/datasets/{dataSetId} | Delete a stored data set -*MergeApi* | [**deleteJob**](docs/MergeApi.md#deleteJob) | **DELETE** /template-processor/merge/0.1/jobs/{jobId} | Delete a job manually -*MergeApi* | [**deleteTemplateContext**](docs/MergeApi.md#deleteTemplateContext) | **DELETE** /template-processor/merge/0.1/templates/{templateId} | Delete template context -*MergeApi* | [**getJob**](docs/MergeApi.md#getJob) | **GET** /template-processor/merge/0.1/jobs/{jobId} | Job definition and state -*MergeApi* | [**getJobs**](docs/MergeApi.md#getJobs) | **GET** /template-processor/merge/0.1/jobs | Get all jobs -*MergeApi* | [**getResultStreamById**](docs/MergeApi.md#getResultStreamById) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file -*MergeApi* | [**getResultStreamsAsContainer**](docs/MergeApi.md#getResultStreamsAsContainer) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/container | Get the result file -*MergeApi* | [**getTemplateContext**](docs/MergeApi.md#getTemplateContext) | **GET** /template-processor/merge/0.1/templates/{templateId} | Get template context -*MergeApi* | [**submitJob**](docs/MergeApi.md#submitJob) | **PUT** /template-processor/merge/0.1/jobs | Submit merge job for processing -*MergeApi* | [**updateTemplateContext**](docs/MergeApi.md#updateTemplateContext) | **PUT** /template-processor/merge/0.1/templates | Update template context -*MergeApi* | [**uploadTemplateFile**](docs/MergeApi.md#uploadTemplateFile) | **POST** /template-processor/merge/0.1/templates/{templateId} | Upload template file +*AllApi* | [**createDataSet**](docs/AllApi.md#createDataSet) | **POST** /template/processor/0.1/datasets | Store dataset +*AllApi* | [**createTemplateContext**](docs/AllApi.md#createTemplateContext) | **POST** /template/processor/0.1/templates | Create template context +*AllApi* | [**deleteDataSet**](docs/AllApi.md#deleteDataSet) | **DELETE** /template/processor/0.1/datasets/{dataSetId} | Delete a stored data set +*AllApi* | [**deleteJob**](docs/AllApi.md#deleteJob) | **DELETE** /template/processor/0.1/jobs/{jobId} | Delete a job manually +*AllApi* | [**deleteTemplateContext**](docs/AllApi.md#deleteTemplateContext) | **DELETE** /template/processor/0.1/templates/{templateId} | Delete template context +*AllApi* | [**getJob**](docs/AllApi.md#getJob) | **GET** /template/processor/0.1/jobs/{jobId} | Job definition and state +*AllApi* | [**getJobs**](docs/AllApi.md#getJobs) | **GET** /template/processor/0.1/jobs | Get all jobs +*AllApi* | [**getResultStream**](docs/AllApi.md#getResultStream) | **PUT** /template/processor/0.1/jobs/{jobId}/result/stream | Get the result file +*AllApi* | [**getResultStreamsAsContainer**](docs/AllApi.md#getResultStreamsAsContainer) | **PUT** /template/processor/0.1/jobs/{jobId}/result/container | Get the result file +*AllApi* | [**getTemplateContext**](docs/AllApi.md#getTemplateContext) | **GET** /template/processor/0.1/templates/{templateId} | Get template context +*AllApi* | [**submitJob**](docs/AllApi.md#submitJob) | **PUT** /template/processor/0.1/jobs | Submit merge job for processing +*AllApi* | [**updateTemplateContext**](docs/AllApi.md#updateTemplateContext) | **PUT** /template/processor/0.1/templates | Update template context +*AllApi* | [**uploadTemplateFile**](docs/AllApi.md#uploadTemplateFile) | **POST** /template/processor/0.1/templates/{templateId} | Upload template file +*DataSetApi* | [**createDataSet**](docs/DataSetApi.md#createDataSet) | **POST** /template/processor/0.1/datasets | Store dataset +*DataSetApi* | [**deleteDataSet**](docs/DataSetApi.md#deleteDataSet) | **DELETE** /template/processor/0.1/datasets/{dataSetId} | Delete a stored data set +*JobApi* | [**getJob**](docs/JobApi.md#getJob) | **GET** /template/processor/0.1/jobs/{jobId} | Job definition and state +*JobApi* | [**getJobs**](docs/JobApi.md#getJobs) | **GET** /template/processor/0.1/jobs | Get all jobs +*JobApi* | [**getResultStream**](docs/JobApi.md#getResultStream) | **PUT** /template/processor/0.1/jobs/{jobId}/result/stream | Get the result file +*JobApi* | [**getResultStreamsAsContainer**](docs/JobApi.md#getResultStreamsAsContainer) | **PUT** /template/processor/0.1/jobs/{jobId}/result/container | Get the result file +*JobApi* | [**submitJob**](docs/JobApi.md#submitJob) | **PUT** /template/processor/0.1/jobs | Submit merge job for processing +*TemplateApi* | [**createTemplateContext**](docs/TemplateApi.md#createTemplateContext) | **POST** /template/processor/0.1/templates | Create template context +*TemplateApi* | [**deleteTemplateContext**](docs/TemplateApi.md#deleteTemplateContext) | **DELETE** /template/processor/0.1/templates/{templateId} | Delete template context +*TemplateApi* | [**getTemplateContext**](docs/TemplateApi.md#getTemplateContext) | **GET** /template/processor/0.1/templates/{templateId} | Get template context +*TemplateApi* | [**updateTemplateContext**](docs/TemplateApi.md#updateTemplateContext) | **PUT** /template/processor/0.1/templates | Update template context +*TemplateApi* | [**uploadTemplateFile**](docs/TemplateApi.md#uploadTemplateFile) | **POST** /template/processor/0.1/templates/{templateId} | Upload template file ## Documentation for Models @@ -121,6 +133,8 @@ Class | Method | HTTP request | Description - [MergeSettings](docs/MergeSettings.md) - [OutputSettings](docs/OutputSettings.md) - [OwnerInfo](docs/OwnerInfo.md) + - [ResultStreamRequest](docs/ResultStreamRequest.md) + - [StorageLocation](docs/StorageLocation.md) - [StreamLocation](docs/StreamLocation.md) - [TemplateContext](docs/TemplateContext.md) - [TemplateContextRequest](docs/TemplateContextRequest.md) @@ -134,7 +148,7 @@ Authentication schemes defined for the API: - **Type**: OAuth - **Flow**: application -- **Authorizatoin URL**: +- **Authorization URL**: - **Scopes**: - global: accessEverything diff --git a/java8-jersey2/build.gradle b/java8-jersey2/build.gradle index 42e00d0..34e4c40 100644 --- a/java8-jersey2/build.gradle +++ b/java8-jersey2/build.gradle @@ -2,15 +2,15 @@ apply plugin: 'idea' apply plugin: 'eclipse' group = 'com.sphereon.sdk' -version = '0.1.0' +version = '0.1.1' buildscript { repositories { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:1.5.+' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' + classpath 'com.android.tools.build:gradle:2.3.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' } } @@ -25,11 +25,11 @@ if(hasProperty('target') && target == 'android') { apply plugin: 'com.github.dcendents.android-maven' android { - compileSdkVersion 23 - buildToolsVersion '23.0.2' + compileSdkVersion 25 + buildToolsVersion '25.0.2' defaultConfig { minSdkVersion 14 - targetSdkVersion 23 + targetSdkVersion 25 } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -93,9 +93,9 @@ if(hasProperty('target') && target == 'android') { } ext { - swagger_annotations_version = "1.5.8" - jackson_version = "2.7.5" - jersey_version = "2.22.2" + swagger_annotations_version = "1.5.15" + jackson_version = "2.8.9" + jersey_version = "2.25.1" junit_version = "4.12" } @@ -108,6 +108,5 @@ dependencies { compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version" compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" - compile "com.brsanthu:migbase64:2.2" testCompile "junit:junit:$junit_version" } diff --git a/java8-jersey2/build.sbt b/java8-jersey2/build.sbt index df5521b..9c53006 100644 --- a/java8-jersey2/build.sbt +++ b/java8-jersey2/build.sbt @@ -2,21 +2,21 @@ lazy val root = (project in file(".")). settings( organization := "com.sphereon.sdk", name := "template-processor-sdk-java8-jersey2", - version := "0.1.0", + version := "0.1.1", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), javacOptions in compile ++= Seq("-Xlint:deprecation"), publishArtifact in (Compile, packageDoc) := false, resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( - "io.swagger" % "swagger-annotations" % "1.5.8", - "org.glassfish.jersey.core" % "jersey-client" % "2.22.2", - "org.glassfish.jersey.media" % "jersey-media-multipart" % "2.22.2", - "org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.22.2", - "com.fasterxml.jackson.core" % "jackson-core" % "2.7.5", - "com.fasterxml.jackson.core" % "jackson-annotations" % "2.7.5", - "com.fasterxml.jackson.core" % "jackson-databind" % "2.7.5", - "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.7.5", + "io.swagger" % "swagger-annotations" % "1.5.15", + "org.glassfish.jersey.core" % "jersey-client" % "2.25.1", + "org.glassfish.jersey.media" % "jersey-media-multipart" % "2.25.1", + "org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.25.1", + "com.fasterxml.jackson.core" % "jackson-core" % "2.8.9", + "com.fasterxml.jackson.core" % "jackson-annotations" % "2.8.9", + "com.fasterxml.jackson.core" % "jackson-databind" % "2.8.9", + "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.8.9", "com.brsanthu" % "migbase64" % "2.2", "junit" % "junit" % "4.12" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" diff --git a/java8-jersey2/docs/AllApi.md b/java8-jersey2/docs/AllApi.md index 120f774..cfbd339 100644 --- a/java8-jersey2/docs/AllApi.md +++ b/java8-jersey2/docs/AllApi.md @@ -1,6 +1,6 @@ # AllApi -All URIs are relative to *https://gw.api.cloud.sphereon.com/* +All URIs are relative to *https://gw.api.cloud.sphereon.com* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -11,7 +11,7 @@ Method | HTTP request | Description [**deleteTemplateContext**](AllApi.md#deleteTemplateContext) | **DELETE** /template/processor/0.1/templates/{templateId} | Delete template context [**getJob**](AllApi.md#getJob) | **GET** /template/processor/0.1/jobs/{jobId} | Job definition and state [**getJobs**](AllApi.md#getJobs) | **GET** /template/processor/0.1/jobs | Get all jobs -[**getResultStreamById**](AllApi.md#getResultStreamById) | **PUT** /template/processor/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file +[**getResultStream**](AllApi.md#getResultStream) | **PUT** /template/processor/0.1/jobs/{jobId}/result/stream | Get the result file [**getResultStreamsAsContainer**](AllApi.md#getResultStreamsAsContainer) | **PUT** /template/processor/0.1/jobs/{jobId}/result/container | Get the result file [**getTemplateContext**](AllApi.md#getTemplateContext) | **GET** /template/processor/0.1/templates/{templateId} | Get template context [**submitJob**](AllApi.md#submitJob) | **PUT** /template/processor/0.1/jobs | Submit merge job for processing @@ -390,9 +390,9 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json;charset=UTF-8 - -# **getResultStreamById** -> byte[] getResultStreamById(jobId, streamId, outputSettings) + +# **getResultStream** +> byte[] getResultStream(jobId, resultStreamRequest) Get the result file @@ -415,13 +415,12 @@ oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); AllApi apiInstance = new AllApi(); String jobId = "jobId_example"; // String | jobId -String streamId = "streamId_example"; // String | streamId -OutputSettings outputSettings = new OutputSettings(); // OutputSettings | outputSettings +ResultStreamRequest resultStreamRequest = new ResultStreamRequest(); // ResultStreamRequest | resultStreamRequest try { - byte[] result = apiInstance.getResultStreamById(jobId, streamId, outputSettings); + byte[] result = apiInstance.getResultStream(jobId, resultStreamRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AllApi#getResultStreamById"); + System.err.println("Exception when calling AllApi#getResultStream"); e.printStackTrace(); } ``` @@ -431,8 +430,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **jobId** | **String**| jobId | - **streamId** | **String**| streamId | - **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] + **resultStreamRequest** | [**ResultStreamRequest**](ResultStreamRequest.md)| resultStreamRequest | ### Return type diff --git a/java8-jersey2/docs/DataSetApi.md b/java8-jersey2/docs/DataSetApi.md index 12ab44b..dc9dfec 100644 --- a/java8-jersey2/docs/DataSetApi.md +++ b/java8-jersey2/docs/DataSetApi.md @@ -1,6 +1,6 @@ # DataSetApi -All URIs are relative to *https://gw.api.cloud.sphereon.com/* +All URIs are relative to *https://gw.api.cloud.sphereon.com* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/java8-jersey2/docs/JobApi.md b/java8-jersey2/docs/JobApi.md index 99935c1..d2c8c91 100644 --- a/java8-jersey2/docs/JobApi.md +++ b/java8-jersey2/docs/JobApi.md @@ -1,12 +1,12 @@ # JobApi -All URIs are relative to *https://gw.api.cloud.sphereon.com/* +All URIs are relative to *https://gw.api.cloud.sphereon.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**getJob**](JobApi.md#getJob) | **GET** /template/processor/0.1/jobs/{jobId} | Job definition and state [**getJobs**](JobApi.md#getJobs) | **GET** /template/processor/0.1/jobs | Get all jobs -[**getResultStreamById**](JobApi.md#getResultStreamById) | **PUT** /template/processor/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file +[**getResultStream**](JobApi.md#getResultStream) | **PUT** /template/processor/0.1/jobs/{jobId}/result/stream | Get the result file [**getResultStreamsAsContainer**](JobApi.md#getResultStreamsAsContainer) | **PUT** /template/processor/0.1/jobs/{jobId}/result/container | Get the result file [**submitJob**](JobApi.md#submitJob) | **PUT** /template/processor/0.1/jobs | Submit merge job for processing @@ -117,9 +117,9 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json;charset=UTF-8 - -# **getResultStreamById** -> byte[] getResultStreamById(jobId, streamId, outputSettings) + +# **getResultStream** +> byte[] getResultStream(jobId, resultStreamRequest) Get the result file @@ -142,13 +142,12 @@ oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); JobApi apiInstance = new JobApi(); String jobId = "jobId_example"; // String | jobId -String streamId = "streamId_example"; // String | streamId -OutputSettings outputSettings = new OutputSettings(); // OutputSettings | outputSettings +ResultStreamRequest resultStreamRequest = new ResultStreamRequest(); // ResultStreamRequest | resultStreamRequest try { - byte[] result = apiInstance.getResultStreamById(jobId, streamId, outputSettings); + byte[] result = apiInstance.getResultStream(jobId, resultStreamRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling JobApi#getResultStreamById"); + System.err.println("Exception when calling JobApi#getResultStream"); e.printStackTrace(); } ``` @@ -158,8 +157,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **jobId** | **String**| jobId | - **streamId** | **String**| streamId | - **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] + **resultStreamRequest** | [**ResultStreamRequest**](ResultStreamRequest.md)| resultStreamRequest | ### Return type diff --git a/java8-jersey2/docs/MergeApi.md b/java8-jersey2/docs/MergeApi.md deleted file mode 100644 index 846fa0a..0000000 --- a/java8-jersey2/docs/MergeApi.md +++ /dev/null @@ -1,718 +0,0 @@ -# MergeApi - -All URIs are relative to *https://gw.api.cloud.sphereon.com/* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createDataSet**](MergeApi.md#createDataSet) | **POST** /template-processor/merge/0.1/datasets | Store dataset -[**createTemplateContext**](MergeApi.md#createTemplateContext) | **POST** /template-processor/merge/0.1/templates | Create template context -[**deleteDataSet**](MergeApi.md#deleteDataSet) | **DELETE** /template-processor/merge/0.1/datasets/{dataSetId} | Delete a stored data set -[**deleteJob**](MergeApi.md#deleteJob) | **DELETE** /template-processor/merge/0.1/jobs/{jobId} | Delete a job manually -[**deleteTemplateContext**](MergeApi.md#deleteTemplateContext) | **DELETE** /template-processor/merge/0.1/templates/{templateId} | Delete template context -[**getJob**](MergeApi.md#getJob) | **GET** /template-processor/merge/0.1/jobs/{jobId} | Job definition and state -[**getJobs**](MergeApi.md#getJobs) | **GET** /template-processor/merge/0.1/jobs | Get all jobs -[**getResultStreamById**](MergeApi.md#getResultStreamById) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file -[**getResultStreamsAsContainer**](MergeApi.md#getResultStreamsAsContainer) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/container | Get the result file -[**getTemplateContext**](MergeApi.md#getTemplateContext) | **GET** /template-processor/merge/0.1/templates/{templateId} | Get template context -[**submitJob**](MergeApi.md#submitJob) | **PUT** /template-processor/merge/0.1/jobs | Submit merge job for processing -[**updateTemplateContext**](MergeApi.md#updateTemplateContext) | **PUT** /template-processor/merge/0.1/templates | Update template context -[**uploadTemplateFile**](MergeApi.md#uploadTemplateFile) | **POST** /template-processor/merge/0.1/templates/{templateId} | Upload template file - - - -# **createDataSet** -> DataSetResponse createDataSet(payload) - -Store dataset - -Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String payload = "payload_example"; // String | The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] -try { - DataSetResponse result = apiInstance.createDataSet(payload); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#createDataSet"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **payload** | **String**| The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] | - -### Return type - -[**DataSetResponse**](DataSetResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - - -# **createTemplateContext** -> TemplateContextResponse createTemplateContext(templateRequest) - -Create template context - -Create a unique template context for your environment - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -TemplateContextRequest templateRequest = new TemplateContextRequest(); // TemplateContextRequest | The template request -try { - TemplateContextResponse result = apiInstance.createTemplateContext(templateRequest); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#createTemplateContext"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| The template request | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - - -# **deleteDataSet** -> DataSetResponse deleteDataSet(dataSetId) - -Delete a stored data set - -Delete a stored data set - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String dataSetId = "dataSetId_example"; // String | dataSetId -try { - DataSetResponse result = apiInstance.deleteDataSet(dataSetId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#deleteDataSet"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **dataSetId** | **String**| dataSetId | - -### Return type - -[**DataSetResponse**](DataSetResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - - -# **deleteJob** -> MergeJobResponse deleteJob(jobId) - -Delete a job manually - -Delete the merge job and all related files - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String jobId = "jobId_example"; // String | jobId -try { - MergeJobResponse result = apiInstance.deleteJob(jobId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#deleteJob"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **String**| jobId | - -### Return type - -[**MergeJobResponse**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - - -# **deleteTemplateContext** -> TemplateContextResponse deleteTemplateContext(templateId) - -Delete template context - -Delete a template context with all history - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String templateId = "templateId_example"; // String | templateId -try { - TemplateContextResponse result = apiInstance.deleteTemplateContext(templateId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#deleteTemplateContext"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateId** | **String**| templateId | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - - -# **getJob** -> MergeJobResponse getJob(jobId) - -Job definition and state - -Get the merge job definition and current state. Please not that you can differentiate based on http response status - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String jobId = "jobId_example"; // String | jobId -try { - MergeJobResponse result = apiInstance.getJob(jobId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#getJob"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **String**| jobId | - -### Return type - -[**MergeJobResponse**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - - -# **getJobs** -> List<MergeJobResponse> getJobs(status) - -Get all jobs - -Get all office text job definitions and their current state. - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -List status = Arrays.asList("status_example"); // List | A list of status to filter on. -try { - List result = apiInstance.getJobs(status); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#getJobs"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| A list of status to filter on. | [optional] [enum: CREATED, UPDATED, PROCESSING, DONE, ERROR, DELETED] - -### Return type - -[**List<MergeJobResponse>**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - - -# **getResultStreamById** -> byte[] getResultStreamById(jobId, streamId, outputSettings) - -Get the result file - -Get a merge result document as a binary stream. - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String jobId = "jobId_example"; // String | jobId -String streamId = "streamId_example"; // String | streamId -OutputSettings outputSettings = new OutputSettings(); // OutputSettings | outputSettings -try { - byte[] result = apiInstance.getResultStreamById(jobId, streamId, outputSettings); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#getResultStreamById"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **String**| jobId | - **streamId** | **String**| streamId | - **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] - -### Return type - -**byte[]** - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/octet-stream - - -# **getResultStreamsAsContainer** -> byte[] getResultStreamsAsContainer(jobId, outputSettings) - -Get the result file - -Get all documents inside a compressed container as a binary stream. - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String jobId = "jobId_example"; // String | jobId -OutputSettings outputSettings = new OutputSettings(); // OutputSettings | outputSettings -try { - byte[] result = apiInstance.getResultStreamsAsContainer(jobId, outputSettings); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#getResultStreamsAsContainer"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **String**| jobId | - **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] - -### Return type - -**byte[]** - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/octet-stream - - -# **getTemplateContext** -> TemplateContextResponse getTemplateContext(templateId) - -Get template context - -Get an existing template context - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String templateId = "templateId_example"; // String | The template context name unique for your environment -try { - TemplateContextResponse result = apiInstance.getTemplateContext(templateId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#getTemplateContext"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateId** | **String**| The template context name unique for your environment | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - - -# **submitJob** -> MergeJobResponse submitJob(mergesettings) - -Submit merge job for processing - -Submit merge job run. - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -MergeSettings mergesettings = new MergeSettings(); // MergeSettings | The merge- and output settings -try { - MergeJobResponse result = apiInstance.submitJob(mergesettings); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#submitJob"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **mergesettings** | [**MergeSettings**](MergeSettings.md)| The merge- and output settings | - -### Return type - -[**MergeJobResponse**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - - -# **updateTemplateContext** -> TemplateContextResponse updateTemplateContext(templateContextRequest) - -Update template context - -Update an existing template context for your environment - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -TemplateContextRequest templateContextRequest = new TemplateContextRequest(); // TemplateContextRequest | templateContextRequest -try { - TemplateContextResponse result = apiInstance.updateTemplateContext(templateContextRequest); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#updateTemplateContext"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateContextRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| templateContextRequest | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - - -# **uploadTemplateFile** -> TemplateContextResponse uploadTemplateFile(templateId, stream) - -Upload template file - -Upload the Office template file - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String templateId = "templateId_example"; // String | The template context name unique for your environment -File stream = new File("/path/to/file.txt"); // File | The template (file/inputstream) to store -try { - TemplateContextResponse result = apiInstance.uploadTemplateFile(templateId, stream); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#uploadTemplateFile"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateId** | **String**| The template context name unique for your environment | - **stream** | **File**| The template (file/inputstream) to store | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json;charset=UTF-8 - diff --git a/java8-jersey2/docs/ResultStreamRequest.md b/java8-jersey2/docs/ResultStreamRequest.md new file mode 100644 index 0000000..1c6e0fc --- /dev/null +++ b/java8-jersey2/docs/ResultStreamRequest.md @@ -0,0 +1,11 @@ + +# ResultStreamRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**streamLocation** | [**StreamLocation**](StreamLocation.md) | The stream location | +**outputSettings** | [**OutputSettings**](OutputSettings.md) | The Output settings | [optional] + + + diff --git a/java8-jersey2/docs/TemplateApi.md b/java8-jersey2/docs/TemplateApi.md index 4e0cfca..6b75162 100644 --- a/java8-jersey2/docs/TemplateApi.md +++ b/java8-jersey2/docs/TemplateApi.md @@ -1,6 +1,6 @@ # TemplateApi -All URIs are relative to *https://gw.api.cloud.sphereon.com/* +All URIs are relative to *https://gw.api.cloud.sphereon.com* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/java8-jersey2/pom.xml b/java8-jersey2/pom.xml index daeea9a..b36a43d 100644 --- a/java8-jersey2/pom.xml +++ b/java8-jersey2/pom.xml @@ -6,8 +6,10 @@ jar template-processor-sdk-java8-jersey2 0.1.1 + https://github.com/swagger-api/swagger-codegen + Swagger Java - scm:git:git@github.com:swagger-api/swagger-mustache.git + scm:git:git@github.com:swagger-api/swagger-codegen.git scm:git:git@github.com:swagger-api/swagger-codegen.git https://github.com/swagger-api/swagger-codegen @@ -15,6 +17,23 @@ 2.2.0 + + + Unlicense + http://www.apache.org/licenses/LICENSE-2.0 + repo + + + + + + Swagger + apiteam@swagger.io + Swagger + http://swagger.io + + + @@ -98,7 +117,7 @@ org.apache.maven.plugins maven-compiler-plugin - 2.5.1 + 3.6.1 1.8 1.8 @@ -108,9 +127,55 @@ org.apache.maven.plugins maven-javadoc-plugin 2.10.4 + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + + + + io.swagger @@ -157,12 +222,6 @@ ${jackson-version} - - - com.brsanthu - migbase64 - 2.2 - @@ -171,20 +230,11 @@ ${junit-version} test - - - - javax.activation - activation - 1.1.1 - test - - - 1.5.9 - 2.22.2 - 2.7.5 + 1.5.15 + 2.25.1 + 2.8.9 1.0.0 4.12 diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/AllApi.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/AllApi.java index e8eae74..ca80b96 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/AllApi.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/AllApi.java @@ -9,20 +9,21 @@ import com.sphereon.sdk.template_processor.model.DataSetResponse; import com.sphereon.sdk.template_processor.model.ErrorResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextRequest; +import java.io.File; import com.sphereon.sdk.template_processor.model.MergeJobResponse; -import com.sphereon.sdk.template_processor.model.OutputSettings; import com.sphereon.sdk.template_processor.model.MergeSettings; +import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.ResultStreamRequest; import com.sphereon.sdk.template_processor.model.TemplateContext; -import java.io.File; +import com.sphereon.sdk.template_processor.model.TemplateContextRequest; +import com.sphereon.sdk.template_processor.model.TemplateContextResponse; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class AllApi { private ApiClient apiClient; @@ -58,7 +59,7 @@ public DataSetResponse createDataSet(String payload) throws ApiException { } // create path and map variables - String localVarPath = "/template/processor/0.1/datasets".replaceAll("\\{format\\}","json"); + String localVarPath = "/template/processor/0.1/datasets"; // query params List localVarQueryParams = new ArrayList(); @@ -99,7 +100,7 @@ public TemplateContextResponse createTemplateContext(TemplateContextRequest temp } // create path and map variables - String localVarPath = "/template/processor/0.1/templates".replaceAll("\\{format\\}","json"); + String localVarPath = "/template/processor/0.1/templates"; // query params List localVarQueryParams = new ArrayList(); @@ -140,7 +141,7 @@ public DataSetResponse deleteDataSet(String dataSetId) throws ApiException { } // create path and map variables - String localVarPath = "/template/processor/0.1/datasets/{dataSetId}".replaceAll("\\{format\\}","json") + String localVarPath = "/template/processor/0.1/datasets/{dataSetId}" .replaceAll("\\{" + "dataSetId" + "\\}", apiClient.escapeString(dataSetId.toString())); // query params @@ -182,7 +183,7 @@ public MergeJobResponse deleteJob(String jobId) throws ApiException { } // create path and map variables - String localVarPath = "/template/processor/0.1/jobs/{jobId}".replaceAll("\\{format\\}","json") + String localVarPath = "/template/processor/0.1/jobs/{jobId}" .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); // query params @@ -224,7 +225,7 @@ public TemplateContextResponse deleteTemplateContext(String templateId) throws A } // create path and map variables - String localVarPath = "/template/processor/0.1/templates/{templateId}".replaceAll("\\{format\\}","json") + String localVarPath = "/template/processor/0.1/templates/{templateId}" .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); // query params @@ -266,7 +267,7 @@ public MergeJobResponse getJob(String jobId) throws ApiException { } // create path and map variables - String localVarPath = "/template/processor/0.1/jobs/{jobId}".replaceAll("\\{format\\}","json") + String localVarPath = "/template/processor/0.1/jobs/{jobId}" .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); // query params @@ -296,14 +297,14 @@ public MergeJobResponse getJob(String jobId) throws ApiException { * Get all jobs * Get all office text job definitions and their current state. * @param status A list of status to filter on. (optional) - * @return List + * @return List<MergeJobResponse> * @throws ApiException if fails to make API call */ public List getJobs(List status) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/template/processor/0.1/jobs".replaceAll("\\{format\\}","json"); + String localVarPath = "/template/processor/0.1/jobs"; // query params List localVarQueryParams = new ArrayList(); @@ -333,28 +334,26 @@ public List getJobs(List status) throws ApiException { * Get the result file * Get a merge result document as a binary stream. * @param jobId jobId (required) - * @param streamId streamId (required) - * @param outputSettings outputSettings (optional) + * @param resultStreamRequest resultStreamRequest (required) * @return byte[] * @throws ApiException if fails to make API call */ - public byte[] getResultStreamById(String jobId, String streamId, OutputSettings outputSettings) throws ApiException { - Object localVarPostBody = outputSettings; + public byte[] getResultStream(String jobId, ResultStreamRequest resultStreamRequest) throws ApiException { + Object localVarPostBody = resultStreamRequest; // verify the required parameter 'jobId' is set if (jobId == null) { - throw new ApiException(400, "Missing the required parameter 'jobId' when calling getResultStreamById"); + throw new ApiException(400, "Missing the required parameter 'jobId' when calling getResultStream"); } - // verify the required parameter 'streamId' is set - if (streamId == null) { - throw new ApiException(400, "Missing the required parameter 'streamId' when calling getResultStreamById"); + // verify the required parameter 'resultStreamRequest' is set + if (resultStreamRequest == null) { + throw new ApiException(400, "Missing the required parameter 'resultStreamRequest' when calling getResultStream"); } // create path and map variables - String localVarPath = "/template/processor/0.1/jobs/{jobId}/result/file/{streamId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())) - .replaceAll("\\{" + "streamId" + "\\}", apiClient.escapeString(streamId.toString())); + String localVarPath = "/template/processor/0.1/jobs/{jobId}/result/stream" + .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); // query params List localVarQueryParams = new ArrayList(); @@ -396,7 +395,7 @@ public byte[] getResultStreamsAsContainer(String jobId, OutputSettings outputSet } // create path and map variables - String localVarPath = "/template/processor/0.1/jobs/{jobId}/result/container".replaceAll("\\{format\\}","json") + String localVarPath = "/template/processor/0.1/jobs/{jobId}/result/container" .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); // query params @@ -438,7 +437,7 @@ public TemplateContextResponse getTemplateContext(String templateId) throws ApiE } // create path and map variables - String localVarPath = "/template/processor/0.1/templates/{templateId}".replaceAll("\\{format\\}","json") + String localVarPath = "/template/processor/0.1/templates/{templateId}" .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); // query params @@ -480,7 +479,7 @@ public MergeJobResponse submitJob(MergeSettings mergesettings) throws ApiExcepti } // create path and map variables - String localVarPath = "/template/processor/0.1/jobs".replaceAll("\\{format\\}","json"); + String localVarPath = "/template/processor/0.1/jobs"; // query params List localVarQueryParams = new ArrayList(); @@ -521,7 +520,7 @@ public TemplateContextResponse updateTemplateContext(TemplateContext templateCon } // create path and map variables - String localVarPath = "/template/processor/0.1/templates".replaceAll("\\{format\\}","json"); + String localVarPath = "/template/processor/0.1/templates"; // query params List localVarQueryParams = new ArrayList(); @@ -568,7 +567,7 @@ public TemplateContextResponse uploadTemplateFile(String templateId, File stream } // create path and map variables - String localVarPath = "/template/processor/0.1/templates/{templateId}".replaceAll("\\{format\\}","json") + String localVarPath = "/template/processor/0.1/templates/{templateId}" .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); // query params diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/DataSetApi.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/DataSetApi.java index c033219..8c07120 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/DataSetApi.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/DataSetApi.java @@ -15,7 +15,7 @@ import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class DataSetApi { private ApiClient apiClient; @@ -51,7 +51,7 @@ public DataSetResponse createDataSet(String payload) throws ApiException { } // create path and map variables - String localVarPath = "/template/processor/0.1/datasets".replaceAll("\\{format\\}","json"); + String localVarPath = "/template/processor/0.1/datasets"; // query params List localVarQueryParams = new ArrayList(); @@ -92,7 +92,7 @@ public DataSetResponse deleteDataSet(String dataSetId) throws ApiException { } // create path and map variables - String localVarPath = "/template/processor/0.1/datasets/{dataSetId}".replaceAll("\\{format\\}","json") + String localVarPath = "/template/processor/0.1/datasets/{dataSetId}" .replaceAll("\\{" + "dataSetId" + "\\}", apiClient.escapeString(dataSetId.toString())); // query params diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/JobApi.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/JobApi.java index 5c0eec0..aac41dd 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/JobApi.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/JobApi.java @@ -7,17 +7,18 @@ import javax.ws.rs.core.GenericType; -import com.sphereon.sdk.template_processor.model.MergeJobResponse; import com.sphereon.sdk.template_processor.model.ErrorResponse; -import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.MergeJobResponse; import com.sphereon.sdk.template_processor.model.MergeSettings; +import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.ResultStreamRequest; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class JobApi { private ApiClient apiClient; @@ -53,7 +54,7 @@ public MergeJobResponse getJob(String jobId) throws ApiException { } // create path and map variables - String localVarPath = "/template/processor/0.1/jobs/{jobId}".replaceAll("\\{format\\}","json") + String localVarPath = "/template/processor/0.1/jobs/{jobId}" .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); // query params @@ -83,14 +84,14 @@ public MergeJobResponse getJob(String jobId) throws ApiException { * Get all jobs * Get all office text job definitions and their current state. * @param status A list of status to filter on. (optional) - * @return List + * @return List<MergeJobResponse> * @throws ApiException if fails to make API call */ public List getJobs(List status) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/template/processor/0.1/jobs".replaceAll("\\{format\\}","json"); + String localVarPath = "/template/processor/0.1/jobs"; // query params List localVarQueryParams = new ArrayList(); @@ -120,28 +121,26 @@ public List getJobs(List status) throws ApiException { * Get the result file * Get a merge result document as a binary stream. * @param jobId jobId (required) - * @param streamId streamId (required) - * @param outputSettings outputSettings (optional) + * @param resultStreamRequest resultStreamRequest (required) * @return byte[] * @throws ApiException if fails to make API call */ - public byte[] getResultStreamById(String jobId, String streamId, OutputSettings outputSettings) throws ApiException { - Object localVarPostBody = outputSettings; + public byte[] getResultStream(String jobId, ResultStreamRequest resultStreamRequest) throws ApiException { + Object localVarPostBody = resultStreamRequest; // verify the required parameter 'jobId' is set if (jobId == null) { - throw new ApiException(400, "Missing the required parameter 'jobId' when calling getResultStreamById"); + throw new ApiException(400, "Missing the required parameter 'jobId' when calling getResultStream"); } - // verify the required parameter 'streamId' is set - if (streamId == null) { - throw new ApiException(400, "Missing the required parameter 'streamId' when calling getResultStreamById"); + // verify the required parameter 'resultStreamRequest' is set + if (resultStreamRequest == null) { + throw new ApiException(400, "Missing the required parameter 'resultStreamRequest' when calling getResultStream"); } // create path and map variables - String localVarPath = "/template/processor/0.1/jobs/{jobId}/result/file/{streamId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())) - .replaceAll("\\{" + "streamId" + "\\}", apiClient.escapeString(streamId.toString())); + String localVarPath = "/template/processor/0.1/jobs/{jobId}/result/stream" + .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); // query params List localVarQueryParams = new ArrayList(); @@ -183,7 +182,7 @@ public byte[] getResultStreamsAsContainer(String jobId, OutputSettings outputSet } // create path and map variables - String localVarPath = "/template/processor/0.1/jobs/{jobId}/result/container".replaceAll("\\{format\\}","json") + String localVarPath = "/template/processor/0.1/jobs/{jobId}/result/container" .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); // query params @@ -225,7 +224,7 @@ public MergeJobResponse submitJob(MergeSettings mergesettings) throws ApiExcepti } // create path and map variables - String localVarPath = "/template/processor/0.1/jobs".replaceAll("\\{format\\}","json"); + String localVarPath = "/template/processor/0.1/jobs"; // query params List localVarQueryParams = new ArrayList(); diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/MergeApi.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/MergeApi.java deleted file mode 100644 index 8aa9a60..0000000 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/MergeApi.java +++ /dev/null @@ -1,598 +0,0 @@ -package com.sphereon.sdk.template_processor.api; - -import com.sphereon.sdk.template_processor.handler.ApiException; -import com.sphereon.sdk.template_processor.handler.ApiClient; -import com.sphereon.sdk.template_processor.handler.Configuration; -import com.sphereon.sdk.template_processor.handler.Pair; - -import javax.ws.rs.core.GenericType; - -import com.sphereon.sdk.template_processor.model.DataSetResponse; -import com.sphereon.sdk.template_processor.model.ErrorResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextRequest; -import com.sphereon.sdk.template_processor.model.MergeJobResponse; -import com.sphereon.sdk.template_processor.model.OutputSettings; -import com.sphereon.sdk.template_processor.model.MergeSettings; -import java.io.File; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-17T15:33:23.033+02:00") -public class MergeApi { - private ApiClient apiClient; - - public MergeApi() { - this(Configuration.getDefaultApiClient()); - } - - public MergeApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - public ApiClient getApiClient() { - return apiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Store dataset - * Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - * @param payload The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] (required) - * @return DataSetResponse - * @throws ApiException if fails to make API call - */ - public DataSetResponse createDataSet(String payload) throws ApiException { - Object localVarPostBody = payload; - - // verify the required parameter 'payload' is set - if (payload == null) { - throw new ApiException(400, "Missing the required parameter 'payload' when calling createDataSet"); - } - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/datasets".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - final String[] localVarAccepts = { - "application/json;charset=UTF-8" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json;charset=UTF-8" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * Create template context - * Create a unique template context for your environment - * @param templateRequest The template request (required) - * @return TemplateContextResponse - * @throws ApiException if fails to make API call - */ - public TemplateContextResponse createTemplateContext(TemplateContextRequest templateRequest) throws ApiException { - Object localVarPostBody = templateRequest; - - // verify the required parameter 'templateRequest' is set - if (templateRequest == null) { - throw new ApiException(400, "Missing the required parameter 'templateRequest' when calling createTemplateContext"); - } - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/templates".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - final String[] localVarAccepts = { - "application/json;charset=UTF-8" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json;charset=UTF-8" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * Delete a stored data set - * Delete a stored data set - * @param dataSetId dataSetId (required) - * @return DataSetResponse - * @throws ApiException if fails to make API call - */ - public DataSetResponse deleteDataSet(String dataSetId) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'dataSetId' is set - if (dataSetId == null) { - throw new ApiException(400, "Missing the required parameter 'dataSetId' when calling deleteDataSet"); - } - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/datasets/{dataSetId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "dataSetId" + "\\}", apiClient.escapeString(dataSetId.toString())); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - final String[] localVarAccepts = { - "application/json;charset=UTF-8" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * Delete a job manually - * Delete the merge job and all related files - * @param jobId jobId (required) - * @return MergeJobResponse - * @throws ApiException if fails to make API call - */ - public MergeJobResponse deleteJob(String jobId) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'jobId' is set - if (jobId == null) { - throw new ApiException(400, "Missing the required parameter 'jobId' when calling deleteJob"); - } - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/jobs/{jobId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - final String[] localVarAccepts = { - "application/json;charset=UTF-8" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * Delete template context - * Delete a template context with all history - * @param templateId templateId (required) - * @return TemplateContextResponse - * @throws ApiException if fails to make API call - */ - public TemplateContextResponse deleteTemplateContext(String templateId) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'templateId' is set - if (templateId == null) { - throw new ApiException(400, "Missing the required parameter 'templateId' when calling deleteTemplateContext"); - } - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/templates/{templateId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - final String[] localVarAccepts = { - "application/json;charset=UTF-8" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * Job definition and state - * Get the merge job definition and current state. Please not that you can differentiate based on http response status - * @param jobId jobId (required) - * @return MergeJobResponse - * @throws ApiException if fails to make API call - */ - public MergeJobResponse getJob(String jobId) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'jobId' is set - if (jobId == null) { - throw new ApiException(400, "Missing the required parameter 'jobId' when calling getJob"); - } - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/jobs/{jobId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - final String[] localVarAccepts = { - "application/json;charset=UTF-8" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * Get all jobs - * Get all office text job definitions and their current state. - * @param status A list of status to filter on. (optional) - * @return List - * @throws ApiException if fails to make API call - */ - public List getJobs(List status) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/jobs".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "status", status)); - - - - final String[] localVarAccepts = { - "application/json;charset=UTF-8" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - - GenericType> localVarReturnType = new GenericType>() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * Get the result file - * Get a merge result document as a binary stream. - * @param jobId jobId (required) - * @param streamId streamId (required) - * @param outputSettings outputSettings (optional) - * @return byte[] - * @throws ApiException if fails to make API call - */ - public byte[] getResultStreamById(String jobId, String streamId, OutputSettings outputSettings) throws ApiException { - Object localVarPostBody = outputSettings; - - // verify the required parameter 'jobId' is set - if (jobId == null) { - throw new ApiException(400, "Missing the required parameter 'jobId' when calling getResultStreamById"); - } - - // verify the required parameter 'streamId' is set - if (streamId == null) { - throw new ApiException(400, "Missing the required parameter 'streamId' when calling getResultStreamById"); - } - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())) - .replaceAll("\\{" + "streamId" + "\\}", apiClient.escapeString(streamId.toString())); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - final String[] localVarAccepts = { - "application/octet-stream" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json;charset=UTF-8" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * Get the result file - * Get all documents inside a compressed container as a binary stream. - * @param jobId jobId (required) - * @param outputSettings outputSettings (optional) - * @return byte[] - * @throws ApiException if fails to make API call - */ - public byte[] getResultStreamsAsContainer(String jobId, OutputSettings outputSettings) throws ApiException { - Object localVarPostBody = outputSettings; - - // verify the required parameter 'jobId' is set - if (jobId == null) { - throw new ApiException(400, "Missing the required parameter 'jobId' when calling getResultStreamsAsContainer"); - } - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/jobs/{jobId}/result/container".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - final String[] localVarAccepts = { - "application/octet-stream" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json;charset=UTF-8" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * Get template context - * Get an existing template context - * @param templateId The template context name unique for your environment (required) - * @return TemplateContextResponse - * @throws ApiException if fails to make API call - */ - public TemplateContextResponse getTemplateContext(String templateId) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'templateId' is set - if (templateId == null) { - throw new ApiException(400, "Missing the required parameter 'templateId' when calling getTemplateContext"); - } - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/templates/{templateId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - final String[] localVarAccepts = { - "application/json;charset=UTF-8" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * Submit merge job for processing - * Submit merge job run. - * @param mergesettings The merge- and output settings (required) - * @return MergeJobResponse - * @throws ApiException if fails to make API call - */ - public MergeJobResponse submitJob(MergeSettings mergesettings) throws ApiException { - Object localVarPostBody = mergesettings; - - // verify the required parameter 'mergesettings' is set - if (mergesettings == null) { - throw new ApiException(400, "Missing the required parameter 'mergesettings' when calling submitJob"); - } - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/jobs".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - final String[] localVarAccepts = { - "application/json;charset=UTF-8" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json;charset=UTF-8" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * Update template context - * Update an existing template context for your environment - * @param templateContextRequest templateContextRequest (required) - * @return TemplateContextResponse - * @throws ApiException if fails to make API call - */ - public TemplateContextResponse updateTemplateContext(TemplateContextRequest templateContextRequest) throws ApiException { - Object localVarPostBody = templateContextRequest; - - // verify the required parameter 'templateContextRequest' is set - if (templateContextRequest == null) { - throw new ApiException(400, "Missing the required parameter 'templateContextRequest' when calling updateTemplateContext"); - } - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/templates".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - final String[] localVarAccepts = { - "application/json;charset=UTF-8" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json;charset=UTF-8" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * Upload template file - * Upload the Office template file - * @param templateId The template context name unique for your environment (required) - * @param stream The template (file/inputstream) to store (required) - * @return TemplateContextResponse - * @throws ApiException if fails to make API call - */ - public TemplateContextResponse uploadTemplateFile(String templateId, File stream) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'templateId' is set - if (templateId == null) { - throw new ApiException(400, "Missing the required parameter 'templateId' when calling uploadTemplateFile"); - } - - // verify the required parameter 'stream' is set - if (stream == null) { - throw new ApiException(400, "Missing the required parameter 'stream' when calling uploadTemplateFile"); - } - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/templates/{templateId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - if (stream != null) - localVarFormParams.put("stream", stream); - - final String[] localVarAccepts = { - "application/json;charset=UTF-8" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "multipart/form-data" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } -} diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/TemplateApi.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/TemplateApi.java index c1c3148..fd0915e 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/TemplateApi.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/TemplateApi.java @@ -7,18 +7,18 @@ import javax.ws.rs.core.GenericType; -import com.sphereon.sdk.template_processor.model.TemplateContextResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextRequest; import com.sphereon.sdk.template_processor.model.ErrorResponse; -import com.sphereon.sdk.template_processor.model.TemplateContext; import java.io.File; +import com.sphereon.sdk.template_processor.model.TemplateContext; +import com.sphereon.sdk.template_processor.model.TemplateContextRequest; +import com.sphereon.sdk.template_processor.model.TemplateContextResponse; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class TemplateApi { private ApiClient apiClient; @@ -54,7 +54,7 @@ public TemplateContextResponse createTemplateContext(TemplateContextRequest temp } // create path and map variables - String localVarPath = "/template/processor/0.1/templates".replaceAll("\\{format\\}","json"); + String localVarPath = "/template/processor/0.1/templates"; // query params List localVarQueryParams = new ArrayList(); @@ -95,7 +95,7 @@ public TemplateContextResponse deleteTemplateContext(String templateId) throws A } // create path and map variables - String localVarPath = "/template/processor/0.1/templates/{templateId}".replaceAll("\\{format\\}","json") + String localVarPath = "/template/processor/0.1/templates/{templateId}" .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); // query params @@ -137,7 +137,7 @@ public TemplateContextResponse getTemplateContext(String templateId) throws ApiE } // create path and map variables - String localVarPath = "/template/processor/0.1/templates/{templateId}".replaceAll("\\{format\\}","json") + String localVarPath = "/template/processor/0.1/templates/{templateId}" .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); // query params @@ -179,7 +179,7 @@ public TemplateContextResponse updateTemplateContext(TemplateContext templateCon } // create path and map variables - String localVarPath = "/template/processor/0.1/templates".replaceAll("\\{format\\}","json"); + String localVarPath = "/template/processor/0.1/templates"; // query params List localVarQueryParams = new ArrayList(); @@ -226,7 +226,7 @@ public TemplateContextResponse uploadTemplateFile(String templateId, File stream } // create path and map variables - String localVarPath = "/template/processor/0.1/templates/{templateId}".replaceAll("\\{format\\}","json") + String localVarPath = "/template/processor/0.1/templates/{templateId}" .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); // query params diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java index 51aa1b3..49a2135 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java @@ -24,6 +24,7 @@ import java.io.InputStream; import java.nio.file.Files; +import java.nio.file.StandardCopyOption; import java.util.Collection; import java.util.Collections; import java.util.Map; @@ -48,10 +49,10 @@ import com.sphereon.sdk.template_processor.handler.auth.ApiKeyAuth; import com.sphereon.sdk.template_processor.handler.auth.OAuth; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class ApiClient { private Map defaultHeaderMap = new HashMap(); - private String basePath = "https://gw.api.cloud.sphereon.com/"; + private String basePath = "https://gw.api.cloud.sphereon.com"; private boolean debugging = false; private int connectionTimeout = 0; @@ -73,7 +74,7 @@ public ApiClient() { this.dateFormat = new RFC3339DateFormat(); // Set default User-Agent. - setUserAgent("Swagger-Codegen/0.1.0/java"); + setUserAgent("Swagger-Codegen/0.1.1/java"); // Setup authentications (key: authentication name, value: authentication). authentications = new HashMap(); @@ -84,6 +85,7 @@ public ApiClient() { /** * Gets the JSON instance to do JSON serialization and deserialization. + * @return JSON */ public JSON getJSON() { return json; @@ -109,6 +111,7 @@ public ApiClient setBasePath(String basePath) { /** * Gets the status code of the previous request + * @return Status code */ public int getStatusCode() { return statusCode; @@ -116,6 +119,7 @@ public int getStatusCode() { /** * Gets the response headers of the previous request + * @return Response headers */ public Map> getResponseHeaders() { return responseHeaders; @@ -123,6 +127,7 @@ public Map> getResponseHeaders() { /** * Get authentications (key: authentication name, value: authentication). + * @return Map of authentication object */ public Map getAuthentications() { return authentications; @@ -140,6 +145,7 @@ public Authentication getAuthentication(String authName) { /** * Helper method to set username for the first HTTP basic authentication. + * @param username Username */ public void setUsername(String username) { for (Authentication auth : authentications.values()) { @@ -153,6 +159,7 @@ public void setUsername(String username) { /** * Helper method to set password for the first HTTP basic authentication. + * @param password Password */ public void setPassword(String password) { for (Authentication auth : authentications.values()) { @@ -166,6 +173,7 @@ public void setPassword(String password) { /** * Helper method to set API key value for the first API key authentication. + * @param apiKey API key */ public void setApiKey(String apiKey) { for (Authentication auth : authentications.values()) { @@ -179,6 +187,7 @@ public void setApiKey(String apiKey) { /** * Helper method to set API key prefix for the first API key authentication. + * @param apiKeyPrefix API key prefix */ public void setApiKeyPrefix(String apiKeyPrefix) { for (Authentication auth : authentications.values()) { @@ -192,6 +201,7 @@ public void setApiKeyPrefix(String apiKeyPrefix) { /** * Helper method to set access token for the first OAuth2 authentication. + * @param accessToken Access token */ public void setAccessToken(String accessToken) { for (Authentication auth : authentications.values()) { @@ -205,6 +215,8 @@ public void setAccessToken(String accessToken) { /** * Set the User-Agent header's value (by adding to the default header map). + * @param userAgent Http user agent + * @return API client */ public ApiClient setUserAgent(String userAgent) { addDefaultHeader("User-Agent", userAgent); @@ -216,6 +228,7 @@ public ApiClient setUserAgent(String userAgent) { * * @param key The header's key * @param value The header's value + * @return API client */ public ApiClient addDefaultHeader(String key, String value) { defaultHeaderMap.put(key, value); @@ -224,6 +237,7 @@ public ApiClient addDefaultHeader(String key, String value) { /** * Check that whether debugging is enabled for this API client. + * @return True if debugging is switched on */ public boolean isDebugging() { return debugging; @@ -233,6 +247,7 @@ public boolean isDebugging() { * Enable/disable debugging for this API client. * * @param debugging To enable (true) or disable (false) debugging + * @return API client */ public ApiClient setDebugging(boolean debugging) { this.debugging = debugging; @@ -246,12 +261,17 @@ public ApiClient setDebugging(boolean debugging) { * with file response. The default value is null, i.e. using * the system's default tempopary folder. * - * @see https://docs.oracle.com/javase/7/docs/api/java/io/File.html#createTempFile(java.lang.String,%20java.lang.String,%20java.io.File) + * @return Temp folder path */ public String getTempFolderPath() { return tempFolderPath; } + /** + * Set temp folder path + * @param tempFolderPath Temp folder path + * @return API client + */ public ApiClient setTempFolderPath(String tempFolderPath) { this.tempFolderPath = tempFolderPath; return this; @@ -259,6 +279,7 @@ public ApiClient setTempFolderPath(String tempFolderPath) { /** * Connect timeout (in milliseconds). + * @return Connection timeout */ public int getConnectTimeout() { return connectionTimeout; @@ -268,6 +289,8 @@ public int getConnectTimeout() { * Set the connect timeout (in milliseconds). * A value of 0 means no timeout, otherwise values must be between 1 and * {@link Integer#MAX_VALUE}. + * @param connectionTimeout Connection timeout in milliseconds + * @return API client */ public ApiClient setConnectTimeout(int connectionTimeout) { this.connectionTimeout = connectionTimeout; @@ -277,6 +300,7 @@ public ApiClient setConnectTimeout(int connectionTimeout) { /** * Get the date format used to parse/format date parameters. + * @return Date format */ public DateFormat getDateFormat() { return dateFormat; @@ -284,6 +308,8 @@ public DateFormat getDateFormat() { /** * Set the date format used to parse/format date parameters. + * @param dateFormat Date format + * @return API client */ public ApiClient setDateFormat(DateFormat dateFormat) { this.dateFormat = dateFormat; @@ -294,6 +320,8 @@ public ApiClient setDateFormat(DateFormat dateFormat) { /** * Parse the given string into Date object. + * @param str String + * @return Date */ public Date parseDate(String str) { try { @@ -305,6 +333,8 @@ public Date parseDate(String str) { /** * Format the given Date object into string. + * @param date Date + * @return Date in string format */ public String formatDate(Date date) { return dateFormat.format(date); @@ -312,6 +342,8 @@ public String formatDate(Date date) { /** * Format the given parameter object into string. + * @param param Object + * @return Object in string format */ public String parameterToString(Object param) { if (param == null) { @@ -322,7 +354,7 @@ public String parameterToString(Object param) { StringBuilder b = new StringBuilder(); for(Object o : (Collection)param) { if(b.length() > 0) { - b.append(","); + b.append(','); } b.append(String.valueOf(o)); } @@ -333,15 +365,19 @@ public String parameterToString(Object param) { } /* - Format to {@code Pair} objects. - */ + * Format to {@code Pair} objects. + * @param collectionFormat Collection format + * @param name Name + * @param value Value + * @return List of pairs + */ public List parameterToPairs(String collectionFormat, String name, Object value){ List params = new ArrayList(); // preconditions if (name == null || name.isEmpty() || value == null) return params; - Collection valueCollection = null; + Collection valueCollection; if (value instanceof Collection) { valueCollection = (Collection) value; } else { @@ -353,11 +389,11 @@ public List parameterToPairs(String collectionFormat, String name, Object return params; } - // get the collection format - collectionFormat = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat); // default: csv + // get the collection format (default: csv) + String format = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat); // create the params based on the collection format - if (collectionFormat.equals("multi")) { + if ("multi".equals(format)) { for (Object item : valueCollection) { params.add(new Pair(name, parameterToString(item))); } @@ -367,13 +403,13 @@ public List parameterToPairs(String collectionFormat, String name, Object String delimiter = ","; - if (collectionFormat.equals("csv")) { + if ("csv".equals(format)) { delimiter = ","; - } else if (collectionFormat.equals("ssv")) { + } else if ("ssv".equals(format)) { delimiter = " "; - } else if (collectionFormat.equals("tsv")) { + } else if ("tsv".equals(format)) { delimiter = "\t"; - } else if (collectionFormat.equals("pipes")) { + } else if ("pipes".equals(format)) { delimiter = "|"; } @@ -394,9 +430,13 @@ public List parameterToPairs(String collectionFormat, String name, Object * application/json * application/json; charset=UTF8 * APPLICATION/JSON + * application/vnd.company+json + * @param mime MIME + * @return True if the MIME type is JSON */ public boolean isJsonMime(String mime) { - return mime != null && mime.matches("(?i)application\\/json(;.*)?"); + String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"; + return mime != null && (mime.matches(jsonMime) || mime.equalsIgnoreCase("application/json-patch+json")); } /** @@ -443,6 +483,8 @@ public String selectHeaderContentType(String[] contentTypes) { /** * Escape the given string to be used as URL query value. + * @param str String + * @return Escaped string */ public String escapeString(String str) { try { @@ -455,9 +497,14 @@ public String escapeString(String str) { /** * Serialize the given Java object into string entity according the given * Content-Type (only JSON is supported for now). + * @param obj Object + * @param formParams Form parameters + * @param contentType Context type + * @return Entity + * @throws ApiException API exception */ public Entity serialize(Object obj, Map formParams, String contentType) throws ApiException { - Entity entity = null; + Entity entity; if (contentType.startsWith("multipart/form-data")) { MultiPart multiPart = new MultiPart(); for (Entry param: formParams.entrySet()) { @@ -487,7 +534,13 @@ public Entity serialize(Object obj, Map formParams, String co /** * Deserialize response body to Java object according to the Content-Type. + * @param Type + * @param response Response + * @param returnType Return type + * @return Deserialize object + * @throws ApiException API exception */ + @SuppressWarnings("unchecked") public T deserialize(Response response, GenericType returnType) throws ApiException { if (response == null || returnType == null) { return null; @@ -496,9 +549,8 @@ public T deserialize(Response response, GenericType returnType) throws Ap if ("byte[]".equals(returnType.toString())) { // Handle binary response (byte array). return (T) response.readEntity(byte[].class); - } else if (returnType.equals(File.class)) { + } else if (returnType.getRawType() == File.class) { // Handle file downloading. - @SuppressWarnings("unchecked") T file = (T) downloadFileFromResponse(response); return file; } @@ -515,12 +567,14 @@ public T deserialize(Response response, GenericType returnType) throws Ap /** * Download file from the given response. + * @param response Response + * @return File * @throws ApiException If fail to read file content from response and write to disk */ public File downloadFileFromResponse(Response response) throws ApiException { try { File file = prepareDownloadFile(response); - Files.copy(response.readEntity(InputStream.class), file.toPath()); + Files.copy(response.readEntity(InputStream.class), file.toPath(), StandardCopyOption.REPLACE_EXISTING); return file; } catch (IOException e) { throw new ApiException(e); @@ -538,13 +592,13 @@ public File prepareDownloadFile(Response response) throws IOException { filename = matcher.group(1); } - String prefix = null; + String prefix; String suffix = null; if (filename == null) { prefix = "download-"; suffix = ""; } else { - int pos = filename.lastIndexOf("."); + int pos = filename.lastIndexOf('.'); if (pos == -1) { prefix = filename + "-"; } else { @@ -565,6 +619,7 @@ public File prepareDownloadFile(Response response) throws IOException { /** * Invoke API by sending HTTP request with the given options. * + * @param Type * @param path The sub-path of the HTTP URL * @param method The request method, one of "GET", "POST", "PUT", and "DELETE" * @param queryParams The query parameters @@ -576,6 +631,7 @@ public File prepareDownloadFile(Response response) throws IOException { * @param authNames The authentications to apply * @param returnType The return type into which to deserialize the response * @return The response body in type of string + * @throws ApiException API exception */ public T invokeAPI(String path, String method, List queryParams, Object body, Map headerParams, Map formParams, String accept, String contentType, String[] authNames, GenericType returnType) throws ApiException { updateParamsForAuth(authNames, queryParams, headerParams); @@ -594,16 +650,17 @@ public T invokeAPI(String path, String method, List queryParams, Objec Invocation.Builder invocationBuilder = target.request().accept(accept); - for (String key : headerParams.keySet()) { - String value = headerParams.get(key); + for (Entry entry : headerParams.entrySet()) { + String value = entry.getValue(); if (value != null) { - invocationBuilder = invocationBuilder.header(key, value); + invocationBuilder = invocationBuilder.header(entry.getKey(), value); } } - for (String key : defaultHeaderMap.keySet()) { + for (Entry entry : defaultHeaderMap.entrySet()) { + String key = entry.getKey(); if (!headerParams.containsKey(key)) { - String value = defaultHeaderMap.get(key); + String value = entry.getValue(); if (value != null) { invocationBuilder = invocationBuilder.header(key, value); } @@ -614,51 +671,61 @@ public T invokeAPI(String path, String method, List queryParams, Objec Response response = null; - if ("GET".equals(method)) { - response = invocationBuilder.get(); - } else if ("POST".equals(method)) { - response = invocationBuilder.post(entity); - } else if ("PUT".equals(method)) { - response = invocationBuilder.put(entity); - } else if ("DELETE".equals(method)) { - response = invocationBuilder.delete(); - } else if ("PATCH".equals(method)) { - response = invocationBuilder.header("X-HTTP-Method-Override", "PATCH").post(entity); - } else { - throw new ApiException(500, "unknown method type " + method); - } + try { + if ("GET".equals(method)) { + response = invocationBuilder.get(); + } else if ("POST".equals(method)) { + response = invocationBuilder.post(entity); + } else if ("PUT".equals(method)) { + response = invocationBuilder.put(entity); + } else if ("DELETE".equals(method)) { + response = invocationBuilder.delete(); + } else if ("PATCH".equals(method)) { + response = invocationBuilder.header("X-HTTP-Method-Override", "PATCH").post(entity); + } else { + throw new ApiException(500, "unknown method type " + method); + } - statusCode = response.getStatusInfo().getStatusCode(); - responseHeaders = buildResponseHeaders(response); + statusCode = response.getStatusInfo().getStatusCode(); + responseHeaders = buildResponseHeaders(response); - if (response.getStatus() == Status.NO_CONTENT.getStatusCode()) { - return null; - } else if (response.getStatusInfo().getFamily().equals(Status.Family.SUCCESSFUL)) { - if (returnType == null) + if (response.getStatus() == Status.NO_CONTENT.getStatusCode()) { return null; - else - return deserialize(response, returnType); - } else { - String message = "error"; - String respBody = null; - if (response.hasEntity()) { - try { - respBody = String.valueOf(response.readEntity(String.class)); - message = respBody; - } catch (RuntimeException e) { - // e.printStackTrace(); + } else if (response.getStatusInfo().getFamily() == Status.Family.SUCCESSFUL) { + if (returnType == null) + return null; + else + return deserialize(response, returnType); + } else { + String message = "error"; + String respBody = null; + if (response.hasEntity()) { + try { + respBody = String.valueOf(response.readEntity(String.class)); + message = respBody; + } catch (RuntimeException e) { + // e.printStackTrace(); + } } + throw new ApiException( + response.getStatus(), + message, + buildResponseHeaders(response), + respBody); + } + } finally { + try { + response.close(); + } catch (Exception e) { + // it's not critical, since the response object is local in method invokeAPI; that's fine, just continue } - throw new ApiException( - response.getStatus(), - message, - buildResponseHeaders(response), - respBody); } } /** * Build the Client used to make HTTP requests. + * @param debugging Debug setting + * @return Client */ private Client buildHttpClient(boolean debugging) { final ClientConfig clientConfig = new ClientConfig(); @@ -666,7 +733,7 @@ private Client buildHttpClient(boolean debugging) { clientConfig.register(json); clientConfig.register(JacksonFeature.class); if (debugging) { - clientConfig.register(LoggingFilter.class); + clientConfig.register(new LoggingFilter(java.util.logging.Logger.getLogger(LoggingFilter.class.getName()), true)); } return ClientBuilder.newClient(clientConfig); } diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiException.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiException.java index 396382f..248bd04 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiException.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiException.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -28,7 +16,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/Configuration.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/Configuration.java index 048d9c7..5411dda 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/Configuration.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/Configuration.java @@ -8,24 +8,12 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.handler; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class Configuration { private static ApiClient defaultApiClient = new ApiClient(); diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/JSON.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/JSON.java index 662ddbf..41e904d 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/JSON.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/JSON.java @@ -8,7 +8,7 @@ import javax.ws.rs.ext.ContextResolver; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class JSON implements ContextResolver { private ObjectMapper mapper; @@ -16,6 +16,7 @@ public JSON() { mapper = new ObjectMapper(); mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); @@ -25,6 +26,7 @@ public JSON() { /** * Set the date format for JSON (de)serialization with Date properties. + * @param dateFormat Date format */ public void setDateFormat(DateFormat dateFormat) { mapper.setDateFormat(dateFormat); diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/Pair.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/Pair.java index 3a16ddf..9c3faae 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/Pair.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/Pair.java @@ -8,24 +8,12 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.handler; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class Pair { private String name = ""; private String value = ""; diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/RFC3339DateFormat.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/RFC3339DateFormat.java index f4ce568..787516c 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/RFC3339DateFormat.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/RFC3339DateFormat.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.handler; diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java index 79477bc..3f6397b 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java @@ -8,24 +8,12 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.handler; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java index 1ea9fd8..a57668b 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -30,7 +18,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/Authentication.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/Authentication.java index d56d856..88bb6e4 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/Authentication.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/Authentication.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/HttpBasicAuth.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/HttpBasicAuth.java index 6c6a599..378a6d3 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/HttpBasicAuth.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/HttpBasicAuth.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -27,14 +15,14 @@ import com.sphereon.sdk.template_processor.handler.Pair; -import com.migcomponents.migbase64.Base64; +import java.util.Base64; +import java.nio.charset.StandardCharsets; import java.util.Map; import java.util.List; -import java.io.UnsupportedEncodingException; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class HttpBasicAuth implements Authentication { private String username; private String password; @@ -61,10 +49,6 @@ public void applyToParams(List queryParams, Map headerPara return; } String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); - try { - headerParams.put("Authorization", "Basic " + Base64.encodeToString(str.getBytes("UTF-8"), false)); - } catch (UnsupportedEncodingException e) { - throw new RuntimeException(e); - } + headerParams.put("Authorization", "Basic " + Base64.getEncoder().encodeToString(str.getBytes(StandardCharsets.UTF_8))); } } diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java index 0b69769..c1d666b 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -30,7 +18,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class OAuth implements Authentication { private String accessToken; diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java index 6444940..803a482 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java index accc219..fa03011 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -28,6 +16,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; @@ -36,7 +25,7 @@ * The merge template response. */ @ApiModel(description = "The merge template response.") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class DataSetResponse { @JsonProperty("completionTime") private OffsetDateTime completionTime = null; @@ -63,6 +52,11 @@ public enum StatusEnum { this.value = value; } + @JsonValue + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); @@ -86,7 +80,7 @@ public static StatusEnum fromValue(String text) { * The completion date/time of this template in ISO 8601 format * @return completionTime **/ - @ApiModelProperty(example = "null", value = "The completion date/time of this template in ISO 8601 format") + @ApiModelProperty(value = "The completion date/time of this template in ISO 8601 format") public OffsetDateTime getCompletionTime() { return completionTime; } @@ -95,7 +89,7 @@ public OffsetDateTime getCompletionTime() { * The creation date/time of this template in ISO 8601 format * @return creationTime **/ - @ApiModelProperty(example = "null", value = "The creation date/time of this template in ISO 8601 format") + @ApiModelProperty(value = "The creation date/time of this template in ISO 8601 format") public OffsetDateTime getCreationTime() { return creationTime; } @@ -109,7 +103,7 @@ public DataSetResponse id(String id) { * Unique dataset id * @return id **/ - @ApiModelProperty(example = "null", required = true, value = "Unique dataset id") + @ApiModelProperty(required = true, value = "Unique dataset id") public String getId() { return id; } @@ -122,7 +116,7 @@ public void setId(String id) { * The status of the template * @return status **/ - @ApiModelProperty(example = "null", required = true, value = "The status of the template") + @ApiModelProperty(required = true, value = "The status of the template") public StatusEnum getStatus() { return status; } diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/Error.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/Error.java index 2acd140..85e142f 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/Error.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/Error.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -28,6 +16,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import com.sphereon.sdk.template_processor.model.Error; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -36,7 +25,7 @@ * An error */ @ApiModel(description = "An error") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class Error { @JsonProperty("code") private String code = null; @@ -57,6 +46,11 @@ public enum LevelEnum { this.value = value; } + @JsonValue + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); @@ -91,7 +85,7 @@ public Error code(String code) { * Get code * @return code **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") public String getCode() { return code; } @@ -109,7 +103,7 @@ public Error level(LevelEnum level) { * Get level * @return level **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") public LevelEnum getLevel() { return level; } @@ -127,7 +121,7 @@ public Error cause(Error cause) { * Get cause * @return cause **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Error getCause() { return cause; } @@ -145,7 +139,7 @@ public Error message(String message) { * Get message * @return message **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") public String getMessage() { return message; } diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java index 3cc3efb..dbca5e0 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -28,6 +16,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import com.sphereon.sdk.template_processor.model.Error; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -38,10 +27,10 @@ * The error response */ @ApiModel(description = "The error response") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class ErrorResponse { @JsonProperty("errors") - private List errors = new ArrayList(); + private List errors = null; public ErrorResponse errors(List errors) { this.errors = errors; @@ -49,6 +38,9 @@ public ErrorResponse errors(List errors) { } public ErrorResponse addErrorsItem(Error errorsItem) { + if (this.errors == null) { + this.errors = new ArrayList(); + } this.errors.add(errorsItem); return this; } @@ -57,7 +49,7 @@ public ErrorResponse addErrorsItem(Error errorsItem) { * Get errors * @return errors **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public List getErrors() { return errors; } diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java index e09af1e..88db727 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -28,6 +16,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime; @@ -36,7 +25,7 @@ * Lifecycle settings. When no lifecycle settings are supplied, the job and files will be deleted directly after retrieval of the file */ @ApiModel(description = "Lifecycle settings. When no lifecycle settings are supplied, the job and files will be deleted directly after retrieval of the file") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class Lifecycle { @JsonProperty("actionTime") private OffsetDateTime actionTime = null; @@ -53,6 +42,11 @@ public enum ActionEnum { this.value = value; } + @JsonValue + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); @@ -86,6 +80,11 @@ public enum TypeEnum { this.value = value; } + @JsonValue + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); @@ -114,7 +113,7 @@ public Lifecycle actionTime(OffsetDateTime actionTime) { * The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation * @return actionTime **/ - @ApiModelProperty(example = "null", value = "The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation") + @ApiModelProperty(value = "The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation") public OffsetDateTime getActionTime() { return actionTime; } @@ -132,7 +131,7 @@ public Lifecycle action(ActionEnum action) { * Get action * @return action **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public ActionEnum getAction() { return action; } @@ -150,7 +149,7 @@ public Lifecycle type(TypeEnum type) { * Get type * @return type **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public TypeEnum getType() { return type; } diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java index 9faa148..64fd4b7 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -28,6 +16,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import com.sphereon.sdk.template_processor.model.MergeSettings; import com.sphereon.sdk.template_processor.model.StorageLocation; import com.sphereon.sdk.template_processor.model.StreamLocation; @@ -41,7 +30,7 @@ * The merge job. Has access to the job merge data. */ @ApiModel(description = "The merge job. Has access to the job merge data.") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class MergeJob { @JsonProperty("completionTime") private OffsetDateTime completionTime = null; @@ -59,7 +48,7 @@ public class MergeJob { private List resultStreams = new ArrayList(); @JsonProperty("headerDataSetIds") - private List headerDataSetIds = new ArrayList(); + private List headerDataSetIds = null; @JsonProperty("resultStorageLocation") private StorageLocation resultStorageLocation = null; @@ -92,6 +81,11 @@ public enum StatusEnum { this.value = value; } + @JsonValue + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); @@ -115,7 +109,7 @@ public static StatusEnum fromValue(String text) { * The completion date/time of this job in ISO 8601 format * @return completionTime **/ - @ApiModelProperty(example = "null", value = "The completion date/time of this job in ISO 8601 format") + @ApiModelProperty(value = "The completion date/time of this job in ISO 8601 format") public OffsetDateTime getCompletionTime() { return completionTime; } @@ -129,7 +123,7 @@ public MergeJob jobId(String jobId) { * The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation * @return jobId **/ - @ApiModelProperty(example = "null", required = true, value = "The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation") + @ApiModelProperty(required = true, value = "The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation") public String getJobId() { return jobId; } @@ -142,7 +136,7 @@ public void setJobId(String jobId) { * The creation date/time of this job in ISO 8601 format * @return creationTime **/ - @ApiModelProperty(example = "null", value = "The creation date/time of this job in ISO 8601 format") + @ApiModelProperty(value = "The creation date/time of this job in ISO 8601 format") public OffsetDateTime getCreationTime() { return creationTime; } @@ -156,7 +150,7 @@ public MergeJob dataSetId(String dataSetId) { * Data set id * @return dataSetId **/ - @ApiModelProperty(example = "null", value = "Data set id") + @ApiModelProperty(value = "Data set id") public String getDataSetId() { return dataSetId; } @@ -179,7 +173,7 @@ public MergeJob addResultStreamsItem(StreamLocation resultStreamsItem) { * The storage locations of the result files. * @return resultStreams **/ - @ApiModelProperty(example = "null", required = true, value = "The storage locations of the result files.") + @ApiModelProperty(required = true, value = "The storage locations of the result files.") public List getResultStreams() { return resultStreams; } @@ -194,6 +188,9 @@ public MergeJob headerDataSetIds(List headerDataSetIds) { } public MergeJob addHeaderDataSetIdsItem(String headerDataSetIdsItem) { + if (this.headerDataSetIds == null) { + this.headerDataSetIds = new ArrayList(); + } this.headerDataSetIds.add(headerDataSetIdsItem); return this; } @@ -202,7 +199,7 @@ public MergeJob addHeaderDataSetIdsItem(String headerDataSetIdsItem) { * Header data set ids * @return headerDataSetIds **/ - @ApiModelProperty(example = "null", value = "Header data set ids") + @ApiModelProperty(value = "Header data set ids") public List getHeaderDataSetIds() { return headerDataSetIds; } @@ -220,7 +217,7 @@ public MergeJob resultStorageLocation(StorageLocation resultStorageLocation) { * The storage location. (optional) * @return resultStorageLocation **/ - @ApiModelProperty(example = "null", value = "The storage location. (optional)") + @ApiModelProperty(value = "The storage location. (optional)") public StorageLocation getResultStorageLocation() { return resultStorageLocation; } @@ -238,7 +235,7 @@ public MergeJob mergeSettings(MergeSettings mergeSettings) { * Get mergeSettings * @return mergeSettings **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public MergeSettings getMergeSettings() { return mergeSettings; } @@ -251,7 +248,7 @@ public void setMergeSettings(MergeSettings mergeSettings) { * A status message, which can be informational, warning or error. A message here does not indicate an error perse * @return statusMessage **/ - @ApiModelProperty(example = "null", value = "A status message, which can be informational, warning or error. A message here does not indicate an error perse") + @ApiModelProperty(value = "A status message, which can be informational, warning or error. A message here does not indicate an error perse") public String getStatusMessage() { return statusMessage; } @@ -260,7 +257,7 @@ public String getStatusMessage() { * The status of the job * @return status **/ - @ApiModelProperty(example = "null", required = true, value = "The status of the job") + @ApiModelProperty(required = true, value = "The status of the job") public StatusEnum getStatus() { return status; } diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java index 25762e0..1486e6a 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -28,6 +16,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import com.sphereon.sdk.template_processor.model.MergeJob; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -36,7 +25,7 @@ * The merge job response. */ @ApiModel(description = "The merge job response.") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class MergeJobResponse { @JsonProperty("jobId") private String jobId = null; @@ -69,6 +58,11 @@ public enum StatusEnum { this.value = value; } + @JsonValue + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); @@ -97,7 +91,7 @@ public MergeJobResponse jobId(String jobId) { * The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation * @return jobId **/ - @ApiModelProperty(example = "null", required = true, value = "The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation") + @ApiModelProperty(required = true, value = "The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation") public String getJobId() { return jobId; } @@ -115,7 +109,7 @@ public MergeJobResponse job(MergeJob job) { * Get job * @return job **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public MergeJob getJob() { return job; } @@ -128,7 +122,7 @@ public void setJob(MergeJob job) { * A status message, which can be informational, warning or error. AA message here does not indicate an error perse * @return statusMessage **/ - @ApiModelProperty(example = "null", value = "A status message, which can be informational, warning or error. AA message here does not indicate an error perse") + @ApiModelProperty(value = "A status message, which can be informational, warning or error. AA message here does not indicate an error perse") public String getStatusMessage() { return statusMessage; } @@ -137,7 +131,7 @@ public String getStatusMessage() { * The status of the job * @return status **/ - @ApiModelProperty(example = "null", required = true, value = "The status of the job") + @ApiModelProperty(required = true, value = "The status of the job") public StatusEnum getStatus() { return status; } diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java index f7aa085..79ff291 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -28,6 +16,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import com.sphereon.sdk.template_processor.model.Lifecycle; import com.sphereon.sdk.template_processor.model.OutputSettings; import com.sphereon.sdk.template_processor.model.StorageLocation; @@ -40,7 +29,7 @@ * Merge settings */ @ApiModel(description = "Merge settings") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class MergeSettings { @JsonProperty("lifecycle") private Lifecycle lifecycle = null; @@ -59,6 +48,11 @@ public enum MergeResultEnum { this.value = value; } + @JsonValue + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); @@ -95,6 +89,11 @@ public enum EngineEnum { this.value = value; } + @JsonValue + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); @@ -115,7 +114,7 @@ public static EngineEnum fromValue(String text) { private EngineEnum engine = null; @JsonProperty("headerDataSetIds") - private List headerDataSetIds = new ArrayList(); + private List headerDataSetIds = null; @JsonProperty("resultStorageLocation") private StorageLocation resultStorageLocation = null; @@ -138,7 +137,7 @@ public MergeSettings lifecycle(Lifecycle lifecycle) { * Get lifecycle * @return lifecycle **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Lifecycle getLifecycle() { return lifecycle; } @@ -156,7 +155,7 @@ public MergeSettings mergeResult(MergeResultEnum mergeResult) { * Get mergeResult * @return mergeResult **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public MergeResultEnum getMergeResult() { return mergeResult; } @@ -174,7 +173,7 @@ public MergeSettings dataSetId(String dataSetId) { * Data set id * @return dataSetId **/ - @ApiModelProperty(example = "null", required = true, value = "Data set id") + @ApiModelProperty(required = true, value = "Data set id") public String getDataSetId() { return dataSetId; } @@ -192,7 +191,7 @@ public MergeSettings engine(EngineEnum engine) { * Get engine * @return engine **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public EngineEnum getEngine() { return engine; } @@ -207,6 +206,9 @@ public MergeSettings headerDataSetIds(List headerDataSetIds) { } public MergeSettings addHeaderDataSetIdsItem(String headerDataSetIdsItem) { + if (this.headerDataSetIds == null) { + this.headerDataSetIds = new ArrayList(); + } this.headerDataSetIds.add(headerDataSetIdsItem); return this; } @@ -215,7 +217,7 @@ public MergeSettings addHeaderDataSetIdsItem(String headerDataSetIdsItem) { * optional header data set ids * @return headerDataSetIds **/ - @ApiModelProperty(example = "null", value = "optional header data set ids") + @ApiModelProperty(value = "optional header data set ids") public List getHeaderDataSetIds() { return headerDataSetIds; } @@ -233,7 +235,7 @@ public MergeSettings resultStorageLocation(StorageLocation resultStorageLocation * The output location of the result files. * @return resultStorageLocation **/ - @ApiModelProperty(example = "null", required = true, value = "The output location of the result files.") + @ApiModelProperty(required = true, value = "The output location of the result files.") public StorageLocation getResultStorageLocation() { return resultStorageLocation; } @@ -251,7 +253,7 @@ public MergeSettings templateVersion(Integer templateVersion) { * Template version * @return templateVersion **/ - @ApiModelProperty(example = "null", value = "Template version") + @ApiModelProperty(value = "Template version") public Integer getTemplateVersion() { return templateVersion; } @@ -269,7 +271,7 @@ public MergeSettings templateId(String templateId) { * Template id * @return templateId **/ - @ApiModelProperty(example = "null", required = true, value = "Template id") + @ApiModelProperty(required = true, value = "Template id") public String getTemplateId() { return templateId; } @@ -287,7 +289,7 @@ public MergeSettings outputSettings(OutputSettings outputSettings) { * Get outputSettings * @return outputSettings **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") public OutputSettings getOutputSettings() { return outputSettings; } diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java index deef93f..4cd7354 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -28,6 +16,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -35,7 +24,7 @@ * Output settings */ @ApiModel(description = "Output settings") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class OutputSettings { /** * Gets or Sets deliveryFormat @@ -53,6 +42,11 @@ public enum DeliveryFormatEnum { this.value = value; } + @JsonValue + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); @@ -114,6 +108,11 @@ public enum OutputFormatEnum { this.value = value; } + @JsonValue + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); @@ -142,7 +141,7 @@ public OutputSettings deliveryFormat(DeliveryFormatEnum deliveryFormat) { * Get deliveryFormat * @return deliveryFormat **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public DeliveryFormatEnum getDeliveryFormat() { return deliveryFormat; } @@ -160,7 +159,7 @@ public OutputSettings outputFormat(OutputFormatEnum outputFormat) { * Get outputFormat * @return outputFormat **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public OutputFormatEnum getOutputFormat() { return outputFormat; } diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java index 029c2a4..bb366ee 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -28,6 +16,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -35,7 +24,7 @@ * Owner info */ @ApiModel(description = "Owner info") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class OwnerInfo { @JsonProperty("phone") private String phone = null; @@ -55,10 +44,10 @@ public OwnerInfo phone(String phone) { } /** - * The owner's phone number + * The owner's phone number * @return phone **/ - @ApiModelProperty(example = "null", value = "The owner's phone number") + @ApiModelProperty(value = "The owner's phone number") public String getPhone() { return phone; } @@ -73,10 +62,10 @@ public OwnerInfo companyDepartment(String companyDepartment) { } /** - * The owner's company/department + * The owner's company/department * @return companyDepartment **/ - @ApiModelProperty(example = "null", value = "The owner's company/department") + @ApiModelProperty(value = "The owner's company/department") public String getCompanyDepartment() { return companyDepartment; } @@ -91,10 +80,10 @@ public OwnerInfo name(String name) { } /** - * The owner's name + * The owner's name * @return name **/ - @ApiModelProperty(example = "null", value = "The owner's name") + @ApiModelProperty(value = "The owner's name") public String getName() { return name; } @@ -109,10 +98,10 @@ public OwnerInfo email(String email) { } /** - * The owner's email address + * The owner's email address * @return email **/ - @ApiModelProperty(example = "null", value = "The owner's email address") + @ApiModelProperty(value = "The owner's email address") public String getEmail() { return email; } diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/ResultStreamRequest.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/ResultStreamRequest.java new file mode 100644 index 0000000..c75a14f --- /dev/null +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/ResultStreamRequest.java @@ -0,0 +1,116 @@ +/* + * Template-Processor + * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package com.sphereon.sdk.template_processor.model; + +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.StreamLocation; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * A request to download a specific result stream. + */ +@ApiModel(description = "A request to download a specific result stream.") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") +public class ResultStreamRequest { + @JsonProperty("streamLocation") + private StreamLocation streamLocation = null; + + @JsonProperty("outputSettings") + private OutputSettings outputSettings = null; + + public ResultStreamRequest streamLocation(StreamLocation streamLocation) { + this.streamLocation = streamLocation; + return this; + } + + /** + * The stream location + * @return streamLocation + **/ + @ApiModelProperty(required = true, value = "The stream location") + public StreamLocation getStreamLocation() { + return streamLocation; + } + + public void setStreamLocation(StreamLocation streamLocation) { + this.streamLocation = streamLocation; + } + + public ResultStreamRequest outputSettings(OutputSettings outputSettings) { + this.outputSettings = outputSettings; + return this; + } + + /** + * The Output settings + * @return outputSettings + **/ + @ApiModelProperty(value = "The Output settings") + public OutputSettings getOutputSettings() { + return outputSettings; + } + + public void setOutputSettings(OutputSettings outputSettings) { + this.outputSettings = outputSettings; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResultStreamRequest resultStreamRequest = (ResultStreamRequest) o; + return Objects.equals(this.streamLocation, resultStreamRequest.streamLocation) && + Objects.equals(this.outputSettings, resultStreamRequest.outputSettings); + } + + @Override + public int hashCode() { + return Objects.hash(streamLocation, outputSettings); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResultStreamRequest {\n"); + + sb.append(" streamLocation: ").append(toIndentedString(streamLocation)).append("\n"); + sb.append(" outputSettings: ").append(toIndentedString(outputSettings)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/StorageLocation.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/StorageLocation.java index 70232e0..74f55da 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/StorageLocation.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/StorageLocation.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -28,6 +16,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -35,7 +24,7 @@ * Location record */ @ApiModel(description = "Location record") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class StorageLocation { @JsonProperty("folderPath") private String folderPath = null; @@ -52,7 +41,7 @@ public StorageLocation folderPath(String folderPath) { * Get folderPath * @return folderPath **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getFolderPath() { return folderPath; } @@ -70,7 +59,7 @@ public StorageLocation containerId(String containerId) { * Get containerId * @return containerId **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getContainerId() { return containerId; } diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java index 328a0b4..a109107 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -28,6 +16,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -35,7 +24,7 @@ * Location record of data stream */ @ApiModel(description = "Location record of data stream") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class StreamLocation { @JsonProperty("folderPath") private String folderPath = null; @@ -58,7 +47,7 @@ public StreamLocation folderPath(String folderPath) { * Get folderPath * @return folderPath **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getFolderPath() { return folderPath; } @@ -76,7 +65,7 @@ public StreamLocation originalFileName(String originalFileName) { * Get originalFileName * @return originalFileName **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getOriginalFileName() { return originalFileName; } @@ -94,7 +83,7 @@ public StreamLocation fileName(String fileName) { * Get fileName * @return fileName **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getFileName() { return fileName; } @@ -112,7 +101,7 @@ public StreamLocation containerId(String containerId) { * Get containerId * @return containerId **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getContainerId() { return containerId; } diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java index 40f1e73..ce61272 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -28,6 +16,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import com.sphereon.sdk.template_processor.model.OwnerInfo; import com.sphereon.sdk.template_processor.model.StorageLocation; import com.sphereon.sdk.template_processor.model.StreamLocation; @@ -40,7 +29,7 @@ /** * TemplateContext */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class TemplateContext { /** * Gets or Sets templateType @@ -56,6 +45,11 @@ public enum TemplateTypeEnum { this.value = value; } + @JsonValue + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); @@ -76,7 +70,7 @@ public static TemplateTypeEnum fromValue(String text) { private TemplateTypeEnum templateType = null; @JsonProperty("templateFileLocations") - private Map templateFileLocations = new HashMap(); + private Map templateFileLocations = null; @JsonProperty("description") private String description = null; @@ -102,7 +96,7 @@ public TemplateContext templateType(TemplateTypeEnum templateType) { * Get templateType * @return templateType **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") public TemplateTypeEnum getTemplateType() { return templateType; } @@ -117,6 +111,9 @@ public TemplateContext templateFileLocations(Map templat } public TemplateContext putTemplateFileLocationsItem(String key, StreamLocation templateFileLocationsItem) { + if (this.templateFileLocations == null) { + this.templateFileLocations = new HashMap(); + } this.templateFileLocations.put(key, templateFileLocationsItem); return this; } @@ -125,7 +122,7 @@ public TemplateContext putTemplateFileLocationsItem(String key, StreamLocation t * The template files (versioned) * @return templateFileLocations **/ - @ApiModelProperty(example = "null", value = "The template files (versioned)") + @ApiModelProperty(value = "The template files (versioned)") public Map getTemplateFileLocations() { return templateFileLocations; } @@ -143,7 +140,7 @@ public TemplateContext description(String description) { * The template description * @return description **/ - @ApiModelProperty(example = "null", value = "The template description") + @ApiModelProperty(value = "The template description") public String getDescription() { return description; } @@ -161,7 +158,7 @@ public TemplateContext ownerInfo(OwnerInfo ownerInfo) { * Get ownerInfo * @return ownerInfo **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public OwnerInfo getOwnerInfo() { return ownerInfo; } @@ -179,7 +176,7 @@ public TemplateContext storageLocation(StorageLocation storageLocation) { * The storage location. (optional) * @return storageLocation **/ - @ApiModelProperty(example = "null", value = "The storage location. (optional)") + @ApiModelProperty(value = "The storage location. (optional)") public StorageLocation getStorageLocation() { return storageLocation; } @@ -197,7 +194,7 @@ public TemplateContext id(String id) { * Get id * @return id **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getId() { return id; } @@ -215,7 +212,7 @@ public TemplateContext templateId(String templateId) { * The template context id * @return templateId **/ - @ApiModelProperty(example = "null", value = "The template context id") + @ApiModelProperty(value = "The template context id") public String getTemplateId() { return templateId; } diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java index 78c556b..dfe3861 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -28,6 +16,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import com.sphereon.sdk.template_processor.model.OwnerInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -36,7 +25,7 @@ * The merge template request. */ @ApiModel(description = "The merge template request.") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class TemplateContextRequest { /** * Gets or Sets templateType @@ -52,6 +41,11 @@ public enum TemplateTypeEnum { this.value = value; } + @JsonValue + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); @@ -89,7 +83,7 @@ public TemplateContextRequest templateType(TemplateTypeEnum templateType) { * Get templateType * @return templateType **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") public TemplateTypeEnum getTemplateType() { return templateType; } @@ -107,7 +101,7 @@ public TemplateContextRequest description(String description) { * Get description * @return description **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getDescription() { return description; } @@ -125,7 +119,7 @@ public TemplateContextRequest ownerInfo(OwnerInfo ownerInfo) { * Get ownerInfo * @return ownerInfo **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public OwnerInfo getOwnerInfo() { return ownerInfo; } @@ -143,7 +137,7 @@ public TemplateContextRequest templateId(String templateId) { * The template context id * @return templateId **/ - @ApiModelProperty(example = "null", value = "The template context id") + @ApiModelProperty(value = "The template context id") public String getTemplateId() { return templateId; } diff --git a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java index 97b95e0..987b4a6 100644 --- a/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java +++ b/java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -28,6 +16,7 @@ import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; import com.sphereon.sdk.template_processor.model.TemplateContext; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -37,7 +26,7 @@ * The merge template response. */ @ApiModel(description = "The merge template response.") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:31.439+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:35.968+02:00") public class TemplateContextResponse { @JsonProperty("creationTime") private OffsetDateTime creationTime = null; @@ -66,6 +55,11 @@ public enum StatusEnum { this.value = value; } + @JsonValue + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); @@ -89,7 +83,7 @@ public static StatusEnum fromValue(String text) { * The creation date/time of this response in ISO 8601 format * @return creationTime **/ - @ApiModelProperty(example = "null", value = "The creation date/time of this response in ISO 8601 format") + @ApiModelProperty(value = "The creation date/time of this response in ISO 8601 format") public OffsetDateTime getCreationTime() { return creationTime; } @@ -103,7 +97,7 @@ public TemplateContextResponse context(TemplateContext context) { * Get context * @return context **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public TemplateContext getContext() { return context; } @@ -121,7 +115,7 @@ public TemplateContextResponse id(String id) { * Unique template context id * @return id **/ - @ApiModelProperty(example = "null", required = true, value = "Unique template context id") + @ApiModelProperty(required = true, value = "Unique template context id") public String getId() { return id; } @@ -134,7 +128,7 @@ public void setId(String id) { * The status of the template * @return status **/ - @ApiModelProperty(example = "null", required = true, value = "The status of the template") + @ApiModelProperty(required = true, value = "The status of the template") public StatusEnum getStatus() { return status; } diff --git a/java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/AllApiTest.java b/java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/AllApiTest.java index 07f168c..95138fd 100644 --- a/java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/AllApiTest.java +++ b/java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/AllApiTest.java @@ -8,255 +8,248 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.api; import com.sphereon.sdk.template_processor.handler.ApiException; +import com.sphereon.sdk.template_processor.model.DataSetResponse; +import com.sphereon.sdk.template_processor.model.ErrorResponse; +import java.io.File; +import com.sphereon.sdk.template_processor.model.MergeJobResponse; import com.sphereon.sdk.template_processor.model.MergeSettings; import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.ResultStreamRequest; +import com.sphereon.sdk.template_processor.model.TemplateContext; import com.sphereon.sdk.template_processor.model.TemplateContextRequest; import com.sphereon.sdk.template_processor.model.TemplateContextResponse; import org.junit.Test; +import org.junit.Ignore; -import java.io.File; +import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; /** * API tests for AllApi */ +@Ignore public class AllApiTest { private final AllApi api = new AllApi(); - + /** * Store dataset - *

    + * * Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. * - * @throws ApiException if the Api call fails + * @throws ApiException + * if the Api call fails */ @Test public void createDataSetTest() throws ApiException { String payload = null; - // DataSetResponse response = api.createDataSet(payload); + DataSetResponse response = api.createDataSet(payload); // TODO: test validations } - - + /** * Create template context - *

    + * * Create a unique template context for your environment * - * @throws ApiException if the Api call fails + * @throws ApiException + * if the Api call fails */ @Test public void createTemplateContextTest() throws ApiException { - api.getApiClient().setAccessToken("d03991a8-76f0-31d1-a444-e8a47e8fa5a4"); - TemplateContextRequest templateRequest = new TemplateContextRequest(); - templateRequest.setTemplateType(TemplateContextRequest.TemplateTypeEnum.FREEMARKER); - templateRequest.setDescription("Test"); - templateRequest.setTemplateId("123ABC"); + TemplateContextRequest templateRequest = null; TemplateContextResponse response = api.createTemplateContext(templateRequest); - api.deleteTemplateContext("123ABC"); // TODO: test validations } - - + /** * Delete a stored data set - *

    + * * Delete a stored data set * - * @throws ApiException if the Api call fails + * @throws ApiException + * if the Api call fails */ @Test public void deleteDataSetTest() throws ApiException { String dataSetId = null; - // DataSetResponse response = api.deleteDataSet(dataSetId); + DataSetResponse response = api.deleteDataSet(dataSetId); // TODO: test validations } - - + /** * Delete a job manually - *

    + * * Delete the merge job and all related files * - * @throws ApiException if the Api call fails + * @throws ApiException + * if the Api call fails */ @Test public void deleteJobTest() throws ApiException { String jobId = null; - // MergeJobResponse response = api.deleteJob(jobId); + MergeJobResponse response = api.deleteJob(jobId); // TODO: test validations } - - + /** * Delete template context - *

    + * * Delete a template context with all history * - * @throws ApiException if the Api call fails + * @throws ApiException + * if the Api call fails */ @Test public void deleteTemplateContextTest() throws ApiException { String templateId = null; - // TemplateContextResponse response = api.deleteTemplateContext(templateId); + TemplateContextResponse response = api.deleteTemplateContext(templateId); // TODO: test validations } - - + /** * Job definition and state - *

    + * * Get the merge job definition and current state. Please not that you can differentiate based on http response status * - * @throws ApiException if the Api call fails + * @throws ApiException + * if the Api call fails */ @Test public void getJobTest() throws ApiException { String jobId = null; - // MergeJobResponse response = api.getJob(jobId); + MergeJobResponse response = api.getJob(jobId); // TODO: test validations } - - + /** * Get all jobs - *

    + * * Get all office text job definitions and their current state. * - * @throws ApiException if the Api call fails + * @throws ApiException + * if the Api call fails */ @Test public void getJobsTest() throws ApiException { List status = null; - // List response = api.getJobs(status); + List response = api.getJobs(status); // TODO: test validations } - - + /** * Get the result file - *

    - * Get a merge result document as a binary stream. * - * @throws ApiException if the Api call fails + * Get a merge result document as a binary stream. + * + * @throws ApiException + * if the Api call fails */ @Test - public void getResultStreamByIdTest() throws ApiException { + public void getResultStreamTest() throws ApiException { String jobId = null; - String streamId = null; - OutputSettings outputSettings = null; - // byte[] response = api.getResultStreamById(jobId, streamId, outputSettings); + ResultStreamRequest resultStreamRequest = null; + byte[] response = api.getResultStream(jobId, resultStreamRequest); // TODO: test validations } - - + /** * Get the result file - *

    - * Get all documents inside a compressed container as a binary stream. * - * @throws ApiException if the Api call fails + * Get all documents inside a compressed container as a binary stream. + * + * @throws ApiException + * if the Api call fails */ @Test public void getResultStreamsAsContainerTest() throws ApiException { String jobId = null; OutputSettings outputSettings = null; - // byte[] response = api.getResultStreamsAsContainer(jobId, outputSettings); + byte[] response = api.getResultStreamsAsContainer(jobId, outputSettings); // TODO: test validations } - - + /** * Get template context - *

    + * * Get an existing template context * - * @throws ApiException if the Api call fails + * @throws ApiException + * if the Api call fails */ @Test public void getTemplateContextTest() throws ApiException { String templateId = null; - // TemplateContextResponse response = api.getTemplateContext(templateId); + TemplateContextResponse response = api.getTemplateContext(templateId); // TODO: test validations } - - + /** * Submit merge job for processing - *

    + * * Submit merge job run. * - * @throws ApiException if the Api call fails + * @throws ApiException + * if the Api call fails */ @Test public void submitJobTest() throws ApiException { MergeSettings mergesettings = null; - // MergeJobResponse response = api.submitJob(mergesettings); + MergeJobResponse response = api.submitJob(mergesettings); // TODO: test validations } - - + /** * Update template context - *

    + * * Update an existing template context for your environment * - * @throws ApiException if the Api call fails + * @throws ApiException + * if the Api call fails */ @Test public void updateTemplateContextTest() throws ApiException { - TemplateContextRequest templateContextRequest = null; - // TemplateContextResponse response = api.updateTemplateContext(templateContextRequest); + TemplateContext templateContext = null; + TemplateContextResponse response = api.updateTemplateContext(templateContext); // TODO: test validations } - - + /** * Upload template file - *

    + * * Upload the Office template file * - * @throws ApiException if the Api call fails + * @throws ApiException + * if the Api call fails */ @Test public void uploadTemplateFileTest() throws ApiException { String templateId = null; File stream = null; - // TemplateContextResponse response = api.uploadTemplateFile(templateId, stream); + TemplateContextResponse response = api.uploadTemplateFile(templateId, stream); // TODO: test validations } - + } diff --git a/java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/DataSetApiTest.java b/java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/DataSetApiTest.java index 3e12a31..e963449 100644 --- a/java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/DataSetApiTest.java +++ b/java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/DataSetApiTest.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -29,6 +17,7 @@ import com.sphereon.sdk.template_processor.model.DataSetResponse; import com.sphereon.sdk.template_processor.model.ErrorResponse; import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -38,6 +27,7 @@ /** * API tests for DataSetApi */ +@Ignore public class DataSetApiTest { private final DataSetApi api = new DataSetApi(); @@ -54,7 +44,7 @@ public class DataSetApiTest { @Test public void createDataSetTest() throws ApiException { String payload = null; - // DataSetResponse response = api.createDataSet(payload); + DataSetResponse response = api.createDataSet(payload); // TODO: test validations } @@ -70,7 +60,7 @@ public void createDataSetTest() throws ApiException { @Test public void deleteDataSetTest() throws ApiException { String dataSetId = null; - // DataSetResponse response = api.deleteDataSet(dataSetId); + DataSetResponse response = api.deleteDataSet(dataSetId); // TODO: test validations } diff --git a/java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/JobApiTest.java b/java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/JobApiTest.java index 277c938..a510528 100644 --- a/java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/JobApiTest.java +++ b/java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/JobApiTest.java @@ -8,29 +8,19 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.api; import com.sphereon.sdk.template_processor.handler.ApiException; -import com.sphereon.sdk.template_processor.model.MergeJobResponse; import com.sphereon.sdk.template_processor.model.ErrorResponse; -import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.MergeJobResponse; import com.sphereon.sdk.template_processor.model.MergeSettings; +import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.ResultStreamRequest; import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -40,6 +30,7 @@ /** * API tests for JobApi */ +@Ignore public class JobApiTest { private final JobApi api = new JobApi(); @@ -56,7 +47,7 @@ public class JobApiTest { @Test public void getJobTest() throws ApiException { String jobId = null; - // MergeJobResponse response = api.getJob(jobId); + MergeJobResponse response = api.getJob(jobId); // TODO: test validations } @@ -72,7 +63,7 @@ public void getJobTest() throws ApiException { @Test public void getJobsTest() throws ApiException { List status = null; - // List response = api.getJobs(status); + List response = api.getJobs(status); // TODO: test validations } @@ -86,11 +77,10 @@ public void getJobsTest() throws ApiException { * if the Api call fails */ @Test - public void getResultStreamByIdTest() throws ApiException { + public void getResultStreamTest() throws ApiException { String jobId = null; - String streamId = null; - OutputSettings outputSettings = null; - // byte[] response = api.getResultStreamById(jobId, streamId, outputSettings); + ResultStreamRequest resultStreamRequest = null; + byte[] response = api.getResultStream(jobId, resultStreamRequest); // TODO: test validations } @@ -107,7 +97,7 @@ public void getResultStreamByIdTest() throws ApiException { public void getResultStreamsAsContainerTest() throws ApiException { String jobId = null; OutputSettings outputSettings = null; - // byte[] response = api.getResultStreamsAsContainer(jobId, outputSettings); + byte[] response = api.getResultStreamsAsContainer(jobId, outputSettings); // TODO: test validations } @@ -123,7 +113,7 @@ public void getResultStreamsAsContainerTest() throws ApiException { @Test public void submitJobTest() throws ApiException { MergeSettings mergesettings = null; - // MergeJobResponse response = api.submitJob(mergesettings); + MergeJobResponse response = api.submitJob(mergesettings); // TODO: test validations } diff --git a/java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/MergeApiTest.java b/java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/MergeApiTest.java deleted file mode 100644 index 7f52b33..0000000 --- a/java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/MergeApiTest.java +++ /dev/null @@ -1,264 +0,0 @@ -/* - * OfficeTextMerge - * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -package com.sphereon.sdk.template_processor.api; - -import com.sphereon.sdk.template_processor.handler.ApiException; -import com.sphereon.sdk.template_processor.model.DataSetResponse; -import com.sphereon.sdk.template_processor.model.ErrorResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextRequest; -import com.sphereon.sdk.template_processor.model.MergeJobResponse; -import com.sphereon.sdk.template_processor.model.OutputSettings; -import com.sphereon.sdk.template_processor.model.MergeSettings; -import java.io.File; -import org.junit.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for MergeApi - */ -public class MergeApiTest { - - private final MergeApi api = new MergeApi(); - - - /** - * Store dataset - * - * Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void createDataSetTest() throws ApiException { - String payload = null; - // DataSetResponse response = api.createDataSet(payload); - - // TODO: test validations - } - - /** - * Create template context - * - * Create a unique template context for your environment - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void createTemplateContextTest() throws ApiException { - TemplateContextRequest templateRequest = null; - // TemplateContextResponse response = api.createTemplateContext(templateRequest); - - // TODO: test validations - } - - /** - * Delete a stored data set - * - * Delete a stored data set - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void deleteDataSetTest() throws ApiException { - String dataSetId = null; - // DataSetResponse response = api.deleteDataSet(dataSetId); - - // TODO: test validations - } - - /** - * Delete a job manually - * - * Delete the merge job and all related files - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void deleteJobTest() throws ApiException { - String jobId = null; - // MergeJobResponse response = api.deleteJob(jobId); - - // TODO: test validations - } - - /** - * Delete template context - * - * Delete a template context with all history - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void deleteTemplateContextTest() throws ApiException { - String templateId = null; - // TemplateContextResponse response = api.deleteTemplateContext(templateId); - - // TODO: test validations - } - - /** - * Job definition and state - * - * Get the merge job definition and current state. Please not that you can differentiate based on http response status - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getJobTest() throws ApiException { - String jobId = null; - // MergeJobResponse response = api.getJob(jobId); - - // TODO: test validations - } - - /** - * Get all jobs - * - * Get all office text job definitions and their current state. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getJobsTest() throws ApiException { - List status = null; - // List response = api.getJobs(status); - - // TODO: test validations - } - - /** - * Get the result file - * - * Get a merge result document as a binary stream. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getResultStreamByIdTest() throws ApiException { - String jobId = null; - String streamId = null; - OutputSettings outputSettings = null; - // byte[] response = api.getResultStreamById(jobId, streamId, outputSettings); - - // TODO: test validations - } - - /** - * Get the result file - * - * Get all documents inside a compressed container as a binary stream. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getResultStreamsAsContainerTest() throws ApiException { - String jobId = null; - OutputSettings outputSettings = null; - // byte[] response = api.getResultStreamsAsContainer(jobId, outputSettings); - - // TODO: test validations - } - - /** - * Get template context - * - * Get an existing template context - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getTemplateContextTest() throws ApiException { - String templateId = null; - // TemplateContextResponse response = api.getTemplateContext(templateId); - - // TODO: test validations - } - - /** - * Submit merge job for processing - * - * Submit merge job run. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void submitJobTest() throws ApiException { - MergeSettings mergesettings = null; - // MergeJobResponse response = api.submitJob(mergesettings); - - // TODO: test validations - } - - /** - * Update template context - * - * Update an existing template context for your environment - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void updateTemplateContextTest() throws ApiException { - TemplateContextRequest templateContextRequest = null; - // TemplateContextResponse response = api.updateTemplateContext(templateContextRequest); - - // TODO: test validations - } - - /** - * Upload template file - * - * Upload the Office template file - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void uploadTemplateFileTest() throws ApiException { - String templateId = null; - File stream = null; - // TemplateContextResponse response = api.uploadTemplateFile(templateId, stream); - - // TODO: test validations - } - -} diff --git a/java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/TemplateApiTest.java b/java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/TemplateApiTest.java index 27736ac..0ff52fd 100644 --- a/java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/TemplateApiTest.java +++ b/java8-jersey2/src/test/java/com/sphereon/sdk/template_processor/api/TemplateApiTest.java @@ -8,29 +8,19 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.api; import com.sphereon.sdk.template_processor.handler.ApiException; -import com.sphereon.sdk.template_processor.model.TemplateContextResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextRequest; import com.sphereon.sdk.template_processor.model.ErrorResponse; import java.io.File; +import com.sphereon.sdk.template_processor.model.TemplateContext; +import com.sphereon.sdk.template_processor.model.TemplateContextRequest; +import com.sphereon.sdk.template_processor.model.TemplateContextResponse; import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -40,6 +30,7 @@ /** * API tests for TemplateApi */ +@Ignore public class TemplateApiTest { private final TemplateApi api = new TemplateApi(); @@ -56,7 +47,7 @@ public class TemplateApiTest { @Test public void createTemplateContextTest() throws ApiException { TemplateContextRequest templateRequest = null; - // TemplateContextResponse response = api.createTemplateContext(templateRequest); + TemplateContextResponse response = api.createTemplateContext(templateRequest); // TODO: test validations } @@ -72,7 +63,7 @@ public void createTemplateContextTest() throws ApiException { @Test public void deleteTemplateContextTest() throws ApiException { String templateId = null; - // TemplateContextResponse response = api.deleteTemplateContext(templateId); + TemplateContextResponse response = api.deleteTemplateContext(templateId); // TODO: test validations } @@ -88,7 +79,7 @@ public void deleteTemplateContextTest() throws ApiException { @Test public void getTemplateContextTest() throws ApiException { String templateId = null; - // TemplateContextResponse response = api.getTemplateContext(templateId); + TemplateContextResponse response = api.getTemplateContext(templateId); // TODO: test validations } @@ -103,8 +94,8 @@ public void getTemplateContextTest() throws ApiException { */ @Test public void updateTemplateContextTest() throws ApiException { - TemplateContextRequest templateContextRequest = null; - // TemplateContextResponse response = api.updateTemplateContext(templateContextRequest); + TemplateContext templateContext = null; + TemplateContextResponse response = api.updateTemplateContext(templateContext); // TODO: test validations } @@ -121,7 +112,7 @@ public void updateTemplateContextTest() throws ApiException { public void uploadTemplateFileTest() throws ApiException { String templateId = null; File stream = null; - // TemplateContextResponse response = api.uploadTemplateFile(templateId, stream); + TemplateContextResponse response = api.uploadTemplateFile(templateId, stream); // TODO: test validations } diff --git a/java8-okhttp-gson/.swagger-codegen/VERSION b/java8-okhttp-gson/.swagger-codegen/VERSION new file mode 100644 index 0000000..6b4d157 --- /dev/null +++ b/java8-okhttp-gson/.swagger-codegen/VERSION @@ -0,0 +1 @@ +2.2.3 \ No newline at end of file diff --git a/java8-okhttp-gson/.travis.yml b/java8-okhttp-gson/.travis.yml index 33e7947..70cb81a 100644 --- a/java8-okhttp-gson/.travis.yml +++ b/java8-okhttp-gson/.travis.yml @@ -1,18 +1,6 @@ # # Generated by: https://github.com/swagger-api/swagger-codegen.git # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# language: java jdk: - oraclejdk8 diff --git a/java8-okhttp-gson/LICENSE b/java8-okhttp-gson/LICENSE deleted file mode 100644 index 8dada3e..0000000 --- a/java8-okhttp-gson/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/java8-okhttp-gson/README.md b/java8-okhttp-gson/README.md index 0bbd58c..e9435a0 100644 --- a/java8-okhttp-gson/README.md +++ b/java8-okhttp-gson/README.md @@ -28,7 +28,7 @@ Add this dependency to your project's POM: com.sphereon.sdk template-processor-sdk-java8 - 0.1.0 + 0.1.1 compile ``` @@ -38,7 +38,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "com.sphereon.sdk:template-processor-sdk-java8:0.1.0" +compile "com.sphereon.sdk:template-processor-sdk-java8:0.1.1" ``` ### Others @@ -49,7 +49,7 @@ At first generate the JAR by executing: Then manually install the following JARs: -* target/template-processor-sdk-java8-0.1.0.jar +* target/template-processor-sdk-java8-0.1.1.jar * target/lib/*.jar ## Getting Started @@ -61,12 +61,12 @@ Please follow the [installation](#installation) instruction and execute the foll import com.sphereon.sdk.template_processor.handler.*; import com.sphereon.sdk.template_processor.handler.auth.*; import com.sphereon.sdk.template_processor.model.*; -import com.sphereon.sdk.template_processor.api.MergeApi; +import com.sphereon.sdk.template_processor.api.AllApi; import java.io.File; import java.util.*; -public class MergeApiExample { +public class AllApiExample { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); @@ -75,13 +75,13 @@ public class MergeApiExample { OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - MergeApi apiInstance = new MergeApi(); + AllApi apiInstance = new AllApi(); String payload = "payload_example"; // String | The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] try { DataSetResponse result = apiInstance.createDataSet(payload); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling MergeApi#createDataSet"); + System.err.println("Exception when calling AllApi#createDataSet"); e.printStackTrace(); } } @@ -91,23 +91,35 @@ public class MergeApiExample { ## Documentation for API Endpoints -All URIs are relative to *https://gw.api.cloud.sphereon.com/* +All URIs are relative to *https://gw.api.cloud.sphereon.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*MergeApi* | [**createDataSet**](docs/MergeApi.md#createDataSet) | **POST** /template-processor/merge/0.1/datasets | Store dataset -*MergeApi* | [**createTemplateContext**](docs/MergeApi.md#createTemplateContext) | **POST** /template-processor/merge/0.1/templates | Create template context -*MergeApi* | [**deleteDataSet**](docs/MergeApi.md#deleteDataSet) | **DELETE** /template-processor/merge/0.1/datasets/{dataSetId} | Delete a stored data set -*MergeApi* | [**deleteJob**](docs/MergeApi.md#deleteJob) | **DELETE** /template-processor/merge/0.1/jobs/{jobId} | Delete a job manually -*MergeApi* | [**deleteTemplateContext**](docs/MergeApi.md#deleteTemplateContext) | **DELETE** /template-processor/merge/0.1/templates/{templateId} | Delete template context -*MergeApi* | [**getJob**](docs/MergeApi.md#getJob) | **GET** /template-processor/merge/0.1/jobs/{jobId} | Job definition and state -*MergeApi* | [**getJobs**](docs/MergeApi.md#getJobs) | **GET** /template-processor/merge/0.1/jobs | Get all jobs -*MergeApi* | [**getResultStreamById**](docs/MergeApi.md#getResultStreamById) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file -*MergeApi* | [**getResultStreamsAsContainer**](docs/MergeApi.md#getResultStreamsAsContainer) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/container | Get the result file -*MergeApi* | [**getTemplateContext**](docs/MergeApi.md#getTemplateContext) | **GET** /template-processor/merge/0.1/templates/{templateId} | Get template context -*MergeApi* | [**submitJob**](docs/MergeApi.md#submitJob) | **PUT** /template-processor/merge/0.1/jobs | Submit merge job for processing -*MergeApi* | [**updateTemplateContext**](docs/MergeApi.md#updateTemplateContext) | **PUT** /template-processor/merge/0.1/templates | Update template context -*MergeApi* | [**uploadTemplateFile**](docs/MergeApi.md#uploadTemplateFile) | **POST** /template-processor/merge/0.1/templates/{templateId} | Upload template file +*AllApi* | [**createDataSet**](docs/AllApi.md#createDataSet) | **POST** /template/processor/0.1/datasets | Store dataset +*AllApi* | [**createTemplateContext**](docs/AllApi.md#createTemplateContext) | **POST** /template/processor/0.1/templates | Create template context +*AllApi* | [**deleteDataSet**](docs/AllApi.md#deleteDataSet) | **DELETE** /template/processor/0.1/datasets/{dataSetId} | Delete a stored data set +*AllApi* | [**deleteJob**](docs/AllApi.md#deleteJob) | **DELETE** /template/processor/0.1/jobs/{jobId} | Delete a job manually +*AllApi* | [**deleteTemplateContext**](docs/AllApi.md#deleteTemplateContext) | **DELETE** /template/processor/0.1/templates/{templateId} | Delete template context +*AllApi* | [**getJob**](docs/AllApi.md#getJob) | **GET** /template/processor/0.1/jobs/{jobId} | Job definition and state +*AllApi* | [**getJobs**](docs/AllApi.md#getJobs) | **GET** /template/processor/0.1/jobs | Get all jobs +*AllApi* | [**getResultStream**](docs/AllApi.md#getResultStream) | **PUT** /template/processor/0.1/jobs/{jobId}/result/stream | Get the result file +*AllApi* | [**getResultStreamsAsContainer**](docs/AllApi.md#getResultStreamsAsContainer) | **PUT** /template/processor/0.1/jobs/{jobId}/result/container | Get the result file +*AllApi* | [**getTemplateContext**](docs/AllApi.md#getTemplateContext) | **GET** /template/processor/0.1/templates/{templateId} | Get template context +*AllApi* | [**submitJob**](docs/AllApi.md#submitJob) | **PUT** /template/processor/0.1/jobs | Submit merge job for processing +*AllApi* | [**updateTemplateContext**](docs/AllApi.md#updateTemplateContext) | **PUT** /template/processor/0.1/templates | Update template context +*AllApi* | [**uploadTemplateFile**](docs/AllApi.md#uploadTemplateFile) | **POST** /template/processor/0.1/templates/{templateId} | Upload template file +*DataSetApi* | [**createDataSet**](docs/DataSetApi.md#createDataSet) | **POST** /template/processor/0.1/datasets | Store dataset +*DataSetApi* | [**deleteDataSet**](docs/DataSetApi.md#deleteDataSet) | **DELETE** /template/processor/0.1/datasets/{dataSetId} | Delete a stored data set +*JobApi* | [**getJob**](docs/JobApi.md#getJob) | **GET** /template/processor/0.1/jobs/{jobId} | Job definition and state +*JobApi* | [**getJobs**](docs/JobApi.md#getJobs) | **GET** /template/processor/0.1/jobs | Get all jobs +*JobApi* | [**getResultStream**](docs/JobApi.md#getResultStream) | **PUT** /template/processor/0.1/jobs/{jobId}/result/stream | Get the result file +*JobApi* | [**getResultStreamsAsContainer**](docs/JobApi.md#getResultStreamsAsContainer) | **PUT** /template/processor/0.1/jobs/{jobId}/result/container | Get the result file +*JobApi* | [**submitJob**](docs/JobApi.md#submitJob) | **PUT** /template/processor/0.1/jobs | Submit merge job for processing +*TemplateApi* | [**createTemplateContext**](docs/TemplateApi.md#createTemplateContext) | **POST** /template/processor/0.1/templates | Create template context +*TemplateApi* | [**deleteTemplateContext**](docs/TemplateApi.md#deleteTemplateContext) | **DELETE** /template/processor/0.1/templates/{templateId} | Delete template context +*TemplateApi* | [**getTemplateContext**](docs/TemplateApi.md#getTemplateContext) | **GET** /template/processor/0.1/templates/{templateId} | Get template context +*TemplateApi* | [**updateTemplateContext**](docs/TemplateApi.md#updateTemplateContext) | **PUT** /template/processor/0.1/templates | Update template context +*TemplateApi* | [**uploadTemplateFile**](docs/TemplateApi.md#uploadTemplateFile) | **POST** /template/processor/0.1/templates/{templateId} | Upload template file ## Documentation for Models @@ -121,6 +133,8 @@ Class | Method | HTTP request | Description - [MergeSettings](docs/MergeSettings.md) - [OutputSettings](docs/OutputSettings.md) - [OwnerInfo](docs/OwnerInfo.md) + - [ResultStreamRequest](docs/ResultStreamRequest.md) + - [StorageLocation](docs/StorageLocation.md) - [StreamLocation](docs/StreamLocation.md) - [TemplateContext](docs/TemplateContext.md) - [TemplateContextRequest](docs/TemplateContextRequest.md) @@ -134,7 +148,7 @@ Authentication schemes defined for the API: - **Type**: OAuth - **Flow**: application -- **Authorizatoin URL**: +- **Authorization URL**: - **Scopes**: - global: accessEverything diff --git a/java8-okhttp-gson/build.gradle b/java8-okhttp-gson/build.gradle index f6ebdb9..f33bab3 100644 --- a/java8-okhttp-gson/build.gradle +++ b/java8-okhttp-gson/build.gradle @@ -2,15 +2,15 @@ apply plugin: 'idea' apply plugin: 'eclipse' group = 'com.sphereon.sdk' -version = '0.1.0' +version = '0.1.1' buildscript { repositories { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:1.5.+' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' + classpath 'com.android.tools.build:gradle:2.3.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' } } @@ -25,15 +25,15 @@ if(hasProperty('target') && target == 'android') { apply plugin: 'com.github.dcendents.android-maven' android { - compileSdkVersion 23 - buildToolsVersion '23.0.2' + compileSdkVersion 25 + buildToolsVersion '25.0.2' defaultConfig { minSdkVersion 14 - targetSdkVersion 23 + targetSdkVersion 25 } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 } // Rename the aar correctly @@ -94,9 +94,9 @@ if(hasProperty('target') && target == 'android') { } dependencies { - compile 'io.swagger:swagger-annotations:1.5.8' + compile 'io.swagger:swagger-annotations:1.5.15' compile 'com.squareup.okhttp:okhttp:2.7.5' compile 'com.squareup.okhttp:logging-interceptor:2.7.5' - compile 'com.google.code.gson:gson:2.6.2' + compile 'com.google.code.gson:gson:2.8.1' testCompile 'junit:junit:4.12' } diff --git a/java8-okhttp-gson/build.sbt b/java8-okhttp-gson/build.sbt index 16dc9d6..e398cf5 100644 --- a/java8-okhttp-gson/build.sbt +++ b/java8-okhttp-gson/build.sbt @@ -2,17 +2,17 @@ lazy val root = (project in file(".")). settings( organization := "com.sphereon.sdk", name := "template-processor-sdk-java8", - version := "0.1.0", + version := "0.1.1", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), javacOptions in compile ++= Seq("-Xlint:deprecation"), publishArtifact in (Compile, packageDoc) := false, resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( - "io.swagger" % "swagger-annotations" % "1.5.8", + "io.swagger" % "swagger-annotations" % "1.5.15", "com.squareup.okhttp" % "okhttp" % "2.7.5", "com.squareup.okhttp" % "logging-interceptor" % "2.7.5", - "com.google.code.gson" % "gson" % "2.6.2", + "com.google.code.gson" % "gson" % "2.8.1", "junit" % "junit" % "4.12" % "test", "com.novocode" % "junit-interface" % "0.10" % "test" ) diff --git a/java8-okhttp-gson/docs/AllApi.md b/java8-okhttp-gson/docs/AllApi.md index 120f774..cfbd339 100644 --- a/java8-okhttp-gson/docs/AllApi.md +++ b/java8-okhttp-gson/docs/AllApi.md @@ -1,6 +1,6 @@ # AllApi -All URIs are relative to *https://gw.api.cloud.sphereon.com/* +All URIs are relative to *https://gw.api.cloud.sphereon.com* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -11,7 +11,7 @@ Method | HTTP request | Description [**deleteTemplateContext**](AllApi.md#deleteTemplateContext) | **DELETE** /template/processor/0.1/templates/{templateId} | Delete template context [**getJob**](AllApi.md#getJob) | **GET** /template/processor/0.1/jobs/{jobId} | Job definition and state [**getJobs**](AllApi.md#getJobs) | **GET** /template/processor/0.1/jobs | Get all jobs -[**getResultStreamById**](AllApi.md#getResultStreamById) | **PUT** /template/processor/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file +[**getResultStream**](AllApi.md#getResultStream) | **PUT** /template/processor/0.1/jobs/{jobId}/result/stream | Get the result file [**getResultStreamsAsContainer**](AllApi.md#getResultStreamsAsContainer) | **PUT** /template/processor/0.1/jobs/{jobId}/result/container | Get the result file [**getTemplateContext**](AllApi.md#getTemplateContext) | **GET** /template/processor/0.1/templates/{templateId} | Get template context [**submitJob**](AllApi.md#submitJob) | **PUT** /template/processor/0.1/jobs | Submit merge job for processing @@ -390,9 +390,9 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json;charset=UTF-8 - -# **getResultStreamById** -> byte[] getResultStreamById(jobId, streamId, outputSettings) + +# **getResultStream** +> byte[] getResultStream(jobId, resultStreamRequest) Get the result file @@ -415,13 +415,12 @@ oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); AllApi apiInstance = new AllApi(); String jobId = "jobId_example"; // String | jobId -String streamId = "streamId_example"; // String | streamId -OutputSettings outputSettings = new OutputSettings(); // OutputSettings | outputSettings +ResultStreamRequest resultStreamRequest = new ResultStreamRequest(); // ResultStreamRequest | resultStreamRequest try { - byte[] result = apiInstance.getResultStreamById(jobId, streamId, outputSettings); + byte[] result = apiInstance.getResultStream(jobId, resultStreamRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AllApi#getResultStreamById"); + System.err.println("Exception when calling AllApi#getResultStream"); e.printStackTrace(); } ``` @@ -431,8 +430,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **jobId** | **String**| jobId | - **streamId** | **String**| streamId | - **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] + **resultStreamRequest** | [**ResultStreamRequest**](ResultStreamRequest.md)| resultStreamRequest | ### Return type diff --git a/java8-okhttp-gson/docs/DataSetApi.md b/java8-okhttp-gson/docs/DataSetApi.md index 12ab44b..dc9dfec 100644 --- a/java8-okhttp-gson/docs/DataSetApi.md +++ b/java8-okhttp-gson/docs/DataSetApi.md @@ -1,6 +1,6 @@ # DataSetApi -All URIs are relative to *https://gw.api.cloud.sphereon.com/* +All URIs are relative to *https://gw.api.cloud.sphereon.com* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/java8-okhttp-gson/docs/JobApi.md b/java8-okhttp-gson/docs/JobApi.md index 99935c1..d2c8c91 100644 --- a/java8-okhttp-gson/docs/JobApi.md +++ b/java8-okhttp-gson/docs/JobApi.md @@ -1,12 +1,12 @@ # JobApi -All URIs are relative to *https://gw.api.cloud.sphereon.com/* +All URIs are relative to *https://gw.api.cloud.sphereon.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**getJob**](JobApi.md#getJob) | **GET** /template/processor/0.1/jobs/{jobId} | Job definition and state [**getJobs**](JobApi.md#getJobs) | **GET** /template/processor/0.1/jobs | Get all jobs -[**getResultStreamById**](JobApi.md#getResultStreamById) | **PUT** /template/processor/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file +[**getResultStream**](JobApi.md#getResultStream) | **PUT** /template/processor/0.1/jobs/{jobId}/result/stream | Get the result file [**getResultStreamsAsContainer**](JobApi.md#getResultStreamsAsContainer) | **PUT** /template/processor/0.1/jobs/{jobId}/result/container | Get the result file [**submitJob**](JobApi.md#submitJob) | **PUT** /template/processor/0.1/jobs | Submit merge job for processing @@ -117,9 +117,9 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json;charset=UTF-8 - -# **getResultStreamById** -> byte[] getResultStreamById(jobId, streamId, outputSettings) + +# **getResultStream** +> byte[] getResultStream(jobId, resultStreamRequest) Get the result file @@ -142,13 +142,12 @@ oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); JobApi apiInstance = new JobApi(); String jobId = "jobId_example"; // String | jobId -String streamId = "streamId_example"; // String | streamId -OutputSettings outputSettings = new OutputSettings(); // OutputSettings | outputSettings +ResultStreamRequest resultStreamRequest = new ResultStreamRequest(); // ResultStreamRequest | resultStreamRequest try { - byte[] result = apiInstance.getResultStreamById(jobId, streamId, outputSettings); + byte[] result = apiInstance.getResultStream(jobId, resultStreamRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling JobApi#getResultStreamById"); + System.err.println("Exception when calling JobApi#getResultStream"); e.printStackTrace(); } ``` @@ -158,8 +157,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **jobId** | **String**| jobId | - **streamId** | **String**| streamId | - **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] + **resultStreamRequest** | [**ResultStreamRequest**](ResultStreamRequest.md)| resultStreamRequest | ### Return type diff --git a/java8-okhttp-gson/docs/MergeApi.md b/java8-okhttp-gson/docs/MergeApi.md deleted file mode 100644 index 846fa0a..0000000 --- a/java8-okhttp-gson/docs/MergeApi.md +++ /dev/null @@ -1,718 +0,0 @@ -# MergeApi - -All URIs are relative to *https://gw.api.cloud.sphereon.com/* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createDataSet**](MergeApi.md#createDataSet) | **POST** /template-processor/merge/0.1/datasets | Store dataset -[**createTemplateContext**](MergeApi.md#createTemplateContext) | **POST** /template-processor/merge/0.1/templates | Create template context -[**deleteDataSet**](MergeApi.md#deleteDataSet) | **DELETE** /template-processor/merge/0.1/datasets/{dataSetId} | Delete a stored data set -[**deleteJob**](MergeApi.md#deleteJob) | **DELETE** /template-processor/merge/0.1/jobs/{jobId} | Delete a job manually -[**deleteTemplateContext**](MergeApi.md#deleteTemplateContext) | **DELETE** /template-processor/merge/0.1/templates/{templateId} | Delete template context -[**getJob**](MergeApi.md#getJob) | **GET** /template-processor/merge/0.1/jobs/{jobId} | Job definition and state -[**getJobs**](MergeApi.md#getJobs) | **GET** /template-processor/merge/0.1/jobs | Get all jobs -[**getResultStreamById**](MergeApi.md#getResultStreamById) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file -[**getResultStreamsAsContainer**](MergeApi.md#getResultStreamsAsContainer) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/container | Get the result file -[**getTemplateContext**](MergeApi.md#getTemplateContext) | **GET** /template-processor/merge/0.1/templates/{templateId} | Get template context -[**submitJob**](MergeApi.md#submitJob) | **PUT** /template-processor/merge/0.1/jobs | Submit merge job for processing -[**updateTemplateContext**](MergeApi.md#updateTemplateContext) | **PUT** /template-processor/merge/0.1/templates | Update template context -[**uploadTemplateFile**](MergeApi.md#uploadTemplateFile) | **POST** /template-processor/merge/0.1/templates/{templateId} | Upload template file - - - -# **createDataSet** -> DataSetResponse createDataSet(payload) - -Store dataset - -Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String payload = "payload_example"; // String | The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] -try { - DataSetResponse result = apiInstance.createDataSet(payload); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#createDataSet"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **payload** | **String**| The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] | - -### Return type - -[**DataSetResponse**](DataSetResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - - -# **createTemplateContext** -> TemplateContextResponse createTemplateContext(templateRequest) - -Create template context - -Create a unique template context for your environment - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -TemplateContextRequest templateRequest = new TemplateContextRequest(); // TemplateContextRequest | The template request -try { - TemplateContextResponse result = apiInstance.createTemplateContext(templateRequest); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#createTemplateContext"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| The template request | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - - -# **deleteDataSet** -> DataSetResponse deleteDataSet(dataSetId) - -Delete a stored data set - -Delete a stored data set - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String dataSetId = "dataSetId_example"; // String | dataSetId -try { - DataSetResponse result = apiInstance.deleteDataSet(dataSetId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#deleteDataSet"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **dataSetId** | **String**| dataSetId | - -### Return type - -[**DataSetResponse**](DataSetResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - - -# **deleteJob** -> MergeJobResponse deleteJob(jobId) - -Delete a job manually - -Delete the merge job and all related files - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String jobId = "jobId_example"; // String | jobId -try { - MergeJobResponse result = apiInstance.deleteJob(jobId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#deleteJob"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **String**| jobId | - -### Return type - -[**MergeJobResponse**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - - -# **deleteTemplateContext** -> TemplateContextResponse deleteTemplateContext(templateId) - -Delete template context - -Delete a template context with all history - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String templateId = "templateId_example"; // String | templateId -try { - TemplateContextResponse result = apiInstance.deleteTemplateContext(templateId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#deleteTemplateContext"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateId** | **String**| templateId | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - - -# **getJob** -> MergeJobResponse getJob(jobId) - -Job definition and state - -Get the merge job definition and current state. Please not that you can differentiate based on http response status - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String jobId = "jobId_example"; // String | jobId -try { - MergeJobResponse result = apiInstance.getJob(jobId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#getJob"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **String**| jobId | - -### Return type - -[**MergeJobResponse**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - - -# **getJobs** -> List<MergeJobResponse> getJobs(status) - -Get all jobs - -Get all office text job definitions and their current state. - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -List status = Arrays.asList("status_example"); // List | A list of status to filter on. -try { - List result = apiInstance.getJobs(status); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#getJobs"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| A list of status to filter on. | [optional] [enum: CREATED, UPDATED, PROCESSING, DONE, ERROR, DELETED] - -### Return type - -[**List<MergeJobResponse>**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - - -# **getResultStreamById** -> byte[] getResultStreamById(jobId, streamId, outputSettings) - -Get the result file - -Get a merge result document as a binary stream. - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String jobId = "jobId_example"; // String | jobId -String streamId = "streamId_example"; // String | streamId -OutputSettings outputSettings = new OutputSettings(); // OutputSettings | outputSettings -try { - byte[] result = apiInstance.getResultStreamById(jobId, streamId, outputSettings); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#getResultStreamById"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **String**| jobId | - **streamId** | **String**| streamId | - **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] - -### Return type - -**byte[]** - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/octet-stream - - -# **getResultStreamsAsContainer** -> byte[] getResultStreamsAsContainer(jobId, outputSettings) - -Get the result file - -Get all documents inside a compressed container as a binary stream. - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String jobId = "jobId_example"; // String | jobId -OutputSettings outputSettings = new OutputSettings(); // OutputSettings | outputSettings -try { - byte[] result = apiInstance.getResultStreamsAsContainer(jobId, outputSettings); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#getResultStreamsAsContainer"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **String**| jobId | - **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] - -### Return type - -**byte[]** - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/octet-stream - - -# **getTemplateContext** -> TemplateContextResponse getTemplateContext(templateId) - -Get template context - -Get an existing template context - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String templateId = "templateId_example"; // String | The template context name unique for your environment -try { - TemplateContextResponse result = apiInstance.getTemplateContext(templateId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#getTemplateContext"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateId** | **String**| The template context name unique for your environment | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - - -# **submitJob** -> MergeJobResponse submitJob(mergesettings) - -Submit merge job for processing - -Submit merge job run. - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -MergeSettings mergesettings = new MergeSettings(); // MergeSettings | The merge- and output settings -try { - MergeJobResponse result = apiInstance.submitJob(mergesettings); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#submitJob"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **mergesettings** | [**MergeSettings**](MergeSettings.md)| The merge- and output settings | - -### Return type - -[**MergeJobResponse**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - - -# **updateTemplateContext** -> TemplateContextResponse updateTemplateContext(templateContextRequest) - -Update template context - -Update an existing template context for your environment - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -TemplateContextRequest templateContextRequest = new TemplateContextRequest(); // TemplateContextRequest | templateContextRequest -try { - TemplateContextResponse result = apiInstance.updateTemplateContext(templateContextRequest); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#updateTemplateContext"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateContextRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| templateContextRequest | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - - -# **uploadTemplateFile** -> TemplateContextResponse uploadTemplateFile(templateId, stream) - -Upload template file - -Upload the Office template file - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String templateId = "templateId_example"; // String | The template context name unique for your environment -File stream = new File("/path/to/file.txt"); // File | The template (file/inputstream) to store -try { - TemplateContextResponse result = apiInstance.uploadTemplateFile(templateId, stream); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#uploadTemplateFile"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateId** | **String**| The template context name unique for your environment | - **stream** | **File**| The template (file/inputstream) to store | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json;charset=UTF-8 - diff --git a/java8-okhttp-gson/docs/ResultStreamRequest.md b/java8-okhttp-gson/docs/ResultStreamRequest.md new file mode 100644 index 0000000..1c6e0fc --- /dev/null +++ b/java8-okhttp-gson/docs/ResultStreamRequest.md @@ -0,0 +1,11 @@ + +# ResultStreamRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**streamLocation** | [**StreamLocation**](StreamLocation.md) | The stream location | +**outputSettings** | [**OutputSettings**](OutputSettings.md) | The Output settings | [optional] + + + diff --git a/java8-okhttp-gson/docs/TemplateApi.md b/java8-okhttp-gson/docs/TemplateApi.md index 4e0cfca..6b75162 100644 --- a/java8-okhttp-gson/docs/TemplateApi.md +++ b/java8-okhttp-gson/docs/TemplateApi.md @@ -1,6 +1,6 @@ # TemplateApi -All URIs are relative to *https://gw.api.cloud.sphereon.com/* +All URIs are relative to *https://gw.api.cloud.sphereon.com* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/java8-okhttp-gson/pom.xml b/java8-okhttp-gson/pom.xml index c43e8d5..b349bca 100644 --- a/java8-okhttp-gson/pom.xml +++ b/java8-okhttp-gson/pom.xml @@ -5,9 +5,11 @@ template-processor-sdk-java8 jar template-processor-sdk-java8 - 0.1.0 + 0.1.1 + https://github.com/swagger-api/swagger-codegen + Swagger Java - scm:git:git@github.com:swagger-api/swagger-mustache.git + scm:git:git@github.com:swagger-api/swagger-codegen.git scm:git:git@github.com:swagger-api/swagger-codegen.git https://github.com/swagger-api/swagger-codegen @@ -15,6 +17,23 @@ 2.2.0 + + + Unlicense + http://www.apache.org/licenses/LICENSE-2.0 + repo + + + + + + Swagger + apiteam@swagger.io + Swagger + http://swagger.io + + + @@ -100,9 +119,55 @@ org.apache.maven.plugins maven-javadoc-plugin 2.10.4 + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + + + + io.swagger @@ -124,7 +189,6 @@ gson ${gson-version} - junit @@ -137,12 +201,12 @@ 1.8 ${java.version} ${java.version} - 1.5.9 + 1.5.15 2.7.5 - 2.6.2 - 2.9.3 + 2.8.1 + 2.9.9 1.0.0 4.12 UTF-8 - \ No newline at end of file + diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/AllApi.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/AllApi.java index 902c399..d799f06 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/AllApi.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/AllApi.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -38,15 +26,17 @@ import java.io.IOException; + import com.sphereon.sdk.template_processor.model.DataSetResponse; import com.sphereon.sdk.template_processor.model.ErrorResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextRequest; +import java.io.File; import com.sphereon.sdk.template_processor.model.MergeJobResponse; -import com.sphereon.sdk.template_processor.model.OutputSettings; import com.sphereon.sdk.template_processor.model.MergeSettings; +import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.ResultStreamRequest; import com.sphereon.sdk.template_processor.model.TemplateContext; -import java.io.File; +import com.sphereon.sdk.template_processor.model.TemplateContextRequest; +import com.sphereon.sdk.template_processor.model.TemplateContextResponse; import java.lang.reflect.Type; import java.util.ArrayList; @@ -73,18 +63,19 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /* Build call for createDataSet */ - private com.squareup.okhttp.Call createDataSetCall(String payload, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + /** + * Build call for createDataSet + * @param payload The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call createDataSetCall(String payload, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = payload; - // verify the required parameter 'payload' is set - if (payload == null) { - throw new ApiException("Missing the required parameter 'payload' when calling createDataSet(Async)"); - } - - // create path and map variables - String localVarPath = "/template/processor/0.1/datasets".replaceAll("\\{format\\}","json"); + String localVarPath = "/template/processor/0.1/datasets"; List localVarQueryParams = new ArrayList(); @@ -118,6 +109,24 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch String[] localVarAuthNames = new String[] { "oauth2schema" }; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call createDataSetValidateBeforeCall(String payload, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'payload' is set + if (payload == null) { + throw new ApiException("Missing the required parameter 'payload' when calling createDataSet(Async)"); + } + + + com.squareup.okhttp.Call call = createDataSetCall(payload, progressListener, progressRequestListener); + return call; + + + + + } /** @@ -140,7 +149,7 @@ public DataSetResponse createDataSet(String payload) throws ApiException { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse createDataSetWithHttpInfo(String payload) throws ApiException { - com.squareup.okhttp.Call call = createDataSetCall(payload, null, null); + com.squareup.okhttp.Call call = createDataSetValidateBeforeCall(payload, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -174,23 +183,24 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = createDataSetCall(payload, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = createDataSetValidateBeforeCall(payload, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } - /* Build call for createTemplateContext */ - private com.squareup.okhttp.Call createTemplateContextCall(TemplateContextRequest templateRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + /** + * Build call for createTemplateContext + * @param templateRequest The template request (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call createTemplateContextCall(TemplateContextRequest templateRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = templateRequest; - // verify the required parameter 'templateRequest' is set - if (templateRequest == null) { - throw new ApiException("Missing the required parameter 'templateRequest' when calling createTemplateContext(Async)"); - } - - // create path and map variables - String localVarPath = "/template/processor/0.1/templates".replaceAll("\\{format\\}","json"); + String localVarPath = "/template/processor/0.1/templates"; List localVarQueryParams = new ArrayList(); @@ -224,6 +234,24 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch String[] localVarAuthNames = new String[] { "oauth2schema" }; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call createTemplateContextValidateBeforeCall(TemplateContextRequest templateRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'templateRequest' is set + if (templateRequest == null) { + throw new ApiException("Missing the required parameter 'templateRequest' when calling createTemplateContext(Async)"); + } + + + com.squareup.okhttp.Call call = createTemplateContextCall(templateRequest, progressListener, progressRequestListener); + return call; + + + + + } /** @@ -246,7 +274,7 @@ public TemplateContextResponse createTemplateContext(TemplateContextRequest temp * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse createTemplateContextWithHttpInfo(TemplateContextRequest templateRequest) throws ApiException { - com.squareup.okhttp.Call call = createTemplateContextCall(templateRequest, null, null); + com.squareup.okhttp.Call call = createTemplateContextValidateBeforeCall(templateRequest, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -280,24 +308,25 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = createTemplateContextCall(templateRequest, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = createTemplateContextValidateBeforeCall(templateRequest, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } - /* Build call for deleteDataSet */ - private com.squareup.okhttp.Call deleteDataSetCall(String dataSetId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + /** + * Build call for deleteDataSet + * @param dataSetId dataSetId (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call deleteDataSetCall(String dataSetId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'dataSetId' is set - if (dataSetId == null) { - throw new ApiException("Missing the required parameter 'dataSetId' when calling deleteDataSet(Async)"); - } - - // create path and map variables - String localVarPath = "/template/processor/0.1/datasets/{dataSetId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "dataSetId" + "\\}", apiClient.escapeString(dataSetId.toString())); + String localVarPath = "/template/processor/0.1/datasets/{dataSetId}" + .replaceAll("\\{" + "dataSetId" + "\\}", apiClient.escapeString(dataSetId.toString())); List localVarQueryParams = new ArrayList(); @@ -331,6 +360,24 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch String[] localVarAuthNames = new String[] { "oauth2schema" }; return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call deleteDataSetValidateBeforeCall(String dataSetId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'dataSetId' is set + if (dataSetId == null) { + throw new ApiException("Missing the required parameter 'dataSetId' when calling deleteDataSet(Async)"); + } + + + com.squareup.okhttp.Call call = deleteDataSetCall(dataSetId, progressListener, progressRequestListener); + return call; + + + + + } /** @@ -353,7 +400,7 @@ public DataSetResponse deleteDataSet(String dataSetId) throws ApiException { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse deleteDataSetWithHttpInfo(String dataSetId) throws ApiException { - com.squareup.okhttp.Call call = deleteDataSetCall(dataSetId, null, null); + com.squareup.okhttp.Call call = deleteDataSetValidateBeforeCall(dataSetId, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -387,24 +434,25 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = deleteDataSetCall(dataSetId, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = deleteDataSetValidateBeforeCall(dataSetId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } - /* Build call for deleteJob */ - private com.squareup.okhttp.Call deleteJobCall(String jobId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + /** + * Build call for deleteJob + * @param jobId jobId (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call deleteJobCall(String jobId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'jobId' is set - if (jobId == null) { - throw new ApiException("Missing the required parameter 'jobId' when calling deleteJob(Async)"); - } - - // create path and map variables - String localVarPath = "/template/processor/0.1/jobs/{jobId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); + String localVarPath = "/template/processor/0.1/jobs/{jobId}" + .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); List localVarQueryParams = new ArrayList(); @@ -438,6 +486,24 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch String[] localVarAuthNames = new String[] { "oauth2schema" }; return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call deleteJobValidateBeforeCall(String jobId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException("Missing the required parameter 'jobId' when calling deleteJob(Async)"); + } + + + com.squareup.okhttp.Call call = deleteJobCall(jobId, progressListener, progressRequestListener); + return call; + + + + + } /** @@ -460,7 +526,7 @@ public MergeJobResponse deleteJob(String jobId) throws ApiException { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse deleteJobWithHttpInfo(String jobId) throws ApiException { - com.squareup.okhttp.Call call = deleteJobCall(jobId, null, null); + com.squareup.okhttp.Call call = deleteJobValidateBeforeCall(jobId, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -494,24 +560,25 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = deleteJobCall(jobId, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = deleteJobValidateBeforeCall(jobId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } - /* Build call for deleteTemplateContext */ - private com.squareup.okhttp.Call deleteTemplateContextCall(String templateId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + /** + * Build call for deleteTemplateContext + * @param templateId templateId (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call deleteTemplateContextCall(String templateId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'templateId' is set - if (templateId == null) { - throw new ApiException("Missing the required parameter 'templateId' when calling deleteTemplateContext(Async)"); - } - - // create path and map variables - String localVarPath = "/template/processor/0.1/templates/{templateId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); + String localVarPath = "/template/processor/0.1/templates/{templateId}" + .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); List localVarQueryParams = new ArrayList(); @@ -545,6 +612,24 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch String[] localVarAuthNames = new String[] { "oauth2schema" }; return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call deleteTemplateContextValidateBeforeCall(String templateId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException("Missing the required parameter 'templateId' when calling deleteTemplateContext(Async)"); + } + + + com.squareup.okhttp.Call call = deleteTemplateContextCall(templateId, progressListener, progressRequestListener); + return call; + + + + + } /** @@ -567,7 +652,7 @@ public TemplateContextResponse deleteTemplateContext(String templateId) throws A * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse deleteTemplateContextWithHttpInfo(String templateId) throws ApiException { - com.squareup.okhttp.Call call = deleteTemplateContextCall(templateId, null, null); + com.squareup.okhttp.Call call = deleteTemplateContextValidateBeforeCall(templateId, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -601,24 +686,25 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = deleteTemplateContextCall(templateId, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = deleteTemplateContextValidateBeforeCall(templateId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } - /* Build call for getJob */ - private com.squareup.okhttp.Call getJobCall(String jobId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + /** + * Build call for getJob + * @param jobId jobId (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getJobCall(String jobId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'jobId' is set - if (jobId == null) { - throw new ApiException("Missing the required parameter 'jobId' when calling getJob(Async)"); - } - - // create path and map variables - String localVarPath = "/template/processor/0.1/jobs/{jobId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); + String localVarPath = "/template/processor/0.1/jobs/{jobId}" + .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); List localVarQueryParams = new ArrayList(); @@ -652,6 +738,24 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch String[] localVarAuthNames = new String[] { "oauth2schema" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getJobValidateBeforeCall(String jobId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException("Missing the required parameter 'jobId' when calling getJob(Async)"); + } + + + com.squareup.okhttp.Call call = getJobCall(jobId, progressListener, progressRequestListener); + return call; + + + + + } /** @@ -674,7 +778,7 @@ public MergeJobResponse getJob(String jobId) throws ApiException { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse getJobWithHttpInfo(String jobId) throws ApiException { - com.squareup.okhttp.Call call = getJobCall(jobId, null, null); + com.squareup.okhttp.Call call = getJobValidateBeforeCall(jobId, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -708,18 +812,24 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = getJobCall(jobId, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = getJobValidateBeforeCall(jobId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } - /* Build call for getJobs */ - private com.squareup.okhttp.Call getJobsCall(List status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + /** + * Build call for getJobs + * @param status A list of status to filter on. (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getJobsCall(List status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; - // create path and map variables - String localVarPath = "/template/processor/0.1/jobs".replaceAll("\\{format\\}","json"); + String localVarPath = "/template/processor/0.1/jobs"; List localVarQueryParams = new ArrayList(); if (status != null) @@ -755,6 +865,19 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch String[] localVarAuthNames = new String[] { "oauth2schema" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getJobsValidateBeforeCall(List status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = getJobsCall(status, progressListener, progressRequestListener); + return call; + + + + + } /** @@ -777,7 +900,7 @@ public List getJobs(List status) throws ApiException { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse> getJobsWithHttpInfo(List status) throws ApiException { - com.squareup.okhttp.Call call = getJobsCall(status, null, null); + com.squareup.okhttp.Call call = getJobsValidateBeforeCall(status, null, null); Type localVarReturnType = new TypeToken>(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -811,30 +934,26 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = getJobsCall(status, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = getJobsValidateBeforeCall(status, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } - /* Build call for getResultStreamById */ - private com.squareup.okhttp.Call getResultStreamByIdCall(String jobId, String streamId, OutputSettings outputSettings, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = outputSettings; - - // verify the required parameter 'jobId' is set - if (jobId == null) { - throw new ApiException("Missing the required parameter 'jobId' when calling getResultStreamById(Async)"); - } - - // verify the required parameter 'streamId' is set - if (streamId == null) { - throw new ApiException("Missing the required parameter 'streamId' when calling getResultStreamById(Async)"); - } + /** + * Build call for getResultStream + * @param jobId jobId (required) + * @param resultStreamRequest resultStreamRequest (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getResultStreamCall(String jobId, ResultStreamRequest resultStreamRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = resultStreamRequest; - // create path and map variables - String localVarPath = "/template/processor/0.1/jobs/{jobId}/result/file/{streamId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())) - .replaceAll("\\{" + "streamId" + "\\}", apiClient.escapeString(streamId.toString())); + String localVarPath = "/template/processor/0.1/jobs/{jobId}/result/stream" + .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); List localVarQueryParams = new ArrayList(); @@ -868,19 +987,41 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch String[] localVarAuthNames = new String[] { "oauth2schema" }; return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getResultStreamValidateBeforeCall(String jobId, ResultStreamRequest resultStreamRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException("Missing the required parameter 'jobId' when calling getResultStream(Async)"); + } + + // verify the required parameter 'resultStreamRequest' is set + if (resultStreamRequest == null) { + throw new ApiException("Missing the required parameter 'resultStreamRequest' when calling getResultStream(Async)"); + } + + + com.squareup.okhttp.Call call = getResultStreamCall(jobId, resultStreamRequest, progressListener, progressRequestListener); + return call; + + + + + } /** * Get the result file * Get a merge result document as a binary stream. * @param jobId jobId (required) - * @param streamId streamId (required) - * @param outputSettings outputSettings (optional) + * @param resultStreamRequest resultStreamRequest (required) * @return byte[] * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public byte[] getResultStreamById(String jobId, String streamId, OutputSettings outputSettings) throws ApiException { - ApiResponse resp = getResultStreamByIdWithHttpInfo(jobId, streamId, outputSettings); + public byte[] getResultStream(String jobId, ResultStreamRequest resultStreamRequest) throws ApiException { + ApiResponse resp = getResultStreamWithHttpInfo(jobId, resultStreamRequest); return resp.getData(); } @@ -888,13 +1029,12 @@ public byte[] getResultStreamById(String jobId, String streamId, OutputSettings * Get the result file * Get a merge result document as a binary stream. * @param jobId jobId (required) - * @param streamId streamId (required) - * @param outputSettings outputSettings (optional) + * @param resultStreamRequest resultStreamRequest (required) * @return ApiResponse<byte[]> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse getResultStreamByIdWithHttpInfo(String jobId, String streamId, OutputSettings outputSettings) throws ApiException { - com.squareup.okhttp.Call call = getResultStreamByIdCall(jobId, streamId, outputSettings, null, null); + public ApiResponse getResultStreamWithHttpInfo(String jobId, ResultStreamRequest resultStreamRequest) throws ApiException { + com.squareup.okhttp.Call call = getResultStreamValidateBeforeCall(jobId, resultStreamRequest, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -903,13 +1043,12 @@ public ApiResponse getResultStreamByIdWithHttpInfo(String jobId, String * Get the result file (asynchronously) * Get a merge result document as a binary stream. * @param jobId jobId (required) - * @param streamId streamId (required) - * @param outputSettings outputSettings (optional) + * @param resultStreamRequest resultStreamRequest (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public com.squareup.okhttp.Call getResultStreamByIdAsync(String jobId, String streamId, OutputSettings outputSettings, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call getResultStreamAsync(String jobId, ResultStreamRequest resultStreamRequest, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -930,24 +1069,26 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = getResultStreamByIdCall(jobId, streamId, outputSettings, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = getResultStreamValidateBeforeCall(jobId, resultStreamRequest, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } - /* Build call for getResultStreamsAsContainer */ - private com.squareup.okhttp.Call getResultStreamsAsContainerCall(String jobId, OutputSettings outputSettings, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + /** + * Build call for getResultStreamsAsContainer + * @param jobId jobId (required) + * @param outputSettings outputSettings (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getResultStreamsAsContainerCall(String jobId, OutputSettings outputSettings, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = outputSettings; - // verify the required parameter 'jobId' is set - if (jobId == null) { - throw new ApiException("Missing the required parameter 'jobId' when calling getResultStreamsAsContainer(Async)"); - } - - // create path and map variables - String localVarPath = "/template/processor/0.1/jobs/{jobId}/result/container".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); + String localVarPath = "/template/processor/0.1/jobs/{jobId}/result/container" + .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); List localVarQueryParams = new ArrayList(); @@ -981,6 +1122,24 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch String[] localVarAuthNames = new String[] { "oauth2schema" }; return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getResultStreamsAsContainerValidateBeforeCall(String jobId, OutputSettings outputSettings, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException("Missing the required parameter 'jobId' when calling getResultStreamsAsContainer(Async)"); + } + + + com.squareup.okhttp.Call call = getResultStreamsAsContainerCall(jobId, outputSettings, progressListener, progressRequestListener); + return call; + + + + + } /** @@ -1005,7 +1164,7 @@ public byte[] getResultStreamsAsContainer(String jobId, OutputSettings outputSet * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse getResultStreamsAsContainerWithHttpInfo(String jobId, OutputSettings outputSettings) throws ApiException { - com.squareup.okhttp.Call call = getResultStreamsAsContainerCall(jobId, outputSettings, null, null); + com.squareup.okhttp.Call call = getResultStreamsAsContainerValidateBeforeCall(jobId, outputSettings, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -1040,24 +1199,25 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = getResultStreamsAsContainerCall(jobId, outputSettings, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = getResultStreamsAsContainerValidateBeforeCall(jobId, outputSettings, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } - /* Build call for getTemplateContext */ - private com.squareup.okhttp.Call getTemplateContextCall(String templateId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + /** + * Build call for getTemplateContext + * @param templateId The template context name unique for your environment (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getTemplateContextCall(String templateId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'templateId' is set - if (templateId == null) { - throw new ApiException("Missing the required parameter 'templateId' when calling getTemplateContext(Async)"); - } - - // create path and map variables - String localVarPath = "/template/processor/0.1/templates/{templateId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); + String localVarPath = "/template/processor/0.1/templates/{templateId}" + .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); List localVarQueryParams = new ArrayList(); @@ -1091,6 +1251,24 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch String[] localVarAuthNames = new String[] { "oauth2schema" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getTemplateContextValidateBeforeCall(String templateId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException("Missing the required parameter 'templateId' when calling getTemplateContext(Async)"); + } + + + com.squareup.okhttp.Call call = getTemplateContextCall(templateId, progressListener, progressRequestListener); + return call; + + + + + } /** @@ -1113,7 +1291,7 @@ public TemplateContextResponse getTemplateContext(String templateId) throws ApiE * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse getTemplateContextWithHttpInfo(String templateId) throws ApiException { - com.squareup.okhttp.Call call = getTemplateContextCall(templateId, null, null); + com.squareup.okhttp.Call call = getTemplateContextValidateBeforeCall(templateId, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -1147,23 +1325,24 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = getTemplateContextCall(templateId, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = getTemplateContextValidateBeforeCall(templateId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } - /* Build call for submitJob */ - private com.squareup.okhttp.Call submitJobCall(MergeSettings mergesettings, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + /** + * Build call for submitJob + * @param mergesettings The merge- and output settings (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call submitJobCall(MergeSettings mergesettings, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = mergesettings; - // verify the required parameter 'mergesettings' is set - if (mergesettings == null) { - throw new ApiException("Missing the required parameter 'mergesettings' when calling submitJob(Async)"); - } - - // create path and map variables - String localVarPath = "/template/processor/0.1/jobs".replaceAll("\\{format\\}","json"); + String localVarPath = "/template/processor/0.1/jobs"; List localVarQueryParams = new ArrayList(); @@ -1197,6 +1376,24 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch String[] localVarAuthNames = new String[] { "oauth2schema" }; return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call submitJobValidateBeforeCall(MergeSettings mergesettings, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'mergesettings' is set + if (mergesettings == null) { + throw new ApiException("Missing the required parameter 'mergesettings' when calling submitJob(Async)"); + } + + + com.squareup.okhttp.Call call = submitJobCall(mergesettings, progressListener, progressRequestListener); + return call; + + + + + } /** @@ -1219,7 +1416,7 @@ public MergeJobResponse submitJob(MergeSettings mergesettings) throws ApiExcepti * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse submitJobWithHttpInfo(MergeSettings mergesettings) throws ApiException { - com.squareup.okhttp.Call call = submitJobCall(mergesettings, null, null); + com.squareup.okhttp.Call call = submitJobValidateBeforeCall(mergesettings, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -1253,23 +1450,24 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = submitJobCall(mergesettings, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = submitJobValidateBeforeCall(mergesettings, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } - /* Build call for updateTemplateContext */ - private com.squareup.okhttp.Call updateTemplateContextCall(TemplateContext templateContext, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + /** + * Build call for updateTemplateContext + * @param templateContext templateContext (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call updateTemplateContextCall(TemplateContext templateContext, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = templateContext; - // verify the required parameter 'templateContext' is set - if (templateContext == null) { - throw new ApiException("Missing the required parameter 'templateContext' when calling updateTemplateContext(Async)"); - } - - // create path and map variables - String localVarPath = "/template/processor/0.1/templates".replaceAll("\\{format\\}","json"); + String localVarPath = "/template/processor/0.1/templates"; List localVarQueryParams = new ArrayList(); @@ -1303,6 +1501,24 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch String[] localVarAuthNames = new String[] { "oauth2schema" }; return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call updateTemplateContextValidateBeforeCall(TemplateContext templateContext, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'templateContext' is set + if (templateContext == null) { + throw new ApiException("Missing the required parameter 'templateContext' when calling updateTemplateContext(Async)"); + } + + + com.squareup.okhttp.Call call = updateTemplateContextCall(templateContext, progressListener, progressRequestListener); + return call; + + + + + } /** @@ -1325,7 +1541,7 @@ public TemplateContextResponse updateTemplateContext(TemplateContext templateCon * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse updateTemplateContextWithHttpInfo(TemplateContext templateContext) throws ApiException { - com.squareup.okhttp.Call call = updateTemplateContextCall(templateContext, null, null); + com.squareup.okhttp.Call call = updateTemplateContextValidateBeforeCall(templateContext, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -1359,29 +1575,26 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = updateTemplateContextCall(templateContext, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = updateTemplateContextValidateBeforeCall(templateContext, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } - /* Build call for uploadTemplateFile */ - private com.squareup.okhttp.Call uploadTemplateFileCall(String templateId, File stream, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + /** + * Build call for uploadTemplateFile + * @param templateId The template context name unique for your environment (required) + * @param stream The template (file/inputstream) to store (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call uploadTemplateFileCall(String templateId, File stream, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'templateId' is set - if (templateId == null) { - throw new ApiException("Missing the required parameter 'templateId' when calling uploadTemplateFile(Async)"); - } - - // verify the required parameter 'stream' is set - if (stream == null) { - throw new ApiException("Missing the required parameter 'stream' when calling uploadTemplateFile(Async)"); - } - - // create path and map variables - String localVarPath = "/template/processor/0.1/templates/{templateId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); + String localVarPath = "/template/processor/0.1/templates/{templateId}" + .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); List localVarQueryParams = new ArrayList(); @@ -1417,6 +1630,29 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch String[] localVarAuthNames = new String[] { "oauth2schema" }; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call uploadTemplateFileValidateBeforeCall(String templateId, File stream, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException("Missing the required parameter 'templateId' when calling uploadTemplateFile(Async)"); + } + + // verify the required parameter 'stream' is set + if (stream == null) { + throw new ApiException("Missing the required parameter 'stream' when calling uploadTemplateFile(Async)"); + } + + + com.squareup.okhttp.Call call = uploadTemplateFileCall(templateId, stream, progressListener, progressRequestListener); + return call; + + + + + } /** @@ -1441,7 +1677,7 @@ public TemplateContextResponse uploadTemplateFile(String templateId, File stream * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse uploadTemplateFileWithHttpInfo(String templateId, File stream) throws ApiException { - com.squareup.okhttp.Call call = uploadTemplateFileCall(templateId, stream, null, null); + com.squareup.okhttp.Call call = uploadTemplateFileValidateBeforeCall(templateId, stream, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -1476,7 +1712,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = uploadTemplateFileCall(templateId, stream, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = uploadTemplateFileValidateBeforeCall(templateId, stream, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/DataSetApi.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/DataSetApi.java index 54c6607..616c7b6 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/DataSetApi.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/DataSetApi.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -38,6 +26,7 @@ import java.io.IOException; + import com.sphereon.sdk.template_processor.model.DataSetResponse; import com.sphereon.sdk.template_processor.model.ErrorResponse; @@ -66,18 +55,19 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /* Build call for createDataSet */ - private com.squareup.okhttp.Call createDataSetCall(String payload, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + /** + * Build call for createDataSet + * @param payload The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call createDataSetCall(String payload, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = payload; - // verify the required parameter 'payload' is set - if (payload == null) { - throw new ApiException("Missing the required parameter 'payload' when calling createDataSet(Async)"); - } - - // create path and map variables - String localVarPath = "/template/processor/0.1/datasets".replaceAll("\\{format\\}","json"); + String localVarPath = "/template/processor/0.1/datasets"; List localVarQueryParams = new ArrayList(); @@ -111,6 +101,24 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch String[] localVarAuthNames = new String[] { "oauth2schema" }; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call createDataSetValidateBeforeCall(String payload, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'payload' is set + if (payload == null) { + throw new ApiException("Missing the required parameter 'payload' when calling createDataSet(Async)"); + } + + + com.squareup.okhttp.Call call = createDataSetCall(payload, progressListener, progressRequestListener); + return call; + + + + + } /** @@ -133,7 +141,7 @@ public DataSetResponse createDataSet(String payload) throws ApiException { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse createDataSetWithHttpInfo(String payload) throws ApiException { - com.squareup.okhttp.Call call = createDataSetCall(payload, null, null); + com.squareup.okhttp.Call call = createDataSetValidateBeforeCall(payload, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -167,24 +175,25 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = createDataSetCall(payload, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = createDataSetValidateBeforeCall(payload, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } - /* Build call for deleteDataSet */ - private com.squareup.okhttp.Call deleteDataSetCall(String dataSetId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + /** + * Build call for deleteDataSet + * @param dataSetId dataSetId (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call deleteDataSetCall(String dataSetId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'dataSetId' is set - if (dataSetId == null) { - throw new ApiException("Missing the required parameter 'dataSetId' when calling deleteDataSet(Async)"); - } - - // create path and map variables - String localVarPath = "/template/processor/0.1/datasets/{dataSetId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "dataSetId" + "\\}", apiClient.escapeString(dataSetId.toString())); + String localVarPath = "/template/processor/0.1/datasets/{dataSetId}" + .replaceAll("\\{" + "dataSetId" + "\\}", apiClient.escapeString(dataSetId.toString())); List localVarQueryParams = new ArrayList(); @@ -218,6 +227,24 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch String[] localVarAuthNames = new String[] { "oauth2schema" }; return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call deleteDataSetValidateBeforeCall(String dataSetId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'dataSetId' is set + if (dataSetId == null) { + throw new ApiException("Missing the required parameter 'dataSetId' when calling deleteDataSet(Async)"); + } + + + com.squareup.okhttp.Call call = deleteDataSetCall(dataSetId, progressListener, progressRequestListener); + return call; + + + + + } /** @@ -240,7 +267,7 @@ public DataSetResponse deleteDataSet(String dataSetId) throws ApiException { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse deleteDataSetWithHttpInfo(String dataSetId) throws ApiException { - com.squareup.okhttp.Call call = deleteDataSetCall(dataSetId, null, null); + com.squareup.okhttp.Call call = deleteDataSetValidateBeforeCall(dataSetId, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -274,7 +301,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = deleteDataSetCall(dataSetId, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = deleteDataSetValidateBeforeCall(dataSetId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/JobApi.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/JobApi.java index 16dd292..0705737 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/JobApi.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/JobApi.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -38,10 +26,12 @@ import java.io.IOException; -import com.sphereon.sdk.template_processor.model.MergeJobResponse; + import com.sphereon.sdk.template_processor.model.ErrorResponse; -import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.MergeJobResponse; import com.sphereon.sdk.template_processor.model.MergeSettings; +import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.ResultStreamRequest; import java.lang.reflect.Type; import java.util.ArrayList; @@ -68,19 +58,20 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /* Build call for getJob */ - private com.squareup.okhttp.Call getJobCall(String jobId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + /** + * Build call for getJob + * @param jobId jobId (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getJobCall(String jobId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'jobId' is set - if (jobId == null) { - throw new ApiException("Missing the required parameter 'jobId' when calling getJob(Async)"); - } - - // create path and map variables - String localVarPath = "/template/processor/0.1/jobs/{jobId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); + String localVarPath = "/template/processor/0.1/jobs/{jobId}" + .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); List localVarQueryParams = new ArrayList(); @@ -114,6 +105,24 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch String[] localVarAuthNames = new String[] { "oauth2schema" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getJobValidateBeforeCall(String jobId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException("Missing the required parameter 'jobId' when calling getJob(Async)"); + } + + + com.squareup.okhttp.Call call = getJobCall(jobId, progressListener, progressRequestListener); + return call; + + + + + } /** @@ -136,7 +145,7 @@ public MergeJobResponse getJob(String jobId) throws ApiException { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse getJobWithHttpInfo(String jobId) throws ApiException { - com.squareup.okhttp.Call call = getJobCall(jobId, null, null); + com.squareup.okhttp.Call call = getJobValidateBeforeCall(jobId, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -170,18 +179,24 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = getJobCall(jobId, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = getJobValidateBeforeCall(jobId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } - /* Build call for getJobs */ - private com.squareup.okhttp.Call getJobsCall(List status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + /** + * Build call for getJobs + * @param status A list of status to filter on. (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getJobsCall(List status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; - // create path and map variables - String localVarPath = "/template/processor/0.1/jobs".replaceAll("\\{format\\}","json"); + String localVarPath = "/template/processor/0.1/jobs"; List localVarQueryParams = new ArrayList(); if (status != null) @@ -217,6 +232,19 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch String[] localVarAuthNames = new String[] { "oauth2schema" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getJobsValidateBeforeCall(List status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = getJobsCall(status, progressListener, progressRequestListener); + return call; + + + + + } /** @@ -239,7 +267,7 @@ public List getJobs(List status) throws ApiException { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse> getJobsWithHttpInfo(List status) throws ApiException { - com.squareup.okhttp.Call call = getJobsCall(status, null, null); + com.squareup.okhttp.Call call = getJobsValidateBeforeCall(status, null, null); Type localVarReturnType = new TypeToken>(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -273,30 +301,26 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = getJobsCall(status, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = getJobsValidateBeforeCall(status, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } - /* Build call for getResultStreamById */ - private com.squareup.okhttp.Call getResultStreamByIdCall(String jobId, String streamId, OutputSettings outputSettings, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = outputSettings; - - // verify the required parameter 'jobId' is set - if (jobId == null) { - throw new ApiException("Missing the required parameter 'jobId' when calling getResultStreamById(Async)"); - } - - // verify the required parameter 'streamId' is set - if (streamId == null) { - throw new ApiException("Missing the required parameter 'streamId' when calling getResultStreamById(Async)"); - } + /** + * Build call for getResultStream + * @param jobId jobId (required) + * @param resultStreamRequest resultStreamRequest (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getResultStreamCall(String jobId, ResultStreamRequest resultStreamRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = resultStreamRequest; - // create path and map variables - String localVarPath = "/template/processor/0.1/jobs/{jobId}/result/file/{streamId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())) - .replaceAll("\\{" + "streamId" + "\\}", apiClient.escapeString(streamId.toString())); + String localVarPath = "/template/processor/0.1/jobs/{jobId}/result/stream" + .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); List localVarQueryParams = new ArrayList(); @@ -330,19 +354,41 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch String[] localVarAuthNames = new String[] { "oauth2schema" }; return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getResultStreamValidateBeforeCall(String jobId, ResultStreamRequest resultStreamRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException("Missing the required parameter 'jobId' when calling getResultStream(Async)"); + } + + // verify the required parameter 'resultStreamRequest' is set + if (resultStreamRequest == null) { + throw new ApiException("Missing the required parameter 'resultStreamRequest' when calling getResultStream(Async)"); + } + + + com.squareup.okhttp.Call call = getResultStreamCall(jobId, resultStreamRequest, progressListener, progressRequestListener); + return call; + + + + + } /** * Get the result file * Get a merge result document as a binary stream. * @param jobId jobId (required) - * @param streamId streamId (required) - * @param outputSettings outputSettings (optional) + * @param resultStreamRequest resultStreamRequest (required) * @return byte[] * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public byte[] getResultStreamById(String jobId, String streamId, OutputSettings outputSettings) throws ApiException { - ApiResponse resp = getResultStreamByIdWithHttpInfo(jobId, streamId, outputSettings); + public byte[] getResultStream(String jobId, ResultStreamRequest resultStreamRequest) throws ApiException { + ApiResponse resp = getResultStreamWithHttpInfo(jobId, resultStreamRequest); return resp.getData(); } @@ -350,13 +396,12 @@ public byte[] getResultStreamById(String jobId, String streamId, OutputSettings * Get the result file * Get a merge result document as a binary stream. * @param jobId jobId (required) - * @param streamId streamId (required) - * @param outputSettings outputSettings (optional) + * @param resultStreamRequest resultStreamRequest (required) * @return ApiResponse<byte[]> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse getResultStreamByIdWithHttpInfo(String jobId, String streamId, OutputSettings outputSettings) throws ApiException { - com.squareup.okhttp.Call call = getResultStreamByIdCall(jobId, streamId, outputSettings, null, null); + public ApiResponse getResultStreamWithHttpInfo(String jobId, ResultStreamRequest resultStreamRequest) throws ApiException { + com.squareup.okhttp.Call call = getResultStreamValidateBeforeCall(jobId, resultStreamRequest, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -365,13 +410,12 @@ public ApiResponse getResultStreamByIdWithHttpInfo(String jobId, String * Get the result file (asynchronously) * Get a merge result document as a binary stream. * @param jobId jobId (required) - * @param streamId streamId (required) - * @param outputSettings outputSettings (optional) + * @param resultStreamRequest resultStreamRequest (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public com.squareup.okhttp.Call getResultStreamByIdAsync(String jobId, String streamId, OutputSettings outputSettings, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call getResultStreamAsync(String jobId, ResultStreamRequest resultStreamRequest, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -392,24 +436,26 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = getResultStreamByIdCall(jobId, streamId, outputSettings, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = getResultStreamValidateBeforeCall(jobId, resultStreamRequest, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } - /* Build call for getResultStreamsAsContainer */ - private com.squareup.okhttp.Call getResultStreamsAsContainerCall(String jobId, OutputSettings outputSettings, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + /** + * Build call for getResultStreamsAsContainer + * @param jobId jobId (required) + * @param outputSettings outputSettings (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getResultStreamsAsContainerCall(String jobId, OutputSettings outputSettings, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = outputSettings; - // verify the required parameter 'jobId' is set - if (jobId == null) { - throw new ApiException("Missing the required parameter 'jobId' when calling getResultStreamsAsContainer(Async)"); - } - - // create path and map variables - String localVarPath = "/template/processor/0.1/jobs/{jobId}/result/container".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); + String localVarPath = "/template/processor/0.1/jobs/{jobId}/result/container" + .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); List localVarQueryParams = new ArrayList(); @@ -443,6 +489,24 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch String[] localVarAuthNames = new String[] { "oauth2schema" }; return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getResultStreamsAsContainerValidateBeforeCall(String jobId, OutputSettings outputSettings, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException("Missing the required parameter 'jobId' when calling getResultStreamsAsContainer(Async)"); + } + + + com.squareup.okhttp.Call call = getResultStreamsAsContainerCall(jobId, outputSettings, progressListener, progressRequestListener); + return call; + + + + + } /** @@ -467,7 +531,7 @@ public byte[] getResultStreamsAsContainer(String jobId, OutputSettings outputSet * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse getResultStreamsAsContainerWithHttpInfo(String jobId, OutputSettings outputSettings) throws ApiException { - com.squareup.okhttp.Call call = getResultStreamsAsContainerCall(jobId, outputSettings, null, null); + com.squareup.okhttp.Call call = getResultStreamsAsContainerValidateBeforeCall(jobId, outputSettings, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -502,23 +566,24 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = getResultStreamsAsContainerCall(jobId, outputSettings, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = getResultStreamsAsContainerValidateBeforeCall(jobId, outputSettings, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } - /* Build call for submitJob */ - private com.squareup.okhttp.Call submitJobCall(MergeSettings mergesettings, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + /** + * Build call for submitJob + * @param mergesettings The merge- and output settings (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call submitJobCall(MergeSettings mergesettings, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = mergesettings; - // verify the required parameter 'mergesettings' is set - if (mergesettings == null) { - throw new ApiException("Missing the required parameter 'mergesettings' when calling submitJob(Async)"); - } - - // create path and map variables - String localVarPath = "/template/processor/0.1/jobs".replaceAll("\\{format\\}","json"); + String localVarPath = "/template/processor/0.1/jobs"; List localVarQueryParams = new ArrayList(); @@ -552,6 +617,24 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch String[] localVarAuthNames = new String[] { "oauth2schema" }; return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call submitJobValidateBeforeCall(MergeSettings mergesettings, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'mergesettings' is set + if (mergesettings == null) { + throw new ApiException("Missing the required parameter 'mergesettings' when calling submitJob(Async)"); + } + + + com.squareup.okhttp.Call call = submitJobCall(mergesettings, progressListener, progressRequestListener); + return call; + + + + + } /** @@ -574,7 +657,7 @@ public MergeJobResponse submitJob(MergeSettings mergesettings) throws ApiExcepti * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse submitJobWithHttpInfo(MergeSettings mergesettings) throws ApiException { - com.squareup.okhttp.Call call = submitJobCall(mergesettings, null, null); + com.squareup.okhttp.Call call = submitJobValidateBeforeCall(mergesettings, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -608,7 +691,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = submitJobCall(mergesettings, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = submitJobValidateBeforeCall(mergesettings, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/MergeApi.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/MergeApi.java deleted file mode 100644 index cab4a16..0000000 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/MergeApi.java +++ /dev/null @@ -1,1483 +0,0 @@ -/* - * OfficeTextMerge - * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -package com.sphereon.sdk.template_processor.api; - -import com.sphereon.sdk.template_processor.handler.ApiCallback; -import com.sphereon.sdk.template_processor.handler.ApiClient; -import com.sphereon.sdk.template_processor.handler.ApiException; -import com.sphereon.sdk.template_processor.handler.ApiResponse; -import com.sphereon.sdk.template_processor.handler.Configuration; -import com.sphereon.sdk.template_processor.handler.Pair; -import com.sphereon.sdk.template_processor.handler.ProgressRequestBody; -import com.sphereon.sdk.template_processor.handler.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - -import com.sphereon.sdk.template_processor.model.DataSetResponse; -import com.sphereon.sdk.template_processor.model.ErrorResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextRequest; -import com.sphereon.sdk.template_processor.model.MergeJobResponse; -import com.sphereon.sdk.template_processor.model.OutputSettings; -import com.sphereon.sdk.template_processor.model.MergeSettings; -import java.io.File; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public class MergeApi { - private ApiClient apiClient; - - public MergeApi() { - this(Configuration.getDefaultApiClient()); - } - - public MergeApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - public ApiClient getApiClient() { - return apiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /* Build call for createDataSet */ - private com.squareup.okhttp.Call createDataSetCall(String payload, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = payload; - - // verify the required parameter 'payload' is set - if (payload == null) { - throw new ApiException("Missing the required parameter 'payload' when calling createDataSet(Async)"); - } - - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/datasets".replaceAll("\\{format\\}","json"); - - List localVarQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json;charset=UTF-8" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - "application/json;charset=UTF-8" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - /** - * Store dataset - * Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - * @param payload The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] (required) - * @return DataSetResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public DataSetResponse createDataSet(String payload) throws ApiException { - ApiResponse resp = createDataSetWithHttpInfo(payload); - return resp.getData(); - } - - /** - * Store dataset - * Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - * @param payload The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] (required) - * @return ApiResponse<DataSetResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse createDataSetWithHttpInfo(String payload) throws ApiException { - com.squareup.okhttp.Call call = createDataSetCall(payload, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); - } - - /** - * Store dataset (asynchronously) - * Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - * @param payload The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call createDataSetAsync(String payload, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = createDataSetCall(payload, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; - } - /* Build call for createTemplateContext */ - private com.squareup.okhttp.Call createTemplateContextCall(TemplateContextRequest templateRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = templateRequest; - - // verify the required parameter 'templateRequest' is set - if (templateRequest == null) { - throw new ApiException("Missing the required parameter 'templateRequest' when calling createTemplateContext(Async)"); - } - - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/templates".replaceAll("\\{format\\}","json"); - - List localVarQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json;charset=UTF-8" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - "application/json;charset=UTF-8" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - /** - * Create template context - * Create a unique template context for your environment - * @param templateRequest The template request (required) - * @return TemplateContextResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public TemplateContextResponse createTemplateContext(TemplateContextRequest templateRequest) throws ApiException { - ApiResponse resp = createTemplateContextWithHttpInfo(templateRequest); - return resp.getData(); - } - - /** - * Create template context - * Create a unique template context for your environment - * @param templateRequest The template request (required) - * @return ApiResponse<TemplateContextResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse createTemplateContextWithHttpInfo(TemplateContextRequest templateRequest) throws ApiException { - com.squareup.okhttp.Call call = createTemplateContextCall(templateRequest, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); - } - - /** - * Create template context (asynchronously) - * Create a unique template context for your environment - * @param templateRequest The template request (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call createTemplateContextAsync(TemplateContextRequest templateRequest, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = createTemplateContextCall(templateRequest, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; - } - /* Build call for deleteDataSet */ - private com.squareup.okhttp.Call deleteDataSetCall(String dataSetId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'dataSetId' is set - if (dataSetId == null) { - throw new ApiException("Missing the required parameter 'dataSetId' when calling deleteDataSet(Async)"); - } - - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/datasets/{dataSetId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "dataSetId" + "\\}", apiClient.escapeString(dataSetId.toString())); - - List localVarQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json;charset=UTF-8" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - /** - * Delete a stored data set - * Delete a stored data set - * @param dataSetId dataSetId (required) - * @return DataSetResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public DataSetResponse deleteDataSet(String dataSetId) throws ApiException { - ApiResponse resp = deleteDataSetWithHttpInfo(dataSetId); - return resp.getData(); - } - - /** - * Delete a stored data set - * Delete a stored data set - * @param dataSetId dataSetId (required) - * @return ApiResponse<DataSetResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse deleteDataSetWithHttpInfo(String dataSetId) throws ApiException { - com.squareup.okhttp.Call call = deleteDataSetCall(dataSetId, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); - } - - /** - * Delete a stored data set (asynchronously) - * Delete a stored data set - * @param dataSetId dataSetId (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call deleteDataSetAsync(String dataSetId, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = deleteDataSetCall(dataSetId, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; - } - /* Build call for deleteJob */ - private com.squareup.okhttp.Call deleteJobCall(String jobId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'jobId' is set - if (jobId == null) { - throw new ApiException("Missing the required parameter 'jobId' when calling deleteJob(Async)"); - } - - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/jobs/{jobId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); - - List localVarQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json;charset=UTF-8" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - /** - * Delete a job manually - * Delete the merge job and all related files - * @param jobId jobId (required) - * @return MergeJobResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public MergeJobResponse deleteJob(String jobId) throws ApiException { - ApiResponse resp = deleteJobWithHttpInfo(jobId); - return resp.getData(); - } - - /** - * Delete a job manually - * Delete the merge job and all related files - * @param jobId jobId (required) - * @return ApiResponse<MergeJobResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse deleteJobWithHttpInfo(String jobId) throws ApiException { - com.squareup.okhttp.Call call = deleteJobCall(jobId, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); - } - - /** - * Delete a job manually (asynchronously) - * Delete the merge job and all related files - * @param jobId jobId (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call deleteJobAsync(String jobId, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = deleteJobCall(jobId, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; - } - /* Build call for deleteTemplateContext */ - private com.squareup.okhttp.Call deleteTemplateContextCall(String templateId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'templateId' is set - if (templateId == null) { - throw new ApiException("Missing the required parameter 'templateId' when calling deleteTemplateContext(Async)"); - } - - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/templates/{templateId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); - - List localVarQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json;charset=UTF-8" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - /** - * Delete template context - * Delete a template context with all history - * @param templateId templateId (required) - * @return TemplateContextResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public TemplateContextResponse deleteTemplateContext(String templateId) throws ApiException { - ApiResponse resp = deleteTemplateContextWithHttpInfo(templateId); - return resp.getData(); - } - - /** - * Delete template context - * Delete a template context with all history - * @param templateId templateId (required) - * @return ApiResponse<TemplateContextResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse deleteTemplateContextWithHttpInfo(String templateId) throws ApiException { - com.squareup.okhttp.Call call = deleteTemplateContextCall(templateId, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); - } - - /** - * Delete template context (asynchronously) - * Delete a template context with all history - * @param templateId templateId (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call deleteTemplateContextAsync(String templateId, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = deleteTemplateContextCall(templateId, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; - } - /* Build call for getJob */ - private com.squareup.okhttp.Call getJobCall(String jobId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'jobId' is set - if (jobId == null) { - throw new ApiException("Missing the required parameter 'jobId' when calling getJob(Async)"); - } - - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/jobs/{jobId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); - - List localVarQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json;charset=UTF-8" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - /** - * Job definition and state - * Get the merge job definition and current state. Please not that you can differentiate based on http response status - * @param jobId jobId (required) - * @return MergeJobResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public MergeJobResponse getJob(String jobId) throws ApiException { - ApiResponse resp = getJobWithHttpInfo(jobId); - return resp.getData(); - } - - /** - * Job definition and state - * Get the merge job definition and current state. Please not that you can differentiate based on http response status - * @param jobId jobId (required) - * @return ApiResponse<MergeJobResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse getJobWithHttpInfo(String jobId) throws ApiException { - com.squareup.okhttp.Call call = getJobCall(jobId, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); - } - - /** - * Job definition and state (asynchronously) - * Get the merge job definition and current state. Please not that you can differentiate based on http response status - * @param jobId jobId (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call getJobAsync(String jobId, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = getJobCall(jobId, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; - } - /* Build call for getJobs */ - private com.squareup.okhttp.Call getJobsCall(List status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/jobs".replaceAll("\\{format\\}","json"); - - List localVarQueryParams = new ArrayList(); - if (status != null) - localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "status", status)); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json;charset=UTF-8" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - /** - * Get all jobs - * Get all office text job definitions and their current state. - * @param status A list of status to filter on. (optional) - * @return List<MergeJobResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public List getJobs(List status) throws ApiException { - ApiResponse> resp = getJobsWithHttpInfo(status); - return resp.getData(); - } - - /** - * Get all jobs - * Get all office text job definitions and their current state. - * @param status A list of status to filter on. (optional) - * @return ApiResponse<List<MergeJobResponse>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse> getJobsWithHttpInfo(List status) throws ApiException { - com.squareup.okhttp.Call call = getJobsCall(status, null, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return apiClient.execute(call, localVarReturnType); - } - - /** - * Get all jobs (asynchronously) - * Get all office text job definitions and their current state. - * @param status A list of status to filter on. (optional) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call getJobsAsync(List status, final ApiCallback> callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = getJobsCall(status, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken>(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; - } - /* Build call for getResultStreamById */ - private com.squareup.okhttp.Call getResultStreamByIdCall(String jobId, String streamId, OutputSettings outputSettings, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = outputSettings; - - // verify the required parameter 'jobId' is set - if (jobId == null) { - throw new ApiException("Missing the required parameter 'jobId' when calling getResultStreamById(Async)"); - } - - // verify the required parameter 'streamId' is set - if (streamId == null) { - throw new ApiException("Missing the required parameter 'streamId' when calling getResultStreamById(Async)"); - } - - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())) - .replaceAll("\\{" + "streamId" + "\\}", apiClient.escapeString(streamId.toString())); - - List localVarQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/octet-stream" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - "application/json;charset=UTF-8" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - /** - * Get the result file - * Get a merge result document as a binary stream. - * @param jobId jobId (required) - * @param streamId streamId (required) - * @param outputSettings outputSettings (optional) - * @return byte[] - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public byte[] getResultStreamById(String jobId, String streamId, OutputSettings outputSettings) throws ApiException { - ApiResponse resp = getResultStreamByIdWithHttpInfo(jobId, streamId, outputSettings); - return resp.getData(); - } - - /** - * Get the result file - * Get a merge result document as a binary stream. - * @param jobId jobId (required) - * @param streamId streamId (required) - * @param outputSettings outputSettings (optional) - * @return ApiResponse<byte[]> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse getResultStreamByIdWithHttpInfo(String jobId, String streamId, OutputSettings outputSettings) throws ApiException { - com.squareup.okhttp.Call call = getResultStreamByIdCall(jobId, streamId, outputSettings, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); - } - - /** - * Get the result file (asynchronously) - * Get a merge result document as a binary stream. - * @param jobId jobId (required) - * @param streamId streamId (required) - * @param outputSettings outputSettings (optional) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call getResultStreamByIdAsync(String jobId, String streamId, OutputSettings outputSettings, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = getResultStreamByIdCall(jobId, streamId, outputSettings, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; - } - /* Build call for getResultStreamsAsContainer */ - private com.squareup.okhttp.Call getResultStreamsAsContainerCall(String jobId, OutputSettings outputSettings, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = outputSettings; - - // verify the required parameter 'jobId' is set - if (jobId == null) { - throw new ApiException("Missing the required parameter 'jobId' when calling getResultStreamsAsContainer(Async)"); - } - - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/jobs/{jobId}/result/container".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "jobId" + "\\}", apiClient.escapeString(jobId.toString())); - - List localVarQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/octet-stream" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - "application/json;charset=UTF-8" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - /** - * Get the result file - * Get all documents inside a compressed container as a binary stream. - * @param jobId jobId (required) - * @param outputSettings outputSettings (optional) - * @return byte[] - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public byte[] getResultStreamsAsContainer(String jobId, OutputSettings outputSettings) throws ApiException { - ApiResponse resp = getResultStreamsAsContainerWithHttpInfo(jobId, outputSettings); - return resp.getData(); - } - - /** - * Get the result file - * Get all documents inside a compressed container as a binary stream. - * @param jobId jobId (required) - * @param outputSettings outputSettings (optional) - * @return ApiResponse<byte[]> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse getResultStreamsAsContainerWithHttpInfo(String jobId, OutputSettings outputSettings) throws ApiException { - com.squareup.okhttp.Call call = getResultStreamsAsContainerCall(jobId, outputSettings, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); - } - - /** - * Get the result file (asynchronously) - * Get all documents inside a compressed container as a binary stream. - * @param jobId jobId (required) - * @param outputSettings outputSettings (optional) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call getResultStreamsAsContainerAsync(String jobId, OutputSettings outputSettings, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = getResultStreamsAsContainerCall(jobId, outputSettings, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; - } - /* Build call for getTemplateContext */ - private com.squareup.okhttp.Call getTemplateContextCall(String templateId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'templateId' is set - if (templateId == null) { - throw new ApiException("Missing the required parameter 'templateId' when calling getTemplateContext(Async)"); - } - - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/templates/{templateId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); - - List localVarQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json;charset=UTF-8" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - /** - * Get template context - * Get an existing template context - * @param templateId The template context name unique for your environment (required) - * @return TemplateContextResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public TemplateContextResponse getTemplateContext(String templateId) throws ApiException { - ApiResponse resp = getTemplateContextWithHttpInfo(templateId); - return resp.getData(); - } - - /** - * Get template context - * Get an existing template context - * @param templateId The template context name unique for your environment (required) - * @return ApiResponse<TemplateContextResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse getTemplateContextWithHttpInfo(String templateId) throws ApiException { - com.squareup.okhttp.Call call = getTemplateContextCall(templateId, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); - } - - /** - * Get template context (asynchronously) - * Get an existing template context - * @param templateId The template context name unique for your environment (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call getTemplateContextAsync(String templateId, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = getTemplateContextCall(templateId, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; - } - /* Build call for submitJob */ - private com.squareup.okhttp.Call submitJobCall(MergeSettings mergesettings, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = mergesettings; - - // verify the required parameter 'mergesettings' is set - if (mergesettings == null) { - throw new ApiException("Missing the required parameter 'mergesettings' when calling submitJob(Async)"); - } - - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/jobs".replaceAll("\\{format\\}","json"); - - List localVarQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json;charset=UTF-8" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - "application/json;charset=UTF-8" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - /** - * Submit merge job for processing - * Submit merge job run. - * @param mergesettings The merge- and output settings (required) - * @return MergeJobResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public MergeJobResponse submitJob(MergeSettings mergesettings) throws ApiException { - ApiResponse resp = submitJobWithHttpInfo(mergesettings); - return resp.getData(); - } - - /** - * Submit merge job for processing - * Submit merge job run. - * @param mergesettings The merge- and output settings (required) - * @return ApiResponse<MergeJobResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse submitJobWithHttpInfo(MergeSettings mergesettings) throws ApiException { - com.squareup.okhttp.Call call = submitJobCall(mergesettings, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); - } - - /** - * Submit merge job for processing (asynchronously) - * Submit merge job run. - * @param mergesettings The merge- and output settings (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call submitJobAsync(MergeSettings mergesettings, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = submitJobCall(mergesettings, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; - } - /* Build call for updateTemplateContext */ - private com.squareup.okhttp.Call updateTemplateContextCall(TemplateContextRequest templateContextRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = templateContextRequest; - - // verify the required parameter 'templateContextRequest' is set - if (templateContextRequest == null) { - throw new ApiException("Missing the required parameter 'templateContextRequest' when calling updateTemplateContext(Async)"); - } - - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/templates".replaceAll("\\{format\\}","json"); - - List localVarQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json;charset=UTF-8" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - "application/json;charset=UTF-8" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - /** - * Update template context - * Update an existing template context for your environment - * @param templateContextRequest templateContextRequest (required) - * @return TemplateContextResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public TemplateContextResponse updateTemplateContext(TemplateContextRequest templateContextRequest) throws ApiException { - ApiResponse resp = updateTemplateContextWithHttpInfo(templateContextRequest); - return resp.getData(); - } - - /** - * Update template context - * Update an existing template context for your environment - * @param templateContextRequest templateContextRequest (required) - * @return ApiResponse<TemplateContextResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse updateTemplateContextWithHttpInfo(TemplateContextRequest templateContextRequest) throws ApiException { - com.squareup.okhttp.Call call = updateTemplateContextCall(templateContextRequest, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); - } - - /** - * Update template context (asynchronously) - * Update an existing template context for your environment - * @param templateContextRequest templateContextRequest (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call updateTemplateContextAsync(TemplateContextRequest templateContextRequest, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = updateTemplateContextCall(templateContextRequest, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; - } - /* Build call for uploadTemplateFile */ - private com.squareup.okhttp.Call uploadTemplateFileCall(String templateId, File stream, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'templateId' is set - if (templateId == null) { - throw new ApiException("Missing the required parameter 'templateId' when calling uploadTemplateFile(Async)"); - } - - // verify the required parameter 'stream' is set - if (stream == null) { - throw new ApiException("Missing the required parameter 'stream' when calling uploadTemplateFile(Async)"); - } - - - // create path and map variables - String localVarPath = "/template-processor/merge/0.1/templates/{templateId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); - - List localVarQueryParams = new ArrayList(); - - Map localVarHeaderParams = new HashMap(); - - Map localVarFormParams = new HashMap(); - if (stream != null) - localVarFormParams.put("stream", stream); - - final String[] localVarAccepts = { - "application/json;charset=UTF-8" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); - - final String[] localVarContentTypes = { - "multipart/form-data" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { - @Override - public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { - com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); - return originalResponse.newBuilder() - .body(new ProgressResponseBody(originalResponse.body(), progressListener)) - .build(); - } - }); - } - - String[] localVarAuthNames = new String[] { "oauth2schema" }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); - } - - /** - * Upload template file - * Upload the Office template file - * @param templateId The template context name unique for your environment (required) - * @param stream The template (file/inputstream) to store (required) - * @return TemplateContextResponse - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public TemplateContextResponse uploadTemplateFile(String templateId, File stream) throws ApiException { - ApiResponse resp = uploadTemplateFileWithHttpInfo(templateId, stream); - return resp.getData(); - } - - /** - * Upload template file - * Upload the Office template file - * @param templateId The template context name unique for your environment (required) - * @param stream The template (file/inputstream) to store (required) - * @return ApiResponse<TemplateContextResponse> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - */ - public ApiResponse uploadTemplateFileWithHttpInfo(String templateId, File stream) throws ApiException { - com.squareup.okhttp.Call call = uploadTemplateFileCall(templateId, stream, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); - } - - /** - * Upload template file (asynchronously) - * Upload the Office template file - * @param templateId The template context name unique for your environment (required) - * @param stream The template (file/inputstream) to store (required) - * @param callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - */ - public com.squareup.okhttp.Call uploadTemplateFileAsync(String templateId, File stream, final ApiCallback callback) throws ApiException { - - ProgressResponseBody.ProgressListener progressListener = null; - ProgressRequestBody.ProgressRequestListener progressRequestListener = null; - - if (callback != null) { - progressListener = new ProgressResponseBody.ProgressListener() { - @Override - public void update(long bytesRead, long contentLength, boolean done) { - callback.onDownloadProgress(bytesRead, contentLength, done); - } - }; - - progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { - @Override - public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { - callback.onUploadProgress(bytesWritten, contentLength, done); - } - }; - } - - com.squareup.okhttp.Call call = uploadTemplateFileCall(templateId, stream, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); - return call; - } -} diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/TemplateApi.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/TemplateApi.java index e7def3e..288ff4e 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/TemplateApi.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/TemplateApi.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -38,11 +26,12 @@ import java.io.IOException; -import com.sphereon.sdk.template_processor.model.TemplateContextResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextRequest; + import com.sphereon.sdk.template_processor.model.ErrorResponse; -import com.sphereon.sdk.template_processor.model.TemplateContext; import java.io.File; +import com.sphereon.sdk.template_processor.model.TemplateContext; +import com.sphereon.sdk.template_processor.model.TemplateContextRequest; +import com.sphereon.sdk.template_processor.model.TemplateContextResponse; import java.lang.reflect.Type; import java.util.ArrayList; @@ -69,18 +58,19 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } - /* Build call for createTemplateContext */ - private com.squareup.okhttp.Call createTemplateContextCall(TemplateContextRequest templateRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + /** + * Build call for createTemplateContext + * @param templateRequest The template request (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call createTemplateContextCall(TemplateContextRequest templateRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = templateRequest; - // verify the required parameter 'templateRequest' is set - if (templateRequest == null) { - throw new ApiException("Missing the required parameter 'templateRequest' when calling createTemplateContext(Async)"); - } - - // create path and map variables - String localVarPath = "/template/processor/0.1/templates".replaceAll("\\{format\\}","json"); + String localVarPath = "/template/processor/0.1/templates"; List localVarQueryParams = new ArrayList(); @@ -114,6 +104,24 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch String[] localVarAuthNames = new String[] { "oauth2schema" }; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call createTemplateContextValidateBeforeCall(TemplateContextRequest templateRequest, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'templateRequest' is set + if (templateRequest == null) { + throw new ApiException("Missing the required parameter 'templateRequest' when calling createTemplateContext(Async)"); + } + + + com.squareup.okhttp.Call call = createTemplateContextCall(templateRequest, progressListener, progressRequestListener); + return call; + + + + + } /** @@ -136,7 +144,7 @@ public TemplateContextResponse createTemplateContext(TemplateContextRequest temp * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse createTemplateContextWithHttpInfo(TemplateContextRequest templateRequest) throws ApiException { - com.squareup.okhttp.Call call = createTemplateContextCall(templateRequest, null, null); + com.squareup.okhttp.Call call = createTemplateContextValidateBeforeCall(templateRequest, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -170,24 +178,25 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = createTemplateContextCall(templateRequest, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = createTemplateContextValidateBeforeCall(templateRequest, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } - /* Build call for deleteTemplateContext */ - private com.squareup.okhttp.Call deleteTemplateContextCall(String templateId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + /** + * Build call for deleteTemplateContext + * @param templateId templateId (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call deleteTemplateContextCall(String templateId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'templateId' is set - if (templateId == null) { - throw new ApiException("Missing the required parameter 'templateId' when calling deleteTemplateContext(Async)"); - } - - // create path and map variables - String localVarPath = "/template/processor/0.1/templates/{templateId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); + String localVarPath = "/template/processor/0.1/templates/{templateId}" + .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); List localVarQueryParams = new ArrayList(); @@ -221,6 +230,24 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch String[] localVarAuthNames = new String[] { "oauth2schema" }; return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call deleteTemplateContextValidateBeforeCall(String templateId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException("Missing the required parameter 'templateId' when calling deleteTemplateContext(Async)"); + } + + + com.squareup.okhttp.Call call = deleteTemplateContextCall(templateId, progressListener, progressRequestListener); + return call; + + + + + } /** @@ -243,7 +270,7 @@ public TemplateContextResponse deleteTemplateContext(String templateId) throws A * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse deleteTemplateContextWithHttpInfo(String templateId) throws ApiException { - com.squareup.okhttp.Call call = deleteTemplateContextCall(templateId, null, null); + com.squareup.okhttp.Call call = deleteTemplateContextValidateBeforeCall(templateId, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -277,24 +304,25 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = deleteTemplateContextCall(templateId, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = deleteTemplateContextValidateBeforeCall(templateId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } - /* Build call for getTemplateContext */ - private com.squareup.okhttp.Call getTemplateContextCall(String templateId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + /** + * Build call for getTemplateContext + * @param templateId The template context name unique for your environment (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getTemplateContextCall(String templateId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'templateId' is set - if (templateId == null) { - throw new ApiException("Missing the required parameter 'templateId' when calling getTemplateContext(Async)"); - } - - // create path and map variables - String localVarPath = "/template/processor/0.1/templates/{templateId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); + String localVarPath = "/template/processor/0.1/templates/{templateId}" + .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); List localVarQueryParams = new ArrayList(); @@ -328,6 +356,24 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch String[] localVarAuthNames = new String[] { "oauth2schema" }; return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getTemplateContextValidateBeforeCall(String templateId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException("Missing the required parameter 'templateId' when calling getTemplateContext(Async)"); + } + + + com.squareup.okhttp.Call call = getTemplateContextCall(templateId, progressListener, progressRequestListener); + return call; + + + + + } /** @@ -350,7 +396,7 @@ public TemplateContextResponse getTemplateContext(String templateId) throws ApiE * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse getTemplateContextWithHttpInfo(String templateId) throws ApiException { - com.squareup.okhttp.Call call = getTemplateContextCall(templateId, null, null); + com.squareup.okhttp.Call call = getTemplateContextValidateBeforeCall(templateId, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -384,23 +430,24 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = getTemplateContextCall(templateId, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = getTemplateContextValidateBeforeCall(templateId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } - /* Build call for updateTemplateContext */ - private com.squareup.okhttp.Call updateTemplateContextCall(TemplateContext templateContext, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + /** + * Build call for updateTemplateContext + * @param templateContext templateContext (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call updateTemplateContextCall(TemplateContext templateContext, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = templateContext; - // verify the required parameter 'templateContext' is set - if (templateContext == null) { - throw new ApiException("Missing the required parameter 'templateContext' when calling updateTemplateContext(Async)"); - } - - // create path and map variables - String localVarPath = "/template/processor/0.1/templates".replaceAll("\\{format\\}","json"); + String localVarPath = "/template/processor/0.1/templates"; List localVarQueryParams = new ArrayList(); @@ -434,6 +481,24 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch String[] localVarAuthNames = new String[] { "oauth2schema" }; return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call updateTemplateContextValidateBeforeCall(TemplateContext templateContext, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'templateContext' is set + if (templateContext == null) { + throw new ApiException("Missing the required parameter 'templateContext' when calling updateTemplateContext(Async)"); + } + + + com.squareup.okhttp.Call call = updateTemplateContextCall(templateContext, progressListener, progressRequestListener); + return call; + + + + + } /** @@ -456,7 +521,7 @@ public TemplateContextResponse updateTemplateContext(TemplateContext templateCon * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse updateTemplateContextWithHttpInfo(TemplateContext templateContext) throws ApiException { - com.squareup.okhttp.Call call = updateTemplateContextCall(templateContext, null, null); + com.squareup.okhttp.Call call = updateTemplateContextValidateBeforeCall(templateContext, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -490,29 +555,26 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = updateTemplateContextCall(templateContext, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = updateTemplateContextValidateBeforeCall(templateContext, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } - /* Build call for uploadTemplateFile */ - private com.squareup.okhttp.Call uploadTemplateFileCall(String templateId, File stream, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + /** + * Build call for uploadTemplateFile + * @param templateId The template context name unique for your environment (required) + * @param stream The template (file/inputstream) to store (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call uploadTemplateFileCall(String templateId, File stream, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'templateId' is set - if (templateId == null) { - throw new ApiException("Missing the required parameter 'templateId' when calling uploadTemplateFile(Async)"); - } - - // verify the required parameter 'stream' is set - if (stream == null) { - throw new ApiException("Missing the required parameter 'stream' when calling uploadTemplateFile(Async)"); - } - - // create path and map variables - String localVarPath = "/template/processor/0.1/templates/{templateId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); + String localVarPath = "/template/processor/0.1/templates/{templateId}" + .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); List localVarQueryParams = new ArrayList(); @@ -548,6 +610,29 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch String[] localVarAuthNames = new String[] { "oauth2schema" }; return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call uploadTemplateFileValidateBeforeCall(String templateId, File stream, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'templateId' is set + if (templateId == null) { + throw new ApiException("Missing the required parameter 'templateId' when calling uploadTemplateFile(Async)"); + } + + // verify the required parameter 'stream' is set + if (stream == null) { + throw new ApiException("Missing the required parameter 'stream' when calling uploadTemplateFile(Async)"); + } + + + com.squareup.okhttp.Call call = uploadTemplateFileCall(templateId, stream, progressListener, progressRequestListener); + return call; + + + + + } /** @@ -572,7 +657,7 @@ public TemplateContextResponse uploadTemplateFile(String templateId, File stream * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse uploadTemplateFileWithHttpInfo(String templateId, File stream) throws ApiException { - com.squareup.okhttp.Call call = uploadTemplateFileCall(templateId, stream, null, null); + com.squareup.okhttp.Call call = uploadTemplateFileValidateBeforeCall(templateId, stream, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -607,7 +692,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = uploadTemplateFileCall(templateId, stream, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = uploadTemplateFileValidateBeforeCall(templateId, stream, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiCallback.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiCallback.java index 2f62ab3..3f16e11 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiCallback.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiCallback.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java index ffcb2bc..c25a3df 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -124,7 +112,7 @@ public class ApiClient { */ public static final String LENIENT_DATETIME_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ"; - private String basePath = "https://gw.api.cloud.sphereon.com/"; + private String basePath = "https://gw.api.cloud.sphereon.com"; private boolean lenientOnJson = false; private boolean debugging = false; private Map defaultHeaderMap = new HashMap(); @@ -139,6 +127,7 @@ public class ApiClient { private InputStream sslCaCert; private boolean verifyingSsl; + private KeyManager[] keyManagers; private OkHttpClient httpClient; private JSON json; @@ -151,6 +140,7 @@ public class ApiClient { public ApiClient() { httpClient = new OkHttpClient(); + verifyingSsl = true; json = new JSON(this); @@ -169,7 +159,7 @@ public ApiClient() { this.lenientDatetimeFormat = true; // Set default User-Agent. - setUserAgent("Swagger-Codegen/0.1.0/java"); + setUserAgent("Swagger-Codegen/0.1.1/java"); // Setup authentications (key: authentication name, value: authentication). authentications = new HashMap(); @@ -190,7 +180,7 @@ public String getBasePath() { /** * Set base path * - * @param basePath Base path of the URL (e.g https://gw.api.cloud.sphereon.com/ + * @param basePath Base path of the URL (e.g https://gw.api.cloud.sphereon.com * @return An instance of OkHttpClient */ public ApiClient setBasePath(String basePath) { @@ -283,6 +273,23 @@ public ApiClient setSslCaCert(InputStream sslCaCert) { return this; } + public KeyManager[] getKeyManagers() { + return keyManagers; + } + + /** + * Configure client keys to use for authorization in an SSL session. + * Use null to reset to default. + * + * @param managers The KeyManagers to use + * @return ApiClient + */ + public ApiClient setKeyManagers(KeyManager[] managers) { + this.keyManagers = managers; + applySslSettings(); + return this; + } + public DateFormat getDateFormat() { return dateFormat; } @@ -736,12 +743,13 @@ public String sanitizeFilename(String filename) { * application/json * application/json; charset=UTF8 * APPLICATION/JSON - * + * application/vnd.company+json * @param mime MIME (Multipurpose Internet Mail Extensions) * @return True if the given MIME is JSON, false otherwise. */ public boolean isJsonMime(String mime) { - return mime != null && mime.matches("(?i)application\\/json(;.*)?"); + String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"; + return mime != null && (mime.matches(jsonMime) || mime.equalsIgnoreCase("application/json-patch+json")); } /** @@ -1043,6 +1051,13 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept if (returnType == null || response.code() == 204) { // returning null if the returnType is not defined, // or the status code is 204 (No Content) + if (response.body() != null) { + try { + response.body().close(); + } catch (IOException e) { + throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); + } + } return null; } else { return deserialize(response, returnType); @@ -1075,6 +1090,26 @@ public T handleResponse(Response response, Type returnType) throws ApiExcept * @throws ApiException If fail to serialize the request body object */ public Call buildCall(String path, String method, List queryParams, Object body, Map headerParams, Map formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Request request = buildRequest(path, method, queryParams, body, headerParams, formParams, authNames, progressRequestListener); + + return httpClient.newCall(request); + } + + /** + * Build an HTTP request with the given options. + * + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" + * @param queryParams The query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param formParams The form parameters + * @param authNames The authentications to apply + * @param progressRequestListener Progress request listener + * @return The HTTP request + * @throws ApiException If fail to serialize the request body object + */ + public Request buildRequest(String path, String method, List queryParams, Object body, Map headerParams, Map formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { updateParamsForAuth(authNames, queryParams, headerParams); final String url = buildUrl(path, queryParams); @@ -1115,7 +1150,7 @@ public Call buildCall(String path, String method, List queryParams, Object request = reqBuilder.method(method, reqBody).build(); } - return httpClient.newCall(request); + return request; } /** @@ -1264,7 +1299,6 @@ private void initDatetimeFormat() { */ private void applySslSettings() { try { - KeyManager[] keyManagers = null; TrustManager[] trustManagers = null; HostnameVerifier hostnameVerifier = null; if (!verifyingSsl) { diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiException.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiException.java index 7d392e0..379683e 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiException.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiException.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -28,7 +16,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:52.838+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiResponse.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiResponse.java index 18b261b..94d5257 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiResponse.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiResponse.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Configuration.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Configuration.java index 7a8aeda..cd87b6d 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Configuration.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Configuration.java @@ -8,24 +8,12 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.handler; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:52.838+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") public class Configuration { private static ApiClient defaultApiClient = new ApiClient(); diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/GzipRequestInterceptor.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/GzipRequestInterceptor.java new file mode 100644 index 0000000..06375a5 --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/GzipRequestInterceptor.java @@ -0,0 +1,81 @@ +/* + * Template-Processor + * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package com.sphereon.sdk.template_processor.handler; + +import com.squareup.okhttp.*; +import okio.Buffer; +import okio.BufferedSink; +import okio.GzipSink; +import okio.Okio; + +import java.io.IOException; + +/** + * Encodes request bodies using gzip. + * + * Taken from https://github.com/square/okhttp/issues/350 + */ +class GzipRequestInterceptor implements Interceptor { + @Override public Response intercept(Chain chain) throws IOException { + Request originalRequest = chain.request(); + if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) { + return chain.proceed(originalRequest); + } + + Request compressedRequest = originalRequest.newBuilder() + .header("Content-Encoding", "gzip") + .method(originalRequest.method(), forceContentLength(gzip(originalRequest.body()))) + .build(); + return chain.proceed(compressedRequest); + } + + private RequestBody forceContentLength(final RequestBody requestBody) throws IOException { + final Buffer buffer = new Buffer(); + requestBody.writeTo(buffer); + return new RequestBody() { + @Override + public MediaType contentType() { + return requestBody.contentType(); + } + + @Override + public long contentLength() { + return buffer.size(); + } + + @Override + public void writeTo(BufferedSink sink) throws IOException { + sink.write(buffer.snapshot()); + } + }; + } + + private RequestBody gzip(final RequestBody body) { + return new RequestBody() { + @Override public MediaType contentType() { + return body.contentType(); + } + + @Override public long contentLength() { + return -1; // We don't know the compressed length in advance! + } + + @Override public void writeTo(BufferedSink sink) throws IOException { + BufferedSink gzipSink = Okio.buffer(new GzipSink(sink)); + body.writeTo(gzipSink); + gzipSink.close(); + } + }; + } +} \ No newline at end of file diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/JSON.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/JSON.java index 1e939a9..b1dd347 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/JSON.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/JSON.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Pair.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Pair.java index 28f8861..78ac25f 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Pair.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Pair.java @@ -8,24 +8,12 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.handler; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:52.838+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") public class Pair { private String name = ""; private String value = ""; diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ProgressRequestBody.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ProgressRequestBody.java index 5752168..b0514c9 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ProgressRequestBody.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ProgressRequestBody.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -46,8 +34,6 @@ public interface ProgressRequestListener { private final ProgressRequestListener progressListener; - private BufferedSink bufferedSink; - public ProgressRequestBody(RequestBody requestBody, ProgressRequestListener progressListener) { this.requestBody = requestBody; this.progressListener = progressListener; @@ -65,13 +51,9 @@ public long contentLength() throws IOException { @Override public void writeTo(BufferedSink sink) throws IOException { - if (bufferedSink == null) { - bufferedSink = Okio.buffer(sink(sink)); - } - + BufferedSink bufferedSink = Okio.buffer(sink(sink)); requestBody.writeTo(bufferedSink); bufferedSink.flush(); - } private Sink sink(Sink sink) { diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ProgressResponseBody.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ProgressResponseBody.java index a15d65b..de14150 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ProgressResponseBody.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ProgressResponseBody.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java index ce4fb84..38261b3 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java @@ -8,24 +8,12 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.handler; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:52.838+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java index 15b947f..0c5606f 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -30,7 +18,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:52.838+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/Authentication.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/Authentication.java index d56d856..88bb6e4 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/Authentication.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/Authentication.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/HttpBasicAuth.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/HttpBasicAuth.java index 43f2fc9..081204c 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/HttpBasicAuth.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/HttpBasicAuth.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java index da53689..d8f19f8 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -30,7 +18,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:52.838+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") public class OAuth implements Authentication { private String accessToken; diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java index 6444940..803a482 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java index 6816c30..de5605a 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java @@ -8,34 +8,27 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; import java.time.OffsetDateTime; /** * The merge template response. */ @ApiModel(description = "The merge template response.") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:52.838+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") public class DataSetResponse { @SerializedName("completionTime") private OffsetDateTime completionTime = null; @@ -49,14 +42,12 @@ public class DataSetResponse { /** * The status of the template */ + @JsonAdapter(StatusEnum.Adapter.class) public enum StatusEnum { - @SerializedName("CREATED") CREATED("CREATED"), - @SerializedName("UPDATED") UPDATED("UPDATED"), - @SerializedName("DELETED") DELETED("DELETED"); private String value; @@ -65,10 +56,36 @@ public enum StatusEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("status") @@ -78,7 +95,7 @@ public String toString() { * The completion date/time of this template in ISO 8601 format * @return completionTime **/ - @ApiModelProperty(example = "null", value = "The completion date/time of this template in ISO 8601 format") + @ApiModelProperty(value = "The completion date/time of this template in ISO 8601 format") public OffsetDateTime getCompletionTime() { return completionTime; } @@ -87,7 +104,7 @@ public OffsetDateTime getCompletionTime() { * The creation date/time of this template in ISO 8601 format * @return creationTime **/ - @ApiModelProperty(example = "null", value = "The creation date/time of this template in ISO 8601 format") + @ApiModelProperty(value = "The creation date/time of this template in ISO 8601 format") public OffsetDateTime getCreationTime() { return creationTime; } @@ -101,7 +118,7 @@ public DataSetResponse id(String id) { * Unique dataset id * @return id **/ - @ApiModelProperty(example = "null", required = true, value = "Unique dataset id") + @ApiModelProperty(required = true, value = "Unique dataset id") public String getId() { return id; } @@ -114,7 +131,7 @@ public void setId(String id) { * The status of the template * @return status **/ - @ApiModelProperty(example = "null", required = true, value = "The status of the template") + @ApiModelProperty(required = true, value = "The status of the template") public StatusEnum getStatus() { return status; } diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Error.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Error.java index 4c0d42a..596b52e 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Error.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Error.java @@ -8,34 +8,27 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 com.sphereon.sdk.template_processor.model.Error; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; /** * An error */ @ApiModel(description = "An error") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:52.838+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") public class Error { @SerializedName("code") private String code = null; @@ -43,14 +36,12 @@ public class Error { /** * Gets or Sets level */ + @JsonAdapter(LevelEnum.Adapter.class) public enum LevelEnum { - @SerializedName("INFO") INFO("INFO"), - @SerializedName("WARNING") WARNING("WARNING"), - @SerializedName("FATAL") FATAL("FATAL"); private String value; @@ -59,10 +50,36 @@ public enum LevelEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static LevelEnum fromValue(String text) { + for (LevelEnum b : LevelEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final LevelEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public LevelEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return LevelEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("level") @@ -83,7 +100,7 @@ public Error code(String code) { * Get code * @return code **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") public String getCode() { return code; } @@ -101,7 +118,7 @@ public Error level(LevelEnum level) { * Get level * @return level **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") public LevelEnum getLevel() { return level; } @@ -119,7 +136,7 @@ public Error cause(Error cause) { * Get cause * @return cause **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Error getCause() { return cause; } @@ -137,7 +154,7 @@ public Error message(String message) { * Get message * @return message **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") public String getMessage() { return message; } diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java index 722d031..8445252 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java @@ -8,28 +8,21 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 com.sphereon.sdk.template_processor.model.Error; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -37,10 +30,10 @@ * The error response */ @ApiModel(description = "The error response") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:52.838+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") public class ErrorResponse { @SerializedName("errors") - private List errors = new ArrayList(); + private List errors = null; public ErrorResponse errors(List errors) { this.errors = errors; @@ -48,6 +41,9 @@ public ErrorResponse errors(List errors) { } public ErrorResponse addErrorsItem(Error errorsItem) { + if (this.errors == null) { + this.errors = new ArrayList(); + } this.errors.add(errorsItem); return this; } @@ -56,7 +52,7 @@ public ErrorResponse addErrorsItem(Error errorsItem) { * Get errors * @return errors **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public List getErrors() { return errors; } diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java index 203c433..ff27de2 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java @@ -8,34 +8,27 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; import java.time.OffsetDateTime; /** * Lifecycle settings. When no lifecycle settings are supplied, the job and files will be deleted directly after retrieval of the file */ @ApiModel(description = "Lifecycle settings. When no lifecycle settings are supplied, the job and files will be deleted directly after retrieval of the file") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:52.838+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") public class Lifecycle { @SerializedName("actionTime") private OffsetDateTime actionTime = null; @@ -43,8 +36,8 @@ public class Lifecycle { /** * Gets or Sets action */ + @JsonAdapter(ActionEnum.Adapter.class) public enum ActionEnum { - @SerializedName("DELETE") DELETE("DELETE"); private String value; @@ -53,10 +46,36 @@ public enum ActionEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static ActionEnum fromValue(String text) { + for (ActionEnum b : ActionEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ActionEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ActionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ActionEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("action") @@ -65,11 +84,10 @@ public String toString() { /** * Gets or Sets type */ + @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { - @SerializedName("RETRIEVAL") RETRIEVAL("RETRIEVAL"), - @SerializedName("TIME") TIME("TIME"); private String value; @@ -78,10 +96,36 @@ public enum TypeEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static TypeEnum fromValue(String text) { + for (TypeEnum b : TypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("type") @@ -96,7 +140,7 @@ public Lifecycle actionTime(OffsetDateTime actionTime) { * The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation * @return actionTime **/ - @ApiModelProperty(example = "null", value = "The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation") + @ApiModelProperty(value = "The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation") public OffsetDateTime getActionTime() { return actionTime; } @@ -114,7 +158,7 @@ public Lifecycle action(ActionEnum action) { * Get action * @return action **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public ActionEnum getAction() { return action; } @@ -132,7 +176,7 @@ public Lifecycle type(TypeEnum type) { * Get type * @return type **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public TypeEnum getType() { return type; } diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java index e682df4..c23653e 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java @@ -8,30 +8,23 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 com.sphereon.sdk.template_processor.model.MergeSettings; import com.sphereon.sdk.template_processor.model.StorageLocation; import com.sphereon.sdk.template_processor.model.StreamLocation; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; @@ -40,7 +33,7 @@ * The merge job. Has access to the job merge data. */ @ApiModel(description = "The merge job. Has access to the job merge data.") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:52.838+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") public class MergeJob { @SerializedName("completionTime") private OffsetDateTime completionTime = null; @@ -58,7 +51,7 @@ public class MergeJob { private List resultStreams = new ArrayList(); @SerializedName("headerDataSetIds") - private List headerDataSetIds = new ArrayList(); + private List headerDataSetIds = null; @SerializedName("resultStorageLocation") private StorageLocation resultStorageLocation = null; @@ -72,23 +65,18 @@ public class MergeJob { /** * The status of the job */ + @JsonAdapter(StatusEnum.Adapter.class) public enum StatusEnum { - @SerializedName("CREATED") CREATED("CREATED"), - @SerializedName("UPDATED") UPDATED("UPDATED"), - @SerializedName("PROCESSING") PROCESSING("PROCESSING"), - @SerializedName("DONE") DONE("DONE"), - @SerializedName("ERROR") ERROR("ERROR"), - @SerializedName("DELETED") DELETED("DELETED"); private String value; @@ -97,10 +85,36 @@ public enum StatusEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("status") @@ -110,7 +124,7 @@ public String toString() { * The completion date/time of this job in ISO 8601 format * @return completionTime **/ - @ApiModelProperty(example = "null", value = "The completion date/time of this job in ISO 8601 format") + @ApiModelProperty(value = "The completion date/time of this job in ISO 8601 format") public OffsetDateTime getCompletionTime() { return completionTime; } @@ -124,7 +138,7 @@ public MergeJob jobId(String jobId) { * The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation * @return jobId **/ - @ApiModelProperty(example = "null", required = true, value = "The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation") + @ApiModelProperty(required = true, value = "The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation") public String getJobId() { return jobId; } @@ -137,7 +151,7 @@ public void setJobId(String jobId) { * The creation date/time of this job in ISO 8601 format * @return creationTime **/ - @ApiModelProperty(example = "null", value = "The creation date/time of this job in ISO 8601 format") + @ApiModelProperty(value = "The creation date/time of this job in ISO 8601 format") public OffsetDateTime getCreationTime() { return creationTime; } @@ -151,7 +165,7 @@ public MergeJob dataSetId(String dataSetId) { * Data set id * @return dataSetId **/ - @ApiModelProperty(example = "null", value = "Data set id") + @ApiModelProperty(value = "Data set id") public String getDataSetId() { return dataSetId; } @@ -174,7 +188,7 @@ public MergeJob addResultStreamsItem(StreamLocation resultStreamsItem) { * The storage locations of the result files. * @return resultStreams **/ - @ApiModelProperty(example = "null", required = true, value = "The storage locations of the result files.") + @ApiModelProperty(required = true, value = "The storage locations of the result files.") public List getResultStreams() { return resultStreams; } @@ -189,6 +203,9 @@ public MergeJob headerDataSetIds(List headerDataSetIds) { } public MergeJob addHeaderDataSetIdsItem(String headerDataSetIdsItem) { + if (this.headerDataSetIds == null) { + this.headerDataSetIds = new ArrayList(); + } this.headerDataSetIds.add(headerDataSetIdsItem); return this; } @@ -197,7 +214,7 @@ public MergeJob addHeaderDataSetIdsItem(String headerDataSetIdsItem) { * Header data set ids * @return headerDataSetIds **/ - @ApiModelProperty(example = "null", value = "Header data set ids") + @ApiModelProperty(value = "Header data set ids") public List getHeaderDataSetIds() { return headerDataSetIds; } @@ -215,7 +232,7 @@ public MergeJob resultStorageLocation(StorageLocation resultStorageLocation) { * The storage location. (optional) * @return resultStorageLocation **/ - @ApiModelProperty(example = "null", value = "The storage location. (optional)") + @ApiModelProperty(value = "The storage location. (optional)") public StorageLocation getResultStorageLocation() { return resultStorageLocation; } @@ -233,7 +250,7 @@ public MergeJob mergeSettings(MergeSettings mergeSettings) { * Get mergeSettings * @return mergeSettings **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public MergeSettings getMergeSettings() { return mergeSettings; } @@ -246,7 +263,7 @@ public void setMergeSettings(MergeSettings mergeSettings) { * A status message, which can be informational, warning or error. A message here does not indicate an error perse * @return statusMessage **/ - @ApiModelProperty(example = "null", value = "A status message, which can be informational, warning or error. A message here does not indicate an error perse") + @ApiModelProperty(value = "A status message, which can be informational, warning or error. A message here does not indicate an error perse") public String getStatusMessage() { return statusMessage; } @@ -255,7 +272,7 @@ public String getStatusMessage() { * The status of the job * @return status **/ - @ApiModelProperty(example = "null", required = true, value = "The status of the job") + @ApiModelProperty(required = true, value = "The status of the job") public StatusEnum getStatus() { return status; } diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java index 973b5f0..8434fdc 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java @@ -8,34 +8,27 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 com.sphereon.sdk.template_processor.model.MergeJob; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; /** * The merge job response. */ @ApiModel(description = "The merge job response.") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:52.838+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") public class MergeJobResponse { @SerializedName("jobId") private String jobId = null; @@ -49,23 +42,18 @@ public class MergeJobResponse { /** * The status of the job */ + @JsonAdapter(StatusEnum.Adapter.class) public enum StatusEnum { - @SerializedName("CREATED") CREATED("CREATED"), - @SerializedName("UPDATED") UPDATED("UPDATED"), - @SerializedName("PROCESSING") PROCESSING("PROCESSING"), - @SerializedName("DONE") DONE("DONE"), - @SerializedName("ERROR") ERROR("ERROR"), - @SerializedName("DELETED") DELETED("DELETED"); private String value; @@ -74,10 +62,36 @@ public enum StatusEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("status") @@ -92,7 +106,7 @@ public MergeJobResponse jobId(String jobId) { * The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation * @return jobId **/ - @ApiModelProperty(example = "null", required = true, value = "The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation") + @ApiModelProperty(required = true, value = "The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation") public String getJobId() { return jobId; } @@ -110,7 +124,7 @@ public MergeJobResponse job(MergeJob job) { * Get job * @return job **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public MergeJob getJob() { return job; } @@ -123,7 +137,7 @@ public void setJob(MergeJob job) { * A status message, which can be informational, warning or error. AA message here does not indicate an error perse * @return statusMessage **/ - @ApiModelProperty(example = "null", value = "A status message, which can be informational, warning or error. AA message here does not indicate an error perse") + @ApiModelProperty(value = "A status message, which can be informational, warning or error. AA message here does not indicate an error perse") public String getStatusMessage() { return statusMessage; } @@ -132,7 +146,7 @@ public String getStatusMessage() { * The status of the job * @return status **/ - @ApiModelProperty(example = "null", required = true, value = "The status of the job") + @ApiModelProperty(required = true, value = "The status of the job") public StatusEnum getStatus() { return status; } diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java index a5df456..673ab8d 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java @@ -8,30 +8,23 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 com.sphereon.sdk.template_processor.model.Lifecycle; import com.sphereon.sdk.template_processor.model.OutputSettings; import com.sphereon.sdk.template_processor.model.StorageLocation; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -39,7 +32,7 @@ * Merge settings */ @ApiModel(description = "Merge settings") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:52.838+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") public class MergeSettings { @SerializedName("lifecycle") private Lifecycle lifecycle = null; @@ -47,11 +40,10 @@ public class MergeSettings { /** * Gets or Sets mergeResult */ + @JsonAdapter(MergeResultEnum.Adapter.class) public enum MergeResultEnum { - @SerializedName("SINGLE_FILE") SINGLE_FILE("SINGLE_FILE"), - @SerializedName("SEPARATE_FILES") SEPARATE_FILES("SEPARATE_FILES"); private String value; @@ -60,10 +52,36 @@ public enum MergeResultEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static MergeResultEnum fromValue(String text) { + for (MergeResultEnum b : MergeResultEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MergeResultEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MergeResultEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MergeResultEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("mergeResult") @@ -75,11 +93,10 @@ public String toString() { /** * Gets or Sets engine */ + @JsonAdapter(EngineEnum.Adapter.class) public enum EngineEnum { - @SerializedName("BASIC") BASIC("BASIC"), - @SerializedName("PREMIUM") PREMIUM("PREMIUM"); private String value; @@ -88,17 +105,43 @@ public enum EngineEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static EngineEnum fromValue(String text) { + for (EngineEnum b : EngineEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EngineEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EngineEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EngineEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("engine") private EngineEnum engine = null; @SerializedName("headerDataSetIds") - private List headerDataSetIds = new ArrayList(); + private List headerDataSetIds = null; @SerializedName("resultStorageLocation") private StorageLocation resultStorageLocation = null; @@ -121,7 +164,7 @@ public MergeSettings lifecycle(Lifecycle lifecycle) { * Get lifecycle * @return lifecycle **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Lifecycle getLifecycle() { return lifecycle; } @@ -139,7 +182,7 @@ public MergeSettings mergeResult(MergeResultEnum mergeResult) { * Get mergeResult * @return mergeResult **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public MergeResultEnum getMergeResult() { return mergeResult; } @@ -157,7 +200,7 @@ public MergeSettings dataSetId(String dataSetId) { * Data set id * @return dataSetId **/ - @ApiModelProperty(example = "null", required = true, value = "Data set id") + @ApiModelProperty(required = true, value = "Data set id") public String getDataSetId() { return dataSetId; } @@ -175,7 +218,7 @@ public MergeSettings engine(EngineEnum engine) { * Get engine * @return engine **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public EngineEnum getEngine() { return engine; } @@ -190,6 +233,9 @@ public MergeSettings headerDataSetIds(List headerDataSetIds) { } public MergeSettings addHeaderDataSetIdsItem(String headerDataSetIdsItem) { + if (this.headerDataSetIds == null) { + this.headerDataSetIds = new ArrayList(); + } this.headerDataSetIds.add(headerDataSetIdsItem); return this; } @@ -198,7 +244,7 @@ public MergeSettings addHeaderDataSetIdsItem(String headerDataSetIdsItem) { * optional header data set ids * @return headerDataSetIds **/ - @ApiModelProperty(example = "null", value = "optional header data set ids") + @ApiModelProperty(value = "optional header data set ids") public List getHeaderDataSetIds() { return headerDataSetIds; } @@ -216,7 +262,7 @@ public MergeSettings resultStorageLocation(StorageLocation resultStorageLocation * The output location of the result files. * @return resultStorageLocation **/ - @ApiModelProperty(example = "null", required = true, value = "The output location of the result files.") + @ApiModelProperty(required = true, value = "The output location of the result files.") public StorageLocation getResultStorageLocation() { return resultStorageLocation; } @@ -234,7 +280,7 @@ public MergeSettings templateVersion(Integer templateVersion) { * Template version * @return templateVersion **/ - @ApiModelProperty(example = "null", value = "Template version") + @ApiModelProperty(value = "Template version") public Integer getTemplateVersion() { return templateVersion; } @@ -252,7 +298,7 @@ public MergeSettings templateId(String templateId) { * Template id * @return templateId **/ - @ApiModelProperty(example = "null", required = true, value = "Template id") + @ApiModelProperty(required = true, value = "Template id") public String getTemplateId() { return templateId; } @@ -270,7 +316,7 @@ public MergeSettings outputSettings(OutputSettings outputSettings) { * Get outputSettings * @return outputSettings **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") public OutputSettings getOutputSettings() { return outputSettings; } diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java index 333e84a..7f5a79e 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java @@ -8,45 +8,36 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; /** * Output settings */ @ApiModel(description = "Output settings") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:52.838+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") public class OutputSettings { /** * Gets or Sets deliveryFormat */ + @JsonAdapter(DeliveryFormatEnum.Adapter.class) public enum DeliveryFormatEnum { - @SerializedName("PLAIN") PLAIN("PLAIN"), - @SerializedName("ZIP") ZIP("ZIP"), - @SerializedName("_7ZIP") _7ZIP("_7ZIP"); private String value; @@ -55,10 +46,36 @@ public enum DeliveryFormatEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static DeliveryFormatEnum fromValue(String text) { + for (DeliveryFormatEnum b : DeliveryFormatEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DeliveryFormatEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DeliveryFormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DeliveryFormatEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("deliveryFormat") @@ -67,53 +84,38 @@ public String toString() { /** * Gets or Sets outputFormat */ + @JsonAdapter(OutputFormatEnum.Adapter.class) public enum OutputFormatEnum { - @SerializedName("DOC") DOC("DOC"), - @SerializedName("DOCX") DOCX("DOCX"), - @SerializedName("RTF") RTF("RTF"), - @SerializedName("PDF") PDF("PDF"), - @SerializedName("XPS") XPS("XPS"), - @SerializedName("SVG") SVG("SVG"), - @SerializedName("HTML") HTML("HTML"), - @SerializedName("ODT") ODT("ODT"), - @SerializedName("TIFF") TIFF("TIFF"), - @SerializedName("PNG") PNG("PNG"), - @SerializedName("BMP") BMP("BMP"), - @SerializedName("JPEG") JPEG("JPEG"), - @SerializedName("TXT") TXT("TXT"), - @SerializedName("XML") XML("XML"), - @SerializedName("JSON") JSON("JSON"), - @SerializedName("DEFAULT") DEFAULT("DEFAULT"); private String value; @@ -122,10 +124,36 @@ public enum OutputFormatEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static OutputFormatEnum fromValue(String text) { + for (OutputFormatEnum b : OutputFormatEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OutputFormatEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OutputFormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OutputFormatEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("outputFormat") @@ -140,7 +168,7 @@ public OutputSettings deliveryFormat(DeliveryFormatEnum deliveryFormat) { * Get deliveryFormat * @return deliveryFormat **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public DeliveryFormatEnum getDeliveryFormat() { return deliveryFormat; } @@ -158,7 +186,7 @@ public OutputSettings outputFormat(OutputFormatEnum outputFormat) { * Get outputFormat * @return outputFormat **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public OutputFormatEnum getOutputFormat() { return outputFormat; } diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java index 27c91c8..20bbd83 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java @@ -8,33 +8,26 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; /** * Owner info */ @ApiModel(description = "Owner info") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:52.838+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") public class OwnerInfo { @SerializedName("phone") private String phone = null; @@ -54,10 +47,10 @@ public OwnerInfo phone(String phone) { } /** - * The owner's phone number + * The owner's phone number * @return phone **/ - @ApiModelProperty(example = "null", value = "The owner's phone number") + @ApiModelProperty(value = "The owner's phone number") public String getPhone() { return phone; } @@ -72,10 +65,10 @@ public OwnerInfo companyDepartment(String companyDepartment) { } /** - * The owner's company/department + * The owner's company/department * @return companyDepartment **/ - @ApiModelProperty(example = "null", value = "The owner's company/department") + @ApiModelProperty(value = "The owner's company/department") public String getCompanyDepartment() { return companyDepartment; } @@ -90,10 +83,10 @@ public OwnerInfo name(String name) { } /** - * The owner's name + * The owner's name * @return name **/ - @ApiModelProperty(example = "null", value = "The owner's name") + @ApiModelProperty(value = "The owner's name") public String getName() { return name; } @@ -108,10 +101,10 @@ public OwnerInfo email(String email) { } /** - * The owner's email address + * The owner's email address * @return email **/ - @ApiModelProperty(example = "null", value = "The owner's email address") + @ApiModelProperty(value = "The owner's email address") public String getEmail() { return email; } diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/ResultStreamRequest.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/ResultStreamRequest.java new file mode 100644 index 0000000..93e0be1 --- /dev/null +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/ResultStreamRequest.java @@ -0,0 +1,119 @@ +/* + * Template-Processor + * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package com.sphereon.sdk.template_processor.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 com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.StreamLocation; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * A request to download a specific result stream. + */ +@ApiModel(description = "A request to download a specific result stream.") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") +public class ResultStreamRequest { + @SerializedName("streamLocation") + private StreamLocation streamLocation = null; + + @SerializedName("outputSettings") + private OutputSettings outputSettings = null; + + public ResultStreamRequest streamLocation(StreamLocation streamLocation) { + this.streamLocation = streamLocation; + return this; + } + + /** + * The stream location + * @return streamLocation + **/ + @ApiModelProperty(required = true, value = "The stream location") + public StreamLocation getStreamLocation() { + return streamLocation; + } + + public void setStreamLocation(StreamLocation streamLocation) { + this.streamLocation = streamLocation; + } + + public ResultStreamRequest outputSettings(OutputSettings outputSettings) { + this.outputSettings = outputSettings; + return this; + } + + /** + * The Output settings + * @return outputSettings + **/ + @ApiModelProperty(value = "The Output settings") + public OutputSettings getOutputSettings() { + return outputSettings; + } + + public void setOutputSettings(OutputSettings outputSettings) { + this.outputSettings = outputSettings; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResultStreamRequest resultStreamRequest = (ResultStreamRequest) o; + return Objects.equals(this.streamLocation, resultStreamRequest.streamLocation) && + Objects.equals(this.outputSettings, resultStreamRequest.outputSettings); + } + + @Override + public int hashCode() { + return Objects.hash(streamLocation, outputSettings); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResultStreamRequest {\n"); + + sb.append(" streamLocation: ").append(toIndentedString(streamLocation)).append("\n"); + sb.append(" outputSettings: ").append(toIndentedString(outputSettings)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/StorageLocation.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/StorageLocation.java index 9f28c1e..53b7afa 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/StorageLocation.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/StorageLocation.java @@ -8,33 +8,26 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; /** * Location record */ @ApiModel(description = "Location record") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:52.838+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") public class StorageLocation { @SerializedName("folderPath") private String folderPath = null; @@ -51,7 +44,7 @@ public StorageLocation folderPath(String folderPath) { * Get folderPath * @return folderPath **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getFolderPath() { return folderPath; } @@ -69,7 +62,7 @@ public StorageLocation containerId(String containerId) { * Get containerId * @return containerId **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getContainerId() { return containerId; } diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java index 458508b..3c9b381 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java @@ -8,33 +8,26 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; /** * Location record of data stream */ @ApiModel(description = "Location record of data stream") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:52.838+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") public class StreamLocation { @SerializedName("folderPath") private String folderPath = null; @@ -57,7 +50,7 @@ public StreamLocation folderPath(String folderPath) { * Get folderPath * @return folderPath **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getFolderPath() { return folderPath; } @@ -75,7 +68,7 @@ public StreamLocation originalFileName(String originalFileName) { * Get originalFileName * @return originalFileName **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getOriginalFileName() { return originalFileName; } @@ -93,7 +86,7 @@ public StreamLocation fileName(String fileName) { * Get fileName * @return fileName **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getFileName() { return fileName; } @@ -111,7 +104,7 @@ public StreamLocation containerId(String containerId) { * Get containerId * @return containerId **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getContainerId() { return containerId; } diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java index f2d2e0d..49dd5a0 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java @@ -8,30 +8,23 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 com.sphereon.sdk.template_processor.model.OwnerInfo; import com.sphereon.sdk.template_processor.model.StorageLocation; import com.sphereon.sdk.template_processor.model.StreamLocation; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -39,16 +32,15 @@ /** * TemplateContext */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:52.838+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") public class TemplateContext { /** * Gets or Sets templateType */ + @JsonAdapter(TemplateTypeEnum.Adapter.class) public enum TemplateTypeEnum { - @SerializedName("OFFICE") OFFICE("OFFICE"), - @SerializedName("FREEMARKER") FREEMARKER("FREEMARKER"); private String value; @@ -57,17 +49,43 @@ public enum TemplateTypeEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static TemplateTypeEnum fromValue(String text) { + for (TemplateTypeEnum b : TemplateTypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TemplateTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TemplateTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TemplateTypeEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("templateType") private TemplateTypeEnum templateType = null; @SerializedName("templateFileLocations") - private Map templateFileLocations = new HashMap(); + private Map templateFileLocations = null; @SerializedName("description") private String description = null; @@ -93,7 +111,7 @@ public TemplateContext templateType(TemplateTypeEnum templateType) { * Get templateType * @return templateType **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") public TemplateTypeEnum getTemplateType() { return templateType; } @@ -108,6 +126,9 @@ public TemplateContext templateFileLocations(Map templat } public TemplateContext putTemplateFileLocationsItem(String key, StreamLocation templateFileLocationsItem) { + if (this.templateFileLocations == null) { + this.templateFileLocations = new HashMap(); + } this.templateFileLocations.put(key, templateFileLocationsItem); return this; } @@ -116,7 +137,7 @@ public TemplateContext putTemplateFileLocationsItem(String key, StreamLocation t * The template files (versioned) * @return templateFileLocations **/ - @ApiModelProperty(example = "null", value = "The template files (versioned)") + @ApiModelProperty(value = "The template files (versioned)") public Map getTemplateFileLocations() { return templateFileLocations; } @@ -134,7 +155,7 @@ public TemplateContext description(String description) { * The template description * @return description **/ - @ApiModelProperty(example = "null", value = "The template description") + @ApiModelProperty(value = "The template description") public String getDescription() { return description; } @@ -152,7 +173,7 @@ public TemplateContext ownerInfo(OwnerInfo ownerInfo) { * Get ownerInfo * @return ownerInfo **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public OwnerInfo getOwnerInfo() { return ownerInfo; } @@ -170,7 +191,7 @@ public TemplateContext storageLocation(StorageLocation storageLocation) { * The storage location. (optional) * @return storageLocation **/ - @ApiModelProperty(example = "null", value = "The storage location. (optional)") + @ApiModelProperty(value = "The storage location. (optional)") public StorageLocation getStorageLocation() { return storageLocation; } @@ -188,7 +209,7 @@ public TemplateContext id(String id) { * Get id * @return id **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getId() { return id; } @@ -206,7 +227,7 @@ public TemplateContext templateId(String templateId) { * The template context id * @return templateId **/ - @ApiModelProperty(example = "null", value = "The template context id") + @ApiModelProperty(value = "The template context id") public String getTemplateId() { return templateId; } diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java index a130b62..fedd0cb 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java @@ -8,43 +8,35 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 com.sphereon.sdk.template_processor.model.OwnerInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; /** * The merge template request. */ @ApiModel(description = "The merge template request.") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:52.838+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") public class TemplateContextRequest { /** * Gets or Sets templateType */ + @JsonAdapter(TemplateTypeEnum.Adapter.class) public enum TemplateTypeEnum { - @SerializedName("OFFICE") OFFICE("OFFICE"), - @SerializedName("FREEMARKER") FREEMARKER("FREEMARKER"); private String value; @@ -53,10 +45,36 @@ public enum TemplateTypeEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static TemplateTypeEnum fromValue(String text) { + for (TemplateTypeEnum b : TemplateTypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TemplateTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TemplateTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TemplateTypeEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("templateType") @@ -80,7 +98,7 @@ public TemplateContextRequest templateType(TemplateTypeEnum templateType) { * Get templateType * @return templateType **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") public TemplateTypeEnum getTemplateType() { return templateType; } @@ -98,7 +116,7 @@ public TemplateContextRequest description(String description) { * Get description * @return description **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getDescription() { return description; } @@ -116,7 +134,7 @@ public TemplateContextRequest ownerInfo(OwnerInfo ownerInfo) { * Get ownerInfo * @return ownerInfo **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public OwnerInfo getOwnerInfo() { return ownerInfo; } @@ -134,7 +152,7 @@ public TemplateContextRequest templateId(String templateId) { * The template context id * @return templateId **/ - @ApiModelProperty(example = "null", value = "The template context id") + @ApiModelProperty(value = "The template context id") public String getTemplateId() { return templateId; } diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java index adb286c..f1d3a1a 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java @@ -8,35 +8,28 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 com.sphereon.sdk.template_processor.model.TemplateContext; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; import java.time.OffsetDateTime; /** * The merge template response. */ @ApiModel(description = "The merge template response.") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:52.838+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") public class TemplateContextResponse { @SerializedName("creationTime") private OffsetDateTime creationTime = null; @@ -50,17 +43,14 @@ public class TemplateContextResponse { /** * The status of the template */ + @JsonAdapter(StatusEnum.Adapter.class) public enum StatusEnum { - @SerializedName("CREATED") CREATED("CREATED"), - @SerializedName("UPDATED") UPDATED("UPDATED"), - @SerializedName("DELETED") DELETED("DELETED"), - @SerializedName("PROCESSING") PROCESSING("PROCESSING"); private String value; @@ -69,10 +59,36 @@ public enum StatusEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("status") @@ -82,7 +98,7 @@ public String toString() { * The creation date/time of this response in ISO 8601 format * @return creationTime **/ - @ApiModelProperty(example = "null", value = "The creation date/time of this response in ISO 8601 format") + @ApiModelProperty(value = "The creation date/time of this response in ISO 8601 format") public OffsetDateTime getCreationTime() { return creationTime; } @@ -96,7 +112,7 @@ public TemplateContextResponse context(TemplateContext context) { * Get context * @return context **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public TemplateContext getContext() { return context; } @@ -114,7 +130,7 @@ public TemplateContextResponse id(String id) { * Unique template context id * @return id **/ - @ApiModelProperty(example = "null", required = true, value = "Unique template context id") + @ApiModelProperty(required = true, value = "Unique template context id") public String getId() { return id; } @@ -127,7 +143,7 @@ public void setId(String id) { * The status of the template * @return status **/ - @ApiModelProperty(example = "null", required = true, value = "The status of the template") + @ApiModelProperty(required = true, value = "The status of the template") public StatusEnum getStatus() { return status; } diff --git a/java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/AllApiTest.java b/java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/AllApiTest.java index cc38a49..95138fd 100644 --- a/java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/AllApiTest.java +++ b/java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/AllApiTest.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -28,13 +16,16 @@ import com.sphereon.sdk.template_processor.handler.ApiException; import com.sphereon.sdk.template_processor.model.DataSetResponse; import com.sphereon.sdk.template_processor.model.ErrorResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextRequest; +import java.io.File; import com.sphereon.sdk.template_processor.model.MergeJobResponse; -import com.sphereon.sdk.template_processor.model.OutputSettings; import com.sphereon.sdk.template_processor.model.MergeSettings; -import java.io.File; +import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.ResultStreamRequest; +import com.sphereon.sdk.template_processor.model.TemplateContext; +import com.sphereon.sdk.template_processor.model.TemplateContextRequest; +import com.sphereon.sdk.template_processor.model.TemplateContextResponse; import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -44,6 +35,7 @@ /** * API tests for AllApi */ +@Ignore public class AllApiTest { private final AllApi api = new AllApi(); @@ -60,7 +52,7 @@ public class AllApiTest { @Test public void createDataSetTest() throws ApiException { String payload = null; - // DataSetResponse response = api.createDataSet(payload); + DataSetResponse response = api.createDataSet(payload); // TODO: test validations } @@ -76,7 +68,7 @@ public void createDataSetTest() throws ApiException { @Test public void createTemplateContextTest() throws ApiException { TemplateContextRequest templateRequest = null; - // TemplateContextResponse response = api.createTemplateContext(templateRequest); + TemplateContextResponse response = api.createTemplateContext(templateRequest); // TODO: test validations } @@ -92,7 +84,7 @@ public void createTemplateContextTest() throws ApiException { @Test public void deleteDataSetTest() throws ApiException { String dataSetId = null; - // DataSetResponse response = api.deleteDataSet(dataSetId); + DataSetResponse response = api.deleteDataSet(dataSetId); // TODO: test validations } @@ -108,7 +100,7 @@ public void deleteDataSetTest() throws ApiException { @Test public void deleteJobTest() throws ApiException { String jobId = null; - // MergeJobResponse response = api.deleteJob(jobId); + MergeJobResponse response = api.deleteJob(jobId); // TODO: test validations } @@ -124,7 +116,7 @@ public void deleteJobTest() throws ApiException { @Test public void deleteTemplateContextTest() throws ApiException { String templateId = null; - // TemplateContextResponse response = api.deleteTemplateContext(templateId); + TemplateContextResponse response = api.deleteTemplateContext(templateId); // TODO: test validations } @@ -140,7 +132,7 @@ public void deleteTemplateContextTest() throws ApiException { @Test public void getJobTest() throws ApiException { String jobId = null; - // MergeJobResponse response = api.getJob(jobId); + MergeJobResponse response = api.getJob(jobId); // TODO: test validations } @@ -156,7 +148,7 @@ public void getJobTest() throws ApiException { @Test public void getJobsTest() throws ApiException { List status = null; - // List response = api.getJobs(status); + List response = api.getJobs(status); // TODO: test validations } @@ -170,11 +162,10 @@ public void getJobsTest() throws ApiException { * if the Api call fails */ @Test - public void getResultStreamByIdTest() throws ApiException { + public void getResultStreamTest() throws ApiException { String jobId = null; - String streamId = null; - OutputSettings outputSettings = null; - // byte[] response = api.getResultStreamById(jobId, streamId, outputSettings); + ResultStreamRequest resultStreamRequest = null; + byte[] response = api.getResultStream(jobId, resultStreamRequest); // TODO: test validations } @@ -191,7 +182,7 @@ public void getResultStreamByIdTest() throws ApiException { public void getResultStreamsAsContainerTest() throws ApiException { String jobId = null; OutputSettings outputSettings = null; - // byte[] response = api.getResultStreamsAsContainer(jobId, outputSettings); + byte[] response = api.getResultStreamsAsContainer(jobId, outputSettings); // TODO: test validations } @@ -207,7 +198,7 @@ public void getResultStreamsAsContainerTest() throws ApiException { @Test public void getTemplateContextTest() throws ApiException { String templateId = null; - // TemplateContextResponse response = api.getTemplateContext(templateId); + TemplateContextResponse response = api.getTemplateContext(templateId); // TODO: test validations } @@ -223,7 +214,7 @@ public void getTemplateContextTest() throws ApiException { @Test public void submitJobTest() throws ApiException { MergeSettings mergesettings = null; - // MergeJobResponse response = api.submitJob(mergesettings); + MergeJobResponse response = api.submitJob(mergesettings); // TODO: test validations } @@ -238,8 +229,8 @@ public void submitJobTest() throws ApiException { */ @Test public void updateTemplateContextTest() throws ApiException { - TemplateContextRequest templateContextRequest = null; - // TemplateContextResponse response = api.updateTemplateContext(templateContextRequest); + TemplateContext templateContext = null; + TemplateContextResponse response = api.updateTemplateContext(templateContext); // TODO: test validations } @@ -256,7 +247,7 @@ public void updateTemplateContextTest() throws ApiException { public void uploadTemplateFileTest() throws ApiException { String templateId = null; File stream = null; - // TemplateContextResponse response = api.uploadTemplateFile(templateId, stream); + TemplateContextResponse response = api.uploadTemplateFile(templateId, stream); // TODO: test validations } diff --git a/java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/DataSetApiTest.java b/java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/DataSetApiTest.java index 3e12a31..e963449 100644 --- a/java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/DataSetApiTest.java +++ b/java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/DataSetApiTest.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ @@ -29,6 +17,7 @@ import com.sphereon.sdk.template_processor.model.DataSetResponse; import com.sphereon.sdk.template_processor.model.ErrorResponse; import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -38,6 +27,7 @@ /** * API tests for DataSetApi */ +@Ignore public class DataSetApiTest { private final DataSetApi api = new DataSetApi(); @@ -54,7 +44,7 @@ public class DataSetApiTest { @Test public void createDataSetTest() throws ApiException { String payload = null; - // DataSetResponse response = api.createDataSet(payload); + DataSetResponse response = api.createDataSet(payload); // TODO: test validations } @@ -70,7 +60,7 @@ public void createDataSetTest() throws ApiException { @Test public void deleteDataSetTest() throws ApiException { String dataSetId = null; - // DataSetResponse response = api.deleteDataSet(dataSetId); + DataSetResponse response = api.deleteDataSet(dataSetId); // TODO: test validations } diff --git a/java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/JobApiTest.java b/java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/JobApiTest.java index 277c938..a510528 100644 --- a/java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/JobApiTest.java +++ b/java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/JobApiTest.java @@ -8,29 +8,19 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.api; import com.sphereon.sdk.template_processor.handler.ApiException; -import com.sphereon.sdk.template_processor.model.MergeJobResponse; import com.sphereon.sdk.template_processor.model.ErrorResponse; -import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.MergeJobResponse; import com.sphereon.sdk.template_processor.model.MergeSettings; +import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.ResultStreamRequest; import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -40,6 +30,7 @@ /** * API tests for JobApi */ +@Ignore public class JobApiTest { private final JobApi api = new JobApi(); @@ -56,7 +47,7 @@ public class JobApiTest { @Test public void getJobTest() throws ApiException { String jobId = null; - // MergeJobResponse response = api.getJob(jobId); + MergeJobResponse response = api.getJob(jobId); // TODO: test validations } @@ -72,7 +63,7 @@ public void getJobTest() throws ApiException { @Test public void getJobsTest() throws ApiException { List status = null; - // List response = api.getJobs(status); + List response = api.getJobs(status); // TODO: test validations } @@ -86,11 +77,10 @@ public void getJobsTest() throws ApiException { * if the Api call fails */ @Test - public void getResultStreamByIdTest() throws ApiException { + public void getResultStreamTest() throws ApiException { String jobId = null; - String streamId = null; - OutputSettings outputSettings = null; - // byte[] response = api.getResultStreamById(jobId, streamId, outputSettings); + ResultStreamRequest resultStreamRequest = null; + byte[] response = api.getResultStream(jobId, resultStreamRequest); // TODO: test validations } @@ -107,7 +97,7 @@ public void getResultStreamByIdTest() throws ApiException { public void getResultStreamsAsContainerTest() throws ApiException { String jobId = null; OutputSettings outputSettings = null; - // byte[] response = api.getResultStreamsAsContainer(jobId, outputSettings); + byte[] response = api.getResultStreamsAsContainer(jobId, outputSettings); // TODO: test validations } @@ -123,7 +113,7 @@ public void getResultStreamsAsContainerTest() throws ApiException { @Test public void submitJobTest() throws ApiException { MergeSettings mergesettings = null; - // MergeJobResponse response = api.submitJob(mergesettings); + MergeJobResponse response = api.submitJob(mergesettings); // TODO: test validations } diff --git a/java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/MergeApiTest.java b/java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/MergeApiTest.java deleted file mode 100644 index 7f52b33..0000000 --- a/java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/MergeApiTest.java +++ /dev/null @@ -1,264 +0,0 @@ -/* - * OfficeTextMerge - * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -package com.sphereon.sdk.template_processor.api; - -import com.sphereon.sdk.template_processor.handler.ApiException; -import com.sphereon.sdk.template_processor.model.DataSetResponse; -import com.sphereon.sdk.template_processor.model.ErrorResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextRequest; -import com.sphereon.sdk.template_processor.model.MergeJobResponse; -import com.sphereon.sdk.template_processor.model.OutputSettings; -import com.sphereon.sdk.template_processor.model.MergeSettings; -import java.io.File; -import org.junit.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for MergeApi - */ -public class MergeApiTest { - - private final MergeApi api = new MergeApi(); - - - /** - * Store dataset - * - * Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void createDataSetTest() throws ApiException { - String payload = null; - // DataSetResponse response = api.createDataSet(payload); - - // TODO: test validations - } - - /** - * Create template context - * - * Create a unique template context for your environment - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void createTemplateContextTest() throws ApiException { - TemplateContextRequest templateRequest = null; - // TemplateContextResponse response = api.createTemplateContext(templateRequest); - - // TODO: test validations - } - - /** - * Delete a stored data set - * - * Delete a stored data set - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void deleteDataSetTest() throws ApiException { - String dataSetId = null; - // DataSetResponse response = api.deleteDataSet(dataSetId); - - // TODO: test validations - } - - /** - * Delete a job manually - * - * Delete the merge job and all related files - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void deleteJobTest() throws ApiException { - String jobId = null; - // MergeJobResponse response = api.deleteJob(jobId); - - // TODO: test validations - } - - /** - * Delete template context - * - * Delete a template context with all history - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void deleteTemplateContextTest() throws ApiException { - String templateId = null; - // TemplateContextResponse response = api.deleteTemplateContext(templateId); - - // TODO: test validations - } - - /** - * Job definition and state - * - * Get the merge job definition and current state. Please not that you can differentiate based on http response status - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getJobTest() throws ApiException { - String jobId = null; - // MergeJobResponse response = api.getJob(jobId); - - // TODO: test validations - } - - /** - * Get all jobs - * - * Get all office text job definitions and their current state. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getJobsTest() throws ApiException { - List status = null; - // List response = api.getJobs(status); - - // TODO: test validations - } - - /** - * Get the result file - * - * Get a merge result document as a binary stream. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getResultStreamByIdTest() throws ApiException { - String jobId = null; - String streamId = null; - OutputSettings outputSettings = null; - // byte[] response = api.getResultStreamById(jobId, streamId, outputSettings); - - // TODO: test validations - } - - /** - * Get the result file - * - * Get all documents inside a compressed container as a binary stream. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getResultStreamsAsContainerTest() throws ApiException { - String jobId = null; - OutputSettings outputSettings = null; - // byte[] response = api.getResultStreamsAsContainer(jobId, outputSettings); - - // TODO: test validations - } - - /** - * Get template context - * - * Get an existing template context - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getTemplateContextTest() throws ApiException { - String templateId = null; - // TemplateContextResponse response = api.getTemplateContext(templateId); - - // TODO: test validations - } - - /** - * Submit merge job for processing - * - * Submit merge job run. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void submitJobTest() throws ApiException { - MergeSettings mergesettings = null; - // MergeJobResponse response = api.submitJob(mergesettings); - - // TODO: test validations - } - - /** - * Update template context - * - * Update an existing template context for your environment - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void updateTemplateContextTest() throws ApiException { - TemplateContextRequest templateContextRequest = null; - // TemplateContextResponse response = api.updateTemplateContext(templateContextRequest); - - // TODO: test validations - } - - /** - * Upload template file - * - * Upload the Office template file - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void uploadTemplateFileTest() throws ApiException { - String templateId = null; - File stream = null; - // TemplateContextResponse response = api.uploadTemplateFile(templateId, stream); - - // TODO: test validations - } - -} diff --git a/java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/TemplateApiTest.java b/java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/TemplateApiTest.java index 27736ac..0ff52fd 100644 --- a/java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/TemplateApiTest.java +++ b/java8-okhttp-gson/src/test/java/com/sphereon/sdk/template_processor/api/TemplateApiTest.java @@ -8,29 +8,19 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.api; import com.sphereon.sdk.template_processor.handler.ApiException; -import com.sphereon.sdk.template_processor.model.TemplateContextResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextRequest; import com.sphereon.sdk.template_processor.model.ErrorResponse; import java.io.File; +import com.sphereon.sdk.template_processor.model.TemplateContext; +import com.sphereon.sdk.template_processor.model.TemplateContextRequest; +import com.sphereon.sdk.template_processor.model.TemplateContextResponse; import org.junit.Test; +import org.junit.Ignore; import java.util.ArrayList; import java.util.HashMap; @@ -40,6 +30,7 @@ /** * API tests for TemplateApi */ +@Ignore public class TemplateApiTest { private final TemplateApi api = new TemplateApi(); @@ -56,7 +47,7 @@ public class TemplateApiTest { @Test public void createTemplateContextTest() throws ApiException { TemplateContextRequest templateRequest = null; - // TemplateContextResponse response = api.createTemplateContext(templateRequest); + TemplateContextResponse response = api.createTemplateContext(templateRequest); // TODO: test validations } @@ -72,7 +63,7 @@ public void createTemplateContextTest() throws ApiException { @Test public void deleteTemplateContextTest() throws ApiException { String templateId = null; - // TemplateContextResponse response = api.deleteTemplateContext(templateId); + TemplateContextResponse response = api.deleteTemplateContext(templateId); // TODO: test validations } @@ -88,7 +79,7 @@ public void deleteTemplateContextTest() throws ApiException { @Test public void getTemplateContextTest() throws ApiException { String templateId = null; - // TemplateContextResponse response = api.getTemplateContext(templateId); + TemplateContextResponse response = api.getTemplateContext(templateId); // TODO: test validations } @@ -103,8 +94,8 @@ public void getTemplateContextTest() throws ApiException { */ @Test public void updateTemplateContextTest() throws ApiException { - TemplateContextRequest templateContextRequest = null; - // TemplateContextResponse response = api.updateTemplateContext(templateContextRequest); + TemplateContext templateContext = null; + TemplateContextResponse response = api.updateTemplateContext(templateContext); // TODO: test validations } @@ -121,7 +112,7 @@ public void updateTemplateContextTest() throws ApiException { public void uploadTemplateFileTest() throws ApiException { String templateId = null; File stream = null; - // TemplateContextResponse response = api.uploadTemplateFile(templateId, stream); + TemplateContextResponse response = api.uploadTemplateFile(templateId, stream); // TODO: test validations } diff --git a/java8-retrofit2/.swagger-codegen/VERSION b/java8-retrofit2/.swagger-codegen/VERSION new file mode 100644 index 0000000..6b4d157 --- /dev/null +++ b/java8-retrofit2/.swagger-codegen/VERSION @@ -0,0 +1 @@ +2.2.3 \ No newline at end of file diff --git a/java8-retrofit2/.travis.yml b/java8-retrofit2/.travis.yml index 33e7947..70cb81a 100644 --- a/java8-retrofit2/.travis.yml +++ b/java8-retrofit2/.travis.yml @@ -1,18 +1,6 @@ # # Generated by: https://github.com/swagger-api/swagger-codegen.git # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# language: java jdk: - oraclejdk8 diff --git a/java8-retrofit2/LICENSE b/java8-retrofit2/LICENSE deleted file mode 100644 index 8dada3e..0000000 --- a/java8-retrofit2/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/java8-retrofit2/README.md b/java8-retrofit2/README.md index 0d63129..369f17d 100644 --- a/java8-retrofit2/README.md +++ b/java8-retrofit2/README.md @@ -26,7 +26,7 @@ After the client library is installed/deployed, you can use it in your Maven pro com.sphereon.sdk template-processor-sdk-java8-retrofit2 - 0.1.0 + 0.1.1 compile diff --git a/java8-retrofit2/build.gradle b/java8-retrofit2/build.gradle index 7d832de..f168d05 100644 --- a/java8-retrofit2/build.gradle +++ b/java8-retrofit2/build.gradle @@ -2,15 +2,15 @@ apply plugin: 'idea' apply plugin: 'eclipse' group = 'com.sphereon.sdk' -version = '0.1.0' +version = '0.1.1' buildscript { repositories { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:1.5.+' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' + classpath 'com.android.tools.build:gradle:2.3.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' } } @@ -21,82 +21,82 @@ repositories { if(hasProperty('target') && target == 'android') { - apply plugin: 'com.android.library' - apply plugin: 'com.github.dcendents.android-maven' - - android { - compileSdkVersion 23 - buildToolsVersion '23.0.2' - defaultConfig { - minSdkVersion 14 - targetSdkVersion 23 - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_7 - targetCompatibility JavaVersion.VERSION_1_7 - } - - // Rename the aar correctly - libraryVariants.all { variant -> - variant.outputs.each { output -> - def outputFile = output.outputFile - if (outputFile != null && outputFile.name.endsWith('.aar')) { - def fileName = "${project.name}-${variant.baseName}-${version}.aar" - output.outputFile = new File(outputFile.parent, fileName) - } - } - } - - dependencies { - provided 'javax.annotation:jsr250-api:1.0' - } - } - - afterEvaluate { - android.libraryVariants.all { variant -> - def task = project.tasks.create "jar${variant.name.capitalize()}", Jar - task.description = "Create jar artifact for ${variant.name}" - task.dependsOn variant.javaCompile - task.from variant.javaCompile.destinationDir - task.destinationDir = project.file("${project.buildDir}/outputs/jar") - task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" - artifacts.add('archives', task); - } - } - - task sourcesJar(type: Jar) { - from android.sourceSets.main.java.srcDirs - classifier = 'sources' - } - - artifacts { - archives sourcesJar - } + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 25 + buildToolsVersion '25.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 25 + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided 'javax.annotation:jsr250-api:1.0' + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDir + task.destinationDir = project.file("${project.buildDir}/outputs/jar") + task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task); + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' + } + + artifacts { + archives sourcesJar + } } else { - apply plugin: 'java' - apply plugin: 'maven' + apply plugin: 'java' + apply plugin: 'maven' sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 - install { - repositories.mavenInstaller { - pom.artifactId = 'template-processor-sdk-java8-retrofit2' - } - } + install { + repositories.mavenInstaller { + pom.artifactId = 'template-processor-sdk-java8-retrofit2' + } + } - task execute(type:JavaExec) { - main = System.getProperty('mainClass') - classpath = sourceSets.main.runtimeClasspath - } + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } } ext { oltu_version = "1.0.1" - retrofit_version = "2.0.2" - swagger_annotations_version = "1.5.8" + retrofit_version = "2.3.0" + swagger_annotations_version = "1.5.15" junit_version = "4.12" } diff --git a/java8-retrofit2/build.sbt b/java8-retrofit2/build.sbt index 9ee7f3c..3189802 100644 --- a/java8-retrofit2/build.sbt +++ b/java8-retrofit2/build.sbt @@ -2,19 +2,19 @@ lazy val root = (project in file(".")). settings( organization := "com.sphereon.sdk", name := "template-processor-sdk-java8-retrofit2", - version := "0.1.0", + version := "0.1.1", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), javacOptions in compile ++= Seq("-Xlint:deprecation"), publishArtifact in (Compile, packageDoc) := false, resolvers += Resolver.mavenLocal, libraryDependencies ++= Seq( - "com.squareup.retrofit2" % "retrofit" % "2.0.2" % "compile", - "com.squareup.retrofit2" % "converter-scalars" % "2.0.2" % "compile", - "com.squareup.retrofit2" % "converter-gson" % "2.0.2" % "compile", - "io.swagger" % "swagger-annotations" % "1.5.8" % "compile", + "com.squareup.retrofit2" % "retrofit" % "2.3.0" % "compile", + "com.squareup.retrofit2" % "converter-scalars" % "2.3.0" % "compile", + "com.squareup.retrofit2" % "converter-gson" % "2.3.0" % "compile", + "io.swagger" % "swagger-annotations" % "1.5.15" % "compile", "org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile", "junit" % "junit" % "4.12" % "test", - "com.novocode" % "junit-interface" % "0.10" % "test" + "com.novocode" % "junit-interface" % "0.11" % "test" ) ) diff --git a/java8-retrofit2/docs/AllApi.md b/java8-retrofit2/docs/AllApi.md index 8196f06..e56bcd3 100644 --- a/java8-retrofit2/docs/AllApi.md +++ b/java8-retrofit2/docs/AllApi.md @@ -1,6 +1,6 @@ # AllApi -All URIs are relative to *https://gw.api.cloud.sphereon.com/* +All URIs are relative to *https://gw.api.cloud.sphereon.com* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -11,7 +11,7 @@ Method | HTTP request | Description [**deleteTemplateContext**](AllApi.md#deleteTemplateContext) | **DELETE** template/processor/0.1/templates/{templateId} | Delete template context [**getJob**](AllApi.md#getJob) | **GET** template/processor/0.1/jobs/{jobId} | Job definition and state [**getJobs**](AllApi.md#getJobs) | **GET** template/processor/0.1/jobs | Get all jobs -[**getResultStreamById**](AllApi.md#getResultStreamById) | **PUT** template/processor/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file +[**getResultStream**](AllApi.md#getResultStream) | **PUT** template/processor/0.1/jobs/{jobId}/result/stream | Get the result file [**getResultStreamsAsContainer**](AllApi.md#getResultStreamsAsContainer) | **PUT** template/processor/0.1/jobs/{jobId}/result/container | Get the result file [**getTemplateContext**](AllApi.md#getTemplateContext) | **GET** template/processor/0.1/templates/{templateId} | Get template context [**submitJob**](AllApi.md#submitJob) | **PUT** template/processor/0.1/jobs | Submit merge job for processing @@ -390,9 +390,9 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json;charset=UTF-8 - -# **getResultStreamById** -> byte[] getResultStreamById(jobId, streamId, outputSettings) + +# **getResultStream** +> byte[] getResultStream(jobId, resultStreamRequest) Get the result file @@ -415,13 +415,12 @@ oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); AllApi apiInstance = new AllApi(); String jobId = "jobId_example"; // String | jobId -String streamId = "streamId_example"; // String | streamId -OutputSettings outputSettings = new OutputSettings(); // OutputSettings | outputSettings +ResultStreamRequest resultStreamRequest = new ResultStreamRequest(); // ResultStreamRequest | resultStreamRequest try { - byte[] result = apiInstance.getResultStreamById(jobId, streamId, outputSettings); + byte[] result = apiInstance.getResultStream(jobId, resultStreamRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AllApi#getResultStreamById"); + System.err.println("Exception when calling AllApi#getResultStream"); e.printStackTrace(); } ``` @@ -431,8 +430,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **jobId** | **String**| jobId | - **streamId** | **String**| streamId | - **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] + **resultStreamRequest** | [**ResultStreamRequest**](ResultStreamRequest.md)| resultStreamRequest | ### Return type diff --git a/java8-retrofit2/docs/DataSetApi.md b/java8-retrofit2/docs/DataSetApi.md index 8247896..06cd1d8 100644 --- a/java8-retrofit2/docs/DataSetApi.md +++ b/java8-retrofit2/docs/DataSetApi.md @@ -1,6 +1,6 @@ # DataSetApi -All URIs are relative to *https://gw.api.cloud.sphereon.com/* +All URIs are relative to *https://gw.api.cloud.sphereon.com* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/java8-retrofit2/docs/JobApi.md b/java8-retrofit2/docs/JobApi.md index 74346b2..6d64749 100644 --- a/java8-retrofit2/docs/JobApi.md +++ b/java8-retrofit2/docs/JobApi.md @@ -1,12 +1,12 @@ # JobApi -All URIs are relative to *https://gw.api.cloud.sphereon.com/* +All URIs are relative to *https://gw.api.cloud.sphereon.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**getJob**](JobApi.md#getJob) | **GET** template/processor/0.1/jobs/{jobId} | Job definition and state [**getJobs**](JobApi.md#getJobs) | **GET** template/processor/0.1/jobs | Get all jobs -[**getResultStreamById**](JobApi.md#getResultStreamById) | **PUT** template/processor/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file +[**getResultStream**](JobApi.md#getResultStream) | **PUT** template/processor/0.1/jobs/{jobId}/result/stream | Get the result file [**getResultStreamsAsContainer**](JobApi.md#getResultStreamsAsContainer) | **PUT** template/processor/0.1/jobs/{jobId}/result/container | Get the result file [**submitJob**](JobApi.md#submitJob) | **PUT** template/processor/0.1/jobs | Submit merge job for processing @@ -117,9 +117,9 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json;charset=UTF-8 - -# **getResultStreamById** -> byte[] getResultStreamById(jobId, streamId, outputSettings) + +# **getResultStream** +> byte[] getResultStream(jobId, resultStreamRequest) Get the result file @@ -142,13 +142,12 @@ oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); JobApi apiInstance = new JobApi(); String jobId = "jobId_example"; // String | jobId -String streamId = "streamId_example"; // String | streamId -OutputSettings outputSettings = new OutputSettings(); // OutputSettings | outputSettings +ResultStreamRequest resultStreamRequest = new ResultStreamRequest(); // ResultStreamRequest | resultStreamRequest try { - byte[] result = apiInstance.getResultStreamById(jobId, streamId, outputSettings); + byte[] result = apiInstance.getResultStream(jobId, resultStreamRequest); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling JobApi#getResultStreamById"); + System.err.println("Exception when calling JobApi#getResultStream"); e.printStackTrace(); } ``` @@ -158,8 +157,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **jobId** | **String**| jobId | - **streamId** | **String**| streamId | - **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] + **resultStreamRequest** | [**ResultStreamRequest**](ResultStreamRequest.md)| resultStreamRequest | ### Return type diff --git a/java8-retrofit2/docs/MergeApi.md b/java8-retrofit2/docs/MergeApi.md deleted file mode 100644 index 255a0ba..0000000 --- a/java8-retrofit2/docs/MergeApi.md +++ /dev/null @@ -1,718 +0,0 @@ -# MergeApi - -All URIs are relative to *https://gw.api.cloud.sphereon.com/* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createDataSet**](MergeApi.md#createDataSet) | **POST** template-processor/merge/0.1/datasets | Store dataset -[**createTemplateContext**](MergeApi.md#createTemplateContext) | **POST** template-processor/merge/0.1/templates | Create template context -[**deleteDataSet**](MergeApi.md#deleteDataSet) | **DELETE** template-processor/merge/0.1/datasets/{dataSetId} | Delete a stored data set -[**deleteJob**](MergeApi.md#deleteJob) | **DELETE** template-processor/merge/0.1/jobs/{jobId} | Delete a job manually -[**deleteTemplateContext**](MergeApi.md#deleteTemplateContext) | **DELETE** template-processor/merge/0.1/templates/{templateId} | Delete template context -[**getJob**](MergeApi.md#getJob) | **GET** template-processor/merge/0.1/jobs/{jobId} | Job definition and state -[**getJobs**](MergeApi.md#getJobs) | **GET** template-processor/merge/0.1/jobs | Get all jobs -[**getResultStreamById**](MergeApi.md#getResultStreamById) | **PUT** template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file -[**getResultStreamsAsContainer**](MergeApi.md#getResultStreamsAsContainer) | **PUT** template-processor/merge/0.1/jobs/{jobId}/result/container | Get the result file -[**getTemplateContext**](MergeApi.md#getTemplateContext) | **GET** template-processor/merge/0.1/templates/{templateId} | Get template context -[**submitJob**](MergeApi.md#submitJob) | **PUT** template-processor/merge/0.1/jobs | Submit merge job for processing -[**updateTemplateContext**](MergeApi.md#updateTemplateContext) | **PUT** template-processor/merge/0.1/templates | Update template context -[**uploadTemplateFile**](MergeApi.md#uploadTemplateFile) | **POST** template-processor/merge/0.1/templates/{templateId} | Upload template file - - - -# **createDataSet** -> DataSetResponse createDataSet(payload) - -Store dataset - -Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String payload = "payload_example"; // String | The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] -try { - DataSetResponse result = apiInstance.createDataSet(payload); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#createDataSet"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **payload** | **String**| The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] | - -### Return type - -[**DataSetResponse**](DataSetResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - - -# **createTemplateContext** -> TemplateContextResponse createTemplateContext(templateRequest) - -Create template context - -Create a unique template context for your environment - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -TemplateContextRequest templateRequest = new TemplateContextRequest(); // TemplateContextRequest | The template request -try { - TemplateContextResponse result = apiInstance.createTemplateContext(templateRequest); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#createTemplateContext"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| The template request | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - - -# **deleteDataSet** -> DataSetResponse deleteDataSet(dataSetId) - -Delete a stored data set - -Delete a stored data set - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String dataSetId = "dataSetId_example"; // String | dataSetId -try { - DataSetResponse result = apiInstance.deleteDataSet(dataSetId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#deleteDataSet"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **dataSetId** | **String**| dataSetId | - -### Return type - -[**DataSetResponse**](DataSetResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - - -# **deleteJob** -> MergeJobResponse deleteJob(jobId) - -Delete a job manually - -Delete the merge job and all related files - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String jobId = "jobId_example"; // String | jobId -try { - MergeJobResponse result = apiInstance.deleteJob(jobId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#deleteJob"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **String**| jobId | - -### Return type - -[**MergeJobResponse**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - - -# **deleteTemplateContext** -> TemplateContextResponse deleteTemplateContext(templateId) - -Delete template context - -Delete a template context with all history - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String templateId = "templateId_example"; // String | templateId -try { - TemplateContextResponse result = apiInstance.deleteTemplateContext(templateId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#deleteTemplateContext"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateId** | **String**| templateId | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - - -# **getJob** -> MergeJobResponse getJob(jobId) - -Job definition and state - -Get the merge job definition and current state. Please not that you can differentiate based on http response status - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String jobId = "jobId_example"; // String | jobId -try { - MergeJobResponse result = apiInstance.getJob(jobId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#getJob"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **String**| jobId | - -### Return type - -[**MergeJobResponse**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - - -# **getJobs** -> List<MergeJobResponse> getJobs(status) - -Get all jobs - -Get all office text job definitions and their current state. - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -List status = Arrays.asList("status_example"); // List | A list of status to filter on. -try { - List result = apiInstance.getJobs(status); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#getJobs"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<String>**](String.md)| A list of status to filter on. | [optional] [enum: CREATED, UPDATED, PROCESSING, DONE, ERROR, DELETED] - -### Return type - -[**List<MergeJobResponse>**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - - -# **getResultStreamById** -> byte[] getResultStreamById(jobId, streamId, outputSettings) - -Get the result file - -Get a merge result document as a binary stream. - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String jobId = "jobId_example"; // String | jobId -String streamId = "streamId_example"; // String | streamId -OutputSettings outputSettings = new OutputSettings(); // OutputSettings | outputSettings -try { - byte[] result = apiInstance.getResultStreamById(jobId, streamId, outputSettings); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#getResultStreamById"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **String**| jobId | - **streamId** | **String**| streamId | - **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] - -### Return type - -**byte[]** - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/octet-stream - - -# **getResultStreamsAsContainer** -> byte[] getResultStreamsAsContainer(jobId, outputSettings) - -Get the result file - -Get all documents inside a compressed container as a binary stream. - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String jobId = "jobId_example"; // String | jobId -OutputSettings outputSettings = new OutputSettings(); // OutputSettings | outputSettings -try { - byte[] result = apiInstance.getResultStreamsAsContainer(jobId, outputSettings); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#getResultStreamsAsContainer"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **String**| jobId | - **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] - -### Return type - -**byte[]** - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/octet-stream - - -# **getTemplateContext** -> TemplateContextResponse getTemplateContext(templateId) - -Get template context - -Get an existing template context - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String templateId = "templateId_example"; // String | The template context name unique for your environment -try { - TemplateContextResponse result = apiInstance.getTemplateContext(templateId); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#getTemplateContext"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateId** | **String**| The template context name unique for your environment | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - - -# **submitJob** -> MergeJobResponse submitJob(mergesettings) - -Submit merge job for processing - -Submit merge job run. - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -MergeSettings mergesettings = new MergeSettings(); // MergeSettings | The merge- and output settings -try { - MergeJobResponse result = apiInstance.submitJob(mergesettings); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#submitJob"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **mergesettings** | [**MergeSettings**](MergeSettings.md)| The merge- and output settings | - -### Return type - -[**MergeJobResponse**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - - -# **updateTemplateContext** -> TemplateContextResponse updateTemplateContext(templateContextRequest) - -Update template context - -Update an existing template context for your environment - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -TemplateContextRequest templateContextRequest = new TemplateContextRequest(); // TemplateContextRequest | templateContextRequest -try { - TemplateContextResponse result = apiInstance.updateTemplateContext(templateContextRequest); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#updateTemplateContext"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateContextRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| templateContextRequest | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - - -# **uploadTemplateFile** -> TemplateContextResponse uploadTemplateFile(templateId, stream) - -Upload template file - -Upload the Office template file - -### Example -```java -// Import classes: -//import com.sphereon.sdk.template_processor.handler.ApiClient; -//import com.sphereon.sdk.template_processor.handler.ApiException; -//import com.sphereon.sdk.template_processor.handler.Configuration; -//import com.sphereon.sdk.template_processor.handler.auth.*; -//import com.sphereon.sdk.template_processor.api.MergeApi; - -ApiClient defaultClient = Configuration.getDefaultApiClient(); - -// Configure OAuth2 access token for authorization: oauth2schema -OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema"); -oauth2schema.setAccessToken("YOUR ACCESS TOKEN"); - -MergeApi apiInstance = new MergeApi(); -String templateId = "templateId_example"; // String | The template context name unique for your environment -File stream = new File("/path/to/file.txt"); // File | The template (file/inputstream) to store -try { - TemplateContextResponse result = apiInstance.uploadTemplateFile(templateId, stream); - System.out.println(result); -} catch (ApiException e) { - System.err.println("Exception when calling MergeApi#uploadTemplateFile"); - e.printStackTrace(); -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateId** | **String**| The template context name unique for your environment | - **stream** | **File**| The template (file/inputstream) to store | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json;charset=UTF-8 - diff --git a/java8-retrofit2/docs/ResultStreamRequest.md b/java8-retrofit2/docs/ResultStreamRequest.md new file mode 100644 index 0000000..1c6e0fc --- /dev/null +++ b/java8-retrofit2/docs/ResultStreamRequest.md @@ -0,0 +1,11 @@ + +# ResultStreamRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**streamLocation** | [**StreamLocation**](StreamLocation.md) | The stream location | +**outputSettings** | [**OutputSettings**](OutputSettings.md) | The Output settings | [optional] + + + diff --git a/java8-retrofit2/docs/TemplateApi.md b/java8-retrofit2/docs/TemplateApi.md index 91c2348..76efa95 100644 --- a/java8-retrofit2/docs/TemplateApi.md +++ b/java8-retrofit2/docs/TemplateApi.md @@ -1,6 +1,6 @@ # TemplateApi -All URIs are relative to *https://gw.api.cloud.sphereon.com/* +All URIs are relative to *https://gw.api.cloud.sphereon.com* Method | HTTP request | Description ------------- | ------------- | ------------- diff --git a/java8-retrofit2/pom.xml b/java8-retrofit2/pom.xml index a4474ac..8642935 100644 --- a/java8-retrofit2/pom.xml +++ b/java8-retrofit2/pom.xml @@ -5,9 +5,11 @@ template-processor-sdk-java8-retrofit2 jar template-processor-sdk-java8-retrofit2 - 0.1.0 + 0.1.1 + https://github.com/swagger-api/swagger-codegen + Swagger Java - scm:git:git@github.com:swagger-api/swagger-mustache.git + scm:git:git@github.com:swagger-api/swagger-codegen.git scm:git:git@github.com:swagger-api/swagger-codegen.git https://github.com/swagger-api/swagger-codegen @@ -15,6 +17,23 @@ 2.2.0 + + + Unlicense + http://www.apache.org/licenses/LICENSE-2.0 + repo + + + + + + Swagger + apiteam@swagger.io + Swagger + http://swagger.io + + + @@ -100,9 +119,55 @@ org.apache.maven.plugins maven-javadoc-plugin 2.10.4 + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + + + + io.swagger @@ -130,6 +195,8 @@ ${oltu-version} + + junit @@ -143,8 +210,8 @@ 1.8 ${java.version} ${java.version} - 1.5.9 - 2.1.0 + 1.5.15 + 2.3.0 1.0.1 4.12 diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/AllApi.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/AllApi.java index 24e69f8..aaf1769 100644 --- a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/AllApi.java +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/AllApi.java @@ -3,6 +3,7 @@ import com.sphereon.sdk.template_processor.handler.CollectionFormats.*; + import retrofit2.Call; import retrofit2.http.*; @@ -10,19 +11,21 @@ import com.sphereon.sdk.template_processor.model.DataSetResponse; import com.sphereon.sdk.template_processor.model.ErrorResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextRequest; +import java.io.File; import com.sphereon.sdk.template_processor.model.MergeJobResponse; -import com.sphereon.sdk.template_processor.model.OutputSettings; import com.sphereon.sdk.template_processor.model.MergeSettings; +import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.ResultStreamRequest; import com.sphereon.sdk.template_processor.model.TemplateContext; -import java.io.File; +import com.sphereon.sdk.template_processor.model.TemplateContextRequest; +import com.sphereon.sdk.template_processor.model.TemplateContextResponse; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; + public interface AllApi { /** * Store dataset @@ -30,9 +33,8 @@ public interface AllApi { * @param payload The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] (required) * @return Call<DataSetResponse> */ - @Headers({ - "Content-Type:application/json;charset=UTF-8" + "Content-Type:application/json;charset=UTF-8" }) @POST("template/processor/0.1/datasets") Call createDataSet( @@ -45,9 +47,8 @@ Call createDataSet( * @param templateRequest The template request (required) * @return Call<TemplateContextResponse> */ - @Headers({ - "Content-Type:application/json;charset=UTF-8" + "Content-Type:application/json;charset=UTF-8" }) @POST("template/processor/0.1/templates") Call createTemplateContext( @@ -60,9 +61,8 @@ Call createTemplateContext( * @param dataSetId dataSetId (required) * @return Call<DataSetResponse> */ - @Headers({ - "Content-Type:application/json" + "Content-Type:application/json" }) @DELETE("template/processor/0.1/datasets/{dataSetId}") Call deleteDataSet( @@ -75,9 +75,8 @@ Call deleteDataSet( * @param jobId jobId (required) * @return Call<MergeJobResponse> */ - @Headers({ - "Content-Type:application/json" + "Content-Type:application/json" }) @DELETE("template/processor/0.1/jobs/{jobId}") Call deleteJob( @@ -90,9 +89,8 @@ Call deleteJob( * @param templateId templateId (required) * @return Call<TemplateContextResponse> */ - @Headers({ - "Content-Type:application/json" + "Content-Type:application/json" }) @DELETE("template/processor/0.1/templates/{templateId}") Call deleteTemplateContext( @@ -105,9 +103,8 @@ Call deleteTemplateContext( * @param jobId jobId (required) * @return Call<MergeJobResponse> */ - @Headers({ - "Content-Type:application/json" + "Content-Type:application/json" }) @GET("template/processor/0.1/jobs/{jobId}") Call getJob( @@ -118,11 +115,10 @@ Call getJob( * Get all jobs * Get all office text job definitions and their current state. * @param status A list of status to filter on. (optional) - * @return Call<List> + * @return Call<List<MergeJobResponse>> */ - @Headers({ - "Content-Type:application/json" + "Content-Type:application/json" }) @GET("template/processor/0.1/jobs") Call> getJobs( @@ -133,17 +129,15 @@ Call> getJobs( * Get the result file * Get a merge result document as a binary stream. * @param jobId jobId (required) - * @param streamId streamId (required) - * @param outputSettings outputSettings (optional) + * @param resultStreamRequest resultStreamRequest (required) * @return Call<byte[]> */ - @Headers({ - "Content-Type:application/json;charset=UTF-8" + "Content-Type:application/json;charset=UTF-8" }) - @PUT("template/processor/0.1/jobs/{jobId}/result/file/{streamId}") - Call getResultStreamById( - @retrofit2.http.Path("jobId") String jobId, @retrofit2.http.Path("streamId") String streamId, @retrofit2.http.Body OutputSettings outputSettings + @PUT("template/processor/0.1/jobs/{jobId}/result/stream") + Call getResultStream( + @retrofit2.http.Path("jobId") String jobId, @retrofit2.http.Body ResultStreamRequest resultStreamRequest ); /** @@ -153,9 +147,8 @@ Call getResultStreamById( * @param outputSettings outputSettings (optional) * @return Call<byte[]> */ - @Headers({ - "Content-Type:application/json;charset=UTF-8" + "Content-Type:application/json;charset=UTF-8" }) @PUT("template/processor/0.1/jobs/{jobId}/result/container") Call getResultStreamsAsContainer( @@ -168,9 +161,8 @@ Call getResultStreamsAsContainer( * @param templateId The template context name unique for your environment (required) * @return Call<TemplateContextResponse> */ - @Headers({ - "Content-Type:application/json" + "Content-Type:application/json" }) @GET("template/processor/0.1/templates/{templateId}") Call getTemplateContext( @@ -183,9 +175,8 @@ Call getTemplateContext( * @param mergesettings The merge- and output settings (required) * @return Call<MergeJobResponse> */ - @Headers({ - "Content-Type:application/json;charset=UTF-8" + "Content-Type:application/json;charset=UTF-8" }) @PUT("template/processor/0.1/jobs") Call submitJob( @@ -198,9 +189,8 @@ Call submitJob( * @param templateContext templateContext (required) * @return Call<TemplateContextResponse> */ - @Headers({ - "Content-Type:application/json;charset=UTF-8" + "Content-Type:application/json;charset=UTF-8" }) @PUT("template/processor/0.1/templates") Call updateTemplateContext( @@ -214,7 +204,6 @@ Call updateTemplateContext( * @param stream The template (file/inputstream) to store (required) * @return Call<TemplateContextResponse> */ - @retrofit2.http.Multipart @POST("template/processor/0.1/templates/{templateId}") Call uploadTemplateFile( diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/DataSetApi.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/DataSetApi.java index 60a3203..42bbc43 100644 --- a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/DataSetApi.java +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/DataSetApi.java @@ -3,6 +3,7 @@ import com.sphereon.sdk.template_processor.handler.CollectionFormats.*; + import retrofit2.Call; import retrofit2.http.*; @@ -16,6 +17,7 @@ import java.util.List; import java.util.Map; + public interface DataSetApi { /** * Store dataset @@ -23,9 +25,8 @@ public interface DataSetApi { * @param payload The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] (required) * @return Call<DataSetResponse> */ - @Headers({ - "Content-Type:application/json;charset=UTF-8" + "Content-Type:application/json;charset=UTF-8" }) @POST("template/processor/0.1/datasets") Call createDataSet( @@ -38,9 +39,8 @@ Call createDataSet( * @param dataSetId dataSetId (required) * @return Call<DataSetResponse> */ - @Headers({ - "Content-Type:application/json" + "Content-Type:application/json" }) @DELETE("template/processor/0.1/datasets/{dataSetId}") Call deleteDataSet( diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/JobApi.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/JobApi.java index d364ab7..740a3d4 100644 --- a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/JobApi.java +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/JobApi.java @@ -3,21 +3,24 @@ import com.sphereon.sdk.template_processor.handler.CollectionFormats.*; + import retrofit2.Call; import retrofit2.http.*; import okhttp3.RequestBody; -import com.sphereon.sdk.template_processor.model.MergeJobResponse; import com.sphereon.sdk.template_processor.model.ErrorResponse; -import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.MergeJobResponse; import com.sphereon.sdk.template_processor.model.MergeSettings; +import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.ResultStreamRequest; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; + public interface JobApi { /** * Job definition and state @@ -25,9 +28,8 @@ public interface JobApi { * @param jobId jobId (required) * @return Call<MergeJobResponse> */ - @Headers({ - "Content-Type:application/json" + "Content-Type:application/json" }) @GET("template/processor/0.1/jobs/{jobId}") Call getJob( @@ -38,11 +40,10 @@ Call getJob( * Get all jobs * Get all office text job definitions and their current state. * @param status A list of status to filter on. (optional) - * @return Call<List> + * @return Call<List<MergeJobResponse>> */ - @Headers({ - "Content-Type:application/json" + "Content-Type:application/json" }) @GET("template/processor/0.1/jobs") Call> getJobs( @@ -53,17 +54,15 @@ Call> getJobs( * Get the result file * Get a merge result document as a binary stream. * @param jobId jobId (required) - * @param streamId streamId (required) - * @param outputSettings outputSettings (optional) + * @param resultStreamRequest resultStreamRequest (required) * @return Call<byte[]> */ - @Headers({ - "Content-Type:application/json;charset=UTF-8" + "Content-Type:application/json;charset=UTF-8" }) - @PUT("template/processor/0.1/jobs/{jobId}/result/file/{streamId}") - Call getResultStreamById( - @retrofit2.http.Path("jobId") String jobId, @retrofit2.http.Path("streamId") String streamId, @retrofit2.http.Body OutputSettings outputSettings + @PUT("template/processor/0.1/jobs/{jobId}/result/stream") + Call getResultStream( + @retrofit2.http.Path("jobId") String jobId, @retrofit2.http.Body ResultStreamRequest resultStreamRequest ); /** @@ -73,9 +72,8 @@ Call getResultStreamById( * @param outputSettings outputSettings (optional) * @return Call<byte[]> */ - @Headers({ - "Content-Type:application/json;charset=UTF-8" + "Content-Type:application/json;charset=UTF-8" }) @PUT("template/processor/0.1/jobs/{jobId}/result/container") Call getResultStreamsAsContainer( @@ -88,9 +86,8 @@ Call getResultStreamsAsContainer( * @param mergesettings The merge- and output settings (required) * @return Call<MergeJobResponse> */ - @Headers({ - "Content-Type:application/json;charset=UTF-8" + "Content-Type:application/json;charset=UTF-8" }) @PUT("template/processor/0.1/jobs") Call submitJob( diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/MergeApi.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/MergeApi.java deleted file mode 100644 index 8ec5109..0000000 --- a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/MergeApi.java +++ /dev/null @@ -1,223 +0,0 @@ -package com.sphereon.sdk.template_processor.api; - -import com.sphereon.sdk.template_processor.handler.CollectionFormats.*; - - -import retrofit2.Call; -import retrofit2.http.*; - -import okhttp3.RequestBody; - -import com.sphereon.sdk.template_processor.model.DataSetResponse; -import com.sphereon.sdk.template_processor.model.ErrorResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextRequest; -import com.sphereon.sdk.template_processor.model.MergeJobResponse; -import com.sphereon.sdk.template_processor.model.OutputSettings; -import com.sphereon.sdk.template_processor.model.MergeSettings; -import java.io.File; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -public interface MergeApi { - /** - * Store dataset - * Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - * @param payload The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] (required) - * @return Call<DataSetResponse> - */ - - @Headers({ - "Content-Type:application/json;charset=UTF-8" - }) - @POST("template-processor/merge/0.1/datasets") - Call createDataSet( - @retrofit2.http.Body String payload - ); - - /** - * Create template context - * Create a unique template context for your environment - * @param templateRequest The template request (required) - * @return Call<TemplateContextResponse> - */ - - @Headers({ - "Content-Type:application/json;charset=UTF-8" - }) - @POST("template-processor/merge/0.1/templates") - Call createTemplateContext( - @retrofit2.http.Body TemplateContextRequest templateRequest - ); - - /** - * Delete a stored data set - * Delete a stored data set - * @param dataSetId dataSetId (required) - * @return Call<DataSetResponse> - */ - - @Headers({ - "Content-Type:application/json" - }) - @DELETE("template-processor/merge/0.1/datasets/{dataSetId}") - Call deleteDataSet( - @retrofit2.http.Path("dataSetId") String dataSetId - ); - - /** - * Delete a job manually - * Delete the merge job and all related files - * @param jobId jobId (required) - * @return Call<MergeJobResponse> - */ - - @Headers({ - "Content-Type:application/json" - }) - @DELETE("template-processor/merge/0.1/jobs/{jobId}") - Call deleteJob( - @retrofit2.http.Path("jobId") String jobId - ); - - /** - * Delete template context - * Delete a template context with all history - * @param templateId templateId (required) - * @return Call<TemplateContextResponse> - */ - - @Headers({ - "Content-Type:application/json" - }) - @DELETE("template-processor/merge/0.1/templates/{templateId}") - Call deleteTemplateContext( - @retrofit2.http.Path("templateId") String templateId - ); - - /** - * Job definition and state - * Get the merge job definition and current state. Please not that you can differentiate based on http response status - * @param jobId jobId (required) - * @return Call<MergeJobResponse> - */ - - @Headers({ - "Content-Type:application/json" - }) - @GET("template-processor/merge/0.1/jobs/{jobId}") - Call getJob( - @retrofit2.http.Path("jobId") String jobId - ); - - /** - * Get all jobs - * Get all office text job definitions and their current state. - * @param status A list of status to filter on. (optional) - * @return Call<List> - */ - - @Headers({ - "Content-Type:application/json" - }) - @GET("template-processor/merge/0.1/jobs") - Call> getJobs( - @retrofit2.http.Query("status") List status - ); - - /** - * Get the result file - * Get a merge result document as a binary stream. - * @param jobId jobId (required) - * @param streamId streamId (required) - * @param outputSettings outputSettings (optional) - * @return Call<byte[]> - */ - - @Headers({ - "Content-Type:application/json;charset=UTF-8" - }) - @PUT("template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId}") - Call getResultStreamById( - @retrofit2.http.Path("jobId") String jobId, @retrofit2.http.Path("streamId") String streamId, @retrofit2.http.Body OutputSettings outputSettings - ); - - /** - * Get the result file - * Get all documents inside a compressed container as a binary stream. - * @param jobId jobId (required) - * @param outputSettings outputSettings (optional) - * @return Call<byte[]> - */ - - @Headers({ - "Content-Type:application/json;charset=UTF-8" - }) - @PUT("template-processor/merge/0.1/jobs/{jobId}/result/container") - Call getResultStreamsAsContainer( - @retrofit2.http.Path("jobId") String jobId, @retrofit2.http.Body OutputSettings outputSettings - ); - - /** - * Get template context - * Get an existing template context - * @param templateId The template context name unique for your environment (required) - * @return Call<TemplateContextResponse> - */ - - @Headers({ - "Content-Type:application/json" - }) - @GET("template-processor/merge/0.1/templates/{templateId}") - Call getTemplateContext( - @retrofit2.http.Path("templateId") String templateId - ); - - /** - * Submit merge job for processing - * Submit merge job run. - * @param mergesettings The merge- and output settings (required) - * @return Call<MergeJobResponse> - */ - - @Headers({ - "Content-Type:application/json;charset=UTF-8" - }) - @PUT("template-processor/merge/0.1/jobs") - Call submitJob( - @retrofit2.http.Body MergeSettings mergesettings - ); - - /** - * Update template context - * Update an existing template context for your environment - * @param templateContextRequest templateContextRequest (required) - * @return Call<TemplateContextResponse> - */ - - @Headers({ - "Content-Type:application/json;charset=UTF-8" - }) - @PUT("template-processor/merge/0.1/templates") - Call updateTemplateContext( - @retrofit2.http.Body TemplateContextRequest templateContextRequest - ); - - /** - * Upload template file - * Upload the Office template file - * @param templateId The template context name unique for your environment (required) - * @param stream The template (file/inputstream) to store (required) - * @return Call<TemplateContextResponse> - */ - - @retrofit2.http.Multipart - @POST("template-processor/merge/0.1/templates/{templateId}") - Call uploadTemplateFile( - @retrofit2.http.Path("templateId") String templateId, @retrofit2.http.Part("stream\"; filename=\"stream") RequestBody stream - ); - -} diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/TemplateApi.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/TemplateApi.java index 6ee01b2..8003ee3 100644 --- a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/TemplateApi.java +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/TemplateApi.java @@ -3,22 +3,24 @@ import com.sphereon.sdk.template_processor.handler.CollectionFormats.*; + import retrofit2.Call; import retrofit2.http.*; import okhttp3.RequestBody; -import com.sphereon.sdk.template_processor.model.TemplateContextResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextRequest; import com.sphereon.sdk.template_processor.model.ErrorResponse; -import com.sphereon.sdk.template_processor.model.TemplateContext; import java.io.File; +import com.sphereon.sdk.template_processor.model.TemplateContext; +import com.sphereon.sdk.template_processor.model.TemplateContextRequest; +import com.sphereon.sdk.template_processor.model.TemplateContextResponse; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; + public interface TemplateApi { /** * Create template context @@ -26,9 +28,8 @@ public interface TemplateApi { * @param templateRequest The template request (required) * @return Call<TemplateContextResponse> */ - @Headers({ - "Content-Type:application/json;charset=UTF-8" + "Content-Type:application/json;charset=UTF-8" }) @POST("template/processor/0.1/templates") Call createTemplateContext( @@ -41,9 +42,8 @@ Call createTemplateContext( * @param templateId templateId (required) * @return Call<TemplateContextResponse> */ - @Headers({ - "Content-Type:application/json" + "Content-Type:application/json" }) @DELETE("template/processor/0.1/templates/{templateId}") Call deleteTemplateContext( @@ -56,9 +56,8 @@ Call deleteTemplateContext( * @param templateId The template context name unique for your environment (required) * @return Call<TemplateContextResponse> */ - @Headers({ - "Content-Type:application/json" + "Content-Type:application/json" }) @GET("template/processor/0.1/templates/{templateId}") Call getTemplateContext( @@ -71,9 +70,8 @@ Call getTemplateContext( * @param templateContext templateContext (required) * @return Call<TemplateContextResponse> */ - @Headers({ - "Content-Type:application/json;charset=UTF-8" + "Content-Type:application/json;charset=UTF-8" }) @PUT("template/processor/0.1/templates") Call updateTemplateContext( @@ -87,7 +85,6 @@ Call updateTemplateContext( * @param stream The template (file/inputstream) to store (required) * @return Call<TemplateContextResponse> */ - @retrofit2.http.Multipart @POST("template/processor/0.1/templates/{templateId}") Call uploadTemplateFile( diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java index 00f054a..7b808a6 100644 --- a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java @@ -14,7 +14,6 @@ import java.time.format.DateTimeFormatter; import retrofit2.Converter; import retrofit2.Retrofit; - import retrofit2.converter.gson.GsonConverterFactory; import retrofit2.converter.scalars.ScalarsConverterFactory; @@ -29,273 +28,269 @@ import okhttp3.RequestBody; import okhttp3.ResponseBody; - import com.sphereon.sdk.template_processor.handler.auth.HttpBasicAuth; import com.sphereon.sdk.template_processor.handler.auth.ApiKeyAuth; import com.sphereon.sdk.template_processor.handler.auth.OAuth; import com.sphereon.sdk.template_processor.handler.auth.OAuth.AccessTokenListener; import com.sphereon.sdk.template_processor.handler.auth.OAuthFlow; - public class ApiClient { - private Map apiAuthorizations; - private OkHttpClient.Builder okBuilder; - private Retrofit.Builder adapterBuilder; - - public ApiClient() { - apiAuthorizations = new LinkedHashMap(); - createDefaultAdapter(); + private Map apiAuthorizations; + private OkHttpClient.Builder okBuilder; + private Retrofit.Builder adapterBuilder; + + public ApiClient() { + apiAuthorizations = new LinkedHashMap(); + createDefaultAdapter(); + } + + public ApiClient(String[] authNames) { + this(); + for(String authName : authNames) { + Interceptor auth; + if ("oauth2schema".equals(authName)) { + auth = new OAuth(OAuthFlow.application, "", "https://gw.api.cloud.sphereon.com/token", "global"); + } else { + throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names"); + } + addAuthorization(authName, auth); } - - public ApiClient(String[] authNames) { - this(); - for(String authName : authNames) { - Interceptor auth; - if (authName == "oauth2schema") { - auth = new OAuth(OAuthFlow.application, "", "https://gw.api.cloud.sphereon.com/token", "global"); - } else { - throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names"); - } - addAuthorization(authName, auth); - } + } + + /** + * Basic constructor for single auth name + * @param authName Authentication name + */ + public ApiClient(String authName) { + this(new String[]{authName}); + } + + /** + * Helper constructor for single api key + * @param authName Authentication name + * @param apiKey API key + */ + public ApiClient(String authName, String apiKey) { + this(authName); + this.setApiKey(apiKey); + } + + /** + * Helper constructor for single basic auth or password oauth2 + * @param authName Authentication name + * @param username Username + * @param password Password + */ + public ApiClient(String authName, String username, String password) { + this(authName); + this.setCredentials(username, password); + } + + /** + * Helper constructor for single password oauth2 + * @param authName Authentication name + * @param clientId Client ID + * @param secret Client Secret + * @param username Username + * @param password Password + */ + public ApiClient(String authName, String clientId, String secret, String username, String password) { + this(authName); + this.getTokenEndPoint() + .setClientId(clientId) + .setClientSecret(secret) + .setUsername(username) + .setPassword(password); + } + + public void createDefaultAdapter() { + Gson gson = new GsonBuilder() + .setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") + .registerTypeAdapter(OffsetDateTime.class, new OffsetDateTimeTypeAdapter()) + .registerTypeAdapter(LocalDate.class, new LocalDateTypeAdapter()) + .create(); + + okBuilder = new OkHttpClient.Builder(); + + String baseUrl = "https://gw.api.cloud.sphereon.com"; + if(!baseUrl.endsWith("/")) + baseUrl = baseUrl + "/"; + + adapterBuilder = new Retrofit + .Builder() + .baseUrl(baseUrl) + .addConverterFactory(ScalarsConverterFactory.create()) + .addConverterFactory(GsonCustomConverterFactory.create(gson)); + } + + public S createService(Class serviceClass) { + return adapterBuilder + .client(okBuilder.build()) + .build() + .create(serviceClass); + + } + + /** + * Helper method to configure the first api key found + * @param apiKey API key + */ + private void setApiKey(String apiKey) { + for(Interceptor apiAuthorization : apiAuthorizations.values()) { + if (apiAuthorization instanceof ApiKeyAuth) { + ApiKeyAuth keyAuth = (ApiKeyAuth) apiAuthorization; + keyAuth.setApiKey(apiKey); + return; + } } - - /** - * Basic constructor for single auth name - * @param authName Authentication name - */ - public ApiClient(String authName) { - this(new String[]{authName}); + } + + /** + * Helper method to configure the username/password for basic auth or password oauth + * @param username Username + * @param password Password + */ + private void setCredentials(String username, String password) { + for(Interceptor apiAuthorization : apiAuthorizations.values()) { + if (apiAuthorization instanceof HttpBasicAuth) { + HttpBasicAuth basicAuth = (HttpBasicAuth) apiAuthorization; + basicAuth.setCredentials(username, password); + return; + } + if (apiAuthorization instanceof OAuth) { + OAuth oauth = (OAuth) apiAuthorization; + oauth.getTokenRequestBuilder().setUsername(username).setPassword(password); + return; + } } - - /** - * Helper constructor for single api key - * @param authName Authentication name - * @param apiKey API key - */ - public ApiClient(String authName, String apiKey) { - this(authName); - this.setApiKey(apiKey); + } + + /** + * Helper method to configure the token endpoint of the first oauth found in the apiAuthorizations (there should be only one) + * @return Token request builder + */ + public TokenRequestBuilder getTokenEndPoint() { + for(Interceptor apiAuthorization : apiAuthorizations.values()) { + if (apiAuthorization instanceof OAuth) { + OAuth oauth = (OAuth) apiAuthorization; + return oauth.getTokenRequestBuilder(); + } } - - /** - * Helper constructor for single basic auth or password oauth2 - * @param authName Authentication name - * @param username Username - * @param password Password - */ - public ApiClient(String authName, String username, String password) { - this(authName); - this.setCredentials(username, password); + return null; + } + + /** + * Helper method to configure authorization endpoint of the first oauth found in the apiAuthorizations (there should be only one) + * @return Authentication request builder + */ + public AuthenticationRequestBuilder getAuthorizationEndPoint() { + for(Interceptor apiAuthorization : apiAuthorizations.values()) { + if (apiAuthorization instanceof OAuth) { + OAuth oauth = (OAuth) apiAuthorization; + return oauth.getAuthenticationRequestBuilder(); + } } - - /** - * Helper constructor for single password oauth2 - * @param authName Authentication name - * @param clientId Client ID - * @param secret Client Secret - * @param username Username - * @param password Password - */ - public ApiClient(String authName, String clientId, String secret, String username, String password) { - this(authName); - this.getTokenEndPoint() - .setClientId(clientId) - .setClientSecret(secret) - .setUsername(username) - .setPassword(password); + return null; + } + + /** + * Helper method to pre-set the oauth access token of the first oauth found in the apiAuthorizations (there should be only one) + * @param accessToken Access token + */ + public void setAccessToken(String accessToken) { + for(Interceptor apiAuthorization : apiAuthorizations.values()) { + if (apiAuthorization instanceof OAuth) { + OAuth oauth = (OAuth) apiAuthorization; + oauth.setAccessToken(accessToken); + return; + } } - - public void createDefaultAdapter() { - Gson gson = new GsonBuilder() - .setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") - .registerTypeAdapter(OffsetDateTime.class, new OffsetDateTimeTypeAdapter()) - .registerTypeAdapter(LocalDate.class, new LocalDateTypeAdapter()) - .create(); - - okBuilder = new OkHttpClient.Builder(); - - String baseUrl = "https://gw.api.cloud.sphereon.com/"; - if(!baseUrl.endsWith("/")) - baseUrl = baseUrl + "/"; - - adapterBuilder = new Retrofit - .Builder() - .baseUrl(baseUrl) - - .addConverterFactory(ScalarsConverterFactory.create()) - .addConverterFactory(GsonCustomConverterFactory.create(gson)); + } + + /** + * Helper method to configure the oauth accessCode/implicit flow parameters + * @param clientId Client ID + * @param clientSecret Client secret + * @param redirectURI Redirect URI + */ + public void configureAuthorizationFlow(String clientId, String clientSecret, String redirectURI) { + for(Interceptor apiAuthorization : apiAuthorizations.values()) { + if (apiAuthorization instanceof OAuth) { + OAuth oauth = (OAuth) apiAuthorization; + oauth.getTokenRequestBuilder() + .setClientId(clientId) + .setClientSecret(clientSecret) + .setRedirectURI(redirectURI); + oauth.getAuthenticationRequestBuilder() + .setClientId(clientId) + .setRedirectURI(redirectURI); + return; + } } - - public S createService(Class serviceClass) { - return adapterBuilder - .client(okBuilder.build()) - .build() - .create(serviceClass); - + } + + /** + * Configures a listener which is notified when a new access token is received. + * @param accessTokenListener Access token listener + */ + public void registerAccessTokenListener(AccessTokenListener accessTokenListener) { + for(Interceptor apiAuthorization : apiAuthorizations.values()) { + if (apiAuthorization instanceof OAuth) { + OAuth oauth = (OAuth) apiAuthorization; + oauth.registerAccessTokenListener(accessTokenListener); + return; + } } - - /** - * Helper method to configure the first api key found - * @param apiKey API key - */ - private void setApiKey(String apiKey) { - for(Interceptor apiAuthorization : apiAuthorizations.values()) { - if (apiAuthorization instanceof ApiKeyAuth) { - ApiKeyAuth keyAuth = (ApiKeyAuth) apiAuthorization; - keyAuth.setApiKey(apiKey); - return; - } - } + } + + /** + * Adds an authorization to be used by the client + * @param authName Authentication name + * @param authorization Authorization interceptor + */ + public void addAuthorization(String authName, Interceptor authorization) { + if (apiAuthorizations.containsKey(authName)) { + throw new RuntimeException("auth name \"" + authName + "\" already in api authorizations"); } + apiAuthorizations.put(authName, authorization); + okBuilder.addInterceptor(authorization); + } - /** - * Helper method to configure the username/password for basic auth or password oauth - * @param username Username - * @param password Password - */ - private void setCredentials(String username, String password) { - for(Interceptor apiAuthorization : apiAuthorizations.values()) { - if (apiAuthorization instanceof HttpBasicAuth) { - HttpBasicAuth basicAuth = (HttpBasicAuth) apiAuthorization; - basicAuth.setCredentials(username, password); - return; - } - if (apiAuthorization instanceof OAuth) { - OAuth oauth = (OAuth) apiAuthorization; - oauth.getTokenRequestBuilder().setUsername(username).setPassword(password); - return; - } - } - } + public Map getApiAuthorizations() { + return apiAuthorizations; + } - /** - * Helper method to configure the token endpoint of the first oauth found in the apiAuthorizations (there should be only one) - * @return Token request builder - */ - public TokenRequestBuilder getTokenEndPoint() { - for(Interceptor apiAuthorization : apiAuthorizations.values()) { - if (apiAuthorization instanceof OAuth) { - OAuth oauth = (OAuth) apiAuthorization; - return oauth.getTokenRequestBuilder(); - } - } - return null; - } + public void setApiAuthorizations(Map apiAuthorizations) { + this.apiAuthorizations = apiAuthorizations; + } - /** - * Helper method to configure authorization endpoint of the first oauth found in the apiAuthorizations (there should be only one) - * @return Authentication request builder - */ - public AuthenticationRequestBuilder getAuthorizationEndPoint() { - for(Interceptor apiAuthorization : apiAuthorizations.values()) { - if (apiAuthorization instanceof OAuth) { - OAuth oauth = (OAuth) apiAuthorization; - return oauth.getAuthenticationRequestBuilder(); - } - } - return null; - } + public Retrofit.Builder getAdapterBuilder() { + return adapterBuilder; + } - /** - * Helper method to pre-set the oauth access token of the first oauth found in the apiAuthorizations (there should be only one) - * @param accessToken Access token - */ - public void setAccessToken(String accessToken) { - for(Interceptor apiAuthorization : apiAuthorizations.values()) { - if (apiAuthorization instanceof OAuth) { - OAuth oauth = (OAuth) apiAuthorization; - oauth.setAccessToken(accessToken); - return; - } - } - } + public void setAdapterBuilder(Retrofit.Builder adapterBuilder) { + this.adapterBuilder = adapterBuilder; + } - /** - * Helper method to configure the oauth accessCode/implicit flow parameters - * @param clientId Client ID - * @param clientSecret Client secret - * @param redirectURI Redirect URI - */ - public void configureAuthorizationFlow(String clientId, String clientSecret, String redirectURI) { - for(Interceptor apiAuthorization : apiAuthorizations.values()) { - if (apiAuthorization instanceof OAuth) { - OAuth oauth = (OAuth) apiAuthorization; - oauth.getTokenRequestBuilder() - .setClientId(clientId) - .setClientSecret(clientSecret) - .setRedirectURI(redirectURI); - oauth.getAuthenticationRequestBuilder() - .setClientId(clientId) - .setRedirectURI(redirectURI); - return; - } - } - } - - /** - * Configures a listener which is notified when a new access token is received. - * @param accessTokenListener Access token listener - */ - public void registerAccessTokenListener(AccessTokenListener accessTokenListener) { - for(Interceptor apiAuthorization : apiAuthorizations.values()) { - if (apiAuthorization instanceof OAuth) { - OAuth oauth = (OAuth) apiAuthorization; - oauth.registerAccessTokenListener(accessTokenListener); - return; - } - } - } - - /** - * Adds an authorization to be used by the client - * @param authName Authentication name - * @param authorization Authorization interceptor - */ - public void addAuthorization(String authName, Interceptor authorization) { - if (apiAuthorizations.containsKey(authName)) { - throw new RuntimeException("auth name \"" + authName + "\" already in api authorizations"); - } - apiAuthorizations.put(authName, authorization); - okBuilder.addInterceptor(authorization); - } - - public Map getApiAuthorizations() { - return apiAuthorizations; - } - - public void setApiAuthorizations(Map apiAuthorizations) { - this.apiAuthorizations = apiAuthorizations; - } - - public Retrofit.Builder getAdapterBuilder() { - return adapterBuilder; - } - - public void setAdapterBuilder(Retrofit.Builder adapterBuilder) { - this.adapterBuilder = adapterBuilder; - } - - public OkHttpClient.Builder getOkBuilder() { - return okBuilder; - } - - public void addAuthsToOkBuilder(OkHttpClient.Builder okBuilder) { - for(Interceptor apiAuthorization : apiAuthorizations.values()) { - okBuilder.addInterceptor(apiAuthorization); - } - } - - /** - * Clones the okBuilder given in parameter, adds the auth interceptors and uses it to configure the Retrofit - * @param okClient An instance of OK HTTP client - */ - public void configureFromOkclient(OkHttpClient okClient) { - this.okBuilder = okClient.newBuilder(); - addAuthsToOkBuilder(this.okBuilder); + public OkHttpClient.Builder getOkBuilder() { + return okBuilder; + } + public void addAuthsToOkBuilder(OkHttpClient.Builder okBuilder) { + for(Interceptor apiAuthorization : apiAuthorizations.values()) { + okBuilder.addInterceptor(apiAuthorization); } + } + + /** + * Clones the okBuilder given in parameter, adds the auth interceptors and uses it to configure the Retrofit + * @param okClient An instance of OK HTTP client + */ + public void configureFromOkclient(OkHttpClient okClient) { + this.okBuilder = okClient.newBuilder(); + addAuthsToOkBuilder(this.okBuilder); + } } /** @@ -304,52 +299,54 @@ public void configureFromOkclient(OkHttpClient okClient) { * expected type is String, then just return the body string. */ class GsonResponseBodyConverterToString implements Converter { - private final Gson gson; - private final Type type; - - GsonResponseBodyConverterToString(Gson gson, Type type) { - this.gson = gson; - this.type = type; - } - - @Override public T convert(ResponseBody value) throws IOException { - String returned = value.string(); - try { - return gson.fromJson(returned, type); - } - catch (JsonParseException e) { - return (T) returned; - } - } -} -class GsonCustomConverterFactory extends Converter.Factory -{ - public static GsonCustomConverterFactory create(Gson gson) { - return new GsonCustomConverterFactory(gson); - } - - private final Gson gson; - private final GsonConverterFactory gsonConverterFactory; - - private GsonCustomConverterFactory(Gson gson) { - if (gson == null) throw new NullPointerException("gson == null"); - this.gson = gson; - this.gsonConverterFactory = GsonConverterFactory.create(gson); - } - - @Override - public Converter responseBodyConverter(Type type, Annotation[] annotations, Retrofit retrofit) { - if(type.equals(String.class)) - return new GsonResponseBodyConverterToString(gson, type); - else - return gsonConverterFactory.responseBodyConverter(type, annotations, retrofit); - } + private final Gson gson; + private final Type type; + + GsonResponseBodyConverterToString(Gson gson, Type type) { + this.gson = gson; + this.type = type; + } - @Override - public Converter requestBodyConverter(Type type, Annotation[] parameterAnnotations, Annotation[] methodAnnotations, Retrofit retrofit) { - return gsonConverterFactory.requestBodyConverter(type, parameterAnnotations, methodAnnotations, retrofit); + @Override public T convert(ResponseBody value) throws IOException { + String returned = value.string(); + try { + return gson.fromJson(returned, type); + } + catch (JsonParseException e) { + return (T) returned; } + } +} + +class GsonCustomConverterFactory extends Converter.Factory { + + private final Gson gson; + private final GsonConverterFactory gsonConverterFactory; + + public static GsonCustomConverterFactory create(Gson gson) { + return new GsonCustomConverterFactory(gson); + } + + private GsonCustomConverterFactory(Gson gson) { + if (gson == null) + throw new NullPointerException("gson == null"); + this.gson = gson; + this.gsonConverterFactory = GsonConverterFactory.create(gson); + } + + @Override + public Converter responseBodyConverter(Type type, Annotation[] annotations, Retrofit retrofit) { + if (type.equals(String.class)) + return new GsonResponseBodyConverterToString(gson, type); + else + return gsonConverterFactory.responseBodyConverter(type, annotations, retrofit); + } + + @Override + public Converter requestBodyConverter(Type type, Annotation[] parameterAnnotations, Annotation[] methodAnnotations, Retrofit retrofit) { + return gsonConverterFactory.requestBodyConverter(type, parameterAnnotations, methodAnnotations, retrofit); + } } /** @@ -357,32 +354,31 @@ public Converter requestBodyConverter(Type type, Annotation[] pa */ class OffsetDateTimeTypeAdapter extends TypeAdapter { - private final DateTimeFormatter formatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME; + private final DateTimeFormatter formatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME; - @Override - public void write(JsonWriter out, OffsetDateTime date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - out.value(formatter.format(date)); - } + @Override + public void write(JsonWriter out, OffsetDateTime date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); } + } - @Override - public OffsetDateTime read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - if (date.endsWith("+0000")) { - date = date.substring(0, date.length()-5) + "Z"; - } - - return OffsetDateTime.parse(date, formatter); + @Override + public OffsetDateTime read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + if (date.endsWith("+0000")) { + date = date.substring(0, date.length()-5) + "Z"; } + return OffsetDateTime.parse(date, formatter); } + } } /** @@ -390,26 +386,26 @@ public OffsetDateTime read(JsonReader in) throws IOException { */ class LocalDateTypeAdapter extends TypeAdapter { - private final DateTimeFormatter formatter = DateTimeFormatter.ISO_LOCAL_DATE; + private final DateTimeFormatter formatter = DateTimeFormatter.ISO_LOCAL_DATE; - @Override - public void write(JsonWriter out, LocalDate date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - out.value(formatter.format(date)); - } + @Override + public void write(JsonWriter out, LocalDate date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); } + } - @Override - public LocalDate read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - return LocalDate.parse(date, formatter); - } + @Override + public LocalDate read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + return LocalDate.parse(date, formatter); } + } } diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java index 2a90ba4..427082f 100644 --- a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java @@ -8,24 +8,12 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.handler; -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:54.103+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:57.313+02:00") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java index 0ee6dea..25ece82 100644 --- a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java @@ -132,7 +132,7 @@ public synchronized boolean updateAccessToken(String requestAccessToken) throws if (accessTokenListener != null) { accessTokenListener.notify((BasicOAuthToken) accessTokenResponse.getOAuthToken()); } - return getAccessToken().equals(requestAccessToken); + return !getAccessToken().equals(requestAccessToken); } else { return false; } diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java index 6444940..803a482 100644 --- a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java @@ -8,18 +8,6 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java index 41dce00..e897e57 100644 --- a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java @@ -8,34 +8,27 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; import java.time.OffsetDateTime; /** * The merge template response. */ @ApiModel(description = "The merge template response.") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:54.103+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:57.313+02:00") public class DataSetResponse { @SerializedName("completionTime") private OffsetDateTime completionTime = null; @@ -49,14 +42,12 @@ public class DataSetResponse { /** * The status of the template */ + @JsonAdapter(StatusEnum.Adapter.class) public enum StatusEnum { - @SerializedName("CREATED") CREATED("CREATED"), - @SerializedName("UPDATED") UPDATED("UPDATED"), - @SerializedName("DELETED") DELETED("DELETED"); private String value; @@ -65,10 +56,36 @@ public enum StatusEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("status") @@ -78,7 +95,7 @@ public String toString() { * The completion date/time of this template in ISO 8601 format * @return completionTime **/ - @ApiModelProperty(example = "null", value = "The completion date/time of this template in ISO 8601 format") + @ApiModelProperty(value = "The completion date/time of this template in ISO 8601 format") public OffsetDateTime getCompletionTime() { return completionTime; } @@ -87,7 +104,7 @@ public OffsetDateTime getCompletionTime() { * The creation date/time of this template in ISO 8601 format * @return creationTime **/ - @ApiModelProperty(example = "null", value = "The creation date/time of this template in ISO 8601 format") + @ApiModelProperty(value = "The creation date/time of this template in ISO 8601 format") public OffsetDateTime getCreationTime() { return creationTime; } @@ -101,7 +118,7 @@ public DataSetResponse id(String id) { * Unique dataset id * @return id **/ - @ApiModelProperty(example = "null", required = true, value = "Unique dataset id") + @ApiModelProperty(required = true, value = "Unique dataset id") public String getId() { return id; } @@ -114,7 +131,7 @@ public void setId(String id) { * The status of the template * @return status **/ - @ApiModelProperty(example = "null", required = true, value = "The status of the template") + @ApiModelProperty(required = true, value = "The status of the template") public StatusEnum getStatus() { return status; } diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/Error.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/Error.java index a018480..a0fe249 100644 --- a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/Error.java +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/Error.java @@ -8,34 +8,27 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 com.sphereon.sdk.template_processor.model.Error; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; /** * An error */ @ApiModel(description = "An error") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:54.103+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:57.313+02:00") public class Error { @SerializedName("code") private String code = null; @@ -43,14 +36,12 @@ public class Error { /** * Gets or Sets level */ + @JsonAdapter(LevelEnum.Adapter.class) public enum LevelEnum { - @SerializedName("INFO") INFO("INFO"), - @SerializedName("WARNING") WARNING("WARNING"), - @SerializedName("FATAL") FATAL("FATAL"); private String value; @@ -59,10 +50,36 @@ public enum LevelEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static LevelEnum fromValue(String text) { + for (LevelEnum b : LevelEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final LevelEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public LevelEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return LevelEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("level") @@ -83,7 +100,7 @@ public Error code(String code) { * Get code * @return code **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") public String getCode() { return code; } @@ -101,7 +118,7 @@ public Error level(LevelEnum level) { * Get level * @return level **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") public LevelEnum getLevel() { return level; } @@ -119,7 +136,7 @@ public Error cause(Error cause) { * Get cause * @return cause **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Error getCause() { return cause; } @@ -137,7 +154,7 @@ public Error message(String message) { * Get message * @return message **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") public String getMessage() { return message; } diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java index 0a8189f..5b512cc 100644 --- a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java @@ -8,28 +8,21 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 com.sphereon.sdk.template_processor.model.Error; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -37,10 +30,10 @@ * The error response */ @ApiModel(description = "The error response") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:54.103+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:57.313+02:00") public class ErrorResponse { @SerializedName("errors") - private List errors = new ArrayList(); + private List errors = null; public ErrorResponse errors(List errors) { this.errors = errors; @@ -48,6 +41,9 @@ public ErrorResponse errors(List errors) { } public ErrorResponse addErrorsItem(Error errorsItem) { + if (this.errors == null) { + this.errors = new ArrayList(); + } this.errors.add(errorsItem); return this; } @@ -56,7 +52,7 @@ public ErrorResponse addErrorsItem(Error errorsItem) { * Get errors * @return errors **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public List getErrors() { return errors; } diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java index 5a398a0..67834a8 100644 --- a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java @@ -8,34 +8,27 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; import java.time.OffsetDateTime; /** * Lifecycle settings. When no lifecycle settings are supplied, the job and files will be deleted directly after retrieval of the file */ @ApiModel(description = "Lifecycle settings. When no lifecycle settings are supplied, the job and files will be deleted directly after retrieval of the file") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:54.103+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:57.313+02:00") public class Lifecycle { @SerializedName("actionTime") private OffsetDateTime actionTime = null; @@ -43,8 +36,8 @@ public class Lifecycle { /** * Gets or Sets action */ + @JsonAdapter(ActionEnum.Adapter.class) public enum ActionEnum { - @SerializedName("DELETE") DELETE("DELETE"); private String value; @@ -53,10 +46,36 @@ public enum ActionEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static ActionEnum fromValue(String text) { + for (ActionEnum b : ActionEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final ActionEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ActionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ActionEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("action") @@ -65,11 +84,10 @@ public String toString() { /** * Gets or Sets type */ + @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { - @SerializedName("RETRIEVAL") RETRIEVAL("RETRIEVAL"), - @SerializedName("TIME") TIME("TIME"); private String value; @@ -78,10 +96,36 @@ public enum TypeEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static TypeEnum fromValue(String text) { + for (TypeEnum b : TypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("type") @@ -96,7 +140,7 @@ public Lifecycle actionTime(OffsetDateTime actionTime) { * The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation * @return actionTime **/ - @ApiModelProperty(example = "null", value = "The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation") + @ApiModelProperty(value = "The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation") public OffsetDateTime getActionTime() { return actionTime; } @@ -114,7 +158,7 @@ public Lifecycle action(ActionEnum action) { * Get action * @return action **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public ActionEnum getAction() { return action; } @@ -132,7 +176,7 @@ public Lifecycle type(TypeEnum type) { * Get type * @return type **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public TypeEnum getType() { return type; } diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java index ac35ac9..6119b15 100644 --- a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java @@ -8,30 +8,23 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 com.sphereon.sdk.template_processor.model.MergeSettings; import com.sphereon.sdk.template_processor.model.StorageLocation; import com.sphereon.sdk.template_processor.model.StreamLocation; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; @@ -40,7 +33,7 @@ * The merge job. Has access to the job merge data. */ @ApiModel(description = "The merge job. Has access to the job merge data.") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:54.103+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:57.313+02:00") public class MergeJob { @SerializedName("completionTime") private OffsetDateTime completionTime = null; @@ -58,7 +51,7 @@ public class MergeJob { private List resultStreams = new ArrayList(); @SerializedName("headerDataSetIds") - private List headerDataSetIds = new ArrayList(); + private List headerDataSetIds = null; @SerializedName("resultStorageLocation") private StorageLocation resultStorageLocation = null; @@ -72,23 +65,18 @@ public class MergeJob { /** * The status of the job */ + @JsonAdapter(StatusEnum.Adapter.class) public enum StatusEnum { - @SerializedName("CREATED") CREATED("CREATED"), - @SerializedName("UPDATED") UPDATED("UPDATED"), - @SerializedName("PROCESSING") PROCESSING("PROCESSING"), - @SerializedName("DONE") DONE("DONE"), - @SerializedName("ERROR") ERROR("ERROR"), - @SerializedName("DELETED") DELETED("DELETED"); private String value; @@ -97,10 +85,36 @@ public enum StatusEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("status") @@ -110,7 +124,7 @@ public String toString() { * The completion date/time of this job in ISO 8601 format * @return completionTime **/ - @ApiModelProperty(example = "null", value = "The completion date/time of this job in ISO 8601 format") + @ApiModelProperty(value = "The completion date/time of this job in ISO 8601 format") public OffsetDateTime getCompletionTime() { return completionTime; } @@ -124,7 +138,7 @@ public MergeJob jobId(String jobId) { * The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation * @return jobId **/ - @ApiModelProperty(example = "null", required = true, value = "The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation") + @ApiModelProperty(required = true, value = "The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation") public String getJobId() { return jobId; } @@ -137,7 +151,7 @@ public void setJobId(String jobId) { * The creation date/time of this job in ISO 8601 format * @return creationTime **/ - @ApiModelProperty(example = "null", value = "The creation date/time of this job in ISO 8601 format") + @ApiModelProperty(value = "The creation date/time of this job in ISO 8601 format") public OffsetDateTime getCreationTime() { return creationTime; } @@ -151,7 +165,7 @@ public MergeJob dataSetId(String dataSetId) { * Data set id * @return dataSetId **/ - @ApiModelProperty(example = "null", value = "Data set id") + @ApiModelProperty(value = "Data set id") public String getDataSetId() { return dataSetId; } @@ -174,7 +188,7 @@ public MergeJob addResultStreamsItem(StreamLocation resultStreamsItem) { * The storage locations of the result files. * @return resultStreams **/ - @ApiModelProperty(example = "null", required = true, value = "The storage locations of the result files.") + @ApiModelProperty(required = true, value = "The storage locations of the result files.") public List getResultStreams() { return resultStreams; } @@ -189,6 +203,9 @@ public MergeJob headerDataSetIds(List headerDataSetIds) { } public MergeJob addHeaderDataSetIdsItem(String headerDataSetIdsItem) { + if (this.headerDataSetIds == null) { + this.headerDataSetIds = new ArrayList(); + } this.headerDataSetIds.add(headerDataSetIdsItem); return this; } @@ -197,7 +214,7 @@ public MergeJob addHeaderDataSetIdsItem(String headerDataSetIdsItem) { * Header data set ids * @return headerDataSetIds **/ - @ApiModelProperty(example = "null", value = "Header data set ids") + @ApiModelProperty(value = "Header data set ids") public List getHeaderDataSetIds() { return headerDataSetIds; } @@ -215,7 +232,7 @@ public MergeJob resultStorageLocation(StorageLocation resultStorageLocation) { * The storage location. (optional) * @return resultStorageLocation **/ - @ApiModelProperty(example = "null", value = "The storage location. (optional)") + @ApiModelProperty(value = "The storage location. (optional)") public StorageLocation getResultStorageLocation() { return resultStorageLocation; } @@ -233,7 +250,7 @@ public MergeJob mergeSettings(MergeSettings mergeSettings) { * Get mergeSettings * @return mergeSettings **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public MergeSettings getMergeSettings() { return mergeSettings; } @@ -246,7 +263,7 @@ public void setMergeSettings(MergeSettings mergeSettings) { * A status message, which can be informational, warning or error. A message here does not indicate an error perse * @return statusMessage **/ - @ApiModelProperty(example = "null", value = "A status message, which can be informational, warning or error. A message here does not indicate an error perse") + @ApiModelProperty(value = "A status message, which can be informational, warning or error. A message here does not indicate an error perse") public String getStatusMessage() { return statusMessage; } @@ -255,7 +272,7 @@ public String getStatusMessage() { * The status of the job * @return status **/ - @ApiModelProperty(example = "null", required = true, value = "The status of the job") + @ApiModelProperty(required = true, value = "The status of the job") public StatusEnum getStatus() { return status; } diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java index 7681dd4..117b1ca 100644 --- a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java @@ -8,34 +8,27 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 com.sphereon.sdk.template_processor.model.MergeJob; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; /** * The merge job response. */ @ApiModel(description = "The merge job response.") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:54.103+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:57.313+02:00") public class MergeJobResponse { @SerializedName("jobId") private String jobId = null; @@ -49,23 +42,18 @@ public class MergeJobResponse { /** * The status of the job */ + @JsonAdapter(StatusEnum.Adapter.class) public enum StatusEnum { - @SerializedName("CREATED") CREATED("CREATED"), - @SerializedName("UPDATED") UPDATED("UPDATED"), - @SerializedName("PROCESSING") PROCESSING("PROCESSING"), - @SerializedName("DONE") DONE("DONE"), - @SerializedName("ERROR") ERROR("ERROR"), - @SerializedName("DELETED") DELETED("DELETED"); private String value; @@ -74,10 +62,36 @@ public enum StatusEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("status") @@ -92,7 +106,7 @@ public MergeJobResponse jobId(String jobId) { * The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation * @return jobId **/ - @ApiModelProperty(example = "null", required = true, value = "The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation") + @ApiModelProperty(required = true, value = "The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation") public String getJobId() { return jobId; } @@ -110,7 +124,7 @@ public MergeJobResponse job(MergeJob job) { * Get job * @return job **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public MergeJob getJob() { return job; } @@ -123,7 +137,7 @@ public void setJob(MergeJob job) { * A status message, which can be informational, warning or error. AA message here does not indicate an error perse * @return statusMessage **/ - @ApiModelProperty(example = "null", value = "A status message, which can be informational, warning or error. AA message here does not indicate an error perse") + @ApiModelProperty(value = "A status message, which can be informational, warning or error. AA message here does not indicate an error perse") public String getStatusMessage() { return statusMessage; } @@ -132,7 +146,7 @@ public String getStatusMessage() { * The status of the job * @return status **/ - @ApiModelProperty(example = "null", required = true, value = "The status of the job") + @ApiModelProperty(required = true, value = "The status of the job") public StatusEnum getStatus() { return status; } diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java index 5175bd4..ca971ee 100644 --- a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java @@ -8,30 +8,23 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 com.sphereon.sdk.template_processor.model.Lifecycle; import com.sphereon.sdk.template_processor.model.OutputSettings; import com.sphereon.sdk.template_processor.model.StorageLocation; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -39,7 +32,7 @@ * Merge settings */ @ApiModel(description = "Merge settings") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:54.103+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:57.313+02:00") public class MergeSettings { @SerializedName("lifecycle") private Lifecycle lifecycle = null; @@ -47,11 +40,10 @@ public class MergeSettings { /** * Gets or Sets mergeResult */ + @JsonAdapter(MergeResultEnum.Adapter.class) public enum MergeResultEnum { - @SerializedName("SINGLE_FILE") SINGLE_FILE("SINGLE_FILE"), - @SerializedName("SEPARATE_FILES") SEPARATE_FILES("SEPARATE_FILES"); private String value; @@ -60,10 +52,36 @@ public enum MergeResultEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static MergeResultEnum fromValue(String text) { + for (MergeResultEnum b : MergeResultEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final MergeResultEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public MergeResultEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return MergeResultEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("mergeResult") @@ -75,11 +93,10 @@ public String toString() { /** * Gets or Sets engine */ + @JsonAdapter(EngineEnum.Adapter.class) public enum EngineEnum { - @SerializedName("BASIC") BASIC("BASIC"), - @SerializedName("PREMIUM") PREMIUM("PREMIUM"); private String value; @@ -88,17 +105,43 @@ public enum EngineEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static EngineEnum fromValue(String text) { + for (EngineEnum b : EngineEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EngineEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EngineEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EngineEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("engine") private EngineEnum engine = null; @SerializedName("headerDataSetIds") - private List headerDataSetIds = new ArrayList(); + private List headerDataSetIds = null; @SerializedName("resultStorageLocation") private StorageLocation resultStorageLocation = null; @@ -121,7 +164,7 @@ public MergeSettings lifecycle(Lifecycle lifecycle) { * Get lifecycle * @return lifecycle **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public Lifecycle getLifecycle() { return lifecycle; } @@ -139,7 +182,7 @@ public MergeSettings mergeResult(MergeResultEnum mergeResult) { * Get mergeResult * @return mergeResult **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public MergeResultEnum getMergeResult() { return mergeResult; } @@ -157,7 +200,7 @@ public MergeSettings dataSetId(String dataSetId) { * Data set id * @return dataSetId **/ - @ApiModelProperty(example = "null", required = true, value = "Data set id") + @ApiModelProperty(required = true, value = "Data set id") public String getDataSetId() { return dataSetId; } @@ -175,7 +218,7 @@ public MergeSettings engine(EngineEnum engine) { * Get engine * @return engine **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public EngineEnum getEngine() { return engine; } @@ -190,6 +233,9 @@ public MergeSettings headerDataSetIds(List headerDataSetIds) { } public MergeSettings addHeaderDataSetIdsItem(String headerDataSetIdsItem) { + if (this.headerDataSetIds == null) { + this.headerDataSetIds = new ArrayList(); + } this.headerDataSetIds.add(headerDataSetIdsItem); return this; } @@ -198,7 +244,7 @@ public MergeSettings addHeaderDataSetIdsItem(String headerDataSetIdsItem) { * optional header data set ids * @return headerDataSetIds **/ - @ApiModelProperty(example = "null", value = "optional header data set ids") + @ApiModelProperty(value = "optional header data set ids") public List getHeaderDataSetIds() { return headerDataSetIds; } @@ -216,7 +262,7 @@ public MergeSettings resultStorageLocation(StorageLocation resultStorageLocation * The output location of the result files. * @return resultStorageLocation **/ - @ApiModelProperty(example = "null", required = true, value = "The output location of the result files.") + @ApiModelProperty(required = true, value = "The output location of the result files.") public StorageLocation getResultStorageLocation() { return resultStorageLocation; } @@ -234,7 +280,7 @@ public MergeSettings templateVersion(Integer templateVersion) { * Template version * @return templateVersion **/ - @ApiModelProperty(example = "null", value = "Template version") + @ApiModelProperty(value = "Template version") public Integer getTemplateVersion() { return templateVersion; } @@ -252,7 +298,7 @@ public MergeSettings templateId(String templateId) { * Template id * @return templateId **/ - @ApiModelProperty(example = "null", required = true, value = "Template id") + @ApiModelProperty(required = true, value = "Template id") public String getTemplateId() { return templateId; } @@ -270,7 +316,7 @@ public MergeSettings outputSettings(OutputSettings outputSettings) { * Get outputSettings * @return outputSettings **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") public OutputSettings getOutputSettings() { return outputSettings; } diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java index bd28093..87a4d6c 100644 --- a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java @@ -8,45 +8,36 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; /** * Output settings */ @ApiModel(description = "Output settings") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:54.103+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:57.313+02:00") public class OutputSettings { /** * Gets or Sets deliveryFormat */ + @JsonAdapter(DeliveryFormatEnum.Adapter.class) public enum DeliveryFormatEnum { - @SerializedName("PLAIN") PLAIN("PLAIN"), - @SerializedName("ZIP") ZIP("ZIP"), - @SerializedName("_7ZIP") _7ZIP("_7ZIP"); private String value; @@ -55,10 +46,36 @@ public enum DeliveryFormatEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static DeliveryFormatEnum fromValue(String text) { + for (DeliveryFormatEnum b : DeliveryFormatEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final DeliveryFormatEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DeliveryFormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DeliveryFormatEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("deliveryFormat") @@ -67,53 +84,38 @@ public String toString() { /** * Gets or Sets outputFormat */ + @JsonAdapter(OutputFormatEnum.Adapter.class) public enum OutputFormatEnum { - @SerializedName("DOC") DOC("DOC"), - @SerializedName("DOCX") DOCX("DOCX"), - @SerializedName("RTF") RTF("RTF"), - @SerializedName("PDF") PDF("PDF"), - @SerializedName("XPS") XPS("XPS"), - @SerializedName("SVG") SVG("SVG"), - @SerializedName("HTML") HTML("HTML"), - @SerializedName("ODT") ODT("ODT"), - @SerializedName("TIFF") TIFF("TIFF"), - @SerializedName("PNG") PNG("PNG"), - @SerializedName("BMP") BMP("BMP"), - @SerializedName("JPEG") JPEG("JPEG"), - @SerializedName("TXT") TXT("TXT"), - @SerializedName("XML") XML("XML"), - @SerializedName("JSON") JSON("JSON"), - @SerializedName("DEFAULT") DEFAULT("DEFAULT"); private String value; @@ -122,10 +124,36 @@ public enum OutputFormatEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static OutputFormatEnum fromValue(String text) { + for (OutputFormatEnum b : OutputFormatEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OutputFormatEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OutputFormatEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OutputFormatEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("outputFormat") @@ -140,7 +168,7 @@ public OutputSettings deliveryFormat(DeliveryFormatEnum deliveryFormat) { * Get deliveryFormat * @return deliveryFormat **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public DeliveryFormatEnum getDeliveryFormat() { return deliveryFormat; } @@ -158,7 +186,7 @@ public OutputSettings outputFormat(OutputFormatEnum outputFormat) { * Get outputFormat * @return outputFormat **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public OutputFormatEnum getOutputFormat() { return outputFormat; } diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java index 6d59f0b..acea0dc 100644 --- a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java @@ -8,33 +8,26 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; /** * Owner info */ @ApiModel(description = "Owner info") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:54.103+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:57.313+02:00") public class OwnerInfo { @SerializedName("phone") private String phone = null; @@ -54,10 +47,10 @@ public OwnerInfo phone(String phone) { } /** - * The owner's phone number + * The owner's phone number * @return phone **/ - @ApiModelProperty(example = "null", value = "The owner's phone number") + @ApiModelProperty(value = "The owner's phone number") public String getPhone() { return phone; } @@ -72,10 +65,10 @@ public OwnerInfo companyDepartment(String companyDepartment) { } /** - * The owner's company/department + * The owner's company/department * @return companyDepartment **/ - @ApiModelProperty(example = "null", value = "The owner's company/department") + @ApiModelProperty(value = "The owner's company/department") public String getCompanyDepartment() { return companyDepartment; } @@ -90,10 +83,10 @@ public OwnerInfo name(String name) { } /** - * The owner's name + * The owner's name * @return name **/ - @ApiModelProperty(example = "null", value = "The owner's name") + @ApiModelProperty(value = "The owner's name") public String getName() { return name; } @@ -108,10 +101,10 @@ public OwnerInfo email(String email) { } /** - * The owner's email address + * The owner's email address * @return email **/ - @ApiModelProperty(example = "null", value = "The owner's email address") + @ApiModelProperty(value = "The owner's email address") public String getEmail() { return email; } diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/ResultStreamRequest.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/ResultStreamRequest.java new file mode 100644 index 0000000..720db15 --- /dev/null +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/ResultStreamRequest.java @@ -0,0 +1,119 @@ +/* + * Template-Processor + * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package com.sphereon.sdk.template_processor.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 com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.StreamLocation; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * A request to download a specific result stream. + */ +@ApiModel(description = "A request to download a specific result stream.") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:57.313+02:00") +public class ResultStreamRequest { + @SerializedName("streamLocation") + private StreamLocation streamLocation = null; + + @SerializedName("outputSettings") + private OutputSettings outputSettings = null; + + public ResultStreamRequest streamLocation(StreamLocation streamLocation) { + this.streamLocation = streamLocation; + return this; + } + + /** + * The stream location + * @return streamLocation + **/ + @ApiModelProperty(required = true, value = "The stream location") + public StreamLocation getStreamLocation() { + return streamLocation; + } + + public void setStreamLocation(StreamLocation streamLocation) { + this.streamLocation = streamLocation; + } + + public ResultStreamRequest outputSettings(OutputSettings outputSettings) { + this.outputSettings = outputSettings; + return this; + } + + /** + * The Output settings + * @return outputSettings + **/ + @ApiModelProperty(value = "The Output settings") + public OutputSettings getOutputSettings() { + return outputSettings; + } + + public void setOutputSettings(OutputSettings outputSettings) { + this.outputSettings = outputSettings; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResultStreamRequest resultStreamRequest = (ResultStreamRequest) o; + return Objects.equals(this.streamLocation, resultStreamRequest.streamLocation) && + Objects.equals(this.outputSettings, resultStreamRequest.outputSettings); + } + + @Override + public int hashCode() { + return Objects.hash(streamLocation, outputSettings); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ResultStreamRequest {\n"); + + sb.append(" streamLocation: ").append(toIndentedString(streamLocation)).append("\n"); + sb.append(" outputSettings: ").append(toIndentedString(outputSettings)).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(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/StorageLocation.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/StorageLocation.java index db40078..c0d6fd9 100644 --- a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/StorageLocation.java +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/StorageLocation.java @@ -8,33 +8,26 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; /** * Location record */ @ApiModel(description = "Location record") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:54.103+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:57.313+02:00") public class StorageLocation { @SerializedName("folderPath") private String folderPath = null; @@ -51,7 +44,7 @@ public StorageLocation folderPath(String folderPath) { * Get folderPath * @return folderPath **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getFolderPath() { return folderPath; } @@ -69,7 +62,7 @@ public StorageLocation containerId(String containerId) { * Get containerId * @return containerId **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getContainerId() { return containerId; } diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java index e8ba4fe..c4c5373 100644 --- a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java @@ -8,33 +8,26 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; /** * Location record of data stream */ @ApiModel(description = "Location record of data stream") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:54.103+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:57.313+02:00") public class StreamLocation { @SerializedName("folderPath") private String folderPath = null; @@ -57,7 +50,7 @@ public StreamLocation folderPath(String folderPath) { * Get folderPath * @return folderPath **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getFolderPath() { return folderPath; } @@ -75,7 +68,7 @@ public StreamLocation originalFileName(String originalFileName) { * Get originalFileName * @return originalFileName **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getOriginalFileName() { return originalFileName; } @@ -93,7 +86,7 @@ public StreamLocation fileName(String fileName) { * Get fileName * @return fileName **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getFileName() { return fileName; } @@ -111,7 +104,7 @@ public StreamLocation containerId(String containerId) { * Get containerId * @return containerId **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getContainerId() { return containerId; } diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java index 6d35efe..5295460 100644 --- a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java @@ -8,30 +8,23 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 com.sphereon.sdk.template_processor.model.OwnerInfo; import com.sphereon.sdk.template_processor.model.StorageLocation; import com.sphereon.sdk.template_processor.model.StreamLocation; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -39,16 +32,15 @@ /** * TemplateContext */ -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:54.103+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:57.313+02:00") public class TemplateContext { /** * Gets or Sets templateType */ + @JsonAdapter(TemplateTypeEnum.Adapter.class) public enum TemplateTypeEnum { - @SerializedName("OFFICE") OFFICE("OFFICE"), - @SerializedName("FREEMARKER") FREEMARKER("FREEMARKER"); private String value; @@ -57,17 +49,43 @@ public enum TemplateTypeEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static TemplateTypeEnum fromValue(String text) { + for (TemplateTypeEnum b : TemplateTypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TemplateTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TemplateTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TemplateTypeEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("templateType") private TemplateTypeEnum templateType = null; @SerializedName("templateFileLocations") - private Map templateFileLocations = new HashMap(); + private Map templateFileLocations = null; @SerializedName("description") private String description = null; @@ -93,7 +111,7 @@ public TemplateContext templateType(TemplateTypeEnum templateType) { * Get templateType * @return templateType **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") public TemplateTypeEnum getTemplateType() { return templateType; } @@ -108,6 +126,9 @@ public TemplateContext templateFileLocations(Map templat } public TemplateContext putTemplateFileLocationsItem(String key, StreamLocation templateFileLocationsItem) { + if (this.templateFileLocations == null) { + this.templateFileLocations = new HashMap(); + } this.templateFileLocations.put(key, templateFileLocationsItem); return this; } @@ -116,7 +137,7 @@ public TemplateContext putTemplateFileLocationsItem(String key, StreamLocation t * The template files (versioned) * @return templateFileLocations **/ - @ApiModelProperty(example = "null", value = "The template files (versioned)") + @ApiModelProperty(value = "The template files (versioned)") public Map getTemplateFileLocations() { return templateFileLocations; } @@ -134,7 +155,7 @@ public TemplateContext description(String description) { * The template description * @return description **/ - @ApiModelProperty(example = "null", value = "The template description") + @ApiModelProperty(value = "The template description") public String getDescription() { return description; } @@ -152,7 +173,7 @@ public TemplateContext ownerInfo(OwnerInfo ownerInfo) { * Get ownerInfo * @return ownerInfo **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public OwnerInfo getOwnerInfo() { return ownerInfo; } @@ -170,7 +191,7 @@ public TemplateContext storageLocation(StorageLocation storageLocation) { * The storage location. (optional) * @return storageLocation **/ - @ApiModelProperty(example = "null", value = "The storage location. (optional)") + @ApiModelProperty(value = "The storage location. (optional)") public StorageLocation getStorageLocation() { return storageLocation; } @@ -188,7 +209,7 @@ public TemplateContext id(String id) { * Get id * @return id **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getId() { return id; } @@ -206,7 +227,7 @@ public TemplateContext templateId(String templateId) { * The template context id * @return templateId **/ - @ApiModelProperty(example = "null", value = "The template context id") + @ApiModelProperty(value = "The template context id") public String getTemplateId() { return templateId; } diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java index 84e2c14..0f95c0d 100644 --- a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java @@ -8,43 +8,35 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 com.sphereon.sdk.template_processor.model.OwnerInfo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; /** * The merge template request. */ @ApiModel(description = "The merge template request.") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:54.103+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:57.313+02:00") public class TemplateContextRequest { /** * Gets or Sets templateType */ + @JsonAdapter(TemplateTypeEnum.Adapter.class) public enum TemplateTypeEnum { - @SerializedName("OFFICE") OFFICE("OFFICE"), - @SerializedName("FREEMARKER") FREEMARKER("FREEMARKER"); private String value; @@ -53,10 +45,36 @@ public enum TemplateTypeEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static TemplateTypeEnum fromValue(String text) { + for (TemplateTypeEnum b : TemplateTypeEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TemplateTypeEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TemplateTypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TemplateTypeEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("templateType") @@ -80,7 +98,7 @@ public TemplateContextRequest templateType(TemplateTypeEnum templateType) { * Get templateType * @return templateType **/ - @ApiModelProperty(example = "null", required = true, value = "") + @ApiModelProperty(required = true, value = "") public TemplateTypeEnum getTemplateType() { return templateType; } @@ -98,7 +116,7 @@ public TemplateContextRequest description(String description) { * Get description * @return description **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public String getDescription() { return description; } @@ -116,7 +134,7 @@ public TemplateContextRequest ownerInfo(OwnerInfo ownerInfo) { * Get ownerInfo * @return ownerInfo **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public OwnerInfo getOwnerInfo() { return ownerInfo; } @@ -134,7 +152,7 @@ public TemplateContextRequest templateId(String templateId) { * The template context id * @return templateId **/ - @ApiModelProperty(example = "null", value = "The template context id") + @ApiModelProperty(value = "The template context id") public String getTemplateId() { return templateId; } diff --git a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java index 306954e..a3e7fd7 100644 --- a/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java +++ b/java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java @@ -8,35 +8,28 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ package com.sphereon.sdk.template_processor.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 com.sphereon.sdk.template_processor.model.TemplateContext; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; import java.time.OffsetDateTime; /** * The merge template response. */ @ApiModel(description = "The merge template response.") -@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2017-08-31T12:07:54.103+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:57.313+02:00") public class TemplateContextResponse { @SerializedName("creationTime") private OffsetDateTime creationTime = null; @@ -50,17 +43,14 @@ public class TemplateContextResponse { /** * The status of the template */ + @JsonAdapter(StatusEnum.Adapter.class) public enum StatusEnum { - @SerializedName("CREATED") CREATED("CREATED"), - @SerializedName("UPDATED") UPDATED("UPDATED"), - @SerializedName("DELETED") DELETED("DELETED"), - @SerializedName("PROCESSING") PROCESSING("PROCESSING"); private String value; @@ -69,10 +59,36 @@ public enum StatusEnum { this.value = value; } + public String getValue() { + return value; + } + @Override public String toString() { return String.valueOf(value); } + + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public StatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return StatusEnum.fromValue(String.valueOf(value)); + } + } } @SerializedName("status") @@ -82,7 +98,7 @@ public String toString() { * The creation date/time of this response in ISO 8601 format * @return creationTime **/ - @ApiModelProperty(example = "null", value = "The creation date/time of this response in ISO 8601 format") + @ApiModelProperty(value = "The creation date/time of this response in ISO 8601 format") public OffsetDateTime getCreationTime() { return creationTime; } @@ -96,7 +112,7 @@ public TemplateContextResponse context(TemplateContext context) { * Get context * @return context **/ - @ApiModelProperty(example = "null", value = "") + @ApiModelProperty(value = "") public TemplateContext getContext() { return context; } @@ -114,7 +130,7 @@ public TemplateContextResponse id(String id) { * Unique template context id * @return id **/ - @ApiModelProperty(example = "null", required = true, value = "Unique template context id") + @ApiModelProperty(required = true, value = "Unique template context id") public String getId() { return id; } @@ -127,7 +143,7 @@ public void setId(String id) { * The status of the template * @return status **/ - @ApiModelProperty(example = "null", required = true, value = "The status of the template") + @ApiModelProperty(required = true, value = "The status of the template") public StatusEnum getStatus() { return status; } diff --git a/java8-retrofit2/src/test/java/com/sphereon/sdk/template_processor/api/AllApiTest.java b/java8-retrofit2/src/test/java/com/sphereon/sdk/template_processor/api/AllApiTest.java index d54e21f..bc6b517 100644 --- a/java8-retrofit2/src/test/java/com/sphereon/sdk/template_processor/api/AllApiTest.java +++ b/java8-retrofit2/src/test/java/com/sphereon/sdk/template_processor/api/AllApiTest.java @@ -3,12 +3,14 @@ import com.sphereon.sdk.template_processor.handler.ApiClient; import com.sphereon.sdk.template_processor.model.DataSetResponse; import com.sphereon.sdk.template_processor.model.ErrorResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextRequest; +import java.io.File; import com.sphereon.sdk.template_processor.model.MergeJobResponse; -import com.sphereon.sdk.template_processor.model.OutputSettings; import com.sphereon.sdk.template_processor.model.MergeSettings; -import java.io.File; +import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.ResultStreamRequest; +import com.sphereon.sdk.template_processor.model.TemplateContext; +import com.sphereon.sdk.template_processor.model.TemplateContextRequest; +import com.sphereon.sdk.template_processor.model.TemplateContextResponse; import org.junit.Before; import org.junit.Test; @@ -127,11 +129,10 @@ public void getJobsTest() { * Get a merge result document as a binary stream. */ @Test - public void getResultStreamByIdTest() { + public void getResultStreamTest() { String jobId = null; - String streamId = null; - OutputSettings outputSettings = null; - // byte[] response = api.getResultStreamById(jobId, streamId, outputSettings); + ResultStreamRequest resultStreamRequest = null; + // byte[] response = api.getResultStream(jobId, resultStreamRequest); // TODO: test validations } @@ -183,8 +184,8 @@ public void submitJobTest() { */ @Test public void updateTemplateContextTest() { - TemplateContextRequest templateContextRequest = null; - // TemplateContextResponse response = api.updateTemplateContext(templateContextRequest); + TemplateContext templateContext = null; + // TemplateContextResponse response = api.updateTemplateContext(templateContext); // TODO: test validations } diff --git a/java8-retrofit2/src/test/java/com/sphereon/sdk/template_processor/api/JobApiTest.java b/java8-retrofit2/src/test/java/com/sphereon/sdk/template_processor/api/JobApiTest.java index 8af4a45..84a36ae 100644 --- a/java8-retrofit2/src/test/java/com/sphereon/sdk/template_processor/api/JobApiTest.java +++ b/java8-retrofit2/src/test/java/com/sphereon/sdk/template_processor/api/JobApiTest.java @@ -1,10 +1,11 @@ package com.sphereon.sdk.template_processor.api; import com.sphereon.sdk.template_processor.handler.ApiClient; -import com.sphereon.sdk.template_processor.model.MergeJobResponse; import com.sphereon.sdk.template_processor.model.ErrorResponse; -import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.MergeJobResponse; import com.sphereon.sdk.template_processor.model.MergeSettings; +import com.sphereon.sdk.template_processor.model.OutputSettings; +import com.sphereon.sdk.template_processor.model.ResultStreamRequest; import org.junit.Before; import org.junit.Test; @@ -58,11 +59,10 @@ public void getJobsTest() { * Get a merge result document as a binary stream. */ @Test - public void getResultStreamByIdTest() { + public void getResultStreamTest() { String jobId = null; - String streamId = null; - OutputSettings outputSettings = null; - // byte[] response = api.getResultStreamById(jobId, streamId, outputSettings); + ResultStreamRequest resultStreamRequest = null; + // byte[] response = api.getResultStream(jobId, resultStreamRequest); // TODO: test validations } diff --git a/java8-retrofit2/src/test/java/com/sphereon/sdk/template_processor/api/MergeApiTest.java b/java8-retrofit2/src/test/java/com/sphereon/sdk/template_processor/api/MergeApiTest.java deleted file mode 100644 index 08d4aa5..0000000 --- a/java8-retrofit2/src/test/java/com/sphereon/sdk/template_processor/api/MergeApiTest.java +++ /dev/null @@ -1,206 +0,0 @@ -package com.sphereon.sdk.template_processor.api; - -import com.sphereon.sdk.template_processor.handler.ApiClient; -import com.sphereon.sdk.template_processor.model.DataSetResponse; -import com.sphereon.sdk.template_processor.model.ErrorResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextRequest; -import com.sphereon.sdk.template_processor.model.MergeJobResponse; -import com.sphereon.sdk.template_processor.model.OutputSettings; -import com.sphereon.sdk.template_processor.model.MergeSettings; -import java.io.File; -import org.junit.Before; -import org.junit.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for MergeApi - */ -public class MergeApiTest { - - private MergeApi api; - - @Before - public void setup() { - api = new ApiClient().createService(MergeApi.class); - } - - - /** - * Store dataset - * - * Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - */ - @Test - public void createDataSetTest() { - String payload = null; - // DataSetResponse response = api.createDataSet(payload); - - // TODO: test validations - } - - /** - * Create template context - * - * Create a unique template context for your environment - */ - @Test - public void createTemplateContextTest() { - TemplateContextRequest templateRequest = null; - // TemplateContextResponse response = api.createTemplateContext(templateRequest); - - // TODO: test validations - } - - /** - * Delete a stored data set - * - * Delete a stored data set - */ - @Test - public void deleteDataSetTest() { - String dataSetId = null; - // DataSetResponse response = api.deleteDataSet(dataSetId); - - // TODO: test validations - } - - /** - * Delete a job manually - * - * Delete the merge job and all related files - */ - @Test - public void deleteJobTest() { - String jobId = null; - // MergeJobResponse response = api.deleteJob(jobId); - - // TODO: test validations - } - - /** - * Delete template context - * - * Delete a template context with all history - */ - @Test - public void deleteTemplateContextTest() { - String templateId = null; - // TemplateContextResponse response = api.deleteTemplateContext(templateId); - - // TODO: test validations - } - - /** - * Job definition and state - * - * Get the merge job definition and current state. Please not that you can differentiate based on http response status - */ - @Test - public void getJobTest() { - String jobId = null; - // MergeJobResponse response = api.getJob(jobId); - - // TODO: test validations - } - - /** - * Get all jobs - * - * Get all office text job definitions and their current state. - */ - @Test - public void getJobsTest() { - List status = null; - // List response = api.getJobs(status); - - // TODO: test validations - } - - /** - * Get the result file - * - * Get a merge result document as a binary stream. - */ - @Test - public void getResultStreamByIdTest() { - String jobId = null; - String streamId = null; - OutputSettings outputSettings = null; - // byte[] response = api.getResultStreamById(jobId, streamId, outputSettings); - - // TODO: test validations - } - - /** - * Get the result file - * - * Get all documents inside a compressed container as a binary stream. - */ - @Test - public void getResultStreamsAsContainerTest() { - String jobId = null; - OutputSettings outputSettings = null; - // byte[] response = api.getResultStreamsAsContainer(jobId, outputSettings); - - // TODO: test validations - } - - /** - * Get template context - * - * Get an existing template context - */ - @Test - public void getTemplateContextTest() { - String templateId = null; - // TemplateContextResponse response = api.getTemplateContext(templateId); - - // TODO: test validations - } - - /** - * Submit merge job for processing - * - * Submit merge job run. - */ - @Test - public void submitJobTest() { - MergeSettings mergesettings = null; - // MergeJobResponse response = api.submitJob(mergesettings); - - // TODO: test validations - } - - /** - * Update template context - * - * Update an existing template context for your environment - */ - @Test - public void updateTemplateContextTest() { - TemplateContextRequest templateContextRequest = null; - // TemplateContextResponse response = api.updateTemplateContext(templateContextRequest); - - // TODO: test validations - } - - /** - * Upload template file - * - * Upload the Office template file - */ - @Test - public void uploadTemplateFileTest() { - String templateId = null; - File stream = null; - // TemplateContextResponse response = api.uploadTemplateFile(templateId, stream); - - // TODO: test validations - } - -} diff --git a/java8-retrofit2/src/test/java/com/sphereon/sdk/template_processor/api/TemplateApiTest.java b/java8-retrofit2/src/test/java/com/sphereon/sdk/template_processor/api/TemplateApiTest.java index c94b28e..870a879 100644 --- a/java8-retrofit2/src/test/java/com/sphereon/sdk/template_processor/api/TemplateApiTest.java +++ b/java8-retrofit2/src/test/java/com/sphereon/sdk/template_processor/api/TemplateApiTest.java @@ -1,10 +1,11 @@ package com.sphereon.sdk.template_processor.api; import com.sphereon.sdk.template_processor.handler.ApiClient; -import com.sphereon.sdk.template_processor.model.TemplateContextResponse; -import com.sphereon.sdk.template_processor.model.TemplateContextRequest; import com.sphereon.sdk.template_processor.model.ErrorResponse; import java.io.File; +import com.sphereon.sdk.template_processor.model.TemplateContext; +import com.sphereon.sdk.template_processor.model.TemplateContextRequest; +import com.sphereon.sdk.template_processor.model.TemplateContextResponse; import org.junit.Before; import org.junit.Test; @@ -72,8 +73,8 @@ public void getTemplateContextTest() { */ @Test public void updateTemplateContextTest() { - TemplateContextRequest templateContextRequest = null; - // TemplateContextResponse response = api.updateTemplateContext(templateContextRequest); + TemplateContext templateContext = null; + // TemplateContextResponse response = api.updateTemplateContext(templateContext); // TODO: test validations } diff --git a/javascript/.swagger-codegen/VERSION b/javascript/.swagger-codegen/VERSION new file mode 100644 index 0000000..6b4d157 --- /dev/null +++ b/javascript/.swagger-codegen/VERSION @@ -0,0 +1 @@ +2.2.3 \ No newline at end of file diff --git a/javascript/LICENSE b/javascript/LICENSE deleted file mode 100644 index 8dada3e..0000000 --- a/javascript/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/javascript/README.md b/javascript/README.md index 2679aad..5282f10 100644 --- a/javascript/README.md +++ b/javascript/README.md @@ -6,8 +6,7 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/ - API version: 0.1 - Package version: 0.1 -- Build date: 2017-08-31T12:07:56.260+02:00 -- Build package: class io.swagger.codegen.languages.JavascriptClientCodegen +- Build package: io.swagger.codegen.languages.JavascriptClientCodegen For more information, please visit [https://sphereon.com](https://sphereon.com) ## Installation @@ -25,6 +24,30 @@ Then install it via: npm install template_processor --save ``` +##### Local development + +To use the library locally without publishing to a remote npm registry, first install the dependencies by changing +into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run: + +```shell +npm install +``` + +Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`: + +```shell +npm link +``` + +Finally, switch to the directory you want to use your template_processor from, and run: + +```shell +npm link /path/to/ +``` + +You should now be able to `require('template_processor')` in javascript files from the directory you ran the last +command above from. + #### git # If the library is hosted at a git repository, e.g. @@ -39,7 +62,8 @@ then install it via: The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following the above steps with Node.js and installing browserify with `npm install -g browserify`, -perform the following (assuming *main.js* is your entry file): +perform the following (assuming *main.js* is your entry file, that's to say your javascript file where you actually +use this library): ```shell browserify main.js > bundle.js @@ -47,6 +71,24 @@ browserify main.js > bundle.js Then include *bundle.js* in the HTML pages. +### Webpack Configuration + +Using Webpack you may encounter the following error: "Module not found: Error: +Cannot resolve module", most certainly you should disable AMD loader. Add/merge +the following section to your webpack config: + +```javascript +module: { + rules: [ + { + parser: { + amd: false + } + } + ] +} +``` + ## Getting Started Please follow the [installation](#installation) instruction and execute the following JS code: @@ -78,7 +120,7 @@ api.createDataSet(payload, callback); ## Documentation for API Endpoints -All URIs are relative to *https://gw.api.cloud.sphereon.com/* +All URIs are relative to *https://gw.api.cloud.sphereon.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- @@ -89,7 +131,7 @@ Class | Method | HTTP request | Description *TemplateProcessor.AllApi* | [**deleteTemplateContext**](docs/AllApi.md#deleteTemplateContext) | **DELETE** /template/processor/0.1/templates/{templateId} | Delete template context *TemplateProcessor.AllApi* | [**getJob**](docs/AllApi.md#getJob) | **GET** /template/processor/0.1/jobs/{jobId} | Job definition and state *TemplateProcessor.AllApi* | [**getJobs**](docs/AllApi.md#getJobs) | **GET** /template/processor/0.1/jobs | Get all jobs -*TemplateProcessor.AllApi* | [**getResultStreamById**](docs/AllApi.md#getResultStreamById) | **PUT** /template/processor/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file +*TemplateProcessor.AllApi* | [**getResultStream**](docs/AllApi.md#getResultStream) | **PUT** /template/processor/0.1/jobs/{jobId}/result/stream | Get the result file *TemplateProcessor.AllApi* | [**getResultStreamsAsContainer**](docs/AllApi.md#getResultStreamsAsContainer) | **PUT** /template/processor/0.1/jobs/{jobId}/result/container | Get the result file *TemplateProcessor.AllApi* | [**getTemplateContext**](docs/AllApi.md#getTemplateContext) | **GET** /template/processor/0.1/templates/{templateId} | Get template context *TemplateProcessor.AllApi* | [**submitJob**](docs/AllApi.md#submitJob) | **PUT** /template/processor/0.1/jobs | Submit merge job for processing @@ -99,7 +141,7 @@ Class | Method | HTTP request | Description *TemplateProcessor.DataSetApi* | [**deleteDataSet**](docs/DataSetApi.md#deleteDataSet) | **DELETE** /template/processor/0.1/datasets/{dataSetId} | Delete a stored data set *TemplateProcessor.JobApi* | [**getJob**](docs/JobApi.md#getJob) | **GET** /template/processor/0.1/jobs/{jobId} | Job definition and state *TemplateProcessor.JobApi* | [**getJobs**](docs/JobApi.md#getJobs) | **GET** /template/processor/0.1/jobs | Get all jobs -*TemplateProcessor.JobApi* | [**getResultStreamById**](docs/JobApi.md#getResultStreamById) | **PUT** /template/processor/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file +*TemplateProcessor.JobApi* | [**getResultStream**](docs/JobApi.md#getResultStream) | **PUT** /template/processor/0.1/jobs/{jobId}/result/stream | Get the result file *TemplateProcessor.JobApi* | [**getResultStreamsAsContainer**](docs/JobApi.md#getResultStreamsAsContainer) | **PUT** /template/processor/0.1/jobs/{jobId}/result/container | Get the result file *TemplateProcessor.JobApi* | [**submitJob**](docs/JobApi.md#submitJob) | **PUT** /template/processor/0.1/jobs | Submit merge job for processing *TemplateProcessor.TemplateApi* | [**createTemplateContext**](docs/TemplateApi.md#createTemplateContext) | **POST** /template/processor/0.1/templates | Create template context @@ -120,6 +162,7 @@ Class | Method | HTTP request | Description - [TemplateProcessor.MergeSettings](docs/MergeSettings.md) - [TemplateProcessor.OutputSettings](docs/OutputSettings.md) - [TemplateProcessor.OwnerInfo](docs/OwnerInfo.md) + - [TemplateProcessor.ResultStreamRequest](docs/ResultStreamRequest.md) - [TemplateProcessor.StorageLocation](docs/StorageLocation.md) - [TemplateProcessor.StreamLocation](docs/StreamLocation.md) - [TemplateProcessor.TemplateContext](docs/TemplateContext.md) diff --git a/javascript/docs/AllApi.md b/javascript/docs/AllApi.md index 158e890..66df2d5 100644 --- a/javascript/docs/AllApi.md +++ b/javascript/docs/AllApi.md @@ -1,6 +1,6 @@ # TemplateProcessor.AllApi -All URIs are relative to *https://gw.api.cloud.sphereon.com/* +All URIs are relative to *https://gw.api.cloud.sphereon.com* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -11,7 +11,7 @@ Method | HTTP request | Description [**deleteTemplateContext**](AllApi.md#deleteTemplateContext) | **DELETE** /template/processor/0.1/templates/{templateId} | Delete template context [**getJob**](AllApi.md#getJob) | **GET** /template/processor/0.1/jobs/{jobId} | Job definition and state [**getJobs**](AllApi.md#getJobs) | **GET** /template/processor/0.1/jobs | Get all jobs -[**getResultStreamById**](AllApi.md#getResultStreamById) | **PUT** /template/processor/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file +[**getResultStream**](AllApi.md#getResultStream) | **PUT** /template/processor/0.1/jobs/{jobId}/result/stream | Get the result file [**getResultStreamsAsContainer**](AllApi.md#getResultStreamsAsContainer) | **PUT** /template/processor/0.1/jobs/{jobId}/result/container | Get the result file [**getTemplateContext**](AllApi.md#getTemplateContext) | **GET** /template/processor/0.1/templates/{templateId} | Get template context [**submitJob**](AllApi.md#submitJob) | **PUT** /template/processor/0.1/jobs | Submit merge job for processing @@ -30,7 +30,7 @@ Upload and store a data set. Currently only JSON is supported. This call returns ### Example ```javascript var TemplateProcessor = require('template_processor'); -var defaultClient = TemplateProcessor.ApiClient.default; +var defaultClient = TemplateProcessor.ApiClient.instance; // Configure OAuth2 access token for authorization: oauth2schema var oauth2schema = defaultClient.authentications['oauth2schema']; @@ -81,7 +81,7 @@ Create a unique template context for your environment ### Example ```javascript var TemplateProcessor = require('template_processor'); -var defaultClient = TemplateProcessor.ApiClient.default; +var defaultClient = TemplateProcessor.ApiClient.instance; // Configure OAuth2 access token for authorization: oauth2schema var oauth2schema = defaultClient.authentications['oauth2schema']; @@ -132,7 +132,7 @@ Delete a stored data set ### Example ```javascript var TemplateProcessor = require('template_processor'); -var defaultClient = TemplateProcessor.ApiClient.default; +var defaultClient = TemplateProcessor.ApiClient.instance; // Configure OAuth2 access token for authorization: oauth2schema var oauth2schema = defaultClient.authentications['oauth2schema']; @@ -183,7 +183,7 @@ Delete the merge job and all related files ### Example ```javascript var TemplateProcessor = require('template_processor'); -var defaultClient = TemplateProcessor.ApiClient.default; +var defaultClient = TemplateProcessor.ApiClient.instance; // Configure OAuth2 access token for authorization: oauth2schema var oauth2schema = defaultClient.authentications['oauth2schema']; @@ -234,7 +234,7 @@ Delete a template context with all history ### Example ```javascript var TemplateProcessor = require('template_processor'); -var defaultClient = TemplateProcessor.ApiClient.default; +var defaultClient = TemplateProcessor.ApiClient.instance; // Configure OAuth2 access token for authorization: oauth2schema var oauth2schema = defaultClient.authentications['oauth2schema']; @@ -285,7 +285,7 @@ Get the merge job definition and current state. Please not that you can differen ### Example ```javascript var TemplateProcessor = require('template_processor'); -var defaultClient = TemplateProcessor.ApiClient.default; +var defaultClient = TemplateProcessor.ApiClient.instance; // Configure OAuth2 access token for authorization: oauth2schema var oauth2schema = defaultClient.authentications['oauth2schema']; @@ -336,7 +336,7 @@ Get all office text job definitions and their current state. ### Example ```javascript var TemplateProcessor = require('template_processor'); -var defaultClient = TemplateProcessor.ApiClient.default; +var defaultClient = TemplateProcessor.ApiClient.instance; // Configure OAuth2 access token for authorization: oauth2schema var oauth2schema = defaultClient.authentications['oauth2schema']; @@ -377,9 +377,9 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json;charset=UTF-8 - -# **getResultStreamById** -> 'String' getResultStreamById(jobId, streamId, opts) + +# **getResultStream** +> 'Blob' getResultStream(jobId, resultStreamRequest) Get the result file @@ -388,7 +388,7 @@ Get a merge result document as a binary stream. ### Example ```javascript var TemplateProcessor = require('template_processor'); -var defaultClient = TemplateProcessor.ApiClient.default; +var defaultClient = TemplateProcessor.ApiClient.instance; // Configure OAuth2 access token for authorization: oauth2schema var oauth2schema = defaultClient.authentications['oauth2schema']; @@ -398,11 +398,8 @@ var apiInstance = new TemplateProcessor.AllApi(); var jobId = "jobId_example"; // String | jobId -var streamId = "streamId_example"; // String | streamId +var resultStreamRequest = new TemplateProcessor.ResultStreamRequest(); // ResultStreamRequest | resultStreamRequest -var opts = { - 'outputSettings': new TemplateProcessor.OutputSettings() // OutputSettings | outputSettings -}; var callback = function(error, data, response) { if (error) { @@ -411,7 +408,7 @@ var callback = function(error, data, response) { console.log('API called successfully. Returned data: ' + data); } }; -apiInstance.getResultStreamById(jobId, streamId, opts, callback); +apiInstance.getResultStream(jobId, resultStreamRequest, callback); ``` ### Parameters @@ -419,12 +416,11 @@ apiInstance.getResultStreamById(jobId, streamId, opts, callback); Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **jobId** | **String**| jobId | - **streamId** | **String**| streamId | - **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] + **resultStreamRequest** | [**ResultStreamRequest**](ResultStreamRequest.md)| resultStreamRequest | ### Return type -**'String'** +**'Blob'** ### Authorization @@ -437,7 +433,7 @@ Name | Type | Description | Notes # **getResultStreamsAsContainer** -> 'String' getResultStreamsAsContainer(jobId, opts) +> 'Blob' getResultStreamsAsContainer(jobId, opts) Get the result file @@ -446,7 +442,7 @@ Get all documents inside a compressed container as a binary stream. ### Example ```javascript var TemplateProcessor = require('template_processor'); -var defaultClient = TemplateProcessor.ApiClient.default; +var defaultClient = TemplateProcessor.ApiClient.instance; // Configure OAuth2 access token for authorization: oauth2schema var oauth2schema = defaultClient.authentications['oauth2schema']; @@ -479,7 +475,7 @@ Name | Type | Description | Notes ### Return type -**'String'** +**'Blob'** ### Authorization @@ -501,7 +497,7 @@ Get an existing template context ### Example ```javascript var TemplateProcessor = require('template_processor'); -var defaultClient = TemplateProcessor.ApiClient.default; +var defaultClient = TemplateProcessor.ApiClient.instance; // Configure OAuth2 access token for authorization: oauth2schema var oauth2schema = defaultClient.authentications['oauth2schema']; @@ -552,7 +548,7 @@ Submit merge job run. ### Example ```javascript var TemplateProcessor = require('template_processor'); -var defaultClient = TemplateProcessor.ApiClient.default; +var defaultClient = TemplateProcessor.ApiClient.instance; // Configure OAuth2 access token for authorization: oauth2schema var oauth2schema = defaultClient.authentications['oauth2schema']; @@ -603,7 +599,7 @@ Update an existing template context for your environment ### Example ```javascript var TemplateProcessor = require('template_processor'); -var defaultClient = TemplateProcessor.ApiClient.default; +var defaultClient = TemplateProcessor.ApiClient.instance; // Configure OAuth2 access token for authorization: oauth2schema var oauth2schema = defaultClient.authentications['oauth2schema']; @@ -654,7 +650,7 @@ Upload the Office template file ### Example ```javascript var TemplateProcessor = require('template_processor'); -var defaultClient = TemplateProcessor.ApiClient.default; +var defaultClient = TemplateProcessor.ApiClient.instance; // Configure OAuth2 access token for authorization: oauth2schema var oauth2schema = defaultClient.authentications['oauth2schema']; diff --git a/javascript/docs/DataSetApi.md b/javascript/docs/DataSetApi.md index 8913a0d..ee292bc 100644 --- a/javascript/docs/DataSetApi.md +++ b/javascript/docs/DataSetApi.md @@ -1,6 +1,6 @@ # TemplateProcessor.DataSetApi -All URIs are relative to *https://gw.api.cloud.sphereon.com/* +All URIs are relative to *https://gw.api.cloud.sphereon.com* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -19,7 +19,7 @@ Upload and store a data set. Currently only JSON is supported. This call returns ### Example ```javascript var TemplateProcessor = require('template_processor'); -var defaultClient = TemplateProcessor.ApiClient.default; +var defaultClient = TemplateProcessor.ApiClient.instance; // Configure OAuth2 access token for authorization: oauth2schema var oauth2schema = defaultClient.authentications['oauth2schema']; @@ -70,7 +70,7 @@ Delete a stored data set ### Example ```javascript var TemplateProcessor = require('template_processor'); -var defaultClient = TemplateProcessor.ApiClient.default; +var defaultClient = TemplateProcessor.ApiClient.instance; // Configure OAuth2 access token for authorization: oauth2schema var oauth2schema = defaultClient.authentications['oauth2schema']; diff --git a/javascript/docs/JobApi.md b/javascript/docs/JobApi.md index ddc4cb3..5983fa1 100644 --- a/javascript/docs/JobApi.md +++ b/javascript/docs/JobApi.md @@ -1,12 +1,12 @@ # TemplateProcessor.JobApi -All URIs are relative to *https://gw.api.cloud.sphereon.com/* +All URIs are relative to *https://gw.api.cloud.sphereon.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**getJob**](JobApi.md#getJob) | **GET** /template/processor/0.1/jobs/{jobId} | Job definition and state [**getJobs**](JobApi.md#getJobs) | **GET** /template/processor/0.1/jobs | Get all jobs -[**getResultStreamById**](JobApi.md#getResultStreamById) | **PUT** /template/processor/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file +[**getResultStream**](JobApi.md#getResultStream) | **PUT** /template/processor/0.1/jobs/{jobId}/result/stream | Get the result file [**getResultStreamsAsContainer**](JobApi.md#getResultStreamsAsContainer) | **PUT** /template/processor/0.1/jobs/{jobId}/result/container | Get the result file [**submitJob**](JobApi.md#submitJob) | **PUT** /template/processor/0.1/jobs | Submit merge job for processing @@ -22,7 +22,7 @@ Get the merge job definition and current state. Please not that you can differen ### Example ```javascript var TemplateProcessor = require('template_processor'); -var defaultClient = TemplateProcessor.ApiClient.default; +var defaultClient = TemplateProcessor.ApiClient.instance; // Configure OAuth2 access token for authorization: oauth2schema var oauth2schema = defaultClient.authentications['oauth2schema']; @@ -73,7 +73,7 @@ Get all office text job definitions and their current state. ### Example ```javascript var TemplateProcessor = require('template_processor'); -var defaultClient = TemplateProcessor.ApiClient.default; +var defaultClient = TemplateProcessor.ApiClient.instance; // Configure OAuth2 access token for authorization: oauth2schema var oauth2schema = defaultClient.authentications['oauth2schema']; @@ -114,9 +114,9 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json;charset=UTF-8 - -# **getResultStreamById** -> 'String' getResultStreamById(jobId, streamId, opts) + +# **getResultStream** +> 'Blob' getResultStream(jobId, resultStreamRequest) Get the result file @@ -125,7 +125,7 @@ Get a merge result document as a binary stream. ### Example ```javascript var TemplateProcessor = require('template_processor'); -var defaultClient = TemplateProcessor.ApiClient.default; +var defaultClient = TemplateProcessor.ApiClient.instance; // Configure OAuth2 access token for authorization: oauth2schema var oauth2schema = defaultClient.authentications['oauth2schema']; @@ -135,11 +135,8 @@ var apiInstance = new TemplateProcessor.JobApi(); var jobId = "jobId_example"; // String | jobId -var streamId = "streamId_example"; // String | streamId +var resultStreamRequest = new TemplateProcessor.ResultStreamRequest(); // ResultStreamRequest | resultStreamRequest -var opts = { - 'outputSettings': new TemplateProcessor.OutputSettings() // OutputSettings | outputSettings -}; var callback = function(error, data, response) { if (error) { @@ -148,7 +145,7 @@ var callback = function(error, data, response) { console.log('API called successfully. Returned data: ' + data); } }; -apiInstance.getResultStreamById(jobId, streamId, opts, callback); +apiInstance.getResultStream(jobId, resultStreamRequest, callback); ``` ### Parameters @@ -156,12 +153,11 @@ apiInstance.getResultStreamById(jobId, streamId, opts, callback); Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **jobId** | **String**| jobId | - **streamId** | **String**| streamId | - **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] + **resultStreamRequest** | [**ResultStreamRequest**](ResultStreamRequest.md)| resultStreamRequest | ### Return type -**'String'** +**'Blob'** ### Authorization @@ -174,7 +170,7 @@ Name | Type | Description | Notes # **getResultStreamsAsContainer** -> 'String' getResultStreamsAsContainer(jobId, opts) +> 'Blob' getResultStreamsAsContainer(jobId, opts) Get the result file @@ -183,7 +179,7 @@ Get all documents inside a compressed container as a binary stream. ### Example ```javascript var TemplateProcessor = require('template_processor'); -var defaultClient = TemplateProcessor.ApiClient.default; +var defaultClient = TemplateProcessor.ApiClient.instance; // Configure OAuth2 access token for authorization: oauth2schema var oauth2schema = defaultClient.authentications['oauth2schema']; @@ -216,7 +212,7 @@ Name | Type | Description | Notes ### Return type -**'String'** +**'Blob'** ### Authorization @@ -238,7 +234,7 @@ Submit merge job run. ### Example ```javascript var TemplateProcessor = require('template_processor'); -var defaultClient = TemplateProcessor.ApiClient.default; +var defaultClient = TemplateProcessor.ApiClient.instance; // Configure OAuth2 access token for authorization: oauth2schema var oauth2schema = defaultClient.authentications['oauth2schema']; diff --git a/javascript/docs/MergeApi.md b/javascript/docs/MergeApi.md deleted file mode 100644 index 2dd6544..0000000 --- a/javascript/docs/MergeApi.md +++ /dev/null @@ -1,699 +0,0 @@ -# OfficeTextMerge.MergeApi - -All URIs are relative to *https://gw.api.cloud.sphereon.com/* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**createDataSet**](MergeApi.md#createDataSet) | **POST** /template-processor/merge/0.1/datasets | Store dataset -[**createTemplateContext**](MergeApi.md#createTemplateContext) | **POST** /template-processor/merge/0.1/templates | Create template context -[**deleteDataSet**](MergeApi.md#deleteDataSet) | **DELETE** /template-processor/merge/0.1/datasets/{dataSetId} | Delete a stored data set -[**deleteJob**](MergeApi.md#deleteJob) | **DELETE** /template-processor/merge/0.1/jobs/{jobId} | Delete a job manually -[**deleteTemplateContext**](MergeApi.md#deleteTemplateContext) | **DELETE** /template-processor/merge/0.1/templates/{templateId} | Delete template context -[**getJob**](MergeApi.md#getJob) | **GET** /template-processor/merge/0.1/jobs/{jobId} | Job definition and state -[**getJobs**](MergeApi.md#getJobs) | **GET** /template-processor/merge/0.1/jobs | Get all jobs -[**getResultStreamById**](MergeApi.md#getResultStreamById) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId} | Get the result file -[**getResultStreamsAsContainer**](MergeApi.md#getResultStreamsAsContainer) | **PUT** /template-processor/merge/0.1/jobs/{jobId}/result/container | Get the result file -[**getTemplateContext**](MergeApi.md#getTemplateContext) | **GET** /template-processor/merge/0.1/templates/{templateId} | Get template context -[**submitJob**](MergeApi.md#submitJob) | **PUT** /template-processor/merge/0.1/jobs | Submit merge job for processing -[**updateTemplateContext**](MergeApi.md#updateTemplateContext) | **PUT** /template-processor/merge/0.1/templates | Update template context -[**uploadTemplateFile**](MergeApi.md#uploadTemplateFile) | **POST** /template-processor/merge/0.1/templates/{templateId} | Upload template file - - - -# **createDataSet** -> DataSetResponse createDataSet(payload) - -Store dataset - -Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - -### Example -```javascript -var OfficeTextMerge = require('office_text_merge'); -var defaultClient = OfficeTextMerge.ApiClient.default; - -// Configure OAuth2 access token for authorization: oauth2schema -var oauth2schema = defaultClient.authentications['oauth2schema']; -oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; - -var apiInstance = new OfficeTextMerge.MergeApi(); - -var payload = "payload_example"; // String | The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - - -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.createDataSet(payload, callback); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **payload** | **String**| The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] | - -### Return type - -[**DataSetResponse**](DataSetResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - - -# **createTemplateContext** -> TemplateContextResponse createTemplateContext(templateRequest) - -Create template context - -Create a unique template context for your environment - -### Example -```javascript -var OfficeTextMerge = require('office_text_merge'); -var defaultClient = OfficeTextMerge.ApiClient.default; - -// Configure OAuth2 access token for authorization: oauth2schema -var oauth2schema = defaultClient.authentications['oauth2schema']; -oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; - -var apiInstance = new OfficeTextMerge.MergeApi(); - -var templateRequest = new OfficeTextMerge.TemplateContextRequest(); // TemplateContextRequest | The template request - - -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.createTemplateContext(templateRequest, callback); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| The template request | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - - -# **deleteDataSet** -> DataSetResponse deleteDataSet(dataSetId) - -Delete a stored data set - -Delete a stored data set - -### Example -```javascript -var OfficeTextMerge = require('office_text_merge'); -var defaultClient = OfficeTextMerge.ApiClient.default; - -// Configure OAuth2 access token for authorization: oauth2schema -var oauth2schema = defaultClient.authentications['oauth2schema']; -oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; - -var apiInstance = new OfficeTextMerge.MergeApi(); - -var dataSetId = "dataSetId_example"; // String | dataSetId - - -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.deleteDataSet(dataSetId, callback); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **dataSetId** | **String**| dataSetId | - -### Return type - -[**DataSetResponse**](DataSetResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - - -# **deleteJob** -> MergeJobResponse deleteJob(jobId) - -Delete a job manually - -Delete the merge job and all related files - -### Example -```javascript -var OfficeTextMerge = require('office_text_merge'); -var defaultClient = OfficeTextMerge.ApiClient.default; - -// Configure OAuth2 access token for authorization: oauth2schema -var oauth2schema = defaultClient.authentications['oauth2schema']; -oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; - -var apiInstance = new OfficeTextMerge.MergeApi(); - -var jobId = "jobId_example"; // String | jobId - - -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.deleteJob(jobId, callback); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **String**| jobId | - -### Return type - -[**MergeJobResponse**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - - -# **deleteTemplateContext** -> TemplateContextResponse deleteTemplateContext(templateId) - -Delete template context - -Delete a template context with all history - -### Example -```javascript -var OfficeTextMerge = require('office_text_merge'); -var defaultClient = OfficeTextMerge.ApiClient.default; - -// Configure OAuth2 access token for authorization: oauth2schema -var oauth2schema = defaultClient.authentications['oauth2schema']; -oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; - -var apiInstance = new OfficeTextMerge.MergeApi(); - -var templateId = "templateId_example"; // String | templateId - - -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.deleteTemplateContext(templateId, callback); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateId** | **String**| templateId | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - - -# **getJob** -> MergeJobResponse getJob(jobId) - -Job definition and state - -Get the merge job definition and current state. Please not that you can differentiate based on http response status - -### Example -```javascript -var OfficeTextMerge = require('office_text_merge'); -var defaultClient = OfficeTextMerge.ApiClient.default; - -// Configure OAuth2 access token for authorization: oauth2schema -var oauth2schema = defaultClient.authentications['oauth2schema']; -oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; - -var apiInstance = new OfficeTextMerge.MergeApi(); - -var jobId = "jobId_example"; // String | jobId - - -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.getJob(jobId, callback); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **String**| jobId | - -### Return type - -[**MergeJobResponse**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - - -# **getJobs** -> [MergeJobResponse] getJobs(opts) - -Get all jobs - -Get all office text job definitions and their current state. - -### Example -```javascript -var OfficeTextMerge = require('office_text_merge'); -var defaultClient = OfficeTextMerge.ApiClient.default; - -// Configure OAuth2 access token for authorization: oauth2schema -var oauth2schema = defaultClient.authentications['oauth2schema']; -oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; - -var apiInstance = new OfficeTextMerge.MergeApi(); - -var opts = { - 'status': ["status_example"] // [String] | A list of status to filter on. -}; - -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.getJobs(opts, callback); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**[String]**](String.md)| A list of status to filter on. | [optional] - -### Return type - -[**[MergeJobResponse]**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - - -# **getResultStreamById** -> 'String' getResultStreamById(jobId, streamId, opts) - -Get the result file - -Get a merge result document as a binary stream. - -### Example -```javascript -var OfficeTextMerge = require('office_text_merge'); -var defaultClient = OfficeTextMerge.ApiClient.default; - -// Configure OAuth2 access token for authorization: oauth2schema -var oauth2schema = defaultClient.authentications['oauth2schema']; -oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; - -var apiInstance = new OfficeTextMerge.MergeApi(); - -var jobId = "jobId_example"; // String | jobId - -var streamId = "streamId_example"; // String | streamId - -var opts = { - 'outputSettings': new OfficeTextMerge.OutputSettings() // OutputSettings | outputSettings -}; - -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.getResultStreamById(jobId, streamId, opts, callback); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **String**| jobId | - **streamId** | **String**| streamId | - **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] - -### Return type - -**'String'** - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/octet-stream - - -# **getResultStreamsAsContainer** -> 'String' getResultStreamsAsContainer(jobId, opts) - -Get the result file - -Get all documents inside a compressed container as a binary stream. - -### Example -```javascript -var OfficeTextMerge = require('office_text_merge'); -var defaultClient = OfficeTextMerge.ApiClient.default; - -// Configure OAuth2 access token for authorization: oauth2schema -var oauth2schema = defaultClient.authentications['oauth2schema']; -oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; - -var apiInstance = new OfficeTextMerge.MergeApi(); - -var jobId = "jobId_example"; // String | jobId - -var opts = { - 'outputSettings': new OfficeTextMerge.OutputSettings() // OutputSettings | outputSettings -}; - -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.getResultStreamsAsContainer(jobId, opts, callback); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **String**| jobId | - **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] - -### Return type - -**'String'** - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/octet-stream - - -# **getTemplateContext** -> TemplateContextResponse getTemplateContext(templateId) - -Get template context - -Get an existing template context - -### Example -```javascript -var OfficeTextMerge = require('office_text_merge'); -var defaultClient = OfficeTextMerge.ApiClient.default; - -// Configure OAuth2 access token for authorization: oauth2schema -var oauth2schema = defaultClient.authentications['oauth2schema']; -oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; - -var apiInstance = new OfficeTextMerge.MergeApi(); - -var templateId = "templateId_example"; // String | The template context name unique for your environment - - -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.getTemplateContext(templateId, callback); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateId** | **String**| The template context name unique for your environment | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - - -# **submitJob** -> MergeJobResponse submitJob(mergesettings) - -Submit merge job for processing - -Submit merge job run. - -### Example -```javascript -var OfficeTextMerge = require('office_text_merge'); -var defaultClient = OfficeTextMerge.ApiClient.default; - -// Configure OAuth2 access token for authorization: oauth2schema -var oauth2schema = defaultClient.authentications['oauth2schema']; -oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; - -var apiInstance = new OfficeTextMerge.MergeApi(); - -var mergesettings = new OfficeTextMerge.MergeSettings(); // MergeSettings | The merge- and output settings - - -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.submitJob(mergesettings, callback); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **mergesettings** | [**MergeSettings**](MergeSettings.md)| The merge- and output settings | - -### Return type - -[**MergeJobResponse**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - - -# **updateTemplateContext** -> TemplateContextResponse updateTemplateContext(templateContextRequest) - -Update template context - -Update an existing template context for your environment - -### Example -```javascript -var OfficeTextMerge = require('office_text_merge'); -var defaultClient = OfficeTextMerge.ApiClient.default; - -// Configure OAuth2 access token for authorization: oauth2schema -var oauth2schema = defaultClient.authentications['oauth2schema']; -oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; - -var apiInstance = new OfficeTextMerge.MergeApi(); - -var templateContextRequest = new OfficeTextMerge.TemplateContextRequest(); // TemplateContextRequest | templateContextRequest - - -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.updateTemplateContext(templateContextRequest, callback); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateContextRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| templateContextRequest | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - - -# **uploadTemplateFile** -> TemplateContextResponse uploadTemplateFile(templateId, stream) - -Upload template file - -Upload the Office template file - -### Example -```javascript -var OfficeTextMerge = require('office_text_merge'); -var defaultClient = OfficeTextMerge.ApiClient.default; - -// Configure OAuth2 access token for authorization: oauth2schema -var oauth2schema = defaultClient.authentications['oauth2schema']; -oauth2schema.accessToken = 'YOUR ACCESS TOKEN'; - -var apiInstance = new OfficeTextMerge.MergeApi(); - -var templateId = "templateId_example"; // String | The template context name unique for your environment - -var stream = "/path/to/file.txt"; // File | The template (file/inputstream) to store - - -var callback = function(error, data, response) { - if (error) { - console.error(error); - } else { - console.log('API called successfully. Returned data: ' + data); - } -}; -apiInstance.uploadTemplateFile(templateId, stream, callback); -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateId** | **String**| The template context name unique for your environment | - **stream** | **File**| The template (file/inputstream) to store | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json;charset=UTF-8 - diff --git a/javascript/docs/MergeSettings.md b/javascript/docs/MergeSettings.md index e830ce8..66b233f 100644 --- a/javascript/docs/MergeSettings.md +++ b/javascript/docs/MergeSettings.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **engine** | **String** | | [optional] **headerDataSetIds** | **[String]** | optional header data set ids | [optional] **resultStorageLocation** | [**StorageLocation**](StorageLocation.md) | The output location of the result files. | -**templateVersion** | **Integer** | Template version | [optional] +**templateVersion** | **Number** | Template version | [optional] **templateId** | **String** | Template id | **outputSettings** | [**OutputSettings**](OutputSettings.md) | | diff --git a/javascript/docs/ResultStreamRequest.md b/javascript/docs/ResultStreamRequest.md new file mode 100644 index 0000000..f801ce1 --- /dev/null +++ b/javascript/docs/ResultStreamRequest.md @@ -0,0 +1,9 @@ +# TemplateProcessor.ResultStreamRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**streamLocation** | [**StreamLocation**](StreamLocation.md) | The stream location | +**outputSettings** | [**OutputSettings**](OutputSettings.md) | The Output settings | [optional] + + diff --git a/javascript/docs/TemplateApi.md b/javascript/docs/TemplateApi.md index 404562c..769ea28 100644 --- a/javascript/docs/TemplateApi.md +++ b/javascript/docs/TemplateApi.md @@ -1,6 +1,6 @@ # TemplateProcessor.TemplateApi -All URIs are relative to *https://gw.api.cloud.sphereon.com/* +All URIs are relative to *https://gw.api.cloud.sphereon.com* Method | HTTP request | Description ------------- | ------------- | ------------- @@ -22,7 +22,7 @@ Create a unique template context for your environment ### Example ```javascript var TemplateProcessor = require('template_processor'); -var defaultClient = TemplateProcessor.ApiClient.default; +var defaultClient = TemplateProcessor.ApiClient.instance; // Configure OAuth2 access token for authorization: oauth2schema var oauth2schema = defaultClient.authentications['oauth2schema']; @@ -73,7 +73,7 @@ Delete a template context with all history ### Example ```javascript var TemplateProcessor = require('template_processor'); -var defaultClient = TemplateProcessor.ApiClient.default; +var defaultClient = TemplateProcessor.ApiClient.instance; // Configure OAuth2 access token for authorization: oauth2schema var oauth2schema = defaultClient.authentications['oauth2schema']; @@ -124,7 +124,7 @@ Get an existing template context ### Example ```javascript var TemplateProcessor = require('template_processor'); -var defaultClient = TemplateProcessor.ApiClient.default; +var defaultClient = TemplateProcessor.ApiClient.instance; // Configure OAuth2 access token for authorization: oauth2schema var oauth2schema = defaultClient.authentications['oauth2schema']; @@ -175,7 +175,7 @@ Update an existing template context for your environment ### Example ```javascript var TemplateProcessor = require('template_processor'); -var defaultClient = TemplateProcessor.ApiClient.default; +var defaultClient = TemplateProcessor.ApiClient.instance; // Configure OAuth2 access token for authorization: oauth2schema var oauth2schema = defaultClient.authentications['oauth2schema']; @@ -226,7 +226,7 @@ Upload the Office template file ### Example ```javascript var TemplateProcessor = require('template_processor'); -var defaultClient = TemplateProcessor.ApiClient.default; +var defaultClient = TemplateProcessor.ApiClient.instance; // Configure OAuth2 access token for authorization: oauth2schema var oauth2schema = defaultClient.authentications['oauth2schema']; diff --git a/javascript/mocha.opts b/javascript/mocha.opts index e69de29..9070118 100644 --- a/javascript/mocha.opts +++ b/javascript/mocha.opts @@ -0,0 +1 @@ +--timeout 10000 diff --git a/javascript/package.json b/javascript/package.json index 44f435b..1a27fc3 100644 --- a/javascript/package.json +++ b/javascript/package.json @@ -2,13 +2,16 @@ "name": "template_processor", "version": "0.1", "description": "bThe_Template_Processor_API_can_generate_office_xml_and_json_documents_from_a_template_and_a_JSON_data_file__Supported_templates_are_MS_Office_files_and_freemarker_files_bThe_flow_is_generally_as_followsbInteractive_testing_bA_web_based_test_console_is_available_in_the_a_hrefhttpsstore_sphereon_comSphereon_API_Storea", - "license": "Apache-2.0", + "license": "Unlicense", "main": "src/SphereonTemplateProcessor/index.js", "scripts": { "test": "./node_modules/mocha/bin/mocha --recursive" }, + "browser": { + "fs": false + }, "dependencies": { - "superagent": "1.7.1" + "superagent": "3.5.2" }, "devDependencies": { "mocha": "~2.3.4", diff --git a/javascript/src/SphereonTemplateProcessor/ApiClient.js b/javascript/src/ApiClient.js similarity index 85% rename from javascript/src/SphereonTemplateProcessor/ApiClient.js rename to javascript/src/ApiClient.js index d639a94..80be006 100644 --- a/javascript/src/SphereonTemplateProcessor/ApiClient.js +++ b/javascript/src/ApiClient.js @@ -7,36 +7,28 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. - define(['superagent'], factory); + define(['superagent', 'querystring'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('superagent')); + module.exports = factory(require('superagent'), require('querystring')); } else { // Browser globals (root is window) if (!root.TemplateProcessor) { root.TemplateProcessor = {}; } - root.TemplateProcessor.ApiClient = factory(root.superagent); + root.TemplateProcessor.ApiClient = factory(root.superagent, root.querystring); } -}(this, function(superagent) { +}(this, function(superagent, querystring) { 'use strict'; /** @@ -55,9 +47,9 @@ /** * The base URL against which to resolve every API call's (relative) path. * @type {String} - * @default https://gw.api.cloud.sphereon.com/ + * @default https://gw.api.cloud.sphereon.com */ - this.basePath = 'https://gw.api.cloud.sphereon.com/'.replace(/\/+$/, ''); + this.basePath = 'https://gw.api.cloud.sphereon.com'.replace(/\/+$/, ''); /** * The authentication methods to be included for all API calls. @@ -79,6 +71,30 @@ * @default 60000 */ this.timeout = 60000; + + /** + * If set to false an additional timestamp parameter is added to all API GET calls to + * prevent browser caching + * @type {Boolean} + * @default true + */ + this.cache = true; + + /** + * If set to true, the client will save the cookies from each server + * response, and return them in the next request. + * @default false + */ + this.enableCookies = false; + + /* + * Used to save and return cookies in a node.js (non-browser) setting, + * if this.enableCookies is set to true. + */ + if (typeof window === 'undefined') { + this.agent = new superagent.agent(); + } + }; /** @@ -156,12 +172,15 @@ * @returns {Boolean} true if param represents a file. */ exports.prototype.isFileParam = function(param) { - // fs.ReadStream in Node.js (but not in runtime like browserify) - if (typeof window === 'undefined' && - typeof require === 'function' && - require('fs') && - param instanceof require('fs').ReadStream) { - return true; + // fs.ReadStream in Node.js and Electron (but not in runtime like browserify) + if (typeof require === 'function') { + var fs; + try { + fs = require('fs'); + } catch (err) {} + if (fs && fs.ReadStream && param instanceof fs.ReadStream) { + return true; + } } // Buffer in Node.js if (typeof Buffer === 'function' && param instanceof Buffer) { @@ -315,13 +334,13 @@ * @returns A value of the specified type. */ exports.prototype.deserialize = function deserialize(response, returnType) { - if (response == null || returnType == null) { + if (response == null || returnType == null || response.status == 204) { return null; } // Rely on SuperAgent for parsing response body. // See http://visionmedia.github.io/superagent/#parsing-response-bodies var data = response.body; - if (data == null) { + if (data == null || (typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length)) { // SuperAgent does not always produce a body; use the unparsed response as a fallback data = response.text; } @@ -365,6 +384,9 @@ this.applyAuthToRequest(request, authNames); // set query parameters + if (httpMethod.toUpperCase() === 'GET' && this.cache === false) { + queryParams['_'] = new Date().getTime(); + } request.query(this.normalizeParams(queryParams)); // set header parameters @@ -375,13 +397,16 @@ var contentType = this.jsonPreferredMime(contentTypes); if (contentType) { - request.type(contentType); + // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746) + if(contentType != 'multipart/form-data') { + request.type(contentType); + } } else if (!request.header['Content-Type']) { request.type('application/json'); } if (contentType === 'application/x-www-form-urlencoded') { - request.send(this.normalizeParams(formParams)); + request.send(querystring.stringify(this.normalizeParams(formParams))); } else if (contentType == 'multipart/form-data') { var _formParams = this.normalizeParams(formParams); for (var key in _formParams) { @@ -403,12 +428,35 @@ request.accept(accept); } + if (returnType === 'Blob') { + request.responseType('blob'); + } else if (returnType === 'String') { + request.responseType('string'); + } + + // Attach previously saved cookies, if enabled + if (this.enableCookies){ + if (typeof window === 'undefined') { + this.agent.attachCookies(request); + } + else { + request.withCredentials(); + } + } + request.end(function(error, response) { if (callback) { var data = null; if (!error) { - data = _this.deserialize(response, returnType); + try { + data = _this.deserialize(response, returnType); + if (_this.enableCookies && typeof window === 'undefined'){ + _this.agent.saveCookies(response); + } + } catch (err) { + error = err; + } } callback(error, data, response); } @@ -433,9 +481,12 @@ * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: * all properties on data will be converted to this type. - * @returns An instance of the specified type. + * @returns An instance of the specified type or null or undefined if data is null or undefined. */ exports.convertToType = function(data, type) { + if (data === null || data === undefined) + return data + switch (type) { case 'Boolean': return Boolean(data); @@ -447,6 +498,8 @@ return String(data); case 'Date': return this.parseDate(String(data)); + case 'Blob': + return data; default: if (type === Object) { // generic object, return directly diff --git a/javascript/src/SphereonTemplateProcessor/api/AllApi.js b/javascript/src/SphereonTemplateProcessor/api/AllApi.js index d2c3df0..8ffbba1 100644 --- a/javascript/src/SphereonTemplateProcessor/api/AllApi.js +++ b/javascript/src/SphereonTemplateProcessor/api/AllApi.js @@ -7,36 +7,28 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. - define(['SphereonTemplateProcessor/ApiClient', 'SphereonTemplateProcessor/model/DataSetResponse', 'SphereonTemplateProcessor/model/ErrorResponse', 'SphereonTemplateProcessor/model/TemplateContextResponse', 'SphereonTemplateProcessor/model/TemplateContextRequest', 'SphereonTemplateProcessor/model/MergeJobResponse', 'SphereonTemplateProcessor/model/OutputSettings', 'SphereonTemplateProcessor/model/MergeSettings', 'SphereonTemplateProcessor/model/TemplateContext'], factory); + define(['SphereonTemplateProcessor/ApiClient', 'SphereonTemplateProcessor/model/DataSetResponse', 'SphereonTemplateProcessor/model/ErrorResponse', 'SphereonTemplateProcessor/model/MergeJobResponse', 'SphereonTemplateProcessor/model/MergeSettings', 'SphereonTemplateProcessor/model/OutputSettings', 'SphereonTemplateProcessor/model/ResultStreamRequest', 'SphereonTemplateProcessor/model/TemplateContext', 'SphereonTemplateProcessor/model/TemplateContextRequest', 'SphereonTemplateProcessor/model/TemplateContextResponse'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('../ApiClient'), require('../model/DataSetResponse'), require('../model/ErrorResponse'), require('../model/TemplateContextResponse'), require('../model/TemplateContextRequest'), require('../model/MergeJobResponse'), require('../model/OutputSettings'), require('../model/MergeSettings'), require('../model/TemplateContext')); + module.exports = factory(require('../ApiClient'), require('../model/DataSetResponse'), require('../model/ErrorResponse'), require('../model/MergeJobResponse'), require('../model/MergeSettings'), require('../model/OutputSettings'), require('../model/ResultStreamRequest'), require('../model/TemplateContext'), require('../model/TemplateContextRequest'), require('../model/TemplateContextResponse')); } else { // Browser globals (root is window) if (!root.TemplateProcessor) { root.TemplateProcessor = {}; } - root.TemplateProcessor.AllApi = factory(root.TemplateProcessor.ApiClient, root.TemplateProcessor.DataSetResponse, root.TemplateProcessor.ErrorResponse, root.TemplateProcessor.TemplateContextResponse, root.TemplateProcessor.TemplateContextRequest, root.TemplateProcessor.MergeJobResponse, root.TemplateProcessor.OutputSettings, root.TemplateProcessor.MergeSettings, root.TemplateProcessor.TemplateContext); + root.TemplateProcessor.AllApi = factory(root.TemplateProcessor.ApiClient, root.TemplateProcessor.DataSetResponse, root.TemplateProcessor.ErrorResponse, root.TemplateProcessor.MergeJobResponse, root.TemplateProcessor.MergeSettings, root.TemplateProcessor.OutputSettings, root.TemplateProcessor.ResultStreamRequest, root.TemplateProcessor.TemplateContext, root.TemplateProcessor.TemplateContextRequest, root.TemplateProcessor.TemplateContextResponse); } -}(this, function(ApiClient, DataSetResponse, ErrorResponse, TemplateContextResponse, TemplateContextRequest, MergeJobResponse, OutputSettings, MergeSettings, TemplateContext) { +}(this, function(ApiClient, DataSetResponse, ErrorResponse, MergeJobResponse, MergeSettings, OutputSettings, ResultStreamRequest, TemplateContext, TemplateContextRequest, TemplateContextResponse) { 'use strict'; /** @@ -75,8 +67,8 @@ var postBody = payload; // verify the required parameter 'payload' is set - if (payload == undefined || payload == null) { - throw "Missing the required parameter 'payload' when calling createDataSet"; + if (payload === undefined || payload === null) { + throw new Error("Missing the required parameter 'payload' when calling createDataSet"); } @@ -120,8 +112,8 @@ var postBody = templateRequest; // verify the required parameter 'templateRequest' is set - if (templateRequest == undefined || templateRequest == null) { - throw "Missing the required parameter 'templateRequest' when calling createTemplateContext"; + if (templateRequest === undefined || templateRequest === null) { + throw new Error("Missing the required parameter 'templateRequest' when calling createTemplateContext"); } @@ -165,8 +157,8 @@ var postBody = null; // verify the required parameter 'dataSetId' is set - if (dataSetId == undefined || dataSetId == null) { - throw "Missing the required parameter 'dataSetId' when calling deleteDataSet"; + if (dataSetId === undefined || dataSetId === null) { + throw new Error("Missing the required parameter 'dataSetId' when calling deleteDataSet"); } @@ -211,8 +203,8 @@ var postBody = null; // verify the required parameter 'jobId' is set - if (jobId == undefined || jobId == null) { - throw "Missing the required parameter 'jobId' when calling deleteJob"; + if (jobId === undefined || jobId === null) { + throw new Error("Missing the required parameter 'jobId' when calling deleteJob"); } @@ -257,8 +249,8 @@ var postBody = null; // verify the required parameter 'templateId' is set - if (templateId == undefined || templateId == null) { - throw "Missing the required parameter 'templateId' when calling deleteTemplateContext"; + if (templateId === undefined || templateId === null) { + throw new Error("Missing the required parameter 'templateId' when calling deleteTemplateContext"); } @@ -303,8 +295,8 @@ var postBody = null; // verify the required parameter 'jobId' is set - if (jobId == undefined || jobId == null) { - throw "Missing the required parameter 'jobId' when calling getJob"; + if (jobId === undefined || jobId === null) { + throw new Error("Missing the required parameter 'jobId' when calling getJob"); } @@ -374,10 +366,10 @@ } /** - * Callback function to receive the result of the getResultStreamById operation. - * @callback module:SphereonTemplateProcessor/api/AllApi~getResultStreamByIdCallback + * Callback function to receive the result of the getResultStream operation. + * @callback module:SphereonTemplateProcessor/api/AllApi~getResultStreamCallback * @param {String} error Error message, if any. - * @param {'String'} data The data returned by the service call. + * @param {'Blob'} data The data returned by the service call. * @param {String} response The complete HTTP response. */ @@ -385,30 +377,26 @@ * Get the result file * Get a merge result document as a binary stream. * @param {String} jobId jobId - * @param {String} streamId streamId - * @param {Object} opts Optional parameters - * @param {module:SphereonTemplateProcessor/model/OutputSettings} opts.outputSettings outputSettings - * @param {module:SphereonTemplateProcessor/api/AllApi~getResultStreamByIdCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link 'String'} + * @param {module:SphereonTemplateProcessor/model/ResultStreamRequest} resultStreamRequest resultStreamRequest + * @param {module:SphereonTemplateProcessor/api/AllApi~getResultStreamCallback} callback The callback function, accepting three arguments: error, data, response + * data is of type: {@link 'Blob'} */ - this.getResultStreamById = function(jobId, streamId, opts, callback) { - opts = opts || {}; - var postBody = opts['outputSettings']; + this.getResultStream = function(jobId, resultStreamRequest, callback) { + var postBody = resultStreamRequest; // verify the required parameter 'jobId' is set - if (jobId == undefined || jobId == null) { - throw "Missing the required parameter 'jobId' when calling getResultStreamById"; + if (jobId === undefined || jobId === null) { + throw new Error("Missing the required parameter 'jobId' when calling getResultStream"); } - // verify the required parameter 'streamId' is set - if (streamId == undefined || streamId == null) { - throw "Missing the required parameter 'streamId' when calling getResultStreamById"; + // verify the required parameter 'resultStreamRequest' is set + if (resultStreamRequest === undefined || resultStreamRequest === null) { + throw new Error("Missing the required parameter 'resultStreamRequest' when calling getResultStream"); } var pathParams = { - 'jobId': jobId, - 'streamId': streamId + 'jobId': jobId }; var queryParams = { }; @@ -420,10 +408,10 @@ var authNames = ['oauth2schema']; var contentTypes = ['application/json;charset=UTF-8']; var accepts = ['application/octet-stream']; - var returnType = 'String'; + var returnType = 'Blob'; return this.apiClient.callApi( - '/template/processor/0.1/jobs/{jobId}/result/file/{streamId}', 'PUT', + '/template/processor/0.1/jobs/{jobId}/result/stream', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); @@ -433,7 +421,7 @@ * Callback function to receive the result of the getResultStreamsAsContainer operation. * @callback module:SphereonTemplateProcessor/api/AllApi~getResultStreamsAsContainerCallback * @param {String} error Error message, if any. - * @param {'String'} data The data returned by the service call. + * @param {'Blob'} data The data returned by the service call. * @param {String} response The complete HTTP response. */ @@ -444,15 +432,15 @@ * @param {Object} opts Optional parameters * @param {module:SphereonTemplateProcessor/model/OutputSettings} opts.outputSettings outputSettings * @param {module:SphereonTemplateProcessor/api/AllApi~getResultStreamsAsContainerCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link 'String'} + * data is of type: {@link 'Blob'} */ this.getResultStreamsAsContainer = function(jobId, opts, callback) { opts = opts || {}; var postBody = opts['outputSettings']; // verify the required parameter 'jobId' is set - if (jobId == undefined || jobId == null) { - throw "Missing the required parameter 'jobId' when calling getResultStreamsAsContainer"; + if (jobId === undefined || jobId === null) { + throw new Error("Missing the required parameter 'jobId' when calling getResultStreamsAsContainer"); } @@ -469,7 +457,7 @@ var authNames = ['oauth2schema']; var contentTypes = ['application/json;charset=UTF-8']; var accepts = ['application/octet-stream']; - var returnType = 'String'; + var returnType = 'Blob'; return this.apiClient.callApi( '/template/processor/0.1/jobs/{jobId}/result/container', 'PUT', @@ -497,8 +485,8 @@ var postBody = null; // verify the required parameter 'templateId' is set - if (templateId == undefined || templateId == null) { - throw "Missing the required parameter 'templateId' when calling getTemplateContext"; + if (templateId === undefined || templateId === null) { + throw new Error("Missing the required parameter 'templateId' when calling getTemplateContext"); } @@ -543,8 +531,8 @@ var postBody = mergesettings; // verify the required parameter 'mergesettings' is set - if (mergesettings == undefined || mergesettings == null) { - throw "Missing the required parameter 'mergesettings' when calling submitJob"; + if (mergesettings === undefined || mergesettings === null) { + throw new Error("Missing the required parameter 'mergesettings' when calling submitJob"); } @@ -588,8 +576,8 @@ var postBody = templateContext; // verify the required parameter 'templateContext' is set - if (templateContext == undefined || templateContext == null) { - throw "Missing the required parameter 'templateContext' when calling updateTemplateContext"; + if (templateContext === undefined || templateContext === null) { + throw new Error("Missing the required parameter 'templateContext' when calling updateTemplateContext"); } @@ -634,13 +622,13 @@ var postBody = null; // verify the required parameter 'templateId' is set - if (templateId == undefined || templateId == null) { - throw "Missing the required parameter 'templateId' when calling uploadTemplateFile"; + if (templateId === undefined || templateId === null) { + throw new Error("Missing the required parameter 'templateId' when calling uploadTemplateFile"); } // verify the required parameter 'stream' is set - if (stream == undefined || stream == null) { - throw "Missing the required parameter 'stream' when calling uploadTemplateFile"; + if (stream === undefined || stream === null) { + throw new Error("Missing the required parameter 'stream' when calling uploadTemplateFile"); } diff --git a/javascript/src/SphereonTemplateProcessor/api/DataSetApi.js b/javascript/src/SphereonTemplateProcessor/api/DataSetApi.js index 7650661..5158711 100644 --- a/javascript/src/SphereonTemplateProcessor/api/DataSetApi.js +++ b/javascript/src/SphereonTemplateProcessor/api/DataSetApi.js @@ -7,19 +7,11 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { @@ -75,8 +67,8 @@ var postBody = payload; // verify the required parameter 'payload' is set - if (payload == undefined || payload == null) { - throw "Missing the required parameter 'payload' when calling createDataSet"; + if (payload === undefined || payload === null) { + throw new Error("Missing the required parameter 'payload' when calling createDataSet"); } @@ -120,8 +112,8 @@ var postBody = null; // verify the required parameter 'dataSetId' is set - if (dataSetId == undefined || dataSetId == null) { - throw "Missing the required parameter 'dataSetId' when calling deleteDataSet"; + if (dataSetId === undefined || dataSetId === null) { + throw new Error("Missing the required parameter 'dataSetId' when calling deleteDataSet"); } diff --git a/javascript/src/SphereonTemplateProcessor/api/JobApi.js b/javascript/src/SphereonTemplateProcessor/api/JobApi.js index 81dffc3..3103199 100644 --- a/javascript/src/SphereonTemplateProcessor/api/JobApi.js +++ b/javascript/src/SphereonTemplateProcessor/api/JobApi.js @@ -7,36 +7,28 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. - define(['SphereonTemplateProcessor/ApiClient', 'SphereonTemplateProcessor/model/MergeJobResponse', 'SphereonTemplateProcessor/model/ErrorResponse', 'SphereonTemplateProcessor/model/OutputSettings', 'SphereonTemplateProcessor/model/MergeSettings'], factory); + define(['SphereonTemplateProcessor/ApiClient', 'SphereonTemplateProcessor/model/ErrorResponse', 'SphereonTemplateProcessor/model/MergeJobResponse', 'SphereonTemplateProcessor/model/MergeSettings', 'SphereonTemplateProcessor/model/OutputSettings', 'SphereonTemplateProcessor/model/ResultStreamRequest'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('../ApiClient'), require('../model/MergeJobResponse'), require('../model/ErrorResponse'), require('../model/OutputSettings'), require('../model/MergeSettings')); + module.exports = factory(require('../ApiClient'), require('../model/ErrorResponse'), require('../model/MergeJobResponse'), require('../model/MergeSettings'), require('../model/OutputSettings'), require('../model/ResultStreamRequest')); } else { // Browser globals (root is window) if (!root.TemplateProcessor) { root.TemplateProcessor = {}; } - root.TemplateProcessor.JobApi = factory(root.TemplateProcessor.ApiClient, root.TemplateProcessor.MergeJobResponse, root.TemplateProcessor.ErrorResponse, root.TemplateProcessor.OutputSettings, root.TemplateProcessor.MergeSettings); + root.TemplateProcessor.JobApi = factory(root.TemplateProcessor.ApiClient, root.TemplateProcessor.ErrorResponse, root.TemplateProcessor.MergeJobResponse, root.TemplateProcessor.MergeSettings, root.TemplateProcessor.OutputSettings, root.TemplateProcessor.ResultStreamRequest); } -}(this, function(ApiClient, MergeJobResponse, ErrorResponse, OutputSettings, MergeSettings) { +}(this, function(ApiClient, ErrorResponse, MergeJobResponse, MergeSettings, OutputSettings, ResultStreamRequest) { 'use strict'; /** @@ -75,8 +67,8 @@ var postBody = null; // verify the required parameter 'jobId' is set - if (jobId == undefined || jobId == null) { - throw "Missing the required parameter 'jobId' when calling getJob"; + if (jobId === undefined || jobId === null) { + throw new Error("Missing the required parameter 'jobId' when calling getJob"); } @@ -146,10 +138,10 @@ } /** - * Callback function to receive the result of the getResultStreamById operation. - * @callback module:SphereonTemplateProcessor/api/JobApi~getResultStreamByIdCallback + * Callback function to receive the result of the getResultStream operation. + * @callback module:SphereonTemplateProcessor/api/JobApi~getResultStreamCallback * @param {String} error Error message, if any. - * @param {'String'} data The data returned by the service call. + * @param {'Blob'} data The data returned by the service call. * @param {String} response The complete HTTP response. */ @@ -157,30 +149,26 @@ * Get the result file * Get a merge result document as a binary stream. * @param {String} jobId jobId - * @param {String} streamId streamId - * @param {Object} opts Optional parameters - * @param {module:SphereonTemplateProcessor/model/OutputSettings} opts.outputSettings outputSettings - * @param {module:SphereonTemplateProcessor/api/JobApi~getResultStreamByIdCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link 'String'} + * @param {module:SphereonTemplateProcessor/model/ResultStreamRequest} resultStreamRequest resultStreamRequest + * @param {module:SphereonTemplateProcessor/api/JobApi~getResultStreamCallback} callback The callback function, accepting three arguments: error, data, response + * data is of type: {@link 'Blob'} */ - this.getResultStreamById = function(jobId, streamId, opts, callback) { - opts = opts || {}; - var postBody = opts['outputSettings']; + this.getResultStream = function(jobId, resultStreamRequest, callback) { + var postBody = resultStreamRequest; // verify the required parameter 'jobId' is set - if (jobId == undefined || jobId == null) { - throw "Missing the required parameter 'jobId' when calling getResultStreamById"; + if (jobId === undefined || jobId === null) { + throw new Error("Missing the required parameter 'jobId' when calling getResultStream"); } - // verify the required parameter 'streamId' is set - if (streamId == undefined || streamId == null) { - throw "Missing the required parameter 'streamId' when calling getResultStreamById"; + // verify the required parameter 'resultStreamRequest' is set + if (resultStreamRequest === undefined || resultStreamRequest === null) { + throw new Error("Missing the required parameter 'resultStreamRequest' when calling getResultStream"); } var pathParams = { - 'jobId': jobId, - 'streamId': streamId + 'jobId': jobId }; var queryParams = { }; @@ -192,10 +180,10 @@ var authNames = ['oauth2schema']; var contentTypes = ['application/json;charset=UTF-8']; var accepts = ['application/octet-stream']; - var returnType = 'String'; + var returnType = 'Blob'; return this.apiClient.callApi( - '/template/processor/0.1/jobs/{jobId}/result/file/{streamId}', 'PUT', + '/template/processor/0.1/jobs/{jobId}/result/stream', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); @@ -205,7 +193,7 @@ * Callback function to receive the result of the getResultStreamsAsContainer operation. * @callback module:SphereonTemplateProcessor/api/JobApi~getResultStreamsAsContainerCallback * @param {String} error Error message, if any. - * @param {'String'} data The data returned by the service call. + * @param {'Blob'} data The data returned by the service call. * @param {String} response The complete HTTP response. */ @@ -216,15 +204,15 @@ * @param {Object} opts Optional parameters * @param {module:SphereonTemplateProcessor/model/OutputSettings} opts.outputSettings outputSettings * @param {module:SphereonTemplateProcessor/api/JobApi~getResultStreamsAsContainerCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link 'String'} + * data is of type: {@link 'Blob'} */ this.getResultStreamsAsContainer = function(jobId, opts, callback) { opts = opts || {}; var postBody = opts['outputSettings']; // verify the required parameter 'jobId' is set - if (jobId == undefined || jobId == null) { - throw "Missing the required parameter 'jobId' when calling getResultStreamsAsContainer"; + if (jobId === undefined || jobId === null) { + throw new Error("Missing the required parameter 'jobId' when calling getResultStreamsAsContainer"); } @@ -241,7 +229,7 @@ var authNames = ['oauth2schema']; var contentTypes = ['application/json;charset=UTF-8']; var accepts = ['application/octet-stream']; - var returnType = 'String'; + var returnType = 'Blob'; return this.apiClient.callApi( '/template/processor/0.1/jobs/{jobId}/result/container', 'PUT', @@ -269,8 +257,8 @@ var postBody = mergesettings; // verify the required parameter 'mergesettings' is set - if (mergesettings == undefined || mergesettings == null) { - throw "Missing the required parameter 'mergesettings' when calling submitJob"; + if (mergesettings === undefined || mergesettings === null) { + throw new Error("Missing the required parameter 'mergesettings' when calling submitJob"); } diff --git a/javascript/src/SphereonTemplateProcessor/api/MergeApi.js b/javascript/src/SphereonTemplateProcessor/api/MergeApi.js deleted file mode 100644 index 0c325b6..0000000 --- a/javascript/src/SphereonTemplateProcessor/api/MergeApi.js +++ /dev/null @@ -1,672 +0,0 @@ -/** - * OfficeTextMerge - * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module. - define(['SphereonTemplateProcessor/ApiClient', 'SphereonTemplateProcessor/model/DataSetResponse', 'SphereonTemplateProcessor/model/ErrorResponse', 'SphereonTemplateProcessor/model/TemplateContextResponse', 'SphereonTemplateProcessor/model/TemplateContextRequest', 'SphereonTemplateProcessor/model/MergeJobResponse', 'SphereonTemplateProcessor/model/OutputSettings', 'SphereonTemplateProcessor/model/MergeSettings'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('../ApiClient'), require('../model/DataSetResponse'), require('../model/ErrorResponse'), require('../model/TemplateContextResponse'), require('../model/TemplateContextRequest'), require('../model/MergeJobResponse'), require('../model/OutputSettings'), require('../model/MergeSettings')); - } else { - // Browser globals (root is window) - if (!root.OfficeTextMerge) { - root.OfficeTextMerge = {}; - } - root.OfficeTextMerge.MergeApi = factory(root.OfficeTextMerge.ApiClient, root.OfficeTextMerge.DataSetResponse, root.OfficeTextMerge.ErrorResponse, root.OfficeTextMerge.TemplateContextResponse, root.OfficeTextMerge.TemplateContextRequest, root.OfficeTextMerge.MergeJobResponse, root.OfficeTextMerge.OutputSettings, root.OfficeTextMerge.MergeSettings); - } -}(this, function(ApiClient, DataSetResponse, ErrorResponse, TemplateContextResponse, TemplateContextRequest, MergeJobResponse, OutputSettings, MergeSettings) { - 'use strict'; - - /** - * Merge service. - * @module SphereonTemplateProcessor/api/MergeApi - * @version 0.1 - */ - - /** - * Constructs a new MergeApi. - * @alias module:SphereonTemplateProcessor/api/MergeApi - * @class - * @param {module:SphereonTemplateProcessor/ApiClient} apiClient Optional API client implementation to use, - * default to {@link module:SphereonTemplateProcessor/ApiClient#instance} if unspecified. - */ - var exports = function(apiClient) { - this.apiClient = apiClient || ApiClient.instance; - - - /** - * Callback function to receive the result of the createDataSet operation. - * @callback module:SphereonTemplateProcessor/api/MergeApi~createDataSetCallback - * @param {String} error Error message, if any. - * @param {module:SphereonTemplateProcessor/model/DataSetResponse} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Store dataset - * Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - * @param {String} payload The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - * @param {module:SphereonTemplateProcessor/api/MergeApi~createDataSetCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:SphereonTemplateProcessor/model/DataSetResponse} - */ - this.createDataSet = function(payload, callback) { - var postBody = payload; - - // verify the required parameter 'payload' is set - if (payload == undefined || payload == null) { - throw "Missing the required parameter 'payload' when calling createDataSet"; - } - - - var pathParams = { - }; - var queryParams = { - }; - var headerParams = { - }; - var formParams = { - }; - - var authNames = ['oauth2schema']; - var contentTypes = ['application/json;charset=UTF-8']; - var accepts = ['application/json;charset=UTF-8']; - var returnType = DataSetResponse; - - return this.apiClient.callApi( - '/template-processor/merge/0.1/datasets', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - - /** - * Callback function to receive the result of the createTemplateContext operation. - * @callback module:SphereonTemplateProcessor/api/MergeApi~createTemplateContextCallback - * @param {String} error Error message, if any. - * @param {module:SphereonTemplateProcessor/model/TemplateContextResponse} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Create template context - * Create a unique template context for your environment - * @param {module:SphereonTemplateProcessor/model/TemplateContextRequest} templateRequest The template request - * @param {module:SphereonTemplateProcessor/api/MergeApi~createTemplateContextCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:SphereonTemplateProcessor/model/TemplateContextResponse} - */ - this.createTemplateContext = function(templateRequest, callback) { - var postBody = templateRequest; - - // verify the required parameter 'templateRequest' is set - if (templateRequest == undefined || templateRequest == null) { - throw "Missing the required parameter 'templateRequest' when calling createTemplateContext"; - } - - - var pathParams = { - }; - var queryParams = { - }; - var headerParams = { - }; - var formParams = { - }; - - var authNames = ['oauth2schema']; - var contentTypes = ['application/json;charset=UTF-8']; - var accepts = ['application/json;charset=UTF-8']; - var returnType = TemplateContextResponse; - - return this.apiClient.callApi( - '/template-processor/merge/0.1/templates', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - - /** - * Callback function to receive the result of the deleteDataSet operation. - * @callback module:SphereonTemplateProcessor/api/MergeApi~deleteDataSetCallback - * @param {String} error Error message, if any. - * @param {module:SphereonTemplateProcessor/model/DataSetResponse} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Delete a stored data set - * Delete a stored data set - * @param {String} dataSetId dataSetId - * @param {module:SphereonTemplateProcessor/api/MergeApi~deleteDataSetCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:SphereonTemplateProcessor/model/DataSetResponse} - */ - this.deleteDataSet = function(dataSetId, callback) { - var postBody = null; - - // verify the required parameter 'dataSetId' is set - if (dataSetId == undefined || dataSetId == null) { - throw "Missing the required parameter 'dataSetId' when calling deleteDataSet"; - } - - - var pathParams = { - 'dataSetId': dataSetId - }; - var queryParams = { - }; - var headerParams = { - }; - var formParams = { - }; - - var authNames = ['oauth2schema']; - var contentTypes = ['application/json']; - var accepts = ['application/json;charset=UTF-8']; - var returnType = DataSetResponse; - - return this.apiClient.callApi( - '/template-processor/merge/0.1/datasets/{dataSetId}', 'DELETE', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - - /** - * Callback function to receive the result of the deleteJob operation. - * @callback module:SphereonTemplateProcessor/api/MergeApi~deleteJobCallback - * @param {String} error Error message, if any. - * @param {module:SphereonTemplateProcessor/model/MergeJobResponse} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Delete a job manually - * Delete the merge job and all related files - * @param {String} jobId jobId - * @param {module:SphereonTemplateProcessor/api/MergeApi~deleteJobCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:SphereonTemplateProcessor/model/MergeJobResponse} - */ - this.deleteJob = function(jobId, callback) { - var postBody = null; - - // verify the required parameter 'jobId' is set - if (jobId == undefined || jobId == null) { - throw "Missing the required parameter 'jobId' when calling deleteJob"; - } - - - var pathParams = { - 'jobId': jobId - }; - var queryParams = { - }; - var headerParams = { - }; - var formParams = { - }; - - var authNames = ['oauth2schema']; - var contentTypes = ['application/json']; - var accepts = ['application/json;charset=UTF-8']; - var returnType = MergeJobResponse; - - return this.apiClient.callApi( - '/template-processor/merge/0.1/jobs/{jobId}', 'DELETE', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - - /** - * Callback function to receive the result of the deleteTemplateContext operation. - * @callback module:SphereonTemplateProcessor/api/MergeApi~deleteTemplateContextCallback - * @param {String} error Error message, if any. - * @param {module:SphereonTemplateProcessor/model/TemplateContextResponse} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Delete template context - * Delete a template context with all history - * @param {String} templateId templateId - * @param {module:SphereonTemplateProcessor/api/MergeApi~deleteTemplateContextCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:SphereonTemplateProcessor/model/TemplateContextResponse} - */ - this.deleteTemplateContext = function(templateId, callback) { - var postBody = null; - - // verify the required parameter 'templateId' is set - if (templateId == undefined || templateId == null) { - throw "Missing the required parameter 'templateId' when calling deleteTemplateContext"; - } - - - var pathParams = { - 'templateId': templateId - }; - var queryParams = { - }; - var headerParams = { - }; - var formParams = { - }; - - var authNames = ['oauth2schema']; - var contentTypes = ['application/json']; - var accepts = ['application/json;charset=UTF-8']; - var returnType = TemplateContextResponse; - - return this.apiClient.callApi( - '/template-processor/merge/0.1/templates/{templateId}', 'DELETE', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - - /** - * Callback function to receive the result of the getJob operation. - * @callback module:SphereonTemplateProcessor/api/MergeApi~getJobCallback - * @param {String} error Error message, if any. - * @param {module:SphereonTemplateProcessor/model/MergeJobResponse} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Job definition and state - * Get the merge job definition and current state. Please not that you can differentiate based on http response status - * @param {String} jobId jobId - * @param {module:SphereonTemplateProcessor/api/MergeApi~getJobCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:SphereonTemplateProcessor/model/MergeJobResponse} - */ - this.getJob = function(jobId, callback) { - var postBody = null; - - // verify the required parameter 'jobId' is set - if (jobId == undefined || jobId == null) { - throw "Missing the required parameter 'jobId' when calling getJob"; - } - - - var pathParams = { - 'jobId': jobId - }; - var queryParams = { - }; - var headerParams = { - }; - var formParams = { - }; - - var authNames = ['oauth2schema']; - var contentTypes = ['application/json']; - var accepts = ['application/json;charset=UTF-8']; - var returnType = MergeJobResponse; - - return this.apiClient.callApi( - '/template-processor/merge/0.1/jobs/{jobId}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - - /** - * Callback function to receive the result of the getJobs operation. - * @callback module:SphereonTemplateProcessor/api/MergeApi~getJobsCallback - * @param {String} error Error message, if any. - * @param {Array.} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Get all jobs - * Get all office text job definitions and their current state. - * @param {Object} opts Optional parameters - * @param {Array.} opts.status A list of status to filter on. - * @param {module:SphereonTemplateProcessor/api/MergeApi~getJobsCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link Array.} - */ - this.getJobs = function(opts, callback) { - opts = opts || {}; - var postBody = null; - - - var pathParams = { - }; - var queryParams = { - 'status': this.apiClient.buildCollectionParam(opts['status'], 'multi') - }; - var headerParams = { - }; - var formParams = { - }; - - var authNames = ['oauth2schema']; - var contentTypes = ['application/json']; - var accepts = ['application/json;charset=UTF-8']; - var returnType = [MergeJobResponse]; - - return this.apiClient.callApi( - '/template-processor/merge/0.1/jobs', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - - /** - * Callback function to receive the result of the getResultStreamById operation. - * @callback module:SphereonTemplateProcessor/api/MergeApi~getResultStreamByIdCallback - * @param {String} error Error message, if any. - * @param {'String'} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Get the result file - * Get a merge result document as a binary stream. - * @param {String} jobId jobId - * @param {String} streamId streamId - * @param {Object} opts Optional parameters - * @param {module:SphereonTemplateProcessor/model/OutputSettings} opts.outputSettings outputSettings - * @param {module:SphereonTemplateProcessor/api/MergeApi~getResultStreamByIdCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link 'String'} - */ - this.getResultStreamById = function(jobId, streamId, opts, callback) { - opts = opts || {}; - var postBody = opts['outputSettings']; - - // verify the required parameter 'jobId' is set - if (jobId == undefined || jobId == null) { - throw "Missing the required parameter 'jobId' when calling getResultStreamById"; - } - - // verify the required parameter 'streamId' is set - if (streamId == undefined || streamId == null) { - throw "Missing the required parameter 'streamId' when calling getResultStreamById"; - } - - - var pathParams = { - 'jobId': jobId, - 'streamId': streamId - }; - var queryParams = { - }; - var headerParams = { - }; - var formParams = { - }; - - var authNames = ['oauth2schema']; - var contentTypes = ['application/json;charset=UTF-8']; - var accepts = ['application/octet-stream']; - var returnType = 'String'; - - return this.apiClient.callApi( - '/template-processor/merge/0.1/jobs/{jobId}/result/file/{streamId}', 'PUT', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - - /** - * Callback function to receive the result of the getResultStreamsAsContainer operation. - * @callback module:SphereonTemplateProcessor/api/MergeApi~getResultStreamsAsContainerCallback - * @param {String} error Error message, if any. - * @param {'String'} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Get the result file - * Get all documents inside a compressed container as a binary stream. - * @param {String} jobId jobId - * @param {Object} opts Optional parameters - * @param {module:SphereonTemplateProcessor/model/OutputSettings} opts.outputSettings outputSettings - * @param {module:SphereonTemplateProcessor/api/MergeApi~getResultStreamsAsContainerCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link 'String'} - */ - this.getResultStreamsAsContainer = function(jobId, opts, callback) { - opts = opts || {}; - var postBody = opts['outputSettings']; - - // verify the required parameter 'jobId' is set - if (jobId == undefined || jobId == null) { - throw "Missing the required parameter 'jobId' when calling getResultStreamsAsContainer"; - } - - - var pathParams = { - 'jobId': jobId - }; - var queryParams = { - }; - var headerParams = { - }; - var formParams = { - }; - - var authNames = ['oauth2schema']; - var contentTypes = ['application/json;charset=UTF-8']; - var accepts = ['application/octet-stream']; - var returnType = 'String'; - - return this.apiClient.callApi( - '/template-processor/merge/0.1/jobs/{jobId}/result/container', 'PUT', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - - /** - * Callback function to receive the result of the getTemplateContext operation. - * @callback module:SphereonTemplateProcessor/api/MergeApi~getTemplateContextCallback - * @param {String} error Error message, if any. - * @param {module:SphereonTemplateProcessor/model/TemplateContextResponse} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Get template context - * Get an existing template context - * @param {String} templateId The template context name unique for your environment - * @param {module:SphereonTemplateProcessor/api/MergeApi~getTemplateContextCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:SphereonTemplateProcessor/model/TemplateContextResponse} - */ - this.getTemplateContext = function(templateId, callback) { - var postBody = null; - - // verify the required parameter 'templateId' is set - if (templateId == undefined || templateId == null) { - throw "Missing the required parameter 'templateId' when calling getTemplateContext"; - } - - - var pathParams = { - 'templateId': templateId - }; - var queryParams = { - }; - var headerParams = { - }; - var formParams = { - }; - - var authNames = ['oauth2schema']; - var contentTypes = ['application/json']; - var accepts = ['application/json;charset=UTF-8']; - var returnType = TemplateContextResponse; - - return this.apiClient.callApi( - '/template-processor/merge/0.1/templates/{templateId}', 'GET', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - - /** - * Callback function to receive the result of the submitJob operation. - * @callback module:SphereonTemplateProcessor/api/MergeApi~submitJobCallback - * @param {String} error Error message, if any. - * @param {module:SphereonTemplateProcessor/model/MergeJobResponse} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Submit merge job for processing - * Submit merge job run. - * @param {module:SphereonTemplateProcessor/model/MergeSettings} mergesettings The merge- and output settings - * @param {module:SphereonTemplateProcessor/api/MergeApi~submitJobCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:SphereonTemplateProcessor/model/MergeJobResponse} - */ - this.submitJob = function(mergesettings, callback) { - var postBody = mergesettings; - - // verify the required parameter 'mergesettings' is set - if (mergesettings == undefined || mergesettings == null) { - throw "Missing the required parameter 'mergesettings' when calling submitJob"; - } - - - var pathParams = { - }; - var queryParams = { - }; - var headerParams = { - }; - var formParams = { - }; - - var authNames = ['oauth2schema']; - var contentTypes = ['application/json;charset=UTF-8']; - var accepts = ['application/json;charset=UTF-8']; - var returnType = MergeJobResponse; - - return this.apiClient.callApi( - '/template-processor/merge/0.1/jobs', 'PUT', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - - /** - * Callback function to receive the result of the updateTemplateContext operation. - * @callback module:SphereonTemplateProcessor/api/MergeApi~updateTemplateContextCallback - * @param {String} error Error message, if any. - * @param {module:SphereonTemplateProcessor/model/TemplateContextResponse} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Update template context - * Update an existing template context for your environment - * @param {module:SphereonTemplateProcessor/model/TemplateContextRequest} templateContextRequest templateContextRequest - * @param {module:SphereonTemplateProcessor/api/MergeApi~updateTemplateContextCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:SphereonTemplateProcessor/model/TemplateContextResponse} - */ - this.updateTemplateContext = function(templateContextRequest, callback) { - var postBody = templateContextRequest; - - // verify the required parameter 'templateContextRequest' is set - if (templateContextRequest == undefined || templateContextRequest == null) { - throw "Missing the required parameter 'templateContextRequest' when calling updateTemplateContext"; - } - - - var pathParams = { - }; - var queryParams = { - }; - var headerParams = { - }; - var formParams = { - }; - - var authNames = ['oauth2schema']; - var contentTypes = ['application/json;charset=UTF-8']; - var accepts = ['application/json;charset=UTF-8']; - var returnType = TemplateContextResponse; - - return this.apiClient.callApi( - '/template-processor/merge/0.1/templates', 'PUT', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - - /** - * Callback function to receive the result of the uploadTemplateFile operation. - * @callback module:SphereonTemplateProcessor/api/MergeApi~uploadTemplateFileCallback - * @param {String} error Error message, if any. - * @param {module:SphereonTemplateProcessor/model/TemplateContextResponse} data The data returned by the service call. - * @param {String} response The complete HTTP response. - */ - - /** - * Upload template file - * Upload the Office template file - * @param {String} templateId The template context name unique for your environment - * @param {File} stream The template (file/inputstream) to store - * @param {module:SphereonTemplateProcessor/api/MergeApi~uploadTemplateFileCallback} callback The callback function, accepting three arguments: error, data, response - * data is of type: {@link module:SphereonTemplateProcessor/model/TemplateContextResponse} - */ - this.uploadTemplateFile = function(templateId, stream, callback) { - var postBody = null; - - // verify the required parameter 'templateId' is set - if (templateId == undefined || templateId == null) { - throw "Missing the required parameter 'templateId' when calling uploadTemplateFile"; - } - - // verify the required parameter 'stream' is set - if (stream == undefined || stream == null) { - throw "Missing the required parameter 'stream' when calling uploadTemplateFile"; - } - - - var pathParams = { - 'templateId': templateId - }; - var queryParams = { - }; - var headerParams = { - }; - var formParams = { - 'stream': stream - }; - - var authNames = ['oauth2schema']; - var contentTypes = ['multipart/form-data']; - var accepts = ['application/json;charset=UTF-8']; - var returnType = TemplateContextResponse; - - return this.apiClient.callApi( - '/template-processor/merge/0.1/templates/{templateId}', 'POST', - pathParams, queryParams, headerParams, formParams, postBody, - authNames, contentTypes, accepts, returnType, callback - ); - } - }; - - return exports; -})); diff --git a/javascript/src/SphereonTemplateProcessor/api/TemplateApi.js b/javascript/src/SphereonTemplateProcessor/api/TemplateApi.js index 0d9ea80..1d96dd3 100644 --- a/javascript/src/SphereonTemplateProcessor/api/TemplateApi.js +++ b/javascript/src/SphereonTemplateProcessor/api/TemplateApi.js @@ -7,36 +7,28 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. - define(['SphereonTemplateProcessor/ApiClient', 'SphereonTemplateProcessor/model/TemplateContextResponse', 'SphereonTemplateProcessor/model/TemplateContextRequest', 'SphereonTemplateProcessor/model/ErrorResponse', 'SphereonTemplateProcessor/model/TemplateContext'], factory); + define(['SphereonTemplateProcessor/ApiClient', 'SphereonTemplateProcessor/model/ErrorResponse', 'SphereonTemplateProcessor/model/TemplateContext', 'SphereonTemplateProcessor/model/TemplateContextRequest', 'SphereonTemplateProcessor/model/TemplateContextResponse'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('../ApiClient'), require('../model/TemplateContextResponse'), require('../model/TemplateContextRequest'), require('../model/ErrorResponse'), require('../model/TemplateContext')); + module.exports = factory(require('../ApiClient'), require('../model/ErrorResponse'), require('../model/TemplateContext'), require('../model/TemplateContextRequest'), require('../model/TemplateContextResponse')); } else { // Browser globals (root is window) if (!root.TemplateProcessor) { root.TemplateProcessor = {}; } - root.TemplateProcessor.TemplateApi = factory(root.TemplateProcessor.ApiClient, root.TemplateProcessor.TemplateContextResponse, root.TemplateProcessor.TemplateContextRequest, root.TemplateProcessor.ErrorResponse, root.TemplateProcessor.TemplateContext); + root.TemplateProcessor.TemplateApi = factory(root.TemplateProcessor.ApiClient, root.TemplateProcessor.ErrorResponse, root.TemplateProcessor.TemplateContext, root.TemplateProcessor.TemplateContextRequest, root.TemplateProcessor.TemplateContextResponse); } -}(this, function(ApiClient, TemplateContextResponse, TemplateContextRequest, ErrorResponse, TemplateContext) { +}(this, function(ApiClient, ErrorResponse, TemplateContext, TemplateContextRequest, TemplateContextResponse) { 'use strict'; /** @@ -75,8 +67,8 @@ var postBody = templateRequest; // verify the required parameter 'templateRequest' is set - if (templateRequest == undefined || templateRequest == null) { - throw "Missing the required parameter 'templateRequest' when calling createTemplateContext"; + if (templateRequest === undefined || templateRequest === null) { + throw new Error("Missing the required parameter 'templateRequest' when calling createTemplateContext"); } @@ -120,8 +112,8 @@ var postBody = null; // verify the required parameter 'templateId' is set - if (templateId == undefined || templateId == null) { - throw "Missing the required parameter 'templateId' when calling deleteTemplateContext"; + if (templateId === undefined || templateId === null) { + throw new Error("Missing the required parameter 'templateId' when calling deleteTemplateContext"); } @@ -166,8 +158,8 @@ var postBody = null; // verify the required parameter 'templateId' is set - if (templateId == undefined || templateId == null) { - throw "Missing the required parameter 'templateId' when calling getTemplateContext"; + if (templateId === undefined || templateId === null) { + throw new Error("Missing the required parameter 'templateId' when calling getTemplateContext"); } @@ -212,8 +204,8 @@ var postBody = templateContext; // verify the required parameter 'templateContext' is set - if (templateContext == undefined || templateContext == null) { - throw "Missing the required parameter 'templateContext' when calling updateTemplateContext"; + if (templateContext === undefined || templateContext === null) { + throw new Error("Missing the required parameter 'templateContext' when calling updateTemplateContext"); } @@ -258,13 +250,13 @@ var postBody = null; // verify the required parameter 'templateId' is set - if (templateId == undefined || templateId == null) { - throw "Missing the required parameter 'templateId' when calling uploadTemplateFile"; + if (templateId === undefined || templateId === null) { + throw new Error("Missing the required parameter 'templateId' when calling uploadTemplateFile"); } // verify the required parameter 'stream' is set - if (stream == undefined || stream == null) { - throw "Missing the required parameter 'stream' when calling uploadTemplateFile"; + if (stream === undefined || stream === null) { + throw new Error("Missing the required parameter 'stream' when calling uploadTemplateFile"); } diff --git a/javascript/src/SphereonTemplateProcessor/model/DataSetResponse.js b/javascript/src/SphereonTemplateProcessor/model/DataSetResponse.js index 6ef99ac..254335a 100644 --- a/javascript/src/SphereonTemplateProcessor/model/DataSetResponse.js +++ b/javascript/src/SphereonTemplateProcessor/model/DataSetResponse.js @@ -7,19 +7,11 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { diff --git a/javascript/src/SphereonTemplateProcessor/model/Error.js b/javascript/src/SphereonTemplateProcessor/model/Error.js index 8573516..a70cbf1 100644 --- a/javascript/src/SphereonTemplateProcessor/model/Error.js +++ b/javascript/src/SphereonTemplateProcessor/model/Error.js @@ -7,19 +7,11 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { diff --git a/javascript/src/SphereonTemplateProcessor/model/ErrorResponse.js b/javascript/src/SphereonTemplateProcessor/model/ErrorResponse.js index 807c204..41b10c4 100644 --- a/javascript/src/SphereonTemplateProcessor/model/ErrorResponse.js +++ b/javascript/src/SphereonTemplateProcessor/model/ErrorResponse.js @@ -7,19 +7,11 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { diff --git a/javascript/src/SphereonTemplateProcessor/model/Lifecycle.js b/javascript/src/SphereonTemplateProcessor/model/Lifecycle.js index c7ec7d7..e52598b 100644 --- a/javascript/src/SphereonTemplateProcessor/model/Lifecycle.js +++ b/javascript/src/SphereonTemplateProcessor/model/Lifecycle.js @@ -7,19 +7,11 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { diff --git a/javascript/src/SphereonTemplateProcessor/model/MergeJob.js b/javascript/src/SphereonTemplateProcessor/model/MergeJob.js index db2d070..f499770 100644 --- a/javascript/src/SphereonTemplateProcessor/model/MergeJob.js +++ b/javascript/src/SphereonTemplateProcessor/model/MergeJob.js @@ -7,19 +7,11 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { diff --git a/javascript/src/SphereonTemplateProcessor/model/MergeJobResponse.js b/javascript/src/SphereonTemplateProcessor/model/MergeJobResponse.js index efa8002..d95a63a 100644 --- a/javascript/src/SphereonTemplateProcessor/model/MergeJobResponse.js +++ b/javascript/src/SphereonTemplateProcessor/model/MergeJobResponse.js @@ -7,19 +7,11 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { diff --git a/javascript/src/SphereonTemplateProcessor/model/MergeSettings.js b/javascript/src/SphereonTemplateProcessor/model/MergeSettings.js index a6461da..e11db69 100644 --- a/javascript/src/SphereonTemplateProcessor/model/MergeSettings.js +++ b/javascript/src/SphereonTemplateProcessor/model/MergeSettings.js @@ -7,19 +7,11 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { @@ -102,7 +94,7 @@ obj['resultStorageLocation'] = StorageLocation.constructFromObject(data['resultStorageLocation']); } if (data.hasOwnProperty('templateVersion')) { - obj['templateVersion'] = ApiClient.convertToType(data['templateVersion'], 'Integer'); + obj['templateVersion'] = ApiClient.convertToType(data['templateVersion'], 'Number'); } if (data.hasOwnProperty('templateId')) { obj['templateId'] = ApiClient.convertToType(data['templateId'], 'String'); @@ -143,7 +135,7 @@ exports.prototype['resultStorageLocation'] = undefined; /** * Template version - * @member {Integer} templateVersion + * @member {Number} templateVersion */ exports.prototype['templateVersion'] = undefined; /** diff --git a/javascript/src/SphereonTemplateProcessor/model/OutputSettings.js b/javascript/src/SphereonTemplateProcessor/model/OutputSettings.js index 757b79e..c7bc5c6 100644 --- a/javascript/src/SphereonTemplateProcessor/model/OutputSettings.js +++ b/javascript/src/SphereonTemplateProcessor/model/OutputSettings.js @@ -7,19 +7,11 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { diff --git a/javascript/src/SphereonTemplateProcessor/model/OwnerInfo.js b/javascript/src/SphereonTemplateProcessor/model/OwnerInfo.js index fb5d33c..baaf841 100644 --- a/javascript/src/SphereonTemplateProcessor/model/OwnerInfo.js +++ b/javascript/src/SphereonTemplateProcessor/model/OwnerInfo.js @@ -7,19 +7,11 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { diff --git a/javascript/src/SphereonTemplateProcessor/model/ResultStreamRequest.js b/javascript/src/SphereonTemplateProcessor/model/ResultStreamRequest.js new file mode 100644 index 0000000..48fb5c9 --- /dev/null +++ b/javascript/src/SphereonTemplateProcessor/model/ResultStreamRequest.js @@ -0,0 +1,94 @@ +/** + * Template-Processor + * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.2.3 + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['SphereonTemplateProcessor/ApiClient', 'SphereonTemplateProcessor/model/OutputSettings', 'SphereonTemplateProcessor/model/StreamLocation'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('./OutputSettings'), require('./StreamLocation')); + } else { + // Browser globals (root is window) + if (!root.TemplateProcessor) { + root.TemplateProcessor = {}; + } + root.TemplateProcessor.ResultStreamRequest = factory(root.TemplateProcessor.ApiClient, root.TemplateProcessor.OutputSettings, root.TemplateProcessor.StreamLocation); + } +}(this, function(ApiClient, OutputSettings, StreamLocation) { + 'use strict'; + + + + + /** + * The ResultStreamRequest model module. + * @module SphereonTemplateProcessor/model/ResultStreamRequest + * @version 0.1 + */ + + /** + * Constructs a new ResultStreamRequest. + * A request to download a specific result stream. + * @alias module:SphereonTemplateProcessor/model/ResultStreamRequest + * @class + * @param streamLocation {module:SphereonTemplateProcessor/model/StreamLocation} The stream location + */ + var exports = function(streamLocation) { + var _this = this; + + _this['streamLocation'] = streamLocation; + + }; + + /** + * Constructs a ResultStreamRequest from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:SphereonTemplateProcessor/model/ResultStreamRequest} obj Optional instance to populate. + * @return {module:SphereonTemplateProcessor/model/ResultStreamRequest} The populated ResultStreamRequest instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + + if (data.hasOwnProperty('streamLocation')) { + obj['streamLocation'] = StreamLocation.constructFromObject(data['streamLocation']); + } + if (data.hasOwnProperty('outputSettings')) { + obj['outputSettings'] = OutputSettings.constructFromObject(data['outputSettings']); + } + } + return obj; + } + + /** + * The stream location + * @member {module:SphereonTemplateProcessor/model/StreamLocation} streamLocation + */ + exports.prototype['streamLocation'] = undefined; + /** + * The Output settings + * @member {module:SphereonTemplateProcessor/model/OutputSettings} outputSettings + */ + exports.prototype['outputSettings'] = undefined; + + + + return exports; +})); + + diff --git a/javascript/src/SphereonTemplateProcessor/model/StorageLocation.js b/javascript/src/SphereonTemplateProcessor/model/StorageLocation.js index bf652bf..be1548f 100644 --- a/javascript/src/SphereonTemplateProcessor/model/StorageLocation.js +++ b/javascript/src/SphereonTemplateProcessor/model/StorageLocation.js @@ -7,19 +7,11 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { diff --git a/javascript/src/SphereonTemplateProcessor/model/StreamLocation.js b/javascript/src/SphereonTemplateProcessor/model/StreamLocation.js index 13cae57..462d8ce 100644 --- a/javascript/src/SphereonTemplateProcessor/model/StreamLocation.js +++ b/javascript/src/SphereonTemplateProcessor/model/StreamLocation.js @@ -7,19 +7,11 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { diff --git a/javascript/src/SphereonTemplateProcessor/model/TemplateContext.js b/javascript/src/SphereonTemplateProcessor/model/TemplateContext.js index 7fc4afb..b37b68d 100644 --- a/javascript/src/SphereonTemplateProcessor/model/TemplateContext.js +++ b/javascript/src/SphereonTemplateProcessor/model/TemplateContext.js @@ -7,19 +7,11 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { diff --git a/javascript/src/SphereonTemplateProcessor/model/TemplateContextRequest.js b/javascript/src/SphereonTemplateProcessor/model/TemplateContextRequest.js index b4b4ddc..2ed55d0 100644 --- a/javascript/src/SphereonTemplateProcessor/model/TemplateContextRequest.js +++ b/javascript/src/SphereonTemplateProcessor/model/TemplateContextRequest.js @@ -7,19 +7,11 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { diff --git a/javascript/src/SphereonTemplateProcessor/model/TemplateContextResponse.js b/javascript/src/SphereonTemplateProcessor/model/TemplateContextResponse.js index 88b1ce7..f396c30 100644 --- a/javascript/src/SphereonTemplateProcessor/model/TemplateContextResponse.js +++ b/javascript/src/SphereonTemplateProcessor/model/TemplateContextResponse.js @@ -7,19 +7,11 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { diff --git a/javascript/src/SphereonTemplateProcessor/index.js b/javascript/src/index.js similarity index 81% rename from javascript/src/SphereonTemplateProcessor/index.js rename to javascript/src/index.js index b70547f..48983db 100644 --- a/javascript/src/SphereonTemplateProcessor/index.js +++ b/javascript/src/index.js @@ -7,30 +7,22 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. - define(['SphereonTemplateProcessor/ApiClient', 'SphereonTemplateProcessor/model/DataSetResponse', 'SphereonTemplateProcessor/model/Error', 'SphereonTemplateProcessor/model/ErrorResponse', 'SphereonTemplateProcessor/model/Lifecycle', 'SphereonTemplateProcessor/model/MergeJob', 'SphereonTemplateProcessor/model/MergeJobResponse', 'SphereonTemplateProcessor/model/MergeSettings', 'SphereonTemplateProcessor/model/OutputSettings', 'SphereonTemplateProcessor/model/OwnerInfo', 'SphereonTemplateProcessor/model/StorageLocation', 'SphereonTemplateProcessor/model/StreamLocation', 'SphereonTemplateProcessor/model/TemplateContext', 'SphereonTemplateProcessor/model/TemplateContextRequest', 'SphereonTemplateProcessor/model/TemplateContextResponse', 'SphereonTemplateProcessor/api/AllApi', 'SphereonTemplateProcessor/api/DataSetApi', 'SphereonTemplateProcessor/api/JobApi', 'SphereonTemplateProcessor/api/TemplateApi'], factory); + define(['SphereonTemplateProcessor/ApiClient', 'SphereonTemplateProcessor/model/DataSetResponse', 'SphereonTemplateProcessor/model/Error', 'SphereonTemplateProcessor/model/ErrorResponse', 'SphereonTemplateProcessor/model/Lifecycle', 'SphereonTemplateProcessor/model/MergeJob', 'SphereonTemplateProcessor/model/MergeJobResponse', 'SphereonTemplateProcessor/model/MergeSettings', 'SphereonTemplateProcessor/model/OutputSettings', 'SphereonTemplateProcessor/model/OwnerInfo', 'SphereonTemplateProcessor/model/ResultStreamRequest', 'SphereonTemplateProcessor/model/StorageLocation', 'SphereonTemplateProcessor/model/StreamLocation', 'SphereonTemplateProcessor/model/TemplateContext', 'SphereonTemplateProcessor/model/TemplateContextRequest', 'SphereonTemplateProcessor/model/TemplateContextResponse', 'SphereonTemplateProcessor/api/AllApi', 'SphereonTemplateProcessor/api/DataSetApi', 'SphereonTemplateProcessor/api/JobApi', 'SphereonTemplateProcessor/api/TemplateApi'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. - module.exports = factory(require('./ApiClient'), require('./model/DataSetResponse'), require('./model/Error'), require('./model/ErrorResponse'), require('./model/Lifecycle'), require('./model/MergeJob'), require('./model/MergeJobResponse'), require('./model/MergeSettings'), require('./model/OutputSettings'), require('./model/OwnerInfo'), require('./model/StorageLocation'), require('./model/StreamLocation'), require('./model/TemplateContext'), require('./model/TemplateContextRequest'), require('./model/TemplateContextResponse'), require('./api/AllApi'), require('./api/DataSetApi'), require('./api/JobApi'), require('./api/TemplateApi')); + module.exports = factory(require('./ApiClient'), require('./model/DataSetResponse'), require('./model/Error'), require('./model/ErrorResponse'), require('./model/Lifecycle'), require('./model/MergeJob'), require('./model/MergeJobResponse'), require('./model/MergeSettings'), require('./model/OutputSettings'), require('./model/OwnerInfo'), require('./model/ResultStreamRequest'), require('./model/StorageLocation'), require('./model/StreamLocation'), require('./model/TemplateContext'), require('./model/TemplateContextRequest'), require('./model/TemplateContextResponse'), require('./api/AllApi'), require('./api/DataSetApi'), require('./api/JobApi'), require('./api/TemplateApi')); } -}(function(ApiClient, DataSetResponse, Error, ErrorResponse, Lifecycle, MergeJob, MergeJobResponse, MergeSettings, OutputSettings, OwnerInfo, StorageLocation, StreamLocation, TemplateContext, TemplateContextRequest, TemplateContextResponse, AllApi, DataSetApi, JobApi, TemplateApi) { +}(function(ApiClient, DataSetResponse, Error, ErrorResponse, Lifecycle, MergeJob, MergeJobResponse, MergeSettings, OutputSettings, OwnerInfo, ResultStreamRequest, StorageLocation, StreamLocation, TemplateContext, TemplateContextRequest, TemplateContextResponse, AllApi, DataSetApi, JobApi, TemplateApi) { 'use strict'; /** @@ -115,6 +107,11 @@ * @property {module:SphereonTemplateProcessor/model/OwnerInfo} */ OwnerInfo: OwnerInfo, + /** + * The ResultStreamRequest model constructor. + * @property {module:SphereonTemplateProcessor/model/ResultStreamRequest} + */ + ResultStreamRequest: ResultStreamRequest, /** * The StorageLocation model constructor. * @property {module:SphereonTemplateProcessor/model/StorageLocation} diff --git a/javascript/test/api/AllApi.spec.js b/javascript/test/api/AllApi.spec.js index e1cb21a..6747448 100644 --- a/javascript/test/api/AllApi.spec.js +++ b/javascript/test/api/AllApi.spec.js @@ -7,19 +7,11 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { @@ -62,7 +54,7 @@ describe('createDataSet', function() { it('should call createDataSet successfully', function(done) { //uncomment below and update the code to test createDataSet - //instance.createDataSet(pet, function(error) { + //instance.createDataSet(function(error) { // if (error) throw error; //expect().to.be(); //}); @@ -72,7 +64,7 @@ describe('createTemplateContext', function() { it('should call createTemplateContext successfully', function(done) { //uncomment below and update the code to test createTemplateContext - //instance.createTemplateContext(pet, function(error) { + //instance.createTemplateContext(function(error) { // if (error) throw error; //expect().to.be(); //}); @@ -82,7 +74,7 @@ describe('deleteDataSet', function() { it('should call deleteDataSet successfully', function(done) { //uncomment below and update the code to test deleteDataSet - //instance.deleteDataSet(pet, function(error) { + //instance.deleteDataSet(function(error) { // if (error) throw error; //expect().to.be(); //}); @@ -92,7 +84,7 @@ describe('deleteJob', function() { it('should call deleteJob successfully', function(done) { //uncomment below and update the code to test deleteJob - //instance.deleteJob(pet, function(error) { + //instance.deleteJob(function(error) { // if (error) throw error; //expect().to.be(); //}); @@ -102,7 +94,7 @@ describe('deleteTemplateContext', function() { it('should call deleteTemplateContext successfully', function(done) { //uncomment below and update the code to test deleteTemplateContext - //instance.deleteTemplateContext(pet, function(error) { + //instance.deleteTemplateContext(function(error) { // if (error) throw error; //expect().to.be(); //}); @@ -112,7 +104,7 @@ describe('getJob', function() { it('should call getJob successfully', function(done) { //uncomment below and update the code to test getJob - //instance.getJob(pet, function(error) { + //instance.getJob(function(error) { // if (error) throw error; //expect().to.be(); //}); @@ -122,17 +114,17 @@ describe('getJobs', function() { it('should call getJobs successfully', function(done) { //uncomment below and update the code to test getJobs - //instance.getJobs(pet, function(error) { + //instance.getJobs(function(error) { // if (error) throw error; //expect().to.be(); //}); done(); }); }); - describe('getResultStreamById', function() { - it('should call getResultStreamById successfully', function(done) { - //uncomment below and update the code to test getResultStreamById - //instance.getResultStreamById(pet, function(error) { + describe('getResultStream', function() { + it('should call getResultStream successfully', function(done) { + //uncomment below and update the code to test getResultStream + //instance.getResultStream(function(error) { // if (error) throw error; //expect().to.be(); //}); @@ -142,7 +134,7 @@ describe('getResultStreamsAsContainer', function() { it('should call getResultStreamsAsContainer successfully', function(done) { //uncomment below and update the code to test getResultStreamsAsContainer - //instance.getResultStreamsAsContainer(pet, function(error) { + //instance.getResultStreamsAsContainer(function(error) { // if (error) throw error; //expect().to.be(); //}); @@ -152,7 +144,7 @@ describe('getTemplateContext', function() { it('should call getTemplateContext successfully', function(done) { //uncomment below and update the code to test getTemplateContext - //instance.getTemplateContext(pet, function(error) { + //instance.getTemplateContext(function(error) { // if (error) throw error; //expect().to.be(); //}); @@ -162,7 +154,7 @@ describe('submitJob', function() { it('should call submitJob successfully', function(done) { //uncomment below and update the code to test submitJob - //instance.submitJob(pet, function(error) { + //instance.submitJob(function(error) { // if (error) throw error; //expect().to.be(); //}); @@ -172,7 +164,7 @@ describe('updateTemplateContext', function() { it('should call updateTemplateContext successfully', function(done) { //uncomment below and update the code to test updateTemplateContext - //instance.updateTemplateContext(pet, function(error) { + //instance.updateTemplateContext(function(error) { // if (error) throw error; //expect().to.be(); //}); @@ -182,7 +174,7 @@ describe('uploadTemplateFile', function() { it('should call uploadTemplateFile successfully', function(done) { //uncomment below and update the code to test uploadTemplateFile - //instance.uploadTemplateFile(pet, function(error) { + //instance.uploadTemplateFile(function(error) { // if (error) throw error; //expect().to.be(); //}); diff --git a/javascript/test/api/DataSetApi.spec.js b/javascript/test/api/DataSetApi.spec.js index b32b1f6..cb82796 100644 --- a/javascript/test/api/DataSetApi.spec.js +++ b/javascript/test/api/DataSetApi.spec.js @@ -7,19 +7,11 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { @@ -62,7 +54,7 @@ describe('createDataSet', function() { it('should call createDataSet successfully', function(done) { //uncomment below and update the code to test createDataSet - //instance.createDataSet(pet, function(error) { + //instance.createDataSet(function(error) { // if (error) throw error; //expect().to.be(); //}); @@ -72,7 +64,7 @@ describe('deleteDataSet', function() { it('should call deleteDataSet successfully', function(done) { //uncomment below and update the code to test deleteDataSet - //instance.deleteDataSet(pet, function(error) { + //instance.deleteDataSet(function(error) { // if (error) throw error; //expect().to.be(); //}); diff --git a/javascript/test/api/JobApi.spec.js b/javascript/test/api/JobApi.spec.js index e1b2267..21fb383 100644 --- a/javascript/test/api/JobApi.spec.js +++ b/javascript/test/api/JobApi.spec.js @@ -7,19 +7,11 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { @@ -62,7 +54,7 @@ describe('getJob', function() { it('should call getJob successfully', function(done) { //uncomment below and update the code to test getJob - //instance.getJob(pet, function(error) { + //instance.getJob(function(error) { // if (error) throw error; //expect().to.be(); //}); @@ -72,17 +64,17 @@ describe('getJobs', function() { it('should call getJobs successfully', function(done) { //uncomment below and update the code to test getJobs - //instance.getJobs(pet, function(error) { + //instance.getJobs(function(error) { // if (error) throw error; //expect().to.be(); //}); done(); }); }); - describe('getResultStreamById', function() { - it('should call getResultStreamById successfully', function(done) { - //uncomment below and update the code to test getResultStreamById - //instance.getResultStreamById(pet, function(error) { + describe('getResultStream', function() { + it('should call getResultStream successfully', function(done) { + //uncomment below and update the code to test getResultStream + //instance.getResultStream(function(error) { // if (error) throw error; //expect().to.be(); //}); @@ -92,7 +84,7 @@ describe('getResultStreamsAsContainer', function() { it('should call getResultStreamsAsContainer successfully', function(done) { //uncomment below and update the code to test getResultStreamsAsContainer - //instance.getResultStreamsAsContainer(pet, function(error) { + //instance.getResultStreamsAsContainer(function(error) { // if (error) throw error; //expect().to.be(); //}); @@ -102,7 +94,7 @@ describe('submitJob', function() { it('should call submitJob successfully', function(done) { //uncomment below and update the code to test submitJob - //instance.submitJob(pet, function(error) { + //instance.submitJob(function(error) { // if (error) throw error; //expect().to.be(); //}); diff --git a/javascript/test/api/MergeApi.spec.js b/javascript/test/api/MergeApi.spec.js deleted file mode 100644 index 8a6dece..0000000 --- a/javascript/test/api/MergeApi.spec.js +++ /dev/null @@ -1,194 +0,0 @@ -/** - * OfficeTextMerge - * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -(function(root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. - define(['expect.js', '../../src/index'], factory); - } else if (typeof module === 'object' && module.exports) { - // CommonJS-like environments that support module.exports, like Node. - factory(require('expect.js'), require('../../src/index')); - } else { - // Browser globals (root is window) - factory(root.expect, root.OfficeTextMerge); - } -}(this, function(expect, OfficeTextMerge) { - 'use strict'; - - var instance; - - beforeEach(function() { - instance = new OfficeTextMerge.MergeApi(); - }); - - var getProperty = function(object, getter, property) { - // Use getter method if present; otherwise, get the property directly. - if (typeof object[getter] === 'function') - return object[getter](); - else - return object[property]; - } - - var setProperty = function(object, setter, property, value) { - // Use setter method if present; otherwise, set the property directly. - if (typeof object[setter] === 'function') - object[setter](value); - else - object[property] = value; - } - - describe('MergeApi', function() { - describe('createDataSet', function() { - it('should call createDataSet successfully', function(done) { - //uncomment below and update the code to test createDataSet - //instance.createDataSet(pet, function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('createTemplateContext', function() { - it('should call createTemplateContext successfully', function(done) { - //uncomment below and update the code to test createTemplateContext - //instance.createTemplateContext(pet, function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('deleteDataSet', function() { - it('should call deleteDataSet successfully', function(done) { - //uncomment below and update the code to test deleteDataSet - //instance.deleteDataSet(pet, function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('deleteJob', function() { - it('should call deleteJob successfully', function(done) { - //uncomment below and update the code to test deleteJob - //instance.deleteJob(pet, function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('deleteTemplateContext', function() { - it('should call deleteTemplateContext successfully', function(done) { - //uncomment below and update the code to test deleteTemplateContext - //instance.deleteTemplateContext(pet, function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('getJob', function() { - it('should call getJob successfully', function(done) { - //uncomment below and update the code to test getJob - //instance.getJob(pet, function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('getJobs', function() { - it('should call getJobs successfully', function(done) { - //uncomment below and update the code to test getJobs - //instance.getJobs(pet, function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('getResultStreamById', function() { - it('should call getResultStreamById successfully', function(done) { - //uncomment below and update the code to test getResultStreamById - //instance.getResultStreamById(pet, function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('getResultStreamsAsContainer', function() { - it('should call getResultStreamsAsContainer successfully', function(done) { - //uncomment below and update the code to test getResultStreamsAsContainer - //instance.getResultStreamsAsContainer(pet, function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('getTemplateContext', function() { - it('should call getTemplateContext successfully', function(done) { - //uncomment below and update the code to test getTemplateContext - //instance.getTemplateContext(pet, function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('submitJob', function() { - it('should call submitJob successfully', function(done) { - //uncomment below and update the code to test submitJob - //instance.submitJob(pet, function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('updateTemplateContext', function() { - it('should call updateTemplateContext successfully', function(done) { - //uncomment below and update the code to test updateTemplateContext - //instance.updateTemplateContext(pet, function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - describe('uploadTemplateFile', function() { - it('should call uploadTemplateFile successfully', function(done) { - //uncomment below and update the code to test uploadTemplateFile - //instance.uploadTemplateFile(pet, function(error) { - // if (error) throw error; - //expect().to.be(); - //}); - done(); - }); - }); - }); - -})); diff --git a/javascript/test/api/TemplateApi.spec.js b/javascript/test/api/TemplateApi.spec.js index 876c5df..e507f1f 100644 --- a/javascript/test/api/TemplateApi.spec.js +++ b/javascript/test/api/TemplateApi.spec.js @@ -7,19 +7,11 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { @@ -62,7 +54,7 @@ describe('createTemplateContext', function() { it('should call createTemplateContext successfully', function(done) { //uncomment below and update the code to test createTemplateContext - //instance.createTemplateContext(pet, function(error) { + //instance.createTemplateContext(function(error) { // if (error) throw error; //expect().to.be(); //}); @@ -72,7 +64,7 @@ describe('deleteTemplateContext', function() { it('should call deleteTemplateContext successfully', function(done) { //uncomment below and update the code to test deleteTemplateContext - //instance.deleteTemplateContext(pet, function(error) { + //instance.deleteTemplateContext(function(error) { // if (error) throw error; //expect().to.be(); //}); @@ -82,7 +74,7 @@ describe('getTemplateContext', function() { it('should call getTemplateContext successfully', function(done) { //uncomment below and update the code to test getTemplateContext - //instance.getTemplateContext(pet, function(error) { + //instance.getTemplateContext(function(error) { // if (error) throw error; //expect().to.be(); //}); @@ -92,7 +84,7 @@ describe('updateTemplateContext', function() { it('should call updateTemplateContext successfully', function(done) { //uncomment below and update the code to test updateTemplateContext - //instance.updateTemplateContext(pet, function(error) { + //instance.updateTemplateContext(function(error) { // if (error) throw error; //expect().to.be(); //}); @@ -102,7 +94,7 @@ describe('uploadTemplateFile', function() { it('should call uploadTemplateFile successfully', function(done) { //uncomment below and update the code to test uploadTemplateFile - //instance.uploadTemplateFile(pet, function(error) { + //instance.uploadTemplateFile(function(error) { // if (error) throw error; //expect().to.be(); //}); diff --git a/javascript/test/model/DataSetResponse.spec.js b/javascript/test/model/DataSetResponse.spec.js index 1f83dda..21cdbfd 100644 --- a/javascript/test/model/DataSetResponse.spec.js +++ b/javascript/test/model/DataSetResponse.spec.js @@ -1,25 +1,17 @@ /** - * OfficeTextMerge - * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * Template-Processor + * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store * * OpenAPI spec version: 0.1 * Contact: dev@sphereon.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { @@ -31,15 +23,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.OfficeTextMerge); + factory(root.expect, root.TemplateProcessor); } -}(this, function(expect, OfficeTextMerge) { +}(this, function(expect, TemplateProcessor) { 'use strict'; var instance; beforeEach(function() { - instance = new OfficeTextMerge.DataSetResponse(); + instance = new TemplateProcessor.DataSetResponse(); }); var getProperty = function(object, getter, property) { @@ -61,31 +53,31 @@ describe('DataSetResponse', function() { it('should create an instance of DataSetResponse', function() { // uncomment below and update the code to test DataSetResponse - //var instane = new OfficeTextMerge.DataSetResponse(); - //expect(instance).to.be.a(OfficeTextMerge.DataSetResponse); + //var instane = new TemplateProcessor.DataSetResponse(); + //expect(instance).to.be.a(TemplateProcessor.DataSetResponse); }); it('should have the property completionTime (base name: "completionTime")', function() { // uncomment below and update the code to test the property completionTime - //var instane = new OfficeTextMerge.DataSetResponse(); + //var instane = new TemplateProcessor.DataSetResponse(); //expect(instance).to.be(); }); it('should have the property creationTime (base name: "creationTime")', function() { // uncomment below and update the code to test the property creationTime - //var instane = new OfficeTextMerge.DataSetResponse(); + //var instane = new TemplateProcessor.DataSetResponse(); //expect(instance).to.be(); }); it('should have the property id (base name: "id")', function() { // uncomment below and update the code to test the property id - //var instane = new OfficeTextMerge.DataSetResponse(); + //var instane = new TemplateProcessor.DataSetResponse(); //expect(instance).to.be(); }); it('should have the property status (base name: "status")', function() { // uncomment below and update the code to test the property status - //var instane = new OfficeTextMerge.DataSetResponse(); + //var instane = new TemplateProcessor.DataSetResponse(); //expect(instance).to.be(); }); diff --git a/javascript/test/model/Error.spec.js b/javascript/test/model/Error.spec.js index c5c52c7..ce8b8ee 100644 --- a/javascript/test/model/Error.spec.js +++ b/javascript/test/model/Error.spec.js @@ -1,25 +1,17 @@ /** - * OfficeTextMerge - * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * Template-Processor + * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store * * OpenAPI spec version: 0.1 * Contact: dev@sphereon.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { @@ -31,15 +23,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.OfficeTextMerge); + factory(root.expect, root.TemplateProcessor); } -}(this, function(expect, OfficeTextMerge) { +}(this, function(expect, TemplateProcessor) { 'use strict'; var instance; beforeEach(function() { - instance = new OfficeTextMerge.Error(); + instance = new TemplateProcessor.Error(); }); var getProperty = function(object, getter, property) { @@ -61,31 +53,31 @@ describe('Error', function() { it('should create an instance of Error', function() { // uncomment below and update the code to test Error - //var instane = new OfficeTextMerge.Error(); - //expect(instance).to.be.a(OfficeTextMerge.Error); + //var instane = new TemplateProcessor.Error(); + //expect(instance).to.be.a(TemplateProcessor.Error); }); it('should have the property code (base name: "code")', function() { // uncomment below and update the code to test the property code - //var instane = new OfficeTextMerge.Error(); + //var instane = new TemplateProcessor.Error(); //expect(instance).to.be(); }); it('should have the property level (base name: "level")', function() { // uncomment below and update the code to test the property level - //var instane = new OfficeTextMerge.Error(); + //var instane = new TemplateProcessor.Error(); //expect(instance).to.be(); }); it('should have the property cause (base name: "cause")', function() { // uncomment below and update the code to test the property cause - //var instane = new OfficeTextMerge.Error(); + //var instane = new TemplateProcessor.Error(); //expect(instance).to.be(); }); it('should have the property message (base name: "message")', function() { // uncomment below and update the code to test the property message - //var instane = new OfficeTextMerge.Error(); + //var instane = new TemplateProcessor.Error(); //expect(instance).to.be(); }); diff --git a/javascript/test/model/ErrorResponse.spec.js b/javascript/test/model/ErrorResponse.spec.js index 00a6661..39630cc 100644 --- a/javascript/test/model/ErrorResponse.spec.js +++ b/javascript/test/model/ErrorResponse.spec.js @@ -1,25 +1,17 @@ /** - * OfficeTextMerge - * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * Template-Processor + * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store * * OpenAPI spec version: 0.1 * Contact: dev@sphereon.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { @@ -31,15 +23,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.OfficeTextMerge); + factory(root.expect, root.TemplateProcessor); } -}(this, function(expect, OfficeTextMerge) { +}(this, function(expect, TemplateProcessor) { 'use strict'; var instance; beforeEach(function() { - instance = new OfficeTextMerge.ErrorResponse(); + instance = new TemplateProcessor.ErrorResponse(); }); var getProperty = function(object, getter, property) { @@ -61,13 +53,13 @@ describe('ErrorResponse', function() { it('should create an instance of ErrorResponse', function() { // uncomment below and update the code to test ErrorResponse - //var instane = new OfficeTextMerge.ErrorResponse(); - //expect(instance).to.be.a(OfficeTextMerge.ErrorResponse); + //var instane = new TemplateProcessor.ErrorResponse(); + //expect(instance).to.be.a(TemplateProcessor.ErrorResponse); }); it('should have the property errors (base name: "errors")', function() { // uncomment below and update the code to test the property errors - //var instane = new OfficeTextMerge.ErrorResponse(); + //var instane = new TemplateProcessor.ErrorResponse(); //expect(instance).to.be(); }); diff --git a/javascript/test/model/Lifecycle.spec.js b/javascript/test/model/Lifecycle.spec.js index b5c9f29..9f34256 100644 --- a/javascript/test/model/Lifecycle.spec.js +++ b/javascript/test/model/Lifecycle.spec.js @@ -1,25 +1,17 @@ /** - * OfficeTextMerge - * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * Template-Processor + * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store * * OpenAPI spec version: 0.1 * Contact: dev@sphereon.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { @@ -31,15 +23,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.OfficeTextMerge); + factory(root.expect, root.TemplateProcessor); } -}(this, function(expect, OfficeTextMerge) { +}(this, function(expect, TemplateProcessor) { 'use strict'; var instance; beforeEach(function() { - instance = new OfficeTextMerge.Lifecycle(); + instance = new TemplateProcessor.Lifecycle(); }); var getProperty = function(object, getter, property) { @@ -61,25 +53,25 @@ describe('Lifecycle', function() { it('should create an instance of Lifecycle', function() { // uncomment below and update the code to test Lifecycle - //var instane = new OfficeTextMerge.Lifecycle(); - //expect(instance).to.be.a(OfficeTextMerge.Lifecycle); + //var instane = new TemplateProcessor.Lifecycle(); + //expect(instance).to.be.a(TemplateProcessor.Lifecycle); }); it('should have the property actionTime (base name: "actionTime")', function() { // uncomment below and update the code to test the property actionTime - //var instane = new OfficeTextMerge.Lifecycle(); + //var instane = new TemplateProcessor.Lifecycle(); //expect(instance).to.be(); }); it('should have the property action (base name: "action")', function() { // uncomment below and update the code to test the property action - //var instane = new OfficeTextMerge.Lifecycle(); + //var instane = new TemplateProcessor.Lifecycle(); //expect(instance).to.be(); }); it('should have the property type (base name: "type")', function() { // uncomment below and update the code to test the property type - //var instane = new OfficeTextMerge.Lifecycle(); + //var instane = new TemplateProcessor.Lifecycle(); //expect(instance).to.be(); }); diff --git a/javascript/test/model/MergeJob.spec.js b/javascript/test/model/MergeJob.spec.js index 612618e..f2ac96c 100644 --- a/javascript/test/model/MergeJob.spec.js +++ b/javascript/test/model/MergeJob.spec.js @@ -1,25 +1,17 @@ /** - * OfficeTextMerge - * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * Template-Processor + * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store * * OpenAPI spec version: 0.1 * Contact: dev@sphereon.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { @@ -31,15 +23,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.OfficeTextMerge); + factory(root.expect, root.TemplateProcessor); } -}(this, function(expect, OfficeTextMerge) { +}(this, function(expect, TemplateProcessor) { 'use strict'; var instance; beforeEach(function() { - instance = new OfficeTextMerge.MergeJob(); + instance = new TemplateProcessor.MergeJob(); }); var getProperty = function(object, getter, property) { @@ -61,73 +53,67 @@ describe('MergeJob', function() { it('should create an instance of MergeJob', function() { // uncomment below and update the code to test MergeJob - //var instane = new OfficeTextMerge.MergeJob(); - //expect(instance).to.be.a(OfficeTextMerge.MergeJob); - }); - - it('should have the property resultFolderPath (base name: "resultFolderPath")', function() { - // uncomment below and update the code to test the property resultFolderPath - //var instane = new OfficeTextMerge.MergeJob(); - //expect(instance).to.be(); + //var instane = new TemplateProcessor.MergeJob(); + //expect(instance).to.be.a(TemplateProcessor.MergeJob); }); it('should have the property completionTime (base name: "completionTime")', function() { // uncomment below and update the code to test the property completionTime - //var instane = new OfficeTextMerge.MergeJob(); + //var instane = new TemplateProcessor.MergeJob(); //expect(instance).to.be(); }); it('should have the property jobId (base name: "jobId")', function() { // uncomment below and update the code to test the property jobId - //var instane = new OfficeTextMerge.MergeJob(); - //expect(instance).to.be(); - }); - - it('should have the property resultContainerId (base name: "resultContainerId")', function() { - // uncomment below and update the code to test the property resultContainerId - //var instane = new OfficeTextMerge.MergeJob(); + //var instane = new TemplateProcessor.MergeJob(); //expect(instance).to.be(); }); it('should have the property creationTime (base name: "creationTime")', function() { // uncomment below and update the code to test the property creationTime - //var instane = new OfficeTextMerge.MergeJob(); + //var instane = new TemplateProcessor.MergeJob(); //expect(instance).to.be(); }); it('should have the property dataSetId (base name: "dataSetId")', function() { // uncomment below and update the code to test the property dataSetId - //var instane = new OfficeTextMerge.MergeJob(); + //var instane = new TemplateProcessor.MergeJob(); //expect(instance).to.be(); }); it('should have the property resultStreams (base name: "resultStreams")', function() { // uncomment below and update the code to test the property resultStreams - //var instane = new OfficeTextMerge.MergeJob(); + //var instane = new TemplateProcessor.MergeJob(); //expect(instance).to.be(); }); it('should have the property headerDataSetIds (base name: "headerDataSetIds")', function() { // uncomment below and update the code to test the property headerDataSetIds - //var instane = new OfficeTextMerge.MergeJob(); + //var instane = new TemplateProcessor.MergeJob(); + //expect(instance).to.be(); + }); + + it('should have the property resultStorageLocation (base name: "resultStorageLocation")', function() { + // uncomment below and update the code to test the property resultStorageLocation + //var instane = new TemplateProcessor.MergeJob(); //expect(instance).to.be(); }); it('should have the property mergeSettings (base name: "mergeSettings")', function() { // uncomment below and update the code to test the property mergeSettings - //var instane = new OfficeTextMerge.MergeJob(); + //var instane = new TemplateProcessor.MergeJob(); //expect(instance).to.be(); }); it('should have the property statusMessage (base name: "statusMessage")', function() { // uncomment below and update the code to test the property statusMessage - //var instane = new OfficeTextMerge.MergeJob(); + //var instane = new TemplateProcessor.MergeJob(); //expect(instance).to.be(); }); it('should have the property status (base name: "status")', function() { // uncomment below and update the code to test the property status - //var instane = new OfficeTextMerge.MergeJob(); + //var instane = new TemplateProcessor.MergeJob(); //expect(instance).to.be(); }); diff --git a/javascript/test/model/MergeJobResponse.spec.js b/javascript/test/model/MergeJobResponse.spec.js index 0ae79d5..d23b680 100644 --- a/javascript/test/model/MergeJobResponse.spec.js +++ b/javascript/test/model/MergeJobResponse.spec.js @@ -1,25 +1,17 @@ /** - * OfficeTextMerge - * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * Template-Processor + * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store * * OpenAPI spec version: 0.1 * Contact: dev@sphereon.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { @@ -31,15 +23,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.OfficeTextMerge); + factory(root.expect, root.TemplateProcessor); } -}(this, function(expect, OfficeTextMerge) { +}(this, function(expect, TemplateProcessor) { 'use strict'; var instance; beforeEach(function() { - instance = new OfficeTextMerge.MergeJobResponse(); + instance = new TemplateProcessor.MergeJobResponse(); }); var getProperty = function(object, getter, property) { @@ -61,31 +53,31 @@ describe('MergeJobResponse', function() { it('should create an instance of MergeJobResponse', function() { // uncomment below and update the code to test MergeJobResponse - //var instane = new OfficeTextMerge.MergeJobResponse(); - //expect(instance).to.be.a(OfficeTextMerge.MergeJobResponse); + //var instane = new TemplateProcessor.MergeJobResponse(); + //expect(instance).to.be.a(TemplateProcessor.MergeJobResponse); }); it('should have the property jobId (base name: "jobId")', function() { // uncomment below and update the code to test the property jobId - //var instane = new OfficeTextMerge.MergeJobResponse(); + //var instane = new TemplateProcessor.MergeJobResponse(); //expect(instance).to.be(); }); it('should have the property job (base name: "job")', function() { // uncomment below and update the code to test the property job - //var instane = new OfficeTextMerge.MergeJobResponse(); + //var instane = new TemplateProcessor.MergeJobResponse(); //expect(instance).to.be(); }); it('should have the property statusMessage (base name: "statusMessage")', function() { // uncomment below and update the code to test the property statusMessage - //var instane = new OfficeTextMerge.MergeJobResponse(); + //var instane = new TemplateProcessor.MergeJobResponse(); //expect(instance).to.be(); }); it('should have the property status (base name: "status")', function() { // uncomment below and update the code to test the property status - //var instane = new OfficeTextMerge.MergeJobResponse(); + //var instane = new TemplateProcessor.MergeJobResponse(); //expect(instance).to.be(); }); diff --git a/javascript/test/model/MergeSettings.spec.js b/javascript/test/model/MergeSettings.spec.js index 0b3938d..534acb0 100644 --- a/javascript/test/model/MergeSettings.spec.js +++ b/javascript/test/model/MergeSettings.spec.js @@ -1,25 +1,17 @@ /** - * OfficeTextMerge - * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * Template-Processor + * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store * * OpenAPI spec version: 0.1 * Contact: dev@sphereon.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { @@ -31,15 +23,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.OfficeTextMerge); + factory(root.expect, root.TemplateProcessor); } -}(this, function(expect, OfficeTextMerge) { +}(this, function(expect, TemplateProcessor) { 'use strict'; var instance; beforeEach(function() { - instance = new OfficeTextMerge.MergeSettings(); + instance = new TemplateProcessor.MergeSettings(); }); var getProperty = function(object, getter, property) { @@ -61,61 +53,61 @@ describe('MergeSettings', function() { it('should create an instance of MergeSettings', function() { // uncomment below and update the code to test MergeSettings - //var instane = new OfficeTextMerge.MergeSettings(); - //expect(instance).to.be.a(OfficeTextMerge.MergeSettings); + //var instane = new TemplateProcessor.MergeSettings(); + //expect(instance).to.be.a(TemplateProcessor.MergeSettings); }); it('should have the property lifecycle (base name: "lifecycle")', function() { // uncomment below and update the code to test the property lifecycle - //var instane = new OfficeTextMerge.MergeSettings(); + //var instane = new TemplateProcessor.MergeSettings(); //expect(instance).to.be(); }); it('should have the property mergeResult (base name: "mergeResult")', function() { // uncomment below and update the code to test the property mergeResult - //var instane = new OfficeTextMerge.MergeSettings(); + //var instane = new TemplateProcessor.MergeSettings(); //expect(instance).to.be(); }); it('should have the property dataSetId (base name: "dataSetId")', function() { // uncomment below and update the code to test the property dataSetId - //var instane = new OfficeTextMerge.MergeSettings(); + //var instane = new TemplateProcessor.MergeSettings(); //expect(instance).to.be(); }); it('should have the property engine (base name: "engine")', function() { // uncomment below and update the code to test the property engine - //var instane = new OfficeTextMerge.MergeSettings(); + //var instane = new TemplateProcessor.MergeSettings(); //expect(instance).to.be(); }); it('should have the property headerDataSetIds (base name: "headerDataSetIds")', function() { // uncomment below and update the code to test the property headerDataSetIds - //var instane = new OfficeTextMerge.MergeSettings(); + //var instane = new TemplateProcessor.MergeSettings(); //expect(instance).to.be(); }); - it('should have the property templateVersion (base name: "templateVersion")', function() { - // uncomment below and update the code to test the property templateVersion - //var instane = new OfficeTextMerge.MergeSettings(); + it('should have the property resultStorageLocation (base name: "resultStorageLocation")', function() { + // uncomment below and update the code to test the property resultStorageLocation + //var instane = new TemplateProcessor.MergeSettings(); //expect(instance).to.be(); }); - it('should have the property resultStreamLocation (base name: "resultStreamLocation")', function() { - // uncomment below and update the code to test the property resultStreamLocation - //var instane = new OfficeTextMerge.MergeSettings(); + it('should have the property templateVersion (base name: "templateVersion")', function() { + // uncomment below and update the code to test the property templateVersion + //var instane = new TemplateProcessor.MergeSettings(); //expect(instance).to.be(); }); it('should have the property templateId (base name: "templateId")', function() { // uncomment below and update the code to test the property templateId - //var instane = new OfficeTextMerge.MergeSettings(); + //var instane = new TemplateProcessor.MergeSettings(); //expect(instance).to.be(); }); it('should have the property outputSettings (base name: "outputSettings")', function() { // uncomment below and update the code to test the property outputSettings - //var instane = new OfficeTextMerge.MergeSettings(); + //var instane = new TemplateProcessor.MergeSettings(); //expect(instance).to.be(); }); diff --git a/javascript/test/model/OutputSettings.spec.js b/javascript/test/model/OutputSettings.spec.js index 89716e5..69da405 100644 --- a/javascript/test/model/OutputSettings.spec.js +++ b/javascript/test/model/OutputSettings.spec.js @@ -1,25 +1,17 @@ /** - * OfficeTextMerge - * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * Template-Processor + * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store * * OpenAPI spec version: 0.1 * Contact: dev@sphereon.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { @@ -31,15 +23,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.OfficeTextMerge); + factory(root.expect, root.TemplateProcessor); } -}(this, function(expect, OfficeTextMerge) { +}(this, function(expect, TemplateProcessor) { 'use strict'; var instance; beforeEach(function() { - instance = new OfficeTextMerge.OutputSettings(); + instance = new TemplateProcessor.OutputSettings(); }); var getProperty = function(object, getter, property) { @@ -61,19 +53,19 @@ describe('OutputSettings', function() { it('should create an instance of OutputSettings', function() { // uncomment below and update the code to test OutputSettings - //var instane = new OfficeTextMerge.OutputSettings(); - //expect(instance).to.be.a(OfficeTextMerge.OutputSettings); + //var instane = new TemplateProcessor.OutputSettings(); + //expect(instance).to.be.a(TemplateProcessor.OutputSettings); }); it('should have the property deliveryFormat (base name: "deliveryFormat")', function() { // uncomment below and update the code to test the property deliveryFormat - //var instane = new OfficeTextMerge.OutputSettings(); + //var instane = new TemplateProcessor.OutputSettings(); //expect(instance).to.be(); }); it('should have the property outputFormat (base name: "outputFormat")', function() { // uncomment below and update the code to test the property outputFormat - //var instane = new OfficeTextMerge.OutputSettings(); + //var instane = new TemplateProcessor.OutputSettings(); //expect(instance).to.be(); }); diff --git a/javascript/test/model/OwnerInfo.spec.js b/javascript/test/model/OwnerInfo.spec.js index 9bea7d0..3849e96 100644 --- a/javascript/test/model/OwnerInfo.spec.js +++ b/javascript/test/model/OwnerInfo.spec.js @@ -1,25 +1,17 @@ /** - * OfficeTextMerge - * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * Template-Processor + * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store * * OpenAPI spec version: 0.1 * Contact: dev@sphereon.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { @@ -31,15 +23,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.OfficeTextMerge); + factory(root.expect, root.TemplateProcessor); } -}(this, function(expect, OfficeTextMerge) { +}(this, function(expect, TemplateProcessor) { 'use strict'; var instance; beforeEach(function() { - instance = new OfficeTextMerge.OwnerInfo(); + instance = new TemplateProcessor.OwnerInfo(); }); var getProperty = function(object, getter, property) { @@ -61,31 +53,31 @@ describe('OwnerInfo', function() { it('should create an instance of OwnerInfo', function() { // uncomment below and update the code to test OwnerInfo - //var instane = new OfficeTextMerge.OwnerInfo(); - //expect(instance).to.be.a(OfficeTextMerge.OwnerInfo); + //var instane = new TemplateProcessor.OwnerInfo(); + //expect(instance).to.be.a(TemplateProcessor.OwnerInfo); }); it('should have the property phone (base name: "phone")', function() { // uncomment below and update the code to test the property phone - //var instane = new OfficeTextMerge.OwnerInfo(); + //var instane = new TemplateProcessor.OwnerInfo(); //expect(instance).to.be(); }); it('should have the property companyDepartment (base name: "companyDepartment")', function() { // uncomment below and update the code to test the property companyDepartment - //var instane = new OfficeTextMerge.OwnerInfo(); + //var instane = new TemplateProcessor.OwnerInfo(); //expect(instance).to.be(); }); it('should have the property name (base name: "name")', function() { // uncomment below and update the code to test the property name - //var instane = new OfficeTextMerge.OwnerInfo(); + //var instane = new TemplateProcessor.OwnerInfo(); //expect(instance).to.be(); }); it('should have the property email (base name: "email")', function() { // uncomment below and update the code to test the property email - //var instane = new OfficeTextMerge.OwnerInfo(); + //var instane = new TemplateProcessor.OwnerInfo(); //expect(instance).to.be(); }); diff --git a/javascript/test/model/ResultStreamRequest.spec.js b/javascript/test/model/ResultStreamRequest.spec.js new file mode 100644 index 0000000..15dba87 --- /dev/null +++ b/javascript/test/model/ResultStreamRequest.spec.js @@ -0,0 +1,74 @@ +/** + * Template-Processor + * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * + * OpenAPI spec version: 0.1 + * Contact: dev@sphereon.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.2.3 + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', '../../src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require('../../src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.TemplateProcessor); + } +}(this, function(expect, TemplateProcessor) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new TemplateProcessor.ResultStreamRequest(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('ResultStreamRequest', function() { + it('should create an instance of ResultStreamRequest', function() { + // uncomment below and update the code to test ResultStreamRequest + //var instane = new TemplateProcessor.ResultStreamRequest(); + //expect(instance).to.be.a(TemplateProcessor.ResultStreamRequest); + }); + + it('should have the property streamLocation (base name: "streamLocation")', function() { + // uncomment below and update the code to test the property streamLocation + //var instane = new TemplateProcessor.ResultStreamRequest(); + //expect(instance).to.be(); + }); + + it('should have the property outputSettings (base name: "outputSettings")', function() { + // uncomment below and update the code to test the property outputSettings + //var instane = new TemplateProcessor.ResultStreamRequest(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/javascript/test/model/StorageLocation.spec.js b/javascript/test/model/StorageLocation.spec.js index 7c32250..7caad3c 100644 --- a/javascript/test/model/StorageLocation.spec.js +++ b/javascript/test/model/StorageLocation.spec.js @@ -7,19 +7,11 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { diff --git a/javascript/test/model/StreamLocation.spec.js b/javascript/test/model/StreamLocation.spec.js index 31f352b..d0250e1 100644 --- a/javascript/test/model/StreamLocation.spec.js +++ b/javascript/test/model/StreamLocation.spec.js @@ -1,25 +1,17 @@ /** - * OfficeTextMerge - * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * Template-Processor + * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store * * OpenAPI spec version: 0.1 * Contact: dev@sphereon.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { @@ -31,15 +23,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.OfficeTextMerge); + factory(root.expect, root.TemplateProcessor); } -}(this, function(expect, OfficeTextMerge) { +}(this, function(expect, TemplateProcessor) { 'use strict'; var instance; beforeEach(function() { - instance = new OfficeTextMerge.StreamLocation(); + instance = new TemplateProcessor.StreamLocation(); }); var getProperty = function(object, getter, property) { @@ -61,31 +53,31 @@ describe('StreamLocation', function() { it('should create an instance of StreamLocation', function() { // uncomment below and update the code to test StreamLocation - //var instane = new OfficeTextMerge.StreamLocation(); - //expect(instance).to.be.a(OfficeTextMerge.StreamLocation); + //var instane = new TemplateProcessor.StreamLocation(); + //expect(instance).to.be.a(TemplateProcessor.StreamLocation); }); it('should have the property folderPath (base name: "folderPath")', function() { // uncomment below and update the code to test the property folderPath - //var instane = new OfficeTextMerge.StreamLocation(); + //var instane = new TemplateProcessor.StreamLocation(); //expect(instance).to.be(); }); it('should have the property originalFileName (base name: "originalFileName")', function() { // uncomment below and update the code to test the property originalFileName - //var instane = new OfficeTextMerge.StreamLocation(); + //var instane = new TemplateProcessor.StreamLocation(); //expect(instance).to.be(); }); - it('should have the property containerId (base name: "containerId")', function() { - // uncomment below and update the code to test the property containerId - //var instane = new OfficeTextMerge.StreamLocation(); + it('should have the property fileName (base name: "fileName")', function() { + // uncomment below and update the code to test the property fileName + //var instane = new TemplateProcessor.StreamLocation(); //expect(instance).to.be(); }); - it('should have the property fileId (base name: "fileId")', function() { - // uncomment below and update the code to test the property fileId - //var instane = new OfficeTextMerge.StreamLocation(); + it('should have the property containerId (base name: "containerId")', function() { + // uncomment below and update the code to test the property containerId + //var instane = new TemplateProcessor.StreamLocation(); //expect(instance).to.be(); }); diff --git a/javascript/test/model/TemplateContext.spec.js b/javascript/test/model/TemplateContext.spec.js index b2deac0..c8236db 100644 --- a/javascript/test/model/TemplateContext.spec.js +++ b/javascript/test/model/TemplateContext.spec.js @@ -1,25 +1,17 @@ /** - * OfficeTextMerge - * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * Template-Processor + * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store * * OpenAPI spec version: 0.1 * Contact: dev@sphereon.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { @@ -31,15 +23,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.OfficeTextMerge); + factory(root.expect, root.TemplateProcessor); } -}(this, function(expect, OfficeTextMerge) { +}(this, function(expect, TemplateProcessor) { 'use strict'; var instance; beforeEach(function() { - instance = new OfficeTextMerge.TemplateContext(); + instance = new TemplateProcessor.TemplateContext(); }); var getProperty = function(object, getter, property) { @@ -61,43 +53,49 @@ describe('TemplateContext', function() { it('should create an instance of TemplateContext', function() { // uncomment below and update the code to test TemplateContext - //var instane = new OfficeTextMerge.TemplateContext(); - //expect(instance).to.be.a(OfficeTextMerge.TemplateContext); + //var instane = new TemplateProcessor.TemplateContext(); + //expect(instance).to.be.a(TemplateProcessor.TemplateContext); }); it('should have the property templateType (base name: "templateType")', function() { // uncomment below and update the code to test the property templateType - //var instane = new OfficeTextMerge.TemplateContext(); + //var instane = new TemplateProcessor.TemplateContext(); //expect(instance).to.be(); }); it('should have the property templateFileLocations (base name: "templateFileLocations")', function() { // uncomment below and update the code to test the property templateFileLocations - //var instane = new OfficeTextMerge.TemplateContext(); + //var instane = new TemplateProcessor.TemplateContext(); //expect(instance).to.be(); }); it('should have the property description (base name: "description")', function() { // uncomment below and update the code to test the property description - //var instane = new OfficeTextMerge.TemplateContext(); + //var instane = new TemplateProcessor.TemplateContext(); //expect(instance).to.be(); }); it('should have the property ownerInfo (base name: "ownerInfo")', function() { // uncomment below and update the code to test the property ownerInfo - //var instane = new OfficeTextMerge.TemplateContext(); + //var instane = new TemplateProcessor.TemplateContext(); + //expect(instance).to.be(); + }); + + it('should have the property storageLocation (base name: "storageLocation")', function() { + // uncomment below and update the code to test the property storageLocation + //var instane = new TemplateProcessor.TemplateContext(); //expect(instance).to.be(); }); it('should have the property id (base name: "id")', function() { // uncomment below and update the code to test the property id - //var instane = new OfficeTextMerge.TemplateContext(); + //var instane = new TemplateProcessor.TemplateContext(); //expect(instance).to.be(); }); it('should have the property templateId (base name: "templateId")', function() { // uncomment below and update the code to test the property templateId - //var instane = new OfficeTextMerge.TemplateContext(); + //var instane = new TemplateProcessor.TemplateContext(); //expect(instance).to.be(); }); diff --git a/javascript/test/model/TemplateContextRequest.spec.js b/javascript/test/model/TemplateContextRequest.spec.js index 4c909d8..2eed82a 100644 --- a/javascript/test/model/TemplateContextRequest.spec.js +++ b/javascript/test/model/TemplateContextRequest.spec.js @@ -1,25 +1,17 @@ /** - * OfficeTextMerge - * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * Template-Processor + * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store * * OpenAPI spec version: 0.1 * Contact: dev@sphereon.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { @@ -31,15 +23,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.OfficeTextMerge); + factory(root.expect, root.TemplateProcessor); } -}(this, function(expect, OfficeTextMerge) { +}(this, function(expect, TemplateProcessor) { 'use strict'; var instance; beforeEach(function() { - instance = new OfficeTextMerge.TemplateContextRequest(); + instance = new TemplateProcessor.TemplateContextRequest(); }); var getProperty = function(object, getter, property) { @@ -61,31 +53,31 @@ describe('TemplateContextRequest', function() { it('should create an instance of TemplateContextRequest', function() { // uncomment below and update the code to test TemplateContextRequest - //var instane = new OfficeTextMerge.TemplateContextRequest(); - //expect(instance).to.be.a(OfficeTextMerge.TemplateContextRequest); + //var instane = new TemplateProcessor.TemplateContextRequest(); + //expect(instance).to.be.a(TemplateProcessor.TemplateContextRequest); }); it('should have the property templateType (base name: "templateType")', function() { // uncomment below and update the code to test the property templateType - //var instane = new OfficeTextMerge.TemplateContextRequest(); + //var instane = new TemplateProcessor.TemplateContextRequest(); //expect(instance).to.be(); }); it('should have the property description (base name: "description")', function() { // uncomment below and update the code to test the property description - //var instane = new OfficeTextMerge.TemplateContextRequest(); + //var instane = new TemplateProcessor.TemplateContextRequest(); //expect(instance).to.be(); }); it('should have the property ownerInfo (base name: "ownerInfo")', function() { // uncomment below and update the code to test the property ownerInfo - //var instane = new OfficeTextMerge.TemplateContextRequest(); + //var instane = new TemplateProcessor.TemplateContextRequest(); //expect(instance).to.be(); }); it('should have the property templateId (base name: "templateId")', function() { // uncomment below and update the code to test the property templateId - //var instane = new OfficeTextMerge.TemplateContextRequest(); + //var instane = new TemplateProcessor.TemplateContextRequest(); //expect(instance).to.be(); }); diff --git a/javascript/test/model/TemplateContextResponse.spec.js b/javascript/test/model/TemplateContextResponse.spec.js index 38ff396..c82e490 100644 --- a/javascript/test/model/TemplateContextResponse.spec.js +++ b/javascript/test/model/TemplateContextResponse.spec.js @@ -1,25 +1,17 @@ /** - * OfficeTextMerge - * The Office Text API can generate office documents from a template and a JSON data file< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store + * Template-Processor + * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store * * OpenAPI spec version: 0.1 * Contact: dev@sphereon.com * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Swagger Codegen version: 2.2.3 * - * http://www.apache.org/licenses/LICENSE-2.0 + * Do not edit the class manually. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. */ (function(root, factory) { @@ -31,15 +23,15 @@ factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) - factory(root.expect, root.OfficeTextMerge); + factory(root.expect, root.TemplateProcessor); } -}(this, function(expect, OfficeTextMerge) { +}(this, function(expect, TemplateProcessor) { 'use strict'; var instance; beforeEach(function() { - instance = new OfficeTextMerge.TemplateContextResponse(); + instance = new TemplateProcessor.TemplateContextResponse(); }); var getProperty = function(object, getter, property) { @@ -61,31 +53,31 @@ describe('TemplateContextResponse', function() { it('should create an instance of TemplateContextResponse', function() { // uncomment below and update the code to test TemplateContextResponse - //var instane = new OfficeTextMerge.TemplateContextResponse(); - //expect(instance).to.be.a(OfficeTextMerge.TemplateContextResponse); + //var instane = new TemplateProcessor.TemplateContextResponse(); + //expect(instance).to.be.a(TemplateProcessor.TemplateContextResponse); }); it('should have the property creationTime (base name: "creationTime")', function() { // uncomment below and update the code to test the property creationTime - //var instane = new OfficeTextMerge.TemplateContextResponse(); + //var instane = new TemplateProcessor.TemplateContextResponse(); //expect(instance).to.be(); }); it('should have the property context (base name: "context")', function() { // uncomment below and update the code to test the property context - //var instane = new OfficeTextMerge.TemplateContextResponse(); + //var instane = new TemplateProcessor.TemplateContextResponse(); //expect(instance).to.be(); }); it('should have the property id (base name: "id")', function() { // uncomment below and update the code to test the property id - //var instane = new OfficeTextMerge.TemplateContextResponse(); + //var instane = new TemplateProcessor.TemplateContextResponse(); //expect(instance).to.be(); }); it('should have the property status (base name: "status")', function() { // uncomment below and update the code to test the property status - //var instane = new OfficeTextMerge.TemplateContextResponse(); + //var instane = new TemplateProcessor.TemplateContextResponse(); //expect(instance).to.be(); }); From 9fd11f763cf67d6ed1072091f9971ec542a561e6 Mon Sep 17 00:00:00 2001 From: Sander Postma Date: Wed, 20 Sep 2017 13:42:32 +0200 Subject: [PATCH 05/10] Extra property vars --- .../handler/ApiException.java | 2 +- .../handler/Configuration.java | 2 +- .../sdk/template_processor/handler/Pair.java | 2 +- .../handler/StringUtil.java | 2 +- .../handler/auth/ApiKeyAuth.java | 2 +- .../handler/auth/OAuth.java | 2 +- .../model/DataSetResponse.java | 2 +- .../sdk/template_processor/model/Error.java | 2 +- .../model/ErrorResponse.java | 2 +- .../template_processor/model/Lifecycle.java | 2 +- .../template_processor/model/MergeJob.java | 2 +- .../model/MergeJobResponse.java | 2 +- .../model/MergeSettings.java | 2 +- .../model/OutputSettings.java | 2 +- .../template_processor/model/OwnerInfo.java | 2 +- .../model/ResultStreamRequest.java | 2 +- .../model/StorageLocation.java | 2 +- .../model/StreamLocation.java | 2 +- .../model/TemplateContext.java | 2 +- .../model/TemplateContextRequest.java | 2 +- .../model/TemplateContextResponse.java | 2 +- pom.xml | 93 +++---------------- 22 files changed, 32 insertions(+), 103 deletions(-) diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiException.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiException.java index 379683e..c90431a 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiException.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiException.java @@ -16,7 +16,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:41:41.824+02:00") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Configuration.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Configuration.java index cd87b6d..0dbdefc 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Configuration.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Configuration.java @@ -13,7 +13,7 @@ package com.sphereon.sdk.template_processor.handler; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:41:41.824+02:00") public class Configuration { private static ApiClient defaultApiClient = new ApiClient(); diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Pair.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Pair.java index 78ac25f..dea4e7d 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Pair.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Pair.java @@ -13,7 +13,7 @@ package com.sphereon.sdk.template_processor.handler; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:41:41.824+02:00") public class Pair { private String name = ""; private String value = ""; diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java index 38261b3..bace27a 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java @@ -13,7 +13,7 @@ package com.sphereon.sdk.template_processor.handler; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:41:41.824+02:00") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java index 0c5606f..d9876e3 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java @@ -18,7 +18,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:41:41.824+02:00") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java index d8f19f8..135b341 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java @@ -18,7 +18,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:41:41.824+02:00") public class OAuth implements Authentication { private String accessToken; diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java index de5605a..4e7d912 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java @@ -28,7 +28,7 @@ * The merge template response. */ @ApiModel(description = "The merge template response.") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:41:41.824+02:00") public class DataSetResponse { @SerializedName("completionTime") private OffsetDateTime completionTime = null; diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Error.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Error.java index 596b52e..9d8a569 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Error.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Error.java @@ -28,7 +28,7 @@ * An error */ @ApiModel(description = "An error") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:41:41.824+02:00") public class Error { @SerializedName("code") private String code = null; diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java index 8445252..4a6321a 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java @@ -30,7 +30,7 @@ * The error response */ @ApiModel(description = "The error response") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:41:41.824+02:00") public class ErrorResponse { @SerializedName("errors") private List errors = null; diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java index ff27de2..2bbf663 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java @@ -28,7 +28,7 @@ * Lifecycle settings. When no lifecycle settings are supplied, the job and files will be deleted directly after retrieval of the file */ @ApiModel(description = "Lifecycle settings. When no lifecycle settings are supplied, the job and files will be deleted directly after retrieval of the file") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:41:41.824+02:00") public class Lifecycle { @SerializedName("actionTime") private OffsetDateTime actionTime = null; diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java index c23653e..34ebf10 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java @@ -33,7 +33,7 @@ * The merge job. Has access to the job merge data. */ @ApiModel(description = "The merge job. Has access to the job merge data.") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:41:41.824+02:00") public class MergeJob { @SerializedName("completionTime") private OffsetDateTime completionTime = null; diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java index 8434fdc..31caca7 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java @@ -28,7 +28,7 @@ * The merge job response. */ @ApiModel(description = "The merge job response.") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:41:41.824+02:00") public class MergeJobResponse { @SerializedName("jobId") private String jobId = null; diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java index 673ab8d..b3166ad 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java @@ -32,7 +32,7 @@ * Merge settings */ @ApiModel(description = "Merge settings") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:41:41.824+02:00") public class MergeSettings { @SerializedName("lifecycle") private Lifecycle lifecycle = null; diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java index 7f5a79e..6b1cafc 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java @@ -27,7 +27,7 @@ * Output settings */ @ApiModel(description = "Output settings") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:41:41.824+02:00") public class OutputSettings { /** * Gets or Sets deliveryFormat diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java index 20bbd83..69fde89 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java @@ -27,7 +27,7 @@ * Owner info */ @ApiModel(description = "Owner info") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:41:41.824+02:00") public class OwnerInfo { @SerializedName("phone") private String phone = null; diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/ResultStreamRequest.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/ResultStreamRequest.java index 93e0be1..1fc8075 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/ResultStreamRequest.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/ResultStreamRequest.java @@ -29,7 +29,7 @@ * A request to download a specific result stream. */ @ApiModel(description = "A request to download a specific result stream.") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:41:41.824+02:00") public class ResultStreamRequest { @SerializedName("streamLocation") private StreamLocation streamLocation = null; diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/StorageLocation.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/StorageLocation.java index 53b7afa..a2bf417 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/StorageLocation.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/StorageLocation.java @@ -27,7 +27,7 @@ * Location record */ @ApiModel(description = "Location record") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:41:41.824+02:00") public class StorageLocation { @SerializedName("folderPath") private String folderPath = null; diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java index 3c9b381..b134bfa 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java @@ -27,7 +27,7 @@ * Location record of data stream */ @ApiModel(description = "Location record of data stream") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:41:41.824+02:00") public class StreamLocation { @SerializedName("folderPath") private String folderPath = null; diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java index 49dd5a0..6d8d51c 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java @@ -32,7 +32,7 @@ /** * TemplateContext */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:41:41.824+02:00") public class TemplateContext { /** * Gets or Sets templateType diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java index fedd0cb..426355b 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java @@ -28,7 +28,7 @@ * The merge template request. */ @ApiModel(description = "The merge template request.") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:41:41.824+02:00") public class TemplateContextRequest { /** * Gets or Sets templateType diff --git a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java index f1d3a1a..3ceb1cc 100644 --- a/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java +++ b/java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java @@ -29,7 +29,7 @@ * The merge template response. */ @ApiModel(description = "The merge template response.") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:28:56.163+02:00") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-09-20T13:41:41.824+02:00") public class TemplateContextResponse { @SerializedName("creationTime") private OffsetDateTime creationTime = null; diff --git a/pom.xml b/pom.xml index 6cb6cda..c18573b 100644 --- a/pom.xml +++ b/pom.xml @@ -8,11 +8,13 @@ TEMPLATE PROCESSOR API SDK Generator + Sphereon BV com.sphereon.sdk.template-processor Sphereon.SDK.TemplateProcessor SphereonTemplateProcessor 2.2.3 + false @@ -20,7 +22,6 @@ html-docs - io.swagger swagger-codegen-maven-plugin @@ -31,19 +32,12 @@ generate - swagger.sdk.json - - - - html2 - - java8 - true + ${swagger-coden-verbose} ${project.basedir}/html-docs com.sphereon.sdk template-processor-sdk-html-docs @@ -75,16 +69,12 @@ swagger.sdk.json - - java - java8 - okhttp-gson - true + ${swagger-coden-verbose} ${project.basedir}/java8-okhttp-gson com.sphereon.sdk template-processor-sdk-java8 @@ -105,7 +95,6 @@ java8-jersey2 - io.swagger swagger-codegen-maven-plugin @@ -115,24 +104,14 @@ generate - - swagger.sdk.json - - - - java - - java8 - - jersey2 - true + ${swagger-coden-verbose} ${project.basedir}/java8-jersey2 com.sphereon.sdk template-processor-sdk-java8-jersey2 @@ -154,7 +133,6 @@ java8-retrofit2 - io.swagger swagger-codegen-maven-plugin @@ -165,22 +143,13 @@ generate - swagger.sdk.json - - - - java - - java8 - - retrofit2 - true + ${swagger-coden-verbose} ${project.basedir}/java8-retrofit2 com.sphereon.sdk template-processor-sdk-java8-retrofit2 @@ -199,36 +168,24 @@ javascript - - io.swagger swagger-codegen-maven-plugin ${swagger-coden-maven-plugin.version} - - generate - swagger.sdk.json - - - - javascript - - java8 - - true + ${swagger-coden-verbose} ${project.basedir}/javascript com.sphereon.sdk template-processor-sdk-javascript @@ -249,7 +206,6 @@ csharp-net45 - io.swagger swagger-codegen-maven-plugin @@ -262,36 +218,22 @@ generate - swagger.sdk.json - - - csharp - - - - Sphereon BV + ${company-name} ${sdk-package-csharp}.Api ${sdk-package-csharp}.Model ${sdk-package-csharp}.Handler ${sdk-package-csharp} - - - src/main/resources/config/csharp-net45.json - - - true + ${swagger-coden-verbose} ${project.basedir}/csharp-net45 com.sphereon.sdk template-processor-sdk-csharp-net45 ${project.version} true - Api Model Handler @@ -307,7 +249,6 @@ csharp-net35 - io.swagger swagger-codegen-maven-plugin @@ -318,35 +259,23 @@ generate - swagger.sdk.json - - - csharp - - - - Sphereon BV + ${company-name} ${sdk-package-csharp}.Api ${sdk-package-csharp}.Model ${sdk-package-csharp}.Handler ${sdk-package-csharp} v3.5 - src/main/resources/config/csharp-net35.json - - - true + ${swagger-coden-verbose} ${project.basedir}/csharp-net35 com.sphereon.sdk template-processor-sdk-csharp-net35 ${project.version} true - Api Model Handler From cb2e1d4e0277cfa536909316297fb761297948dc Mon Sep 17 00:00:00 2001 From: Sander Postma Date: Wed, 20 Sep 2017 13:44:08 +0200 Subject: [PATCH 06/10] code reformat --- pom.xml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index c18573b..d85e320 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ com.sphereon.sdk.template-processor Sphereon.SDK.TemplateProcessor SphereonTemplateProcessor - + 2.2.3 false @@ -286,8 +286,6 @@ - - From 4006efbf2ee142cd94121f1aae4eb94c32e6361d Mon Sep 17 00:00:00 2001 From: Sander Postma Date: Wed, 20 Sep 2017 13:48:53 +0200 Subject: [PATCH 07/10] Reformatted by IJ --- pom.xml | 598 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 299 insertions(+), 299 deletions(-) diff --git a/pom.xml b/pom.xml index d85e320..f881a5e 100644 --- a/pom.xml +++ b/pom.xml @@ -1,314 +1,314 @@ - 4.0.0 - com.sphereon.sdk - template-processor - jar - 0.1.1 - TEMPLATE PROCESSOR API SDK Generator + 4.0.0 + com.sphereon.sdk + template-processor + jar + 0.1.1 + TEMPLATE PROCESSOR API SDK Generator - - Sphereon BV - com.sphereon.sdk.template-processor - Sphereon.SDK.TemplateProcessor - SphereonTemplateProcessor + + Sphereon BV + com.sphereon.sdk.template-processor + Sphereon.SDK.TemplateProcessor + SphereonTemplateProcessor - 2.2.3 - false - + 2.2.3 + false + - - - html-docs - - - - io.swagger - swagger-codegen-maven-plugin - ${swagger-coden-maven-plugin.version} - - - - generate - - - swagger.sdk.json - html2 - - java8 - - ${swagger-coden-verbose} - ${project.basedir}/html-docs - com.sphereon.sdk - template-processor-sdk-html-docs - ${project.version} - true - api - model - ${sdk-package} - - - - - - - + + + html-docs + + + + io.swagger + swagger-codegen-maven-plugin + ${swagger-coden-maven-plugin.version} + + + + generate + + + swagger.sdk.json + html2 + + java8 + + ${swagger-coden-verbose} + ${project.basedir}/html-docs + com.sphereon.sdk + template-processor-sdk-html-docs + ${project.version} + true + api + model + ${sdk-package} + + + + + + + - - java8-okhttp-gson - - - - io.swagger - swagger-codegen-maven-plugin - ${swagger-coden-maven-plugin.version} - - - - generate - - - swagger.sdk.json - java - - java8 - - okhttp-gson - ${swagger-coden-verbose} - ${project.basedir}/java8-okhttp-gson - com.sphereon.sdk - template-processor-sdk-java8 - ${project.version} - true - ${sdk-package}.api - ${sdk-package}.model - ${sdk-package}.handler - - - - - - - + + java8-okhttp-gson + + + + io.swagger + swagger-codegen-maven-plugin + ${swagger-coden-maven-plugin.version} + + + + generate + + + swagger.sdk.json + java + + java8 + + okhttp-gson + ${swagger-coden-verbose} + ${project.basedir}/java8-okhttp-gson + com.sphereon.sdk + template-processor-sdk-java8 + ${project.version} + true + ${sdk-package}.api + ${sdk-package}.model + ${sdk-package}.handler + + + + + + + - - java8-jersey2 - - - - io.swagger - swagger-codegen-maven-plugin - ${swagger-coden-maven-plugin.version} - - - - generate - - - swagger.sdk.json - java - - java8 - - jersey2 - ${swagger-coden-verbose} - ${project.basedir}/java8-jersey2 - com.sphereon.sdk - template-processor-sdk-java8-jersey2 - ${project.version} - true - ${sdk-package}.api - ${sdk-package}.model - ${sdk-package}.handler - - - - - - - + + java8-jersey2 + + + + io.swagger + swagger-codegen-maven-plugin + ${swagger-coden-maven-plugin.version} + + + + generate + + + swagger.sdk.json + java + + java8 + + jersey2 + ${swagger-coden-verbose} + ${project.basedir}/java8-jersey2 + com.sphereon.sdk + template-processor-sdk-java8-jersey2 + ${project.version} + true + ${sdk-package}.api + ${sdk-package}.model + ${sdk-package}.handler + + + + + + + - - java8-retrofit2 - - - - io.swagger - swagger-codegen-maven-plugin - ${swagger-coden-maven-plugin.version} - - - - generate - - - swagger.sdk.json - java - - java8 - - retrofit2 - ${swagger-coden-verbose} - ${project.basedir}/java8-retrofit2 - com.sphereon.sdk - template-processor-sdk-java8-retrofit2 - ${project.version} - true - ${sdk-package}.api - ${sdk-package}.model - ${sdk-package}.handler - - - - - - - + + java8-retrofit2 + + + + io.swagger + swagger-codegen-maven-plugin + ${swagger-coden-maven-plugin.version} + + + + generate + + + swagger.sdk.json + java + + java8 + + retrofit2 + ${swagger-coden-verbose} + ${project.basedir}/java8-retrofit2 + com.sphereon.sdk + template-processor-sdk-java8-retrofit2 + ${project.version} + true + ${sdk-package}.api + ${sdk-package}.model + ${sdk-package}.handler + + + + + + + - - javascript - - - - io.swagger - swagger-codegen-maven-plugin - ${swagger-coden-maven-plugin.version} - - - - generate - - - swagger.sdk.json - javascript - - java8 - - ${swagger-coden-verbose} - ${project.basedir}/javascript - com.sphereon.sdk - template-processor-sdk-javascript - ${project.version} - true - api - model - ${sdk-package-javascript} - - - - - - - + + javascript + + + + io.swagger + swagger-codegen-maven-plugin + ${swagger-coden-maven-plugin.version} + + + + generate + + + swagger.sdk.json + javascript + + java8 + + ${swagger-coden-verbose} + ${project.basedir}/javascript + com.sphereon.sdk + template-processor-sdk-javascript + ${project.version} + true + api + model + ${sdk-package-javascript} + + + + + + + - - csharp-net45 - - - - io.swagger - swagger-codegen-maven-plugin - ${swagger-coden-maven-plugin.version} + + csharp-net45 + + + + io.swagger + swagger-codegen-maven-plugin + ${swagger-coden-maven-plugin.version} - + - - - generate - - - swagger.sdk.json - csharp - - ${company-name} - ${sdk-package-csharp}.Api - ${sdk-package-csharp}.Model - ${sdk-package-csharp}.Handler - ${sdk-package-csharp} - - src/main/resources/config/csharp-net45.json - ${swagger-coden-verbose} - ${project.basedir}/csharp-net45 - com.sphereon.sdk - template-processor-sdk-csharp-net45 - ${project.version} - true - Api - Model - Handler - - - - - - - + + + generate + + + swagger.sdk.json + csharp + + ${company-name} + ${sdk-package-csharp}.Api + ${sdk-package-csharp}.Model + ${sdk-package-csharp}.Handler + ${sdk-package-csharp} + + src/main/resources/config/csharp-net45.json + ${swagger-coden-verbose} + ${project.basedir}/csharp-net45 + com.sphereon.sdk + template-processor-sdk-csharp-net45 + ${project.version} + true + Api + Model + Handler + + + + + + + - - csharp-net35 - - - - io.swagger - swagger-codegen-maven-plugin - ${swagger-coden-maven-plugin.version} - - - - generate - - - swagger.sdk.json - csharp - - ${company-name} - ${sdk-package-csharp}.Api - ${sdk-package-csharp}.Model - ${sdk-package-csharp}.Handler - ${sdk-package-csharp} - v3.5 - - src/main/resources/config/csharp-net35.json - ${swagger-coden-verbose} - ${project.basedir}/csharp-net35 - com.sphereon.sdk - template-processor-sdk-csharp-net35 - ${project.version} - true - Api - Model - Handler - - - - - - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - default-compile - none - - - - - org.apache.maven.plugins - maven-install-plugin - - - default-install - none - - - - - + + csharp-net35 + + + + io.swagger + swagger-codegen-maven-plugin + ${swagger-coden-maven-plugin.version} + + + + generate + + + swagger.sdk.json + csharp + + ${company-name} + ${sdk-package-csharp}.Api + ${sdk-package-csharp}.Model + ${sdk-package-csharp}.Handler + ${sdk-package-csharp} + v3.5 + + src/main/resources/config/csharp-net35.json + ${swagger-coden-verbose} + ${project.basedir}/csharp-net35 + com.sphereon.sdk + template-processor-sdk-csharp-net35 + ${project.version} + true + Api + Model + Handler + + + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + default-compile + none + + + + + org.apache.maven.plugins + maven-install-plugin + + + default-install + none + + + + + From fb7faecb8872b4b8a13bbb71e336c37cc794eb37 Mon Sep 17 00:00:00 2001 From: sanderPostma Date: Tue, 5 Feb 2019 11:30:46 +0100 Subject: [PATCH 08/10] Cleanup before PR --- .gitignore | 72 +- csharp-net35/.gitignore | 1 + csharp-net35/.swagger-codegen/VERSION | 2 +- csharp-net35/README.md | 57 +- .../Sphereon.SDK.TemplateProcessor.sln | 36 +- csharp-net35/build.bat | 3 +- csharp-net35/build.sh | 40 +- csharp-net35/docs/AllApi.md | 859 ------ csharp-net35/docs/DataSetApi.md | 138 - csharp-net35/docs/DataSetResponse.md | 12 - csharp-net35/docs/Error.md | 12 - csharp-net35/docs/ErrorResponse.md | 9 - csharp-net35/docs/JobApi.md | 337 -- csharp-net35/docs/Lifecycle.md | 11 - csharp-net35/docs/MergeJob.md | 18 - csharp-net35/docs/MergeJobResponse.md | 12 - csharp-net35/docs/MergeSettings.md | 17 - csharp-net35/docs/OutputSettings.md | 10 - csharp-net35/docs/OwnerInfo.md | 12 - csharp-net35/docs/ResultStreamRequest.md | 10 - csharp-net35/docs/StorageLocation.md | 10 - csharp-net35/docs/StreamLocation.md | 12 - csharp-net35/docs/TemplateApi.md | 335 -- csharp-net35/docs/TemplateContext.md | 15 - csharp-net35/docs/TemplateContextRequest.md | 12 - csharp-net35/docs/TemplateContextResponse.md | 12 - csharp-net35/git_push.sh | 2 +- ...Sphereon.SDK.TemplateProcessor.Test.csproj | 8 +- .../packages.config | 1 + .../Api/AllApi.cs | 1422 --------- .../Api/DataSetApi.cs | 335 -- .../Api/JobApi.cs | 641 ---- .../Api/TemplateApi.cs | 632 ---- .../Client/ApiClient.cs | 456 --- .../Client/ApiException.cs | 60 - .../Client/ApiResponse.cs | 54 - .../Client/Configuration.cs | 334 -- .../Client/ExceptionFactory.cs | 24 - .../Client/IApiAccessor.cs | 42 - .../Client/SwaggerDateConverter.cs | 30 - .../Model/DataSetResponse.cs | 205 -- .../Model/Error.cs | 222 -- .../Model/ErrorResponse.cs | 119 - .../Model/Lifecycle.cs | 186 -- .../Model/MergeJob.cs | 330 -- .../Model/MergeJobResponse.cs | 224 -- .../Model/MergeSettings.cs | 329 -- .../Model/OutputSettings.cs | 265 -- .../Model/OwnerInfo.cs | 171 -- .../Model/ResultStreamRequest.cs | 150 - .../Model/StorageLocation.cs | 135 - .../Model/StreamLocation.cs | 167 - .../Model/TemplateContext.cs | 252 -- .../Model/TemplateContextRequest.cs | 201 -- .../Model/TemplateContextResponse.cs | 212 -- .../Properties/AssemblyInfo.cs | 32 - .../Sphereon.SDK.TemplateProcessor.csproj | 72 - .../Sphereon.SDK.TemplateProcessor.nuspec | 41 - .../packages.config | 5 - csharp-net45/.swagger-codegen/VERSION | 2 +- csharp-net45/README.md | 55 +- .../Sphereon.SDK.TemplateProcessor.sln | 10 +- csharp-net45/docs/AllApi.md | 859 ------ csharp-net45/docs/DataSetApi.md | 138 - csharp-net45/docs/DataSetResponse.md | 12 - csharp-net45/docs/Error.md | 12 - csharp-net45/docs/ErrorResponse.md | 9 - csharp-net45/docs/JobApi.md | 337 -- csharp-net45/docs/Lifecycle.md | 11 - csharp-net45/docs/MergeJob.md | 18 - csharp-net45/docs/MergeJobResponse.md | 12 - csharp-net45/docs/MergeSettings.md | 17 - csharp-net45/docs/OutputSettings.md | 10 - csharp-net45/docs/OwnerInfo.md | 12 - csharp-net45/docs/ResultStreamRequest.md | 10 - csharp-net45/docs/StorageLocation.md | 10 - csharp-net45/docs/StreamLocation.md | 12 - csharp-net45/docs/TemplateApi.md | 335 -- csharp-net45/docs/TemplateContext.md | 15 - csharp-net45/docs/TemplateContextRequest.md | 12 - csharp-net45/docs/TemplateContextResponse.md | 12 - ...Sphereon.SDK.TemplateProcessor.Test.csproj | 20 +- .../packages.config | 4 +- .../Api/AllApi.cs | 2719 ----------------- .../Api/DataSetApi.cs | 534 ---- .../Api/JobApi.cs | 1149 ------- .../Api/TemplateApi.cs | 1131 ------- .../Client/ApiClient.cs | 482 --- .../Client/ApiException.cs | 60 - .../Client/ApiResponse.cs | 54 - .../Client/Configuration.cs | 334 -- .../Client/ExceptionFactory.cs | 24 - .../Client/IApiAccessor.cs | 42 - .../Client/SwaggerDateConverter.cs | 30 - .../Model/DataSetResponse.cs | 214 -- .../Model/Error.cs | 231 -- .../Model/ErrorResponse.cs | 128 - .../Model/Lifecycle.cs | 195 -- .../Model/MergeJob.cs | 339 -- .../Model/MergeJobResponse.cs | 233 -- .../Model/MergeSettings.cs | 338 -- .../Model/OutputSettings.cs | 274 -- .../Model/OwnerInfo.cs | 180 -- .../Model/ResultStreamRequest.cs | 159 - .../Model/StorageLocation.cs | 144 - .../Model/StreamLocation.cs | 176 -- .../Model/TemplateContext.cs | 261 -- .../Model/TemplateContextRequest.cs | 210 -- .../Model/TemplateContextResponse.cs | 221 -- .../Properties/AssemblyInfo.cs | 32 - .../Sphereon.SDK.TemplateProcessor.csproj | 72 - .../Sphereon.SDK.TemplateProcessor.nuspec | 41 - .../packages.config | 5 - html-docs/.swagger-codegen/VERSION | 2 +- html-docs/index.html | 141 +- java8-jersey2/.swagger-codegen/VERSION | 2 +- java8-jersey2/docs/AllApi.md | 716 ----- java8-jersey2/docs/DataSetApi.md | 116 - java8-jersey2/docs/DataSetResponse.md | 22 - java8-jersey2/docs/Error.md | 22 - java8-jersey2/docs/ErrorResponse.md | 10 - java8-jersey2/docs/JobApi.md | 282 -- java8-jersey2/docs/Lifecycle.md | 27 - java8-jersey2/docs/MergeJob.md | 31 - java8-jersey2/docs/MergeJobResponse.md | 25 - java8-jersey2/docs/MergeSettings.md | 34 - java8-jersey2/docs/OutputSettings.md | 42 - java8-jersey2/docs/OwnerInfo.md | 13 - java8-jersey2/docs/ResultStreamRequest.md | 11 - java8-jersey2/docs/StorageLocation.md | 11 - java8-jersey2/docs/StreamLocation.md | 13 - java8-jersey2/docs/TemplateApi.md | 280 -- java8-jersey2/docs/TemplateContext.md | 24 - java8-jersey2/docs/TemplateContextRequest.md | 21 - java8-jersey2/docs/TemplateContextResponse.md | 23 - java8-jersey2/git_push.sh | 2 +- java8-jersey2/pom.xml | 475 +-- java8-jersey2/src/main/AndroidManifest.xml | 3 - .../sdk/template_processor/api/AllApi.java | 598 ---- .../template_processor/api/DataSetApi.java | 121 - .../sdk/template_processor/api/JobApi.java | 252 -- .../template_processor/api/TemplateApi.java | 257 -- .../template_processor/handler/ApiClient.java | 766 ----- .../handler/ApiException.java | 91 - .../handler/Configuration.java | 39 - .../sdk/template_processor/handler/JSON.java | 39 - .../sdk/template_processor/handler/Pair.java | 52 - .../handler/RFC3339DateFormat.java | 32 - .../handler/StringUtil.java | 55 - .../handler/auth/ApiKeyAuth.java | 75 - .../handler/auth/Authentication.java | 29 - .../handler/auth/HttpBasicAuth.java | 54 - .../handler/auth/OAuth.java | 39 - .../handler/auth/OAuthFlow.java | 18 - .../model/DataSetResponse.java | 171 -- .../sdk/template_processor/model/Error.java | 198 -- .../model/ErrorResponse.java | 102 - .../template_processor/model/Lifecycle.java | 206 -- .../template_processor/model/MergeJob.java | 324 -- .../model/MergeJobResponse.java | 186 -- .../model/MergeSettings.java | 358 --- .../model/OutputSettings.java | 214 -- .../template_processor/model/OwnerInfo.java | 160 - .../model/ResultStreamRequest.java | 116 - .../model/StorageLocation.java | 114 - .../model/StreamLocation.java | 160 - .../model/TemplateContext.java | 277 -- .../model/TemplateContextRequest.java | 196 -- .../model/TemplateContextResponse.java | 183 -- java8-okhttp-gson/.swagger-codegen/VERSION | 2 +- java8-okhttp-gson/docs/AllApi.md | 716 ----- java8-okhttp-gson/docs/DataSetApi.md | 116 - java8-okhttp-gson/docs/DataSetResponse.md | 22 - java8-okhttp-gson/docs/Error.md | 22 - java8-okhttp-gson/docs/ErrorResponse.md | 10 - java8-okhttp-gson/docs/JobApi.md | 282 -- java8-okhttp-gson/docs/Lifecycle.md | 27 - java8-okhttp-gson/docs/MergeJob.md | 31 - java8-okhttp-gson/docs/MergeJobResponse.md | 25 - java8-okhttp-gson/docs/MergeSettings.md | 34 - java8-okhttp-gson/docs/OutputSettings.md | 42 - java8-okhttp-gson/docs/OwnerInfo.md | 13 - java8-okhttp-gson/docs/ResultStreamRequest.md | 11 - java8-okhttp-gson/docs/StorageLocation.md | 11 - java8-okhttp-gson/docs/StreamLocation.md | 13 - java8-okhttp-gson/docs/TemplateApi.md | 280 -- java8-okhttp-gson/docs/TemplateContext.md | 24 - .../docs/TemplateContextRequest.md | 21 - .../docs/TemplateContextResponse.md | 23 - java8-okhttp-gson/git_push.sh | 2 +- java8-okhttp-gson/pom.xml | 212 -- .../sdk/template_processor/api/AllApi.java | 1720 ----------- .../template_processor/api/DataSetApi.java | 309 -- .../sdk/template_processor/api/JobApi.java | 699 ----- .../template_processor/api/TemplateApi.java | 700 ----- .../handler/ApiCallback.java | 62 - .../template_processor/handler/ApiClient.java | 1359 -------- .../handler/ApiException.java | 91 - .../handler/ApiResponse.java | 59 - .../handler/Configuration.java | 39 - .../handler/GzipRequestInterceptor.java | 81 - .../sdk/template_processor/handler/JSON.java | 227 -- .../sdk/template_processor/handler/Pair.java | 52 - .../handler/ProgressRequestBody.java | 77 - .../handler/ProgressResponseBody.java | 76 - .../handler/StringUtil.java | 55 - .../handler/auth/ApiKeyAuth.java | 75 - .../handler/auth/Authentication.java | 29 - .../handler/auth/HttpBasicAuth.java | 54 - .../handler/auth/OAuth.java | 39 - .../handler/auth/OAuthFlow.java | 18 - .../model/DataSetResponse.java | 186 -- .../sdk/template_processor/model/Error.java | 213 -- .../model/ErrorResponse.java | 105 - .../template_processor/model/Lifecycle.java | 233 -- .../template_processor/model/MergeJob.java | 339 -- .../model/MergeJobResponse.java | 201 -- .../model/MergeSettings.java | 385 --- .../model/OutputSettings.java | 241 -- .../template_processor/model/OwnerInfo.java | 163 - .../model/ResultStreamRequest.java | 119 - .../model/StorageLocation.java | 117 - .../model/StreamLocation.java | 163 - .../model/TemplateContext.java | 292 -- .../model/TemplateContextRequest.java | 211 -- .../model/TemplateContextResponse.java | 198 -- java8-retrofit2/.swagger-codegen/VERSION | 2 +- java8-retrofit2/docs/AllApi.md | 716 ----- java8-retrofit2/docs/DataSetApi.md | 116 - java8-retrofit2/docs/DataSetResponse.md | 22 - java8-retrofit2/docs/Error.md | 22 - java8-retrofit2/docs/ErrorResponse.md | 10 - java8-retrofit2/docs/JobApi.md | 282 -- java8-retrofit2/docs/Lifecycle.md | 27 - java8-retrofit2/docs/MergeJob.md | 31 - java8-retrofit2/docs/MergeJobResponse.md | 25 - java8-retrofit2/docs/MergeSettings.md | 34 - java8-retrofit2/docs/OutputSettings.md | 42 - java8-retrofit2/docs/OwnerInfo.md | 13 - java8-retrofit2/docs/ResultStreamRequest.md | 11 - java8-retrofit2/docs/StorageLocation.md | 11 - java8-retrofit2/docs/StreamLocation.md | 13 - java8-retrofit2/docs/TemplateApi.md | 280 -- java8-retrofit2/docs/TemplateContext.md | 24 - .../docs/TemplateContextRequest.md | 21 - .../docs/TemplateContextResponse.md | 23 - java8-retrofit2/git_push.sh | 2 +- java8-retrofit2/pom.xml | 435 +-- java8-retrofit2/src/main/AndroidManifest.xml | 3 - .../sdk/template_processor/api/AllApi.java | 213 -- .../template_processor/api/DataSetApi.java | 50 - .../sdk/template_processor/api/JobApi.java | 97 - .../template_processor/api/TemplateApi.java | 94 - .../template_processor/handler/ApiClient.java | 411 --- .../handler/CollectionFormats.java | 95 - .../handler/StringUtil.java | 55 - .../handler/auth/ApiKeyAuth.java | 68 - .../handler/auth/HttpBasicAuth.java | 50 - .../handler/auth/OAuth.java | 176 -- .../handler/auth/OAuthFlow.java | 18 - .../handler/auth/OAuthOkHttpClient.java | 72 - .../model/DataSetResponse.java | 186 -- .../sdk/template_processor/model/Error.java | 213 -- .../model/ErrorResponse.java | 105 - .../template_processor/model/Lifecycle.java | 233 -- .../template_processor/model/MergeJob.java | 339 -- .../model/MergeJobResponse.java | 201 -- .../model/MergeSettings.java | 385 --- .../model/OutputSettings.java | 241 -- .../template_processor/model/OwnerInfo.java | 163 - .../model/ResultStreamRequest.java | 119 - .../model/StorageLocation.java | 117 - .../model/StreamLocation.java | 163 - .../model/TemplateContext.java | 292 -- .../model/TemplateContextRequest.java | 211 -- .../model/TemplateContextResponse.java | 198 -- javascript/.swagger-codegen/VERSION | 2 +- javascript/README.md | 53 +- javascript/docs/AllApi.md | 695 ----- javascript/docs/DataSetApi.md | 112 - javascript/docs/DataSetResponse.md | 24 - javascript/docs/Error.md | 24 - javascript/docs/ErrorResponse.md | 8 - javascript/docs/JobApi.md | 276 -- javascript/docs/Lifecycle.md | 30 - javascript/docs/MergeJob.md | 36 - javascript/docs/MergeJobResponse.md | 30 - javascript/docs/MergeSettings.md | 38 - javascript/docs/OutputSettings.md | 61 - javascript/docs/OwnerInfo.md | 11 - javascript/docs/ResultStreamRequest.md | 9 - javascript/docs/StorageLocation.md | 9 - javascript/docs/StreamLocation.md | 11 - javascript/docs/TemplateApi.md | 271 -- javascript/docs/TemplateContext.md | 25 - javascript/docs/TemplateContextRequest.md | 22 - javascript/docs/TemplateContextResponse.md | 26 - javascript/mocha.opts | 1 - javascript/package.json | 2 +- javascript/src/ApiClient.js | 568 ---- .../SphereonTemplateProcessor/api/AllApi.js | 660 ---- .../api/DataSetApi.js | 144 - .../SphereonTemplateProcessor/api/JobApi.js | 288 -- .../api/TemplateApi.js | 288 -- .../model/DataSetResponse.js | 135 - .../SphereonTemplateProcessor/model/Error.js | 132 - .../model/ErrorResponse.js | 83 - .../model/Lifecycle.js | 129 - .../model/MergeJob.js | 204 -- .../model/MergeJobResponse.js | 149 - .../model/MergeSettings.js | 190 -- .../model/OutputSettings.js | 200 -- .../model/OwnerInfo.js | 111 - .../model/ResultStreamRequest.js | 94 - .../model/StorageLocation.js | 91 - .../model/StreamLocation.js | 107 - .../model/TemplateContext.js | 152 - .../model/TemplateContextRequest.js | 126 - .../model/TemplateContextResponse.js | 139 - javascript/src/index.js | 163 - pom.xml | 687 +++-- src/main/resources/config/csharp-net35.json | 12 +- src/main/resources/config/csharp-net45.json | 12 +- swagger.sdk.json | 526 ++-- 324 files changed, 1456 insertions(+), 52575 deletions(-) delete mode 100644 csharp-net35/docs/AllApi.md delete mode 100644 csharp-net35/docs/DataSetApi.md delete mode 100644 csharp-net35/docs/DataSetResponse.md delete mode 100644 csharp-net35/docs/Error.md delete mode 100644 csharp-net35/docs/ErrorResponse.md delete mode 100644 csharp-net35/docs/JobApi.md delete mode 100644 csharp-net35/docs/Lifecycle.md delete mode 100644 csharp-net35/docs/MergeJob.md delete mode 100644 csharp-net35/docs/MergeJobResponse.md delete mode 100644 csharp-net35/docs/MergeSettings.md delete mode 100644 csharp-net35/docs/OutputSettings.md delete mode 100644 csharp-net35/docs/OwnerInfo.md delete mode 100644 csharp-net35/docs/ResultStreamRequest.md delete mode 100644 csharp-net35/docs/StorageLocation.md delete mode 100644 csharp-net35/docs/StreamLocation.md delete mode 100644 csharp-net35/docs/TemplateApi.md delete mode 100644 csharp-net35/docs/TemplateContext.md delete mode 100644 csharp-net35/docs/TemplateContextRequest.md delete mode 100644 csharp-net35/docs/TemplateContextResponse.md delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Api/AllApi.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Api/DataSetApi.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Api/JobApi.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Api/TemplateApi.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ApiClient.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ApiException.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ApiResponse.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/Configuration.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ExceptionFactory.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/IApiAccessor.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/SwaggerDateConverter.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/DataSetResponse.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/Error.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/ErrorResponse.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/Lifecycle.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/MergeJob.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/MergeJobResponse.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/MergeSettings.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/OutputSettings.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/OwnerInfo.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/ResultStreamRequest.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/StorageLocation.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/StreamLocation.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContext.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextRequest.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextResponse.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Properties/AssemblyInfo.cs delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Sphereon.SDK.TemplateProcessor.csproj delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/Sphereon.SDK.TemplateProcessor.nuspec delete mode 100644 csharp-net35/src/Sphereon.SDK.TemplateProcessor/packages.config delete mode 100644 csharp-net45/docs/AllApi.md delete mode 100644 csharp-net45/docs/DataSetApi.md delete mode 100644 csharp-net45/docs/DataSetResponse.md delete mode 100644 csharp-net45/docs/Error.md delete mode 100644 csharp-net45/docs/ErrorResponse.md delete mode 100644 csharp-net45/docs/JobApi.md delete mode 100644 csharp-net45/docs/Lifecycle.md delete mode 100644 csharp-net45/docs/MergeJob.md delete mode 100644 csharp-net45/docs/MergeJobResponse.md delete mode 100644 csharp-net45/docs/MergeSettings.md delete mode 100644 csharp-net45/docs/OutputSettings.md delete mode 100644 csharp-net45/docs/OwnerInfo.md delete mode 100644 csharp-net45/docs/ResultStreamRequest.md delete mode 100644 csharp-net45/docs/StorageLocation.md delete mode 100644 csharp-net45/docs/StreamLocation.md delete mode 100644 csharp-net45/docs/TemplateApi.md delete mode 100644 csharp-net45/docs/TemplateContext.md delete mode 100644 csharp-net45/docs/TemplateContextRequest.md delete mode 100644 csharp-net45/docs/TemplateContextResponse.md delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Api/AllApi.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Api/DataSetApi.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Api/JobApi.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Api/TemplateApi.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ApiClient.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ApiException.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ApiResponse.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/Configuration.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ExceptionFactory.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/IApiAccessor.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/SwaggerDateConverter.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/DataSetResponse.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/Error.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/ErrorResponse.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/Lifecycle.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/MergeJob.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/MergeJobResponse.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/MergeSettings.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/OutputSettings.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/OwnerInfo.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/ResultStreamRequest.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/StorageLocation.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/StreamLocation.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContext.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextRequest.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextResponse.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Properties/AssemblyInfo.cs delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Sphereon.SDK.TemplateProcessor.csproj delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/Sphereon.SDK.TemplateProcessor.nuspec delete mode 100644 csharp-net45/src/Sphereon.SDK.TemplateProcessor/packages.config delete mode 100644 java8-jersey2/docs/AllApi.md delete mode 100644 java8-jersey2/docs/DataSetApi.md delete mode 100644 java8-jersey2/docs/DataSetResponse.md delete mode 100644 java8-jersey2/docs/Error.md delete mode 100644 java8-jersey2/docs/ErrorResponse.md delete mode 100644 java8-jersey2/docs/JobApi.md delete mode 100644 java8-jersey2/docs/Lifecycle.md delete mode 100644 java8-jersey2/docs/MergeJob.md delete mode 100644 java8-jersey2/docs/MergeJobResponse.md delete mode 100644 java8-jersey2/docs/MergeSettings.md delete mode 100644 java8-jersey2/docs/OutputSettings.md delete mode 100644 java8-jersey2/docs/OwnerInfo.md delete mode 100644 java8-jersey2/docs/ResultStreamRequest.md delete mode 100644 java8-jersey2/docs/StorageLocation.md delete mode 100644 java8-jersey2/docs/StreamLocation.md delete mode 100644 java8-jersey2/docs/TemplateApi.md delete mode 100644 java8-jersey2/docs/TemplateContext.md delete mode 100644 java8-jersey2/docs/TemplateContextRequest.md delete mode 100644 java8-jersey2/docs/TemplateContextResponse.md delete mode 100644 java8-jersey2/src/main/AndroidManifest.xml delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/AllApi.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/DataSetApi.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/JobApi.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/api/TemplateApi.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiException.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/Configuration.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/JSON.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/Pair.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/RFC3339DateFormat.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/Authentication.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/HttpBasicAuth.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/Error.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/ResultStreamRequest.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/StorageLocation.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java delete mode 100644 java8-jersey2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java delete mode 100644 java8-okhttp-gson/docs/AllApi.md delete mode 100644 java8-okhttp-gson/docs/DataSetApi.md delete mode 100644 java8-okhttp-gson/docs/DataSetResponse.md delete mode 100644 java8-okhttp-gson/docs/Error.md delete mode 100644 java8-okhttp-gson/docs/ErrorResponse.md delete mode 100644 java8-okhttp-gson/docs/JobApi.md delete mode 100644 java8-okhttp-gson/docs/Lifecycle.md delete mode 100644 java8-okhttp-gson/docs/MergeJob.md delete mode 100644 java8-okhttp-gson/docs/MergeJobResponse.md delete mode 100644 java8-okhttp-gson/docs/MergeSettings.md delete mode 100644 java8-okhttp-gson/docs/OutputSettings.md delete mode 100644 java8-okhttp-gson/docs/OwnerInfo.md delete mode 100644 java8-okhttp-gson/docs/ResultStreamRequest.md delete mode 100644 java8-okhttp-gson/docs/StorageLocation.md delete mode 100644 java8-okhttp-gson/docs/StreamLocation.md delete mode 100644 java8-okhttp-gson/docs/TemplateApi.md delete mode 100644 java8-okhttp-gson/docs/TemplateContext.md delete mode 100644 java8-okhttp-gson/docs/TemplateContextRequest.md delete mode 100644 java8-okhttp-gson/docs/TemplateContextResponse.md delete mode 100644 java8-okhttp-gson/pom.xml delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/AllApi.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/DataSetApi.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/JobApi.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/api/TemplateApi.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiCallback.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiException.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ApiResponse.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Configuration.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/GzipRequestInterceptor.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/JSON.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/Pair.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ProgressRequestBody.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/ProgressResponseBody.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/Authentication.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/HttpBasicAuth.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Error.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/ResultStreamRequest.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/StorageLocation.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java delete mode 100644 java8-okhttp-gson/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java delete mode 100644 java8-retrofit2/docs/AllApi.md delete mode 100644 java8-retrofit2/docs/DataSetApi.md delete mode 100644 java8-retrofit2/docs/DataSetResponse.md delete mode 100644 java8-retrofit2/docs/Error.md delete mode 100644 java8-retrofit2/docs/ErrorResponse.md delete mode 100644 java8-retrofit2/docs/JobApi.md delete mode 100644 java8-retrofit2/docs/Lifecycle.md delete mode 100644 java8-retrofit2/docs/MergeJob.md delete mode 100644 java8-retrofit2/docs/MergeJobResponse.md delete mode 100644 java8-retrofit2/docs/MergeSettings.md delete mode 100644 java8-retrofit2/docs/OutputSettings.md delete mode 100644 java8-retrofit2/docs/OwnerInfo.md delete mode 100644 java8-retrofit2/docs/ResultStreamRequest.md delete mode 100644 java8-retrofit2/docs/StorageLocation.md delete mode 100644 java8-retrofit2/docs/StreamLocation.md delete mode 100644 java8-retrofit2/docs/TemplateApi.md delete mode 100644 java8-retrofit2/docs/TemplateContext.md delete mode 100644 java8-retrofit2/docs/TemplateContextRequest.md delete mode 100644 java8-retrofit2/docs/TemplateContextResponse.md delete mode 100644 java8-retrofit2/src/main/AndroidManifest.xml delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/AllApi.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/DataSetApi.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/JobApi.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/api/TemplateApi.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/ApiClient.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/CollectionFormats.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/StringUtil.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/ApiKeyAuth.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/HttpBasicAuth.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuth.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthFlow.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/handler/auth/OAuthOkHttpClient.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/DataSetResponse.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/Error.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/ErrorResponse.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/Lifecycle.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJob.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeJobResponse.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/MergeSettings.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/OutputSettings.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/OwnerInfo.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/ResultStreamRequest.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/StorageLocation.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/StreamLocation.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContext.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextRequest.java delete mode 100644 java8-retrofit2/src/main/java/com/sphereon/sdk/template_processor/model/TemplateContextResponse.java delete mode 100644 javascript/docs/AllApi.md delete mode 100644 javascript/docs/DataSetApi.md delete mode 100644 javascript/docs/DataSetResponse.md delete mode 100644 javascript/docs/Error.md delete mode 100644 javascript/docs/ErrorResponse.md delete mode 100644 javascript/docs/JobApi.md delete mode 100644 javascript/docs/Lifecycle.md delete mode 100644 javascript/docs/MergeJob.md delete mode 100644 javascript/docs/MergeJobResponse.md delete mode 100644 javascript/docs/MergeSettings.md delete mode 100644 javascript/docs/OutputSettings.md delete mode 100644 javascript/docs/OwnerInfo.md delete mode 100644 javascript/docs/ResultStreamRequest.md delete mode 100644 javascript/docs/StorageLocation.md delete mode 100644 javascript/docs/StreamLocation.md delete mode 100644 javascript/docs/TemplateApi.md delete mode 100644 javascript/docs/TemplateContext.md delete mode 100644 javascript/docs/TemplateContextRequest.md delete mode 100644 javascript/docs/TemplateContextResponse.md delete mode 100644 javascript/src/ApiClient.js delete mode 100644 javascript/src/SphereonTemplateProcessor/api/AllApi.js delete mode 100644 javascript/src/SphereonTemplateProcessor/api/DataSetApi.js delete mode 100644 javascript/src/SphereonTemplateProcessor/api/JobApi.js delete mode 100644 javascript/src/SphereonTemplateProcessor/api/TemplateApi.js delete mode 100644 javascript/src/SphereonTemplateProcessor/model/DataSetResponse.js delete mode 100644 javascript/src/SphereonTemplateProcessor/model/Error.js delete mode 100644 javascript/src/SphereonTemplateProcessor/model/ErrorResponse.js delete mode 100644 javascript/src/SphereonTemplateProcessor/model/Lifecycle.js delete mode 100644 javascript/src/SphereonTemplateProcessor/model/MergeJob.js delete mode 100644 javascript/src/SphereonTemplateProcessor/model/MergeJobResponse.js delete mode 100644 javascript/src/SphereonTemplateProcessor/model/MergeSettings.js delete mode 100644 javascript/src/SphereonTemplateProcessor/model/OutputSettings.js delete mode 100644 javascript/src/SphereonTemplateProcessor/model/OwnerInfo.js delete mode 100644 javascript/src/SphereonTemplateProcessor/model/ResultStreamRequest.js delete mode 100644 javascript/src/SphereonTemplateProcessor/model/StorageLocation.js delete mode 100644 javascript/src/SphereonTemplateProcessor/model/StreamLocation.js delete mode 100644 javascript/src/SphereonTemplateProcessor/model/TemplateContext.js delete mode 100644 javascript/src/SphereonTemplateProcessor/model/TemplateContextRequest.js delete mode 100644 javascript/src/SphereonTemplateProcessor/model/TemplateContextResponse.js delete mode 100644 javascript/src/index.js diff --git a/.gitignore b/.gitignore index fc3a0b9..79cdd3f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,42 +1,54 @@ -config-db/ - -# Compiled class file +#Project sources +java8-jersey2/src/main +java8-okhttp-gson/src/main +java8-retrofit2/src/main +csharp-net35/src/Sphereon.SDK.TemplateProcessor +csharp-net45/src/Sphereon.SDK.TemplateProcessor +javascript/src +html-docs/index.html +node_modules/ +docs/ + +# Visual Studio +.vs/ +bin/ +obj/ +packages/ +*.ncb +*.suo +*ReSharper* +Debug/ +*.user +*.lnk + +# Java *.class -# Log file -*.log - -# BlueJ files -*.ctxt - -# Mobile Tools for Java (J2ME) -.mtj.tmp/ - # Package Files # *.jar *.war *.ear -*.zip -*.tar.gz -*.rar # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* +# Log files +log.* -target/ -!.mvn/wrapper/maven-wrapper.jar - -### STS ### -.apt_generated -.classpath -.factorypath -.project -.settings -.springBeans - -### IntelliJ IDEA ### -.idea -*.iws +#Intellij *.iml -*.ipr +.idea/ + +#Maven +target/ +pom.xml.tag +pom.xml.releaseBackup +pom.xml.versionsBackup +pom.xml.next +release.properties +dependency-reduced-pom.xml +buildNumber.properties +.mvn/timing.properties + +applog* + diff --git a/csharp-net35/.gitignore b/csharp-net35/.gitignore index d3f4f7b..17302c9 100644 --- a/csharp-net35/.gitignore +++ b/csharp-net35/.gitignore @@ -6,6 +6,7 @@ *.suo *.user *.sln.docstates +./nuget # Build results diff --git a/csharp-net35/.swagger-codegen/VERSION b/csharp-net35/.swagger-codegen/VERSION index 6b4d157..a625450 100644 --- a/csharp-net35/.swagger-codegen/VERSION +++ b/csharp-net35/.swagger-codegen/VERSION @@ -1 +1 @@ -2.2.3 \ No newline at end of file +2.3.1 \ No newline at end of file diff --git a/csharp-net35/README.md b/csharp-net35/README.md index d5dc9c8..a0e9c09 100644 --- a/csharp-net35/README.md +++ b/csharp-net35/README.md @@ -5,7 +5,7 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - API version: 0.1 -- SDK version: 1.0.0 +- SDK version: 0.1.1 - Build package: io.swagger.codegen.languages.CSharpClientCodegen For more information, please visit [https://sphereon.com](https://sphereon.com) @@ -18,11 +18,13 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.c ## Dependencies - [RestSharp](https://www.nuget.org/packages/RestSharp) - 105.1.0 or later - [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 7.0.0 or later +- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.2.0 or later The DLLs included in the package may not be the latest version. We recommend using [NuGet] (https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages: ``` Install-Package RestSharp Install-Package Newtonsoft.Json +Install-Package JsonSubTypes ``` NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See [RestSharp#742](https://github.com/restsharp/RestSharp/issues/742) @@ -94,40 +96,41 @@ namespace Example ## Documentation for API Endpoints -All URIs are relative to *https://gw.api.cloud.sphereon.com* +All URIs are relative to *https://gw.api.cloud.sphereon.com/template/processor/0.1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AllApi* | [**CreateDataSet**](docs/AllApi.md#createdataset) | **POST** /template/processor/0.1/datasets | Store dataset -*AllApi* | [**CreateTemplateContext**](docs/AllApi.md#createtemplatecontext) | **POST** /template/processor/0.1/templates | Create template context -*AllApi* | [**DeleteDataSet**](docs/AllApi.md#deletedataset) | **DELETE** /template/processor/0.1/datasets/{dataSetId} | Delete a stored data set -*AllApi* | [**DeleteJob**](docs/AllApi.md#deletejob) | **DELETE** /template/processor/0.1/jobs/{jobId} | Delete a job manually -*AllApi* | [**DeleteTemplateContext**](docs/AllApi.md#deletetemplatecontext) | **DELETE** /template/processor/0.1/templates/{templateId} | Delete template context -*AllApi* | [**GetJob**](docs/AllApi.md#getjob) | **GET** /template/processor/0.1/jobs/{jobId} | Job definition and state -*AllApi* | [**GetJobs**](docs/AllApi.md#getjobs) | **GET** /template/processor/0.1/jobs | Get all jobs -*AllApi* | [**GetResultStream**](docs/AllApi.md#getresultstream) | **PUT** /template/processor/0.1/jobs/{jobId}/result/stream | Get the result file -*AllApi* | [**GetResultStreamsAsContainer**](docs/AllApi.md#getresultstreamsascontainer) | **PUT** /template/processor/0.1/jobs/{jobId}/result/container | Get the result file -*AllApi* | [**GetTemplateContext**](docs/AllApi.md#gettemplatecontext) | **GET** /template/processor/0.1/templates/{templateId} | Get template context -*AllApi* | [**SubmitJob**](docs/AllApi.md#submitjob) | **PUT** /template/processor/0.1/jobs | Submit merge job for processing -*AllApi* | [**UpdateTemplateContext**](docs/AllApi.md#updatetemplatecontext) | **PUT** /template/processor/0.1/templates | Update template context -*AllApi* | [**UploadTemplateFile**](docs/AllApi.md#uploadtemplatefile) | **POST** /template/processor/0.1/templates/{templateId} | Upload template file -*DataSetApi* | [**CreateDataSet**](docs/DataSetApi.md#createdataset) | **POST** /template/processor/0.1/datasets | Store dataset -*DataSetApi* | [**DeleteDataSet**](docs/DataSetApi.md#deletedataset) | **DELETE** /template/processor/0.1/datasets/{dataSetId} | Delete a stored data set -*JobApi* | [**GetJob**](docs/JobApi.md#getjob) | **GET** /template/processor/0.1/jobs/{jobId} | Job definition and state -*JobApi* | [**GetJobs**](docs/JobApi.md#getjobs) | **GET** /template/processor/0.1/jobs | Get all jobs -*JobApi* | [**GetResultStream**](docs/JobApi.md#getresultstream) | **PUT** /template/processor/0.1/jobs/{jobId}/result/stream | Get the result file -*JobApi* | [**GetResultStreamsAsContainer**](docs/JobApi.md#getresultstreamsascontainer) | **PUT** /template/processor/0.1/jobs/{jobId}/result/container | Get the result file -*JobApi* | [**SubmitJob**](docs/JobApi.md#submitjob) | **PUT** /template/processor/0.1/jobs | Submit merge job for processing -*TemplateApi* | [**CreateTemplateContext**](docs/TemplateApi.md#createtemplatecontext) | **POST** /template/processor/0.1/templates | Create template context -*TemplateApi* | [**DeleteTemplateContext**](docs/TemplateApi.md#deletetemplatecontext) | **DELETE** /template/processor/0.1/templates/{templateId} | Delete template context -*TemplateApi* | [**GetTemplateContext**](docs/TemplateApi.md#gettemplatecontext) | **GET** /template/processor/0.1/templates/{templateId} | Get template context -*TemplateApi* | [**UpdateTemplateContext**](docs/TemplateApi.md#updatetemplatecontext) | **PUT** /template/processor/0.1/templates | Update template context -*TemplateApi* | [**UploadTemplateFile**](docs/TemplateApi.md#uploadtemplatefile) | **POST** /template/processor/0.1/templates/{templateId} | Upload template file +*AllApi* | [**CreateDataSet**](docs/AllApi.md#createdataset) | **POST** /datasets | Store dataset +*AllApi* | [**CreateTemplateContext**](docs/AllApi.md#createtemplatecontext) | **POST** /templates | Create template context +*AllApi* | [**DeleteDataSet**](docs/AllApi.md#deletedataset) | **DELETE** /datasets/{dataSetId} | Delete a stored data set +*AllApi* | [**DeleteJob**](docs/AllApi.md#deletejob) | **DELETE** /jobs/{jobId} | Delete a job manually +*AllApi* | [**DeleteTemplateContext**](docs/AllApi.md#deletetemplatecontext) | **DELETE** /templates/{templateId} | Delete template context +*AllApi* | [**GetJob**](docs/AllApi.md#getjob) | **GET** /jobs/{jobId} | Job definition and state +*AllApi* | [**GetJobs**](docs/AllApi.md#getjobs) | **GET** /jobs | Get all jobs +*AllApi* | [**GetResultStream**](docs/AllApi.md#getresultstream) | **PUT** /jobs/{jobId}/result/stream | Get the result file +*AllApi* | [**GetResultStreamsAsContainer**](docs/AllApi.md#getresultstreamsascontainer) | **PUT** /jobs/{jobId}/result/container | Get the result file +*AllApi* | [**GetTemplateContext**](docs/AllApi.md#gettemplatecontext) | **GET** /templates/{templateId} | Get template context +*AllApi* | [**SubmitJob**](docs/AllApi.md#submitjob) | **PUT** /jobs | Submit merge job for processing +*AllApi* | [**UpdateTemplateContext**](docs/AllApi.md#updatetemplatecontext) | **PUT** /templates | Update template context +*AllApi* | [**UploadTemplateFile**](docs/AllApi.md#uploadtemplatefile) | **POST** /templates/{templateId} | Upload template file +*DataSetApi* | [**CreateDataSet**](docs/DataSetApi.md#createdataset) | **POST** /datasets | Store dataset +*DataSetApi* | [**DeleteDataSet**](docs/DataSetApi.md#deletedataset) | **DELETE** /datasets/{dataSetId} | Delete a stored data set +*JobApi* | [**GetJob**](docs/JobApi.md#getjob) | **GET** /jobs/{jobId} | Job definition and state +*JobApi* | [**GetJobs**](docs/JobApi.md#getjobs) | **GET** /jobs | Get all jobs +*JobApi* | [**GetResultStream**](docs/JobApi.md#getresultstream) | **PUT** /jobs/{jobId}/result/stream | Get the result file +*JobApi* | [**GetResultStreamsAsContainer**](docs/JobApi.md#getresultstreamsascontainer) | **PUT** /jobs/{jobId}/result/container | Get the result file +*JobApi* | [**SubmitJob**](docs/JobApi.md#submitjob) | **PUT** /jobs | Submit merge job for processing +*TemplateApi* | [**CreateTemplateContext**](docs/TemplateApi.md#createtemplatecontext) | **POST** /templates | Create template context +*TemplateApi* | [**DeleteTemplateContext**](docs/TemplateApi.md#deletetemplatecontext) | **DELETE** /templates/{templateId} | Delete template context +*TemplateApi* | [**GetTemplateContext**](docs/TemplateApi.md#gettemplatecontext) | **GET** /templates/{templateId} | Get template context +*TemplateApi* | [**UpdateTemplateContext**](docs/TemplateApi.md#updatetemplatecontext) | **PUT** /templates | Update template context +*TemplateApi* | [**UploadTemplateFile**](docs/TemplateApi.md#uploadtemplatefile) | **POST** /templates/{templateId} | Upload template file ## Documentation for Models + - [Model.ClaimParameters](docs/ClaimParameters.md) - [Model.DataSetResponse](docs/DataSetResponse.md) - [Model.Error](docs/Error.md) - [Model.ErrorResponse](docs/ErrorResponse.md) diff --git a/csharp-net35/Sphereon.SDK.TemplateProcessor.sln b/csharp-net35/Sphereon.SDK.TemplateProcessor.sln index 5ce23ba..16c67b0 100644 --- a/csharp-net35/Sphereon.SDK.TemplateProcessor.sln +++ b/csharp-net35/Sphereon.SDK.TemplateProcessor.sln @@ -2,26 +2,26 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 VisualStudioVersion = 12.0.0.0 MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sphereon.SDK.TemplateProcessor", "src\Sphereon.SDK.TemplateProcessor\Sphereon.SDK.TemplateProcessor.csproj", "{A4487355-F30B-40E2-AB78-4E09BCD1E978}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sphereon.SDK.TemplateProcessor", "src\Sphereon.SDK.TemplateProcessor\Sphereon.SDK.TemplateProcessor.csproj", "{0F9BCF2C-D135-4673-945D-26B12ED8FD21}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sphereon.SDK.TemplateProcessor.Test", "src\Sphereon.SDK.TemplateProcessor.Test\Sphereon.SDK.TemplateProcessor.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" EndProject Global -GlobalSection(SolutionConfigurationPlatforms) = preSolution -Debug|Any CPU = Debug|Any CPU -Release|Any CPU = Release|Any CPU -EndGlobalSection -GlobalSection(ProjectConfigurationPlatforms) = postSolution -{A4487355-F30B-40E2-AB78-4E09BCD1E978}.Debug|Any CPU.ActiveCfg = Debug|Any CPU -{A4487355-F30B-40E2-AB78-4E09BCD1E978}.Debug|Any CPU.Build.0 = Debug|Any CPU -{A4487355-F30B-40E2-AB78-4E09BCD1E978}.Release|Any CPU.ActiveCfg = Release|Any CPU -{A4487355-F30B-40E2-AB78-4E09BCD1E978}.Release|Any CPU.Build.0 = Release|Any CPU -{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU -{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU -{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU -{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU -EndGlobalSection -GlobalSection(SolutionProperties) = preSolution -HideSolutionNode = FALSE -EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0F9BCF2C-D135-4673-945D-26B12ED8FD21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0F9BCF2C-D135-4673-945D-26B12ED8FD21}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0F9BCF2C-D135-4673-945D-26B12ED8FD21}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0F9BCF2C-D135-4673-945D-26B12ED8FD21}.Release|Any CPU.Build.0 = Release|Any CPU + {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU + {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU + {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection EndGlobal \ No newline at end of file diff --git a/csharp-net35/build.bat b/csharp-net35/build.bat index 96fa82d..07fccca 100644 --- a/csharp-net35/build.bat +++ b/csharp-net35/build.bat @@ -11,6 +11,7 @@ if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient if not exist ".\bin" mkdir bin copy packages\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll +copy packages\JsonSubTypes.1.2.0\lib\net35\JsonSubTypes.dll bin\JsonSubTypes.dll copy packages\RestSharp.105.1.0\lib\net35\RestSharp.dll bin\RestSharp.dll -%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll /target:library /out:bin\Sphereon.SDK.TemplateProcessor.dll /recurse:src\Sphereon.SDK.TemplateProcessor\*.cs /doc:bin\Sphereon.SDK.TemplateProcessor.xml +%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\JsonSubTypes.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll /target:library /out:bin\Sphereon.SDK.TemplateProcessor.dll /recurse:src\Sphereon.SDK.TemplateProcessor\*.cs /doc:bin\Sphereon.SDK.TemplateProcessor.xml diff --git a/csharp-net35/build.sh b/csharp-net35/build.sh index aa1bcea..37f6619 100644 --- a/csharp-net35/build.sh +++ b/csharp-net35/build.sh @@ -4,22 +4,52 @@ # frameworkVersion=net35 -netfx=${frameworkVersion#net} + +# sdk must match installed framworks under PREFIX/lib/mono/[value] +sdk=4 + +# langversion refers to C# language features. see man mcs for details. +langversion=${sdk} +nuget_cmd=nuget + +# Match against our known SDK possibilities +case "${sdk}" in + 4) + langversion=4 + ;; + 4.5*) + langversion=5 + ;; + 4.6*) + langversion=6 + ;; + 4.7*) + langversion=7 # ignoring 7.1 for now. + ;; + *) + langversion=6 + ;; +esac echo "[INFO] Target framework: ${frameworkVersion}" -echo "[INFO] Download nuget and packages" -wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe; +if ! type nuget &>/dev/null; then + echo "[INFO] Download nuget and packages" + wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe; + nuget_cmd="mono nuget.exe" +fi + mozroots --import --sync -mono nuget.exe install src/Sphereon.SDK.TemplateProcessor/packages.config -o packages; +${nuget_cmd} install src/Sphereon.SDK.TemplateProcessor/packages.config -o packages; echo "[INFO] Copy DLLs to the 'bin' folder" mkdir -p bin; cp packages/Newtonsoft.Json.10.0.3/lib/net35/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; cp packages/RestSharp.105.1.0/lib/net35/RestSharp.dll bin/RestSharp.dll; +cp packages/JsonSubTypes.1.2.0/lib/net35/JsonSubTypes.dll bin/JsonSubTypes.dll echo "[INFO] Run 'mcs' to build bin/Sphereon.SDK.TemplateProcessor.dll" -mcs -sdk:${netfx} -r:bin/Newtonsoft.Json.dll,\ +mcs -langversion:${langversion} -sdk:${sdk} -r:bin/Newtonsoft.Json.dll,bin/JsonSubTypes.dll,\ bin/RestSharp.dll,\ System.ComponentModel.DataAnnotations.dll,\ System.Runtime.Serialization.dll \ diff --git a/csharp-net35/docs/AllApi.md b/csharp-net35/docs/AllApi.md deleted file mode 100644 index ef146e3..0000000 --- a/csharp-net35/docs/AllApi.md +++ /dev/null @@ -1,859 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Api.AllApi - -All URIs are relative to *https://gw.api.cloud.sphereon.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateDataSet**](AllApi.md#createdataset) | **POST** /template/processor/0.1/datasets | Store dataset -[**CreateTemplateContext**](AllApi.md#createtemplatecontext) | **POST** /template/processor/0.1/templates | Create template context -[**DeleteDataSet**](AllApi.md#deletedataset) | **DELETE** /template/processor/0.1/datasets/{dataSetId} | Delete a stored data set -[**DeleteJob**](AllApi.md#deletejob) | **DELETE** /template/processor/0.1/jobs/{jobId} | Delete a job manually -[**DeleteTemplateContext**](AllApi.md#deletetemplatecontext) | **DELETE** /template/processor/0.1/templates/{templateId} | Delete template context -[**GetJob**](AllApi.md#getjob) | **GET** /template/processor/0.1/jobs/{jobId} | Job definition and state -[**GetJobs**](AllApi.md#getjobs) | **GET** /template/processor/0.1/jobs | Get all jobs -[**GetResultStream**](AllApi.md#getresultstream) | **PUT** /template/processor/0.1/jobs/{jobId}/result/stream | Get the result file -[**GetResultStreamsAsContainer**](AllApi.md#getresultstreamsascontainer) | **PUT** /template/processor/0.1/jobs/{jobId}/result/container | Get the result file -[**GetTemplateContext**](AllApi.md#gettemplatecontext) | **GET** /template/processor/0.1/templates/{templateId} | Get template context -[**SubmitJob**](AllApi.md#submitjob) | **PUT** /template/processor/0.1/jobs | Submit merge job for processing -[**UpdateTemplateContext**](AllApi.md#updatetemplatecontext) | **PUT** /template/processor/0.1/templates | Update template context -[**UploadTemplateFile**](AllApi.md#uploadtemplatefile) | **POST** /template/processor/0.1/templates/{templateId} | Upload template file - - - -# **CreateDataSet** -> DataSetResponse CreateDataSet (string payload) - -Store dataset - -Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class CreateDataSetExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var payload = payload_example; // string | The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - - try - { - // Store dataset - DataSetResponse result = apiInstance.CreateDataSet(payload); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.CreateDataSet: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **payload** | **string**| The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] | - -### Return type - -[**DataSetResponse**](DataSetResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **CreateTemplateContext** -> TemplateContextResponse CreateTemplateContext (TemplateContextRequest templateRequest) - -Create template context - -Create a unique template context for your environment - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class CreateTemplateContextExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var templateRequest = new TemplateContextRequest(); // TemplateContextRequest | The template request - - try - { - // Create template context - TemplateContextResponse result = apiInstance.CreateTemplateContext(templateRequest); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.CreateTemplateContext: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| The template request | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **DeleteDataSet** -> DataSetResponse DeleteDataSet (string dataSetId) - -Delete a stored data set - -Delete a stored data set - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class DeleteDataSetExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var dataSetId = dataSetId_example; // string | dataSetId - - try - { - // Delete a stored data set - DataSetResponse result = apiInstance.DeleteDataSet(dataSetId); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.DeleteDataSet: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **dataSetId** | **string**| dataSetId | - -### Return type - -[**DataSetResponse**](DataSetResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **DeleteJob** -> MergeJobResponse DeleteJob (string jobId) - -Delete a job manually - -Delete the merge job and all related files - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class DeleteJobExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var jobId = jobId_example; // string | jobId - - try - { - // Delete a job manually - MergeJobResponse result = apiInstance.DeleteJob(jobId); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.DeleteJob: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **string**| jobId | - -### Return type - -[**MergeJobResponse**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **DeleteTemplateContext** -> TemplateContextResponse DeleteTemplateContext (string templateId) - -Delete template context - -Delete a template context with all history - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class DeleteTemplateContextExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var templateId = templateId_example; // string | templateId - - try - { - // Delete template context - TemplateContextResponse result = apiInstance.DeleteTemplateContext(templateId); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.DeleteTemplateContext: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateId** | **string**| templateId | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetJob** -> MergeJobResponse GetJob (string jobId) - -Job definition and state - -Get the merge job definition and current state. Please not that you can differentiate based on http response status - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class GetJobExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var jobId = jobId_example; // string | jobId - - try - { - // Job definition and state - MergeJobResponse result = apiInstance.GetJob(jobId); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.GetJob: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **string**| jobId | - -### Return type - -[**MergeJobResponse**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetJobs** -> List GetJobs (List status = null) - -Get all jobs - -Get all office text job definitions and their current state. - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class GetJobsExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var status = new List(); // List | A list of status to filter on. (optional) - - try - { - // Get all jobs - List<MergeJobResponse> result = apiInstance.GetJobs(status); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.GetJobs: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<string>**](string.md)| A list of status to filter on. | [optional] - -### Return type - -[**List**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetResultStream** -> byte[] GetResultStream (string jobId, ResultStreamRequest resultStreamRequest) - -Get the result file - -Get a merge result document as a binary stream. - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class GetResultStreamExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var jobId = jobId_example; // string | jobId - var resultStreamRequest = new ResultStreamRequest(); // ResultStreamRequest | resultStreamRequest - - try - { - // Get the result file - byte[] result = apiInstance.GetResultStream(jobId, resultStreamRequest); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.GetResultStream: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **string**| jobId | - **resultStreamRequest** | [**ResultStreamRequest**](ResultStreamRequest.md)| resultStreamRequest | - -### Return type - -**byte[]** - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/octet-stream - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetResultStreamsAsContainer** -> byte[] GetResultStreamsAsContainer (string jobId, OutputSettings outputSettings = null) - -Get the result file - -Get all documents inside a compressed container as a binary stream. - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class GetResultStreamsAsContainerExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var jobId = jobId_example; // string | jobId - var outputSettings = new OutputSettings(); // OutputSettings | outputSettings (optional) - - try - { - // Get the result file - byte[] result = apiInstance.GetResultStreamsAsContainer(jobId, outputSettings); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.GetResultStreamsAsContainer: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **string**| jobId | - **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] - -### Return type - -**byte[]** - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/octet-stream - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetTemplateContext** -> TemplateContextResponse GetTemplateContext (string templateId) - -Get template context - -Get an existing template context - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class GetTemplateContextExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var templateId = templateId_example; // string | The template context name unique for your environment - - try - { - // Get template context - TemplateContextResponse result = apiInstance.GetTemplateContext(templateId); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.GetTemplateContext: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateId** | **string**| The template context name unique for your environment | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **SubmitJob** -> MergeJobResponse SubmitJob (MergeSettings mergesettings) - -Submit merge job for processing - -Submit merge job run. - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class SubmitJobExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var mergesettings = new MergeSettings(); // MergeSettings | The merge- and output settings - - try - { - // Submit merge job for processing - MergeJobResponse result = apiInstance.SubmitJob(mergesettings); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.SubmitJob: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **mergesettings** | [**MergeSettings**](MergeSettings.md)| The merge- and output settings | - -### Return type - -[**MergeJobResponse**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **UpdateTemplateContext** -> TemplateContextResponse UpdateTemplateContext (TemplateContext templateContext) - -Update template context - -Update an existing template context for your environment - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class UpdateTemplateContextExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var templateContext = new TemplateContext(); // TemplateContext | templateContext - - try - { - // Update template context - TemplateContextResponse result = apiInstance.UpdateTemplateContext(templateContext); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.UpdateTemplateContext: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateContext** | [**TemplateContext**](TemplateContext.md)| templateContext | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **UploadTemplateFile** -> TemplateContextResponse UploadTemplateFile (string templateId, System.IO.Stream stream) - -Upload template file - -Upload the Office template file - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class UploadTemplateFileExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var templateId = templateId_example; // string | The template context name unique for your environment - var stream = new System.IO.Stream(); // System.IO.Stream | The template (file/inputstream) to store - - try - { - // Upload template file - TemplateContextResponse result = apiInstance.UploadTemplateFile(templateId, stream); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.UploadTemplateFile: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateId** | **string**| The template context name unique for your environment | - **stream** | **System.IO.Stream**| The template (file/inputstream) to store | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/csharp-net35/docs/DataSetApi.md b/csharp-net35/docs/DataSetApi.md deleted file mode 100644 index 9429521..0000000 --- a/csharp-net35/docs/DataSetApi.md +++ /dev/null @@ -1,138 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Api.DataSetApi - -All URIs are relative to *https://gw.api.cloud.sphereon.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateDataSet**](DataSetApi.md#createdataset) | **POST** /template/processor/0.1/datasets | Store dataset -[**DeleteDataSet**](DataSetApi.md#deletedataset) | **DELETE** /template/processor/0.1/datasets/{dataSetId} | Delete a stored data set - - - -# **CreateDataSet** -> DataSetResponse CreateDataSet (string payload) - -Store dataset - -Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class CreateDataSetExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new DataSetApi(); - var payload = payload_example; // string | The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - - try - { - // Store dataset - DataSetResponse result = apiInstance.CreateDataSet(payload); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling DataSetApi.CreateDataSet: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **payload** | **string**| The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] | - -### Return type - -[**DataSetResponse**](DataSetResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **DeleteDataSet** -> DataSetResponse DeleteDataSet (string dataSetId) - -Delete a stored data set - -Delete a stored data set - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class DeleteDataSetExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new DataSetApi(); - var dataSetId = dataSetId_example; // string | dataSetId - - try - { - // Delete a stored data set - DataSetResponse result = apiInstance.DeleteDataSet(dataSetId); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling DataSetApi.DeleteDataSet: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **dataSetId** | **string**| dataSetId | - -### Return type - -[**DataSetResponse**](DataSetResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/csharp-net35/docs/DataSetResponse.md b/csharp-net35/docs/DataSetResponse.md deleted file mode 100644 index e844d50..0000000 --- a/csharp-net35/docs/DataSetResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.DataSetResponse -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CompletionTime** | **DateTime?** | The completion date/time of this template in ISO 8601 format | [optional] -**CreationTime** | **DateTime?** | The creation date/time of this template in ISO 8601 format | [optional] -**Id** | **string** | Unique dataset id | -**Status** | **string** | The status of the template | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net35/docs/Error.md b/csharp-net35/docs/Error.md deleted file mode 100644 index e341298..0000000 --- a/csharp-net35/docs/Error.md +++ /dev/null @@ -1,12 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.Error -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Code** | **string** | | -**Level** | **string** | | -**Cause** | [**Error**](Error.md) | | [optional] -**Message** | **string** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net35/docs/ErrorResponse.md b/csharp-net35/docs/ErrorResponse.md deleted file mode 100644 index 7d4532d..0000000 --- a/csharp-net35/docs/ErrorResponse.md +++ /dev/null @@ -1,9 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.ErrorResponse -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**List<Error>**](Error.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net35/docs/JobApi.md b/csharp-net35/docs/JobApi.md deleted file mode 100644 index 1d42bbe..0000000 --- a/csharp-net35/docs/JobApi.md +++ /dev/null @@ -1,337 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Api.JobApi - -All URIs are relative to *https://gw.api.cloud.sphereon.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetJob**](JobApi.md#getjob) | **GET** /template/processor/0.1/jobs/{jobId} | Job definition and state -[**GetJobs**](JobApi.md#getjobs) | **GET** /template/processor/0.1/jobs | Get all jobs -[**GetResultStream**](JobApi.md#getresultstream) | **PUT** /template/processor/0.1/jobs/{jobId}/result/stream | Get the result file -[**GetResultStreamsAsContainer**](JobApi.md#getresultstreamsascontainer) | **PUT** /template/processor/0.1/jobs/{jobId}/result/container | Get the result file -[**SubmitJob**](JobApi.md#submitjob) | **PUT** /template/processor/0.1/jobs | Submit merge job for processing - - - -# **GetJob** -> MergeJobResponse GetJob (string jobId) - -Job definition and state - -Get the merge job definition and current state. Please not that you can differentiate based on http response status - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class GetJobExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new JobApi(); - var jobId = jobId_example; // string | jobId - - try - { - // Job definition and state - MergeJobResponse result = apiInstance.GetJob(jobId); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling JobApi.GetJob: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **string**| jobId | - -### Return type - -[**MergeJobResponse**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetJobs** -> List GetJobs (List status = null) - -Get all jobs - -Get all office text job definitions and their current state. - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class GetJobsExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new JobApi(); - var status = new List(); // List | A list of status to filter on. (optional) - - try - { - // Get all jobs - List<MergeJobResponse> result = apiInstance.GetJobs(status); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling JobApi.GetJobs: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<string>**](string.md)| A list of status to filter on. | [optional] - -### Return type - -[**List**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetResultStream** -> byte[] GetResultStream (string jobId, ResultStreamRequest resultStreamRequest) - -Get the result file - -Get a merge result document as a binary stream. - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class GetResultStreamExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new JobApi(); - var jobId = jobId_example; // string | jobId - var resultStreamRequest = new ResultStreamRequest(); // ResultStreamRequest | resultStreamRequest - - try - { - // Get the result file - byte[] result = apiInstance.GetResultStream(jobId, resultStreamRequest); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling JobApi.GetResultStream: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **string**| jobId | - **resultStreamRequest** | [**ResultStreamRequest**](ResultStreamRequest.md)| resultStreamRequest | - -### Return type - -**byte[]** - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/octet-stream - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetResultStreamsAsContainer** -> byte[] GetResultStreamsAsContainer (string jobId, OutputSettings outputSettings = null) - -Get the result file - -Get all documents inside a compressed container as a binary stream. - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class GetResultStreamsAsContainerExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new JobApi(); - var jobId = jobId_example; // string | jobId - var outputSettings = new OutputSettings(); // OutputSettings | outputSettings (optional) - - try - { - // Get the result file - byte[] result = apiInstance.GetResultStreamsAsContainer(jobId, outputSettings); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling JobApi.GetResultStreamsAsContainer: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **string**| jobId | - **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] - -### Return type - -**byte[]** - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/octet-stream - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **SubmitJob** -> MergeJobResponse SubmitJob (MergeSettings mergesettings) - -Submit merge job for processing - -Submit merge job run. - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class SubmitJobExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new JobApi(); - var mergesettings = new MergeSettings(); // MergeSettings | The merge- and output settings - - try - { - // Submit merge job for processing - MergeJobResponse result = apiInstance.SubmitJob(mergesettings); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling JobApi.SubmitJob: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **mergesettings** | [**MergeSettings**](MergeSettings.md)| The merge- and output settings | - -### Return type - -[**MergeJobResponse**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/csharp-net35/docs/Lifecycle.md b/csharp-net35/docs/Lifecycle.md deleted file mode 100644 index c1f9138..0000000 --- a/csharp-net35/docs/Lifecycle.md +++ /dev/null @@ -1,11 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.Lifecycle -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ActionTime** | **DateTime?** | The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation | [optional] -**Action** | **string** | | [optional] -**Type** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net35/docs/MergeJob.md b/csharp-net35/docs/MergeJob.md deleted file mode 100644 index d051ecd..0000000 --- a/csharp-net35/docs/MergeJob.md +++ /dev/null @@ -1,18 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.MergeJob -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CompletionTime** | **DateTime?** | The completion date/time of this job in ISO 8601 format | [optional] -**JobId** | **string** | The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation | -**CreationTime** | **DateTime?** | The creation date/time of this job in ISO 8601 format | [optional] -**DataSetId** | **string** | Data set id | [optional] -**ResultStreams** | [**List<StreamLocation>**](StreamLocation.md) | The storage locations of the result files. | -**HeaderDataSetIds** | **List<string>** | Header data set ids | [optional] -**ResultStorageLocation** | [**StorageLocation**](StorageLocation.md) | The storage location. (optional) | [optional] -**MergeSettings** | [**MergeSettings**](MergeSettings.md) | | [optional] -**StatusMessage** | **string** | A status message, which can be informational, warning or error. A message here does not indicate an error perse | [optional] -**Status** | **string** | The status of the job | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net35/docs/MergeJobResponse.md b/csharp-net35/docs/MergeJobResponse.md deleted file mode 100644 index c31a8d8..0000000 --- a/csharp-net35/docs/MergeJobResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.MergeJobResponse -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**JobId** | **string** | The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation | -**Job** | [**MergeJob**](MergeJob.md) | | [optional] -**StatusMessage** | **string** | A status message, which can be informational, warning or error. AA message here does not indicate an error perse | [optional] -**Status** | **string** | The status of the job | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net35/docs/MergeSettings.md b/csharp-net35/docs/MergeSettings.md deleted file mode 100644 index 3c3200d..0000000 --- a/csharp-net35/docs/MergeSettings.md +++ /dev/null @@ -1,17 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.MergeSettings -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Lifecycle** | [**Lifecycle**](Lifecycle.md) | | [optional] -**MergeResult** | **string** | | [optional] -**DataSetId** | **string** | Data set id | -**Engine** | **string** | | [optional] -**HeaderDataSetIds** | **List<string>** | optional header data set ids | [optional] -**ResultStorageLocation** | [**StorageLocation**](StorageLocation.md) | The output location of the result files. | -**TemplateVersion** | **int?** | Template version | [optional] -**TemplateId** | **string** | Template id | -**OutputSettings** | [**OutputSettings**](OutputSettings.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net35/docs/OutputSettings.md b/csharp-net35/docs/OutputSettings.md deleted file mode 100644 index da7491f..0000000 --- a/csharp-net35/docs/OutputSettings.md +++ /dev/null @@ -1,10 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.OutputSettings -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DeliveryFormat** | **string** | | [optional] -**OutputFormat** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net35/docs/OwnerInfo.md b/csharp-net35/docs/OwnerInfo.md deleted file mode 100644 index 9f68152..0000000 --- a/csharp-net35/docs/OwnerInfo.md +++ /dev/null @@ -1,12 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.OwnerInfo -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Phone** | **string** | The owner's phone number | [optional] -**CompanyDepartment** | **string** | The owner's company/department | [optional] -**Name** | **string** | The owner's name | [optional] -**Email** | **string** | The owner's email address | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net35/docs/ResultStreamRequest.md b/csharp-net35/docs/ResultStreamRequest.md deleted file mode 100644 index f499335..0000000 --- a/csharp-net35/docs/ResultStreamRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.ResultStreamRequest -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**StreamLocation** | [**StreamLocation**](StreamLocation.md) | The stream location | -**OutputSettings** | [**OutputSettings**](OutputSettings.md) | The Output settings | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net35/docs/StorageLocation.md b/csharp-net35/docs/StorageLocation.md deleted file mode 100644 index 3197f68..0000000 --- a/csharp-net35/docs/StorageLocation.md +++ /dev/null @@ -1,10 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.StorageLocation -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FolderPath** | **string** | | [optional] -**ContainerId** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net35/docs/StreamLocation.md b/csharp-net35/docs/StreamLocation.md deleted file mode 100644 index 1f2a59c..0000000 --- a/csharp-net35/docs/StreamLocation.md +++ /dev/null @@ -1,12 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.StreamLocation -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FolderPath** | **string** | | [optional] -**OriginalFileName** | **string** | | [optional] -**FileName** | **string** | | [optional] -**ContainerId** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net35/docs/TemplateApi.md b/csharp-net35/docs/TemplateApi.md deleted file mode 100644 index afb3ddc..0000000 --- a/csharp-net35/docs/TemplateApi.md +++ /dev/null @@ -1,335 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Api.TemplateApi - -All URIs are relative to *https://gw.api.cloud.sphereon.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateTemplateContext**](TemplateApi.md#createtemplatecontext) | **POST** /template/processor/0.1/templates | Create template context -[**DeleteTemplateContext**](TemplateApi.md#deletetemplatecontext) | **DELETE** /template/processor/0.1/templates/{templateId} | Delete template context -[**GetTemplateContext**](TemplateApi.md#gettemplatecontext) | **GET** /template/processor/0.1/templates/{templateId} | Get template context -[**UpdateTemplateContext**](TemplateApi.md#updatetemplatecontext) | **PUT** /template/processor/0.1/templates | Update template context -[**UploadTemplateFile**](TemplateApi.md#uploadtemplatefile) | **POST** /template/processor/0.1/templates/{templateId} | Upload template file - - - -# **CreateTemplateContext** -> TemplateContextResponse CreateTemplateContext (TemplateContextRequest templateRequest) - -Create template context - -Create a unique template context for your environment - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class CreateTemplateContextExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new TemplateApi(); - var templateRequest = new TemplateContextRequest(); // TemplateContextRequest | The template request - - try - { - // Create template context - TemplateContextResponse result = apiInstance.CreateTemplateContext(templateRequest); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling TemplateApi.CreateTemplateContext: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| The template request | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **DeleteTemplateContext** -> TemplateContextResponse DeleteTemplateContext (string templateId) - -Delete template context - -Delete a template context with all history - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class DeleteTemplateContextExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new TemplateApi(); - var templateId = templateId_example; // string | templateId - - try - { - // Delete template context - TemplateContextResponse result = apiInstance.DeleteTemplateContext(templateId); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling TemplateApi.DeleteTemplateContext: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateId** | **string**| templateId | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetTemplateContext** -> TemplateContextResponse GetTemplateContext (string templateId) - -Get template context - -Get an existing template context - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class GetTemplateContextExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new TemplateApi(); - var templateId = templateId_example; // string | The template context name unique for your environment - - try - { - // Get template context - TemplateContextResponse result = apiInstance.GetTemplateContext(templateId); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling TemplateApi.GetTemplateContext: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateId** | **string**| The template context name unique for your environment | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **UpdateTemplateContext** -> TemplateContextResponse UpdateTemplateContext (TemplateContext templateContext) - -Update template context - -Update an existing template context for your environment - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class UpdateTemplateContextExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new TemplateApi(); - var templateContext = new TemplateContext(); // TemplateContext | templateContext - - try - { - // Update template context - TemplateContextResponse result = apiInstance.UpdateTemplateContext(templateContext); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling TemplateApi.UpdateTemplateContext: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateContext** | [**TemplateContext**](TemplateContext.md)| templateContext | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **UploadTemplateFile** -> TemplateContextResponse UploadTemplateFile (string templateId, System.IO.Stream stream) - -Upload template file - -Upload the Office template file - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class UploadTemplateFileExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new TemplateApi(); - var templateId = templateId_example; // string | The template context name unique for your environment - var stream = new System.IO.Stream(); // System.IO.Stream | The template (file/inputstream) to store - - try - { - // Upload template file - TemplateContextResponse result = apiInstance.UploadTemplateFile(templateId, stream); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling TemplateApi.UploadTemplateFile: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateId** | **string**| The template context name unique for your environment | - **stream** | **System.IO.Stream**| The template (file/inputstream) to store | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/csharp-net35/docs/TemplateContext.md b/csharp-net35/docs/TemplateContext.md deleted file mode 100644 index 5e1c275..0000000 --- a/csharp-net35/docs/TemplateContext.md +++ /dev/null @@ -1,15 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.TemplateContext -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**TemplateType** | **string** | | -**TemplateFileLocations** | [**Dictionary<string, StreamLocation>**](StreamLocation.md) | The template files (versioned) | [optional] -**Description** | **string** | The template description | [optional] -**OwnerInfo** | [**OwnerInfo**](OwnerInfo.md) | | [optional] -**StorageLocation** | [**StorageLocation**](StorageLocation.md) | The storage location. (optional) | [optional] -**Id** | **string** | | [optional] -**TemplateId** | **string** | The template context id | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net35/docs/TemplateContextRequest.md b/csharp-net35/docs/TemplateContextRequest.md deleted file mode 100644 index b509255..0000000 --- a/csharp-net35/docs/TemplateContextRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.TemplateContextRequest -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**TemplateType** | **string** | | -**Description** | **string** | | [optional] -**OwnerInfo** | [**OwnerInfo**](OwnerInfo.md) | | [optional] -**TemplateId** | **string** | The template context id | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net35/docs/TemplateContextResponse.md b/csharp-net35/docs/TemplateContextResponse.md deleted file mode 100644 index 6c11a45..0000000 --- a/csharp-net35/docs/TemplateContextResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.TemplateContextResponse -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CreationTime** | **DateTime?** | The creation date/time of this response in ISO 8601 format | [optional] -**Context** | [**TemplateContext**](TemplateContext.md) | | [optional] -**Id** | **string** | Unique template context id | -**Status** | **string** | The status of the template | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net35/git_push.sh b/csharp-net35/git_push.sh index 7923201..160f6f2 100644 --- a/csharp-net35/git_push.sh +++ b/csharp-net35/git_push.sh @@ -36,7 +36,7 @@ git_remote=`git remote` if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git else git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Sphereon.SDK.TemplateProcessor.Test.csproj b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Sphereon.SDK.TemplateProcessor.Test.csproj index 686c33c..18922ec 100644 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Sphereon.SDK.TemplateProcessor.Test.csproj +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/Sphereon.SDK.TemplateProcessor.Test.csproj @@ -52,6 +52,12 @@ Contact: dev@sphereon.com ..\..\packages\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll + + $(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\net35\JsonSubTypes.dll + ..\packages\JsonSubTypes.1.2.0\lib\net35\JsonSubTypes.dll + ..\..\packages\JsonSubTypes.1.2.0\lib\net35\JsonSubTypes.dll + ..\..\vendor\JsonSubTypes.1.2.0\lib\net35\JsonSubTypes.dll + $(SolutionDir)\packages\RestSharp.105.1.0\lib\net35\RestSharp.dll ..\packages\RestSharp.105.1.0\lib\net35\RestSharp.dll @@ -75,7 +81,7 @@ Contact: dev@sphereon.com - {A4487355-F30B-40E2-AB78-4E09BCD1E978} + {0F9BCF2C-D135-4673-945D-26B12ED8FD21} Sphereon.SDK.TemplateProcessor diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/packages.config b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/packages.config index c5730aa..403ae20 100644 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/packages.config +++ b/csharp-net35/src/Sphereon.SDK.TemplateProcessor.Test/packages.config @@ -3,4 +3,5 @@ + diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Api/AllApi.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Api/AllApi.cs deleted file mode 100644 index 535961d..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Api/AllApi.cs +++ /dev/null @@ -1,1422 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Sphereon.SDK.TemplateProcessor.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IAllApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Store dataset - /// - /// - /// Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - /// - /// Thrown when fails to make API call - /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - /// DataSetResponse - DataSetResponse CreateDataSet (string payload); - - /// - /// Store dataset - /// - /// - /// Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - /// - /// Thrown when fails to make API call - /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - /// ApiResponse of DataSetResponse - ApiResponse CreateDataSetWithHttpInfo (string payload); - /// - /// Create template context - /// - /// - /// Create a unique template context for your environment - /// - /// Thrown when fails to make API call - /// The template request - /// TemplateContextResponse - TemplateContextResponse CreateTemplateContext (TemplateContextRequest templateRequest); - - /// - /// Create template context - /// - /// - /// Create a unique template context for your environment - /// - /// Thrown when fails to make API call - /// The template request - /// ApiResponse of TemplateContextResponse - ApiResponse CreateTemplateContextWithHttpInfo (TemplateContextRequest templateRequest); - /// - /// Delete a stored data set - /// - /// - /// Delete a stored data set - /// - /// Thrown when fails to make API call - /// dataSetId - /// DataSetResponse - DataSetResponse DeleteDataSet (string dataSetId); - - /// - /// Delete a stored data set - /// - /// - /// Delete a stored data set - /// - /// Thrown when fails to make API call - /// dataSetId - /// ApiResponse of DataSetResponse - ApiResponse DeleteDataSetWithHttpInfo (string dataSetId); - /// - /// Delete a job manually - /// - /// - /// Delete the merge job and all related files - /// - /// Thrown when fails to make API call - /// jobId - /// MergeJobResponse - MergeJobResponse DeleteJob (string jobId); - - /// - /// Delete a job manually - /// - /// - /// Delete the merge job and all related files - /// - /// Thrown when fails to make API call - /// jobId - /// ApiResponse of MergeJobResponse - ApiResponse DeleteJobWithHttpInfo (string jobId); - /// - /// Delete template context - /// - /// - /// Delete a template context with all history - /// - /// Thrown when fails to make API call - /// templateId - /// TemplateContextResponse - TemplateContextResponse DeleteTemplateContext (string templateId); - - /// - /// Delete template context - /// - /// - /// Delete a template context with all history - /// - /// Thrown when fails to make API call - /// templateId - /// ApiResponse of TemplateContextResponse - ApiResponse DeleteTemplateContextWithHttpInfo (string templateId); - /// - /// Job definition and state - /// - /// - /// Get the merge job definition and current state. Please not that you can differentiate based on http response status - /// - /// Thrown when fails to make API call - /// jobId - /// MergeJobResponse - MergeJobResponse GetJob (string jobId); - - /// - /// Job definition and state - /// - /// - /// Get the merge job definition and current state. Please not that you can differentiate based on http response status - /// - /// Thrown when fails to make API call - /// jobId - /// ApiResponse of MergeJobResponse - ApiResponse GetJobWithHttpInfo (string jobId); - /// - /// Get all jobs - /// - /// - /// Get all office text job definitions and their current state. - /// - /// Thrown when fails to make API call - /// A list of status to filter on. (optional) - /// List<MergeJobResponse> - List GetJobs (List status = null); - - /// - /// Get all jobs - /// - /// - /// Get all office text job definitions and their current state. - /// - /// Thrown when fails to make API call - /// A list of status to filter on. (optional) - /// ApiResponse of List<MergeJobResponse> - ApiResponse> GetJobsWithHttpInfo (List status = null); - /// - /// Get the result file - /// - /// - /// Get a merge result document as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// resultStreamRequest - /// byte[] - byte[] GetResultStream (string jobId, ResultStreamRequest resultStreamRequest); - - /// - /// Get the result file - /// - /// - /// Get a merge result document as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// resultStreamRequest - /// ApiResponse of byte[] - ApiResponse GetResultStreamWithHttpInfo (string jobId, ResultStreamRequest resultStreamRequest); - /// - /// Get the result file - /// - /// - /// Get all documents inside a compressed container as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// outputSettings (optional) - /// byte[] - byte[] GetResultStreamsAsContainer (string jobId, OutputSettings outputSettings = null); - - /// - /// Get the result file - /// - /// - /// Get all documents inside a compressed container as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// outputSettings (optional) - /// ApiResponse of byte[] - ApiResponse GetResultStreamsAsContainerWithHttpInfo (string jobId, OutputSettings outputSettings = null); - /// - /// Get template context - /// - /// - /// Get an existing template context - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// TemplateContextResponse - TemplateContextResponse GetTemplateContext (string templateId); - - /// - /// Get template context - /// - /// - /// Get an existing template context - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// ApiResponse of TemplateContextResponse - ApiResponse GetTemplateContextWithHttpInfo (string templateId); - /// - /// Submit merge job for processing - /// - /// - /// Submit merge job run. - /// - /// Thrown when fails to make API call - /// The merge- and output settings - /// MergeJobResponse - MergeJobResponse SubmitJob (MergeSettings mergesettings); - - /// - /// Submit merge job for processing - /// - /// - /// Submit merge job run. - /// - /// Thrown when fails to make API call - /// The merge- and output settings - /// ApiResponse of MergeJobResponse - ApiResponse SubmitJobWithHttpInfo (MergeSettings mergesettings); - /// - /// Update template context - /// - /// - /// Update an existing template context for your environment - /// - /// Thrown when fails to make API call - /// templateContext - /// TemplateContextResponse - TemplateContextResponse UpdateTemplateContext (TemplateContext templateContext); - - /// - /// Update template context - /// - /// - /// Update an existing template context for your environment - /// - /// Thrown when fails to make API call - /// templateContext - /// ApiResponse of TemplateContextResponse - ApiResponse UpdateTemplateContextWithHttpInfo (TemplateContext templateContext); - /// - /// Upload template file - /// - /// - /// Upload the Office template file - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// The template (file/inputstream) to store - /// TemplateContextResponse - TemplateContextResponse UploadTemplateFile (string templateId, System.IO.Stream stream); - - /// - /// Upload template file - /// - /// - /// Upload the Office template file - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// The template (file/inputstream) to store - /// ApiResponse of TemplateContextResponse - ApiResponse UploadTemplateFileWithHttpInfo (string templateId, System.IO.Stream stream); - #endregion Synchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class AllApi : IAllApi - { - private Sphereon.SDK.TemplateProcessor.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public AllApi(String basePath) - { - this.Configuration = new Configuration(new ApiClient(basePath)); - - ExceptionFactory = Sphereon.SDK.TemplateProcessor.Client.Configuration.DefaultExceptionFactory; - - // ensure API client has configuration ready - if (Configuration.ApiClient.Configuration == null) - { - this.Configuration.ApiClient.Configuration = this.Configuration; - } - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public AllApi(Configuration configuration = null) - { - if (configuration == null) // use the default one in Configuration - this.Configuration = Configuration.Default; - else - this.Configuration = configuration; - - ExceptionFactory = Sphereon.SDK.TemplateProcessor.Client.Configuration.DefaultExceptionFactory; - - // ensure API client has configuration ready - if (Configuration.ApiClient.Configuration == null) - { - this.Configuration.ApiClient.Configuration = this.Configuration; - } - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public Sphereon.SDK.TemplateProcessor.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public Dictionary DefaultHeader() - { - return this.Configuration.DefaultHeader; - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Store dataset Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - /// - /// Thrown when fails to make API call - /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - /// DataSetResponse - public DataSetResponse CreateDataSet (string payload) - { - ApiResponse localVarResponse = CreateDataSetWithHttpInfo(payload); - return localVarResponse.Data; - } - - /// - /// Store dataset Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - /// - /// Thrown when fails to make API call - /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - /// ApiResponse of DataSetResponse - public ApiResponse< DataSetResponse > CreateDataSetWithHttpInfo (string payload) - { - // verify the required parameter 'payload' is set - if (payload == null) - throw new ApiException(400, "Missing required parameter 'payload' when calling AllApi->CreateDataSet"); - - var localVarPath = "/template/processor/0.1/datasets"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (payload != null && payload.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(payload); // http body (model) parameter - } - else - { - localVarPostBody = payload; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateDataSet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (DataSetResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DataSetResponse))); - } - - /// - /// Create template context Create a unique template context for your environment - /// - /// Thrown when fails to make API call - /// The template request - /// TemplateContextResponse - public TemplateContextResponse CreateTemplateContext (TemplateContextRequest templateRequest) - { - ApiResponse localVarResponse = CreateTemplateContextWithHttpInfo(templateRequest); - return localVarResponse.Data; - } - - /// - /// Create template context Create a unique template context for your environment - /// - /// Thrown when fails to make API call - /// The template request - /// ApiResponse of TemplateContextResponse - public ApiResponse< TemplateContextResponse > CreateTemplateContextWithHttpInfo (TemplateContextRequest templateRequest) - { - // verify the required parameter 'templateRequest' is set - if (templateRequest == null) - throw new ApiException(400, "Missing required parameter 'templateRequest' when calling AllApi->CreateTemplateContext"); - - var localVarPath = "/template/processor/0.1/templates"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateRequest != null && templateRequest.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(templateRequest); // http body (model) parameter - } - else - { - localVarPostBody = templateRequest; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateTemplateContext", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Delete a stored data set Delete a stored data set - /// - /// Thrown when fails to make API call - /// dataSetId - /// DataSetResponse - public DataSetResponse DeleteDataSet (string dataSetId) - { - ApiResponse localVarResponse = DeleteDataSetWithHttpInfo(dataSetId); - return localVarResponse.Data; - } - - /// - /// Delete a stored data set Delete a stored data set - /// - /// Thrown when fails to make API call - /// dataSetId - /// ApiResponse of DataSetResponse - public ApiResponse< DataSetResponse > DeleteDataSetWithHttpInfo (string dataSetId) - { - // verify the required parameter 'dataSetId' is set - if (dataSetId == null) - throw new ApiException(400, "Missing required parameter 'dataSetId' when calling AllApi->DeleteDataSet"); - - var localVarPath = "/template/processor/0.1/datasets/{dataSetId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (dataSetId != null) localVarPathParams.Add("dataSetId", Configuration.ApiClient.ParameterToString(dataSetId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteDataSet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (DataSetResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DataSetResponse))); - } - - /// - /// Delete a job manually Delete the merge job and all related files - /// - /// Thrown when fails to make API call - /// jobId - /// MergeJobResponse - public MergeJobResponse DeleteJob (string jobId) - { - ApiResponse localVarResponse = DeleteJobWithHttpInfo(jobId); - return localVarResponse.Data; - } - - /// - /// Delete a job manually Delete the merge job and all related files - /// - /// Thrown when fails to make API call - /// jobId - /// ApiResponse of MergeJobResponse - public ApiResponse< MergeJobResponse > DeleteJobWithHttpInfo (string jobId) - { - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling AllApi->DeleteJob"); - - var localVarPath = "/template/processor/0.1/jobs/{jobId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteJob", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (MergeJobResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(MergeJobResponse))); - } - - /// - /// Delete template context Delete a template context with all history - /// - /// Thrown when fails to make API call - /// templateId - /// TemplateContextResponse - public TemplateContextResponse DeleteTemplateContext (string templateId) - { - ApiResponse localVarResponse = DeleteTemplateContextWithHttpInfo(templateId); - return localVarResponse.Data; - } - - /// - /// Delete template context Delete a template context with all history - /// - /// Thrown when fails to make API call - /// templateId - /// ApiResponse of TemplateContextResponse - public ApiResponse< TemplateContextResponse > DeleteTemplateContextWithHttpInfo (string templateId) - { - // verify the required parameter 'templateId' is set - if (templateId == null) - throw new ApiException(400, "Missing required parameter 'templateId' when calling AllApi->DeleteTemplateContext"); - - var localVarPath = "/template/processor/0.1/templates/{templateId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteTemplateContext", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Job definition and state Get the merge job definition and current state. Please not that you can differentiate based on http response status - /// - /// Thrown when fails to make API call - /// jobId - /// MergeJobResponse - public MergeJobResponse GetJob (string jobId) - { - ApiResponse localVarResponse = GetJobWithHttpInfo(jobId); - return localVarResponse.Data; - } - - /// - /// Job definition and state Get the merge job definition and current state. Please not that you can differentiate based on http response status - /// - /// Thrown when fails to make API call - /// jobId - /// ApiResponse of MergeJobResponse - public ApiResponse< MergeJobResponse > GetJobWithHttpInfo (string jobId) - { - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling AllApi->GetJob"); - - var localVarPath = "/template/processor/0.1/jobs/{jobId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetJob", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (MergeJobResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(MergeJobResponse))); - } - - /// - /// Get all jobs Get all office text job definitions and their current state. - /// - /// Thrown when fails to make API call - /// A list of status to filter on. (optional) - /// List<MergeJobResponse> - public List GetJobs (List status = null) - { - ApiResponse> localVarResponse = GetJobsWithHttpInfo(status); - return localVarResponse.Data; - } - - /// - /// Get all jobs Get all office text job definitions and their current state. - /// - /// Thrown when fails to make API call - /// A list of status to filter on. (optional) - /// ApiResponse of List<MergeJobResponse> - public ApiResponse< List > GetJobsWithHttpInfo (List status = null) - { - - var localVarPath = "/template/processor/0.1/jobs"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (status != null) localVarQueryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetJobs", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Get the result file Get a merge result document as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// resultStreamRequest - /// byte[] - public byte[] GetResultStream (string jobId, ResultStreamRequest resultStreamRequest) - { - ApiResponse localVarResponse = GetResultStreamWithHttpInfo(jobId, resultStreamRequest); - return localVarResponse.Data; - } - - /// - /// Get the result file Get a merge result document as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// resultStreamRequest - /// ApiResponse of byte[] - public ApiResponse< byte[] > GetResultStreamWithHttpInfo (string jobId, ResultStreamRequest resultStreamRequest) - { - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling AllApi->GetResultStream"); - // verify the required parameter 'resultStreamRequest' is set - if (resultStreamRequest == null) - throw new ApiException(400, "Missing required parameter 'resultStreamRequest' when calling AllApi->GetResultStream"); - - var localVarPath = "/template/processor/0.1/jobs/{jobId}/result/stream"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/octet-stream" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter - if (resultStreamRequest != null && resultStreamRequest.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(resultStreamRequest); // http body (model) parameter - } - else - { - localVarPostBody = resultStreamRequest; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetResultStream", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (byte[]) Configuration.ApiClient.Deserialize(localVarResponse, typeof(byte[]))); - } - - /// - /// Get the result file Get all documents inside a compressed container as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// outputSettings (optional) - /// byte[] - public byte[] GetResultStreamsAsContainer (string jobId, OutputSettings outputSettings = null) - { - ApiResponse localVarResponse = GetResultStreamsAsContainerWithHttpInfo(jobId, outputSettings); - return localVarResponse.Data; - } - - /// - /// Get the result file Get all documents inside a compressed container as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// outputSettings (optional) - /// ApiResponse of byte[] - public ApiResponse< byte[] > GetResultStreamsAsContainerWithHttpInfo (string jobId, OutputSettings outputSettings = null) - { - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling AllApi->GetResultStreamsAsContainer"); - - var localVarPath = "/template/processor/0.1/jobs/{jobId}/result/container"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/octet-stream" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter - if (outputSettings != null && outputSettings.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(outputSettings); // http body (model) parameter - } - else - { - localVarPostBody = outputSettings; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetResultStreamsAsContainer", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (byte[]) Configuration.ApiClient.Deserialize(localVarResponse, typeof(byte[]))); - } - - /// - /// Get template context Get an existing template context - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// TemplateContextResponse - public TemplateContextResponse GetTemplateContext (string templateId) - { - ApiResponse localVarResponse = GetTemplateContextWithHttpInfo(templateId); - return localVarResponse.Data; - } - - /// - /// Get template context Get an existing template context - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// ApiResponse of TemplateContextResponse - public ApiResponse< TemplateContextResponse > GetTemplateContextWithHttpInfo (string templateId) - { - // verify the required parameter 'templateId' is set - if (templateId == null) - throw new ApiException(400, "Missing required parameter 'templateId' when calling AllApi->GetTemplateContext"); - - var localVarPath = "/template/processor/0.1/templates/{templateId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetTemplateContext", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Submit merge job for processing Submit merge job run. - /// - /// Thrown when fails to make API call - /// The merge- and output settings - /// MergeJobResponse - public MergeJobResponse SubmitJob (MergeSettings mergesettings) - { - ApiResponse localVarResponse = SubmitJobWithHttpInfo(mergesettings); - return localVarResponse.Data; - } - - /// - /// Submit merge job for processing Submit merge job run. - /// - /// Thrown when fails to make API call - /// The merge- and output settings - /// ApiResponse of MergeJobResponse - public ApiResponse< MergeJobResponse > SubmitJobWithHttpInfo (MergeSettings mergesettings) - { - // verify the required parameter 'mergesettings' is set - if (mergesettings == null) - throw new ApiException(400, "Missing required parameter 'mergesettings' when calling AllApi->SubmitJob"); - - var localVarPath = "/template/processor/0.1/jobs"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (mergesettings != null && mergesettings.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(mergesettings); // http body (model) parameter - } - else - { - localVarPostBody = mergesettings; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("SubmitJob", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (MergeJobResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(MergeJobResponse))); - } - - /// - /// Update template context Update an existing template context for your environment - /// - /// Thrown when fails to make API call - /// templateContext - /// TemplateContextResponse - public TemplateContextResponse UpdateTemplateContext (TemplateContext templateContext) - { - ApiResponse localVarResponse = UpdateTemplateContextWithHttpInfo(templateContext); - return localVarResponse.Data; - } - - /// - /// Update template context Update an existing template context for your environment - /// - /// Thrown when fails to make API call - /// templateContext - /// ApiResponse of TemplateContextResponse - public ApiResponse< TemplateContextResponse > UpdateTemplateContextWithHttpInfo (TemplateContext templateContext) - { - // verify the required parameter 'templateContext' is set - if (templateContext == null) - throw new ApiException(400, "Missing required parameter 'templateContext' when calling AllApi->UpdateTemplateContext"); - - var localVarPath = "/template/processor/0.1/templates"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateContext != null && templateContext.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(templateContext); // http body (model) parameter - } - else - { - localVarPostBody = templateContext; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdateTemplateContext", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Upload template file Upload the Office template file - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// The template (file/inputstream) to store - /// TemplateContextResponse - public TemplateContextResponse UploadTemplateFile (string templateId, System.IO.Stream stream) - { - ApiResponse localVarResponse = UploadTemplateFileWithHttpInfo(templateId, stream); - return localVarResponse.Data; - } - - /// - /// Upload template file Upload the Office template file - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// The template (file/inputstream) to store - /// ApiResponse of TemplateContextResponse - public ApiResponse< TemplateContextResponse > UploadTemplateFileWithHttpInfo (string templateId, System.IO.Stream stream) - { - // verify the required parameter 'templateId' is set - if (templateId == null) - throw new ApiException(400, "Missing required parameter 'templateId' when calling AllApi->UploadTemplateFile"); - // verify the required parameter 'stream' is set - if (stream == null) - throw new ApiException(400, "Missing required parameter 'stream' when calling AllApi->UploadTemplateFile"); - - var localVarPath = "/template/processor/0.1/templates/{templateId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter - if (stream != null) localVarFileParams.Add("stream", Configuration.ApiClient.ParameterToFile("stream", stream)); - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadTemplateFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - } -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Api/DataSetApi.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Api/DataSetApi.cs deleted file mode 100644 index c1d3191..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Api/DataSetApi.cs +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Sphereon.SDK.TemplateProcessor.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IDataSetApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Store dataset - /// - /// - /// Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - /// - /// Thrown when fails to make API call - /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - /// DataSetResponse - DataSetResponse CreateDataSet (string payload); - - /// - /// Store dataset - /// - /// - /// Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - /// - /// Thrown when fails to make API call - /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - /// ApiResponse of DataSetResponse - ApiResponse CreateDataSetWithHttpInfo (string payload); - /// - /// Delete a stored data set - /// - /// - /// Delete a stored data set - /// - /// Thrown when fails to make API call - /// dataSetId - /// DataSetResponse - DataSetResponse DeleteDataSet (string dataSetId); - - /// - /// Delete a stored data set - /// - /// - /// Delete a stored data set - /// - /// Thrown when fails to make API call - /// dataSetId - /// ApiResponse of DataSetResponse - ApiResponse DeleteDataSetWithHttpInfo (string dataSetId); - #endregion Synchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class DataSetApi : IDataSetApi - { - private Sphereon.SDK.TemplateProcessor.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public DataSetApi(String basePath) - { - this.Configuration = new Configuration(new ApiClient(basePath)); - - ExceptionFactory = Sphereon.SDK.TemplateProcessor.Client.Configuration.DefaultExceptionFactory; - - // ensure API client has configuration ready - if (Configuration.ApiClient.Configuration == null) - { - this.Configuration.ApiClient.Configuration = this.Configuration; - } - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public DataSetApi(Configuration configuration = null) - { - if (configuration == null) // use the default one in Configuration - this.Configuration = Configuration.Default; - else - this.Configuration = configuration; - - ExceptionFactory = Sphereon.SDK.TemplateProcessor.Client.Configuration.DefaultExceptionFactory; - - // ensure API client has configuration ready - if (Configuration.ApiClient.Configuration == null) - { - this.Configuration.ApiClient.Configuration = this.Configuration; - } - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public Sphereon.SDK.TemplateProcessor.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public Dictionary DefaultHeader() - { - return this.Configuration.DefaultHeader; - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Store dataset Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - /// - /// Thrown when fails to make API call - /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - /// DataSetResponse - public DataSetResponse CreateDataSet (string payload) - { - ApiResponse localVarResponse = CreateDataSetWithHttpInfo(payload); - return localVarResponse.Data; - } - - /// - /// Store dataset Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - /// - /// Thrown when fails to make API call - /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - /// ApiResponse of DataSetResponse - public ApiResponse< DataSetResponse > CreateDataSetWithHttpInfo (string payload) - { - // verify the required parameter 'payload' is set - if (payload == null) - throw new ApiException(400, "Missing required parameter 'payload' when calling DataSetApi->CreateDataSet"); - - var localVarPath = "/template/processor/0.1/datasets"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (payload != null && payload.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(payload); // http body (model) parameter - } - else - { - localVarPostBody = payload; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateDataSet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (DataSetResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DataSetResponse))); - } - - /// - /// Delete a stored data set Delete a stored data set - /// - /// Thrown when fails to make API call - /// dataSetId - /// DataSetResponse - public DataSetResponse DeleteDataSet (string dataSetId) - { - ApiResponse localVarResponse = DeleteDataSetWithHttpInfo(dataSetId); - return localVarResponse.Data; - } - - /// - /// Delete a stored data set Delete a stored data set - /// - /// Thrown when fails to make API call - /// dataSetId - /// ApiResponse of DataSetResponse - public ApiResponse< DataSetResponse > DeleteDataSetWithHttpInfo (string dataSetId) - { - // verify the required parameter 'dataSetId' is set - if (dataSetId == null) - throw new ApiException(400, "Missing required parameter 'dataSetId' when calling DataSetApi->DeleteDataSet"); - - var localVarPath = "/template/processor/0.1/datasets/{dataSetId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (dataSetId != null) localVarPathParams.Add("dataSetId", Configuration.ApiClient.ParameterToString(dataSetId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteDataSet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (DataSetResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DataSetResponse))); - } - - } -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Api/JobApi.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Api/JobApi.cs deleted file mode 100644 index 848c12f..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Api/JobApi.cs +++ /dev/null @@ -1,641 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Sphereon.SDK.TemplateProcessor.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IJobApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Job definition and state - /// - /// - /// Get the merge job definition and current state. Please not that you can differentiate based on http response status - /// - /// Thrown when fails to make API call - /// jobId - /// MergeJobResponse - MergeJobResponse GetJob (string jobId); - - /// - /// Job definition and state - /// - /// - /// Get the merge job definition and current state. Please not that you can differentiate based on http response status - /// - /// Thrown when fails to make API call - /// jobId - /// ApiResponse of MergeJobResponse - ApiResponse GetJobWithHttpInfo (string jobId); - /// - /// Get all jobs - /// - /// - /// Get all office text job definitions and their current state. - /// - /// Thrown when fails to make API call - /// A list of status to filter on. (optional) - /// List<MergeJobResponse> - List GetJobs (List status = null); - - /// - /// Get all jobs - /// - /// - /// Get all office text job definitions and their current state. - /// - /// Thrown when fails to make API call - /// A list of status to filter on. (optional) - /// ApiResponse of List<MergeJobResponse> - ApiResponse> GetJobsWithHttpInfo (List status = null); - /// - /// Get the result file - /// - /// - /// Get a merge result document as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// resultStreamRequest - /// byte[] - byte[] GetResultStream (string jobId, ResultStreamRequest resultStreamRequest); - - /// - /// Get the result file - /// - /// - /// Get a merge result document as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// resultStreamRequest - /// ApiResponse of byte[] - ApiResponse GetResultStreamWithHttpInfo (string jobId, ResultStreamRequest resultStreamRequest); - /// - /// Get the result file - /// - /// - /// Get all documents inside a compressed container as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// outputSettings (optional) - /// byte[] - byte[] GetResultStreamsAsContainer (string jobId, OutputSettings outputSettings = null); - - /// - /// Get the result file - /// - /// - /// Get all documents inside a compressed container as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// outputSettings (optional) - /// ApiResponse of byte[] - ApiResponse GetResultStreamsAsContainerWithHttpInfo (string jobId, OutputSettings outputSettings = null); - /// - /// Submit merge job for processing - /// - /// - /// Submit merge job run. - /// - /// Thrown when fails to make API call - /// The merge- and output settings - /// MergeJobResponse - MergeJobResponse SubmitJob (MergeSettings mergesettings); - - /// - /// Submit merge job for processing - /// - /// - /// Submit merge job run. - /// - /// Thrown when fails to make API call - /// The merge- and output settings - /// ApiResponse of MergeJobResponse - ApiResponse SubmitJobWithHttpInfo (MergeSettings mergesettings); - #endregion Synchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class JobApi : IJobApi - { - private Sphereon.SDK.TemplateProcessor.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public JobApi(String basePath) - { - this.Configuration = new Configuration(new ApiClient(basePath)); - - ExceptionFactory = Sphereon.SDK.TemplateProcessor.Client.Configuration.DefaultExceptionFactory; - - // ensure API client has configuration ready - if (Configuration.ApiClient.Configuration == null) - { - this.Configuration.ApiClient.Configuration = this.Configuration; - } - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public JobApi(Configuration configuration = null) - { - if (configuration == null) // use the default one in Configuration - this.Configuration = Configuration.Default; - else - this.Configuration = configuration; - - ExceptionFactory = Sphereon.SDK.TemplateProcessor.Client.Configuration.DefaultExceptionFactory; - - // ensure API client has configuration ready - if (Configuration.ApiClient.Configuration == null) - { - this.Configuration.ApiClient.Configuration = this.Configuration; - } - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public Sphereon.SDK.TemplateProcessor.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public Dictionary DefaultHeader() - { - return this.Configuration.DefaultHeader; - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Job definition and state Get the merge job definition and current state. Please not that you can differentiate based on http response status - /// - /// Thrown when fails to make API call - /// jobId - /// MergeJobResponse - public MergeJobResponse GetJob (string jobId) - { - ApiResponse localVarResponse = GetJobWithHttpInfo(jobId); - return localVarResponse.Data; - } - - /// - /// Job definition and state Get the merge job definition and current state. Please not that you can differentiate based on http response status - /// - /// Thrown when fails to make API call - /// jobId - /// ApiResponse of MergeJobResponse - public ApiResponse< MergeJobResponse > GetJobWithHttpInfo (string jobId) - { - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling JobApi->GetJob"); - - var localVarPath = "/template/processor/0.1/jobs/{jobId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetJob", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (MergeJobResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(MergeJobResponse))); - } - - /// - /// Get all jobs Get all office text job definitions and their current state. - /// - /// Thrown when fails to make API call - /// A list of status to filter on. (optional) - /// List<MergeJobResponse> - public List GetJobs (List status = null) - { - ApiResponse> localVarResponse = GetJobsWithHttpInfo(status); - return localVarResponse.Data; - } - - /// - /// Get all jobs Get all office text job definitions and their current state. - /// - /// Thrown when fails to make API call - /// A list of status to filter on. (optional) - /// ApiResponse of List<MergeJobResponse> - public ApiResponse< List > GetJobsWithHttpInfo (List status = null) - { - - var localVarPath = "/template/processor/0.1/jobs"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (status != null) localVarQueryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetJobs", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Get the result file Get a merge result document as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// resultStreamRequest - /// byte[] - public byte[] GetResultStream (string jobId, ResultStreamRequest resultStreamRequest) - { - ApiResponse localVarResponse = GetResultStreamWithHttpInfo(jobId, resultStreamRequest); - return localVarResponse.Data; - } - - /// - /// Get the result file Get a merge result document as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// resultStreamRequest - /// ApiResponse of byte[] - public ApiResponse< byte[] > GetResultStreamWithHttpInfo (string jobId, ResultStreamRequest resultStreamRequest) - { - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling JobApi->GetResultStream"); - // verify the required parameter 'resultStreamRequest' is set - if (resultStreamRequest == null) - throw new ApiException(400, "Missing required parameter 'resultStreamRequest' when calling JobApi->GetResultStream"); - - var localVarPath = "/template/processor/0.1/jobs/{jobId}/result/stream"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/octet-stream" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter - if (resultStreamRequest != null && resultStreamRequest.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(resultStreamRequest); // http body (model) parameter - } - else - { - localVarPostBody = resultStreamRequest; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetResultStream", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (byte[]) Configuration.ApiClient.Deserialize(localVarResponse, typeof(byte[]))); - } - - /// - /// Get the result file Get all documents inside a compressed container as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// outputSettings (optional) - /// byte[] - public byte[] GetResultStreamsAsContainer (string jobId, OutputSettings outputSettings = null) - { - ApiResponse localVarResponse = GetResultStreamsAsContainerWithHttpInfo(jobId, outputSettings); - return localVarResponse.Data; - } - - /// - /// Get the result file Get all documents inside a compressed container as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// outputSettings (optional) - /// ApiResponse of byte[] - public ApiResponse< byte[] > GetResultStreamsAsContainerWithHttpInfo (string jobId, OutputSettings outputSettings = null) - { - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling JobApi->GetResultStreamsAsContainer"); - - var localVarPath = "/template/processor/0.1/jobs/{jobId}/result/container"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/octet-stream" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter - if (outputSettings != null && outputSettings.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(outputSettings); // http body (model) parameter - } - else - { - localVarPostBody = outputSettings; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetResultStreamsAsContainer", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (byte[]) Configuration.ApiClient.Deserialize(localVarResponse, typeof(byte[]))); - } - - /// - /// Submit merge job for processing Submit merge job run. - /// - /// Thrown when fails to make API call - /// The merge- and output settings - /// MergeJobResponse - public MergeJobResponse SubmitJob (MergeSettings mergesettings) - { - ApiResponse localVarResponse = SubmitJobWithHttpInfo(mergesettings); - return localVarResponse.Data; - } - - /// - /// Submit merge job for processing Submit merge job run. - /// - /// Thrown when fails to make API call - /// The merge- and output settings - /// ApiResponse of MergeJobResponse - public ApiResponse< MergeJobResponse > SubmitJobWithHttpInfo (MergeSettings mergesettings) - { - // verify the required parameter 'mergesettings' is set - if (mergesettings == null) - throw new ApiException(400, "Missing required parameter 'mergesettings' when calling JobApi->SubmitJob"); - - var localVarPath = "/template/processor/0.1/jobs"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (mergesettings != null && mergesettings.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(mergesettings); // http body (model) parameter - } - else - { - localVarPostBody = mergesettings; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("SubmitJob", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (MergeJobResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(MergeJobResponse))); - } - - } -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Api/TemplateApi.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Api/TemplateApi.cs deleted file mode 100644 index d321bc1..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Api/TemplateApi.cs +++ /dev/null @@ -1,632 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Sphereon.SDK.TemplateProcessor.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface ITemplateApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Create template context - /// - /// - /// Create a unique template context for your environment - /// - /// Thrown when fails to make API call - /// The template request - /// TemplateContextResponse - TemplateContextResponse CreateTemplateContext (TemplateContextRequest templateRequest); - - /// - /// Create template context - /// - /// - /// Create a unique template context for your environment - /// - /// Thrown when fails to make API call - /// The template request - /// ApiResponse of TemplateContextResponse - ApiResponse CreateTemplateContextWithHttpInfo (TemplateContextRequest templateRequest); - /// - /// Delete template context - /// - /// - /// Delete a template context with all history - /// - /// Thrown when fails to make API call - /// templateId - /// TemplateContextResponse - TemplateContextResponse DeleteTemplateContext (string templateId); - - /// - /// Delete template context - /// - /// - /// Delete a template context with all history - /// - /// Thrown when fails to make API call - /// templateId - /// ApiResponse of TemplateContextResponse - ApiResponse DeleteTemplateContextWithHttpInfo (string templateId); - /// - /// Get template context - /// - /// - /// Get an existing template context - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// TemplateContextResponse - TemplateContextResponse GetTemplateContext (string templateId); - - /// - /// Get template context - /// - /// - /// Get an existing template context - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// ApiResponse of TemplateContextResponse - ApiResponse GetTemplateContextWithHttpInfo (string templateId); - /// - /// Update template context - /// - /// - /// Update an existing template context for your environment - /// - /// Thrown when fails to make API call - /// templateContext - /// TemplateContextResponse - TemplateContextResponse UpdateTemplateContext (TemplateContext templateContext); - - /// - /// Update template context - /// - /// - /// Update an existing template context for your environment - /// - /// Thrown when fails to make API call - /// templateContext - /// ApiResponse of TemplateContextResponse - ApiResponse UpdateTemplateContextWithHttpInfo (TemplateContext templateContext); - /// - /// Upload template file - /// - /// - /// Upload the Office template file - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// The template (file/inputstream) to store - /// TemplateContextResponse - TemplateContextResponse UploadTemplateFile (string templateId, System.IO.Stream stream); - - /// - /// Upload template file - /// - /// - /// Upload the Office template file - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// The template (file/inputstream) to store - /// ApiResponse of TemplateContextResponse - ApiResponse UploadTemplateFileWithHttpInfo (string templateId, System.IO.Stream stream); - #endregion Synchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class TemplateApi : ITemplateApi - { - private Sphereon.SDK.TemplateProcessor.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public TemplateApi(String basePath) - { - this.Configuration = new Configuration(new ApiClient(basePath)); - - ExceptionFactory = Sphereon.SDK.TemplateProcessor.Client.Configuration.DefaultExceptionFactory; - - // ensure API client has configuration ready - if (Configuration.ApiClient.Configuration == null) - { - this.Configuration.ApiClient.Configuration = this.Configuration; - } - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public TemplateApi(Configuration configuration = null) - { - if (configuration == null) // use the default one in Configuration - this.Configuration = Configuration.Default; - else - this.Configuration = configuration; - - ExceptionFactory = Sphereon.SDK.TemplateProcessor.Client.Configuration.DefaultExceptionFactory; - - // ensure API client has configuration ready - if (Configuration.ApiClient.Configuration == null) - { - this.Configuration.ApiClient.Configuration = this.Configuration; - } - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public Sphereon.SDK.TemplateProcessor.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public Dictionary DefaultHeader() - { - return this.Configuration.DefaultHeader; - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Create template context Create a unique template context for your environment - /// - /// Thrown when fails to make API call - /// The template request - /// TemplateContextResponse - public TemplateContextResponse CreateTemplateContext (TemplateContextRequest templateRequest) - { - ApiResponse localVarResponse = CreateTemplateContextWithHttpInfo(templateRequest); - return localVarResponse.Data; - } - - /// - /// Create template context Create a unique template context for your environment - /// - /// Thrown when fails to make API call - /// The template request - /// ApiResponse of TemplateContextResponse - public ApiResponse< TemplateContextResponse > CreateTemplateContextWithHttpInfo (TemplateContextRequest templateRequest) - { - // verify the required parameter 'templateRequest' is set - if (templateRequest == null) - throw new ApiException(400, "Missing required parameter 'templateRequest' when calling TemplateApi->CreateTemplateContext"); - - var localVarPath = "/template/processor/0.1/templates"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateRequest != null && templateRequest.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(templateRequest); // http body (model) parameter - } - else - { - localVarPostBody = templateRequest; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateTemplateContext", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Delete template context Delete a template context with all history - /// - /// Thrown when fails to make API call - /// templateId - /// TemplateContextResponse - public TemplateContextResponse DeleteTemplateContext (string templateId) - { - ApiResponse localVarResponse = DeleteTemplateContextWithHttpInfo(templateId); - return localVarResponse.Data; - } - - /// - /// Delete template context Delete a template context with all history - /// - /// Thrown when fails to make API call - /// templateId - /// ApiResponse of TemplateContextResponse - public ApiResponse< TemplateContextResponse > DeleteTemplateContextWithHttpInfo (string templateId) - { - // verify the required parameter 'templateId' is set - if (templateId == null) - throw new ApiException(400, "Missing required parameter 'templateId' when calling TemplateApi->DeleteTemplateContext"); - - var localVarPath = "/template/processor/0.1/templates/{templateId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteTemplateContext", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Get template context Get an existing template context - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// TemplateContextResponse - public TemplateContextResponse GetTemplateContext (string templateId) - { - ApiResponse localVarResponse = GetTemplateContextWithHttpInfo(templateId); - return localVarResponse.Data; - } - - /// - /// Get template context Get an existing template context - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// ApiResponse of TemplateContextResponse - public ApiResponse< TemplateContextResponse > GetTemplateContextWithHttpInfo (string templateId) - { - // verify the required parameter 'templateId' is set - if (templateId == null) - throw new ApiException(400, "Missing required parameter 'templateId' when calling TemplateApi->GetTemplateContext"); - - var localVarPath = "/template/processor/0.1/templates/{templateId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetTemplateContext", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Update template context Update an existing template context for your environment - /// - /// Thrown when fails to make API call - /// templateContext - /// TemplateContextResponse - public TemplateContextResponse UpdateTemplateContext (TemplateContext templateContext) - { - ApiResponse localVarResponse = UpdateTemplateContextWithHttpInfo(templateContext); - return localVarResponse.Data; - } - - /// - /// Update template context Update an existing template context for your environment - /// - /// Thrown when fails to make API call - /// templateContext - /// ApiResponse of TemplateContextResponse - public ApiResponse< TemplateContextResponse > UpdateTemplateContextWithHttpInfo (TemplateContext templateContext) - { - // verify the required parameter 'templateContext' is set - if (templateContext == null) - throw new ApiException(400, "Missing required parameter 'templateContext' when calling TemplateApi->UpdateTemplateContext"); - - var localVarPath = "/template/processor/0.1/templates"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateContext != null && templateContext.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(templateContext); // http body (model) parameter - } - else - { - localVarPostBody = templateContext; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdateTemplateContext", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Upload template file Upload the Office template file - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// The template (file/inputstream) to store - /// TemplateContextResponse - public TemplateContextResponse UploadTemplateFile (string templateId, System.IO.Stream stream) - { - ApiResponse localVarResponse = UploadTemplateFileWithHttpInfo(templateId, stream); - return localVarResponse.Data; - } - - /// - /// Upload template file Upload the Office template file - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// The template (file/inputstream) to store - /// ApiResponse of TemplateContextResponse - public ApiResponse< TemplateContextResponse > UploadTemplateFileWithHttpInfo (string templateId, System.IO.Stream stream) - { - // verify the required parameter 'templateId' is set - if (templateId == null) - throw new ApiException(400, "Missing required parameter 'templateId' when calling TemplateApi->UploadTemplateFile"); - // verify the required parameter 'stream' is set - if (stream == null) - throw new ApiException(400, "Missing required parameter 'stream' when calling TemplateApi->UploadTemplateFile"); - - var localVarPath = "/template/processor/0.1/templates/{templateId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter - if (stream != null) localVarFileParams.Add("stream", Configuration.ApiClient.ParameterToFile("stream", stream)); - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadTemplateFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - } -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ApiClient.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ApiClient.cs deleted file mode 100644 index 5481761..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ApiClient.cs +++ /dev/null @@ -1,456 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Text.RegularExpressions; -using System.IO; -using System.Web; -using System.Linq; -using System.Net; -using System.Text; -using Newtonsoft.Json; -using RestSharp; - -namespace Sphereon.SDK.TemplateProcessor.Client -{ - /// - /// API client is mainly responsible for making the HTTP call to the API backend. - /// - public partial class ApiClient - { - private JsonSerializerSettings serializerSettings = new JsonSerializerSettings - { - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor - }; - - /// - /// Allows for extending request processing for generated code. - /// - /// The RestSharp request object - partial void InterceptRequest(IRestRequest request); - - /// - /// Allows for extending response processing for generated code. - /// - /// The RestSharp request object - /// The RestSharp response object - partial void InterceptResponse(IRestRequest request, IRestResponse response); - - /// - /// Initializes a new instance of the class - /// with default configuration and base path (https://gw.api.cloud.sphereon.com). - /// - public ApiClient() - { - Configuration = Configuration.Default; - RestClient = new RestClient("https://gw.api.cloud.sphereon.com"); - } - - /// - /// Initializes a new instance of the class - /// with default base path (https://gw.api.cloud.sphereon.com). - /// - /// An instance of Configuration. - public ApiClient(Configuration config = null) - { - if (config == null) - Configuration = Configuration.Default; - else - Configuration = config; - - RestClient = new RestClient("https://gw.api.cloud.sphereon.com"); - } - - /// - /// Initializes a new instance of the class - /// with default configuration. - /// - /// The base path. - public ApiClient(String basePath = "https://gw.api.cloud.sphereon.com") - { - if (String.IsNullOrEmpty(basePath)) - throw new ArgumentException("basePath cannot be empty"); - - RestClient = new RestClient(basePath); - Configuration = Configuration.Default; - } - - /// - /// Gets or sets the default API client for making HTTP calls. - /// - /// The default API client. - [Obsolete("ApiClient.Default is deprecated, please use 'Configuration.Default.ApiClient' instead.")] - public static ApiClient Default; - - /// - /// Gets or sets the Configuration. - /// - /// An instance of the Configuration. - public Configuration Configuration { get; set; } - - /// - /// Gets or sets the RestClient. - /// - /// An instance of the RestClient - public RestClient RestClient { get; set; } - - // Creates and sets up a RestRequest prior to a call. - private RestRequest PrepareRequest( - String path, RestSharp.Method method, Dictionary queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = new RestRequest(path, method); - - // add path parameter, if any - foreach(var param in pathParams) - request.AddParameter(param.Key, param.Value, ParameterType.UrlSegment); - - // add header parameter, if any - foreach(var param in headerParams) - request.AddHeader(param.Key, param.Value); - - // add query parameter, if any - foreach(var param in queryParams) - request.AddQueryParameter(param.Key, param.Value); - - // add form parameter, if any - foreach(var param in formParams) - request.AddParameter(param.Key, param.Value); - - // add file parameter, if any - foreach(var param in fileParams) - { - request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentType); - } - - if (postBody != null) // http body (model or byte[]) parameter - { - if (postBody.GetType() == typeof(String)) - { - request.AddParameter("application/json", postBody, ParameterType.RequestBody); - } - else if (postBody.GetType() == typeof(byte[])) - { - request.AddParameter(contentType, postBody, ParameterType.RequestBody); - } - } - - return request; - } - - /// - /// Makes the HTTP request (Sync). - /// - /// URL path. - /// HTTP method. - /// Query parameters. - /// HTTP body (POST request). - /// Header parameters. - /// Form parameters. - /// File parameters. - /// Path parameters. - /// Content Type of the request - /// Object - public Object CallApi( - String path, RestSharp.Method method, Dictionary queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = PrepareRequest( - path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); - - // set timeout - RestClient.Timeout = Configuration.Timeout; - // set user agent - RestClient.UserAgent = Configuration.UserAgent; - - InterceptRequest(request); - var response = RestClient.Execute(request); - InterceptResponse(request, response); - - return (Object) response; - } - - - /// - /// Escape string (url-encoded). - /// - /// String to be escaped. - /// Escaped string. - public string EscapeString(string str) - { - return UrlEncode(str); - } - - /// - /// Create FileParameter based on Stream. - /// - /// Parameter name. - /// Input stream. - /// FileParameter. - public FileParameter ParameterToFile(string name, Stream stream) - { - if (stream is FileStream) - return FileParameter.Create(name, ReadAsBytes(stream), Path.GetFileName(((FileStream)stream).Name)); - else - return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided"); - } - - /// - /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. - /// If parameter is a list, join the list with ",". - /// Otherwise just return the string. - /// - /// The parameter (header, path, query, form). - /// Formatted string. - public string ParameterToString(object obj) - { - if (obj is DateTime) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return ((DateTime)obj).ToString (Configuration.DateTimeFormat); - else if (obj is DateTimeOffset) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); - else if (obj is IList) - { - var flattenedString = new StringBuilder(); - foreach (var param in (IList)obj) - { - if (flattenedString.Length > 0) - flattenedString.Append(","); - flattenedString.Append(param); - } - return flattenedString.ToString(); - } - else - return Convert.ToString (obj); - } - - /// - /// Deserialize the JSON string into a proper object. - /// - /// The HTTP response. - /// Object type. - /// Object representation of the JSON string. - public object Deserialize(IRestResponse response, Type type) - { - IList headers = response.Headers; - if (type == typeof(byte[])) // return byte array - { - return response.RawBytes; - } - - if (type == typeof(Stream)) - { - if (headers != null) - { - var filePath = String.IsNullOrEmpty(Configuration.TempFolderPath) - ? Path.GetTempPath() - : Configuration.TempFolderPath; - var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); - foreach (var header in headers) - { - var match = regex.Match(header.ToString()); - if (match.Success) - { - string fileName = filePath + SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - File.WriteAllBytes(fileName, response.RawBytes); - return new FileStream(fileName, FileMode.Open); - } - } - } - var stream = new MemoryStream(response.RawBytes); - return stream; - } - - if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object - { - return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); - } - - if (type == typeof(String) || type.Name.StartsWith("System.Nullable")) // return primitive type - { - return ConvertType(response.Content, type); - } - - // at this point, it must be a model (json) - try - { - return JsonConvert.DeserializeObject(response.Content, type, serializerSettings); - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - /// - /// Serialize an input (model) into JSON string - /// - /// Object. - /// JSON string. - public String Serialize(object obj) - { - try - { - return obj != null ? JsonConvert.SerializeObject(obj) : null; - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - /// - /// Select the Content-Type header's value from the given content-type array: - /// if JSON exists in the given array, use it; - /// otherwise use the first one defined in 'consumes' - /// - /// The Content-Type array to select from. - /// The Content-Type header to use. - public String SelectHeaderContentType(String[] contentTypes) - { - if (contentTypes.Length == 0) - return null; - - if (contentTypes.Contains("application/json", StringComparer.OrdinalIgnoreCase)) - return "application/json"; - - return contentTypes[0]; // use the first content type specified in 'consumes' - } - - /// - /// Select the Accept header's value from the given accepts array: - /// if JSON exists in the given array, use it; - /// otherwise use all of them (joining into a string) - /// - /// The accepts array to select from. - /// The Accept header to use. - public String SelectHeaderAccept(String[] accepts) - { - if (accepts.Length == 0) - return null; - - if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) - return "application/json"; - - return String.Join(",", accepts); - } - - /// - /// Encode string in base64 format. - /// - /// String to be encoded. - /// Encoded string. - public static string Base64Encode(string text) - { - return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); - } - - /// - /// Dynamically cast the object into target type. - /// Ref: http://stackoverflow.com/questions/4925718/c-dynamic-runtime-cast - /// - /// Object to be casted - /// Target type - /// Casted object - public static object ConvertType(T source, Type dest) where T : class - { - return Convert.ChangeType(source, dest); - } - - /// - /// Convert stream to byte array - /// Credit/Ref: http://stackoverflow.com/a/221941/677735 - /// - /// Input stream to be converted - /// Byte array - public static byte[] ReadAsBytes(Stream input) - { - byte[] buffer = new byte[16*1024]; - using (MemoryStream ms = new MemoryStream()) - { - int read; - while ((read = input.Read(buffer, 0, buffer.Length)) > 0) - { - ms.Write(buffer, 0, read); - } - return ms.ToArray(); - } - } - - /// - /// URL encode a string - /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 - /// - /// String to be URL encoded - /// Byte array - public static string UrlEncode(string input) - { - const int maxLength = 32766; - - if (input == null) - { - throw new ArgumentNullException("input"); - } - - if (input.Length <= maxLength) - { - return Uri.EscapeDataString(input); - } - - StringBuilder sb = new StringBuilder(input.Length * 2); - int index = 0; - - while (index < input.Length) - { - int length = Math.Min(input.Length - index, maxLength); - string subString = input.Substring(index, length); - - sb.Append(Uri.EscapeDataString(subString)); - index += subString.Length; - } - - return sb.ToString(); - } - - /// - /// Sanitize filename by removing the path - /// - /// Filename - /// Filename - public static string SanitizeFilename(string filename) - { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); - - if (match.Success) - { - return match.Groups[1].Value; - } - else - { - return filename; - } - } - } -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ApiException.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ApiException.cs deleted file mode 100644 index 6cb34ac..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ApiException.cs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; - -namespace Sphereon.SDK.TemplateProcessor.Client -{ - /// - /// API Exception - /// - public class ApiException : Exception - { - /// - /// Gets or sets the error code (HTTP status code) - /// - /// The error code (HTTP status code). - public int ErrorCode { get; set; } - - /// - /// Gets or sets the error content (body json object) - /// - /// The error content (Http response body). - public object ErrorContent { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - public ApiException() {} - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - public ApiException(int errorCode, string message) : base(message) - { - this.ErrorCode = errorCode; - } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - /// Error content. - public ApiException(int errorCode, string message, object errorContent = null) : base(message) - { - this.ErrorCode = errorCode; - this.ErrorContent = errorContent; - } - } - -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ApiResponse.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ApiResponse.cs deleted file mode 100644 index 1403939..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ApiResponse.cs +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Collections.Generic; - -namespace Sphereon.SDK.TemplateProcessor.Client -{ - /// - /// API Response - /// - public class ApiResponse - { - /// - /// Gets or sets the status code (HTTP status code) - /// - /// The status code. - public int StatusCode { get; private set; } - - /// - /// Gets or sets the HTTP headers - /// - /// HTTP headers - public IDictionary Headers { get; private set; } - - /// - /// Gets or sets the data (parsed HTTP body) - /// - /// The data. - public T Data { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// HTTP headers. - /// Data (parsed HTTP body) - public ApiResponse(int statusCode, IDictionary headers, T data) - { - this.StatusCode= statusCode; - this.Headers = headers; - this.Data = data; - } - - } - -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/Configuration.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/Configuration.cs deleted file mode 100644 index bb507d8..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/Configuration.cs +++ /dev/null @@ -1,334 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Reflection; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; - -namespace Sphereon.SDK.TemplateProcessor.Client -{ - /// - /// Represents a set of configuration settings - /// - public class Configuration - { - /// - /// Initializes a new instance of the Configuration class with different settings - /// - /// Api client - /// Dictionary of default HTTP header - /// Username - /// Password - /// accessToken - /// Dictionary of API key - /// Dictionary of API key prefix - /// Temp folder path - /// DateTime format string - /// HTTP connection timeout (in milliseconds) - /// HTTP user agent - public Configuration(ApiClient apiClient = null, - Dictionary defaultHeader = null, - string username = null, - string password = null, - string accessToken = null, - Dictionary apiKey = null, - Dictionary apiKeyPrefix = null, - string tempFolderPath = null, - string dateTimeFormat = null, - int timeout = 100000, - string userAgent = "Swagger-Codegen/1.0.0/csharp" - ) - { - setApiClientUsingDefault(apiClient); - - Username = username; - Password = password; - AccessToken = accessToken; - UserAgent = userAgent; - - if (defaultHeader != null) - DefaultHeader = defaultHeader; - if (apiKey != null) - ApiKey = apiKey; - if (apiKeyPrefix != null) - ApiKeyPrefix = apiKeyPrefix; - - TempFolderPath = tempFolderPath; - DateTimeFormat = dateTimeFormat; - Timeout = timeout; - } - - /// - /// Initializes a new instance of the Configuration class. - /// - /// Api client. - public Configuration(ApiClient apiClient) - { - setApiClientUsingDefault(apiClient); - } - - /// - /// Version of the package. - /// - /// Version of the package. - public const string Version = "1.0.0"; - - /// - /// Gets or sets the default Configuration. - /// - /// Configuration. - public static Configuration Default = new Configuration(); - - /// - /// Default creation of exceptions for a given method name and response object - /// - public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) => - { - int status = (int) response.StatusCode; - if (status >= 400) return new ApiException(status, String.Format("Error calling {0}: {1}", methodName, response.Content), response.Content); - if (status == 0) return new ApiException(status, String.Format("Error calling {0}: {1}", methodName, response.ErrorMessage), response.ErrorMessage); - return null; - }; - - /// - /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. - /// - /// Timeout. - public int Timeout - { - get { return ApiClient.RestClient.Timeout; } - - set - { - if (ApiClient != null) - ApiClient.RestClient.Timeout = value; - } - } - - /// - /// Gets or sets the default API client for making HTTP calls. - /// - /// The API client. - public ApiClient ApiClient; - - /// - /// Set the ApiClient using Default or ApiClient instance. - /// - /// An instance of ApiClient. - /// - public void setApiClientUsingDefault (ApiClient apiClient = null) - { - if (apiClient == null) - { - if (Default != null && Default.ApiClient == null) - Default.ApiClient = new ApiClient(); - - ApiClient = Default != null ? Default.ApiClient : new ApiClient(); - } - else - { - if (Default != null && Default.ApiClient == null) - Default.ApiClient = apiClient; - - ApiClient = apiClient; - } - } - - private Dictionary _defaultHeaderMap = new Dictionary(); - - /// - /// Gets or sets the default header. - /// - public Dictionary DefaultHeader - { - get { return _defaultHeaderMap; } - - set - { - _defaultHeaderMap = value; - } - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - public void AddDefaultHeader(string key, string value) - { - _defaultHeaderMap[key] = value; - } - - /// - /// Add Api Key Header. - /// - /// Api Key name. - /// Api Key value. - /// - public void AddApiKey(string key, string value) - { - ApiKey[key] = value; - } - - /// - /// Sets the API key prefix. - /// - /// Api Key name. - /// Api Key value. - public void AddApiKeyPrefix(string key, string value) - { - ApiKeyPrefix[key] = value; - } - - /// - /// Gets or sets the HTTP user agent. - /// - /// Http user agent. - public String UserAgent { get; set; } - - /// - /// Gets or sets the username (HTTP basic authentication). - /// - /// The username. - public String Username { get; set; } - - /// - /// Gets or sets the password (HTTP basic authentication). - /// - /// The password. - public String Password { get; set; } - - /// - /// Gets or sets the access token for OAuth2 authentication. - /// - /// The access token. - public String AccessToken { get; set; } - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - public Dictionary ApiKey = new Dictionary(); - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - public Dictionary ApiKeyPrefix = new Dictionary(); - - /// - /// Get the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - public string GetApiKeyWithPrefix (string apiKeyIdentifier) - { - var apiKeyValue = ""; - ApiKey.TryGetValue (apiKeyIdentifier, out apiKeyValue); - var apiKeyPrefix = ""; - if (ApiKeyPrefix.TryGetValue (apiKeyIdentifier, out apiKeyPrefix)) - return apiKeyPrefix + " " + apiKeyValue; - else - return apiKeyValue; - } - - private string _tempFolderPath; - - /// - /// Gets or sets the temporary folder path to store the files downloaded from the server. - /// - /// Folder path. - public String TempFolderPath - { - get - { - // default to Path.GetTempPath() if _tempFolderPath is not set - if (String.IsNullOrEmpty(_tempFolderPath)) - { - _tempFolderPath = Path.GetTempPath(); - } - return _tempFolderPath; - } - - set - { - if (String.IsNullOrEmpty(value)) - { - _tempFolderPath = value; - return; - } - - // create the directory if it does not exist - if (!Directory.Exists(value)) - Directory.CreateDirectory(value); - - // check if the path contains directory separator at the end - if (value[value.Length - 1] == Path.DirectorySeparatorChar) - _tempFolderPath = value; - else - _tempFolderPath = value + Path.DirectorySeparatorChar; - } - } - - private const string ISO8601_DATETIME_FORMAT = "o"; - - private string _dateTimeFormat = ISO8601_DATETIME_FORMAT; - - /// - /// Gets or sets the the date time format used when serializing in the ApiClient - /// By default, it's set to ISO 8601 - "o", for others see: - /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx - /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx - /// No validation is done to ensure that the string you're providing is valid - /// - /// The DateTimeFormat string - public String DateTimeFormat - { - get - { - return _dateTimeFormat; - } - set - { - if (string.IsNullOrEmpty(value)) - { - // Never allow a blank or null string, go back to the default - _dateTimeFormat = ISO8601_DATETIME_FORMAT; - return; - } - - // Caution, no validation when you choose date time format other than ISO 8601 - // Take a look at the above links - _dateTimeFormat = value; - } - } - - /// - /// Returns a string with essential information for debugging. - /// - public static String ToDebugReport() - { - String report = "C# SDK (Sphereon.SDK.TemplateProcessor) Debug Report:\n"; - report += " OS: " + Environment.OSVersion + "\n"; - report += " .NET Framework Version: " + Assembly - .GetExecutingAssembly() - .GetReferencedAssemblies() - .Where(x => x.Name == "System.Core").First().Version.ToString() + "\n"; - report += " Version of the API: 0.1\n"; - report += " SDK Package Version: 1.0.0\n"; - - return report; - } - } -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ExceptionFactory.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ExceptionFactory.cs deleted file mode 100644 index 878daf1..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/ExceptionFactory.cs +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - - -using System; -using RestSharp; - -namespace Sphereon.SDK.TemplateProcessor.Client -{ - /// - /// A delegate to ExceptionFactory method - /// - /// Method name - /// Response - /// Exceptions - public delegate Exception ExceptionFactory(string methodName, IRestResponse response); -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/IApiAccessor.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/IApiAccessor.cs deleted file mode 100644 index 80c70df..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/IApiAccessor.cs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; - -namespace Sphereon.SDK.TemplateProcessor.Client -{ - /// - /// Represents configuration aspects required to interact with the API endpoints. - /// - public interface IApiAccessor - { - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - Configuration Configuration {get; set;} - - /// - /// Gets the base path of the API client. - /// - /// The base path - String GetBasePath(); - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - ExceptionFactory ExceptionFactory { get; set; } - } -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/SwaggerDateConverter.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/SwaggerDateConverter.cs deleted file mode 100644 index dfbba59..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Client/SwaggerDateConverter.cs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using Newtonsoft.Json.Converters; - -namespace Sphereon.SDK.TemplateProcessor.Client -{ - /// - /// Formatter for 'date' swagger formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types - /// - public class SwaggerDateConverter : IsoDateTimeConverter - { - /// - /// Initializes a new instance of the class. - /// - public SwaggerDateConverter() - { - // full-date = date-fullyear "-" date-month "-" date-mday - DateTimeFormat = "yyyy-MM-dd"; - } - } -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/DataSetResponse.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/DataSetResponse.cs deleted file mode 100644 index 35a7cb4..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/DataSetResponse.cs +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// The merge template response. - /// - [DataContract] - public partial class DataSetResponse : IEquatable - { - /// - /// The status of the template - /// - /// The status of the template - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - - /// - /// Enum CREATED for "CREATED" - /// - [EnumMember(Value = "CREATED")] - CREATED, - - /// - /// Enum UPDATED for "UPDATED" - /// - [EnumMember(Value = "UPDATED")] - UPDATED, - - /// - /// Enum DELETED for "DELETED" - /// - [EnumMember(Value = "DELETED")] - DELETED - } - - /// - /// The status of the template - /// - /// The status of the template - [DataMember(Name="status", EmitDefaultValue=false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DataSetResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// Unique dataset id (required). - public DataSetResponse(string Id = default(string)) - { - // to ensure "Id" is required (not null) - if (Id == null) - { - throw new InvalidDataException("Id is a required property for DataSetResponse and cannot be null"); - } - else - { - this.Id = Id; - } - } - - /// - /// The completion date/time of this template in ISO 8601 format - /// - /// The completion date/time of this template in ISO 8601 format - [DataMember(Name="completionTime", EmitDefaultValue=false)] - public DateTime? CompletionTime { get; private set; } - - /// - /// The creation date/time of this template in ISO 8601 format - /// - /// The creation date/time of this template in ISO 8601 format - [DataMember(Name="creationTime", EmitDefaultValue=false)] - public DateTime? CreationTime { get; private set; } - - /// - /// Unique dataset id - /// - /// Unique dataset id - [DataMember(Name="id", EmitDefaultValue=false)] - public string Id { get; set; } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class DataSetResponse {\n"); - sb.Append(" CompletionTime: ").Append(CompletionTime).Append("\n"); - sb.Append(" CreationTime: ").Append(CreationTime).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as DataSetResponse); - } - - /// - /// Returns true if DataSetResponse instances are equal - /// - /// Instance of DataSetResponse to be compared - /// Boolean - public bool Equals(DataSetResponse other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.CompletionTime == other.CompletionTime || - this.CompletionTime != null && - this.CompletionTime.Equals(other.CompletionTime) - ) && - ( - this.CreationTime == other.CreationTime || - this.CreationTime != null && - this.CreationTime.Equals(other.CreationTime) - ) && - ( - this.Id == other.Id || - this.Id != null && - this.Id.Equals(other.Id) - ) && - ( - this.Status == other.Status || - this.Status != null && - this.Status.Equals(other.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.CompletionTime != null) - hash = hash * 59 + this.CompletionTime.GetHashCode(); - if (this.CreationTime != null) - hash = hash * 59 + this.CreationTime.GetHashCode(); - if (this.Id != null) - hash = hash * 59 + this.Id.GetHashCode(); - if (this.Status != null) - hash = hash * 59 + this.Status.GetHashCode(); - return hash; - } - } - - } - -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/Error.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/Error.cs deleted file mode 100644 index ba82dcb..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/Error.cs +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// An error - /// - [DataContract] - public partial class Error : IEquatable - { - /// - /// Gets or Sets Level - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum LevelEnum - { - - /// - /// Enum INFO for "INFO" - /// - [EnumMember(Value = "INFO")] - INFO, - - /// - /// Enum WARNING for "WARNING" - /// - [EnumMember(Value = "WARNING")] - WARNING, - - /// - /// Enum FATAL for "FATAL" - /// - [EnumMember(Value = "FATAL")] - FATAL - } - - /// - /// Gets or Sets Level - /// - [DataMember(Name="level", EmitDefaultValue=false)] - public LevelEnum? Level { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Error() { } - /// - /// Initializes a new instance of the class. - /// - /// Code (required). - /// Level (required). - /// Cause. - /// Message (required). - public Error(string Code = default(string), LevelEnum? Level = default(LevelEnum?), Error Cause = default(Error), string Message = default(string)) - { - // to ensure "Code" is required (not null) - if (Code == null) - { - throw new InvalidDataException("Code is a required property for Error and cannot be null"); - } - else - { - this.Code = Code; - } - // to ensure "Level" is required (not null) - if (Level == null) - { - throw new InvalidDataException("Level is a required property for Error and cannot be null"); - } - else - { - this.Level = Level; - } - // to ensure "Message" is required (not null) - if (Message == null) - { - throw new InvalidDataException("Message is a required property for Error and cannot be null"); - } - else - { - this.Message = Message; - } - this.Cause = Cause; - } - - /// - /// Gets or Sets Code - /// - [DataMember(Name="code", EmitDefaultValue=false)] - public string Code { get; set; } - - - /// - /// Gets or Sets Cause - /// - [DataMember(Name="cause", EmitDefaultValue=false)] - public Error Cause { get; set; } - - /// - /// Gets or Sets Message - /// - [DataMember(Name="message", EmitDefaultValue=false)] - public string Message { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Error {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Level: ").Append(Level).Append("\n"); - sb.Append(" Cause: ").Append(Cause).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as Error); - } - - /// - /// Returns true if Error instances are equal - /// - /// Instance of Error to be compared - /// Boolean - public bool Equals(Error other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.Code == other.Code || - this.Code != null && - this.Code.Equals(other.Code) - ) && - ( - this.Level == other.Level || - this.Level != null && - this.Level.Equals(other.Level) - ) && - ( - this.Cause == other.Cause || - this.Cause != null && - this.Cause.Equals(other.Cause) - ) && - ( - this.Message == other.Message || - this.Message != null && - this.Message.Equals(other.Message) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.Code != null) - hash = hash * 59 + this.Code.GetHashCode(); - if (this.Level != null) - hash = hash * 59 + this.Level.GetHashCode(); - if (this.Cause != null) - hash = hash * 59 + this.Cause.GetHashCode(); - if (this.Message != null) - hash = hash * 59 + this.Message.GetHashCode(); - return hash; - } - } - - } - -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/ErrorResponse.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/ErrorResponse.cs deleted file mode 100644 index 855b189..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/ErrorResponse.cs +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// The error response - /// - [DataContract] - public partial class ErrorResponse : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// Errors. - public ErrorResponse(List Errors = default(List)) - { - this.Errors = Errors; - } - - /// - /// Gets or Sets Errors - /// - [DataMember(Name="errors", EmitDefaultValue=false)] - public List Errors { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ErrorResponse {\n"); - sb.Append(" Errors: ").Append(Errors).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as ErrorResponse); - } - - /// - /// Returns true if ErrorResponse instances are equal - /// - /// Instance of ErrorResponse to be compared - /// Boolean - public bool Equals(ErrorResponse other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.Errors == other.Errors || - this.Errors != null && - this.Errors.SequenceEqual(other.Errors) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.Errors != null) - hash = hash * 59 + this.Errors.GetHashCode(); - return hash; - } - } - - } - -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/Lifecycle.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/Lifecycle.cs deleted file mode 100644 index a9df17b..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/Lifecycle.cs +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// Lifecycle settings. When no lifecycle settings are supplied, the job and files will be deleted directly after retrieval of the file - /// - [DataContract] - public partial class Lifecycle : IEquatable - { - /// - /// Gets or Sets Action - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ActionEnum - { - - /// - /// Enum DELETE for "DELETE" - /// - [EnumMember(Value = "DELETE")] - DELETE - } - - /// - /// Gets or Sets Type - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - - /// - /// Enum RETRIEVAL for "RETRIEVAL" - /// - [EnumMember(Value = "RETRIEVAL")] - RETRIEVAL, - - /// - /// Enum TIME for "TIME" - /// - [EnumMember(Value = "TIME")] - TIME - } - - /// - /// Gets or Sets Action - /// - [DataMember(Name="action", EmitDefaultValue=false)] - public ActionEnum? Action { get; set; } - /// - /// Gets or Sets Type - /// - [DataMember(Name="type", EmitDefaultValue=false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation. - /// Action. - /// Type. - public Lifecycle(DateTime? ActionTime = default(DateTime?), ActionEnum? Action = default(ActionEnum?), TypeEnum? Type = default(TypeEnum?)) - { - this.ActionTime = ActionTime; - this.Action = Action; - this.Type = Type; - } - - /// - /// The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation - /// - /// The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation - [DataMember(Name="actionTime", EmitDefaultValue=false)] - public DateTime? ActionTime { get; set; } - - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Lifecycle {\n"); - sb.Append(" ActionTime: ").Append(ActionTime).Append("\n"); - sb.Append(" Action: ").Append(Action).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as Lifecycle); - } - - /// - /// Returns true if Lifecycle instances are equal - /// - /// Instance of Lifecycle to be compared - /// Boolean - public bool Equals(Lifecycle other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.ActionTime == other.ActionTime || - this.ActionTime != null && - this.ActionTime.Equals(other.ActionTime) - ) && - ( - this.Action == other.Action || - this.Action != null && - this.Action.Equals(other.Action) - ) && - ( - this.Type == other.Type || - this.Type != null && - this.Type.Equals(other.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.ActionTime != null) - hash = hash * 59 + this.ActionTime.GetHashCode(); - if (this.Action != null) - hash = hash * 59 + this.Action.GetHashCode(); - if (this.Type != null) - hash = hash * 59 + this.Type.GetHashCode(); - return hash; - } - } - - } - -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/MergeJob.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/MergeJob.cs deleted file mode 100644 index fbfa19a..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/MergeJob.cs +++ /dev/null @@ -1,330 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// The merge job. Has access to the job merge data. - /// - [DataContract] - public partial class MergeJob : IEquatable - { - /// - /// The status of the job - /// - /// The status of the job - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - - /// - /// Enum CREATED for "CREATED" - /// - [EnumMember(Value = "CREATED")] - CREATED, - - /// - /// Enum UPDATED for "UPDATED" - /// - [EnumMember(Value = "UPDATED")] - UPDATED, - - /// - /// Enum PROCESSING for "PROCESSING" - /// - [EnumMember(Value = "PROCESSING")] - PROCESSING, - - /// - /// Enum DONE for "DONE" - /// - [EnumMember(Value = "DONE")] - DONE, - - /// - /// Enum ERROR for "ERROR" - /// - [EnumMember(Value = "ERROR")] - ERROR, - - /// - /// Enum DELETED for "DELETED" - /// - [EnumMember(Value = "DELETED")] - DELETED - } - - /// - /// The status of the job - /// - /// The status of the job - [DataMember(Name="status", EmitDefaultValue=false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MergeJob() { } - /// - /// Initializes a new instance of the class. - /// - /// The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation (required). - /// Data set id. - /// The storage locations of the result files. (required). - /// Header data set ids. - /// The storage location. (optional). - /// MergeSettings. - public MergeJob(string JobId = default(string), string DataSetId = default(string), List ResultStreams = default(List), List HeaderDataSetIds = default(List), StorageLocation ResultStorageLocation = default(StorageLocation), MergeSettings MergeSettings = default(MergeSettings)) - { - // to ensure "JobId" is required (not null) - if (JobId == null) - { - throw new InvalidDataException("JobId is a required property for MergeJob and cannot be null"); - } - else - { - this.JobId = JobId; - } - // to ensure "ResultStreams" is required (not null) - if (ResultStreams == null) - { - throw new InvalidDataException("ResultStreams is a required property for MergeJob and cannot be null"); - } - else - { - this.ResultStreams = ResultStreams; - } - this.DataSetId = DataSetId; - this.HeaderDataSetIds = HeaderDataSetIds; - this.ResultStorageLocation = ResultStorageLocation; - this.MergeSettings = MergeSettings; - } - - /// - /// The completion date/time of this job in ISO 8601 format - /// - /// The completion date/time of this job in ISO 8601 format - [DataMember(Name="completionTime", EmitDefaultValue=false)] - public DateTime? CompletionTime { get; private set; } - - /// - /// The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation - /// - /// The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation - [DataMember(Name="jobId", EmitDefaultValue=false)] - public string JobId { get; set; } - - /// - /// The creation date/time of this job in ISO 8601 format - /// - /// The creation date/time of this job in ISO 8601 format - [DataMember(Name="creationTime", EmitDefaultValue=false)] - public DateTime? CreationTime { get; private set; } - - /// - /// Data set id - /// - /// Data set id - [DataMember(Name="dataSetId", EmitDefaultValue=false)] - public string DataSetId { get; set; } - - /// - /// The storage locations of the result files. - /// - /// The storage locations of the result files. - [DataMember(Name="resultStreams", EmitDefaultValue=false)] - public List ResultStreams { get; set; } - - /// - /// Header data set ids - /// - /// Header data set ids - [DataMember(Name="headerDataSetIds", EmitDefaultValue=false)] - public List HeaderDataSetIds { get; set; } - - /// - /// The storage location. (optional) - /// - /// The storage location. (optional) - [DataMember(Name="resultStorageLocation", EmitDefaultValue=false)] - public StorageLocation ResultStorageLocation { get; set; } - - /// - /// Gets or Sets MergeSettings - /// - [DataMember(Name="mergeSettings", EmitDefaultValue=false)] - public MergeSettings MergeSettings { get; set; } - - /// - /// A status message, which can be informational, warning or error. A message here does not indicate an error perse - /// - /// A status message, which can be informational, warning or error. A message here does not indicate an error perse - [DataMember(Name="statusMessage", EmitDefaultValue=false)] - public string StatusMessage { get; private set; } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class MergeJob {\n"); - sb.Append(" CompletionTime: ").Append(CompletionTime).Append("\n"); - sb.Append(" JobId: ").Append(JobId).Append("\n"); - sb.Append(" CreationTime: ").Append(CreationTime).Append("\n"); - sb.Append(" DataSetId: ").Append(DataSetId).Append("\n"); - sb.Append(" ResultStreams: ").Append(ResultStreams).Append("\n"); - sb.Append(" HeaderDataSetIds: ").Append(HeaderDataSetIds).Append("\n"); - sb.Append(" ResultStorageLocation: ").Append(ResultStorageLocation).Append("\n"); - sb.Append(" MergeSettings: ").Append(MergeSettings).Append("\n"); - sb.Append(" StatusMessage: ").Append(StatusMessage).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as MergeJob); - } - - /// - /// Returns true if MergeJob instances are equal - /// - /// Instance of MergeJob to be compared - /// Boolean - public bool Equals(MergeJob other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.CompletionTime == other.CompletionTime || - this.CompletionTime != null && - this.CompletionTime.Equals(other.CompletionTime) - ) && - ( - this.JobId == other.JobId || - this.JobId != null && - this.JobId.Equals(other.JobId) - ) && - ( - this.CreationTime == other.CreationTime || - this.CreationTime != null && - this.CreationTime.Equals(other.CreationTime) - ) && - ( - this.DataSetId == other.DataSetId || - this.DataSetId != null && - this.DataSetId.Equals(other.DataSetId) - ) && - ( - this.ResultStreams == other.ResultStreams || - this.ResultStreams != null && - this.ResultStreams.SequenceEqual(other.ResultStreams) - ) && - ( - this.HeaderDataSetIds == other.HeaderDataSetIds || - this.HeaderDataSetIds != null && - this.HeaderDataSetIds.SequenceEqual(other.HeaderDataSetIds) - ) && - ( - this.ResultStorageLocation == other.ResultStorageLocation || - this.ResultStorageLocation != null && - this.ResultStorageLocation.Equals(other.ResultStorageLocation) - ) && - ( - this.MergeSettings == other.MergeSettings || - this.MergeSettings != null && - this.MergeSettings.Equals(other.MergeSettings) - ) && - ( - this.StatusMessage == other.StatusMessage || - this.StatusMessage != null && - this.StatusMessage.Equals(other.StatusMessage) - ) && - ( - this.Status == other.Status || - this.Status != null && - this.Status.Equals(other.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.CompletionTime != null) - hash = hash * 59 + this.CompletionTime.GetHashCode(); - if (this.JobId != null) - hash = hash * 59 + this.JobId.GetHashCode(); - if (this.CreationTime != null) - hash = hash * 59 + this.CreationTime.GetHashCode(); - if (this.DataSetId != null) - hash = hash * 59 + this.DataSetId.GetHashCode(); - if (this.ResultStreams != null) - hash = hash * 59 + this.ResultStreams.GetHashCode(); - if (this.HeaderDataSetIds != null) - hash = hash * 59 + this.HeaderDataSetIds.GetHashCode(); - if (this.ResultStorageLocation != null) - hash = hash * 59 + this.ResultStorageLocation.GetHashCode(); - if (this.MergeSettings != null) - hash = hash * 59 + this.MergeSettings.GetHashCode(); - if (this.StatusMessage != null) - hash = hash * 59 + this.StatusMessage.GetHashCode(); - if (this.Status != null) - hash = hash * 59 + this.Status.GetHashCode(); - return hash; - } - } - - } - -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/MergeJobResponse.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/MergeJobResponse.cs deleted file mode 100644 index 5cf71ed..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/MergeJobResponse.cs +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// The merge job response. - /// - [DataContract] - public partial class MergeJobResponse : IEquatable - { - /// - /// The status of the job - /// - /// The status of the job - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - - /// - /// Enum CREATED for "CREATED" - /// - [EnumMember(Value = "CREATED")] - CREATED, - - /// - /// Enum UPDATED for "UPDATED" - /// - [EnumMember(Value = "UPDATED")] - UPDATED, - - /// - /// Enum PROCESSING for "PROCESSING" - /// - [EnumMember(Value = "PROCESSING")] - PROCESSING, - - /// - /// Enum DONE for "DONE" - /// - [EnumMember(Value = "DONE")] - DONE, - - /// - /// Enum ERROR for "ERROR" - /// - [EnumMember(Value = "ERROR")] - ERROR, - - /// - /// Enum DELETED for "DELETED" - /// - [EnumMember(Value = "DELETED")] - DELETED - } - - /// - /// The status of the job - /// - /// The status of the job - [DataMember(Name="status", EmitDefaultValue=false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MergeJobResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation (required). - /// Job. - public MergeJobResponse(string JobId = default(string), MergeJob Job = default(MergeJob)) - { - // to ensure "JobId" is required (not null) - if (JobId == null) - { - throw new InvalidDataException("JobId is a required property for MergeJobResponse and cannot be null"); - } - else - { - this.JobId = JobId; - } - this.Job = Job; - } - - /// - /// The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation - /// - /// The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation - [DataMember(Name="jobId", EmitDefaultValue=false)] - public string JobId { get; set; } - - /// - /// Gets or Sets Job - /// - [DataMember(Name="job", EmitDefaultValue=false)] - public MergeJob Job { get; set; } - - /// - /// A status message, which can be informational, warning or error. AA message here does not indicate an error perse - /// - /// A status message, which can be informational, warning or error. AA message here does not indicate an error perse - [DataMember(Name="statusMessage", EmitDefaultValue=false)] - public string StatusMessage { get; private set; } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class MergeJobResponse {\n"); - sb.Append(" JobId: ").Append(JobId).Append("\n"); - sb.Append(" Job: ").Append(Job).Append("\n"); - sb.Append(" StatusMessage: ").Append(StatusMessage).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as MergeJobResponse); - } - - /// - /// Returns true if MergeJobResponse instances are equal - /// - /// Instance of MergeJobResponse to be compared - /// Boolean - public bool Equals(MergeJobResponse other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.JobId == other.JobId || - this.JobId != null && - this.JobId.Equals(other.JobId) - ) && - ( - this.Job == other.Job || - this.Job != null && - this.Job.Equals(other.Job) - ) && - ( - this.StatusMessage == other.StatusMessage || - this.StatusMessage != null && - this.StatusMessage.Equals(other.StatusMessage) - ) && - ( - this.Status == other.Status || - this.Status != null && - this.Status.Equals(other.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.JobId != null) - hash = hash * 59 + this.JobId.GetHashCode(); - if (this.Job != null) - hash = hash * 59 + this.Job.GetHashCode(); - if (this.StatusMessage != null) - hash = hash * 59 + this.StatusMessage.GetHashCode(); - if (this.Status != null) - hash = hash * 59 + this.Status.GetHashCode(); - return hash; - } - } - - } - -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/MergeSettings.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/MergeSettings.cs deleted file mode 100644 index a574186..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/MergeSettings.cs +++ /dev/null @@ -1,329 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// Merge settings - /// - [DataContract] - public partial class MergeSettings : IEquatable - { - /// - /// Gets or Sets MergeResult - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum MergeResultEnum - { - - /// - /// Enum SINGLEFILE for "SINGLE_FILE" - /// - [EnumMember(Value = "SINGLE_FILE")] - SINGLEFILE, - - /// - /// Enum SEPARATEFILES for "SEPARATE_FILES" - /// - [EnumMember(Value = "SEPARATE_FILES")] - SEPARATEFILES - } - - /// - /// Gets or Sets Engine - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum EngineEnum - { - - /// - /// Enum BASIC for "BASIC" - /// - [EnumMember(Value = "BASIC")] - BASIC, - - /// - /// Enum PREMIUM for "PREMIUM" - /// - [EnumMember(Value = "PREMIUM")] - PREMIUM - } - - /// - /// Gets or Sets MergeResult - /// - [DataMember(Name="mergeResult", EmitDefaultValue=false)] - public MergeResultEnum? MergeResult { get; set; } - /// - /// Gets or Sets Engine - /// - [DataMember(Name="engine", EmitDefaultValue=false)] - public EngineEnum? Engine { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MergeSettings() { } - /// - /// Initializes a new instance of the class. - /// - /// Lifecycle. - /// MergeResult. - /// Data set id (required). - /// Engine. - /// optional header data set ids. - /// The output location of the result files. (required). - /// Template version. - /// Template id (required). - /// OutputSettings (required). - public MergeSettings(Lifecycle Lifecycle = default(Lifecycle), MergeResultEnum? MergeResult = default(MergeResultEnum?), string DataSetId = default(string), EngineEnum? Engine = default(EngineEnum?), List HeaderDataSetIds = default(List), StorageLocation ResultStorageLocation = default(StorageLocation), int? TemplateVersion = default(int?), string TemplateId = default(string), OutputSettings OutputSettings = default(OutputSettings)) - { - // to ensure "DataSetId" is required (not null) - if (DataSetId == null) - { - throw new InvalidDataException("DataSetId is a required property for MergeSettings and cannot be null"); - } - else - { - this.DataSetId = DataSetId; - } - // to ensure "ResultStorageLocation" is required (not null) - if (ResultStorageLocation == null) - { - throw new InvalidDataException("ResultStorageLocation is a required property for MergeSettings and cannot be null"); - } - else - { - this.ResultStorageLocation = ResultStorageLocation; - } - // to ensure "TemplateId" is required (not null) - if (TemplateId == null) - { - throw new InvalidDataException("TemplateId is a required property for MergeSettings and cannot be null"); - } - else - { - this.TemplateId = TemplateId; - } - // to ensure "OutputSettings" is required (not null) - if (OutputSettings == null) - { - throw new InvalidDataException("OutputSettings is a required property for MergeSettings and cannot be null"); - } - else - { - this.OutputSettings = OutputSettings; - } - this.Lifecycle = Lifecycle; - this.MergeResult = MergeResult; - this.Engine = Engine; - this.HeaderDataSetIds = HeaderDataSetIds; - this.TemplateVersion = TemplateVersion; - } - - /// - /// Gets or Sets Lifecycle - /// - [DataMember(Name="lifecycle", EmitDefaultValue=false)] - public Lifecycle Lifecycle { get; set; } - - - /// - /// Data set id - /// - /// Data set id - [DataMember(Name="dataSetId", EmitDefaultValue=false)] - public string DataSetId { get; set; } - - - /// - /// optional header data set ids - /// - /// optional header data set ids - [DataMember(Name="headerDataSetIds", EmitDefaultValue=false)] - public List HeaderDataSetIds { get; set; } - - /// - /// The output location of the result files. - /// - /// The output location of the result files. - [DataMember(Name="resultStorageLocation", EmitDefaultValue=false)] - public StorageLocation ResultStorageLocation { get; set; } - - /// - /// Template version - /// - /// Template version - [DataMember(Name="templateVersion", EmitDefaultValue=false)] - public int? TemplateVersion { get; set; } - - /// - /// Template id - /// - /// Template id - [DataMember(Name="templateId", EmitDefaultValue=false)] - public string TemplateId { get; set; } - - /// - /// Gets or Sets OutputSettings - /// - [DataMember(Name="outputSettings", EmitDefaultValue=false)] - public OutputSettings OutputSettings { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class MergeSettings {\n"); - sb.Append(" Lifecycle: ").Append(Lifecycle).Append("\n"); - sb.Append(" MergeResult: ").Append(MergeResult).Append("\n"); - sb.Append(" DataSetId: ").Append(DataSetId).Append("\n"); - sb.Append(" Engine: ").Append(Engine).Append("\n"); - sb.Append(" HeaderDataSetIds: ").Append(HeaderDataSetIds).Append("\n"); - sb.Append(" ResultStorageLocation: ").Append(ResultStorageLocation).Append("\n"); - sb.Append(" TemplateVersion: ").Append(TemplateVersion).Append("\n"); - sb.Append(" TemplateId: ").Append(TemplateId).Append("\n"); - sb.Append(" OutputSettings: ").Append(OutputSettings).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as MergeSettings); - } - - /// - /// Returns true if MergeSettings instances are equal - /// - /// Instance of MergeSettings to be compared - /// Boolean - public bool Equals(MergeSettings other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.Lifecycle == other.Lifecycle || - this.Lifecycle != null && - this.Lifecycle.Equals(other.Lifecycle) - ) && - ( - this.MergeResult == other.MergeResult || - this.MergeResult != null && - this.MergeResult.Equals(other.MergeResult) - ) && - ( - this.DataSetId == other.DataSetId || - this.DataSetId != null && - this.DataSetId.Equals(other.DataSetId) - ) && - ( - this.Engine == other.Engine || - this.Engine != null && - this.Engine.Equals(other.Engine) - ) && - ( - this.HeaderDataSetIds == other.HeaderDataSetIds || - this.HeaderDataSetIds != null && - this.HeaderDataSetIds.SequenceEqual(other.HeaderDataSetIds) - ) && - ( - this.ResultStorageLocation == other.ResultStorageLocation || - this.ResultStorageLocation != null && - this.ResultStorageLocation.Equals(other.ResultStorageLocation) - ) && - ( - this.TemplateVersion == other.TemplateVersion || - this.TemplateVersion != null && - this.TemplateVersion.Equals(other.TemplateVersion) - ) && - ( - this.TemplateId == other.TemplateId || - this.TemplateId != null && - this.TemplateId.Equals(other.TemplateId) - ) && - ( - this.OutputSettings == other.OutputSettings || - this.OutputSettings != null && - this.OutputSettings.Equals(other.OutputSettings) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.Lifecycle != null) - hash = hash * 59 + this.Lifecycle.GetHashCode(); - if (this.MergeResult != null) - hash = hash * 59 + this.MergeResult.GetHashCode(); - if (this.DataSetId != null) - hash = hash * 59 + this.DataSetId.GetHashCode(); - if (this.Engine != null) - hash = hash * 59 + this.Engine.GetHashCode(); - if (this.HeaderDataSetIds != null) - hash = hash * 59 + this.HeaderDataSetIds.GetHashCode(); - if (this.ResultStorageLocation != null) - hash = hash * 59 + this.ResultStorageLocation.GetHashCode(); - if (this.TemplateVersion != null) - hash = hash * 59 + this.TemplateVersion.GetHashCode(); - if (this.TemplateId != null) - hash = hash * 59 + this.TemplateId.GetHashCode(); - if (this.OutputSettings != null) - hash = hash * 59 + this.OutputSettings.GetHashCode(); - return hash; - } - } - - } - -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/OutputSettings.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/OutputSettings.cs deleted file mode 100644 index 230298b..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/OutputSettings.cs +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// Output settings - /// - [DataContract] - public partial class OutputSettings : IEquatable - { - /// - /// Gets or Sets DeliveryFormat - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum DeliveryFormatEnum - { - - /// - /// Enum PLAIN for "PLAIN" - /// - [EnumMember(Value = "PLAIN")] - PLAIN, - - /// - /// Enum ZIP for "ZIP" - /// - [EnumMember(Value = "ZIP")] - ZIP, - - /// - /// Enum _7ZIP for "_7ZIP" - /// - [EnumMember(Value = "_7ZIP")] - _7ZIP - } - - /// - /// Gets or Sets OutputFormat - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum OutputFormatEnum - { - - /// - /// Enum DOC for "DOC" - /// - [EnumMember(Value = "DOC")] - DOC, - - /// - /// Enum DOCX for "DOCX" - /// - [EnumMember(Value = "DOCX")] - DOCX, - - /// - /// Enum RTF for "RTF" - /// - [EnumMember(Value = "RTF")] - RTF, - - /// - /// Enum PDF for "PDF" - /// - [EnumMember(Value = "PDF")] - PDF, - - /// - /// Enum XPS for "XPS" - /// - [EnumMember(Value = "XPS")] - XPS, - - /// - /// Enum SVG for "SVG" - /// - [EnumMember(Value = "SVG")] - SVG, - - /// - /// Enum HTML for "HTML" - /// - [EnumMember(Value = "HTML")] - HTML, - - /// - /// Enum ODT for "ODT" - /// - [EnumMember(Value = "ODT")] - ODT, - - /// - /// Enum TIFF for "TIFF" - /// - [EnumMember(Value = "TIFF")] - TIFF, - - /// - /// Enum PNG for "PNG" - /// - [EnumMember(Value = "PNG")] - PNG, - - /// - /// Enum BMP for "BMP" - /// - [EnumMember(Value = "BMP")] - BMP, - - /// - /// Enum JPEG for "JPEG" - /// - [EnumMember(Value = "JPEG")] - JPEG, - - /// - /// Enum TXT for "TXT" - /// - [EnumMember(Value = "TXT")] - TXT, - - /// - /// Enum XML for "XML" - /// - [EnumMember(Value = "XML")] - XML, - - /// - /// Enum JSON for "JSON" - /// - [EnumMember(Value = "JSON")] - JSON, - - /// - /// Enum DEFAULT for "DEFAULT" - /// - [EnumMember(Value = "DEFAULT")] - DEFAULT - } - - /// - /// Gets or Sets DeliveryFormat - /// - [DataMember(Name="deliveryFormat", EmitDefaultValue=false)] - public DeliveryFormatEnum? DeliveryFormat { get; set; } - /// - /// Gets or Sets OutputFormat - /// - [DataMember(Name="outputFormat", EmitDefaultValue=false)] - public OutputFormatEnum? OutputFormat { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// DeliveryFormat. - /// OutputFormat. - public OutputSettings(DeliveryFormatEnum? DeliveryFormat = default(DeliveryFormatEnum?), OutputFormatEnum? OutputFormat = default(OutputFormatEnum?)) - { - this.DeliveryFormat = DeliveryFormat; - this.OutputFormat = OutputFormat; - } - - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class OutputSettings {\n"); - sb.Append(" DeliveryFormat: ").Append(DeliveryFormat).Append("\n"); - sb.Append(" OutputFormat: ").Append(OutputFormat).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as OutputSettings); - } - - /// - /// Returns true if OutputSettings instances are equal - /// - /// Instance of OutputSettings to be compared - /// Boolean - public bool Equals(OutputSettings other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.DeliveryFormat == other.DeliveryFormat || - this.DeliveryFormat != null && - this.DeliveryFormat.Equals(other.DeliveryFormat) - ) && - ( - this.OutputFormat == other.OutputFormat || - this.OutputFormat != null && - this.OutputFormat.Equals(other.OutputFormat) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.DeliveryFormat != null) - hash = hash * 59 + this.DeliveryFormat.GetHashCode(); - if (this.OutputFormat != null) - hash = hash * 59 + this.OutputFormat.GetHashCode(); - return hash; - } - } - - } - -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/OwnerInfo.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/OwnerInfo.cs deleted file mode 100644 index 2bd7133..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/OwnerInfo.cs +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// Owner info - /// - [DataContract] - public partial class OwnerInfo : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// The owner's phone number. - /// The owner's company/department. - /// The owner's name. - /// The owner's email address. - public OwnerInfo(string Phone = default(string), string CompanyDepartment = default(string), string Name = default(string), string Email = default(string)) - { - this.Phone = Phone; - this.CompanyDepartment = CompanyDepartment; - this.Name = Name; - this.Email = Email; - } - - /// - /// The owner's phone number - /// - /// The owner's phone number - [DataMember(Name="phone", EmitDefaultValue=false)] - public string Phone { get; set; } - - /// - /// The owner's company/department - /// - /// The owner's company/department - [DataMember(Name="companyDepartment", EmitDefaultValue=false)] - public string CompanyDepartment { get; set; } - - /// - /// The owner's name - /// - /// The owner's name - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// The owner's email address - /// - /// The owner's email address - [DataMember(Name="email", EmitDefaultValue=false)] - public string Email { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class OwnerInfo {\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" CompanyDepartment: ").Append(CompanyDepartment).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as OwnerInfo); - } - - /// - /// Returns true if OwnerInfo instances are equal - /// - /// Instance of OwnerInfo to be compared - /// Boolean - public bool Equals(OwnerInfo other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.Phone == other.Phone || - this.Phone != null && - this.Phone.Equals(other.Phone) - ) && - ( - this.CompanyDepartment == other.CompanyDepartment || - this.CompanyDepartment != null && - this.CompanyDepartment.Equals(other.CompanyDepartment) - ) && - ( - this.Name == other.Name || - this.Name != null && - this.Name.Equals(other.Name) - ) && - ( - this.Email == other.Email || - this.Email != null && - this.Email.Equals(other.Email) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.Phone != null) - hash = hash * 59 + this.Phone.GetHashCode(); - if (this.CompanyDepartment != null) - hash = hash * 59 + this.CompanyDepartment.GetHashCode(); - if (this.Name != null) - hash = hash * 59 + this.Name.GetHashCode(); - if (this.Email != null) - hash = hash * 59 + this.Email.GetHashCode(); - return hash; - } - } - - } - -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/ResultStreamRequest.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/ResultStreamRequest.cs deleted file mode 100644 index ec2cf30..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/ResultStreamRequest.cs +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// A request to download a specific result stream. - /// - [DataContract] - public partial class ResultStreamRequest : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ResultStreamRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The stream location (required). - /// The Output settings. - public ResultStreamRequest(StreamLocation StreamLocation = default(StreamLocation), OutputSettings OutputSettings = default(OutputSettings)) - { - // to ensure "StreamLocation" is required (not null) - if (StreamLocation == null) - { - throw new InvalidDataException("StreamLocation is a required property for ResultStreamRequest and cannot be null"); - } - else - { - this.StreamLocation = StreamLocation; - } - this.OutputSettings = OutputSettings; - } - - /// - /// The stream location - /// - /// The stream location - [DataMember(Name="streamLocation", EmitDefaultValue=false)] - public StreamLocation StreamLocation { get; set; } - - /// - /// The Output settings - /// - /// The Output settings - [DataMember(Name="outputSettings", EmitDefaultValue=false)] - public OutputSettings OutputSettings { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ResultStreamRequest {\n"); - sb.Append(" StreamLocation: ").Append(StreamLocation).Append("\n"); - sb.Append(" OutputSettings: ").Append(OutputSettings).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as ResultStreamRequest); - } - - /// - /// Returns true if ResultStreamRequest instances are equal - /// - /// Instance of ResultStreamRequest to be compared - /// Boolean - public bool Equals(ResultStreamRequest other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.StreamLocation == other.StreamLocation || - this.StreamLocation != null && - this.StreamLocation.Equals(other.StreamLocation) - ) && - ( - this.OutputSettings == other.OutputSettings || - this.OutputSettings != null && - this.OutputSettings.Equals(other.OutputSettings) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.StreamLocation != null) - hash = hash * 59 + this.StreamLocation.GetHashCode(); - if (this.OutputSettings != null) - hash = hash * 59 + this.OutputSettings.GetHashCode(); - return hash; - } - } - - } - -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/StorageLocation.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/StorageLocation.cs deleted file mode 100644 index 5209585..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/StorageLocation.cs +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// Location record - /// - [DataContract] - public partial class StorageLocation : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// FolderPath. - /// ContainerId. - public StorageLocation(string FolderPath = default(string), string ContainerId = default(string)) - { - this.FolderPath = FolderPath; - this.ContainerId = ContainerId; - } - - /// - /// Gets or Sets FolderPath - /// - [DataMember(Name="folderPath", EmitDefaultValue=false)] - public string FolderPath { get; set; } - - /// - /// Gets or Sets ContainerId - /// - [DataMember(Name="containerId", EmitDefaultValue=false)] - public string ContainerId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class StorageLocation {\n"); - sb.Append(" FolderPath: ").Append(FolderPath).Append("\n"); - sb.Append(" ContainerId: ").Append(ContainerId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as StorageLocation); - } - - /// - /// Returns true if StorageLocation instances are equal - /// - /// Instance of StorageLocation to be compared - /// Boolean - public bool Equals(StorageLocation other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.FolderPath == other.FolderPath || - this.FolderPath != null && - this.FolderPath.Equals(other.FolderPath) - ) && - ( - this.ContainerId == other.ContainerId || - this.ContainerId != null && - this.ContainerId.Equals(other.ContainerId) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.FolderPath != null) - hash = hash * 59 + this.FolderPath.GetHashCode(); - if (this.ContainerId != null) - hash = hash * 59 + this.ContainerId.GetHashCode(); - return hash; - } - } - - } - -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/StreamLocation.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/StreamLocation.cs deleted file mode 100644 index 27bbb91..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/StreamLocation.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// Location record of data stream - /// - [DataContract] - public partial class StreamLocation : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// FolderPath. - /// OriginalFileName. - /// FileName. - /// ContainerId. - public StreamLocation(string FolderPath = default(string), string OriginalFileName = default(string), string FileName = default(string), string ContainerId = default(string)) - { - this.FolderPath = FolderPath; - this.OriginalFileName = OriginalFileName; - this.FileName = FileName; - this.ContainerId = ContainerId; - } - - /// - /// Gets or Sets FolderPath - /// - [DataMember(Name="folderPath", EmitDefaultValue=false)] - public string FolderPath { get; set; } - - /// - /// Gets or Sets OriginalFileName - /// - [DataMember(Name="originalFileName", EmitDefaultValue=false)] - public string OriginalFileName { get; set; } - - /// - /// Gets or Sets FileName - /// - [DataMember(Name="fileName", EmitDefaultValue=false)] - public string FileName { get; set; } - - /// - /// Gets or Sets ContainerId - /// - [DataMember(Name="containerId", EmitDefaultValue=false)] - public string ContainerId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class StreamLocation {\n"); - sb.Append(" FolderPath: ").Append(FolderPath).Append("\n"); - sb.Append(" OriginalFileName: ").Append(OriginalFileName).Append("\n"); - sb.Append(" FileName: ").Append(FileName).Append("\n"); - sb.Append(" ContainerId: ").Append(ContainerId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as StreamLocation); - } - - /// - /// Returns true if StreamLocation instances are equal - /// - /// Instance of StreamLocation to be compared - /// Boolean - public bool Equals(StreamLocation other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.FolderPath == other.FolderPath || - this.FolderPath != null && - this.FolderPath.Equals(other.FolderPath) - ) && - ( - this.OriginalFileName == other.OriginalFileName || - this.OriginalFileName != null && - this.OriginalFileName.Equals(other.OriginalFileName) - ) && - ( - this.FileName == other.FileName || - this.FileName != null && - this.FileName.Equals(other.FileName) - ) && - ( - this.ContainerId == other.ContainerId || - this.ContainerId != null && - this.ContainerId.Equals(other.ContainerId) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.FolderPath != null) - hash = hash * 59 + this.FolderPath.GetHashCode(); - if (this.OriginalFileName != null) - hash = hash * 59 + this.OriginalFileName.GetHashCode(); - if (this.FileName != null) - hash = hash * 59 + this.FileName.GetHashCode(); - if (this.ContainerId != null) - hash = hash * 59 + this.ContainerId.GetHashCode(); - return hash; - } - } - - } - -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContext.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContext.cs deleted file mode 100644 index c80ffe7..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContext.cs +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// TemplateContext - /// - [DataContract] - public partial class TemplateContext : IEquatable - { - /// - /// Gets or Sets TemplateType - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum TemplateTypeEnum - { - - /// - /// Enum OFFICE for "OFFICE" - /// - [EnumMember(Value = "OFFICE")] - OFFICE, - - /// - /// Enum FREEMARKER for "FREEMARKER" - /// - [EnumMember(Value = "FREEMARKER")] - FREEMARKER - } - - /// - /// Gets or Sets TemplateType - /// - [DataMember(Name="templateType", EmitDefaultValue=false)] - public TemplateTypeEnum? TemplateType { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TemplateContext() { } - /// - /// Initializes a new instance of the class. - /// - /// TemplateType (required). - /// The template files (versioned). - /// The template description. - /// OwnerInfo. - /// The storage location. (optional). - /// Id. - /// The template context id. - public TemplateContext(TemplateTypeEnum? TemplateType = default(TemplateTypeEnum?), Dictionary TemplateFileLocations = default(Dictionary), string Description = default(string), OwnerInfo OwnerInfo = default(OwnerInfo), StorageLocation StorageLocation = default(StorageLocation), string Id = default(string), string TemplateId = default(string)) - { - // to ensure "TemplateType" is required (not null) - if (TemplateType == null) - { - throw new InvalidDataException("TemplateType is a required property for TemplateContext and cannot be null"); - } - else - { - this.TemplateType = TemplateType; - } - this.TemplateFileLocations = TemplateFileLocations; - this.Description = Description; - this.OwnerInfo = OwnerInfo; - this.StorageLocation = StorageLocation; - this.Id = Id; - this.TemplateId = TemplateId; - } - - - /// - /// The template files (versioned) - /// - /// The template files (versioned) - [DataMember(Name="templateFileLocations", EmitDefaultValue=false)] - public Dictionary TemplateFileLocations { get; set; } - - /// - /// The template description - /// - /// The template description - [DataMember(Name="description", EmitDefaultValue=false)] - public string Description { get; set; } - - /// - /// Gets or Sets OwnerInfo - /// - [DataMember(Name="ownerInfo", EmitDefaultValue=false)] - public OwnerInfo OwnerInfo { get; set; } - - /// - /// The storage location. (optional) - /// - /// The storage location. (optional) - [DataMember(Name="storageLocation", EmitDefaultValue=false)] - public StorageLocation StorageLocation { get; set; } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public string Id { get; set; } - - /// - /// The template context id - /// - /// The template context id - [DataMember(Name="templateId", EmitDefaultValue=false)] - public string TemplateId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TemplateContext {\n"); - sb.Append(" TemplateType: ").Append(TemplateType).Append("\n"); - sb.Append(" TemplateFileLocations: ").Append(TemplateFileLocations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" OwnerInfo: ").Append(OwnerInfo).Append("\n"); - sb.Append(" StorageLocation: ").Append(StorageLocation).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" TemplateId: ").Append(TemplateId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as TemplateContext); - } - - /// - /// Returns true if TemplateContext instances are equal - /// - /// Instance of TemplateContext to be compared - /// Boolean - public bool Equals(TemplateContext other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.TemplateType == other.TemplateType || - this.TemplateType != null && - this.TemplateType.Equals(other.TemplateType) - ) && - ( - this.TemplateFileLocations == other.TemplateFileLocations || - this.TemplateFileLocations != null && - this.TemplateFileLocations.SequenceEqual(other.TemplateFileLocations) - ) && - ( - this.Description == other.Description || - this.Description != null && - this.Description.Equals(other.Description) - ) && - ( - this.OwnerInfo == other.OwnerInfo || - this.OwnerInfo != null && - this.OwnerInfo.Equals(other.OwnerInfo) - ) && - ( - this.StorageLocation == other.StorageLocation || - this.StorageLocation != null && - this.StorageLocation.Equals(other.StorageLocation) - ) && - ( - this.Id == other.Id || - this.Id != null && - this.Id.Equals(other.Id) - ) && - ( - this.TemplateId == other.TemplateId || - this.TemplateId != null && - this.TemplateId.Equals(other.TemplateId) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.TemplateType != null) - hash = hash * 59 + this.TemplateType.GetHashCode(); - if (this.TemplateFileLocations != null) - hash = hash * 59 + this.TemplateFileLocations.GetHashCode(); - if (this.Description != null) - hash = hash * 59 + this.Description.GetHashCode(); - if (this.OwnerInfo != null) - hash = hash * 59 + this.OwnerInfo.GetHashCode(); - if (this.StorageLocation != null) - hash = hash * 59 + this.StorageLocation.GetHashCode(); - if (this.Id != null) - hash = hash * 59 + this.Id.GetHashCode(); - if (this.TemplateId != null) - hash = hash * 59 + this.TemplateId.GetHashCode(); - return hash; - } - } - - } - -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextRequest.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextRequest.cs deleted file mode 100644 index 43e086f..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextRequest.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// The merge template request. - /// - [DataContract] - public partial class TemplateContextRequest : IEquatable - { - /// - /// Gets or Sets TemplateType - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum TemplateTypeEnum - { - - /// - /// Enum OFFICE for "OFFICE" - /// - [EnumMember(Value = "OFFICE")] - OFFICE, - - /// - /// Enum FREEMARKER for "FREEMARKER" - /// - [EnumMember(Value = "FREEMARKER")] - FREEMARKER - } - - /// - /// Gets or Sets TemplateType - /// - [DataMember(Name="templateType", EmitDefaultValue=false)] - public TemplateTypeEnum? TemplateType { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TemplateContextRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// TemplateType (required). - /// Description. - /// OwnerInfo. - /// The template context id. - public TemplateContextRequest(TemplateTypeEnum? TemplateType = default(TemplateTypeEnum?), string Description = default(string), OwnerInfo OwnerInfo = default(OwnerInfo), string TemplateId = default(string)) - { - // to ensure "TemplateType" is required (not null) - if (TemplateType == null) - { - throw new InvalidDataException("TemplateType is a required property for TemplateContextRequest and cannot be null"); - } - else - { - this.TemplateType = TemplateType; - } - this.Description = Description; - this.OwnerInfo = OwnerInfo; - this.TemplateId = TemplateId; - } - - - /// - /// Gets or Sets Description - /// - [DataMember(Name="description", EmitDefaultValue=false)] - public string Description { get; set; } - - /// - /// Gets or Sets OwnerInfo - /// - [DataMember(Name="ownerInfo", EmitDefaultValue=false)] - public OwnerInfo OwnerInfo { get; set; } - - /// - /// The template context id - /// - /// The template context id - [DataMember(Name="templateId", EmitDefaultValue=false)] - public string TemplateId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TemplateContextRequest {\n"); - sb.Append(" TemplateType: ").Append(TemplateType).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" OwnerInfo: ").Append(OwnerInfo).Append("\n"); - sb.Append(" TemplateId: ").Append(TemplateId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as TemplateContextRequest); - } - - /// - /// Returns true if TemplateContextRequest instances are equal - /// - /// Instance of TemplateContextRequest to be compared - /// Boolean - public bool Equals(TemplateContextRequest other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.TemplateType == other.TemplateType || - this.TemplateType != null && - this.TemplateType.Equals(other.TemplateType) - ) && - ( - this.Description == other.Description || - this.Description != null && - this.Description.Equals(other.Description) - ) && - ( - this.OwnerInfo == other.OwnerInfo || - this.OwnerInfo != null && - this.OwnerInfo.Equals(other.OwnerInfo) - ) && - ( - this.TemplateId == other.TemplateId || - this.TemplateId != null && - this.TemplateId.Equals(other.TemplateId) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.TemplateType != null) - hash = hash * 59 + this.TemplateType.GetHashCode(); - if (this.Description != null) - hash = hash * 59 + this.Description.GetHashCode(); - if (this.OwnerInfo != null) - hash = hash * 59 + this.OwnerInfo.GetHashCode(); - if (this.TemplateId != null) - hash = hash * 59 + this.TemplateId.GetHashCode(); - return hash; - } - } - - } - -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextResponse.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextResponse.cs deleted file mode 100644 index f17441f..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextResponse.cs +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// The merge template response. - /// - [DataContract] - public partial class TemplateContextResponse : IEquatable - { - /// - /// The status of the template - /// - /// The status of the template - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - - /// - /// Enum CREATED for "CREATED" - /// - [EnumMember(Value = "CREATED")] - CREATED, - - /// - /// Enum UPDATED for "UPDATED" - /// - [EnumMember(Value = "UPDATED")] - UPDATED, - - /// - /// Enum DELETED for "DELETED" - /// - [EnumMember(Value = "DELETED")] - DELETED, - - /// - /// Enum PROCESSING for "PROCESSING" - /// - [EnumMember(Value = "PROCESSING")] - PROCESSING - } - - /// - /// The status of the template - /// - /// The status of the template - [DataMember(Name="status", EmitDefaultValue=false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TemplateContextResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// Context. - /// Unique template context id (required). - public TemplateContextResponse(TemplateContext Context = default(TemplateContext), string Id = default(string)) - { - // to ensure "Id" is required (not null) - if (Id == null) - { - throw new InvalidDataException("Id is a required property for TemplateContextResponse and cannot be null"); - } - else - { - this.Id = Id; - } - this.Context = Context; - } - - /// - /// The creation date/time of this response in ISO 8601 format - /// - /// The creation date/time of this response in ISO 8601 format - [DataMember(Name="creationTime", EmitDefaultValue=false)] - public DateTime? CreationTime { get; private set; } - - /// - /// Gets or Sets Context - /// - [DataMember(Name="context", EmitDefaultValue=false)] - public TemplateContext Context { get; set; } - - /// - /// Unique template context id - /// - /// Unique template context id - [DataMember(Name="id", EmitDefaultValue=false)] - public string Id { get; set; } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TemplateContextResponse {\n"); - sb.Append(" CreationTime: ").Append(CreationTime).Append("\n"); - sb.Append(" Context: ").Append(Context).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as TemplateContextResponse); - } - - /// - /// Returns true if TemplateContextResponse instances are equal - /// - /// Instance of TemplateContextResponse to be compared - /// Boolean - public bool Equals(TemplateContextResponse other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.CreationTime == other.CreationTime || - this.CreationTime != null && - this.CreationTime.Equals(other.CreationTime) - ) && - ( - this.Context == other.Context || - this.Context != null && - this.Context.Equals(other.Context) - ) && - ( - this.Id == other.Id || - this.Id != null && - this.Id.Equals(other.Id) - ) && - ( - this.Status == other.Status || - this.Status != null && - this.Status.Equals(other.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.CreationTime != null) - hash = hash * 59 + this.CreationTime.GetHashCode(); - if (this.Context != null) - hash = hash * 59 + this.Context.GetHashCode(); - if (this.Id != null) - hash = hash * 59 + this.Id.GetHashCode(); - if (this.Status != null) - hash = hash * 59 + this.Status.GetHashCode(); - return hash; - } - } - - } - -} diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Properties/AssemblyInfo.cs b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Properties/AssemblyInfo.cs deleted file mode 100644 index f3b9f7d..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Swagger Library")] -[assembly: AssemblyDescription("A library generated from a Swagger doc")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Swagger")] -[assembly: AssemblyProduct("SwaggerLibrary")] -[assembly: AssemblyCopyright("No Copyright")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0")] -[assembly: AssemblyFileVersion("1.0.0")] diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Sphereon.SDK.TemplateProcessor.csproj b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Sphereon.SDK.TemplateProcessor.csproj deleted file mode 100644 index 1f07562..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Sphereon.SDK.TemplateProcessor.csproj +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - Debug - AnyCPU - {A4487355-F30B-40E2-AB78-4E09BCD1E978} - Library - Properties - Sphereon.SDK.TemplateProcessor - Sphereon.SDK.TemplateProcessor - v3.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net35\Newtonsoft.Json.dll - - - $(SolutionDir)\packages\RestSharp.105.1.0\lib\net35\RestSharp.dll - ..\packages\RestSharp.105.1.0\lib\net35\RestSharp.dll - ..\..\packages\RestSharp.105.1.0\lib\net35\RestSharp.dll - ..\..\vendor\RestSharp.105.1.0\lib\net35\RestSharp.dll - - - - - - - - - - - diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Sphereon.SDK.TemplateProcessor.nuspec b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Sphereon.SDK.TemplateProcessor.nuspec deleted file mode 100644 index 30e8692..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/Sphereon.SDK.TemplateProcessor.nuspec +++ /dev/null @@ -1,41 +0,0 @@ - - - - - $id$ - Swagger Library - - - $version$ - - - $author$ - - - $author$ - false - false - - - A library generated from a Swagger doc - https://sphereon.com - http://www.apache.org/licenses/LICENSE-2.0 - - - - - - - - - - - - - - - - - diff --git a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/packages.config b/csharp-net35/src/Sphereon.SDK.TemplateProcessor/packages.config deleted file mode 100644 index 2ca1fbf..0000000 --- a/csharp-net35/src/Sphereon.SDK.TemplateProcessor/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/csharp-net45/.swagger-codegen/VERSION b/csharp-net45/.swagger-codegen/VERSION index 6b4d157..a625450 100644 --- a/csharp-net45/.swagger-codegen/VERSION +++ b/csharp-net45/.swagger-codegen/VERSION @@ -1 +1 @@ -2.2.3 \ No newline at end of file +2.3.1 \ No newline at end of file diff --git a/csharp-net45/README.md b/csharp-net45/README.md index d5dc9c8..6a10ce9 100644 --- a/csharp-net45/README.md +++ b/csharp-net45/README.md @@ -5,7 +5,7 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - API version: 0.1 -- SDK version: 1.0.0 +- SDK version: 0.1.1 - Build package: io.swagger.codegen.languages.CSharpClientCodegen For more information, please visit [https://sphereon.com](https://sphereon.com) @@ -94,40 +94,41 @@ namespace Example ## Documentation for API Endpoints -All URIs are relative to *https://gw.api.cloud.sphereon.com* +All URIs are relative to *https://gw.api.cloud.sphereon.com/template/processor/0.1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AllApi* | [**CreateDataSet**](docs/AllApi.md#createdataset) | **POST** /template/processor/0.1/datasets | Store dataset -*AllApi* | [**CreateTemplateContext**](docs/AllApi.md#createtemplatecontext) | **POST** /template/processor/0.1/templates | Create template context -*AllApi* | [**DeleteDataSet**](docs/AllApi.md#deletedataset) | **DELETE** /template/processor/0.1/datasets/{dataSetId} | Delete a stored data set -*AllApi* | [**DeleteJob**](docs/AllApi.md#deletejob) | **DELETE** /template/processor/0.1/jobs/{jobId} | Delete a job manually -*AllApi* | [**DeleteTemplateContext**](docs/AllApi.md#deletetemplatecontext) | **DELETE** /template/processor/0.1/templates/{templateId} | Delete template context -*AllApi* | [**GetJob**](docs/AllApi.md#getjob) | **GET** /template/processor/0.1/jobs/{jobId} | Job definition and state -*AllApi* | [**GetJobs**](docs/AllApi.md#getjobs) | **GET** /template/processor/0.1/jobs | Get all jobs -*AllApi* | [**GetResultStream**](docs/AllApi.md#getresultstream) | **PUT** /template/processor/0.1/jobs/{jobId}/result/stream | Get the result file -*AllApi* | [**GetResultStreamsAsContainer**](docs/AllApi.md#getresultstreamsascontainer) | **PUT** /template/processor/0.1/jobs/{jobId}/result/container | Get the result file -*AllApi* | [**GetTemplateContext**](docs/AllApi.md#gettemplatecontext) | **GET** /template/processor/0.1/templates/{templateId} | Get template context -*AllApi* | [**SubmitJob**](docs/AllApi.md#submitjob) | **PUT** /template/processor/0.1/jobs | Submit merge job for processing -*AllApi* | [**UpdateTemplateContext**](docs/AllApi.md#updatetemplatecontext) | **PUT** /template/processor/0.1/templates | Update template context -*AllApi* | [**UploadTemplateFile**](docs/AllApi.md#uploadtemplatefile) | **POST** /template/processor/0.1/templates/{templateId} | Upload template file -*DataSetApi* | [**CreateDataSet**](docs/DataSetApi.md#createdataset) | **POST** /template/processor/0.1/datasets | Store dataset -*DataSetApi* | [**DeleteDataSet**](docs/DataSetApi.md#deletedataset) | **DELETE** /template/processor/0.1/datasets/{dataSetId} | Delete a stored data set -*JobApi* | [**GetJob**](docs/JobApi.md#getjob) | **GET** /template/processor/0.1/jobs/{jobId} | Job definition and state -*JobApi* | [**GetJobs**](docs/JobApi.md#getjobs) | **GET** /template/processor/0.1/jobs | Get all jobs -*JobApi* | [**GetResultStream**](docs/JobApi.md#getresultstream) | **PUT** /template/processor/0.1/jobs/{jobId}/result/stream | Get the result file -*JobApi* | [**GetResultStreamsAsContainer**](docs/JobApi.md#getresultstreamsascontainer) | **PUT** /template/processor/0.1/jobs/{jobId}/result/container | Get the result file -*JobApi* | [**SubmitJob**](docs/JobApi.md#submitjob) | **PUT** /template/processor/0.1/jobs | Submit merge job for processing -*TemplateApi* | [**CreateTemplateContext**](docs/TemplateApi.md#createtemplatecontext) | **POST** /template/processor/0.1/templates | Create template context -*TemplateApi* | [**DeleteTemplateContext**](docs/TemplateApi.md#deletetemplatecontext) | **DELETE** /template/processor/0.1/templates/{templateId} | Delete template context -*TemplateApi* | [**GetTemplateContext**](docs/TemplateApi.md#gettemplatecontext) | **GET** /template/processor/0.1/templates/{templateId} | Get template context -*TemplateApi* | [**UpdateTemplateContext**](docs/TemplateApi.md#updatetemplatecontext) | **PUT** /template/processor/0.1/templates | Update template context -*TemplateApi* | [**UploadTemplateFile**](docs/TemplateApi.md#uploadtemplatefile) | **POST** /template/processor/0.1/templates/{templateId} | Upload template file +*AllApi* | [**CreateDataSet**](docs/AllApi.md#createdataset) | **POST** /datasets | Store dataset +*AllApi* | [**CreateTemplateContext**](docs/AllApi.md#createtemplatecontext) | **POST** /templates | Create template context +*AllApi* | [**DeleteDataSet**](docs/AllApi.md#deletedataset) | **DELETE** /datasets/{dataSetId} | Delete a stored data set +*AllApi* | [**DeleteJob**](docs/AllApi.md#deletejob) | **DELETE** /jobs/{jobId} | Delete a job manually +*AllApi* | [**DeleteTemplateContext**](docs/AllApi.md#deletetemplatecontext) | **DELETE** /templates/{templateId} | Delete template context +*AllApi* | [**GetJob**](docs/AllApi.md#getjob) | **GET** /jobs/{jobId} | Job definition and state +*AllApi* | [**GetJobs**](docs/AllApi.md#getjobs) | **GET** /jobs | Get all jobs +*AllApi* | [**GetResultStream**](docs/AllApi.md#getresultstream) | **PUT** /jobs/{jobId}/result/stream | Get the result file +*AllApi* | [**GetResultStreamsAsContainer**](docs/AllApi.md#getresultstreamsascontainer) | **PUT** /jobs/{jobId}/result/container | Get the result file +*AllApi* | [**GetTemplateContext**](docs/AllApi.md#gettemplatecontext) | **GET** /templates/{templateId} | Get template context +*AllApi* | [**SubmitJob**](docs/AllApi.md#submitjob) | **PUT** /jobs | Submit merge job for processing +*AllApi* | [**UpdateTemplateContext**](docs/AllApi.md#updatetemplatecontext) | **PUT** /templates | Update template context +*AllApi* | [**UploadTemplateFile**](docs/AllApi.md#uploadtemplatefile) | **POST** /templates/{templateId} | Upload template file +*DataSetApi* | [**CreateDataSet**](docs/DataSetApi.md#createdataset) | **POST** /datasets | Store dataset +*DataSetApi* | [**DeleteDataSet**](docs/DataSetApi.md#deletedataset) | **DELETE** /datasets/{dataSetId} | Delete a stored data set +*JobApi* | [**GetJob**](docs/JobApi.md#getjob) | **GET** /jobs/{jobId} | Job definition and state +*JobApi* | [**GetJobs**](docs/JobApi.md#getjobs) | **GET** /jobs | Get all jobs +*JobApi* | [**GetResultStream**](docs/JobApi.md#getresultstream) | **PUT** /jobs/{jobId}/result/stream | Get the result file +*JobApi* | [**GetResultStreamsAsContainer**](docs/JobApi.md#getresultstreamsascontainer) | **PUT** /jobs/{jobId}/result/container | Get the result file +*JobApi* | [**SubmitJob**](docs/JobApi.md#submitjob) | **PUT** /jobs | Submit merge job for processing +*TemplateApi* | [**CreateTemplateContext**](docs/TemplateApi.md#createtemplatecontext) | **POST** /templates | Create template context +*TemplateApi* | [**DeleteTemplateContext**](docs/TemplateApi.md#deletetemplatecontext) | **DELETE** /templates/{templateId} | Delete template context +*TemplateApi* | [**GetTemplateContext**](docs/TemplateApi.md#gettemplatecontext) | **GET** /templates/{templateId} | Get template context +*TemplateApi* | [**UpdateTemplateContext**](docs/TemplateApi.md#updatetemplatecontext) | **PUT** /templates | Update template context +*TemplateApi* | [**UploadTemplateFile**](docs/TemplateApi.md#uploadtemplatefile) | **POST** /templates/{templateId} | Upload template file ## Documentation for Models + - [Model.ClaimParameters](docs/ClaimParameters.md) - [Model.DataSetResponse](docs/DataSetResponse.md) - [Model.Error](docs/Error.md) - [Model.ErrorResponse](docs/ErrorResponse.md) diff --git a/csharp-net45/Sphereon.SDK.TemplateProcessor.sln b/csharp-net45/Sphereon.SDK.TemplateProcessor.sln index 656d52f..686a0ac 100644 --- a/csharp-net45/Sphereon.SDK.TemplateProcessor.sln +++ b/csharp-net45/Sphereon.SDK.TemplateProcessor.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 VisualStudioVersion = 12.0.0.0 MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sphereon.SDK.TemplateProcessor", "src\Sphereon.SDK.TemplateProcessor\Sphereon.SDK.TemplateProcessor.csproj", "{B7BDCB2A-887D-499A-821E-50FD30156B3D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sphereon.SDK.TemplateProcessor", "src\Sphereon.SDK.TemplateProcessor\Sphereon.SDK.TemplateProcessor.csproj", "{F519CDF6-926F-4A3A-9459-006AB25DDD5F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sphereon.SDK.TemplateProcessor.Test", "src\Sphereon.SDK.TemplateProcessor.Test\Sphereon.SDK.TemplateProcessor.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" EndProject @@ -12,10 +12,10 @@ Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution -{B7BDCB2A-887D-499A-821E-50FD30156B3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU -{B7BDCB2A-887D-499A-821E-50FD30156B3D}.Debug|Any CPU.Build.0 = Debug|Any CPU -{B7BDCB2A-887D-499A-821E-50FD30156B3D}.Release|Any CPU.ActiveCfg = Release|Any CPU -{B7BDCB2A-887D-499A-821E-50FD30156B3D}.Release|Any CPU.Build.0 = Release|Any CPU +{F519CDF6-926F-4A3A-9459-006AB25DDD5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU +{F519CDF6-926F-4A3A-9459-006AB25DDD5F}.Debug|Any CPU.Build.0 = Debug|Any CPU +{F519CDF6-926F-4A3A-9459-006AB25DDD5F}.Release|Any CPU.ActiveCfg = Release|Any CPU +{F519CDF6-926F-4A3A-9459-006AB25DDD5F}.Release|Any CPU.Build.0 = Release|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/csharp-net45/docs/AllApi.md b/csharp-net45/docs/AllApi.md deleted file mode 100644 index ef146e3..0000000 --- a/csharp-net45/docs/AllApi.md +++ /dev/null @@ -1,859 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Api.AllApi - -All URIs are relative to *https://gw.api.cloud.sphereon.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateDataSet**](AllApi.md#createdataset) | **POST** /template/processor/0.1/datasets | Store dataset -[**CreateTemplateContext**](AllApi.md#createtemplatecontext) | **POST** /template/processor/0.1/templates | Create template context -[**DeleteDataSet**](AllApi.md#deletedataset) | **DELETE** /template/processor/0.1/datasets/{dataSetId} | Delete a stored data set -[**DeleteJob**](AllApi.md#deletejob) | **DELETE** /template/processor/0.1/jobs/{jobId} | Delete a job manually -[**DeleteTemplateContext**](AllApi.md#deletetemplatecontext) | **DELETE** /template/processor/0.1/templates/{templateId} | Delete template context -[**GetJob**](AllApi.md#getjob) | **GET** /template/processor/0.1/jobs/{jobId} | Job definition and state -[**GetJobs**](AllApi.md#getjobs) | **GET** /template/processor/0.1/jobs | Get all jobs -[**GetResultStream**](AllApi.md#getresultstream) | **PUT** /template/processor/0.1/jobs/{jobId}/result/stream | Get the result file -[**GetResultStreamsAsContainer**](AllApi.md#getresultstreamsascontainer) | **PUT** /template/processor/0.1/jobs/{jobId}/result/container | Get the result file -[**GetTemplateContext**](AllApi.md#gettemplatecontext) | **GET** /template/processor/0.1/templates/{templateId} | Get template context -[**SubmitJob**](AllApi.md#submitjob) | **PUT** /template/processor/0.1/jobs | Submit merge job for processing -[**UpdateTemplateContext**](AllApi.md#updatetemplatecontext) | **PUT** /template/processor/0.1/templates | Update template context -[**UploadTemplateFile**](AllApi.md#uploadtemplatefile) | **POST** /template/processor/0.1/templates/{templateId} | Upload template file - - - -# **CreateDataSet** -> DataSetResponse CreateDataSet (string payload) - -Store dataset - -Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class CreateDataSetExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var payload = payload_example; // string | The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - - try - { - // Store dataset - DataSetResponse result = apiInstance.CreateDataSet(payload); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.CreateDataSet: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **payload** | **string**| The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] | - -### Return type - -[**DataSetResponse**](DataSetResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **CreateTemplateContext** -> TemplateContextResponse CreateTemplateContext (TemplateContextRequest templateRequest) - -Create template context - -Create a unique template context for your environment - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class CreateTemplateContextExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var templateRequest = new TemplateContextRequest(); // TemplateContextRequest | The template request - - try - { - // Create template context - TemplateContextResponse result = apiInstance.CreateTemplateContext(templateRequest); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.CreateTemplateContext: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| The template request | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **DeleteDataSet** -> DataSetResponse DeleteDataSet (string dataSetId) - -Delete a stored data set - -Delete a stored data set - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class DeleteDataSetExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var dataSetId = dataSetId_example; // string | dataSetId - - try - { - // Delete a stored data set - DataSetResponse result = apiInstance.DeleteDataSet(dataSetId); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.DeleteDataSet: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **dataSetId** | **string**| dataSetId | - -### Return type - -[**DataSetResponse**](DataSetResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **DeleteJob** -> MergeJobResponse DeleteJob (string jobId) - -Delete a job manually - -Delete the merge job and all related files - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class DeleteJobExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var jobId = jobId_example; // string | jobId - - try - { - // Delete a job manually - MergeJobResponse result = apiInstance.DeleteJob(jobId); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.DeleteJob: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **string**| jobId | - -### Return type - -[**MergeJobResponse**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **DeleteTemplateContext** -> TemplateContextResponse DeleteTemplateContext (string templateId) - -Delete template context - -Delete a template context with all history - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class DeleteTemplateContextExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var templateId = templateId_example; // string | templateId - - try - { - // Delete template context - TemplateContextResponse result = apiInstance.DeleteTemplateContext(templateId); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.DeleteTemplateContext: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateId** | **string**| templateId | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetJob** -> MergeJobResponse GetJob (string jobId) - -Job definition and state - -Get the merge job definition and current state. Please not that you can differentiate based on http response status - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class GetJobExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var jobId = jobId_example; // string | jobId - - try - { - // Job definition and state - MergeJobResponse result = apiInstance.GetJob(jobId); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.GetJob: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **string**| jobId | - -### Return type - -[**MergeJobResponse**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetJobs** -> List GetJobs (List status = null) - -Get all jobs - -Get all office text job definitions and their current state. - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class GetJobsExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var status = new List(); // List | A list of status to filter on. (optional) - - try - { - // Get all jobs - List<MergeJobResponse> result = apiInstance.GetJobs(status); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.GetJobs: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<string>**](string.md)| A list of status to filter on. | [optional] - -### Return type - -[**List**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetResultStream** -> byte[] GetResultStream (string jobId, ResultStreamRequest resultStreamRequest) - -Get the result file - -Get a merge result document as a binary stream. - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class GetResultStreamExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var jobId = jobId_example; // string | jobId - var resultStreamRequest = new ResultStreamRequest(); // ResultStreamRequest | resultStreamRequest - - try - { - // Get the result file - byte[] result = apiInstance.GetResultStream(jobId, resultStreamRequest); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.GetResultStream: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **string**| jobId | - **resultStreamRequest** | [**ResultStreamRequest**](ResultStreamRequest.md)| resultStreamRequest | - -### Return type - -**byte[]** - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/octet-stream - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetResultStreamsAsContainer** -> byte[] GetResultStreamsAsContainer (string jobId, OutputSettings outputSettings = null) - -Get the result file - -Get all documents inside a compressed container as a binary stream. - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class GetResultStreamsAsContainerExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var jobId = jobId_example; // string | jobId - var outputSettings = new OutputSettings(); // OutputSettings | outputSettings (optional) - - try - { - // Get the result file - byte[] result = apiInstance.GetResultStreamsAsContainer(jobId, outputSettings); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.GetResultStreamsAsContainer: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **string**| jobId | - **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] - -### Return type - -**byte[]** - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/octet-stream - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetTemplateContext** -> TemplateContextResponse GetTemplateContext (string templateId) - -Get template context - -Get an existing template context - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class GetTemplateContextExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var templateId = templateId_example; // string | The template context name unique for your environment - - try - { - // Get template context - TemplateContextResponse result = apiInstance.GetTemplateContext(templateId); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.GetTemplateContext: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateId** | **string**| The template context name unique for your environment | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **SubmitJob** -> MergeJobResponse SubmitJob (MergeSettings mergesettings) - -Submit merge job for processing - -Submit merge job run. - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class SubmitJobExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var mergesettings = new MergeSettings(); // MergeSettings | The merge- and output settings - - try - { - // Submit merge job for processing - MergeJobResponse result = apiInstance.SubmitJob(mergesettings); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.SubmitJob: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **mergesettings** | [**MergeSettings**](MergeSettings.md)| The merge- and output settings | - -### Return type - -[**MergeJobResponse**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **UpdateTemplateContext** -> TemplateContextResponse UpdateTemplateContext (TemplateContext templateContext) - -Update template context - -Update an existing template context for your environment - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class UpdateTemplateContextExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var templateContext = new TemplateContext(); // TemplateContext | templateContext - - try - { - // Update template context - TemplateContextResponse result = apiInstance.UpdateTemplateContext(templateContext); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.UpdateTemplateContext: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateContext** | [**TemplateContext**](TemplateContext.md)| templateContext | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **UploadTemplateFile** -> TemplateContextResponse UploadTemplateFile (string templateId, System.IO.Stream stream) - -Upload template file - -Upload the Office template file - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class UploadTemplateFileExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new AllApi(); - var templateId = templateId_example; // string | The template context name unique for your environment - var stream = new System.IO.Stream(); // System.IO.Stream | The template (file/inputstream) to store - - try - { - // Upload template file - TemplateContextResponse result = apiInstance.UploadTemplateFile(templateId, stream); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling AllApi.UploadTemplateFile: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateId** | **string**| The template context name unique for your environment | - **stream** | **System.IO.Stream**| The template (file/inputstream) to store | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/csharp-net45/docs/DataSetApi.md b/csharp-net45/docs/DataSetApi.md deleted file mode 100644 index 9429521..0000000 --- a/csharp-net45/docs/DataSetApi.md +++ /dev/null @@ -1,138 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Api.DataSetApi - -All URIs are relative to *https://gw.api.cloud.sphereon.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateDataSet**](DataSetApi.md#createdataset) | **POST** /template/processor/0.1/datasets | Store dataset -[**DeleteDataSet**](DataSetApi.md#deletedataset) | **DELETE** /template/processor/0.1/datasets/{dataSetId} | Delete a stored data set - - - -# **CreateDataSet** -> DataSetResponse CreateDataSet (string payload) - -Store dataset - -Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class CreateDataSetExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new DataSetApi(); - var payload = payload_example; // string | The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - - try - { - // Store dataset - DataSetResponse result = apiInstance.CreateDataSet(payload); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling DataSetApi.CreateDataSet: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **payload** | **string**| The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] | - -### Return type - -[**DataSetResponse**](DataSetResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **DeleteDataSet** -> DataSetResponse DeleteDataSet (string dataSetId) - -Delete a stored data set - -Delete a stored data set - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class DeleteDataSetExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new DataSetApi(); - var dataSetId = dataSetId_example; // string | dataSetId - - try - { - // Delete a stored data set - DataSetResponse result = apiInstance.DeleteDataSet(dataSetId); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling DataSetApi.DeleteDataSet: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **dataSetId** | **string**| dataSetId | - -### Return type - -[**DataSetResponse**](DataSetResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/csharp-net45/docs/DataSetResponse.md b/csharp-net45/docs/DataSetResponse.md deleted file mode 100644 index e844d50..0000000 --- a/csharp-net45/docs/DataSetResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.DataSetResponse -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CompletionTime** | **DateTime?** | The completion date/time of this template in ISO 8601 format | [optional] -**CreationTime** | **DateTime?** | The creation date/time of this template in ISO 8601 format | [optional] -**Id** | **string** | Unique dataset id | -**Status** | **string** | The status of the template | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net45/docs/Error.md b/csharp-net45/docs/Error.md deleted file mode 100644 index e341298..0000000 --- a/csharp-net45/docs/Error.md +++ /dev/null @@ -1,12 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.Error -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Code** | **string** | | -**Level** | **string** | | -**Cause** | [**Error**](Error.md) | | [optional] -**Message** | **string** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net45/docs/ErrorResponse.md b/csharp-net45/docs/ErrorResponse.md deleted file mode 100644 index 7d4532d..0000000 --- a/csharp-net45/docs/ErrorResponse.md +++ /dev/null @@ -1,9 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.ErrorResponse -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**List<Error>**](Error.md) | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net45/docs/JobApi.md b/csharp-net45/docs/JobApi.md deleted file mode 100644 index 1d42bbe..0000000 --- a/csharp-net45/docs/JobApi.md +++ /dev/null @@ -1,337 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Api.JobApi - -All URIs are relative to *https://gw.api.cloud.sphereon.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetJob**](JobApi.md#getjob) | **GET** /template/processor/0.1/jobs/{jobId} | Job definition and state -[**GetJobs**](JobApi.md#getjobs) | **GET** /template/processor/0.1/jobs | Get all jobs -[**GetResultStream**](JobApi.md#getresultstream) | **PUT** /template/processor/0.1/jobs/{jobId}/result/stream | Get the result file -[**GetResultStreamsAsContainer**](JobApi.md#getresultstreamsascontainer) | **PUT** /template/processor/0.1/jobs/{jobId}/result/container | Get the result file -[**SubmitJob**](JobApi.md#submitjob) | **PUT** /template/processor/0.1/jobs | Submit merge job for processing - - - -# **GetJob** -> MergeJobResponse GetJob (string jobId) - -Job definition and state - -Get the merge job definition and current state. Please not that you can differentiate based on http response status - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class GetJobExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new JobApi(); - var jobId = jobId_example; // string | jobId - - try - { - // Job definition and state - MergeJobResponse result = apiInstance.GetJob(jobId); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling JobApi.GetJob: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **string**| jobId | - -### Return type - -[**MergeJobResponse**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetJobs** -> List GetJobs (List status = null) - -Get all jobs - -Get all office text job definitions and their current state. - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class GetJobsExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new JobApi(); - var status = new List(); // List | A list of status to filter on. (optional) - - try - { - // Get all jobs - List<MergeJobResponse> result = apiInstance.GetJobs(status); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling JobApi.GetJobs: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<string>**](string.md)| A list of status to filter on. | [optional] - -### Return type - -[**List**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetResultStream** -> byte[] GetResultStream (string jobId, ResultStreamRequest resultStreamRequest) - -Get the result file - -Get a merge result document as a binary stream. - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class GetResultStreamExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new JobApi(); - var jobId = jobId_example; // string | jobId - var resultStreamRequest = new ResultStreamRequest(); // ResultStreamRequest | resultStreamRequest - - try - { - // Get the result file - byte[] result = apiInstance.GetResultStream(jobId, resultStreamRequest); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling JobApi.GetResultStream: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **string**| jobId | - **resultStreamRequest** | [**ResultStreamRequest**](ResultStreamRequest.md)| resultStreamRequest | - -### Return type - -**byte[]** - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/octet-stream - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetResultStreamsAsContainer** -> byte[] GetResultStreamsAsContainer (string jobId, OutputSettings outputSettings = null) - -Get the result file - -Get all documents inside a compressed container as a binary stream. - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class GetResultStreamsAsContainerExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new JobApi(); - var jobId = jobId_example; // string | jobId - var outputSettings = new OutputSettings(); // OutputSettings | outputSettings (optional) - - try - { - // Get the result file - byte[] result = apiInstance.GetResultStreamsAsContainer(jobId, outputSettings); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling JobApi.GetResultStreamsAsContainer: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **jobId** | **string**| jobId | - **outputSettings** | [**OutputSettings**](OutputSettings.md)| outputSettings | [optional] - -### Return type - -**byte[]** - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/octet-stream - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **SubmitJob** -> MergeJobResponse SubmitJob (MergeSettings mergesettings) - -Submit merge job for processing - -Submit merge job run. - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class SubmitJobExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new JobApi(); - var mergesettings = new MergeSettings(); // MergeSettings | The merge- and output settings - - try - { - // Submit merge job for processing - MergeJobResponse result = apiInstance.SubmitJob(mergesettings); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling JobApi.SubmitJob: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **mergesettings** | [**MergeSettings**](MergeSettings.md)| The merge- and output settings | - -### Return type - -[**MergeJobResponse**](MergeJobResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/csharp-net45/docs/Lifecycle.md b/csharp-net45/docs/Lifecycle.md deleted file mode 100644 index c1f9138..0000000 --- a/csharp-net45/docs/Lifecycle.md +++ /dev/null @@ -1,11 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.Lifecycle -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ActionTime** | **DateTime?** | The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation | [optional] -**Action** | **string** | | [optional] -**Type** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net45/docs/MergeJob.md b/csharp-net45/docs/MergeJob.md deleted file mode 100644 index d051ecd..0000000 --- a/csharp-net45/docs/MergeJob.md +++ /dev/null @@ -1,18 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.MergeJob -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CompletionTime** | **DateTime?** | The completion date/time of this job in ISO 8601 format | [optional] -**JobId** | **string** | The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation | -**CreationTime** | **DateTime?** | The creation date/time of this job in ISO 8601 format | [optional] -**DataSetId** | **string** | Data set id | [optional] -**ResultStreams** | [**List<StreamLocation>**](StreamLocation.md) | The storage locations of the result files. | -**HeaderDataSetIds** | **List<string>** | Header data set ids | [optional] -**ResultStorageLocation** | [**StorageLocation**](StorageLocation.md) | The storage location. (optional) | [optional] -**MergeSettings** | [**MergeSettings**](MergeSettings.md) | | [optional] -**StatusMessage** | **string** | A status message, which can be informational, warning or error. A message here does not indicate an error perse | [optional] -**Status** | **string** | The status of the job | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net45/docs/MergeJobResponse.md b/csharp-net45/docs/MergeJobResponse.md deleted file mode 100644 index c31a8d8..0000000 --- a/csharp-net45/docs/MergeJobResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.MergeJobResponse -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**JobId** | **string** | The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation | -**Job** | [**MergeJob**](MergeJob.md) | | [optional] -**StatusMessage** | **string** | A status message, which can be informational, warning or error. AA message here does not indicate an error perse | [optional] -**Status** | **string** | The status of the job | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net45/docs/MergeSettings.md b/csharp-net45/docs/MergeSettings.md deleted file mode 100644 index 3c3200d..0000000 --- a/csharp-net45/docs/MergeSettings.md +++ /dev/null @@ -1,17 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.MergeSettings -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Lifecycle** | [**Lifecycle**](Lifecycle.md) | | [optional] -**MergeResult** | **string** | | [optional] -**DataSetId** | **string** | Data set id | -**Engine** | **string** | | [optional] -**HeaderDataSetIds** | **List<string>** | optional header data set ids | [optional] -**ResultStorageLocation** | [**StorageLocation**](StorageLocation.md) | The output location of the result files. | -**TemplateVersion** | **int?** | Template version | [optional] -**TemplateId** | **string** | Template id | -**OutputSettings** | [**OutputSettings**](OutputSettings.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net45/docs/OutputSettings.md b/csharp-net45/docs/OutputSettings.md deleted file mode 100644 index da7491f..0000000 --- a/csharp-net45/docs/OutputSettings.md +++ /dev/null @@ -1,10 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.OutputSettings -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DeliveryFormat** | **string** | | [optional] -**OutputFormat** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net45/docs/OwnerInfo.md b/csharp-net45/docs/OwnerInfo.md deleted file mode 100644 index 9f68152..0000000 --- a/csharp-net45/docs/OwnerInfo.md +++ /dev/null @@ -1,12 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.OwnerInfo -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Phone** | **string** | The owner's phone number | [optional] -**CompanyDepartment** | **string** | The owner's company/department | [optional] -**Name** | **string** | The owner's name | [optional] -**Email** | **string** | The owner's email address | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net45/docs/ResultStreamRequest.md b/csharp-net45/docs/ResultStreamRequest.md deleted file mode 100644 index f499335..0000000 --- a/csharp-net45/docs/ResultStreamRequest.md +++ /dev/null @@ -1,10 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.ResultStreamRequest -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**StreamLocation** | [**StreamLocation**](StreamLocation.md) | The stream location | -**OutputSettings** | [**OutputSettings**](OutputSettings.md) | The Output settings | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net45/docs/StorageLocation.md b/csharp-net45/docs/StorageLocation.md deleted file mode 100644 index 3197f68..0000000 --- a/csharp-net45/docs/StorageLocation.md +++ /dev/null @@ -1,10 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.StorageLocation -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FolderPath** | **string** | | [optional] -**ContainerId** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net45/docs/StreamLocation.md b/csharp-net45/docs/StreamLocation.md deleted file mode 100644 index 1f2a59c..0000000 --- a/csharp-net45/docs/StreamLocation.md +++ /dev/null @@ -1,12 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.StreamLocation -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FolderPath** | **string** | | [optional] -**OriginalFileName** | **string** | | [optional] -**FileName** | **string** | | [optional] -**ContainerId** | **string** | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net45/docs/TemplateApi.md b/csharp-net45/docs/TemplateApi.md deleted file mode 100644 index afb3ddc..0000000 --- a/csharp-net45/docs/TemplateApi.md +++ /dev/null @@ -1,335 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Api.TemplateApi - -All URIs are relative to *https://gw.api.cloud.sphereon.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateTemplateContext**](TemplateApi.md#createtemplatecontext) | **POST** /template/processor/0.1/templates | Create template context -[**DeleteTemplateContext**](TemplateApi.md#deletetemplatecontext) | **DELETE** /template/processor/0.1/templates/{templateId} | Delete template context -[**GetTemplateContext**](TemplateApi.md#gettemplatecontext) | **GET** /template/processor/0.1/templates/{templateId} | Get template context -[**UpdateTemplateContext**](TemplateApi.md#updatetemplatecontext) | **PUT** /template/processor/0.1/templates | Update template context -[**UploadTemplateFile**](TemplateApi.md#uploadtemplatefile) | **POST** /template/processor/0.1/templates/{templateId} | Upload template file - - - -# **CreateTemplateContext** -> TemplateContextResponse CreateTemplateContext (TemplateContextRequest templateRequest) - -Create template context - -Create a unique template context for your environment - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class CreateTemplateContextExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new TemplateApi(); - var templateRequest = new TemplateContextRequest(); // TemplateContextRequest | The template request - - try - { - // Create template context - TemplateContextResponse result = apiInstance.CreateTemplateContext(templateRequest); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling TemplateApi.CreateTemplateContext: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateRequest** | [**TemplateContextRequest**](TemplateContextRequest.md)| The template request | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **DeleteTemplateContext** -> TemplateContextResponse DeleteTemplateContext (string templateId) - -Delete template context - -Delete a template context with all history - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class DeleteTemplateContextExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new TemplateApi(); - var templateId = templateId_example; // string | templateId - - try - { - // Delete template context - TemplateContextResponse result = apiInstance.DeleteTemplateContext(templateId); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling TemplateApi.DeleteTemplateContext: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateId** | **string**| templateId | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **GetTemplateContext** -> TemplateContextResponse GetTemplateContext (string templateId) - -Get template context - -Get an existing template context - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class GetTemplateContextExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new TemplateApi(); - var templateId = templateId_example; // string | The template context name unique for your environment - - try - { - // Get template context - TemplateContextResponse result = apiInstance.GetTemplateContext(templateId); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling TemplateApi.GetTemplateContext: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateId** | **string**| The template context name unique for your environment | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **UpdateTemplateContext** -> TemplateContextResponse UpdateTemplateContext (TemplateContext templateContext) - -Update template context - -Update an existing template context for your environment - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class UpdateTemplateContextExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new TemplateApi(); - var templateContext = new TemplateContext(); // TemplateContext | templateContext - - try - { - // Update template context - TemplateContextResponse result = apiInstance.UpdateTemplateContext(templateContext); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling TemplateApi.UpdateTemplateContext: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateContext** | [**TemplateContext**](TemplateContext.md)| templateContext | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: application/json;charset=UTF-8 - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - - -# **UploadTemplateFile** -> TemplateContextResponse UploadTemplateFile (string templateId, System.IO.Stream stream) - -Upload template file - -Upload the Office template file - -### Example -```csharp -using System; -using System.Diagnostics; -using Sphereon.SDK.TemplateProcessor.Api; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Example -{ - public class UploadTemplateFileExample - { - public void main() - { - // Configure OAuth2 access token for authorization: oauth2schema - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new TemplateApi(); - var templateId = templateId_example; // string | The template context name unique for your environment - var stream = new System.IO.Stream(); // System.IO.Stream | The template (file/inputstream) to store - - try - { - // Upload template file - TemplateContextResponse result = apiInstance.UploadTemplateFile(templateId, stream); - Debug.WriteLine(result); - } - catch (Exception e) - { - Debug.Print("Exception when calling TemplateApi.UploadTemplateFile: " + e.Message ); - } - } - } -} -``` - -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **templateId** | **string**| The template context name unique for your environment | - **stream** | **System.IO.Stream**| The template (file/inputstream) to store | - -### Return type - -[**TemplateContextResponse**](TemplateContextResponse.md) - -### Authorization - -[oauth2schema](../README.md#oauth2schema) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: application/json;charset=UTF-8 - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/csharp-net45/docs/TemplateContext.md b/csharp-net45/docs/TemplateContext.md deleted file mode 100644 index 5e1c275..0000000 --- a/csharp-net45/docs/TemplateContext.md +++ /dev/null @@ -1,15 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.TemplateContext -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**TemplateType** | **string** | | -**TemplateFileLocations** | [**Dictionary<string, StreamLocation>**](StreamLocation.md) | The template files (versioned) | [optional] -**Description** | **string** | The template description | [optional] -**OwnerInfo** | [**OwnerInfo**](OwnerInfo.md) | | [optional] -**StorageLocation** | [**StorageLocation**](StorageLocation.md) | The storage location. (optional) | [optional] -**Id** | **string** | | [optional] -**TemplateId** | **string** | The template context id | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net45/docs/TemplateContextRequest.md b/csharp-net45/docs/TemplateContextRequest.md deleted file mode 100644 index b509255..0000000 --- a/csharp-net45/docs/TemplateContextRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.TemplateContextRequest -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**TemplateType** | **string** | | -**Description** | **string** | | [optional] -**OwnerInfo** | [**OwnerInfo**](OwnerInfo.md) | | [optional] -**TemplateId** | **string** | The template context id | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net45/docs/TemplateContextResponse.md b/csharp-net45/docs/TemplateContextResponse.md deleted file mode 100644 index 6c11a45..0000000 --- a/csharp-net45/docs/TemplateContextResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# Sphereon.SDK.TemplateProcessor.Model.TemplateContextResponse -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CreationTime** | **DateTime?** | The creation date/time of this response in ISO 8601 format | [optional] -**Context** | [**TemplateContext**](TemplateContext.md) | | [optional] -**Id** | **string** | Unique template context id | -**Status** | **string** | The status of the template | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Sphereon.SDK.TemplateProcessor.Test.csproj b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Sphereon.SDK.TemplateProcessor.Test.csproj index c65ff28..a22d87e 100644 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Sphereon.SDK.TemplateProcessor.Test.csproj +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/Sphereon.SDK.TemplateProcessor.Test.csproj @@ -52,17 +52,17 @@ Contact: dev@sphereon.com ..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - - $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll + + $(SolutionDir)\packages\RestSharpSigned.105.1.0\lib\net45\RestSharp.dll + ..\packages\RestSharpSigned.105.1.0\lib\net45\RestSharp.dll + ..\..\packages\RestSharpSigned.105.1.0\lib\net45\RestSharp.dll + ..\..\vendor\RestSharpSigned.105.1.0\lib\net45\RestSharp.dll - $(SolutionDir)\packages\NUnit.2.6.4\lib\nunit.framework.dll - ..\packages\NUnit.2.6.4\lib\nunit.framework.dll - ..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll - ..\..\vendor\NUnit.2.6.4\lib\nunit.framework.dll + $(SolutionDir)\packages\NUnit.3.9.0\lib\net45\nunit.framework.dll + ..\packages\NUnit.3.9.0\lib\net45\nunit.framework.dll + ..\..\packages\NUnit.3.9.0\lib\net45\nunit.framework.dll + ..\..\vendor\NUnit.3.9.0\lib\nunit.framework.dll @@ -75,7 +75,7 @@ Contact: dev@sphereon.com - {B7BDCB2A-887D-499A-821E-50FD30156B3D} + {F519CDF6-926F-4A3A-9459-006AB25DDD5F} Sphereon.SDK.TemplateProcessor diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/packages.config b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/packages.config index 105b829..d9142f9 100644 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/packages.config +++ b/csharp-net45/src/Sphereon.SDK.TemplateProcessor.Test/packages.config @@ -1,6 +1,6 @@ - - + + diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Api/AllApi.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Api/AllApi.cs deleted file mode 100644 index 02ad839..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Api/AllApi.cs +++ /dev/null @@ -1,2719 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Sphereon.SDK.TemplateProcessor.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IAllApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Store dataset - /// - /// - /// Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - /// - /// Thrown when fails to make API call - /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - /// DataSetResponse - DataSetResponse CreateDataSet (string payload); - - /// - /// Store dataset - /// - /// - /// Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - /// - /// Thrown when fails to make API call - /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - /// ApiResponse of DataSetResponse - ApiResponse CreateDataSetWithHttpInfo (string payload); - /// - /// Create template context - /// - /// - /// Create a unique template context for your environment - /// - /// Thrown when fails to make API call - /// The template request - /// TemplateContextResponse - TemplateContextResponse CreateTemplateContext (TemplateContextRequest templateRequest); - - /// - /// Create template context - /// - /// - /// Create a unique template context for your environment - /// - /// Thrown when fails to make API call - /// The template request - /// ApiResponse of TemplateContextResponse - ApiResponse CreateTemplateContextWithHttpInfo (TemplateContextRequest templateRequest); - /// - /// Delete a stored data set - /// - /// - /// Delete a stored data set - /// - /// Thrown when fails to make API call - /// dataSetId - /// DataSetResponse - DataSetResponse DeleteDataSet (string dataSetId); - - /// - /// Delete a stored data set - /// - /// - /// Delete a stored data set - /// - /// Thrown when fails to make API call - /// dataSetId - /// ApiResponse of DataSetResponse - ApiResponse DeleteDataSetWithHttpInfo (string dataSetId); - /// - /// Delete a job manually - /// - /// - /// Delete the merge job and all related files - /// - /// Thrown when fails to make API call - /// jobId - /// MergeJobResponse - MergeJobResponse DeleteJob (string jobId); - - /// - /// Delete a job manually - /// - /// - /// Delete the merge job and all related files - /// - /// Thrown when fails to make API call - /// jobId - /// ApiResponse of MergeJobResponse - ApiResponse DeleteJobWithHttpInfo (string jobId); - /// - /// Delete template context - /// - /// - /// Delete a template context with all history - /// - /// Thrown when fails to make API call - /// templateId - /// TemplateContextResponse - TemplateContextResponse DeleteTemplateContext (string templateId); - - /// - /// Delete template context - /// - /// - /// Delete a template context with all history - /// - /// Thrown when fails to make API call - /// templateId - /// ApiResponse of TemplateContextResponse - ApiResponse DeleteTemplateContextWithHttpInfo (string templateId); - /// - /// Job definition and state - /// - /// - /// Get the merge job definition and current state. Please not that you can differentiate based on http response status - /// - /// Thrown when fails to make API call - /// jobId - /// MergeJobResponse - MergeJobResponse GetJob (string jobId); - - /// - /// Job definition and state - /// - /// - /// Get the merge job definition and current state. Please not that you can differentiate based on http response status - /// - /// Thrown when fails to make API call - /// jobId - /// ApiResponse of MergeJobResponse - ApiResponse GetJobWithHttpInfo (string jobId); - /// - /// Get all jobs - /// - /// - /// Get all office text job definitions and their current state. - /// - /// Thrown when fails to make API call - /// A list of status to filter on. (optional) - /// List<MergeJobResponse> - List GetJobs (List status = null); - - /// - /// Get all jobs - /// - /// - /// Get all office text job definitions and their current state. - /// - /// Thrown when fails to make API call - /// A list of status to filter on. (optional) - /// ApiResponse of List<MergeJobResponse> - ApiResponse> GetJobsWithHttpInfo (List status = null); - /// - /// Get the result file - /// - /// - /// Get a merge result document as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// resultStreamRequest - /// byte[] - byte[] GetResultStream (string jobId, ResultStreamRequest resultStreamRequest); - - /// - /// Get the result file - /// - /// - /// Get a merge result document as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// resultStreamRequest - /// ApiResponse of byte[] - ApiResponse GetResultStreamWithHttpInfo (string jobId, ResultStreamRequest resultStreamRequest); - /// - /// Get the result file - /// - /// - /// Get all documents inside a compressed container as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// outputSettings (optional) - /// byte[] - byte[] GetResultStreamsAsContainer (string jobId, OutputSettings outputSettings = null); - - /// - /// Get the result file - /// - /// - /// Get all documents inside a compressed container as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// outputSettings (optional) - /// ApiResponse of byte[] - ApiResponse GetResultStreamsAsContainerWithHttpInfo (string jobId, OutputSettings outputSettings = null); - /// - /// Get template context - /// - /// - /// Get an existing template context - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// TemplateContextResponse - TemplateContextResponse GetTemplateContext (string templateId); - - /// - /// Get template context - /// - /// - /// Get an existing template context - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// ApiResponse of TemplateContextResponse - ApiResponse GetTemplateContextWithHttpInfo (string templateId); - /// - /// Submit merge job for processing - /// - /// - /// Submit merge job run. - /// - /// Thrown when fails to make API call - /// The merge- and output settings - /// MergeJobResponse - MergeJobResponse SubmitJob (MergeSettings mergesettings); - - /// - /// Submit merge job for processing - /// - /// - /// Submit merge job run. - /// - /// Thrown when fails to make API call - /// The merge- and output settings - /// ApiResponse of MergeJobResponse - ApiResponse SubmitJobWithHttpInfo (MergeSettings mergesettings); - /// - /// Update template context - /// - /// - /// Update an existing template context for your environment - /// - /// Thrown when fails to make API call - /// templateContext - /// TemplateContextResponse - TemplateContextResponse UpdateTemplateContext (TemplateContext templateContext); - - /// - /// Update template context - /// - /// - /// Update an existing template context for your environment - /// - /// Thrown when fails to make API call - /// templateContext - /// ApiResponse of TemplateContextResponse - ApiResponse UpdateTemplateContextWithHttpInfo (TemplateContext templateContext); - /// - /// Upload template file - /// - /// - /// Upload the Office template file - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// The template (file/inputstream) to store - /// TemplateContextResponse - TemplateContextResponse UploadTemplateFile (string templateId, System.IO.Stream stream); - - /// - /// Upload template file - /// - /// - /// Upload the Office template file - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// The template (file/inputstream) to store - /// ApiResponse of TemplateContextResponse - ApiResponse UploadTemplateFileWithHttpInfo (string templateId, System.IO.Stream stream); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Store dataset - /// - /// - /// Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - /// - /// Thrown when fails to make API call - /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - /// Task of DataSetResponse - System.Threading.Tasks.Task CreateDataSetAsync (string payload); - - /// - /// Store dataset - /// - /// - /// Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - /// - /// Thrown when fails to make API call - /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - /// Task of ApiResponse (DataSetResponse) - System.Threading.Tasks.Task> CreateDataSetAsyncWithHttpInfo (string payload); - /// - /// Create template context - /// - /// - /// Create a unique template context for your environment - /// - /// Thrown when fails to make API call - /// The template request - /// Task of TemplateContextResponse - System.Threading.Tasks.Task CreateTemplateContextAsync (TemplateContextRequest templateRequest); - - /// - /// Create template context - /// - /// - /// Create a unique template context for your environment - /// - /// Thrown when fails to make API call - /// The template request - /// Task of ApiResponse (TemplateContextResponse) - System.Threading.Tasks.Task> CreateTemplateContextAsyncWithHttpInfo (TemplateContextRequest templateRequest); - /// - /// Delete a stored data set - /// - /// - /// Delete a stored data set - /// - /// Thrown when fails to make API call - /// dataSetId - /// Task of DataSetResponse - System.Threading.Tasks.Task DeleteDataSetAsync (string dataSetId); - - /// - /// Delete a stored data set - /// - /// - /// Delete a stored data set - /// - /// Thrown when fails to make API call - /// dataSetId - /// Task of ApiResponse (DataSetResponse) - System.Threading.Tasks.Task> DeleteDataSetAsyncWithHttpInfo (string dataSetId); - /// - /// Delete a job manually - /// - /// - /// Delete the merge job and all related files - /// - /// Thrown when fails to make API call - /// jobId - /// Task of MergeJobResponse - System.Threading.Tasks.Task DeleteJobAsync (string jobId); - - /// - /// Delete a job manually - /// - /// - /// Delete the merge job and all related files - /// - /// Thrown when fails to make API call - /// jobId - /// Task of ApiResponse (MergeJobResponse) - System.Threading.Tasks.Task> DeleteJobAsyncWithHttpInfo (string jobId); - /// - /// Delete template context - /// - /// - /// Delete a template context with all history - /// - /// Thrown when fails to make API call - /// templateId - /// Task of TemplateContextResponse - System.Threading.Tasks.Task DeleteTemplateContextAsync (string templateId); - - /// - /// Delete template context - /// - /// - /// Delete a template context with all history - /// - /// Thrown when fails to make API call - /// templateId - /// Task of ApiResponse (TemplateContextResponse) - System.Threading.Tasks.Task> DeleteTemplateContextAsyncWithHttpInfo (string templateId); - /// - /// Job definition and state - /// - /// - /// Get the merge job definition and current state. Please not that you can differentiate based on http response status - /// - /// Thrown when fails to make API call - /// jobId - /// Task of MergeJobResponse - System.Threading.Tasks.Task GetJobAsync (string jobId); - - /// - /// Job definition and state - /// - /// - /// Get the merge job definition and current state. Please not that you can differentiate based on http response status - /// - /// Thrown when fails to make API call - /// jobId - /// Task of ApiResponse (MergeJobResponse) - System.Threading.Tasks.Task> GetJobAsyncWithHttpInfo (string jobId); - /// - /// Get all jobs - /// - /// - /// Get all office text job definitions and their current state. - /// - /// Thrown when fails to make API call - /// A list of status to filter on. (optional) - /// Task of List<MergeJobResponse> - System.Threading.Tasks.Task> GetJobsAsync (List status = null); - - /// - /// Get all jobs - /// - /// - /// Get all office text job definitions and their current state. - /// - /// Thrown when fails to make API call - /// A list of status to filter on. (optional) - /// Task of ApiResponse (List<MergeJobResponse>) - System.Threading.Tasks.Task>> GetJobsAsyncWithHttpInfo (List status = null); - /// - /// Get the result file - /// - /// - /// Get a merge result document as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// resultStreamRequest - /// Task of byte[] - System.Threading.Tasks.Task GetResultStreamAsync (string jobId, ResultStreamRequest resultStreamRequest); - - /// - /// Get the result file - /// - /// - /// Get a merge result document as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// resultStreamRequest - /// Task of ApiResponse (byte[]) - System.Threading.Tasks.Task> GetResultStreamAsyncWithHttpInfo (string jobId, ResultStreamRequest resultStreamRequest); - /// - /// Get the result file - /// - /// - /// Get all documents inside a compressed container as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// outputSettings (optional) - /// Task of byte[] - System.Threading.Tasks.Task GetResultStreamsAsContainerAsync (string jobId, OutputSettings outputSettings = null); - - /// - /// Get the result file - /// - /// - /// Get all documents inside a compressed container as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// outputSettings (optional) - /// Task of ApiResponse (byte[]) - System.Threading.Tasks.Task> GetResultStreamsAsContainerAsyncWithHttpInfo (string jobId, OutputSettings outputSettings = null); - /// - /// Get template context - /// - /// - /// Get an existing template context - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// Task of TemplateContextResponse - System.Threading.Tasks.Task GetTemplateContextAsync (string templateId); - - /// - /// Get template context - /// - /// - /// Get an existing template context - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// Task of ApiResponse (TemplateContextResponse) - System.Threading.Tasks.Task> GetTemplateContextAsyncWithHttpInfo (string templateId); - /// - /// Submit merge job for processing - /// - /// - /// Submit merge job run. - /// - /// Thrown when fails to make API call - /// The merge- and output settings - /// Task of MergeJobResponse - System.Threading.Tasks.Task SubmitJobAsync (MergeSettings mergesettings); - - /// - /// Submit merge job for processing - /// - /// - /// Submit merge job run. - /// - /// Thrown when fails to make API call - /// The merge- and output settings - /// Task of ApiResponse (MergeJobResponse) - System.Threading.Tasks.Task> SubmitJobAsyncWithHttpInfo (MergeSettings mergesettings); - /// - /// Update template context - /// - /// - /// Update an existing template context for your environment - /// - /// Thrown when fails to make API call - /// templateContext - /// Task of TemplateContextResponse - System.Threading.Tasks.Task UpdateTemplateContextAsync (TemplateContext templateContext); - - /// - /// Update template context - /// - /// - /// Update an existing template context for your environment - /// - /// Thrown when fails to make API call - /// templateContext - /// Task of ApiResponse (TemplateContextResponse) - System.Threading.Tasks.Task> UpdateTemplateContextAsyncWithHttpInfo (TemplateContext templateContext); - /// - /// Upload template file - /// - /// - /// Upload the Office template file - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// The template (file/inputstream) to store - /// Task of TemplateContextResponse - System.Threading.Tasks.Task UploadTemplateFileAsync (string templateId, System.IO.Stream stream); - - /// - /// Upload template file - /// - /// - /// Upload the Office template file - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// The template (file/inputstream) to store - /// Task of ApiResponse (TemplateContextResponse) - System.Threading.Tasks.Task> UploadTemplateFileAsyncWithHttpInfo (string templateId, System.IO.Stream stream); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class AllApi : IAllApi - { - private Sphereon.SDK.TemplateProcessor.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public AllApi(String basePath) - { - this.Configuration = new Configuration(new ApiClient(basePath)); - - ExceptionFactory = Sphereon.SDK.TemplateProcessor.Client.Configuration.DefaultExceptionFactory; - - // ensure API client has configuration ready - if (Configuration.ApiClient.Configuration == null) - { - this.Configuration.ApiClient.Configuration = this.Configuration; - } - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public AllApi(Configuration configuration = null) - { - if (configuration == null) // use the default one in Configuration - this.Configuration = Configuration.Default; - else - this.Configuration = configuration; - - ExceptionFactory = Sphereon.SDK.TemplateProcessor.Client.Configuration.DefaultExceptionFactory; - - // ensure API client has configuration ready - if (Configuration.ApiClient.Configuration == null) - { - this.Configuration.ApiClient.Configuration = this.Configuration; - } - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public Sphereon.SDK.TemplateProcessor.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public Dictionary DefaultHeader() - { - return this.Configuration.DefaultHeader; - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Store dataset Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - /// - /// Thrown when fails to make API call - /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - /// DataSetResponse - public DataSetResponse CreateDataSet (string payload) - { - ApiResponse localVarResponse = CreateDataSetWithHttpInfo(payload); - return localVarResponse.Data; - } - - /// - /// Store dataset Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - /// - /// Thrown when fails to make API call - /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - /// ApiResponse of DataSetResponse - public ApiResponse< DataSetResponse > CreateDataSetWithHttpInfo (string payload) - { - // verify the required parameter 'payload' is set - if (payload == null) - throw new ApiException(400, "Missing required parameter 'payload' when calling AllApi->CreateDataSet"); - - var localVarPath = "/template/processor/0.1/datasets"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (payload != null && payload.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(payload); // http body (model) parameter - } - else - { - localVarPostBody = payload; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateDataSet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (DataSetResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DataSetResponse))); - } - - /// - /// Store dataset Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - /// - /// Thrown when fails to make API call - /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - /// Task of DataSetResponse - public async System.Threading.Tasks.Task CreateDataSetAsync (string payload) - { - ApiResponse localVarResponse = await CreateDataSetAsyncWithHttpInfo(payload); - return localVarResponse.Data; - - } - - /// - /// Store dataset Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - /// - /// Thrown when fails to make API call - /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - /// Task of ApiResponse (DataSetResponse) - public async System.Threading.Tasks.Task> CreateDataSetAsyncWithHttpInfo (string payload) - { - // verify the required parameter 'payload' is set - if (payload == null) - throw new ApiException(400, "Missing required parameter 'payload' when calling AllApi->CreateDataSet"); - - var localVarPath = "/template/processor/0.1/datasets"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (payload != null && payload.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(payload); // http body (model) parameter - } - else - { - localVarPostBody = payload; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateDataSet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (DataSetResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DataSetResponse))); - } - - /// - /// Create template context Create a unique template context for your environment - /// - /// Thrown when fails to make API call - /// The template request - /// TemplateContextResponse - public TemplateContextResponse CreateTemplateContext (TemplateContextRequest templateRequest) - { - ApiResponse localVarResponse = CreateTemplateContextWithHttpInfo(templateRequest); - return localVarResponse.Data; - } - - /// - /// Create template context Create a unique template context for your environment - /// - /// Thrown when fails to make API call - /// The template request - /// ApiResponse of TemplateContextResponse - public ApiResponse< TemplateContextResponse > CreateTemplateContextWithHttpInfo (TemplateContextRequest templateRequest) - { - // verify the required parameter 'templateRequest' is set - if (templateRequest == null) - throw new ApiException(400, "Missing required parameter 'templateRequest' when calling AllApi->CreateTemplateContext"); - - var localVarPath = "/template/processor/0.1/templates"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateRequest != null && templateRequest.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(templateRequest); // http body (model) parameter - } - else - { - localVarPostBody = templateRequest; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateTemplateContext", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Create template context Create a unique template context for your environment - /// - /// Thrown when fails to make API call - /// The template request - /// Task of TemplateContextResponse - public async System.Threading.Tasks.Task CreateTemplateContextAsync (TemplateContextRequest templateRequest) - { - ApiResponse localVarResponse = await CreateTemplateContextAsyncWithHttpInfo(templateRequest); - return localVarResponse.Data; - - } - - /// - /// Create template context Create a unique template context for your environment - /// - /// Thrown when fails to make API call - /// The template request - /// Task of ApiResponse (TemplateContextResponse) - public async System.Threading.Tasks.Task> CreateTemplateContextAsyncWithHttpInfo (TemplateContextRequest templateRequest) - { - // verify the required parameter 'templateRequest' is set - if (templateRequest == null) - throw new ApiException(400, "Missing required parameter 'templateRequest' when calling AllApi->CreateTemplateContext"); - - var localVarPath = "/template/processor/0.1/templates"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateRequest != null && templateRequest.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(templateRequest); // http body (model) parameter - } - else - { - localVarPostBody = templateRequest; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateTemplateContext", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Delete a stored data set Delete a stored data set - /// - /// Thrown when fails to make API call - /// dataSetId - /// DataSetResponse - public DataSetResponse DeleteDataSet (string dataSetId) - { - ApiResponse localVarResponse = DeleteDataSetWithHttpInfo(dataSetId); - return localVarResponse.Data; - } - - /// - /// Delete a stored data set Delete a stored data set - /// - /// Thrown when fails to make API call - /// dataSetId - /// ApiResponse of DataSetResponse - public ApiResponse< DataSetResponse > DeleteDataSetWithHttpInfo (string dataSetId) - { - // verify the required parameter 'dataSetId' is set - if (dataSetId == null) - throw new ApiException(400, "Missing required parameter 'dataSetId' when calling AllApi->DeleteDataSet"); - - var localVarPath = "/template/processor/0.1/datasets/{dataSetId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (dataSetId != null) localVarPathParams.Add("dataSetId", Configuration.ApiClient.ParameterToString(dataSetId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteDataSet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (DataSetResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DataSetResponse))); - } - - /// - /// Delete a stored data set Delete a stored data set - /// - /// Thrown when fails to make API call - /// dataSetId - /// Task of DataSetResponse - public async System.Threading.Tasks.Task DeleteDataSetAsync (string dataSetId) - { - ApiResponse localVarResponse = await DeleteDataSetAsyncWithHttpInfo(dataSetId); - return localVarResponse.Data; - - } - - /// - /// Delete a stored data set Delete a stored data set - /// - /// Thrown when fails to make API call - /// dataSetId - /// Task of ApiResponse (DataSetResponse) - public async System.Threading.Tasks.Task> DeleteDataSetAsyncWithHttpInfo (string dataSetId) - { - // verify the required parameter 'dataSetId' is set - if (dataSetId == null) - throw new ApiException(400, "Missing required parameter 'dataSetId' when calling AllApi->DeleteDataSet"); - - var localVarPath = "/template/processor/0.1/datasets/{dataSetId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (dataSetId != null) localVarPathParams.Add("dataSetId", Configuration.ApiClient.ParameterToString(dataSetId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteDataSet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (DataSetResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DataSetResponse))); - } - - /// - /// Delete a job manually Delete the merge job and all related files - /// - /// Thrown when fails to make API call - /// jobId - /// MergeJobResponse - public MergeJobResponse DeleteJob (string jobId) - { - ApiResponse localVarResponse = DeleteJobWithHttpInfo(jobId); - return localVarResponse.Data; - } - - /// - /// Delete a job manually Delete the merge job and all related files - /// - /// Thrown when fails to make API call - /// jobId - /// ApiResponse of MergeJobResponse - public ApiResponse< MergeJobResponse > DeleteJobWithHttpInfo (string jobId) - { - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling AllApi->DeleteJob"); - - var localVarPath = "/template/processor/0.1/jobs/{jobId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteJob", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (MergeJobResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(MergeJobResponse))); - } - - /// - /// Delete a job manually Delete the merge job and all related files - /// - /// Thrown when fails to make API call - /// jobId - /// Task of MergeJobResponse - public async System.Threading.Tasks.Task DeleteJobAsync (string jobId) - { - ApiResponse localVarResponse = await DeleteJobAsyncWithHttpInfo(jobId); - return localVarResponse.Data; - - } - - /// - /// Delete a job manually Delete the merge job and all related files - /// - /// Thrown when fails to make API call - /// jobId - /// Task of ApiResponse (MergeJobResponse) - public async System.Threading.Tasks.Task> DeleteJobAsyncWithHttpInfo (string jobId) - { - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling AllApi->DeleteJob"); - - var localVarPath = "/template/processor/0.1/jobs/{jobId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteJob", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (MergeJobResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(MergeJobResponse))); - } - - /// - /// Delete template context Delete a template context with all history - /// - /// Thrown when fails to make API call - /// templateId - /// TemplateContextResponse - public TemplateContextResponse DeleteTemplateContext (string templateId) - { - ApiResponse localVarResponse = DeleteTemplateContextWithHttpInfo(templateId); - return localVarResponse.Data; - } - - /// - /// Delete template context Delete a template context with all history - /// - /// Thrown when fails to make API call - /// templateId - /// ApiResponse of TemplateContextResponse - public ApiResponse< TemplateContextResponse > DeleteTemplateContextWithHttpInfo (string templateId) - { - // verify the required parameter 'templateId' is set - if (templateId == null) - throw new ApiException(400, "Missing required parameter 'templateId' when calling AllApi->DeleteTemplateContext"); - - var localVarPath = "/template/processor/0.1/templates/{templateId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteTemplateContext", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Delete template context Delete a template context with all history - /// - /// Thrown when fails to make API call - /// templateId - /// Task of TemplateContextResponse - public async System.Threading.Tasks.Task DeleteTemplateContextAsync (string templateId) - { - ApiResponse localVarResponse = await DeleteTemplateContextAsyncWithHttpInfo(templateId); - return localVarResponse.Data; - - } - - /// - /// Delete template context Delete a template context with all history - /// - /// Thrown when fails to make API call - /// templateId - /// Task of ApiResponse (TemplateContextResponse) - public async System.Threading.Tasks.Task> DeleteTemplateContextAsyncWithHttpInfo (string templateId) - { - // verify the required parameter 'templateId' is set - if (templateId == null) - throw new ApiException(400, "Missing required parameter 'templateId' when calling AllApi->DeleteTemplateContext"); - - var localVarPath = "/template/processor/0.1/templates/{templateId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteTemplateContext", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Job definition and state Get the merge job definition and current state. Please not that you can differentiate based on http response status - /// - /// Thrown when fails to make API call - /// jobId - /// MergeJobResponse - public MergeJobResponse GetJob (string jobId) - { - ApiResponse localVarResponse = GetJobWithHttpInfo(jobId); - return localVarResponse.Data; - } - - /// - /// Job definition and state Get the merge job definition and current state. Please not that you can differentiate based on http response status - /// - /// Thrown when fails to make API call - /// jobId - /// ApiResponse of MergeJobResponse - public ApiResponse< MergeJobResponse > GetJobWithHttpInfo (string jobId) - { - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling AllApi->GetJob"); - - var localVarPath = "/template/processor/0.1/jobs/{jobId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetJob", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (MergeJobResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(MergeJobResponse))); - } - - /// - /// Job definition and state Get the merge job definition and current state. Please not that you can differentiate based on http response status - /// - /// Thrown when fails to make API call - /// jobId - /// Task of MergeJobResponse - public async System.Threading.Tasks.Task GetJobAsync (string jobId) - { - ApiResponse localVarResponse = await GetJobAsyncWithHttpInfo(jobId); - return localVarResponse.Data; - - } - - /// - /// Job definition and state Get the merge job definition and current state. Please not that you can differentiate based on http response status - /// - /// Thrown when fails to make API call - /// jobId - /// Task of ApiResponse (MergeJobResponse) - public async System.Threading.Tasks.Task> GetJobAsyncWithHttpInfo (string jobId) - { - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling AllApi->GetJob"); - - var localVarPath = "/template/processor/0.1/jobs/{jobId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetJob", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (MergeJobResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(MergeJobResponse))); - } - - /// - /// Get all jobs Get all office text job definitions and their current state. - /// - /// Thrown when fails to make API call - /// A list of status to filter on. (optional) - /// List<MergeJobResponse> - public List GetJobs (List status = null) - { - ApiResponse> localVarResponse = GetJobsWithHttpInfo(status); - return localVarResponse.Data; - } - - /// - /// Get all jobs Get all office text job definitions and their current state. - /// - /// Thrown when fails to make API call - /// A list of status to filter on. (optional) - /// ApiResponse of List<MergeJobResponse> - public ApiResponse< List > GetJobsWithHttpInfo (List status = null) - { - - var localVarPath = "/template/processor/0.1/jobs"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (status != null) localVarQueryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetJobs", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Get all jobs Get all office text job definitions and their current state. - /// - /// Thrown when fails to make API call - /// A list of status to filter on. (optional) - /// Task of List<MergeJobResponse> - public async System.Threading.Tasks.Task> GetJobsAsync (List status = null) - { - ApiResponse> localVarResponse = await GetJobsAsyncWithHttpInfo(status); - return localVarResponse.Data; - - } - - /// - /// Get all jobs Get all office text job definitions and their current state. - /// - /// Thrown when fails to make API call - /// A list of status to filter on. (optional) - /// Task of ApiResponse (List<MergeJobResponse>) - public async System.Threading.Tasks.Task>> GetJobsAsyncWithHttpInfo (List status = null) - { - - var localVarPath = "/template/processor/0.1/jobs"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (status != null) localVarQueryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetJobs", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Get the result file Get a merge result document as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// resultStreamRequest - /// byte[] - public byte[] GetResultStream (string jobId, ResultStreamRequest resultStreamRequest) - { - ApiResponse localVarResponse = GetResultStreamWithHttpInfo(jobId, resultStreamRequest); - return localVarResponse.Data; - } - - /// - /// Get the result file Get a merge result document as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// resultStreamRequest - /// ApiResponse of byte[] - public ApiResponse< byte[] > GetResultStreamWithHttpInfo (string jobId, ResultStreamRequest resultStreamRequest) - { - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling AllApi->GetResultStream"); - // verify the required parameter 'resultStreamRequest' is set - if (resultStreamRequest == null) - throw new ApiException(400, "Missing required parameter 'resultStreamRequest' when calling AllApi->GetResultStream"); - - var localVarPath = "/template/processor/0.1/jobs/{jobId}/result/stream"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/octet-stream" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter - if (resultStreamRequest != null && resultStreamRequest.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(resultStreamRequest); // http body (model) parameter - } - else - { - localVarPostBody = resultStreamRequest; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetResultStream", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (byte[]) Configuration.ApiClient.Deserialize(localVarResponse, typeof(byte[]))); - } - - /// - /// Get the result file Get a merge result document as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// resultStreamRequest - /// Task of byte[] - public async System.Threading.Tasks.Task GetResultStreamAsync (string jobId, ResultStreamRequest resultStreamRequest) - { - ApiResponse localVarResponse = await GetResultStreamAsyncWithHttpInfo(jobId, resultStreamRequest); - return localVarResponse.Data; - - } - - /// - /// Get the result file Get a merge result document as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// resultStreamRequest - /// Task of ApiResponse (byte[]) - public async System.Threading.Tasks.Task> GetResultStreamAsyncWithHttpInfo (string jobId, ResultStreamRequest resultStreamRequest) - { - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling AllApi->GetResultStream"); - // verify the required parameter 'resultStreamRequest' is set - if (resultStreamRequest == null) - throw new ApiException(400, "Missing required parameter 'resultStreamRequest' when calling AllApi->GetResultStream"); - - var localVarPath = "/template/processor/0.1/jobs/{jobId}/result/stream"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/octet-stream" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter - if (resultStreamRequest != null && resultStreamRequest.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(resultStreamRequest); // http body (model) parameter - } - else - { - localVarPostBody = resultStreamRequest; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetResultStream", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (byte[]) Configuration.ApiClient.Deserialize(localVarResponse, typeof(byte[]))); - } - - /// - /// Get the result file Get all documents inside a compressed container as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// outputSettings (optional) - /// byte[] - public byte[] GetResultStreamsAsContainer (string jobId, OutputSettings outputSettings = null) - { - ApiResponse localVarResponse = GetResultStreamsAsContainerWithHttpInfo(jobId, outputSettings); - return localVarResponse.Data; - } - - /// - /// Get the result file Get all documents inside a compressed container as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// outputSettings (optional) - /// ApiResponse of byte[] - public ApiResponse< byte[] > GetResultStreamsAsContainerWithHttpInfo (string jobId, OutputSettings outputSettings = null) - { - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling AllApi->GetResultStreamsAsContainer"); - - var localVarPath = "/template/processor/0.1/jobs/{jobId}/result/container"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/octet-stream" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter - if (outputSettings != null && outputSettings.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(outputSettings); // http body (model) parameter - } - else - { - localVarPostBody = outputSettings; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetResultStreamsAsContainer", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (byte[]) Configuration.ApiClient.Deserialize(localVarResponse, typeof(byte[]))); - } - - /// - /// Get the result file Get all documents inside a compressed container as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// outputSettings (optional) - /// Task of byte[] - public async System.Threading.Tasks.Task GetResultStreamsAsContainerAsync (string jobId, OutputSettings outputSettings = null) - { - ApiResponse localVarResponse = await GetResultStreamsAsContainerAsyncWithHttpInfo(jobId, outputSettings); - return localVarResponse.Data; - - } - - /// - /// Get the result file Get all documents inside a compressed container as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// outputSettings (optional) - /// Task of ApiResponse (byte[]) - public async System.Threading.Tasks.Task> GetResultStreamsAsContainerAsyncWithHttpInfo (string jobId, OutputSettings outputSettings = null) - { - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling AllApi->GetResultStreamsAsContainer"); - - var localVarPath = "/template/processor/0.1/jobs/{jobId}/result/container"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/octet-stream" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter - if (outputSettings != null && outputSettings.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(outputSettings); // http body (model) parameter - } - else - { - localVarPostBody = outputSettings; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetResultStreamsAsContainer", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (byte[]) Configuration.ApiClient.Deserialize(localVarResponse, typeof(byte[]))); - } - - /// - /// Get template context Get an existing template context - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// TemplateContextResponse - public TemplateContextResponse GetTemplateContext (string templateId) - { - ApiResponse localVarResponse = GetTemplateContextWithHttpInfo(templateId); - return localVarResponse.Data; - } - - /// - /// Get template context Get an existing template context - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// ApiResponse of TemplateContextResponse - public ApiResponse< TemplateContextResponse > GetTemplateContextWithHttpInfo (string templateId) - { - // verify the required parameter 'templateId' is set - if (templateId == null) - throw new ApiException(400, "Missing required parameter 'templateId' when calling AllApi->GetTemplateContext"); - - var localVarPath = "/template/processor/0.1/templates/{templateId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetTemplateContext", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Get template context Get an existing template context - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// Task of TemplateContextResponse - public async System.Threading.Tasks.Task GetTemplateContextAsync (string templateId) - { - ApiResponse localVarResponse = await GetTemplateContextAsyncWithHttpInfo(templateId); - return localVarResponse.Data; - - } - - /// - /// Get template context Get an existing template context - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// Task of ApiResponse (TemplateContextResponse) - public async System.Threading.Tasks.Task> GetTemplateContextAsyncWithHttpInfo (string templateId) - { - // verify the required parameter 'templateId' is set - if (templateId == null) - throw new ApiException(400, "Missing required parameter 'templateId' when calling AllApi->GetTemplateContext"); - - var localVarPath = "/template/processor/0.1/templates/{templateId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetTemplateContext", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Submit merge job for processing Submit merge job run. - /// - /// Thrown when fails to make API call - /// The merge- and output settings - /// MergeJobResponse - public MergeJobResponse SubmitJob (MergeSettings mergesettings) - { - ApiResponse localVarResponse = SubmitJobWithHttpInfo(mergesettings); - return localVarResponse.Data; - } - - /// - /// Submit merge job for processing Submit merge job run. - /// - /// Thrown when fails to make API call - /// The merge- and output settings - /// ApiResponse of MergeJobResponse - public ApiResponse< MergeJobResponse > SubmitJobWithHttpInfo (MergeSettings mergesettings) - { - // verify the required parameter 'mergesettings' is set - if (mergesettings == null) - throw new ApiException(400, "Missing required parameter 'mergesettings' when calling AllApi->SubmitJob"); - - var localVarPath = "/template/processor/0.1/jobs"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (mergesettings != null && mergesettings.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(mergesettings); // http body (model) parameter - } - else - { - localVarPostBody = mergesettings; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("SubmitJob", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (MergeJobResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(MergeJobResponse))); - } - - /// - /// Submit merge job for processing Submit merge job run. - /// - /// Thrown when fails to make API call - /// The merge- and output settings - /// Task of MergeJobResponse - public async System.Threading.Tasks.Task SubmitJobAsync (MergeSettings mergesettings) - { - ApiResponse localVarResponse = await SubmitJobAsyncWithHttpInfo(mergesettings); - return localVarResponse.Data; - - } - - /// - /// Submit merge job for processing Submit merge job run. - /// - /// Thrown when fails to make API call - /// The merge- and output settings - /// Task of ApiResponse (MergeJobResponse) - public async System.Threading.Tasks.Task> SubmitJobAsyncWithHttpInfo (MergeSettings mergesettings) - { - // verify the required parameter 'mergesettings' is set - if (mergesettings == null) - throw new ApiException(400, "Missing required parameter 'mergesettings' when calling AllApi->SubmitJob"); - - var localVarPath = "/template/processor/0.1/jobs"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (mergesettings != null && mergesettings.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(mergesettings); // http body (model) parameter - } - else - { - localVarPostBody = mergesettings; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("SubmitJob", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (MergeJobResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(MergeJobResponse))); - } - - /// - /// Update template context Update an existing template context for your environment - /// - /// Thrown when fails to make API call - /// templateContext - /// TemplateContextResponse - public TemplateContextResponse UpdateTemplateContext (TemplateContext templateContext) - { - ApiResponse localVarResponse = UpdateTemplateContextWithHttpInfo(templateContext); - return localVarResponse.Data; - } - - /// - /// Update template context Update an existing template context for your environment - /// - /// Thrown when fails to make API call - /// templateContext - /// ApiResponse of TemplateContextResponse - public ApiResponse< TemplateContextResponse > UpdateTemplateContextWithHttpInfo (TemplateContext templateContext) - { - // verify the required parameter 'templateContext' is set - if (templateContext == null) - throw new ApiException(400, "Missing required parameter 'templateContext' when calling AllApi->UpdateTemplateContext"); - - var localVarPath = "/template/processor/0.1/templates"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateContext != null && templateContext.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(templateContext); // http body (model) parameter - } - else - { - localVarPostBody = templateContext; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdateTemplateContext", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Update template context Update an existing template context for your environment - /// - /// Thrown when fails to make API call - /// templateContext - /// Task of TemplateContextResponse - public async System.Threading.Tasks.Task UpdateTemplateContextAsync (TemplateContext templateContext) - { - ApiResponse localVarResponse = await UpdateTemplateContextAsyncWithHttpInfo(templateContext); - return localVarResponse.Data; - - } - - /// - /// Update template context Update an existing template context for your environment - /// - /// Thrown when fails to make API call - /// templateContext - /// Task of ApiResponse (TemplateContextResponse) - public async System.Threading.Tasks.Task> UpdateTemplateContextAsyncWithHttpInfo (TemplateContext templateContext) - { - // verify the required parameter 'templateContext' is set - if (templateContext == null) - throw new ApiException(400, "Missing required parameter 'templateContext' when calling AllApi->UpdateTemplateContext"); - - var localVarPath = "/template/processor/0.1/templates"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateContext != null && templateContext.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(templateContext); // http body (model) parameter - } - else - { - localVarPostBody = templateContext; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdateTemplateContext", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Upload template file Upload the Office template file - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// The template (file/inputstream) to store - /// TemplateContextResponse - public TemplateContextResponse UploadTemplateFile (string templateId, System.IO.Stream stream) - { - ApiResponse localVarResponse = UploadTemplateFileWithHttpInfo(templateId, stream); - return localVarResponse.Data; - } - - /// - /// Upload template file Upload the Office template file - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// The template (file/inputstream) to store - /// ApiResponse of TemplateContextResponse - public ApiResponse< TemplateContextResponse > UploadTemplateFileWithHttpInfo (string templateId, System.IO.Stream stream) - { - // verify the required parameter 'templateId' is set - if (templateId == null) - throw new ApiException(400, "Missing required parameter 'templateId' when calling AllApi->UploadTemplateFile"); - // verify the required parameter 'stream' is set - if (stream == null) - throw new ApiException(400, "Missing required parameter 'stream' when calling AllApi->UploadTemplateFile"); - - var localVarPath = "/template/processor/0.1/templates/{templateId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter - if (stream != null) localVarFileParams.Add("stream", Configuration.ApiClient.ParameterToFile("stream", stream)); - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadTemplateFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Upload template file Upload the Office template file - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// The template (file/inputstream) to store - /// Task of TemplateContextResponse - public async System.Threading.Tasks.Task UploadTemplateFileAsync (string templateId, System.IO.Stream stream) - { - ApiResponse localVarResponse = await UploadTemplateFileAsyncWithHttpInfo(templateId, stream); - return localVarResponse.Data; - - } - - /// - /// Upload template file Upload the Office template file - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// The template (file/inputstream) to store - /// Task of ApiResponse (TemplateContextResponse) - public async System.Threading.Tasks.Task> UploadTemplateFileAsyncWithHttpInfo (string templateId, System.IO.Stream stream) - { - // verify the required parameter 'templateId' is set - if (templateId == null) - throw new ApiException(400, "Missing required parameter 'templateId' when calling AllApi->UploadTemplateFile"); - // verify the required parameter 'stream' is set - if (stream == null) - throw new ApiException(400, "Missing required parameter 'stream' when calling AllApi->UploadTemplateFile"); - - var localVarPath = "/template/processor/0.1/templates/{templateId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter - if (stream != null) localVarFileParams.Add("stream", Configuration.ApiClient.ParameterToFile("stream", stream)); - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadTemplateFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - } -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Api/DataSetApi.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Api/DataSetApi.cs deleted file mode 100644 index ac5c937..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Api/DataSetApi.cs +++ /dev/null @@ -1,534 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Sphereon.SDK.TemplateProcessor.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IDataSetApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Store dataset - /// - /// - /// Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - /// - /// Thrown when fails to make API call - /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - /// DataSetResponse - DataSetResponse CreateDataSet (string payload); - - /// - /// Store dataset - /// - /// - /// Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - /// - /// Thrown when fails to make API call - /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - /// ApiResponse of DataSetResponse - ApiResponse CreateDataSetWithHttpInfo (string payload); - /// - /// Delete a stored data set - /// - /// - /// Delete a stored data set - /// - /// Thrown when fails to make API call - /// dataSetId - /// DataSetResponse - DataSetResponse DeleteDataSet (string dataSetId); - - /// - /// Delete a stored data set - /// - /// - /// Delete a stored data set - /// - /// Thrown when fails to make API call - /// dataSetId - /// ApiResponse of DataSetResponse - ApiResponse DeleteDataSetWithHttpInfo (string dataSetId); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Store dataset - /// - /// - /// Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - /// - /// Thrown when fails to make API call - /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - /// Task of DataSetResponse - System.Threading.Tasks.Task CreateDataSetAsync (string payload); - - /// - /// Store dataset - /// - /// - /// Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - /// - /// Thrown when fails to make API call - /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - /// Task of ApiResponse (DataSetResponse) - System.Threading.Tasks.Task> CreateDataSetAsyncWithHttpInfo (string payload); - /// - /// Delete a stored data set - /// - /// - /// Delete a stored data set - /// - /// Thrown when fails to make API call - /// dataSetId - /// Task of DataSetResponse - System.Threading.Tasks.Task DeleteDataSetAsync (string dataSetId); - - /// - /// Delete a stored data set - /// - /// - /// Delete a stored data set - /// - /// Thrown when fails to make API call - /// dataSetId - /// Task of ApiResponse (DataSetResponse) - System.Threading.Tasks.Task> DeleteDataSetAsyncWithHttpInfo (string dataSetId); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class DataSetApi : IDataSetApi - { - private Sphereon.SDK.TemplateProcessor.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public DataSetApi(String basePath) - { - this.Configuration = new Configuration(new ApiClient(basePath)); - - ExceptionFactory = Sphereon.SDK.TemplateProcessor.Client.Configuration.DefaultExceptionFactory; - - // ensure API client has configuration ready - if (Configuration.ApiClient.Configuration == null) - { - this.Configuration.ApiClient.Configuration = this.Configuration; - } - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public DataSetApi(Configuration configuration = null) - { - if (configuration == null) // use the default one in Configuration - this.Configuration = Configuration.Default; - else - this.Configuration = configuration; - - ExceptionFactory = Sphereon.SDK.TemplateProcessor.Client.Configuration.DefaultExceptionFactory; - - // ensure API client has configuration ready - if (Configuration.ApiClient.Configuration == null) - { - this.Configuration.ApiClient.Configuration = this.Configuration; - } - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public Sphereon.SDK.TemplateProcessor.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public Dictionary DefaultHeader() - { - return this.Configuration.DefaultHeader; - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Store dataset Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - /// - /// Thrown when fails to make API call - /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - /// DataSetResponse - public DataSetResponse CreateDataSet (string payload) - { - ApiResponse localVarResponse = CreateDataSetWithHttpInfo(payload); - return localVarResponse.Data; - } - - /// - /// Store dataset Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - /// - /// Thrown when fails to make API call - /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - /// ApiResponse of DataSetResponse - public ApiResponse< DataSetResponse > CreateDataSetWithHttpInfo (string payload) - { - // verify the required parameter 'payload' is set - if (payload == null) - throw new ApiException(400, "Missing required parameter 'payload' when calling DataSetApi->CreateDataSet"); - - var localVarPath = "/template/processor/0.1/datasets"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (payload != null && payload.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(payload); // http body (model) parameter - } - else - { - localVarPostBody = payload; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateDataSet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (DataSetResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DataSetResponse))); - } - - /// - /// Store dataset Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - /// - /// Thrown when fails to make API call - /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - /// Task of DataSetResponse - public async System.Threading.Tasks.Task CreateDataSetAsync (string payload) - { - ApiResponse localVarResponse = await CreateDataSetAsyncWithHttpInfo(payload); - return localVarResponse.Data; - - } - - /// - /// Store dataset Upload and store a data set. Currently only JSON is supported. This call returns an id which can be specified when submitting a merge job. - /// - /// Thrown when fails to make API call - /// The dates for the merge [ { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", }, { \"Field1\": \"Field1 value\", \"Field2\": \"Field2 value\", } ] - /// Task of ApiResponse (DataSetResponse) - public async System.Threading.Tasks.Task> CreateDataSetAsyncWithHttpInfo (string payload) - { - // verify the required parameter 'payload' is set - if (payload == null) - throw new ApiException(400, "Missing required parameter 'payload' when calling DataSetApi->CreateDataSet"); - - var localVarPath = "/template/processor/0.1/datasets"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (payload != null && payload.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(payload); // http body (model) parameter - } - else - { - localVarPostBody = payload; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateDataSet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (DataSetResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DataSetResponse))); - } - - /// - /// Delete a stored data set Delete a stored data set - /// - /// Thrown when fails to make API call - /// dataSetId - /// DataSetResponse - public DataSetResponse DeleteDataSet (string dataSetId) - { - ApiResponse localVarResponse = DeleteDataSetWithHttpInfo(dataSetId); - return localVarResponse.Data; - } - - /// - /// Delete a stored data set Delete a stored data set - /// - /// Thrown when fails to make API call - /// dataSetId - /// ApiResponse of DataSetResponse - public ApiResponse< DataSetResponse > DeleteDataSetWithHttpInfo (string dataSetId) - { - // verify the required parameter 'dataSetId' is set - if (dataSetId == null) - throw new ApiException(400, "Missing required parameter 'dataSetId' when calling DataSetApi->DeleteDataSet"); - - var localVarPath = "/template/processor/0.1/datasets/{dataSetId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (dataSetId != null) localVarPathParams.Add("dataSetId", Configuration.ApiClient.ParameterToString(dataSetId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteDataSet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (DataSetResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DataSetResponse))); - } - - /// - /// Delete a stored data set Delete a stored data set - /// - /// Thrown when fails to make API call - /// dataSetId - /// Task of DataSetResponse - public async System.Threading.Tasks.Task DeleteDataSetAsync (string dataSetId) - { - ApiResponse localVarResponse = await DeleteDataSetAsyncWithHttpInfo(dataSetId); - return localVarResponse.Data; - - } - - /// - /// Delete a stored data set Delete a stored data set - /// - /// Thrown when fails to make API call - /// dataSetId - /// Task of ApiResponse (DataSetResponse) - public async System.Threading.Tasks.Task> DeleteDataSetAsyncWithHttpInfo (string dataSetId) - { - // verify the required parameter 'dataSetId' is set - if (dataSetId == null) - throw new ApiException(400, "Missing required parameter 'dataSetId' when calling DataSetApi->DeleteDataSet"); - - var localVarPath = "/template/processor/0.1/datasets/{dataSetId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (dataSetId != null) localVarPathParams.Add("dataSetId", Configuration.ApiClient.ParameterToString(dataSetId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteDataSet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (DataSetResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(DataSetResponse))); - } - - } -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Api/JobApi.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Api/JobApi.cs deleted file mode 100644 index 82d801a..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Api/JobApi.cs +++ /dev/null @@ -1,1149 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Sphereon.SDK.TemplateProcessor.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IJobApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Job definition and state - /// - /// - /// Get the merge job definition and current state. Please not that you can differentiate based on http response status - /// - /// Thrown when fails to make API call - /// jobId - /// MergeJobResponse - MergeJobResponse GetJob (string jobId); - - /// - /// Job definition and state - /// - /// - /// Get the merge job definition and current state. Please not that you can differentiate based on http response status - /// - /// Thrown when fails to make API call - /// jobId - /// ApiResponse of MergeJobResponse - ApiResponse GetJobWithHttpInfo (string jobId); - /// - /// Get all jobs - /// - /// - /// Get all office text job definitions and their current state. - /// - /// Thrown when fails to make API call - /// A list of status to filter on. (optional) - /// List<MergeJobResponse> - List GetJobs (List status = null); - - /// - /// Get all jobs - /// - /// - /// Get all office text job definitions and their current state. - /// - /// Thrown when fails to make API call - /// A list of status to filter on. (optional) - /// ApiResponse of List<MergeJobResponse> - ApiResponse> GetJobsWithHttpInfo (List status = null); - /// - /// Get the result file - /// - /// - /// Get a merge result document as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// resultStreamRequest - /// byte[] - byte[] GetResultStream (string jobId, ResultStreamRequest resultStreamRequest); - - /// - /// Get the result file - /// - /// - /// Get a merge result document as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// resultStreamRequest - /// ApiResponse of byte[] - ApiResponse GetResultStreamWithHttpInfo (string jobId, ResultStreamRequest resultStreamRequest); - /// - /// Get the result file - /// - /// - /// Get all documents inside a compressed container as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// outputSettings (optional) - /// byte[] - byte[] GetResultStreamsAsContainer (string jobId, OutputSettings outputSettings = null); - - /// - /// Get the result file - /// - /// - /// Get all documents inside a compressed container as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// outputSettings (optional) - /// ApiResponse of byte[] - ApiResponse GetResultStreamsAsContainerWithHttpInfo (string jobId, OutputSettings outputSettings = null); - /// - /// Submit merge job for processing - /// - /// - /// Submit merge job run. - /// - /// Thrown when fails to make API call - /// The merge- and output settings - /// MergeJobResponse - MergeJobResponse SubmitJob (MergeSettings mergesettings); - - /// - /// Submit merge job for processing - /// - /// - /// Submit merge job run. - /// - /// Thrown when fails to make API call - /// The merge- and output settings - /// ApiResponse of MergeJobResponse - ApiResponse SubmitJobWithHttpInfo (MergeSettings mergesettings); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Job definition and state - /// - /// - /// Get the merge job definition and current state. Please not that you can differentiate based on http response status - /// - /// Thrown when fails to make API call - /// jobId - /// Task of MergeJobResponse - System.Threading.Tasks.Task GetJobAsync (string jobId); - - /// - /// Job definition and state - /// - /// - /// Get the merge job definition and current state. Please not that you can differentiate based on http response status - /// - /// Thrown when fails to make API call - /// jobId - /// Task of ApiResponse (MergeJobResponse) - System.Threading.Tasks.Task> GetJobAsyncWithHttpInfo (string jobId); - /// - /// Get all jobs - /// - /// - /// Get all office text job definitions and their current state. - /// - /// Thrown when fails to make API call - /// A list of status to filter on. (optional) - /// Task of List<MergeJobResponse> - System.Threading.Tasks.Task> GetJobsAsync (List status = null); - - /// - /// Get all jobs - /// - /// - /// Get all office text job definitions and their current state. - /// - /// Thrown when fails to make API call - /// A list of status to filter on. (optional) - /// Task of ApiResponse (List<MergeJobResponse>) - System.Threading.Tasks.Task>> GetJobsAsyncWithHttpInfo (List status = null); - /// - /// Get the result file - /// - /// - /// Get a merge result document as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// resultStreamRequest - /// Task of byte[] - System.Threading.Tasks.Task GetResultStreamAsync (string jobId, ResultStreamRequest resultStreamRequest); - - /// - /// Get the result file - /// - /// - /// Get a merge result document as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// resultStreamRequest - /// Task of ApiResponse (byte[]) - System.Threading.Tasks.Task> GetResultStreamAsyncWithHttpInfo (string jobId, ResultStreamRequest resultStreamRequest); - /// - /// Get the result file - /// - /// - /// Get all documents inside a compressed container as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// outputSettings (optional) - /// Task of byte[] - System.Threading.Tasks.Task GetResultStreamsAsContainerAsync (string jobId, OutputSettings outputSettings = null); - - /// - /// Get the result file - /// - /// - /// Get all documents inside a compressed container as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// outputSettings (optional) - /// Task of ApiResponse (byte[]) - System.Threading.Tasks.Task> GetResultStreamsAsContainerAsyncWithHttpInfo (string jobId, OutputSettings outputSettings = null); - /// - /// Submit merge job for processing - /// - /// - /// Submit merge job run. - /// - /// Thrown when fails to make API call - /// The merge- and output settings - /// Task of MergeJobResponse - System.Threading.Tasks.Task SubmitJobAsync (MergeSettings mergesettings); - - /// - /// Submit merge job for processing - /// - /// - /// Submit merge job run. - /// - /// Thrown when fails to make API call - /// The merge- and output settings - /// Task of ApiResponse (MergeJobResponse) - System.Threading.Tasks.Task> SubmitJobAsyncWithHttpInfo (MergeSettings mergesettings); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class JobApi : IJobApi - { - private Sphereon.SDK.TemplateProcessor.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public JobApi(String basePath) - { - this.Configuration = new Configuration(new ApiClient(basePath)); - - ExceptionFactory = Sphereon.SDK.TemplateProcessor.Client.Configuration.DefaultExceptionFactory; - - // ensure API client has configuration ready - if (Configuration.ApiClient.Configuration == null) - { - this.Configuration.ApiClient.Configuration = this.Configuration; - } - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public JobApi(Configuration configuration = null) - { - if (configuration == null) // use the default one in Configuration - this.Configuration = Configuration.Default; - else - this.Configuration = configuration; - - ExceptionFactory = Sphereon.SDK.TemplateProcessor.Client.Configuration.DefaultExceptionFactory; - - // ensure API client has configuration ready - if (Configuration.ApiClient.Configuration == null) - { - this.Configuration.ApiClient.Configuration = this.Configuration; - } - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public Sphereon.SDK.TemplateProcessor.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public Dictionary DefaultHeader() - { - return this.Configuration.DefaultHeader; - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Job definition and state Get the merge job definition and current state. Please not that you can differentiate based on http response status - /// - /// Thrown when fails to make API call - /// jobId - /// MergeJobResponse - public MergeJobResponse GetJob (string jobId) - { - ApiResponse localVarResponse = GetJobWithHttpInfo(jobId); - return localVarResponse.Data; - } - - /// - /// Job definition and state Get the merge job definition and current state. Please not that you can differentiate based on http response status - /// - /// Thrown when fails to make API call - /// jobId - /// ApiResponse of MergeJobResponse - public ApiResponse< MergeJobResponse > GetJobWithHttpInfo (string jobId) - { - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling JobApi->GetJob"); - - var localVarPath = "/template/processor/0.1/jobs/{jobId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetJob", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (MergeJobResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(MergeJobResponse))); - } - - /// - /// Job definition and state Get the merge job definition and current state. Please not that you can differentiate based on http response status - /// - /// Thrown when fails to make API call - /// jobId - /// Task of MergeJobResponse - public async System.Threading.Tasks.Task GetJobAsync (string jobId) - { - ApiResponse localVarResponse = await GetJobAsyncWithHttpInfo(jobId); - return localVarResponse.Data; - - } - - /// - /// Job definition and state Get the merge job definition and current state. Please not that you can differentiate based on http response status - /// - /// Thrown when fails to make API call - /// jobId - /// Task of ApiResponse (MergeJobResponse) - public async System.Threading.Tasks.Task> GetJobAsyncWithHttpInfo (string jobId) - { - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling JobApi->GetJob"); - - var localVarPath = "/template/processor/0.1/jobs/{jobId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetJob", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (MergeJobResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(MergeJobResponse))); - } - - /// - /// Get all jobs Get all office text job definitions and their current state. - /// - /// Thrown when fails to make API call - /// A list of status to filter on. (optional) - /// List<MergeJobResponse> - public List GetJobs (List status = null) - { - ApiResponse> localVarResponse = GetJobsWithHttpInfo(status); - return localVarResponse.Data; - } - - /// - /// Get all jobs Get all office text job definitions and their current state. - /// - /// Thrown when fails to make API call - /// A list of status to filter on. (optional) - /// ApiResponse of List<MergeJobResponse> - public ApiResponse< List > GetJobsWithHttpInfo (List status = null) - { - - var localVarPath = "/template/processor/0.1/jobs"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (status != null) localVarQueryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetJobs", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Get all jobs Get all office text job definitions and their current state. - /// - /// Thrown when fails to make API call - /// A list of status to filter on. (optional) - /// Task of List<MergeJobResponse> - public async System.Threading.Tasks.Task> GetJobsAsync (List status = null) - { - ApiResponse> localVarResponse = await GetJobsAsyncWithHttpInfo(status); - return localVarResponse.Data; - - } - - /// - /// Get all jobs Get all office text job definitions and their current state. - /// - /// Thrown when fails to make API call - /// A list of status to filter on. (optional) - /// Task of ApiResponse (List<MergeJobResponse>) - public async System.Threading.Tasks.Task>> GetJobsAsyncWithHttpInfo (List status = null) - { - - var localVarPath = "/template/processor/0.1/jobs"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (status != null) localVarQueryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetJobs", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (List) Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Get the result file Get a merge result document as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// resultStreamRequest - /// byte[] - public byte[] GetResultStream (string jobId, ResultStreamRequest resultStreamRequest) - { - ApiResponse localVarResponse = GetResultStreamWithHttpInfo(jobId, resultStreamRequest); - return localVarResponse.Data; - } - - /// - /// Get the result file Get a merge result document as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// resultStreamRequest - /// ApiResponse of byte[] - public ApiResponse< byte[] > GetResultStreamWithHttpInfo (string jobId, ResultStreamRequest resultStreamRequest) - { - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling JobApi->GetResultStream"); - // verify the required parameter 'resultStreamRequest' is set - if (resultStreamRequest == null) - throw new ApiException(400, "Missing required parameter 'resultStreamRequest' when calling JobApi->GetResultStream"); - - var localVarPath = "/template/processor/0.1/jobs/{jobId}/result/stream"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/octet-stream" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter - if (resultStreamRequest != null && resultStreamRequest.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(resultStreamRequest); // http body (model) parameter - } - else - { - localVarPostBody = resultStreamRequest; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetResultStream", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (byte[]) Configuration.ApiClient.Deserialize(localVarResponse, typeof(byte[]))); - } - - /// - /// Get the result file Get a merge result document as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// resultStreamRequest - /// Task of byte[] - public async System.Threading.Tasks.Task GetResultStreamAsync (string jobId, ResultStreamRequest resultStreamRequest) - { - ApiResponse localVarResponse = await GetResultStreamAsyncWithHttpInfo(jobId, resultStreamRequest); - return localVarResponse.Data; - - } - - /// - /// Get the result file Get a merge result document as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// resultStreamRequest - /// Task of ApiResponse (byte[]) - public async System.Threading.Tasks.Task> GetResultStreamAsyncWithHttpInfo (string jobId, ResultStreamRequest resultStreamRequest) - { - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling JobApi->GetResultStream"); - // verify the required parameter 'resultStreamRequest' is set - if (resultStreamRequest == null) - throw new ApiException(400, "Missing required parameter 'resultStreamRequest' when calling JobApi->GetResultStream"); - - var localVarPath = "/template/processor/0.1/jobs/{jobId}/result/stream"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/octet-stream" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter - if (resultStreamRequest != null && resultStreamRequest.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(resultStreamRequest); // http body (model) parameter - } - else - { - localVarPostBody = resultStreamRequest; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetResultStream", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (byte[]) Configuration.ApiClient.Deserialize(localVarResponse, typeof(byte[]))); - } - - /// - /// Get the result file Get all documents inside a compressed container as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// outputSettings (optional) - /// byte[] - public byte[] GetResultStreamsAsContainer (string jobId, OutputSettings outputSettings = null) - { - ApiResponse localVarResponse = GetResultStreamsAsContainerWithHttpInfo(jobId, outputSettings); - return localVarResponse.Data; - } - - /// - /// Get the result file Get all documents inside a compressed container as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// outputSettings (optional) - /// ApiResponse of byte[] - public ApiResponse< byte[] > GetResultStreamsAsContainerWithHttpInfo (string jobId, OutputSettings outputSettings = null) - { - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling JobApi->GetResultStreamsAsContainer"); - - var localVarPath = "/template/processor/0.1/jobs/{jobId}/result/container"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/octet-stream" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter - if (outputSettings != null && outputSettings.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(outputSettings); // http body (model) parameter - } - else - { - localVarPostBody = outputSettings; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetResultStreamsAsContainer", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (byte[]) Configuration.ApiClient.Deserialize(localVarResponse, typeof(byte[]))); - } - - /// - /// Get the result file Get all documents inside a compressed container as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// outputSettings (optional) - /// Task of byte[] - public async System.Threading.Tasks.Task GetResultStreamsAsContainerAsync (string jobId, OutputSettings outputSettings = null) - { - ApiResponse localVarResponse = await GetResultStreamsAsContainerAsyncWithHttpInfo(jobId, outputSettings); - return localVarResponse.Data; - - } - - /// - /// Get the result file Get all documents inside a compressed container as a binary stream. - /// - /// Thrown when fails to make API call - /// jobId - /// outputSettings (optional) - /// Task of ApiResponse (byte[]) - public async System.Threading.Tasks.Task> GetResultStreamsAsContainerAsyncWithHttpInfo (string jobId, OutputSettings outputSettings = null) - { - // verify the required parameter 'jobId' is set - if (jobId == null) - throw new ApiException(400, "Missing required parameter 'jobId' when calling JobApi->GetResultStreamsAsContainer"); - - var localVarPath = "/template/processor/0.1/jobs/{jobId}/result/container"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/octet-stream" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (jobId != null) localVarPathParams.Add("jobId", Configuration.ApiClient.ParameterToString(jobId)); // path parameter - if (outputSettings != null && outputSettings.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(outputSettings); // http body (model) parameter - } - else - { - localVarPostBody = outputSettings; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetResultStreamsAsContainer", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (byte[]) Configuration.ApiClient.Deserialize(localVarResponse, typeof(byte[]))); - } - - /// - /// Submit merge job for processing Submit merge job run. - /// - /// Thrown when fails to make API call - /// The merge- and output settings - /// MergeJobResponse - public MergeJobResponse SubmitJob (MergeSettings mergesettings) - { - ApiResponse localVarResponse = SubmitJobWithHttpInfo(mergesettings); - return localVarResponse.Data; - } - - /// - /// Submit merge job for processing Submit merge job run. - /// - /// Thrown when fails to make API call - /// The merge- and output settings - /// ApiResponse of MergeJobResponse - public ApiResponse< MergeJobResponse > SubmitJobWithHttpInfo (MergeSettings mergesettings) - { - // verify the required parameter 'mergesettings' is set - if (mergesettings == null) - throw new ApiException(400, "Missing required parameter 'mergesettings' when calling JobApi->SubmitJob"); - - var localVarPath = "/template/processor/0.1/jobs"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (mergesettings != null && mergesettings.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(mergesettings); // http body (model) parameter - } - else - { - localVarPostBody = mergesettings; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("SubmitJob", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (MergeJobResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(MergeJobResponse))); - } - - /// - /// Submit merge job for processing Submit merge job run. - /// - /// Thrown when fails to make API call - /// The merge- and output settings - /// Task of MergeJobResponse - public async System.Threading.Tasks.Task SubmitJobAsync (MergeSettings mergesettings) - { - ApiResponse localVarResponse = await SubmitJobAsyncWithHttpInfo(mergesettings); - return localVarResponse.Data; - - } - - /// - /// Submit merge job for processing Submit merge job run. - /// - /// Thrown when fails to make API call - /// The merge- and output settings - /// Task of ApiResponse (MergeJobResponse) - public async System.Threading.Tasks.Task> SubmitJobAsyncWithHttpInfo (MergeSettings mergesettings) - { - // verify the required parameter 'mergesettings' is set - if (mergesettings == null) - throw new ApiException(400, "Missing required parameter 'mergesettings' when calling JobApi->SubmitJob"); - - var localVarPath = "/template/processor/0.1/jobs"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (mergesettings != null && mergesettings.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(mergesettings); // http body (model) parameter - } - else - { - localVarPostBody = mergesettings; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("SubmitJob", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (MergeJobResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(MergeJobResponse))); - } - - } -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Api/TemplateApi.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Api/TemplateApi.cs deleted file mode 100644 index 0a08c89..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Api/TemplateApi.cs +++ /dev/null @@ -1,1131 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; -using Sphereon.SDK.TemplateProcessor.Client; -using Sphereon.SDK.TemplateProcessor.Model; - -namespace Sphereon.SDK.TemplateProcessor.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface ITemplateApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Create template context - /// - /// - /// Create a unique template context for your environment - /// - /// Thrown when fails to make API call - /// The template request - /// TemplateContextResponse - TemplateContextResponse CreateTemplateContext (TemplateContextRequest templateRequest); - - /// - /// Create template context - /// - /// - /// Create a unique template context for your environment - /// - /// Thrown when fails to make API call - /// The template request - /// ApiResponse of TemplateContextResponse - ApiResponse CreateTemplateContextWithHttpInfo (TemplateContextRequest templateRequest); - /// - /// Delete template context - /// - /// - /// Delete a template context with all history - /// - /// Thrown when fails to make API call - /// templateId - /// TemplateContextResponse - TemplateContextResponse DeleteTemplateContext (string templateId); - - /// - /// Delete template context - /// - /// - /// Delete a template context with all history - /// - /// Thrown when fails to make API call - /// templateId - /// ApiResponse of TemplateContextResponse - ApiResponse DeleteTemplateContextWithHttpInfo (string templateId); - /// - /// Get template context - /// - /// - /// Get an existing template context - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// TemplateContextResponse - TemplateContextResponse GetTemplateContext (string templateId); - - /// - /// Get template context - /// - /// - /// Get an existing template context - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// ApiResponse of TemplateContextResponse - ApiResponse GetTemplateContextWithHttpInfo (string templateId); - /// - /// Update template context - /// - /// - /// Update an existing template context for your environment - /// - /// Thrown when fails to make API call - /// templateContext - /// TemplateContextResponse - TemplateContextResponse UpdateTemplateContext (TemplateContext templateContext); - - /// - /// Update template context - /// - /// - /// Update an existing template context for your environment - /// - /// Thrown when fails to make API call - /// templateContext - /// ApiResponse of TemplateContextResponse - ApiResponse UpdateTemplateContextWithHttpInfo (TemplateContext templateContext); - /// - /// Upload template file - /// - /// - /// Upload the Office template file - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// The template (file/inputstream) to store - /// TemplateContextResponse - TemplateContextResponse UploadTemplateFile (string templateId, System.IO.Stream stream); - - /// - /// Upload template file - /// - /// - /// Upload the Office template file - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// The template (file/inputstream) to store - /// ApiResponse of TemplateContextResponse - ApiResponse UploadTemplateFileWithHttpInfo (string templateId, System.IO.Stream stream); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Create template context - /// - /// - /// Create a unique template context for your environment - /// - /// Thrown when fails to make API call - /// The template request - /// Task of TemplateContextResponse - System.Threading.Tasks.Task CreateTemplateContextAsync (TemplateContextRequest templateRequest); - - /// - /// Create template context - /// - /// - /// Create a unique template context for your environment - /// - /// Thrown when fails to make API call - /// The template request - /// Task of ApiResponse (TemplateContextResponse) - System.Threading.Tasks.Task> CreateTemplateContextAsyncWithHttpInfo (TemplateContextRequest templateRequest); - /// - /// Delete template context - /// - /// - /// Delete a template context with all history - /// - /// Thrown when fails to make API call - /// templateId - /// Task of TemplateContextResponse - System.Threading.Tasks.Task DeleteTemplateContextAsync (string templateId); - - /// - /// Delete template context - /// - /// - /// Delete a template context with all history - /// - /// Thrown when fails to make API call - /// templateId - /// Task of ApiResponse (TemplateContextResponse) - System.Threading.Tasks.Task> DeleteTemplateContextAsyncWithHttpInfo (string templateId); - /// - /// Get template context - /// - /// - /// Get an existing template context - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// Task of TemplateContextResponse - System.Threading.Tasks.Task GetTemplateContextAsync (string templateId); - - /// - /// Get template context - /// - /// - /// Get an existing template context - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// Task of ApiResponse (TemplateContextResponse) - System.Threading.Tasks.Task> GetTemplateContextAsyncWithHttpInfo (string templateId); - /// - /// Update template context - /// - /// - /// Update an existing template context for your environment - /// - /// Thrown when fails to make API call - /// templateContext - /// Task of TemplateContextResponse - System.Threading.Tasks.Task UpdateTemplateContextAsync (TemplateContext templateContext); - - /// - /// Update template context - /// - /// - /// Update an existing template context for your environment - /// - /// Thrown when fails to make API call - /// templateContext - /// Task of ApiResponse (TemplateContextResponse) - System.Threading.Tasks.Task> UpdateTemplateContextAsyncWithHttpInfo (TemplateContext templateContext); - /// - /// Upload template file - /// - /// - /// Upload the Office template file - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// The template (file/inputstream) to store - /// Task of TemplateContextResponse - System.Threading.Tasks.Task UploadTemplateFileAsync (string templateId, System.IO.Stream stream); - - /// - /// Upload template file - /// - /// - /// Upload the Office template file - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// The template (file/inputstream) to store - /// Task of ApiResponse (TemplateContextResponse) - System.Threading.Tasks.Task> UploadTemplateFileAsyncWithHttpInfo (string templateId, System.IO.Stream stream); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class TemplateApi : ITemplateApi - { - private Sphereon.SDK.TemplateProcessor.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public TemplateApi(String basePath) - { - this.Configuration = new Configuration(new ApiClient(basePath)); - - ExceptionFactory = Sphereon.SDK.TemplateProcessor.Client.Configuration.DefaultExceptionFactory; - - // ensure API client has configuration ready - if (Configuration.ApiClient.Configuration == null) - { - this.Configuration.ApiClient.Configuration = this.Configuration; - } - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public TemplateApi(Configuration configuration = null) - { - if (configuration == null) // use the default one in Configuration - this.Configuration = Configuration.Default; - else - this.Configuration = configuration; - - ExceptionFactory = Sphereon.SDK.TemplateProcessor.Client.Configuration.DefaultExceptionFactory; - - // ensure API client has configuration ready - if (Configuration.ApiClient.Configuration == null) - { - this.Configuration.ApiClient.Configuration = this.Configuration; - } - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public Sphereon.SDK.TemplateProcessor.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public Dictionary DefaultHeader() - { - return this.Configuration.DefaultHeader; - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Create template context Create a unique template context for your environment - /// - /// Thrown when fails to make API call - /// The template request - /// TemplateContextResponse - public TemplateContextResponse CreateTemplateContext (TemplateContextRequest templateRequest) - { - ApiResponse localVarResponse = CreateTemplateContextWithHttpInfo(templateRequest); - return localVarResponse.Data; - } - - /// - /// Create template context Create a unique template context for your environment - /// - /// Thrown when fails to make API call - /// The template request - /// ApiResponse of TemplateContextResponse - public ApiResponse< TemplateContextResponse > CreateTemplateContextWithHttpInfo (TemplateContextRequest templateRequest) - { - // verify the required parameter 'templateRequest' is set - if (templateRequest == null) - throw new ApiException(400, "Missing required parameter 'templateRequest' when calling TemplateApi->CreateTemplateContext"); - - var localVarPath = "/template/processor/0.1/templates"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateRequest != null && templateRequest.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(templateRequest); // http body (model) parameter - } - else - { - localVarPostBody = templateRequest; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateTemplateContext", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Create template context Create a unique template context for your environment - /// - /// Thrown when fails to make API call - /// The template request - /// Task of TemplateContextResponse - public async System.Threading.Tasks.Task CreateTemplateContextAsync (TemplateContextRequest templateRequest) - { - ApiResponse localVarResponse = await CreateTemplateContextAsyncWithHttpInfo(templateRequest); - return localVarResponse.Data; - - } - - /// - /// Create template context Create a unique template context for your environment - /// - /// Thrown when fails to make API call - /// The template request - /// Task of ApiResponse (TemplateContextResponse) - public async System.Threading.Tasks.Task> CreateTemplateContextAsyncWithHttpInfo (TemplateContextRequest templateRequest) - { - // verify the required parameter 'templateRequest' is set - if (templateRequest == null) - throw new ApiException(400, "Missing required parameter 'templateRequest' when calling TemplateApi->CreateTemplateContext"); - - var localVarPath = "/template/processor/0.1/templates"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateRequest != null && templateRequest.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(templateRequest); // http body (model) parameter - } - else - { - localVarPostBody = templateRequest; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateTemplateContext", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Delete template context Delete a template context with all history - /// - /// Thrown when fails to make API call - /// templateId - /// TemplateContextResponse - public TemplateContextResponse DeleteTemplateContext (string templateId) - { - ApiResponse localVarResponse = DeleteTemplateContextWithHttpInfo(templateId); - return localVarResponse.Data; - } - - /// - /// Delete template context Delete a template context with all history - /// - /// Thrown when fails to make API call - /// templateId - /// ApiResponse of TemplateContextResponse - public ApiResponse< TemplateContextResponse > DeleteTemplateContextWithHttpInfo (string templateId) - { - // verify the required parameter 'templateId' is set - if (templateId == null) - throw new ApiException(400, "Missing required parameter 'templateId' when calling TemplateApi->DeleteTemplateContext"); - - var localVarPath = "/template/processor/0.1/templates/{templateId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteTemplateContext", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Delete template context Delete a template context with all history - /// - /// Thrown when fails to make API call - /// templateId - /// Task of TemplateContextResponse - public async System.Threading.Tasks.Task DeleteTemplateContextAsync (string templateId) - { - ApiResponse localVarResponse = await DeleteTemplateContextAsyncWithHttpInfo(templateId); - return localVarResponse.Data; - - } - - /// - /// Delete template context Delete a template context with all history - /// - /// Thrown when fails to make API call - /// templateId - /// Task of ApiResponse (TemplateContextResponse) - public async System.Threading.Tasks.Task> DeleteTemplateContextAsyncWithHttpInfo (string templateId) - { - // verify the required parameter 'templateId' is set - if (templateId == null) - throw new ApiException(400, "Missing required parameter 'templateId' when calling TemplateApi->DeleteTemplateContext"); - - var localVarPath = "/template/processor/0.1/templates/{templateId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteTemplateContext", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Get template context Get an existing template context - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// TemplateContextResponse - public TemplateContextResponse GetTemplateContext (string templateId) - { - ApiResponse localVarResponse = GetTemplateContextWithHttpInfo(templateId); - return localVarResponse.Data; - } - - /// - /// Get template context Get an existing template context - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// ApiResponse of TemplateContextResponse - public ApiResponse< TemplateContextResponse > GetTemplateContextWithHttpInfo (string templateId) - { - // verify the required parameter 'templateId' is set - if (templateId == null) - throw new ApiException(400, "Missing required parameter 'templateId' when calling TemplateApi->GetTemplateContext"); - - var localVarPath = "/template/processor/0.1/templates/{templateId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetTemplateContext", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Get template context Get an existing template context - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// Task of TemplateContextResponse - public async System.Threading.Tasks.Task GetTemplateContextAsync (string templateId) - { - ApiResponse localVarResponse = await GetTemplateContextAsyncWithHttpInfo(templateId); - return localVarResponse.Data; - - } - - /// - /// Get template context Get an existing template context - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// Task of ApiResponse (TemplateContextResponse) - public async System.Threading.Tasks.Task> GetTemplateContextAsyncWithHttpInfo (string templateId) - { - // verify the required parameter 'templateId' is set - if (templateId == null) - throw new ApiException(400, "Missing required parameter 'templateId' when calling TemplateApi->GetTemplateContext"); - - var localVarPath = "/template/processor/0.1/templates/{templateId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetTemplateContext", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Update template context Update an existing template context for your environment - /// - /// Thrown when fails to make API call - /// templateContext - /// TemplateContextResponse - public TemplateContextResponse UpdateTemplateContext (TemplateContext templateContext) - { - ApiResponse localVarResponse = UpdateTemplateContextWithHttpInfo(templateContext); - return localVarResponse.Data; - } - - /// - /// Update template context Update an existing template context for your environment - /// - /// Thrown when fails to make API call - /// templateContext - /// ApiResponse of TemplateContextResponse - public ApiResponse< TemplateContextResponse > UpdateTemplateContextWithHttpInfo (TemplateContext templateContext) - { - // verify the required parameter 'templateContext' is set - if (templateContext == null) - throw new ApiException(400, "Missing required parameter 'templateContext' when calling TemplateApi->UpdateTemplateContext"); - - var localVarPath = "/template/processor/0.1/templates"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateContext != null && templateContext.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(templateContext); // http body (model) parameter - } - else - { - localVarPostBody = templateContext; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdateTemplateContext", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Update template context Update an existing template context for your environment - /// - /// Thrown when fails to make API call - /// templateContext - /// Task of TemplateContextResponse - public async System.Threading.Tasks.Task UpdateTemplateContextAsync (TemplateContext templateContext) - { - ApiResponse localVarResponse = await UpdateTemplateContextAsyncWithHttpInfo(templateContext); - return localVarResponse.Data; - - } - - /// - /// Update template context Update an existing template context for your environment - /// - /// Thrown when fails to make API call - /// templateContext - /// Task of ApiResponse (TemplateContextResponse) - public async System.Threading.Tasks.Task> UpdateTemplateContextAsyncWithHttpInfo (TemplateContext templateContext) - { - // verify the required parameter 'templateContext' is set - if (templateContext == null) - throw new ApiException(400, "Missing required parameter 'templateContext' when calling TemplateApi->UpdateTemplateContext"); - - var localVarPath = "/template/processor/0.1/templates"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateContext != null && templateContext.GetType() != typeof(byte[])) - { - localVarPostBody = Configuration.ApiClient.Serialize(templateContext); // http body (model) parameter - } - else - { - localVarPostBody = templateContext; // byte array - } - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdateTemplateContext", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Upload template file Upload the Office template file - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// The template (file/inputstream) to store - /// TemplateContextResponse - public TemplateContextResponse UploadTemplateFile (string templateId, System.IO.Stream stream) - { - ApiResponse localVarResponse = UploadTemplateFileWithHttpInfo(templateId, stream); - return localVarResponse.Data; - } - - /// - /// Upload template file Upload the Office template file - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// The template (file/inputstream) to store - /// ApiResponse of TemplateContextResponse - public ApiResponse< TemplateContextResponse > UploadTemplateFileWithHttpInfo (string templateId, System.IO.Stream stream) - { - // verify the required parameter 'templateId' is set - if (templateId == null) - throw new ApiException(400, "Missing required parameter 'templateId' when calling TemplateApi->UploadTemplateFile"); - // verify the required parameter 'stream' is set - if (stream == null) - throw new ApiException(400, "Missing required parameter 'stream' when calling TemplateApi->UploadTemplateFile"); - - var localVarPath = "/template/processor/0.1/templates/{templateId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter - if (stream != null) localVarFileParams.Add("stream", Configuration.ApiClient.ParameterToFile("stream", stream)); - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadTemplateFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - /// - /// Upload template file Upload the Office template file - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// The template (file/inputstream) to store - /// Task of TemplateContextResponse - public async System.Threading.Tasks.Task UploadTemplateFileAsync (string templateId, System.IO.Stream stream) - { - ApiResponse localVarResponse = await UploadTemplateFileAsyncWithHttpInfo(templateId, stream); - return localVarResponse.Data; - - } - - /// - /// Upload template file Upload the Office template file - /// - /// Thrown when fails to make API call - /// The template context name unique for your environment - /// The template (file/inputstream) to store - /// Task of ApiResponse (TemplateContextResponse) - public async System.Threading.Tasks.Task> UploadTemplateFileAsyncWithHttpInfo (string templateId, System.IO.Stream stream) - { - // verify the required parameter 'templateId' is set - if (templateId == null) - throw new ApiException(400, "Missing required parameter 'templateId' when calling TemplateApi->UploadTemplateFile"); - // verify the required parameter 'stream' is set - if (stream == null) - throw new ApiException(400, "Missing required parameter 'stream' when calling TemplateApi->UploadTemplateFile"); - - var localVarPath = "/template/processor/0.1/templates/{templateId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new Dictionary(); - var localVarHeaderParams = new Dictionary(Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json;charset=UTF-8" - }; - String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (templateId != null) localVarPathParams.Add("templateId", Configuration.ApiClient.ParameterToString(templateId)); // path parameter - if (stream != null) localVarFileParams.Add("stream", Configuration.ApiClient.ParameterToFile("stream", stream)); - - // authentication (oauth2schema) required - // oauth required - if (!String.IsNullOrEmpty(Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadTemplateFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (TemplateContextResponse) Configuration.ApiClient.Deserialize(localVarResponse, typeof(TemplateContextResponse))); - } - - } -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ApiClient.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ApiClient.cs deleted file mode 100644 index 40e15cc..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ApiClient.cs +++ /dev/null @@ -1,482 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Text.RegularExpressions; -using System.IO; -using System.Web; -using System.Linq; -using System.Net; -using System.Text; -using Newtonsoft.Json; -using RestSharp; - -namespace Sphereon.SDK.TemplateProcessor.Client -{ - /// - /// API client is mainly responsible for making the HTTP call to the API backend. - /// - public partial class ApiClient - { - private JsonSerializerSettings serializerSettings = new JsonSerializerSettings - { - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor - }; - - /// - /// Allows for extending request processing for generated code. - /// - /// The RestSharp request object - partial void InterceptRequest(IRestRequest request); - - /// - /// Allows for extending response processing for generated code. - /// - /// The RestSharp request object - /// The RestSharp response object - partial void InterceptResponse(IRestRequest request, IRestResponse response); - - /// - /// Initializes a new instance of the class - /// with default configuration and base path (https://gw.api.cloud.sphereon.com). - /// - public ApiClient() - { - Configuration = Configuration.Default; - RestClient = new RestClient("https://gw.api.cloud.sphereon.com"); - } - - /// - /// Initializes a new instance of the class - /// with default base path (https://gw.api.cloud.sphereon.com). - /// - /// An instance of Configuration. - public ApiClient(Configuration config = null) - { - if (config == null) - Configuration = Configuration.Default; - else - Configuration = config; - - RestClient = new RestClient("https://gw.api.cloud.sphereon.com"); - } - - /// - /// Initializes a new instance of the class - /// with default configuration. - /// - /// The base path. - public ApiClient(String basePath = "https://gw.api.cloud.sphereon.com") - { - if (String.IsNullOrEmpty(basePath)) - throw new ArgumentException("basePath cannot be empty"); - - RestClient = new RestClient(basePath); - Configuration = Configuration.Default; - } - - /// - /// Gets or sets the default API client for making HTTP calls. - /// - /// The default API client. - [Obsolete("ApiClient.Default is deprecated, please use 'Configuration.Default.ApiClient' instead.")] - public static ApiClient Default; - - /// - /// Gets or sets the Configuration. - /// - /// An instance of the Configuration. - public Configuration Configuration { get; set; } - - /// - /// Gets or sets the RestClient. - /// - /// An instance of the RestClient - public RestClient RestClient { get; set; } - - // Creates and sets up a RestRequest prior to a call. - private RestRequest PrepareRequest( - String path, RestSharp.Method method, Dictionary queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = new RestRequest(path, method); - - // add path parameter, if any - foreach(var param in pathParams) - request.AddParameter(param.Key, param.Value, ParameterType.UrlSegment); - - // add header parameter, if any - foreach(var param in headerParams) - request.AddHeader(param.Key, param.Value); - - // add query parameter, if any - foreach(var param in queryParams) - request.AddQueryParameter(param.Key, param.Value); - - // add form parameter, if any - foreach(var param in formParams) - request.AddParameter(param.Key, param.Value); - - // add file parameter, if any - foreach(var param in fileParams) - { - request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentType); - } - - if (postBody != null) // http body (model or byte[]) parameter - { - if (postBody.GetType() == typeof(String)) - { - request.AddParameter("application/json", postBody, ParameterType.RequestBody); - } - else if (postBody.GetType() == typeof(byte[])) - { - request.AddParameter(contentType, postBody, ParameterType.RequestBody); - } - } - - return request; - } - - /// - /// Makes the HTTP request (Sync). - /// - /// URL path. - /// HTTP method. - /// Query parameters. - /// HTTP body (POST request). - /// Header parameters. - /// Form parameters. - /// File parameters. - /// Path parameters. - /// Content Type of the request - /// Object - public Object CallApi( - String path, RestSharp.Method method, Dictionary queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = PrepareRequest( - path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); - - // set timeout - RestClient.Timeout = Configuration.Timeout; - // set user agent - RestClient.UserAgent = Configuration.UserAgent; - - InterceptRequest(request); - var response = RestClient.Execute(request); - InterceptResponse(request, response); - - return (Object) response; - } - /// - /// Makes the asynchronous HTTP request. - /// - /// URL path. - /// HTTP method. - /// Query parameters. - /// HTTP body (POST request). - /// Header parameters. - /// Form parameters. - /// File parameters. - /// Path parameters. - /// Content type. - /// The Task instance. - public async System.Threading.Tasks.Task CallApiAsync( - String path, RestSharp.Method method, Dictionary queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = PrepareRequest( - path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); - InterceptRequest(request); - var response = await RestClient.ExecuteTaskAsync(request); - InterceptResponse(request, response); - return (Object)response; - } - - /// - /// Escape string (url-encoded). - /// - /// String to be escaped. - /// Escaped string. - public string EscapeString(string str) - { - return UrlEncode(str); - } - - /// - /// Create FileParameter based on Stream. - /// - /// Parameter name. - /// Input stream. - /// FileParameter. - public FileParameter ParameterToFile(string name, Stream stream) - { - if (stream is FileStream) - return FileParameter.Create(name, ReadAsBytes(stream), Path.GetFileName(((FileStream)stream).Name)); - else - return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided"); - } - - /// - /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. - /// If parameter is a list, join the list with ",". - /// Otherwise just return the string. - /// - /// The parameter (header, path, query, form). - /// Formatted string. - public string ParameterToString(object obj) - { - if (obj is DateTime) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return ((DateTime)obj).ToString (Configuration.DateTimeFormat); - else if (obj is DateTimeOffset) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); - else if (obj is IList) - { - var flattenedString = new StringBuilder(); - foreach (var param in (IList)obj) - { - if (flattenedString.Length > 0) - flattenedString.Append(","); - flattenedString.Append(param); - } - return flattenedString.ToString(); - } - else - return Convert.ToString (obj); - } - - /// - /// Deserialize the JSON string into a proper object. - /// - /// The HTTP response. - /// Object type. - /// Object representation of the JSON string. - public object Deserialize(IRestResponse response, Type type) - { - IList headers = response.Headers; - if (type == typeof(byte[])) // return byte array - { - return response.RawBytes; - } - - if (type == typeof(Stream)) - { - if (headers != null) - { - var filePath = String.IsNullOrEmpty(Configuration.TempFolderPath) - ? Path.GetTempPath() - : Configuration.TempFolderPath; - var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); - foreach (var header in headers) - { - var match = regex.Match(header.ToString()); - if (match.Success) - { - string fileName = filePath + SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - File.WriteAllBytes(fileName, response.RawBytes); - return new FileStream(fileName, FileMode.Open); - } - } - } - var stream = new MemoryStream(response.RawBytes); - return stream; - } - - if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object - { - return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); - } - - if (type == typeof(String) || type.Name.StartsWith("System.Nullable")) // return primitive type - { - return ConvertType(response.Content, type); - } - - // at this point, it must be a model (json) - try - { - return JsonConvert.DeserializeObject(response.Content, type, serializerSettings); - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - /// - /// Serialize an input (model) into JSON string - /// - /// Object. - /// JSON string. - public String Serialize(object obj) - { - try - { - return obj != null ? JsonConvert.SerializeObject(obj) : null; - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - /// - /// Select the Content-Type header's value from the given content-type array: - /// if JSON exists in the given array, use it; - /// otherwise use the first one defined in 'consumes' - /// - /// The Content-Type array to select from. - /// The Content-Type header to use. - public String SelectHeaderContentType(String[] contentTypes) - { - if (contentTypes.Length == 0) - return null; - - if (contentTypes.Contains("application/json", StringComparer.OrdinalIgnoreCase)) - return "application/json"; - - return contentTypes[0]; // use the first content type specified in 'consumes' - } - - /// - /// Select the Accept header's value from the given accepts array: - /// if JSON exists in the given array, use it; - /// otherwise use all of them (joining into a string) - /// - /// The accepts array to select from. - /// The Accept header to use. - public String SelectHeaderAccept(String[] accepts) - { - if (accepts.Length == 0) - return null; - - if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) - return "application/json"; - - return String.Join(",", accepts); - } - - /// - /// Encode string in base64 format. - /// - /// String to be encoded. - /// Encoded string. - public static string Base64Encode(string text) - { - return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); - } - - /// - /// Dynamically cast the object into target type. - /// Ref: http://stackoverflow.com/questions/4925718/c-dynamic-runtime-cast - /// - /// Object to be casted - /// Target type - /// Casted object - public static dynamic ConvertType(dynamic source, Type dest) - { - return Convert.ChangeType(source, dest); - } - - /// - /// Convert stream to byte array - /// Credit/Ref: http://stackoverflow.com/a/221941/677735 - /// - /// Input stream to be converted - /// Byte array - public static byte[] ReadAsBytes(Stream input) - { - byte[] buffer = new byte[16*1024]; - using (MemoryStream ms = new MemoryStream()) - { - int read; - while ((read = input.Read(buffer, 0, buffer.Length)) > 0) - { - ms.Write(buffer, 0, read); - } - return ms.ToArray(); - } - } - - /// - /// URL encode a string - /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 - /// - /// String to be URL encoded - /// Byte array - public static string UrlEncode(string input) - { - const int maxLength = 32766; - - if (input == null) - { - throw new ArgumentNullException("input"); - } - - if (input.Length <= maxLength) - { - return Uri.EscapeDataString(input); - } - - StringBuilder sb = new StringBuilder(input.Length * 2); - int index = 0; - - while (index < input.Length) - { - int length = Math.Min(input.Length - index, maxLength); - string subString = input.Substring(index, length); - - sb.Append(Uri.EscapeDataString(subString)); - index += subString.Length; - } - - return sb.ToString(); - } - - /// - /// Sanitize filename by removing the path - /// - /// Filename - /// Filename - public static string SanitizeFilename(string filename) - { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); - - if (match.Success) - { - return match.Groups[1].Value; - } - else - { - return filename; - } - } - } -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ApiException.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ApiException.cs deleted file mode 100644 index c0f0154..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ApiException.cs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; - -namespace Sphereon.SDK.TemplateProcessor.Client -{ - /// - /// API Exception - /// - public class ApiException : Exception - { - /// - /// Gets or sets the error code (HTTP status code) - /// - /// The error code (HTTP status code). - public int ErrorCode { get; set; } - - /// - /// Gets or sets the error content (body json object) - /// - /// The error content (Http response body). - public dynamic ErrorContent { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - public ApiException() {} - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - public ApiException(int errorCode, string message) : base(message) - { - this.ErrorCode = errorCode; - } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - /// Error content. - public ApiException(int errorCode, string message, dynamic errorContent = null) : base(message) - { - this.ErrorCode = errorCode; - this.ErrorContent = errorContent; - } - } - -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ApiResponse.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ApiResponse.cs deleted file mode 100644 index 1403939..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ApiResponse.cs +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Collections.Generic; - -namespace Sphereon.SDK.TemplateProcessor.Client -{ - /// - /// API Response - /// - public class ApiResponse - { - /// - /// Gets or sets the status code (HTTP status code) - /// - /// The status code. - public int StatusCode { get; private set; } - - /// - /// Gets or sets the HTTP headers - /// - /// HTTP headers - public IDictionary Headers { get; private set; } - - /// - /// Gets or sets the data (parsed HTTP body) - /// - /// The data. - public T Data { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// HTTP headers. - /// Data (parsed HTTP body) - public ApiResponse(int statusCode, IDictionary headers, T data) - { - this.StatusCode= statusCode; - this.Headers = headers; - this.Data = data; - } - - } - -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/Configuration.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/Configuration.cs deleted file mode 100644 index bb507d8..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/Configuration.cs +++ /dev/null @@ -1,334 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Reflection; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; - -namespace Sphereon.SDK.TemplateProcessor.Client -{ - /// - /// Represents a set of configuration settings - /// - public class Configuration - { - /// - /// Initializes a new instance of the Configuration class with different settings - /// - /// Api client - /// Dictionary of default HTTP header - /// Username - /// Password - /// accessToken - /// Dictionary of API key - /// Dictionary of API key prefix - /// Temp folder path - /// DateTime format string - /// HTTP connection timeout (in milliseconds) - /// HTTP user agent - public Configuration(ApiClient apiClient = null, - Dictionary defaultHeader = null, - string username = null, - string password = null, - string accessToken = null, - Dictionary apiKey = null, - Dictionary apiKeyPrefix = null, - string tempFolderPath = null, - string dateTimeFormat = null, - int timeout = 100000, - string userAgent = "Swagger-Codegen/1.0.0/csharp" - ) - { - setApiClientUsingDefault(apiClient); - - Username = username; - Password = password; - AccessToken = accessToken; - UserAgent = userAgent; - - if (defaultHeader != null) - DefaultHeader = defaultHeader; - if (apiKey != null) - ApiKey = apiKey; - if (apiKeyPrefix != null) - ApiKeyPrefix = apiKeyPrefix; - - TempFolderPath = tempFolderPath; - DateTimeFormat = dateTimeFormat; - Timeout = timeout; - } - - /// - /// Initializes a new instance of the Configuration class. - /// - /// Api client. - public Configuration(ApiClient apiClient) - { - setApiClientUsingDefault(apiClient); - } - - /// - /// Version of the package. - /// - /// Version of the package. - public const string Version = "1.0.0"; - - /// - /// Gets or sets the default Configuration. - /// - /// Configuration. - public static Configuration Default = new Configuration(); - - /// - /// Default creation of exceptions for a given method name and response object - /// - public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) => - { - int status = (int) response.StatusCode; - if (status >= 400) return new ApiException(status, String.Format("Error calling {0}: {1}", methodName, response.Content), response.Content); - if (status == 0) return new ApiException(status, String.Format("Error calling {0}: {1}", methodName, response.ErrorMessage), response.ErrorMessage); - return null; - }; - - /// - /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. - /// - /// Timeout. - public int Timeout - { - get { return ApiClient.RestClient.Timeout; } - - set - { - if (ApiClient != null) - ApiClient.RestClient.Timeout = value; - } - } - - /// - /// Gets or sets the default API client for making HTTP calls. - /// - /// The API client. - public ApiClient ApiClient; - - /// - /// Set the ApiClient using Default or ApiClient instance. - /// - /// An instance of ApiClient. - /// - public void setApiClientUsingDefault (ApiClient apiClient = null) - { - if (apiClient == null) - { - if (Default != null && Default.ApiClient == null) - Default.ApiClient = new ApiClient(); - - ApiClient = Default != null ? Default.ApiClient : new ApiClient(); - } - else - { - if (Default != null && Default.ApiClient == null) - Default.ApiClient = apiClient; - - ApiClient = apiClient; - } - } - - private Dictionary _defaultHeaderMap = new Dictionary(); - - /// - /// Gets or sets the default header. - /// - public Dictionary DefaultHeader - { - get { return _defaultHeaderMap; } - - set - { - _defaultHeaderMap = value; - } - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - public void AddDefaultHeader(string key, string value) - { - _defaultHeaderMap[key] = value; - } - - /// - /// Add Api Key Header. - /// - /// Api Key name. - /// Api Key value. - /// - public void AddApiKey(string key, string value) - { - ApiKey[key] = value; - } - - /// - /// Sets the API key prefix. - /// - /// Api Key name. - /// Api Key value. - public void AddApiKeyPrefix(string key, string value) - { - ApiKeyPrefix[key] = value; - } - - /// - /// Gets or sets the HTTP user agent. - /// - /// Http user agent. - public String UserAgent { get; set; } - - /// - /// Gets or sets the username (HTTP basic authentication). - /// - /// The username. - public String Username { get; set; } - - /// - /// Gets or sets the password (HTTP basic authentication). - /// - /// The password. - public String Password { get; set; } - - /// - /// Gets or sets the access token for OAuth2 authentication. - /// - /// The access token. - public String AccessToken { get; set; } - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - public Dictionary ApiKey = new Dictionary(); - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - public Dictionary ApiKeyPrefix = new Dictionary(); - - /// - /// Get the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - public string GetApiKeyWithPrefix (string apiKeyIdentifier) - { - var apiKeyValue = ""; - ApiKey.TryGetValue (apiKeyIdentifier, out apiKeyValue); - var apiKeyPrefix = ""; - if (ApiKeyPrefix.TryGetValue (apiKeyIdentifier, out apiKeyPrefix)) - return apiKeyPrefix + " " + apiKeyValue; - else - return apiKeyValue; - } - - private string _tempFolderPath; - - /// - /// Gets or sets the temporary folder path to store the files downloaded from the server. - /// - /// Folder path. - public String TempFolderPath - { - get - { - // default to Path.GetTempPath() if _tempFolderPath is not set - if (String.IsNullOrEmpty(_tempFolderPath)) - { - _tempFolderPath = Path.GetTempPath(); - } - return _tempFolderPath; - } - - set - { - if (String.IsNullOrEmpty(value)) - { - _tempFolderPath = value; - return; - } - - // create the directory if it does not exist - if (!Directory.Exists(value)) - Directory.CreateDirectory(value); - - // check if the path contains directory separator at the end - if (value[value.Length - 1] == Path.DirectorySeparatorChar) - _tempFolderPath = value; - else - _tempFolderPath = value + Path.DirectorySeparatorChar; - } - } - - private const string ISO8601_DATETIME_FORMAT = "o"; - - private string _dateTimeFormat = ISO8601_DATETIME_FORMAT; - - /// - /// Gets or sets the the date time format used when serializing in the ApiClient - /// By default, it's set to ISO 8601 - "o", for others see: - /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx - /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx - /// No validation is done to ensure that the string you're providing is valid - /// - /// The DateTimeFormat string - public String DateTimeFormat - { - get - { - return _dateTimeFormat; - } - set - { - if (string.IsNullOrEmpty(value)) - { - // Never allow a blank or null string, go back to the default - _dateTimeFormat = ISO8601_DATETIME_FORMAT; - return; - } - - // Caution, no validation when you choose date time format other than ISO 8601 - // Take a look at the above links - _dateTimeFormat = value; - } - } - - /// - /// Returns a string with essential information for debugging. - /// - public static String ToDebugReport() - { - String report = "C# SDK (Sphereon.SDK.TemplateProcessor) Debug Report:\n"; - report += " OS: " + Environment.OSVersion + "\n"; - report += " .NET Framework Version: " + Assembly - .GetExecutingAssembly() - .GetReferencedAssemblies() - .Where(x => x.Name == "System.Core").First().Version.ToString() + "\n"; - report += " Version of the API: 0.1\n"; - report += " SDK Package Version: 1.0.0\n"; - - return report; - } - } -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ExceptionFactory.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ExceptionFactory.cs deleted file mode 100644 index 878daf1..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/ExceptionFactory.cs +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - - -using System; -using RestSharp; - -namespace Sphereon.SDK.TemplateProcessor.Client -{ - /// - /// A delegate to ExceptionFactory method - /// - /// Method name - /// Response - /// Exceptions - public delegate Exception ExceptionFactory(string methodName, IRestResponse response); -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/IApiAccessor.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/IApiAccessor.cs deleted file mode 100644 index 80c70df..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/IApiAccessor.cs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; - -namespace Sphereon.SDK.TemplateProcessor.Client -{ - /// - /// Represents configuration aspects required to interact with the API endpoints. - /// - public interface IApiAccessor - { - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - Configuration Configuration {get; set;} - - /// - /// Gets the base path of the API client. - /// - /// The base path - String GetBasePath(); - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - ExceptionFactory ExceptionFactory { get; set; } - } -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/SwaggerDateConverter.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/SwaggerDateConverter.cs deleted file mode 100644 index dfbba59..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Client/SwaggerDateConverter.cs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using Newtonsoft.Json.Converters; - -namespace Sphereon.SDK.TemplateProcessor.Client -{ - /// - /// Formatter for 'date' swagger formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types - /// - public class SwaggerDateConverter : IsoDateTimeConverter - { - /// - /// Initializes a new instance of the class. - /// - public SwaggerDateConverter() - { - // full-date = date-fullyear "-" date-month "-" date-mday - DateTimeFormat = "yyyy-MM-dd"; - } - } -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/DataSetResponse.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/DataSetResponse.cs deleted file mode 100644 index 867669f..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/DataSetResponse.cs +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// The merge template response. - /// - [DataContract] - public partial class DataSetResponse : IEquatable, IValidatableObject - { - /// - /// The status of the template - /// - /// The status of the template - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - - /// - /// Enum CREATED for "CREATED" - /// - [EnumMember(Value = "CREATED")] - CREATED, - - /// - /// Enum UPDATED for "UPDATED" - /// - [EnumMember(Value = "UPDATED")] - UPDATED, - - /// - /// Enum DELETED for "DELETED" - /// - [EnumMember(Value = "DELETED")] - DELETED - } - - /// - /// The status of the template - /// - /// The status of the template - [DataMember(Name="status", EmitDefaultValue=false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected DataSetResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// Unique dataset id (required). - public DataSetResponse(string Id = default(string)) - { - // to ensure "Id" is required (not null) - if (Id == null) - { - throw new InvalidDataException("Id is a required property for DataSetResponse and cannot be null"); - } - else - { - this.Id = Id; - } - } - - /// - /// The completion date/time of this template in ISO 8601 format - /// - /// The completion date/time of this template in ISO 8601 format - [DataMember(Name="completionTime", EmitDefaultValue=false)] - public DateTime? CompletionTime { get; private set; } - - /// - /// The creation date/time of this template in ISO 8601 format - /// - /// The creation date/time of this template in ISO 8601 format - [DataMember(Name="creationTime", EmitDefaultValue=false)] - public DateTime? CreationTime { get; private set; } - - /// - /// Unique dataset id - /// - /// Unique dataset id - [DataMember(Name="id", EmitDefaultValue=false)] - public string Id { get; set; } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class DataSetResponse {\n"); - sb.Append(" CompletionTime: ").Append(CompletionTime).Append("\n"); - sb.Append(" CreationTime: ").Append(CreationTime).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as DataSetResponse); - } - - /// - /// Returns true if DataSetResponse instances are equal - /// - /// Instance of DataSetResponse to be compared - /// Boolean - public bool Equals(DataSetResponse other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.CompletionTime == other.CompletionTime || - this.CompletionTime != null && - this.CompletionTime.Equals(other.CompletionTime) - ) && - ( - this.CreationTime == other.CreationTime || - this.CreationTime != null && - this.CreationTime.Equals(other.CreationTime) - ) && - ( - this.Id == other.Id || - this.Id != null && - this.Id.Equals(other.Id) - ) && - ( - this.Status == other.Status || - this.Status != null && - this.Status.Equals(other.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.CompletionTime != null) - hash = hash * 59 + this.CompletionTime.GetHashCode(); - if (this.CreationTime != null) - hash = hash * 59 + this.CreationTime.GetHashCode(); - if (this.Id != null) - hash = hash * 59 + this.Id.GetHashCode(); - if (this.Status != null) - hash = hash * 59 + this.Status.GetHashCode(); - return hash; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/Error.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/Error.cs deleted file mode 100644 index 8bd56a7..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/Error.cs +++ /dev/null @@ -1,231 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// An error - /// - [DataContract] - public partial class Error : IEquatable, IValidatableObject - { - /// - /// Gets or Sets Level - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum LevelEnum - { - - /// - /// Enum INFO for "INFO" - /// - [EnumMember(Value = "INFO")] - INFO, - - /// - /// Enum WARNING for "WARNING" - /// - [EnumMember(Value = "WARNING")] - WARNING, - - /// - /// Enum FATAL for "FATAL" - /// - [EnumMember(Value = "FATAL")] - FATAL - } - - /// - /// Gets or Sets Level - /// - [DataMember(Name="level", EmitDefaultValue=false)] - public LevelEnum? Level { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Error() { } - /// - /// Initializes a new instance of the class. - /// - /// Code (required). - /// Level (required). - /// Cause. - /// Message (required). - public Error(string Code = default(string), LevelEnum? Level = default(LevelEnum?), Error Cause = default(Error), string Message = default(string)) - { - // to ensure "Code" is required (not null) - if (Code == null) - { - throw new InvalidDataException("Code is a required property for Error and cannot be null"); - } - else - { - this.Code = Code; - } - // to ensure "Level" is required (not null) - if (Level == null) - { - throw new InvalidDataException("Level is a required property for Error and cannot be null"); - } - else - { - this.Level = Level; - } - // to ensure "Message" is required (not null) - if (Message == null) - { - throw new InvalidDataException("Message is a required property for Error and cannot be null"); - } - else - { - this.Message = Message; - } - this.Cause = Cause; - } - - /// - /// Gets or Sets Code - /// - [DataMember(Name="code", EmitDefaultValue=false)] - public string Code { get; set; } - - - /// - /// Gets or Sets Cause - /// - [DataMember(Name="cause", EmitDefaultValue=false)] - public Error Cause { get; set; } - - /// - /// Gets or Sets Message - /// - [DataMember(Name="message", EmitDefaultValue=false)] - public string Message { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Error {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Level: ").Append(Level).Append("\n"); - sb.Append(" Cause: ").Append(Cause).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as Error); - } - - /// - /// Returns true if Error instances are equal - /// - /// Instance of Error to be compared - /// Boolean - public bool Equals(Error other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.Code == other.Code || - this.Code != null && - this.Code.Equals(other.Code) - ) && - ( - this.Level == other.Level || - this.Level != null && - this.Level.Equals(other.Level) - ) && - ( - this.Cause == other.Cause || - this.Cause != null && - this.Cause.Equals(other.Cause) - ) && - ( - this.Message == other.Message || - this.Message != null && - this.Message.Equals(other.Message) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.Code != null) - hash = hash * 59 + this.Code.GetHashCode(); - if (this.Level != null) - hash = hash * 59 + this.Level.GetHashCode(); - if (this.Cause != null) - hash = hash * 59 + this.Cause.GetHashCode(); - if (this.Message != null) - hash = hash * 59 + this.Message.GetHashCode(); - return hash; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/ErrorResponse.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/ErrorResponse.cs deleted file mode 100644 index 319cf03..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/ErrorResponse.cs +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// The error response - /// - [DataContract] - public partial class ErrorResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Errors. - public ErrorResponse(List Errors = default(List)) - { - this.Errors = Errors; - } - - /// - /// Gets or Sets Errors - /// - [DataMember(Name="errors", EmitDefaultValue=false)] - public List Errors { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ErrorResponse {\n"); - sb.Append(" Errors: ").Append(Errors).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as ErrorResponse); - } - - /// - /// Returns true if ErrorResponse instances are equal - /// - /// Instance of ErrorResponse to be compared - /// Boolean - public bool Equals(ErrorResponse other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.Errors == other.Errors || - this.Errors != null && - this.Errors.SequenceEqual(other.Errors) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.Errors != null) - hash = hash * 59 + this.Errors.GetHashCode(); - return hash; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/Lifecycle.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/Lifecycle.cs deleted file mode 100644 index db8c093..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/Lifecycle.cs +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// Lifecycle settings. When no lifecycle settings are supplied, the job and files will be deleted directly after retrieval of the file - /// - [DataContract] - public partial class Lifecycle : IEquatable, IValidatableObject - { - /// - /// Gets or Sets Action - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ActionEnum - { - - /// - /// Enum DELETE for "DELETE" - /// - [EnumMember(Value = "DELETE")] - DELETE - } - - /// - /// Gets or Sets Type - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum TypeEnum - { - - /// - /// Enum RETRIEVAL for "RETRIEVAL" - /// - [EnumMember(Value = "RETRIEVAL")] - RETRIEVAL, - - /// - /// Enum TIME for "TIME" - /// - [EnumMember(Value = "TIME")] - TIME - } - - /// - /// Gets or Sets Action - /// - [DataMember(Name="action", EmitDefaultValue=false)] - public ActionEnum? Action { get; set; } - /// - /// Gets or Sets Type - /// - [DataMember(Name="type", EmitDefaultValue=false)] - public TypeEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation. - /// Action. - /// Type. - public Lifecycle(DateTime? ActionTime = default(DateTime?), ActionEnum? Action = default(ActionEnum?), TypeEnum? Type = default(TypeEnum?)) - { - this.ActionTime = ActionTime; - this.Action = Action; - this.Type = Type; - } - - /// - /// The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation - /// - /// The time at which the job and files will be deleted, regardless of whether it has been retrieved or not. Maximal time is 1 day from job creation - [DataMember(Name="actionTime", EmitDefaultValue=false)] - public DateTime? ActionTime { get; set; } - - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Lifecycle {\n"); - sb.Append(" ActionTime: ").Append(ActionTime).Append("\n"); - sb.Append(" Action: ").Append(Action).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as Lifecycle); - } - - /// - /// Returns true if Lifecycle instances are equal - /// - /// Instance of Lifecycle to be compared - /// Boolean - public bool Equals(Lifecycle other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.ActionTime == other.ActionTime || - this.ActionTime != null && - this.ActionTime.Equals(other.ActionTime) - ) && - ( - this.Action == other.Action || - this.Action != null && - this.Action.Equals(other.Action) - ) && - ( - this.Type == other.Type || - this.Type != null && - this.Type.Equals(other.Type) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.ActionTime != null) - hash = hash * 59 + this.ActionTime.GetHashCode(); - if (this.Action != null) - hash = hash * 59 + this.Action.GetHashCode(); - if (this.Type != null) - hash = hash * 59 + this.Type.GetHashCode(); - return hash; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/MergeJob.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/MergeJob.cs deleted file mode 100644 index e907d5d..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/MergeJob.cs +++ /dev/null @@ -1,339 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// The merge job. Has access to the job merge data. - /// - [DataContract] - public partial class MergeJob : IEquatable, IValidatableObject - { - /// - /// The status of the job - /// - /// The status of the job - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - - /// - /// Enum CREATED for "CREATED" - /// - [EnumMember(Value = "CREATED")] - CREATED, - - /// - /// Enum UPDATED for "UPDATED" - /// - [EnumMember(Value = "UPDATED")] - UPDATED, - - /// - /// Enum PROCESSING for "PROCESSING" - /// - [EnumMember(Value = "PROCESSING")] - PROCESSING, - - /// - /// Enum DONE for "DONE" - /// - [EnumMember(Value = "DONE")] - DONE, - - /// - /// Enum ERROR for "ERROR" - /// - [EnumMember(Value = "ERROR")] - ERROR, - - /// - /// Enum DELETED for "DELETED" - /// - [EnumMember(Value = "DELETED")] - DELETED - } - - /// - /// The status of the job - /// - /// The status of the job - [DataMember(Name="status", EmitDefaultValue=false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MergeJob() { } - /// - /// Initializes a new instance of the class. - /// - /// The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation (required). - /// Data set id. - /// The storage locations of the result files. (required). - /// Header data set ids. - /// The storage location. (optional). - /// MergeSettings. - public MergeJob(string JobId = default(string), string DataSetId = default(string), List ResultStreams = default(List), List HeaderDataSetIds = default(List), StorageLocation ResultStorageLocation = default(StorageLocation), MergeSettings MergeSettings = default(MergeSettings)) - { - // to ensure "JobId" is required (not null) - if (JobId == null) - { - throw new InvalidDataException("JobId is a required property for MergeJob and cannot be null"); - } - else - { - this.JobId = JobId; - } - // to ensure "ResultStreams" is required (not null) - if (ResultStreams == null) - { - throw new InvalidDataException("ResultStreams is a required property for MergeJob and cannot be null"); - } - else - { - this.ResultStreams = ResultStreams; - } - this.DataSetId = DataSetId; - this.HeaderDataSetIds = HeaderDataSetIds; - this.ResultStorageLocation = ResultStorageLocation; - this.MergeSettings = MergeSettings; - } - - /// - /// The completion date/time of this job in ISO 8601 format - /// - /// The completion date/time of this job in ISO 8601 format - [DataMember(Name="completionTime", EmitDefaultValue=false)] - public DateTime? CompletionTime { get; private set; } - - /// - /// The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation - /// - /// The server generated job jobId. This jobId is checked against the jobId in the request path on every invocation - [DataMember(Name="jobId", EmitDefaultValue=false)] - public string JobId { get; set; } - - /// - /// The creation date/time of this job in ISO 8601 format - /// - /// The creation date/time of this job in ISO 8601 format - [DataMember(Name="creationTime", EmitDefaultValue=false)] - public DateTime? CreationTime { get; private set; } - - /// - /// Data set id - /// - /// Data set id - [DataMember(Name="dataSetId", EmitDefaultValue=false)] - public string DataSetId { get; set; } - - /// - /// The storage locations of the result files. - /// - /// The storage locations of the result files. - [DataMember(Name="resultStreams", EmitDefaultValue=false)] - public List ResultStreams { get; set; } - - /// - /// Header data set ids - /// - /// Header data set ids - [DataMember(Name="headerDataSetIds", EmitDefaultValue=false)] - public List HeaderDataSetIds { get; set; } - - /// - /// The storage location. (optional) - /// - /// The storage location. (optional) - [DataMember(Name="resultStorageLocation", EmitDefaultValue=false)] - public StorageLocation ResultStorageLocation { get; set; } - - /// - /// Gets or Sets MergeSettings - /// - [DataMember(Name="mergeSettings", EmitDefaultValue=false)] - public MergeSettings MergeSettings { get; set; } - - /// - /// A status message, which can be informational, warning or error. A message here does not indicate an error perse - /// - /// A status message, which can be informational, warning or error. A message here does not indicate an error perse - [DataMember(Name="statusMessage", EmitDefaultValue=false)] - public string StatusMessage { get; private set; } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class MergeJob {\n"); - sb.Append(" CompletionTime: ").Append(CompletionTime).Append("\n"); - sb.Append(" JobId: ").Append(JobId).Append("\n"); - sb.Append(" CreationTime: ").Append(CreationTime).Append("\n"); - sb.Append(" DataSetId: ").Append(DataSetId).Append("\n"); - sb.Append(" ResultStreams: ").Append(ResultStreams).Append("\n"); - sb.Append(" HeaderDataSetIds: ").Append(HeaderDataSetIds).Append("\n"); - sb.Append(" ResultStorageLocation: ").Append(ResultStorageLocation).Append("\n"); - sb.Append(" MergeSettings: ").Append(MergeSettings).Append("\n"); - sb.Append(" StatusMessage: ").Append(StatusMessage).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as MergeJob); - } - - /// - /// Returns true if MergeJob instances are equal - /// - /// Instance of MergeJob to be compared - /// Boolean - public bool Equals(MergeJob other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.CompletionTime == other.CompletionTime || - this.CompletionTime != null && - this.CompletionTime.Equals(other.CompletionTime) - ) && - ( - this.JobId == other.JobId || - this.JobId != null && - this.JobId.Equals(other.JobId) - ) && - ( - this.CreationTime == other.CreationTime || - this.CreationTime != null && - this.CreationTime.Equals(other.CreationTime) - ) && - ( - this.DataSetId == other.DataSetId || - this.DataSetId != null && - this.DataSetId.Equals(other.DataSetId) - ) && - ( - this.ResultStreams == other.ResultStreams || - this.ResultStreams != null && - this.ResultStreams.SequenceEqual(other.ResultStreams) - ) && - ( - this.HeaderDataSetIds == other.HeaderDataSetIds || - this.HeaderDataSetIds != null && - this.HeaderDataSetIds.SequenceEqual(other.HeaderDataSetIds) - ) && - ( - this.ResultStorageLocation == other.ResultStorageLocation || - this.ResultStorageLocation != null && - this.ResultStorageLocation.Equals(other.ResultStorageLocation) - ) && - ( - this.MergeSettings == other.MergeSettings || - this.MergeSettings != null && - this.MergeSettings.Equals(other.MergeSettings) - ) && - ( - this.StatusMessage == other.StatusMessage || - this.StatusMessage != null && - this.StatusMessage.Equals(other.StatusMessage) - ) && - ( - this.Status == other.Status || - this.Status != null && - this.Status.Equals(other.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.CompletionTime != null) - hash = hash * 59 + this.CompletionTime.GetHashCode(); - if (this.JobId != null) - hash = hash * 59 + this.JobId.GetHashCode(); - if (this.CreationTime != null) - hash = hash * 59 + this.CreationTime.GetHashCode(); - if (this.DataSetId != null) - hash = hash * 59 + this.DataSetId.GetHashCode(); - if (this.ResultStreams != null) - hash = hash * 59 + this.ResultStreams.GetHashCode(); - if (this.HeaderDataSetIds != null) - hash = hash * 59 + this.HeaderDataSetIds.GetHashCode(); - if (this.ResultStorageLocation != null) - hash = hash * 59 + this.ResultStorageLocation.GetHashCode(); - if (this.MergeSettings != null) - hash = hash * 59 + this.MergeSettings.GetHashCode(); - if (this.StatusMessage != null) - hash = hash * 59 + this.StatusMessage.GetHashCode(); - if (this.Status != null) - hash = hash * 59 + this.Status.GetHashCode(); - return hash; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/MergeJobResponse.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/MergeJobResponse.cs deleted file mode 100644 index ace8a83..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/MergeJobResponse.cs +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// The merge job response. - /// - [DataContract] - public partial class MergeJobResponse : IEquatable, IValidatableObject - { - /// - /// The status of the job - /// - /// The status of the job - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - - /// - /// Enum CREATED for "CREATED" - /// - [EnumMember(Value = "CREATED")] - CREATED, - - /// - /// Enum UPDATED for "UPDATED" - /// - [EnumMember(Value = "UPDATED")] - UPDATED, - - /// - /// Enum PROCESSING for "PROCESSING" - /// - [EnumMember(Value = "PROCESSING")] - PROCESSING, - - /// - /// Enum DONE for "DONE" - /// - [EnumMember(Value = "DONE")] - DONE, - - /// - /// Enum ERROR for "ERROR" - /// - [EnumMember(Value = "ERROR")] - ERROR, - - /// - /// Enum DELETED for "DELETED" - /// - [EnumMember(Value = "DELETED")] - DELETED - } - - /// - /// The status of the job - /// - /// The status of the job - [DataMember(Name="status", EmitDefaultValue=false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MergeJobResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation (required). - /// Job. - public MergeJobResponse(string JobId = default(string), MergeJob Job = default(MergeJob)) - { - // to ensure "JobId" is required (not null) - if (JobId == null) - { - throw new InvalidDataException("JobId is a required property for MergeJobResponse and cannot be null"); - } - else - { - this.JobId = JobId; - } - this.Job = Job; - } - - /// - /// The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation - /// - /// The server generated job jobId. This jobId is checked against the jobId in the request path on overy invocation - [DataMember(Name="jobId", EmitDefaultValue=false)] - public string JobId { get; set; } - - /// - /// Gets or Sets Job - /// - [DataMember(Name="job", EmitDefaultValue=false)] - public MergeJob Job { get; set; } - - /// - /// A status message, which can be informational, warning or error. AA message here does not indicate an error perse - /// - /// A status message, which can be informational, warning or error. AA message here does not indicate an error perse - [DataMember(Name="statusMessage", EmitDefaultValue=false)] - public string StatusMessage { get; private set; } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class MergeJobResponse {\n"); - sb.Append(" JobId: ").Append(JobId).Append("\n"); - sb.Append(" Job: ").Append(Job).Append("\n"); - sb.Append(" StatusMessage: ").Append(StatusMessage).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as MergeJobResponse); - } - - /// - /// Returns true if MergeJobResponse instances are equal - /// - /// Instance of MergeJobResponse to be compared - /// Boolean - public bool Equals(MergeJobResponse other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.JobId == other.JobId || - this.JobId != null && - this.JobId.Equals(other.JobId) - ) && - ( - this.Job == other.Job || - this.Job != null && - this.Job.Equals(other.Job) - ) && - ( - this.StatusMessage == other.StatusMessage || - this.StatusMessage != null && - this.StatusMessage.Equals(other.StatusMessage) - ) && - ( - this.Status == other.Status || - this.Status != null && - this.Status.Equals(other.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.JobId != null) - hash = hash * 59 + this.JobId.GetHashCode(); - if (this.Job != null) - hash = hash * 59 + this.Job.GetHashCode(); - if (this.StatusMessage != null) - hash = hash * 59 + this.StatusMessage.GetHashCode(); - if (this.Status != null) - hash = hash * 59 + this.Status.GetHashCode(); - return hash; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/MergeSettings.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/MergeSettings.cs deleted file mode 100644 index 3451f42..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/MergeSettings.cs +++ /dev/null @@ -1,338 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// Merge settings - /// - [DataContract] - public partial class MergeSettings : IEquatable, IValidatableObject - { - /// - /// Gets or Sets MergeResult - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum MergeResultEnum - { - - /// - /// Enum SINGLEFILE for "SINGLE_FILE" - /// - [EnumMember(Value = "SINGLE_FILE")] - SINGLEFILE, - - /// - /// Enum SEPARATEFILES for "SEPARATE_FILES" - /// - [EnumMember(Value = "SEPARATE_FILES")] - SEPARATEFILES - } - - /// - /// Gets or Sets Engine - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum EngineEnum - { - - /// - /// Enum BASIC for "BASIC" - /// - [EnumMember(Value = "BASIC")] - BASIC, - - /// - /// Enum PREMIUM for "PREMIUM" - /// - [EnumMember(Value = "PREMIUM")] - PREMIUM - } - - /// - /// Gets or Sets MergeResult - /// - [DataMember(Name="mergeResult", EmitDefaultValue=false)] - public MergeResultEnum? MergeResult { get; set; } - /// - /// Gets or Sets Engine - /// - [DataMember(Name="engine", EmitDefaultValue=false)] - public EngineEnum? Engine { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected MergeSettings() { } - /// - /// Initializes a new instance of the class. - /// - /// Lifecycle. - /// MergeResult. - /// Data set id (required). - /// Engine. - /// optional header data set ids. - /// The output location of the result files. (required). - /// Template version. - /// Template id (required). - /// OutputSettings (required). - public MergeSettings(Lifecycle Lifecycle = default(Lifecycle), MergeResultEnum? MergeResult = default(MergeResultEnum?), string DataSetId = default(string), EngineEnum? Engine = default(EngineEnum?), List HeaderDataSetIds = default(List), StorageLocation ResultStorageLocation = default(StorageLocation), int? TemplateVersion = default(int?), string TemplateId = default(string), OutputSettings OutputSettings = default(OutputSettings)) - { - // to ensure "DataSetId" is required (not null) - if (DataSetId == null) - { - throw new InvalidDataException("DataSetId is a required property for MergeSettings and cannot be null"); - } - else - { - this.DataSetId = DataSetId; - } - // to ensure "ResultStorageLocation" is required (not null) - if (ResultStorageLocation == null) - { - throw new InvalidDataException("ResultStorageLocation is a required property for MergeSettings and cannot be null"); - } - else - { - this.ResultStorageLocation = ResultStorageLocation; - } - // to ensure "TemplateId" is required (not null) - if (TemplateId == null) - { - throw new InvalidDataException("TemplateId is a required property for MergeSettings and cannot be null"); - } - else - { - this.TemplateId = TemplateId; - } - // to ensure "OutputSettings" is required (not null) - if (OutputSettings == null) - { - throw new InvalidDataException("OutputSettings is a required property for MergeSettings and cannot be null"); - } - else - { - this.OutputSettings = OutputSettings; - } - this.Lifecycle = Lifecycle; - this.MergeResult = MergeResult; - this.Engine = Engine; - this.HeaderDataSetIds = HeaderDataSetIds; - this.TemplateVersion = TemplateVersion; - } - - /// - /// Gets or Sets Lifecycle - /// - [DataMember(Name="lifecycle", EmitDefaultValue=false)] - public Lifecycle Lifecycle { get; set; } - - - /// - /// Data set id - /// - /// Data set id - [DataMember(Name="dataSetId", EmitDefaultValue=false)] - public string DataSetId { get; set; } - - - /// - /// optional header data set ids - /// - /// optional header data set ids - [DataMember(Name="headerDataSetIds", EmitDefaultValue=false)] - public List HeaderDataSetIds { get; set; } - - /// - /// The output location of the result files. - /// - /// The output location of the result files. - [DataMember(Name="resultStorageLocation", EmitDefaultValue=false)] - public StorageLocation ResultStorageLocation { get; set; } - - /// - /// Template version - /// - /// Template version - [DataMember(Name="templateVersion", EmitDefaultValue=false)] - public int? TemplateVersion { get; set; } - - /// - /// Template id - /// - /// Template id - [DataMember(Name="templateId", EmitDefaultValue=false)] - public string TemplateId { get; set; } - - /// - /// Gets or Sets OutputSettings - /// - [DataMember(Name="outputSettings", EmitDefaultValue=false)] - public OutputSettings OutputSettings { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class MergeSettings {\n"); - sb.Append(" Lifecycle: ").Append(Lifecycle).Append("\n"); - sb.Append(" MergeResult: ").Append(MergeResult).Append("\n"); - sb.Append(" DataSetId: ").Append(DataSetId).Append("\n"); - sb.Append(" Engine: ").Append(Engine).Append("\n"); - sb.Append(" HeaderDataSetIds: ").Append(HeaderDataSetIds).Append("\n"); - sb.Append(" ResultStorageLocation: ").Append(ResultStorageLocation).Append("\n"); - sb.Append(" TemplateVersion: ").Append(TemplateVersion).Append("\n"); - sb.Append(" TemplateId: ").Append(TemplateId).Append("\n"); - sb.Append(" OutputSettings: ").Append(OutputSettings).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as MergeSettings); - } - - /// - /// Returns true if MergeSettings instances are equal - /// - /// Instance of MergeSettings to be compared - /// Boolean - public bool Equals(MergeSettings other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.Lifecycle == other.Lifecycle || - this.Lifecycle != null && - this.Lifecycle.Equals(other.Lifecycle) - ) && - ( - this.MergeResult == other.MergeResult || - this.MergeResult != null && - this.MergeResult.Equals(other.MergeResult) - ) && - ( - this.DataSetId == other.DataSetId || - this.DataSetId != null && - this.DataSetId.Equals(other.DataSetId) - ) && - ( - this.Engine == other.Engine || - this.Engine != null && - this.Engine.Equals(other.Engine) - ) && - ( - this.HeaderDataSetIds == other.HeaderDataSetIds || - this.HeaderDataSetIds != null && - this.HeaderDataSetIds.SequenceEqual(other.HeaderDataSetIds) - ) && - ( - this.ResultStorageLocation == other.ResultStorageLocation || - this.ResultStorageLocation != null && - this.ResultStorageLocation.Equals(other.ResultStorageLocation) - ) && - ( - this.TemplateVersion == other.TemplateVersion || - this.TemplateVersion != null && - this.TemplateVersion.Equals(other.TemplateVersion) - ) && - ( - this.TemplateId == other.TemplateId || - this.TemplateId != null && - this.TemplateId.Equals(other.TemplateId) - ) && - ( - this.OutputSettings == other.OutputSettings || - this.OutputSettings != null && - this.OutputSettings.Equals(other.OutputSettings) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.Lifecycle != null) - hash = hash * 59 + this.Lifecycle.GetHashCode(); - if (this.MergeResult != null) - hash = hash * 59 + this.MergeResult.GetHashCode(); - if (this.DataSetId != null) - hash = hash * 59 + this.DataSetId.GetHashCode(); - if (this.Engine != null) - hash = hash * 59 + this.Engine.GetHashCode(); - if (this.HeaderDataSetIds != null) - hash = hash * 59 + this.HeaderDataSetIds.GetHashCode(); - if (this.ResultStorageLocation != null) - hash = hash * 59 + this.ResultStorageLocation.GetHashCode(); - if (this.TemplateVersion != null) - hash = hash * 59 + this.TemplateVersion.GetHashCode(); - if (this.TemplateId != null) - hash = hash * 59 + this.TemplateId.GetHashCode(); - if (this.OutputSettings != null) - hash = hash * 59 + this.OutputSettings.GetHashCode(); - return hash; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/OutputSettings.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/OutputSettings.cs deleted file mode 100644 index 82d55ce..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/OutputSettings.cs +++ /dev/null @@ -1,274 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// Output settings - /// - [DataContract] - public partial class OutputSettings : IEquatable, IValidatableObject - { - /// - /// Gets or Sets DeliveryFormat - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum DeliveryFormatEnum - { - - /// - /// Enum PLAIN for "PLAIN" - /// - [EnumMember(Value = "PLAIN")] - PLAIN, - - /// - /// Enum ZIP for "ZIP" - /// - [EnumMember(Value = "ZIP")] - ZIP, - - /// - /// Enum _7ZIP for "_7ZIP" - /// - [EnumMember(Value = "_7ZIP")] - _7ZIP - } - - /// - /// Gets or Sets OutputFormat - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum OutputFormatEnum - { - - /// - /// Enum DOC for "DOC" - /// - [EnumMember(Value = "DOC")] - DOC, - - /// - /// Enum DOCX for "DOCX" - /// - [EnumMember(Value = "DOCX")] - DOCX, - - /// - /// Enum RTF for "RTF" - /// - [EnumMember(Value = "RTF")] - RTF, - - /// - /// Enum PDF for "PDF" - /// - [EnumMember(Value = "PDF")] - PDF, - - /// - /// Enum XPS for "XPS" - /// - [EnumMember(Value = "XPS")] - XPS, - - /// - /// Enum SVG for "SVG" - /// - [EnumMember(Value = "SVG")] - SVG, - - /// - /// Enum HTML for "HTML" - /// - [EnumMember(Value = "HTML")] - HTML, - - /// - /// Enum ODT for "ODT" - /// - [EnumMember(Value = "ODT")] - ODT, - - /// - /// Enum TIFF for "TIFF" - /// - [EnumMember(Value = "TIFF")] - TIFF, - - /// - /// Enum PNG for "PNG" - /// - [EnumMember(Value = "PNG")] - PNG, - - /// - /// Enum BMP for "BMP" - /// - [EnumMember(Value = "BMP")] - BMP, - - /// - /// Enum JPEG for "JPEG" - /// - [EnumMember(Value = "JPEG")] - JPEG, - - /// - /// Enum TXT for "TXT" - /// - [EnumMember(Value = "TXT")] - TXT, - - /// - /// Enum XML for "XML" - /// - [EnumMember(Value = "XML")] - XML, - - /// - /// Enum JSON for "JSON" - /// - [EnumMember(Value = "JSON")] - JSON, - - /// - /// Enum DEFAULT for "DEFAULT" - /// - [EnumMember(Value = "DEFAULT")] - DEFAULT - } - - /// - /// Gets or Sets DeliveryFormat - /// - [DataMember(Name="deliveryFormat", EmitDefaultValue=false)] - public DeliveryFormatEnum? DeliveryFormat { get; set; } - /// - /// Gets or Sets OutputFormat - /// - [DataMember(Name="outputFormat", EmitDefaultValue=false)] - public OutputFormatEnum? OutputFormat { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// DeliveryFormat. - /// OutputFormat. - public OutputSettings(DeliveryFormatEnum? DeliveryFormat = default(DeliveryFormatEnum?), OutputFormatEnum? OutputFormat = default(OutputFormatEnum?)) - { - this.DeliveryFormat = DeliveryFormat; - this.OutputFormat = OutputFormat; - } - - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class OutputSettings {\n"); - sb.Append(" DeliveryFormat: ").Append(DeliveryFormat).Append("\n"); - sb.Append(" OutputFormat: ").Append(OutputFormat).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as OutputSettings); - } - - /// - /// Returns true if OutputSettings instances are equal - /// - /// Instance of OutputSettings to be compared - /// Boolean - public bool Equals(OutputSettings other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.DeliveryFormat == other.DeliveryFormat || - this.DeliveryFormat != null && - this.DeliveryFormat.Equals(other.DeliveryFormat) - ) && - ( - this.OutputFormat == other.OutputFormat || - this.OutputFormat != null && - this.OutputFormat.Equals(other.OutputFormat) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.DeliveryFormat != null) - hash = hash * 59 + this.DeliveryFormat.GetHashCode(); - if (this.OutputFormat != null) - hash = hash * 59 + this.OutputFormat.GetHashCode(); - return hash; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/OwnerInfo.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/OwnerInfo.cs deleted file mode 100644 index 5c23561..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/OwnerInfo.cs +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// Owner info - /// - [DataContract] - public partial class OwnerInfo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// The owner's phone number. - /// The owner's company/department. - /// The owner's name. - /// The owner's email address. - public OwnerInfo(string Phone = default(string), string CompanyDepartment = default(string), string Name = default(string), string Email = default(string)) - { - this.Phone = Phone; - this.CompanyDepartment = CompanyDepartment; - this.Name = Name; - this.Email = Email; - } - - /// - /// The owner's phone number - /// - /// The owner's phone number - [DataMember(Name="phone", EmitDefaultValue=false)] - public string Phone { get; set; } - - /// - /// The owner's company/department - /// - /// The owner's company/department - [DataMember(Name="companyDepartment", EmitDefaultValue=false)] - public string CompanyDepartment { get; set; } - - /// - /// The owner's name - /// - /// The owner's name - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// The owner's email address - /// - /// The owner's email address - [DataMember(Name="email", EmitDefaultValue=false)] - public string Email { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class OwnerInfo {\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" CompanyDepartment: ").Append(CompanyDepartment).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as OwnerInfo); - } - - /// - /// Returns true if OwnerInfo instances are equal - /// - /// Instance of OwnerInfo to be compared - /// Boolean - public bool Equals(OwnerInfo other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.Phone == other.Phone || - this.Phone != null && - this.Phone.Equals(other.Phone) - ) && - ( - this.CompanyDepartment == other.CompanyDepartment || - this.CompanyDepartment != null && - this.CompanyDepartment.Equals(other.CompanyDepartment) - ) && - ( - this.Name == other.Name || - this.Name != null && - this.Name.Equals(other.Name) - ) && - ( - this.Email == other.Email || - this.Email != null && - this.Email.Equals(other.Email) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.Phone != null) - hash = hash * 59 + this.Phone.GetHashCode(); - if (this.CompanyDepartment != null) - hash = hash * 59 + this.CompanyDepartment.GetHashCode(); - if (this.Name != null) - hash = hash * 59 + this.Name.GetHashCode(); - if (this.Email != null) - hash = hash * 59 + this.Email.GetHashCode(); - return hash; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/ResultStreamRequest.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/ResultStreamRequest.cs deleted file mode 100644 index a121f15..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/ResultStreamRequest.cs +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// A request to download a specific result stream. - /// - [DataContract] - public partial class ResultStreamRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ResultStreamRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// The stream location (required). - /// The Output settings. - public ResultStreamRequest(StreamLocation StreamLocation = default(StreamLocation), OutputSettings OutputSettings = default(OutputSettings)) - { - // to ensure "StreamLocation" is required (not null) - if (StreamLocation == null) - { - throw new InvalidDataException("StreamLocation is a required property for ResultStreamRequest and cannot be null"); - } - else - { - this.StreamLocation = StreamLocation; - } - this.OutputSettings = OutputSettings; - } - - /// - /// The stream location - /// - /// The stream location - [DataMember(Name="streamLocation", EmitDefaultValue=false)] - public StreamLocation StreamLocation { get; set; } - - /// - /// The Output settings - /// - /// The Output settings - [DataMember(Name="outputSettings", EmitDefaultValue=false)] - public OutputSettings OutputSettings { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ResultStreamRequest {\n"); - sb.Append(" StreamLocation: ").Append(StreamLocation).Append("\n"); - sb.Append(" OutputSettings: ").Append(OutputSettings).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as ResultStreamRequest); - } - - /// - /// Returns true if ResultStreamRequest instances are equal - /// - /// Instance of ResultStreamRequest to be compared - /// Boolean - public bool Equals(ResultStreamRequest other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.StreamLocation == other.StreamLocation || - this.StreamLocation != null && - this.StreamLocation.Equals(other.StreamLocation) - ) && - ( - this.OutputSettings == other.OutputSettings || - this.OutputSettings != null && - this.OutputSettings.Equals(other.OutputSettings) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.StreamLocation != null) - hash = hash * 59 + this.StreamLocation.GetHashCode(); - if (this.OutputSettings != null) - hash = hash * 59 + this.OutputSettings.GetHashCode(); - return hash; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/StorageLocation.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/StorageLocation.cs deleted file mode 100644 index 19df869..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/StorageLocation.cs +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// Location record - /// - [DataContract] - public partial class StorageLocation : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// FolderPath. - /// ContainerId. - public StorageLocation(string FolderPath = default(string), string ContainerId = default(string)) - { - this.FolderPath = FolderPath; - this.ContainerId = ContainerId; - } - - /// - /// Gets or Sets FolderPath - /// - [DataMember(Name="folderPath", EmitDefaultValue=false)] - public string FolderPath { get; set; } - - /// - /// Gets or Sets ContainerId - /// - [DataMember(Name="containerId", EmitDefaultValue=false)] - public string ContainerId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class StorageLocation {\n"); - sb.Append(" FolderPath: ").Append(FolderPath).Append("\n"); - sb.Append(" ContainerId: ").Append(ContainerId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as StorageLocation); - } - - /// - /// Returns true if StorageLocation instances are equal - /// - /// Instance of StorageLocation to be compared - /// Boolean - public bool Equals(StorageLocation other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.FolderPath == other.FolderPath || - this.FolderPath != null && - this.FolderPath.Equals(other.FolderPath) - ) && - ( - this.ContainerId == other.ContainerId || - this.ContainerId != null && - this.ContainerId.Equals(other.ContainerId) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.FolderPath != null) - hash = hash * 59 + this.FolderPath.GetHashCode(); - if (this.ContainerId != null) - hash = hash * 59 + this.ContainerId.GetHashCode(); - return hash; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/StreamLocation.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/StreamLocation.cs deleted file mode 100644 index f240ff8..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/StreamLocation.cs +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// Location record of data stream - /// - [DataContract] - public partial class StreamLocation : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// FolderPath. - /// OriginalFileName. - /// FileName. - /// ContainerId. - public StreamLocation(string FolderPath = default(string), string OriginalFileName = default(string), string FileName = default(string), string ContainerId = default(string)) - { - this.FolderPath = FolderPath; - this.OriginalFileName = OriginalFileName; - this.FileName = FileName; - this.ContainerId = ContainerId; - } - - /// - /// Gets or Sets FolderPath - /// - [DataMember(Name="folderPath", EmitDefaultValue=false)] - public string FolderPath { get; set; } - - /// - /// Gets or Sets OriginalFileName - /// - [DataMember(Name="originalFileName", EmitDefaultValue=false)] - public string OriginalFileName { get; set; } - - /// - /// Gets or Sets FileName - /// - [DataMember(Name="fileName", EmitDefaultValue=false)] - public string FileName { get; set; } - - /// - /// Gets or Sets ContainerId - /// - [DataMember(Name="containerId", EmitDefaultValue=false)] - public string ContainerId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class StreamLocation {\n"); - sb.Append(" FolderPath: ").Append(FolderPath).Append("\n"); - sb.Append(" OriginalFileName: ").Append(OriginalFileName).Append("\n"); - sb.Append(" FileName: ").Append(FileName).Append("\n"); - sb.Append(" ContainerId: ").Append(ContainerId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as StreamLocation); - } - - /// - /// Returns true if StreamLocation instances are equal - /// - /// Instance of StreamLocation to be compared - /// Boolean - public bool Equals(StreamLocation other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.FolderPath == other.FolderPath || - this.FolderPath != null && - this.FolderPath.Equals(other.FolderPath) - ) && - ( - this.OriginalFileName == other.OriginalFileName || - this.OriginalFileName != null && - this.OriginalFileName.Equals(other.OriginalFileName) - ) && - ( - this.FileName == other.FileName || - this.FileName != null && - this.FileName.Equals(other.FileName) - ) && - ( - this.ContainerId == other.ContainerId || - this.ContainerId != null && - this.ContainerId.Equals(other.ContainerId) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.FolderPath != null) - hash = hash * 59 + this.FolderPath.GetHashCode(); - if (this.OriginalFileName != null) - hash = hash * 59 + this.OriginalFileName.GetHashCode(); - if (this.FileName != null) - hash = hash * 59 + this.FileName.GetHashCode(); - if (this.ContainerId != null) - hash = hash * 59 + this.ContainerId.GetHashCode(); - return hash; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContext.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContext.cs deleted file mode 100644 index e158e2e..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContext.cs +++ /dev/null @@ -1,261 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// TemplateContext - /// - [DataContract] - public partial class TemplateContext : IEquatable, IValidatableObject - { - /// - /// Gets or Sets TemplateType - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum TemplateTypeEnum - { - - /// - /// Enum OFFICE for "OFFICE" - /// - [EnumMember(Value = "OFFICE")] - OFFICE, - - /// - /// Enum FREEMARKER for "FREEMARKER" - /// - [EnumMember(Value = "FREEMARKER")] - FREEMARKER - } - - /// - /// Gets or Sets TemplateType - /// - [DataMember(Name="templateType", EmitDefaultValue=false)] - public TemplateTypeEnum? TemplateType { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TemplateContext() { } - /// - /// Initializes a new instance of the class. - /// - /// TemplateType (required). - /// The template files (versioned). - /// The template description. - /// OwnerInfo. - /// The storage location. (optional). - /// Id. - /// The template context id. - public TemplateContext(TemplateTypeEnum? TemplateType = default(TemplateTypeEnum?), Dictionary TemplateFileLocations = default(Dictionary), string Description = default(string), OwnerInfo OwnerInfo = default(OwnerInfo), StorageLocation StorageLocation = default(StorageLocation), string Id = default(string), string TemplateId = default(string)) - { - // to ensure "TemplateType" is required (not null) - if (TemplateType == null) - { - throw new InvalidDataException("TemplateType is a required property for TemplateContext and cannot be null"); - } - else - { - this.TemplateType = TemplateType; - } - this.TemplateFileLocations = TemplateFileLocations; - this.Description = Description; - this.OwnerInfo = OwnerInfo; - this.StorageLocation = StorageLocation; - this.Id = Id; - this.TemplateId = TemplateId; - } - - - /// - /// The template files (versioned) - /// - /// The template files (versioned) - [DataMember(Name="templateFileLocations", EmitDefaultValue=false)] - public Dictionary TemplateFileLocations { get; set; } - - /// - /// The template description - /// - /// The template description - [DataMember(Name="description", EmitDefaultValue=false)] - public string Description { get; set; } - - /// - /// Gets or Sets OwnerInfo - /// - [DataMember(Name="ownerInfo", EmitDefaultValue=false)] - public OwnerInfo OwnerInfo { get; set; } - - /// - /// The storage location. (optional) - /// - /// The storage location. (optional) - [DataMember(Name="storageLocation", EmitDefaultValue=false)] - public StorageLocation StorageLocation { get; set; } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public string Id { get; set; } - - /// - /// The template context id - /// - /// The template context id - [DataMember(Name="templateId", EmitDefaultValue=false)] - public string TemplateId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TemplateContext {\n"); - sb.Append(" TemplateType: ").Append(TemplateType).Append("\n"); - sb.Append(" TemplateFileLocations: ").Append(TemplateFileLocations).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" OwnerInfo: ").Append(OwnerInfo).Append("\n"); - sb.Append(" StorageLocation: ").Append(StorageLocation).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" TemplateId: ").Append(TemplateId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as TemplateContext); - } - - /// - /// Returns true if TemplateContext instances are equal - /// - /// Instance of TemplateContext to be compared - /// Boolean - public bool Equals(TemplateContext other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.TemplateType == other.TemplateType || - this.TemplateType != null && - this.TemplateType.Equals(other.TemplateType) - ) && - ( - this.TemplateFileLocations == other.TemplateFileLocations || - this.TemplateFileLocations != null && - this.TemplateFileLocations.SequenceEqual(other.TemplateFileLocations) - ) && - ( - this.Description == other.Description || - this.Description != null && - this.Description.Equals(other.Description) - ) && - ( - this.OwnerInfo == other.OwnerInfo || - this.OwnerInfo != null && - this.OwnerInfo.Equals(other.OwnerInfo) - ) && - ( - this.StorageLocation == other.StorageLocation || - this.StorageLocation != null && - this.StorageLocation.Equals(other.StorageLocation) - ) && - ( - this.Id == other.Id || - this.Id != null && - this.Id.Equals(other.Id) - ) && - ( - this.TemplateId == other.TemplateId || - this.TemplateId != null && - this.TemplateId.Equals(other.TemplateId) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.TemplateType != null) - hash = hash * 59 + this.TemplateType.GetHashCode(); - if (this.TemplateFileLocations != null) - hash = hash * 59 + this.TemplateFileLocations.GetHashCode(); - if (this.Description != null) - hash = hash * 59 + this.Description.GetHashCode(); - if (this.OwnerInfo != null) - hash = hash * 59 + this.OwnerInfo.GetHashCode(); - if (this.StorageLocation != null) - hash = hash * 59 + this.StorageLocation.GetHashCode(); - if (this.Id != null) - hash = hash * 59 + this.Id.GetHashCode(); - if (this.TemplateId != null) - hash = hash * 59 + this.TemplateId.GetHashCode(); - return hash; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextRequest.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextRequest.cs deleted file mode 100644 index e38b684..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextRequest.cs +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// The merge template request. - /// - [DataContract] - public partial class TemplateContextRequest : IEquatable, IValidatableObject - { - /// - /// Gets or Sets TemplateType - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum TemplateTypeEnum - { - - /// - /// Enum OFFICE for "OFFICE" - /// - [EnumMember(Value = "OFFICE")] - OFFICE, - - /// - /// Enum FREEMARKER for "FREEMARKER" - /// - [EnumMember(Value = "FREEMARKER")] - FREEMARKER - } - - /// - /// Gets or Sets TemplateType - /// - [DataMember(Name="templateType", EmitDefaultValue=false)] - public TemplateTypeEnum? TemplateType { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TemplateContextRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// TemplateType (required). - /// Description. - /// OwnerInfo. - /// The template context id. - public TemplateContextRequest(TemplateTypeEnum? TemplateType = default(TemplateTypeEnum?), string Description = default(string), OwnerInfo OwnerInfo = default(OwnerInfo), string TemplateId = default(string)) - { - // to ensure "TemplateType" is required (not null) - if (TemplateType == null) - { - throw new InvalidDataException("TemplateType is a required property for TemplateContextRequest and cannot be null"); - } - else - { - this.TemplateType = TemplateType; - } - this.Description = Description; - this.OwnerInfo = OwnerInfo; - this.TemplateId = TemplateId; - } - - - /// - /// Gets or Sets Description - /// - [DataMember(Name="description", EmitDefaultValue=false)] - public string Description { get; set; } - - /// - /// Gets or Sets OwnerInfo - /// - [DataMember(Name="ownerInfo", EmitDefaultValue=false)] - public OwnerInfo OwnerInfo { get; set; } - - /// - /// The template context id - /// - /// The template context id - [DataMember(Name="templateId", EmitDefaultValue=false)] - public string TemplateId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TemplateContextRequest {\n"); - sb.Append(" TemplateType: ").Append(TemplateType).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" OwnerInfo: ").Append(OwnerInfo).Append("\n"); - sb.Append(" TemplateId: ").Append(TemplateId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as TemplateContextRequest); - } - - /// - /// Returns true if TemplateContextRequest instances are equal - /// - /// Instance of TemplateContextRequest to be compared - /// Boolean - public bool Equals(TemplateContextRequest other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.TemplateType == other.TemplateType || - this.TemplateType != null && - this.TemplateType.Equals(other.TemplateType) - ) && - ( - this.Description == other.Description || - this.Description != null && - this.Description.Equals(other.Description) - ) && - ( - this.OwnerInfo == other.OwnerInfo || - this.OwnerInfo != null && - this.OwnerInfo.Equals(other.OwnerInfo) - ) && - ( - this.TemplateId == other.TemplateId || - this.TemplateId != null && - this.TemplateId.Equals(other.TemplateId) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.TemplateType != null) - hash = hash * 59 + this.TemplateType.GetHashCode(); - if (this.Description != null) - hash = hash * 59 + this.Description.GetHashCode(); - if (this.OwnerInfo != null) - hash = hash * 59 + this.OwnerInfo.GetHashCode(); - if (this.TemplateId != null) - hash = hash * 59 + this.TemplateId.GetHashCode(); - return hash; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextResponse.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextResponse.cs deleted file mode 100644 index 3832803..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Model/TemplateContextResponse.cs +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Template-Processor - * - * The Template-Processor API can generate office, xml and json documents from a template and a JSON data file. Supported templates are MS Office files and freemarker files.< The flow is generally as follows: Interactive testing: A web based test console is available in the Sphereon API Store - * - * OpenAPI spec version: 0.1 - * Contact: dev@sphereon.com - * Generated by: https://github.com/swagger-api/swagger-codegen.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using SwaggerDateConverter = Sphereon.SDK.TemplateProcessor.Client.SwaggerDateConverter; - -namespace Sphereon.SDK.TemplateProcessor.Model -{ - /// - /// The merge template response. - /// - [DataContract] - public partial class TemplateContextResponse : IEquatable, IValidatableObject - { - /// - /// The status of the template - /// - /// The status of the template - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - - /// - /// Enum CREATED for "CREATED" - /// - [EnumMember(Value = "CREATED")] - CREATED, - - /// - /// Enum UPDATED for "UPDATED" - /// - [EnumMember(Value = "UPDATED")] - UPDATED, - - /// - /// Enum DELETED for "DELETED" - /// - [EnumMember(Value = "DELETED")] - DELETED, - - /// - /// Enum PROCESSING for "PROCESSING" - /// - [EnumMember(Value = "PROCESSING")] - PROCESSING - } - - /// - /// The status of the template - /// - /// The status of the template - [DataMember(Name="status", EmitDefaultValue=false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TemplateContextResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// Context. - /// Unique template context id (required). - public TemplateContextResponse(TemplateContext Context = default(TemplateContext), string Id = default(string)) - { - // to ensure "Id" is required (not null) - if (Id == null) - { - throw new InvalidDataException("Id is a required property for TemplateContextResponse and cannot be null"); - } - else - { - this.Id = Id; - } - this.Context = Context; - } - - /// - /// The creation date/time of this response in ISO 8601 format - /// - /// The creation date/time of this response in ISO 8601 format - [DataMember(Name="creationTime", EmitDefaultValue=false)] - public DateTime? CreationTime { get; private set; } - - /// - /// Gets or Sets Context - /// - [DataMember(Name="context", EmitDefaultValue=false)] - public TemplateContext Context { get; set; } - - /// - /// Unique template context id - /// - /// Unique template context id - [DataMember(Name="id", EmitDefaultValue=false)] - public string Id { get; set; } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TemplateContextResponse {\n"); - sb.Append(" CreationTime: ").Append(CreationTime).Append("\n"); - sb.Append(" Context: ").Append(Context).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - // credit: http://stackoverflow.com/a/10454552/677735 - return this.Equals(obj as TemplateContextResponse); - } - - /// - /// Returns true if TemplateContextResponse instances are equal - /// - /// Instance of TemplateContextResponse to be compared - /// Boolean - public bool Equals(TemplateContextResponse other) - { - // credit: http://stackoverflow.com/a/10454552/677735 - if (other == null) - return false; - - return - ( - this.CreationTime == other.CreationTime || - this.CreationTime != null && - this.CreationTime.Equals(other.CreationTime) - ) && - ( - this.Context == other.Context || - this.Context != null && - this.Context.Equals(other.Context) - ) && - ( - this.Id == other.Id || - this.Id != null && - this.Id.Equals(other.Id) - ) && - ( - this.Status == other.Status || - this.Status != null && - this.Status.Equals(other.Status) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - // credit: http://stackoverflow.com/a/263416/677735 - unchecked // Overflow is fine, just wrap - { - int hash = 41; - // Suitable nullity checks etc, of course :) - if (this.CreationTime != null) - hash = hash * 59 + this.CreationTime.GetHashCode(); - if (this.Context != null) - hash = hash * 59 + this.Context.GetHashCode(); - if (this.Id != null) - hash = hash * 59 + this.Id.GetHashCode(); - if (this.Status != null) - hash = hash * 59 + this.Status.GetHashCode(); - return hash; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Properties/AssemblyInfo.cs b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Properties/AssemblyInfo.cs deleted file mode 100644 index f3b9f7d..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Swagger Library")] -[assembly: AssemblyDescription("A library generated from a Swagger doc")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Swagger")] -[assembly: AssemblyProduct("SwaggerLibrary")] -[assembly: AssemblyCopyright("No Copyright")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0")] -[assembly: AssemblyFileVersion("1.0.0")] diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Sphereon.SDK.TemplateProcessor.csproj b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Sphereon.SDK.TemplateProcessor.csproj deleted file mode 100644 index ce1617d..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Sphereon.SDK.TemplateProcessor.csproj +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - Debug - AnyCPU - {B7BDCB2A-887D-499A-821E-50FD30156B3D} - Library - Properties - Sphereon.SDK.TemplateProcessor - Sphereon.SDK.TemplateProcessor - v4.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - $(SolutionDir)\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll - - - $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll - - - - - - - - - - - diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Sphereon.SDK.TemplateProcessor.nuspec b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Sphereon.SDK.TemplateProcessor.nuspec deleted file mode 100644 index 30e8692..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/Sphereon.SDK.TemplateProcessor.nuspec +++ /dev/null @@ -1,41 +0,0 @@ - - - - - $id$ - Swagger Library - - - $version$ - - - $author$ - - - $author$ - false - false - - - A library generated from a Swagger doc - https://sphereon.com - http://www.apache.org/licenses/LICENSE-2.0 - - - - - - - - - - - - - - - - - diff --git a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/packages.config b/csharp-net45/src/Sphereon.SDK.TemplateProcessor/packages.config deleted file mode 100644 index 351ef13..0000000 --- a/csharp-net45/src/Sphereon.SDK.TemplateProcessor/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/html-docs/.swagger-codegen/VERSION b/html-docs/.swagger-codegen/VERSION index 6b4d157..a625450 100644 --- a/html-docs/.swagger-codegen/VERSION +++ b/html-docs/.swagger-codegen/VERSION @@ -1 +1 @@ -2.2.3 \ No newline at end of file +2.3.1 \ No newline at end of file diff --git a/html-docs/index.html b/html-docs/index.html index e8e58b6..1f84f6b 100644 --- a/html-docs/index.html +++ b/html-docs/index.html @@ -61,8 +61,9 @@ * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) * https://github.com/chjj/marked */ -(function(){var block={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:noop,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:noop,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:noop,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};block.bullet=/(?:[*+-]|\d+\.)/;block.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;block.item=replace(block.item,"gm")(/bull/g,block.bullet)();block.list=replace(block.list)(/bull/g,block.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+block.def.source+")")();block.blockquote=replace(block.blockquote)("def",block.def)();block._tag="(?!(?:"+"a|em|strong|small|s|cite|q|dfn|abbr|data|time|code"+"|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo"+"|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b";block.html=replace(block.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,block._tag)();block.paragraph=replace(block.paragraph)("hr",block.hr)("heading",block.heading)("lheading",block.lheading)("blockquote",block.blockquote)("tag","<"+block._tag)("def",block.def)();block.normal=merge({},block);block.gfm=merge({},block.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/});block.gfm.paragraph=replace(block.paragraph)("(?!","(?!"+block.gfm.fences.source.replace("\\1","\\2")+"|"+block.list.source.replace("\\1","\\3")+"|")();block.tables=merge({},block.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});function Lexer(options){this.tokens=[];this.tokens.links={};this.options=options||marked.defaults;this.rules=block.normal;if(this.options.gfm){if(this.options.tables){this.rules=block.tables}else{this.rules=block.gfm}}}Lexer.rules=block;Lexer.lex=function(src,options){var lexer=new Lexer(options);return lexer.lex(src)};Lexer.prototype.lex=function(src){src=src.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n");return this.token(src,true)};Lexer.prototype.token=function(src,top,bq){var src=src.replace(/^ +$/gm,""),next,loose,cap,bull,b,item,space,i,l;while(src){if(cap=this.rules.newline.exec(src)){src=src.substring(cap[0].length);if(cap[0].length>1){this.tokens.push({type:"space"})}}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);cap=cap[0].replace(/^ {4}/gm,"");this.tokens.push({type:"code",text:!this.options.pedantic?cap.replace(/\n+$/,""):cap});continue}if(cap=this.rules.fences.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"code",lang:cap[2],text:cap[3]||""});continue}if(cap=this.rules.heading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[1].length,text:cap[2]});continue}if(top&&(cap=this.rules.nptable.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/\n$/,"").split("\n")};for(i=0;i ?/gm,"");this.token(cap,top,true);this.tokens.push({type:"blockquote_end"});continue}if(cap=this.rules.list.exec(src)){src=src.substring(cap[0].length);bull=cap[2];this.tokens.push({type:"list_start",ordered:bull.length>1});cap=cap[0].match(this.rules.item);next=false;l=cap.length;i=0;for(;i1&&b.length>1)){src=cap.slice(i+1).join("\n")+src;i=l-1}}loose=next||/\n\n(?!\s*$)/.test(item);if(i!==l-1){next=item.charAt(item.length-1)==="\n";if(!loose)loose=next}this.tokens.push({type:loose?"loose_item_start":"list_item_start"});this.token(item,false,bq);this.tokens.push({type:"list_item_end"})}this.tokens.push({type:"list_end"});continue}if(cap=this.rules.html.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&(cap[1]==="pre"||cap[1]==="script"||cap[1]==="style"),text:cap[0]});continue}if(!bq&&top&&(cap=this.rules.def.exec(src))){src=src.substring(cap[0].length);this.tokens.links[cap[1].toLowerCase()]={href:cap[2],title:cap[3]};continue}if(top&&(cap=this.rules.table.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/(?: *\| *)?\n$/,"").split("\n")};for(i=0;i])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:noop,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:noop,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/;inline.link=replace(inline.link)("inside",inline._inside)("href",inline._href)();inline.reflink=replace(inline.reflink)("inside",inline._inside)();inline.normal=merge({},inline);inline.pedantic=merge({},inline.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});inline.gfm=merge({},inline.normal,{escape:replace(inline.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:replace(inline.text)("]|","~]|")("|","|https?://|")()});inline.breaks=merge({},inline.gfm,{br:replace(inline.br)("{2,}","*")(),text:replace(inline.gfm.text)("{2,}","*")()});function InlineLexer(links,options){this.options=options||marked.defaults;this.links=links;this.rules=inline.normal;this.renderer=this.options.renderer||new Renderer;this.renderer.options=this.options;if(!this.links){throw new Error("Tokens array requires a `links` property.")}if(this.options.gfm){if(this.options.breaks){this.rules=inline.breaks}else{this.rules=inline.gfm}}else if(this.options.pedantic){this.rules=inline.pedantic}}InlineLexer.rules=inline;InlineLexer.output=function(src,links,options){var inline=new InlineLexer(links,options);return inline.output(src)};InlineLexer.prototype.output=function(src){var out="",link,text,href,cap;while(src){if(cap=this.rules.escape.exec(src)){src=src.substring(cap[0].length);out+=cap[1];continue}if(cap=this.rules.autolink.exec(src)){src=src.substring(cap[0].length);if(cap[2]==="@"){text=cap[1].charAt(6)===":"?this.mangle(cap[1].substring(7)):this.mangle(cap[1]);href=this.mangle("mailto:")+text}else{text=escape(cap[1]);href=text}out+=this.renderer.link(href,null,text);continue}if(!this.inLink&&(cap=this.rules.url.exec(src))){src=src.substring(cap[0].length);text=escape(cap[1]);href=text;out+=this.renderer.link(href,null,text);continue}if(cap=this.rules.tag.exec(src)){if(!this.inLink&&/^/i.test(cap[0])){this.inLink=false}src=src.substring(cap[0].length);out+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(cap[0]):escape(cap[0]):cap[0];continue}if(cap=this.rules.link.exec(src)){src=src.substring(cap[0].length);this.inLink=true;out+=this.outputLink(cap,{href:cap[2],title:cap[3]});this.inLink=false;continue}if((cap=this.rules.reflink.exec(src))||(cap=this.rules.nolink.exec(src))){src=src.substring(cap[0].length);link=(cap[2]||cap[1]).replace(/\s+/g," ");link=this.links[link.toLowerCase()];if(!link||!link.href){out+=cap[0].charAt(0);src=cap[0].substring(1)+src;continue}this.inLink=true;out+=this.outputLink(cap,link);this.inLink=false;continue}if(cap=this.rules.strong.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.strong(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.em.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.em(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.codespan(escape(cap[2],true));continue}if(cap=this.rules.br.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.br();continue}if(cap=this.rules.del.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.del(this.output(cap[1]));continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.text(escape(this.smartypants(cap[0])));continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return out};InlineLexer.prototype.outputLink=function(cap,link){var href=escape(link.href),title=link.title?escape(link.title):null;return cap[0].charAt(0)!=="!"?this.renderer.link(href,title,this.output(cap[1])):this.renderer.image(href,title,escape(cap[1]))};InlineLexer.prototype.smartypants=function(text){if(!this.options.smartypants)return text;return text.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")};InlineLexer.prototype.mangle=function(text){if(!this.options.mangle)return text;var out="",l=text.length,i=0,ch;for(;i.5){ch="x"+ch.toString(16)}out+="&#"+ch+";"}return out};function Renderer(options){this.options=options||{}}Renderer.prototype.code=function(code,lang,escaped){if(this.options.highlight){var out=this.options.highlight(code,lang);if(out!=null&&out!==code){escaped=true;code=out}}if(!lang){return"
    "+(escaped?code:escape(code,true))+"\n
    "}return'
    '+(escaped?code:escape(code,true))+"\n
    \n"};Renderer.prototype.blockquote=function(quote){return"
    \n"+quote+"
    \n"};Renderer.prototype.html=function(html){return html};Renderer.prototype.heading=function(text,level,raw){return"'+text+"\n"};Renderer.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"};Renderer.prototype.list=function(body,ordered){var type=ordered?"ol":"ul";return"<"+type+">\n"+body+"\n"};Renderer.prototype.listitem=function(text){return"
  • "+text+"
  • \n"};Renderer.prototype.paragraph=function(text){return"

    "+text+"

    \n"};Renderer.prototype.table=function(header,body){return"\n"+"\n"+header+"\n"+"\n"+body+"\n"+"
    \n"};Renderer.prototype.tablerow=function(content){return"\n"+content+"\n"};Renderer.prototype.tablecell=function(content,flags){var type=flags.header?"th":"td";var tag=flags.align?"<"+type+' style="text-align:'+flags.align+'">':"<"+type+">";return tag+content+"\n"};Renderer.prototype.strong=function(text){return""+text+""};Renderer.prototype.em=function(text){return""+text+""};Renderer.prototype.codespan=function(text){return""+text+""};Renderer.prototype.br=function(){return this.options.xhtml?"
    ":"
    "};Renderer.prototype.del=function(text){return""+text+""};Renderer.prototype.link=function(href,title,text){if(this.options.sanitize){try{var prot=decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(prot.indexOf("javascript:")===0||prot.indexOf("vbscript:")===0){return""}}var out='
    ";return out};Renderer.prototype.image=function(href,title,text){var out=''+text+'":">";return out};Renderer.prototype.text=function(text){return text};function Parser(options){this.tokens=[];this.token=null;this.options=options||marked.defaults;this.options.renderer=this.options.renderer||new Renderer;this.renderer=this.options.renderer;this.renderer.options=this.options}Parser.parse=function(src,options,renderer){var parser=new Parser(options,renderer);return parser.parse(src)};Parser.prototype.parse=function(src){this.inline=new InlineLexer(src.links,this.options,this.renderer);this.tokens=src.reverse();var out="";while(this.next()){out+=this.tok()}return out};Parser.prototype.next=function(){return this.token=this.tokens.pop()};Parser.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};Parser.prototype.parseText=function(){var body=this.token.text;while(this.peek().type==="text"){body+="\n"+this.next().text}return this.inline.output(body)};Parser.prototype.tok=function(){switch(this.token.type){case"space":{return""}case"hr":{return this.renderer.hr()}case"heading":{return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text)}case"code":{return this.renderer.code(this.token.text,this.token.lang,this.token.escaped)}case"table":{var header="",body="",i,row,cell,flags,j;cell="";for(i=0;i/g,">").replace(/"/g,""").replace(/'/g,"'")}function unescape(html){return html.replace(/&([#\w]+);/g,function(_,n){n=n.toLowerCase();if(n==="colon")return":";if(n.charAt(0)==="#"){return n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1))}return""})}function replace(regex,opt){regex=regex.source;opt=opt||"";return function self(name,val){if(!name)return new RegExp(regex,opt);val=val.source||val;val=val.replace(/(^|[^\[])\^/g,"$1");regex=regex.replace(name,val);return self}}function noop(){}noop.exec=noop;function merge(obj){var i=1,target,key;for(;iAn error occured:

    "+escape(e.message+"",true)+"
    "}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,sanitizer:null,mangle:true,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof module!=="undefined"&&typeof exports==="object"){module.exports=marked}else if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}).call(function(){return this||(typeof window!=="undefined"?window:global)}()); +(function(){var block={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:noop,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:noop,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:noop,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};block.bullet=/(?:[*+-]|\d+\.)/;block.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;block.item=replace(block.item,"gm")(/bull/g,block.bullet)();block.list=replace(block.list)(/bull/g,block.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+block.def.source+")")();block.blockquote=replace(block.blockquote)("def",block.def)();block._tag="(?!(?:"+"a|em|strong|small|s|cite|q|dfn|abbr|data|time|code"+"|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo"+"|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b";block.html=replace(block.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,block._tag)();block.paragraph=replace(block.paragraph)("hr",block.hr)("heading",block.heading)("lheading",block.lheading)("blockquote",block.blockquote)("tag","<"+block._tag)("def",block.def)();block.normal=merge({},block);block.gfm=merge({},block.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/});block.gfm.paragraph=replace(block.paragraph)("(?!","(?!"+block.gfm.fences.source.replace("\\1","\\2")+"|"+block.list.source.replace("\\1","\\3")+"|")();block.tables=merge({},block.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/});function Lexer(options){this.tokens=[];this.tokens.links={};this.options=options||marked.defaults;this.rules=block.normal;if(this.options.gfm){if(this.options.tables){this.rules=block.tables}else{this.rules=block.gfm}}}Lexer.rules=block;Lexer.lex=function(src,options){var lexer=new Lexer(options);return lexer.lex(src)};Lexer.prototype.lex=function(src){src=src.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n");return this.token(src,true)};Lexer.prototype.token=function(src,top,bq){var src=src.replace(/^ +$/gm,""),next,loose,cap,bull,b,item,space,i,l;while(src){if(cap=this.rules.newline.exec(src)){src=src.substring(cap[0].length);if(cap[0].length>1){this.tokens.push({type:"space"})}}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);cap=cap[0].replace(/^ {4}/gm,"");this.tokens.push({type:"code",text:!this.options.pedantic?cap.replace(/\n+$/,""):cap});continue}if(cap=this.rules.fences.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"code",lang:cap[2],text:cap[3]||""});continue}if(cap=this.rules.heading.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:"heading",depth:cap[1].length,text:cap[2]});continue}if(top&&(cap=this.rules.nptable.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/\n$/,"").split("\n")};for(i=0;i ?/gm,"");this.token(cap,top,true);this.tokens.push({type:"blockquote_end"});continue}if(cap=this.rules.list.exec(src)){src=src.substring(cap[0].length);bull=cap[2];this.tokens.push({type:"list_start",ordered:bull.length>1});cap=cap[0].match(this.rules.item);next=false;l=cap.length;i=0;for(;i1&&b.length>1)){src=cap.slice(i+1).join("\n")+src;i=l-1}}loose=next||/\n\n(?!\s*$)/.test(item);if(i!==l-1){next=item.charAt(item.length-1)==="\n";if(!loose)loose=next}this.tokens.push({type:loose?"loose_item_start":"list_item_start"});this.token(item,false,bq);this.tokens.push({type:"list_item_end"})}this.tokens.push({type:"list_end"});continue}if(cap=this.rules.html.exec(src)){src=src.substring(cap[0].length);this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&(cap[1]==="pre"||cap[1]==="script"||cap[1]==="style"),text:cap[0]});continue}if(!bq&&top&&(cap=this.rules.def.exec(src))){src=src.substring(cap[0].length);this.tokens.links[cap[1].toLowerCase()]={href:cap[2],title:cap[3]};continue}if(top&&(cap=this.rules.table.exec(src))){src=src.substring(cap[0].length);item={type:"table",header:cap[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:cap[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:cap[3].replace(/(?: *\| *)?\n$/,"").split("\n")};for(i=0;i])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:noop,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:noop,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/;inline.link=replace(inline.link)("inside",inline._inside)("href",inline._href)();inline.reflink=replace(inline.reflink)("inside",inline._inside)();inline.normal=merge({},inline);inline.pedantic=merge({},inline.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/});inline.gfm=merge({},inline.normal,{escape:replace(inline.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:replace(inline.text)("]|","~]|")("|","|https?://|")()});inline.breaks=merge({},inline.gfm,{br:replace(inline.br)("{2,}","*")(),text:replace(inline.gfm.text)("{2,}","*")()});function InlineLexer(links,options){this.options=options||marked.defaults;this.links=links;this.rules=inline.normal;this.renderer=this.options.renderer||new Renderer;this.renderer.options=this.options;if(!this.links){throw new Error("Tokens array requires a `links` property.")}if(this.options.gfm){if(this.options.breaks){this.rules=inline.breaks}else{this.rules=inline.gfm}}else if(this.options.pedantic){this.rules=inline.pedantic}}InlineLexer.rules=inline;InlineLexer.output=function(src,links,options){var inline=new InlineLexer(links,options);return inline.output(src)};InlineLexer.prototype.output=function(src){var out="",link,text,href,cap;while(src){if(cap=this.rules.escape.exec(src)){src=src.substring(cap[0].length);out+=cap[1];continue}if(cap=this.rules.autolink.exec(src)){src=src.substring(cap[0].length);if(cap[2]==="@"){text=cap[1].charAt(6)===":"?this.mangle(cap[1].substring(7)):this.mangle(cap[1]);href=this.mangle("mailto:")+text}else{text=escape(cap[1]);href=text}out+=this.renderer.link(href,null,text);continue}if(!this.inLink&&(cap=this.rules.url.exec(src))){src=src.substring(cap[0].length);text=escape(cap[1]);href=text;out+=this.renderer.link(href,null,text);continue}if(cap=this.rules.tag.exec(src)){if(!this.inLink&&/^
    /i.test(cap[0])){this.inLink=false}src=src.substring(cap[0].length);out+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(cap[0]):escape(cap[0]):cap[0];continue}if(cap=this.rules.link.exec(src)){src=src.substring(cap[0].length);this.inLink=true;out+=this.outputLink(cap,{href:cap[2],title:cap[3]});this.inLink=false;continue}if((cap=this.rules.reflink.exec(src))||(cap=this.rules.nolink.exec(src))){src=src.substring(cap[0].length);link=(cap[2]||cap[1]).replace(/\s+/g," ");link=this.links[link.toLowerCase()];if(!link||!link.href){out+=cap[0].charAt(0);src=cap[0].substring(1)+src;continue}this.inLink=true;out+=this.outputLink(cap,link);this.inLink=false;continue}if(cap=this.rules.strong.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.strong(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.em.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.em(this.output(cap[2]||cap[1]));continue}if(cap=this.rules.code.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.codespan(escape(cap[2],true));continue}if(cap=this.rules.br.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.br();continue}if(cap=this.rules.del.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.del(this.output(cap[1]));continue}if(cap=this.rules.text.exec(src)){src=src.substring(cap[0].length);out+=this.renderer.text(escape(this.smartypants(cap[0])));continue}if(src){throw new Error("Infinite loop on byte: "+src.charCodeAt(0))}}return out};InlineLexer.prototype.outputLink=function(cap,link){var href=escape(link.href),title=link.title?escape(link.title):null;return cap[0].charAt(0)!=="!"?this.renderer.link(href,title,this.output(cap[1])):this.renderer.image(href,title,escape(cap[1]))};InlineLexer.prototype.smartypants=function(text){if(!this.options.smartypants)return text;return text.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")};InlineLexer.prototype.mangle=function(text){if(!this.options.mangle)return text;var out="",l=text.length,i=0,ch;for(;i.5){ch="x"+ch.toString(16)}out+="&#"+ch+";"}return out};function Renderer(options){this.options=options||{}}Renderer.prototype.code=function(code,lang,escaped){if(this.options.highlight){var out=this.options.highlight(code,lang);if(out!=null&&out!==code){escaped=true;code=out}}if(!lang){return"
    "+(escaped?code:escape(code,true))+"\n
    "}return'
    '+(escaped?code:escape(code,true))+"\n
    \n"};Renderer.prototype.blockquote=function(quote){return"
    \n"+quote+"
    \n"};Renderer.prototype.html=function(html){return html};Renderer.prototype.heading=function(text,level,raw){return"'+text+"\n"};Renderer.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"};Renderer.prototype.list=function(body,ordered){var type=ordered?"ol":"ul";return"<"+type+">\n"+body+"\n"};Renderer.prototype.listitem=function(text){return"
  • "+text+"
  • \n"};Renderer.prototype.paragraph=function(text){return"

    "+text+"

    \n"};Renderer.prototype.table=function(header,body){return"\n"+"\n"+header+"\n"+"\n"+body+"\n"+"
    \n"};Renderer.prototype.tablerow=function(content){return"\n"+content+"\n"};Renderer.prototype.tablecell=function(content,flags){var type=flags.header?"th":"td";var tag=flags.align?"<"+type+' style="text-align:'+flags.align+'">':"<"+type+">";return tag+content+"\n"};Renderer.prototype.strong=function(text){return""+text+""};Renderer.prototype.em=function(text){return""+text+""};Renderer.prototype.codespan=function(text){return""+text+""};Renderer.prototype.br=function(){return this.options.xhtml?"
    ":"
    "};Renderer.prototype.del=function(text){return""+text+""};Renderer.prototype.link=function(href,title,text){if(this.options.sanitize){try{var prot=decodeURIComponent(unescape(href)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(prot.indexOf("javascript:")===0||prot.indexOf("vbscript:")===0){return""}}var out='
    ";return out};Renderer.prototype.image=function(href,title,text){var out=''+text+'":">";return out};Renderer.prototype.text=function(text){return text};function Parser(options){this.tokens=[];this.token=null;this.options=options||marked.defaults;this.options.renderer=this.options.renderer||new Renderer;this.renderer=this.options.renderer;this.renderer.options=this.options}Parser.parse=function(src,options,renderer){var parser=new Parser(options,renderer);return parser.parse(src)};Parser.prototype.parse=function(src){this.inline=new InlineLexer(src.links,this.options,this.renderer);this.tokens=src.reverse();var out="";while(this.next()){out+=this.tok()}return out};Parser.prototype.next=function(){return this.token=this.tokens.pop()};Parser.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0};Parser.prototype.parseText=function(){var body=this.token.text;while(this.peek().type==="text"){body+="\n"+this.next().text}return this.inline.output(body)};Parser.prototype.tok=function(){switch(this.token.type){case"space":{return""}case"hr":{return this.renderer.hr()}case"heading":{return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text)}case"code":{return this.renderer.code(this.token.text,this.token.lang,this.token.escaped)}case"table":{var header="",body="",i,row,cell,flags,j;cell="";for(i=0;i/g,">").replace(/"/g,""").replace(/'/g,"'")}function unescape(html){return html.replace(/&([#\w]+);/g,function(_,n){n=n.toLowerCase();if(n==="colon")return":";if(n.charAt(0)==="#"){return n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1))}return""})}function replace(regex,opt){regex=regex.source;opt=opt||"";return function self(name,val){if(!name)return new RegExp(regex,opt);val=val.source||val;val=val.replace(/(^|[^\[])\^/g,"$1");regex=regex.replace(name,val);return self}}function noop(){}noop.exec=noop;function merge(obj){var i=1,target,key;for(;iAn error occurred:

    "+escape(e.message+"",true)+"
    "}throw e}}marked.options=marked.setOptions=function(opt){merge(marked.defaults,opt);return marked};marked.defaults={gfm:true,tables:true,breaks:false,pedantic:false,sanitize:false,sanitizer:null,mangle:true,smartLists:false,silent:false,highlight:null,langPrefix:"lang-",smartypants:false,headerPrefix:"",renderer:new Renderer,xhtml:false};marked.Parser=Parser;marked.parser=Parser.parse;marked.Renderer=Renderer;marked.Lexer=Lexer;marked.lexer=Lexer.lex;marked.InlineLexer=InlineLexer;marked.inlineLexer=InlineLexer.output;marked.parse=marked;if(typeof module!=="undefined"&&typeof exports==="object"){module.exports=marked}else if(typeof define==="function"&&define.amd){define(function(){return marked})}else{this.marked=marked}}).call(function(){return this||(typeof window!=="undefined"?window:global)}()); + +