From 73b0d9b149fbfdeedbe5c18f41f7ec1b60a2cb0a Mon Sep 17 00:00:00 2001 From: Volodymyr Hadomskyi Date: Sun, 5 Jan 2025 11:27:03 +0100 Subject: [PATCH] initial commit --- .github/workflows/maven.yml | 30 + .gitignore | 21 + .openapi-generator-ignore | 23 + .openapi-generator/FILES | 92 + .openapi-generator/VERSION | 1 + .travis.yml | 22 + README.md | 183 ++ api/openapi.yaml | 1675 +++++++++++++++++ build.gradle | 168 ++ build.sbt | 28 + docs/CreditTransactionsApi.md | 72 + docs/ErrorResponse.md | 15 + docs/JobResponse.md | 58 + docs/JobsApi.md | 675 +++++++ docs/JobsResponse.md | 15 + docs/NewJobOptions.md | 28 + docs/NewOrganizationOptions.md | 17 + docs/OrganizationApi.md | 74 + docs/OrganizationResponse.md | 15 + docs/PreviewTranslationResponseInner.md | 15 + docs/RegistrationApi.md | 72 + ...ansactionCreateCreditTransactionRequest.md | 13 + docs/SettingsApi.md | 144 ++ docs/SettingsResponse.md | 25 + docs/TranslationResponse.md | 36 + docs/TranslationsApi.md | 510 +++++ docs/TranslationsResponse.md | 15 + docs/UpdateDeliveryOptions.md | 28 + docs/UpdateJobOptions.md | 28 + git_push.sh | 57 + gradle.properties | 6 + gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 59536 bytes gradle/wrapper/gradle-wrapper.properties | 5 + gradlew | 234 +++ gradlew.bat | 89 + pom.xml | 344 ++++ settings.gradle | 1 + src/main/AndroidManifest.xml | 3 + .../java/LiltConnectorSDK/ApiCallback.java | 62 + src/main/java/LiltConnectorSDK/ApiClient.java | 1593 ++++++++++++++++ .../java/LiltConnectorSDK/ApiException.java | 167 ++ .../java/LiltConnectorSDK/ApiResponse.java | 76 + .../java/LiltConnectorSDK/Configuration.java | 41 + .../GzipRequestInterceptor.java | 85 + src/main/java/LiltConnectorSDK/JSON.java | 420 +++++ src/main/java/LiltConnectorSDK/Pair.java | 57 + .../LiltConnectorSDK/ProgressRequestBody.java | 73 + .../ProgressResponseBody.java | 70 + .../LiltConnectorSDK/ServerConfiguration.java | 59 + .../java/LiltConnectorSDK/ServerVariable.java | 24 + .../java/LiltConnectorSDK/StringUtil.java | 83 + .../LiltConnectorSDK/auth/ApiKeyAuth.java | 80 + .../LiltConnectorSDK/auth/Authentication.java | 36 + .../LiltConnectorSDK/auth/HttpBasicAuth.java | 57 + .../LiltConnectorSDK/auth/HttpBearerAuth.java | 75 + .../client/api/CreditTransactionsApi.java | 206 ++ .../org/openapitools/client/api/JobsApi.java | 1435 ++++++++++++++ .../client/api/OrganizationApi.java | 205 ++ .../client/api/RegistrationApi.java | 198 ++ .../openapitools/client/api/SettingsApi.java | 339 ++++ .../client/api/TranslationsApi.java | 1097 +++++++++++ .../client/model/AbstractOpenApiSchema.java | 146 ++ .../client/model/ErrorResponse.java | 261 +++ .../client/model/JobResponse.java | 653 +++++++ .../client/model/JobsResponse.java | 280 +++ .../client/model/NewJobOptions.java | 442 +++++ .../client/model/NewOrganizationOptions.java | 313 +++ .../client/model/OrganizationResponse.java | 259 +++ .../PreviewTranslationResponseInner.java | 264 +++ ...sactionCreateCreditTransactionRequest.java | 206 ++ .../client/model/SettingsResponse.java | 322 ++++ .../client/model/TranslationResponse.java | 537 ++++++ .../client/model/TranslationsResponse.java | 280 +++ .../client/model/UpdateDeliveryOptions.java | 301 +++ .../client/model/UpdateJobOptions.java | 326 ++++ .../client/api/CreditTransactionsApiTest.java | 47 + .../openapitools/client/api/JobsApiTest.java | 171 ++ .../client/api/OrganizationApiTest.java | 46 + .../client/api/RegistrationApiTest.java | 49 + .../client/api/SettingsApiTest.java | 58 + .../client/api/TranslationsApiTest.java | 125 ++ .../client/model/ErrorResponseTest.java | 64 + .../client/model/JobResponseTest.java | 123 ++ .../client/model/JobsResponseTest.java | 67 + .../client/model/NewJobOptionsTest.java | 99 + .../model/NewOrganizationOptionsTest.java | 80 + .../model/OrganizationResponseTest.java | 65 + .../PreviewTranslationResponseInnerTest.java | 64 + ...ionCreateCreditTransactionRequestTest.java | 48 + .../client/model/SettingsResponseTest.java | 64 + .../client/model/TranslationResponseTest.java | 121 ++ .../model/TranslationsResponseTest.java | 67 + .../model/UpdateDeliveryOptionsTest.java | 56 + .../client/model/UpdateJobOptionsTest.java | 65 + 94 files changed, 17444 insertions(+) create mode 100644 .github/workflows/maven.yml create mode 100644 .gitignore create mode 100644 .openapi-generator-ignore create mode 100644 .openapi-generator/FILES create mode 100644 .openapi-generator/VERSION create mode 100644 .travis.yml create mode 100644 README.md create mode 100644 api/openapi.yaml create mode 100644 build.gradle create mode 100644 build.sbt create mode 100644 docs/CreditTransactionsApi.md create mode 100644 docs/ErrorResponse.md create mode 100644 docs/JobResponse.md create mode 100644 docs/JobsApi.md create mode 100644 docs/JobsResponse.md create mode 100644 docs/NewJobOptions.md create mode 100644 docs/NewOrganizationOptions.md create mode 100644 docs/OrganizationApi.md create mode 100644 docs/OrganizationResponse.md create mode 100644 docs/PreviewTranslationResponseInner.md create mode 100644 docs/RegistrationApi.md create mode 100644 docs/ServicesApiCreditTransactionCreateCreditTransactionRequest.md create mode 100644 docs/SettingsApi.md create mode 100644 docs/SettingsResponse.md create mode 100644 docs/TranslationResponse.md create mode 100644 docs/TranslationsApi.md create mode 100644 docs/TranslationsResponse.md create mode 100644 docs/UpdateDeliveryOptions.md create mode 100644 docs/UpdateJobOptions.md create mode 100644 git_push.sh create mode 100644 gradle.properties create mode 100644 gradle/wrapper/gradle-wrapper.jar create mode 100644 gradle/wrapper/gradle-wrapper.properties create mode 100644 gradlew create mode 100644 gradlew.bat create mode 100644 pom.xml create mode 100644 settings.gradle create mode 100644 src/main/AndroidManifest.xml create mode 100644 src/main/java/LiltConnectorSDK/ApiCallback.java create mode 100644 src/main/java/LiltConnectorSDK/ApiClient.java create mode 100644 src/main/java/LiltConnectorSDK/ApiException.java create mode 100644 src/main/java/LiltConnectorSDK/ApiResponse.java create mode 100644 src/main/java/LiltConnectorSDK/Configuration.java create mode 100644 src/main/java/LiltConnectorSDK/GzipRequestInterceptor.java create mode 100644 src/main/java/LiltConnectorSDK/JSON.java create mode 100644 src/main/java/LiltConnectorSDK/Pair.java create mode 100644 src/main/java/LiltConnectorSDK/ProgressRequestBody.java create mode 100644 src/main/java/LiltConnectorSDK/ProgressResponseBody.java create mode 100644 src/main/java/LiltConnectorSDK/ServerConfiguration.java create mode 100644 src/main/java/LiltConnectorSDK/ServerVariable.java create mode 100644 src/main/java/LiltConnectorSDK/StringUtil.java create mode 100644 src/main/java/LiltConnectorSDK/auth/ApiKeyAuth.java create mode 100644 src/main/java/LiltConnectorSDK/auth/Authentication.java create mode 100644 src/main/java/LiltConnectorSDK/auth/HttpBasicAuth.java create mode 100644 src/main/java/LiltConnectorSDK/auth/HttpBearerAuth.java create mode 100644 src/main/java/org/openapitools/client/api/CreditTransactionsApi.java create mode 100644 src/main/java/org/openapitools/client/api/JobsApi.java create mode 100644 src/main/java/org/openapitools/client/api/OrganizationApi.java create mode 100644 src/main/java/org/openapitools/client/api/RegistrationApi.java create mode 100644 src/main/java/org/openapitools/client/api/SettingsApi.java create mode 100644 src/main/java/org/openapitools/client/api/TranslationsApi.java create mode 100644 src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java create mode 100644 src/main/java/org/openapitools/client/model/ErrorResponse.java create mode 100644 src/main/java/org/openapitools/client/model/JobResponse.java create mode 100644 src/main/java/org/openapitools/client/model/JobsResponse.java create mode 100644 src/main/java/org/openapitools/client/model/NewJobOptions.java create mode 100644 src/main/java/org/openapitools/client/model/NewOrganizationOptions.java create mode 100644 src/main/java/org/openapitools/client/model/OrganizationResponse.java create mode 100644 src/main/java/org/openapitools/client/model/PreviewTranslationResponseInner.java create mode 100644 src/main/java/org/openapitools/client/model/ServicesApiCreditTransactionCreateCreditTransactionRequest.java create mode 100644 src/main/java/org/openapitools/client/model/SettingsResponse.java create mode 100644 src/main/java/org/openapitools/client/model/TranslationResponse.java create mode 100644 src/main/java/org/openapitools/client/model/TranslationsResponse.java create mode 100644 src/main/java/org/openapitools/client/model/UpdateDeliveryOptions.java create mode 100644 src/main/java/org/openapitools/client/model/UpdateJobOptions.java create mode 100644 src/test/java/org/openapitools/client/api/CreditTransactionsApiTest.java create mode 100644 src/test/java/org/openapitools/client/api/JobsApiTest.java create mode 100644 src/test/java/org/openapitools/client/api/OrganizationApiTest.java create mode 100644 src/test/java/org/openapitools/client/api/RegistrationApiTest.java create mode 100644 src/test/java/org/openapitools/client/api/SettingsApiTest.java create mode 100644 src/test/java/org/openapitools/client/api/TranslationsApiTest.java create mode 100644 src/test/java/org/openapitools/client/model/ErrorResponseTest.java create mode 100644 src/test/java/org/openapitools/client/model/JobResponseTest.java create mode 100644 src/test/java/org/openapitools/client/model/JobsResponseTest.java create mode 100644 src/test/java/org/openapitools/client/model/NewJobOptionsTest.java create mode 100644 src/test/java/org/openapitools/client/model/NewOrganizationOptionsTest.java create mode 100644 src/test/java/org/openapitools/client/model/OrganizationResponseTest.java create mode 100644 src/test/java/org/openapitools/client/model/PreviewTranslationResponseInnerTest.java create mode 100644 src/test/java/org/openapitools/client/model/ServicesApiCreditTransactionCreateCreditTransactionRequestTest.java create mode 100644 src/test/java/org/openapitools/client/model/SettingsResponseTest.java create mode 100644 src/test/java/org/openapitools/client/model/TranslationResponseTest.java create mode 100644 src/test/java/org/openapitools/client/model/TranslationsResponseTest.java create mode 100644 src/test/java/org/openapitools/client/model/UpdateDeliveryOptionsTest.java create mode 100644 src/test/java/org/openapitools/client/model/UpdateJobOptionsTest.java diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000..260052e --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,30 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven +# +# This file is auto-generated by OpenAPI Generator (https://openapi-generator.tech) + +name: Java CI with Maven + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + build: + name: Build Lilt Connector Plugin API + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '8' ] + steps: + - uses: actions/checkout@v4 + - name: Set up JDK + uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.java }} + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -B package --no-transfer-progress --file pom.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a530464 --- /dev/null +++ b/.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/.openapi-generator-ignore b/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# 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 OpenAPI Generator 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/.openapi-generator/FILES b/.openapi-generator/FILES new file mode 100644 index 0000000..c1a101c --- /dev/null +++ b/.openapi-generator/FILES @@ -0,0 +1,92 @@ +.github/workflows/maven.yml +.gitignore +.openapi-generator-ignore +.travis.yml +README.md +api/openapi.yaml +build.gradle +build.sbt +docs/CreditTransactionsApi.md +docs/ErrorResponse.md +docs/JobResponse.md +docs/JobsApi.md +docs/JobsResponse.md +docs/NewJobOptions.md +docs/NewOrganizationOptions.md +docs/OrganizationApi.md +docs/OrganizationResponse.md +docs/PreviewTranslationResponseInner.md +docs/RegistrationApi.md +docs/ServicesApiCreditTransactionCreateCreditTransactionRequest.md +docs/SettingsApi.md +docs/SettingsResponse.md +docs/TranslationResponse.md +docs/TranslationsApi.md +docs/TranslationsResponse.md +docs/UpdateDeliveryOptions.md +docs/UpdateJobOptions.md +git_push.sh +gradle.properties +gradle/wrapper/gradle-wrapper.jar +gradle/wrapper/gradle-wrapper.properties +gradlew +gradlew.bat +pom.xml +settings.gradle +src/main/AndroidManifest.xml +src/main/java/LiltConnectorSDK/ApiCallback.java +src/main/java/LiltConnectorSDK/ApiClient.java +src/main/java/LiltConnectorSDK/ApiException.java +src/main/java/LiltConnectorSDK/ApiResponse.java +src/main/java/LiltConnectorSDK/Configuration.java +src/main/java/LiltConnectorSDK/GzipRequestInterceptor.java +src/main/java/LiltConnectorSDK/JSON.java +src/main/java/LiltConnectorSDK/Pair.java +src/main/java/LiltConnectorSDK/ProgressRequestBody.java +src/main/java/LiltConnectorSDK/ProgressResponseBody.java +src/main/java/LiltConnectorSDK/ServerConfiguration.java +src/main/java/LiltConnectorSDK/ServerVariable.java +src/main/java/LiltConnectorSDK/StringUtil.java +src/main/java/LiltConnectorSDK/auth/ApiKeyAuth.java +src/main/java/LiltConnectorSDK/auth/Authentication.java +src/main/java/LiltConnectorSDK/auth/HttpBasicAuth.java +src/main/java/LiltConnectorSDK/auth/HttpBearerAuth.java +src/main/java/org/openapitools/client/api/CreditTransactionsApi.java +src/main/java/org/openapitools/client/api/JobsApi.java +src/main/java/org/openapitools/client/api/OrganizationApi.java +src/main/java/org/openapitools/client/api/RegistrationApi.java +src/main/java/org/openapitools/client/api/SettingsApi.java +src/main/java/org/openapitools/client/api/TranslationsApi.java +src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java +src/main/java/org/openapitools/client/model/ErrorResponse.java +src/main/java/org/openapitools/client/model/JobResponse.java +src/main/java/org/openapitools/client/model/JobsResponse.java +src/main/java/org/openapitools/client/model/NewJobOptions.java +src/main/java/org/openapitools/client/model/NewOrganizationOptions.java +src/main/java/org/openapitools/client/model/OrganizationResponse.java +src/main/java/org/openapitools/client/model/PreviewTranslationResponseInner.java +src/main/java/org/openapitools/client/model/ServicesApiCreditTransactionCreateCreditTransactionRequest.java +src/main/java/org/openapitools/client/model/SettingsResponse.java +src/main/java/org/openapitools/client/model/TranslationResponse.java +src/main/java/org/openapitools/client/model/TranslationsResponse.java +src/main/java/org/openapitools/client/model/UpdateDeliveryOptions.java +src/main/java/org/openapitools/client/model/UpdateJobOptions.java +src/test/java/org/openapitools/client/api/CreditTransactionsApiTest.java +src/test/java/org/openapitools/client/api/JobsApiTest.java +src/test/java/org/openapitools/client/api/OrganizationApiTest.java +src/test/java/org/openapitools/client/api/RegistrationApiTest.java +src/test/java/org/openapitools/client/api/SettingsApiTest.java +src/test/java/org/openapitools/client/api/TranslationsApiTest.java +src/test/java/org/openapitools/client/model/ErrorResponseTest.java +src/test/java/org/openapitools/client/model/JobResponseTest.java +src/test/java/org/openapitools/client/model/JobsResponseTest.java +src/test/java/org/openapitools/client/model/NewJobOptionsTest.java +src/test/java/org/openapitools/client/model/NewOrganizationOptionsTest.java +src/test/java/org/openapitools/client/model/OrganizationResponseTest.java +src/test/java/org/openapitools/client/model/PreviewTranslationResponseInnerTest.java +src/test/java/org/openapitools/client/model/ServicesApiCreditTransactionCreateCreditTransactionRequestTest.java +src/test/java/org/openapitools/client/model/SettingsResponseTest.java +src/test/java/org/openapitools/client/model/TranslationResponseTest.java +src/test/java/org/openapitools/client/model/TranslationsResponseTest.java +src/test/java/org/openapitools/client/model/UpdateDeliveryOptionsTest.java +src/test/java/org/openapitools/client/model/UpdateJobOptionsTest.java diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION new file mode 100644 index 0000000..ecb2186 --- /dev/null +++ b/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.6.0-SNAPSHOT diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..1b6741c --- /dev/null +++ b/.travis.yml @@ -0,0 +1,22 @@ +# +# Generated by OpenAPI Generator: https://openapi-generator.tech +# +# Ref: https://docs.travis-ci.com/user/languages/java/ +# +language: java +jdk: + - openjdk12 + - openjdk11 + - openjdk10 + - openjdk9 + - openjdk8 +before_install: + # ensure gradlew has proper permission + - chmod a+x ./gradlew +script: + # test using maven + #- mvn test + # test using gradle + - gradle test + # test using sbt + # - sbt test diff --git a/README.md b/README.md new file mode 100644 index 0000000..7d3d743 --- /dev/null +++ b/README.md @@ -0,0 +1,183 @@ +# openapi-java-client + +Lilt Connector Plugin API +- API version: 1.0 + - Build date: 2025-01-05T09:10:14.232589379Z[Etc/UTC] + - Generator version: 7.6.0-SNAPSHOT + +This document describes the Plugin API for Lilt's Connector platform. The +Plugin API is intented to be used by developers who wish to build +integrations into their desired systems. The purpose of this API is to +enable content transfer and status monitoring for localization projects. + +- Read more about the concepts and workflows in the + [user guide](/docs/api/v1.0). +- Test the API interactively via [Swagger UI](/api/v1.0/ui). + + + +*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* + + +## Requirements + +Building the API client library requires: +1. Java 1.8+ +2. Maven (3.8.3+)/Gradle (7.2+) + +## Installation + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn clean install +``` + +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: + +```shell +mvn clean deploy +``` + +Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. + +### Maven users + +Add this dependency to your project's POM: + +```xml + + org.openapitools + openapi-java-client + 1.0 + compile + +``` + +### Gradle users + +Add this dependency to your project's build file: + +```groovy + repositories { + mavenCentral() // Needed if the 'openapi-java-client' jar has been published to maven central. + mavenLocal() // Needed if the 'openapi-java-client' jar has been published to the local maven repo. + } + + dependencies { + implementation "org.openapitools:openapi-java-client:1.0" + } +``` + +### Others + +At first generate the JAR by executing: + +```shell +mvn clean package +``` + +Then manually install the following JARs: + +* `target/openapi-java-client-1.0.jar` +* `target/lib/*.jar` + +## Getting Started + +Please follow the [installation](#installation) instruction and execute the following Java code: + +```java + +// Import classes: +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.models.*; +import org.openapitools.client.api.CreditTransactionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://connectors-admin.lilt.com/api/v1.0"); + + CreditTransactionsApi apiInstance = new CreditTransactionsApi(defaultClient); + ServicesApiCreditTransactionCreateCreditTransactionRequest servicesApiCreditTransactionCreateCreditTransactionRequest = new ServicesApiCreditTransactionCreateCreditTransactionRequest(); // ServicesApiCreditTransactionCreateCreditTransactionRequest | + try { + apiInstance.servicesApiCreditTransactionCreateCreditTransaction(servicesApiCreditTransactionCreateCreditTransactionRequest); + } catch (ApiException e) { + System.err.println("Exception when calling CreditTransactionsApi#servicesApiCreditTransactionCreateCreditTransaction"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://connectors-admin.lilt.com/api/v1.0* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreditTransactionsApi* | [**servicesApiCreditTransactionCreateCreditTransaction**](docs/CreditTransactionsApi.md#servicesApiCreditTransactionCreateCreditTransaction) | **POST** /credit-transaction | Create a credit transaction. Request is expected to contain credits information encoded in jwt_token payload. Request encoded should have info for instant_translation_credits_change value, verified_translation_credits_change value, source_metadata which contains any identifying information to attach to the transaction, email for the user starting the transaction, and optionally lilt_token for the connector configuration. +*JobsApi* | [**servicesApiJobsAddFile**](docs/JobsApi.md#servicesApiJobsAddFile) | **POST** /jobs/{id}/files | Add a file to a Job. +*JobsApi* | [**servicesApiJobsCreateJob**](docs/JobsApi.md#servicesApiJobsCreateJob) | **POST** /jobs | Create a Connector Job. +*JobsApi* | [**servicesApiJobsDeleteJobById**](docs/JobsApi.md#servicesApiJobsDeleteJobById) | **DELETE** /jobs/{id} | Delete a Connector Job. +*JobsApi* | [**servicesApiJobsGetJobById**](docs/JobsApi.md#servicesApiJobsGetJobById) | **GET** /jobs/{id} | Retrieve a Connector Job. +*JobsApi* | [**servicesApiJobsGetJobTranslations**](docs/JobsApi.md#servicesApiJobsGetJobTranslations) | **GET** /jobs/translations | Retrieve a list of Translations with their Job information. +*JobsApi* | [**servicesApiJobsGetJobs**](docs/JobsApi.md#servicesApiJobsGetJobs) | **GET** /jobs | Retrieve a list of Connector Jobs. +*JobsApi* | [**servicesApiJobsStartJob**](docs/JobsApi.md#servicesApiJobsStartJob) | **POST** /jobs/{id}/start | Start a Job. +*JobsApi* | [**servicesApiJobsSyncJob**](docs/JobsApi.md#servicesApiJobsSyncJob) | **POST** /jobs/{id}/sync | Start a Sync. +*JobsApi* | [**servicesApiJobsUpdateJob**](docs/JobsApi.md#servicesApiJobsUpdateJob) | **PUT** /jobs/{id} | Update a Connector Job. +*OrganizationApi* | [**servicesApiOrganizationGetOrganizationRecord**](docs/OrganizationApi.md#servicesApiOrganizationGetOrganizationRecord) | **GET** /organization | Get information about the organization based on lilt_token +*RegistrationApi* | [**servicesApiRegistrationRegisterCreditsBasedOrganization**](docs/RegistrationApi.md#servicesApiRegistrationRegisterCreditsBasedOrganization) | **POST** /register | Register a new Connectors Organization +*SettingsApi* | [**servicesApiSettingsGetSettings**](docs/SettingsApi.md#servicesApiSettingsGetSettings) | **GET** /settings | Retrieve the settings. +*SettingsApi* | [**servicesApiSettingsUpdateSettings**](docs/SettingsApi.md#servicesApiSettingsUpdateSettings) | **PUT** /settings | Update the settings. +*TranslationsApi* | [**servicesApiDeliveriesCompleteDelivery**](docs/TranslationsApi.md#servicesApiDeliveriesCompleteDelivery) | **POST** /translations/{id}/complete | Complete a Translation. +*TranslationsApi* | [**servicesApiDeliveriesDownloadDelivery**](docs/TranslationsApi.md#servicesApiDeliveriesDownloadDelivery) | **GET** /translations/{id}/download | Download a Translation. +*TranslationsApi* | [**servicesApiDeliveriesDownloadDeliverySource**](docs/TranslationsApi.md#servicesApiDeliveriesDownloadDeliverySource) | **GET** /translations/{id}/source | Download a Translation Source. +*TranslationsApi* | [**servicesApiDeliveriesGetDeliveriesByJobId**](docs/TranslationsApi.md#servicesApiDeliveriesGetDeliveriesByJobId) | **GET** /translations | Retrieve a list of Translations. +*TranslationsApi* | [**servicesApiDeliveriesGetDeliveryById**](docs/TranslationsApi.md#servicesApiDeliveriesGetDeliveryById) | **GET** /translations/{id} | Retrieve a Translation. +*TranslationsApi* | [**servicesApiDeliveriesPreviewDelivery**](docs/TranslationsApi.md#servicesApiDeliveriesPreviewDelivery) | **GET** /translations/{id}/preview | Get a Translation's source to target mapping. +*TranslationsApi* | [**servicesApiDeliveriesUpdateDelivery**](docs/TranslationsApi.md#servicesApiDeliveriesUpdateDelivery) | **PUT** /translations/{id} | Update a Translation. + + +## Documentation for Models + + - [ErrorResponse](docs/ErrorResponse.md) + - [JobResponse](docs/JobResponse.md) + - [JobsResponse](docs/JobsResponse.md) + - [NewJobOptions](docs/NewJobOptions.md) + - [NewOrganizationOptions](docs/NewOrganizationOptions.md) + - [OrganizationResponse](docs/OrganizationResponse.md) + - [PreviewTranslationResponseInner](docs/PreviewTranslationResponseInner.md) + - [ServicesApiCreditTransactionCreateCreditTransactionRequest](docs/ServicesApiCreditTransactionCreateCreditTransactionRequest.md) + - [SettingsResponse](docs/SettingsResponse.md) + - [TranslationResponse](docs/TranslationResponse.md) + - [TranslationsResponse](docs/TranslationsResponse.md) + - [UpdateDeliveryOptions](docs/UpdateDeliveryOptions.md) + - [UpdateJobOptions](docs/UpdateJobOptions.md) + + + +## Documentation for Authorization + + +Authentication schemes defined for the API: + +### BearerAuth + +- **Type**: HTTP Bearer Token authentication + + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. + +## Author + + + diff --git a/api/openapi.yaml b/api/openapi.yaml new file mode 100644 index 0000000..362c643 --- /dev/null +++ b/api/openapi.yaml @@ -0,0 +1,1675 @@ +openapi: 3.0.0 +info: + description: | + This document describes the Plugin API for Lilt's Connector platform. The + Plugin API is intented to be used by developers who wish to build + integrations into their desired systems. The purpose of this API is to + enable content transfer and status monitoring for localization projects. + + - Read more about the concepts and workflows in the + [user guide](/docs/api/v1.0). + - Test the API interactively via [Swagger UI](/api/v1.0/ui). + title: Lilt Connector Plugin API + version: "1.0" +servers: +- url: https://connectors-admin.lilt.com/api/v1.0 +- url: http://localhost:5000/api/v1.0 +security: +- BearerAuth: [] +tags: +- description: Register a new connector installation. + name: Registration +- description: A Job represents a single localization order. + name: Jobs +- description: Translations are the completed translations for a Job. + name: Translations +- description: The settings to use for new jobs. + name: Settings +- description: A credit transaction represents a credit change. + name: Credit Transactions +- description: An organization represents a lilt customer. + name: Organization +paths: + /register: + post: + description: | + This endpoint is used to register a connector organization + in preparation to handle credits management. + operationId: services.api.registration.register_credits_based_organization + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/New_Organization_Options' + responses: + "204": + description: | + Upon success a response with an empty body is returned. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Bad Request response. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Server Error response. + security: [] + summary: Register a new Connectors Organization + tags: + - Registration + x-content-type: application/json + x-accepts: + - application/json + /jobs: + get: + operationId: services.api.jobs.get_jobs + parameters: + - description: the query limit + explode: true + in: query + name: limit + required: false + schema: + default: 25 + example: 25 + type: integer + style: form + - description: where to start + explode: true + in: query + name: start + required: false + schema: + default: 0 + example: 0 + type: integer + style: form + - description: how to order the returned results + explode: true + in: query + name: order + required: false + schema: + default: asc + enum: + - asc + - desc + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Jobs_Response' + description: The jobs response. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Bad Request response. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Unauthorized response. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Forbidden response. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Server Error response. + summary: Retrieve a list of Connector Jobs. + tags: + - Jobs + x-accepts: + - application/json + post: + description: | + The general workflow for a job is as follows. + + 1. Create a job. + 1. Add files to a job. + 1. Start the job. + 1. Poll for translation completion. + 1. Download the translated files. + operationId: services.api.jobs.create_job + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/New_Job_Options' + x-nullable: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Job_Response' + description: The job response. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Bad Request response. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Unauthorized response. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Forbidden response. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Server Error response. + summary: Create a Connector Job. + tags: + - Jobs + x-content-type: application/json + x-accepts: + - application/json + /jobs/{id}: + delete: + operationId: services.api.jobs.delete_job_by_id + parameters: + - description: The Job ID. + explode: false + in: path + name: id + required: true + schema: + example: 12345 + type: integer + style: simple + responses: + "204": + description: | + Upon success a response with an empty body is returned. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Bad Request response. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Unauthorized response. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Forbidden response. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Not Found response. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Server Error response. + summary: Delete a Connector Job. + tags: + - Jobs + x-accepts: + - application/json + get: + operationId: services.api.jobs.get_job_by_id + parameters: + - description: The Job ID. + explode: false + in: path + name: id + required: true + schema: + example: 12345 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Job_Response' + description: The job response. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Bad Request response. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Unauthorized response. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Forbidden response. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Not Found response. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Server Error response. + summary: Retrieve a Connector Job. + tags: + - Jobs + x-accepts: + - application/json + put: + description: | + Update a job to change the status or error message. + operationId: services.api.jobs.update_job + parameters: + - description: The Job ID. + explode: false + in: path + name: id + required: true + schema: + example: 12345 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Update_Job_Options' + x-nullable: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Job_Response' + description: The job response. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Bad Request response. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Unauthorized response. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Forbidden response. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Server Error response. + summary: Update a Connector Job. + tags: + - Jobs + x-content-type: application/json + x-accepts: + - application/json + /jobs/{id}/files: + post: + description: | + Add files to a job to submit them for translation. + operationId: services.api.jobs.add_file + parameters: + - description: The Job ID. + explode: false + in: path + name: id + required: true + schema: + example: 12345 + type: integer + style: simple + - description: The file name. + explode: true + in: query + name: name + required: true + schema: + example: sample.txt + type: string + style: form + - description: The source language. + explode: true + in: query + name: srclang + required: false + schema: + default: en-US + type: string + style: form + - description: | + The target language. Many target languages can be added to a source + file. To add more than one target language pass in the trglang query + parameter multiple times. For example: ?trglang=fr-FR&trglang=es-ES. + explode: true + in: query + name: trglang + required: true + schema: + items: + example: es + type: string + type: array + style: form + - description: The due date for the file as an ISO-8601 string. + explode: true + in: query + name: due + required: false + schema: + example: 2022-05-20T04:09:39Z + format: date-time + type: string + style: form + requestBody: + content: + application/octet-stream: + schema: + format: binary + type: string + responses: + "204": + description: | + Upon success a response with an empty body is returned. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Bad Request response. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Unauthorized response. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Forbidden response. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Not Found response. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Server Error response. + summary: Add a file to a Job. + tags: + - Jobs + x-content-type: application/octet-stream + x-accepts: + - application/json + /jobs/{id}/start: + post: + description: | + Start a job once all of the source files have been added. Use the Job ID + to poll for completion to ensure everything has been well received by + Lilt. + operationId: services.api.jobs.start_job + parameters: + - description: The Job ID. + explode: false + in: path + name: id + required: true + schema: + example: 12345 + type: integer + style: simple + responses: + "204": + description: | + Upon success a response with an empty body is returned. Use the job + ID to poll for subsequent status changes. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Bad Request response. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Unauthorized response. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Forbidden response. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Not Found response. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Server Error response. + summary: Start a Job. + tags: + - Jobs + x-accepts: + - application/json + /jobs/{id}/sync: + post: + description: | + Checks for updates to the translations. Use the Job ID to poll for + successful completion of the sync. When the sync is complete the + translations endpoint can be used to view the translation status for the + job. + operationId: services.api.jobs.sync_job + parameters: + - description: The Job ID. + explode: false + in: path + name: id + required: true + schema: + example: 12345 + type: integer + style: simple + responses: + "204": + description: | + Upon success a response with an empty body is returned. Use the job + ID to poll for subsequent status changes. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Bad Request response. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Unauthorized response. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Forbidden response. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Not Found response. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Server Error response. + summary: Start a Sync. + tags: + - Jobs + x-accepts: + - application/json + /jobs/translations: + get: + operationId: services.api.jobs.get_job_translations + parameters: + - description: the query limit + explode: true + in: query + name: limit + required: false + schema: + default: 25 + example: 25 + type: integer + style: form + - description: where to start + explode: true + in: query + name: start + required: false + schema: + default: 0 + example: 0 + type: integer + style: form + - description: how to order the returned results + explode: true + in: query + name: order + required: false + schema: + default: asc + enum: + - asc + - desc + type: string + style: form + - description: Weather it should filter out completed translations + explode: true + in: query + name: filter_out_completed + required: false + schema: + default: false + type: boolean + style: form + - description: Filter by selected translation workflow + explode: true + in: query + name: lilt_translation_workflow + required: false + schema: + enum: + - HITL + - MT + example: HITL + type: string + style: form + - description: Filter by list of order level statuses + explode: true + in: query + name: order_status + required: false + schema: + example: "complete,draft" + type: string + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Jobs_Response' + description: The jobs response. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Bad Request response. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Unauthorized response. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Forbidden response. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Server Error response. + summary: Retrieve a list of Translations with their Job information. + tags: + - Jobs + x-accepts: + - application/json + /translations: + get: + operationId: services.api.deliveries.get_deliveries_by_job_id + parameters: + - description: the query limit + explode: true + in: query + name: limit + required: false + schema: + default: 25 + example: 25 + type: integer + style: form + - description: where to start + explode: true + in: query + name: start + required: false + schema: + default: 0 + example: 0 + type: integer + style: form + - description: The Job ID. + explode: true + in: query + name: job_id + required: false + schema: + example: 12345 + type: integer + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Translations_Response' + description: The translations response. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Bad Request response. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Unauthorized response. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Forbidden response. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Not Found response. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Server Error response. + summary: Retrieve a list of Translations. + tags: + - Translations + x-accepts: + - application/json + /translations/{id}: + get: + operationId: services.api.deliveries.get_delivery_by_id + parameters: + - description: The ID. + explode: false + in: path + name: id + required: true + schema: + example: 12345 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Translation_Response' + description: The translation response. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Bad Request response. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Unauthorized response. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Forbidden response. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Not Found response. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Server Error response. + summary: Retrieve a Translation. + tags: + - Translations + x-accepts: + - application/json + put: + operationId: services.api.deliveries.update_delivery + parameters: + - description: The ID. + explode: false + in: path + name: id + required: true + schema: + example: 12345 + type: integer + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Update_Delivery_Options' + x-nullable: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Translation_Response' + description: The translation response. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Bad Request response. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Unauthorized response. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Forbidden response. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Not Found response. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Server Error response. + summary: Update a Translation. + tags: + - Translations + x-content-type: application/json + x-accepts: + - application/json + /translations/{id}/download: + get: + operationId: services.api.deliveries.download_delivery + parameters: + - description: The ID. + explode: false + in: path + name: id + required: true + schema: + example: 12345 + type: integer + style: simple + responses: + "200": + content: + application/octet-stream: + schema: + format: bytes + type: string + description: The translation contents. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Bad Request response. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Unauthorized response. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Forbidden response. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Not Found response. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Server Error response. + summary: Download a Translation. + tags: + - Translations + x-accepts: + - application/json + - application/octet-stream + /translations/{id}/complete: + post: + operationId: services.api.deliveries.complete_delivery + parameters: + - description: The ID. + explode: false + in: path + name: id + required: true + schema: + example: 12345 + type: integer + style: simple + responses: + "204": + description: | + Upon success a response with an empty body is returned. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Bad Request response. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Unauthorized response. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Forbidden response. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Not Found response. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Server Error response. + summary: Complete a Translation. + tags: + - Translations + x-accepts: + - application/json + /translations/{id}/source: + get: + operationId: services.api.deliveries.download_delivery_source + parameters: + - description: The ID. + explode: false + in: path + name: id + required: true + schema: + example: 12345 + type: integer + style: simple + responses: + "200": + content: + application/octet-stream: + schema: + format: bytes + type: string + description: The translation source contents. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Bad Request response. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Unauthorized response. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Forbidden response. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Not Found response. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Server Error response. + summary: Download a Translation Source. + tags: + - Translations + x-accepts: + - application/json + - application/octet-stream + /translations/{id}/preview: + get: + operationId: services.api.deliveries.preview_delivery + parameters: + - description: The ID. + explode: false + in: path + name: id + required: true + schema: + example: 12345 + type: integer + style: simple + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/Preview_Translation_Response_inner' + title: Preview Translation Response + type: array + description: The translation response. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Bad Request response. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Unauthorized response. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Forbidden response. + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Not Found response. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Server Error response. + summary: Get a Translation's source to target mapping. + tags: + - Translations + x-accepts: + - application/json + /settings: + get: + operationId: services.api.settings.get_settings + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Settings_Response' + description: The settings response. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Bad Request response. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Unauthorized response. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Forbidden response. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Server Error response. + summary: Retrieve the settings. + tags: + - Settings + x-accepts: + - application/json + put: + operationId: services.api.settings.update_settings + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Settings_Response' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Settings_Response' + description: The settings response. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Bad Request response. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Unauthorized response. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Forbidden response. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Server Error response. + summary: Update the settings. + tags: + - Settings + x-content-type: application/json + x-accepts: + - application/json + /credit-transaction: + post: + operationId: services.api.credit_transaction.create_credit_transaction + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/services_api_credit_transaction_create_credit_transaction_request' + responses: + "204": + description: | + Upon success a response with an empty body is returned. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Bad Request response. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Unauthorized response. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Forbidden response. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Server Error response. + security: [] + summary: | + Create a credit transaction. Request is expected to contain credits + information encoded in jwt_token payload. Request encoded should have + info for instant_translation_credits_change value, + verified_translation_credits_change value, source_metadata which + contains any identifying information to attach to the transaction, + email for the user starting the transaction, and optionally lilt_token + for the connector configuration. + tags: + - Credit Transactions + x-content-type: application/json + x-accepts: + - application/json + /organization: + get: + operationId: services.api.organization.get_organization_record + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Organization_Response' + description: The settings response. + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Bad Request response. + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Unauthorized response. + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Forbidden response. + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/Error_Response' + description: The Server Error response. + summary: | + Get information about the organization based on lilt_token + tags: + - Organization + x-accepts: + - application/json +components: + schemas: + Organization_Response: + example: + instantTranslationCredits: 0.8008281904610115 + name: name + verifiedTranslationCredits: 6.027456183070403 + properties: + name: + description: Name of the organization + type: string + instantTranslationCredits: + description: | + The amount of credits the organization has remaining + type: number + verifiedTranslationCredits: + description: | + The amount of credits the organization has remaining + type: number + title: Organization Response + type: object + New_Organization_Options: + properties: + name: + description: Name to identify the organization by + type: string + email: + description: Contact email for the owner of the organization + type: string + registrationMetadata: + description: | + Relevant information for the organization being created + type: object + instantTranslationCredits: + description: | + Amount of credits the organization starts with, usable for + instant translation jobs + type: integer + verifiedTranslationCredits: + description: | + Amount of credits the organization starts with, usable for + verified translation jobs + type: integer + title: New Organization Options + type: object + Translation_Response: + example: + createdAt: 2000-01-23T04:56:07.000+00:00 + trgLocale: trgLocale + name: name + srcLocale: srcLocale + id: 1 + trgLang: trgLang + srcLang: srcLang + status: import_complete + errorMsg: errorMsg + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + type: integer + name: + type: string + status: + description: | + This value tracks the status of the delivery. + enum: + - import_complete + - import_failed + - export_complete + - export_failed + - mt_complete + - mt_failed + - plugin_complete + type: string + srcLang: + type: string + srcLocale: + type: string + trgLang: + type: string + trgLocale: + type: string + errorMsg: + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + required: + - createdAt + - id + - name + - srcLang + - status + - trgLang + - updatedAt + title: Translation Response + type: object + Translations_Response: + example: + limit: 0 + start: 6 + results: + - createdAt: 2000-01-23T04:56:07.000+00:00 + trgLocale: trgLocale + name: name + srcLocale: srcLocale + id: 1 + trgLang: trgLang + srcLang: srcLang + status: import_complete + errorMsg: errorMsg + updatedAt: 2000-01-23T04:56:07.000+00:00 + - createdAt: 2000-01-23T04:56:07.000+00:00 + trgLocale: trgLocale + name: name + srcLocale: srcLocale + id: 1 + trgLang: trgLang + srcLang: srcLang + status: import_complete + errorMsg: errorMsg + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + limit: + type: integer + start: + type: integer + results: + items: + $ref: '#/components/schemas/Translation_Response' + type: array + title: Translations Response + type: object + Update_Delivery_Options: + properties: + status: + description: | + This value tracks the status of the delivery. + enum: + - import_complete + - import_failed + - export_complete + - export_failed + - mt_complete + - mt_failed + - plugin_complete + type: string + error_message: + type: string + title: Update Delivery Options + type: object + Error_Response: + example: + error: Bad Request + message: Missing query parameter 'name' + status: 400 + properties: + error: + example: Bad Request + type: string + message: + example: Missing query parameter 'name' + type: string + status: + example: 400 + type: integer + title: Error Response + type: object + services_api_credit_transaction_create_credit_transaction_request: + properties: + payload: + type: string + type: object + Settings_Response: + example: + project_name_template: "{project_prefix} {today}" + lilt_translation_workflow: INSTANT + project_prefix: project_prefix + properties: + project_prefix: + description: A string value to include in the Project name. + type: string + project_name_template: + description: | + The template string to use when generating Project names. + + The available template options are: + + - **today** - Today's date. Formatted as YYYY-MM-DD. + - **trglocale** - The target locale for the given project. + - **filename** - The name of the current file being uploaded. + - **project_prefix** - The project_prefix value provided in the + configuration. + - **project_name** - The project_name value assigned to the file in + the code. + - **connector_id** - The Connector ID. + - **connector_type** - The Connector Type (e.g. "xtm", "salesforce"). + example: "{project_prefix} {today}" + type: string + lilt_translation_workflow: + description: | + This indicates the translation workflow being used. UNKNOWN will only be + displayed in exceptional cases. + enum: + - INSTANT + - VERIFIED + - UNKNOWN + type: string + title: Settings Response + type: object + Jobs_Response: + example: + limit: 0 + start: 6 + results: + - targetLanguages: + - targetLanguages + - targetLanguages + createdAt: 2000-01-23T04:56:07.000+00:00 + dueDate: 2000-01-23T04:56:07.000+00:00 + orderStatus: Draft + id: 1 + translationWorkflow: INSTANT + project_prefix: project_prefix + status: draft + errorMsg: errorMsg + updatedAt: 2000-01-23T04:56:07.000+00:00 + - targetLanguages: + - targetLanguages + - targetLanguages + createdAt: 2000-01-23T04:56:07.000+00:00 + dueDate: 2000-01-23T04:56:07.000+00:00 + orderStatus: Draft + id: 1 + translationWorkflow: INSTANT + project_prefix: project_prefix + status: draft + errorMsg: errorMsg + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + limit: + type: integer + start: + type: integer + results: + items: + $ref: '#/components/schemas/Job_Response' + type: array + title: Jobs Response + type: object + Job_Response: + example: + targetLanguages: + - targetLanguages + - targetLanguages + createdAt: 2000-01-23T04:56:07.000+00:00 + dueDate: 2000-01-23T04:56:07.000+00:00 + orderStatus: Draft + id: 1 + translationWorkflow: INSTANT + project_prefix: project_prefix + status: draft + errorMsg: errorMsg + updatedAt: 2000-01-23T04:56:07.000+00:00 + properties: + id: + type: integer + project_prefix: + type: string + status: + description: | + This value tracks the async processing status of the job. + enum: + - draft + - queued + - processing + - complete + - canceled + - failed + type: string + orderStatus: + description: | + This value tracks the completion status of the translation order. + enum: + - Draft + - Started + - In Progress + - Delivered + - Complete + - Needs Attention + type: string + targetLanguages: + items: + type: string + type: array + translationWorkflow: + description: | + This indicates the translation workflow being used. UNKNOWN will only be + displayed in exceptional cases. + enum: + - INSTANT + - VERIFIED + - UNKNOWN + type: string + dueDate: + format: date-time + type: string + errorMsg: + type: string + createdAt: + format: date-time + type: string + updatedAt: + format: date-time + type: string + title: Job Response + type: object + Update_Job_Options: + properties: + status: + description: | + This value tracks the async processing status of the job. + enum: + - draft + - queued + - processing + - complete + - canceled + - failed + type: string + error_message: + type: string + source_word_count: + type: number + title: Update Job Options + type: object + New_Job_Options: + properties: + project_prefix: + description: A string value to include in the Project name. + type: string + project_name_template: + description: | + The template string to use when generating Project names. + + The available template options are: + + - **today** - Today's date. Formatted as YYYY-MM-DD. + - **trglocale** - The target locale for the given project. + - **filename** - The name of the current file being uploaded. + - **project_prefix** - The project_prefix value provided in the + configuration. + - **project_name** - The project_name value assigned to the file in + the code. + - **connector_id** - The Connector ID. + - **connector_type** - The Connector Type (e.g. "xtm", "salesforce"). + example: "{project_prefix} {today}" + type: string + lilt_translation_workflow: + enum: + - INSTANT + - VERIFIED + type: string + lilt_default_due_date: + description: | + The due date to use when creating Lilt Jobs/Projects if no specific due + date is specified on the file level. + type: string + lilt_target_languages: + description: | + The list of target languages to use for the new job. The values provided + should be present in the target_memories section of the configuration. + items: + type: string + type: array + handle_credit_transactions: + default: false + description: | + If true, credit transactions will be handled by the connector. If false, + no credit transactions will be created for the job. + type: boolean + source_word_count: + description: | + The source word count to use when creating credits transaction for + instant transaltion jobs. + type: number + title: New Job Options + type: object + Preview_Translation_Response_inner: + example: + source: source + key: key + target: target + properties: + key: + description: The key of the content field. + type: string + source: + description: The source content of the field. + type: string + target: + description: The target content of the field. + type: string + type: object + securitySchemes: + BearerAuth: + scheme: bearer + type: http + x-bearerInfoFunc: services.api.auth.api_key_auth + diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..0b68040 --- /dev/null +++ b/build.gradle @@ -0,0 +1,168 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' +apply plugin: 'java' +apply plugin: 'com.diffplug.spotless' + +group = 'org.openapitools' +version = '1.0' + +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.3.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' + classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.11.0' + } +} + +repositories { + mavenCentral() +} +sourceSets { + main.java.srcDirs = ['src/main/java'] +} + +if(hasProperty('target') && target == 'android') { + + 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 "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + } + } + + 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.destinationDirectory + task.destinationDirectory = project.file("${project.buildDir}/outputs/jar") + task.archiveFileName = "${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-publish' + + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + + publishing { + publications { + maven(MavenPublication) { + artifactId = 'openapi-java-client' + from components.java + } + } + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +ext { + jakarta_annotation_version = "1.3.5" +} + +dependencies { + implementation 'io.swagger:swagger-annotations:1.6.8' + implementation "com.google.code.findbugs:jsr305:3.0.2" + implementation 'com.squareup.okhttp3:okhttp:4.12.0' + implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0' + implementation 'com.google.code.gson:gson:2.9.1' + implementation 'io.gsonfire:gson-fire:1.9.0' + implementation 'javax.ws.rs:jsr311-api:1.1.1' + implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1' + implementation 'org.openapitools:jackson-databind-nullable:0.2.6' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' + implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.1' + testImplementation 'org.mockito:mockito-core:3.12.4' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.1' +} + +javadoc { + options.tags = [ "http.response.details:a:Http Response Details" ] +} + +// Use spotless plugin to automatically format code, remove unused import, etc +// To apply changes directly to the file, run `gradlew spotlessApply` +// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle +spotless { + // comment out below to run spotless as part of the `check` task + enforceCheck false + + format 'misc', { + // define the files (e.g. '*.gradle', '*.md') to apply `misc` to + target '.gitignore' + + // define the steps to apply to those files + trimTrailingWhitespace() + indentWithSpaces() // Takes an integer argument if you don't like 4 + endWithNewline() + } + java { + // don't need to set target, it is inferred from java + + // apply a specific flavor of google-java-format + googleJavaFormat('1.8').aosp().reflowLongStrings() + + removeUnusedImports() + importOrder() + } +} + +test { + // Enable JUnit 5 (Gradle 4.6+). + useJUnitPlatform() + + // Always run tests, even when nothing changed. + dependsOn 'cleanTest' + + // Show test results. + testLogging { + events "passed", "skipped", "failed" + } + +} diff --git a/build.sbt b/build.sbt new file mode 100644 index 0000000..53ced3c --- /dev/null +++ b/build.sbt @@ -0,0 +1,28 @@ +lazy val root = (project in file(".")). + settings( + organization := "org.openapitools", + name := "openapi-java-client", + version := "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.6.5", + "com.squareup.okhttp3" % "okhttp" % "4.12.0", + "com.squareup.okhttp3" % "logging-interceptor" % "4.12.0", + "com.google.code.gson" % "gson" % "2.9.1", + "org.apache.commons" % "commons-lang3" % "3.12.0", + "javax.ws.rs" % "jsr311-api" % "1.1.1", + "javax.ws.rs" % "javax.ws.rs-api" % "2.1.1", + "org.openapitools" % "jackson-databind-nullable" % "0.2.6", + "io.gsonfire" % "gson-fire" % "1.9.0" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", + "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", + "jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile", + "org.junit.jupiter" % "junit-jupiter-api" % "5.9.1" % "test", + "com.novocode" % "junit-interface" % "0.10" % "test", + "org.mockito" % "mockito-core" % "3.12.4" % "test" + ) + ) diff --git a/docs/CreditTransactionsApi.md b/docs/CreditTransactionsApi.md new file mode 100644 index 0000000..3c5c851 --- /dev/null +++ b/docs/CreditTransactionsApi.md @@ -0,0 +1,72 @@ +# CreditTransactionsApi + +All URIs are relative to *https://connectors-admin.lilt.com/api/v1.0* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**servicesApiCreditTransactionCreateCreditTransaction**](CreditTransactionsApi.md#servicesApiCreditTransactionCreateCreditTransaction) | **POST** /credit-transaction | Create a credit transaction. Request is expected to contain credits information encoded in jwt_token payload. Request encoded should have info for instant_translation_credits_change value, verified_translation_credits_change value, source_metadata which contains any identifying information to attach to the transaction, email for the user starting the transaction, and optionally lilt_token for the connector configuration. | + + + +# **servicesApiCreditTransactionCreateCreditTransaction** +> servicesApiCreditTransactionCreateCreditTransaction(servicesApiCreditTransactionCreateCreditTransactionRequest) + +Create a credit transaction. Request is expected to contain credits information encoded in jwt_token payload. Request encoded should have info for instant_translation_credits_change value, verified_translation_credits_change value, source_metadata which contains any identifying information to attach to the transaction, email for the user starting the transaction, and optionally lilt_token for the connector configuration. + +### Example +```java +// Import classes: +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.models.*; +import org.openapitools.client.api.CreditTransactionsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://connectors-admin.lilt.com/api/v1.0"); + + CreditTransactionsApi apiInstance = new CreditTransactionsApi(defaultClient); + ServicesApiCreditTransactionCreateCreditTransactionRequest servicesApiCreditTransactionCreateCreditTransactionRequest = new ServicesApiCreditTransactionCreateCreditTransactionRequest(); // ServicesApiCreditTransactionCreateCreditTransactionRequest | + try { + apiInstance.servicesApiCreditTransactionCreateCreditTransaction(servicesApiCreditTransactionCreateCreditTransactionRequest); + } catch (ApiException e) { + System.err.println("Exception when calling CreditTransactionsApi#servicesApiCreditTransactionCreateCreditTransaction"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **servicesApiCreditTransactionCreateCreditTransactionRequest** | [**ServicesApiCreditTransactionCreateCreditTransactionRequest**](ServicesApiCreditTransactionCreateCreditTransactionRequest.md)| | [optional] | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Upon success a response with an empty body is returned. | - | +| **400** | The Bad Request response. | - | +| **401** | The Unauthorized response. | - | +| **403** | The Forbidden response. | - | +| **500** | The Server Error response. | - | + diff --git a/docs/ErrorResponse.md b/docs/ErrorResponse.md new file mode 100644 index 0000000..e2a25ed --- /dev/null +++ b/docs/ErrorResponse.md @@ -0,0 +1,15 @@ + + +# ErrorResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**error** | **String** | | [optional] | +|**message** | **String** | | [optional] | +|**status** | **Integer** | | [optional] | + + + diff --git a/docs/JobResponse.md b/docs/JobResponse.md new file mode 100644 index 0000000..055cfb7 --- /dev/null +++ b/docs/JobResponse.md @@ -0,0 +1,58 @@ + + +# JobResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | | [optional] | +|**projectPrefix** | **String** | | [optional] | +|**status** | [**StatusEnum**](#StatusEnum) | This value tracks the async processing status of the job. | [optional] | +|**orderStatus** | [**OrderStatusEnum**](#OrderStatusEnum) | This value tracks the completion status of the translation order. | [optional] | +|**targetLanguages** | **List<String>** | | [optional] | +|**translationWorkflow** | [**TranslationWorkflowEnum**](#TranslationWorkflowEnum) | This indicates the translation workflow being used. UNKNOWN will only be displayed in exceptional cases. | [optional] | +|**dueDate** | **OffsetDateTime** | | [optional] | +|**errorMsg** | **String** | | [optional] | +|**createdAt** | **OffsetDateTime** | | [optional] | +|**updatedAt** | **OffsetDateTime** | | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| DRAFT | "draft" | +| QUEUED | "queued" | +| PROCESSING | "processing" | +| COMPLETE | "complete" | +| CANCELED | "canceled" | +| FAILED | "failed" | + + + +## Enum: OrderStatusEnum + +| Name | Value | +|---- | -----| +| DRAFT | "Draft" | +| STARTED | "Started" | +| IN_PROGRESS | "In Progress" | +| DELIVERED | "Delivered" | +| COMPLETE | "Complete" | +| NEEDS_ATTENTION | "Needs Attention" | + + + +## Enum: TranslationWorkflowEnum + +| Name | Value | +|---- | -----| +| INSTANT | "INSTANT" | +| VERIFIED | "VERIFIED" | +| UNKNOWN | "UNKNOWN" | + + + diff --git a/docs/JobsApi.md b/docs/JobsApi.md new file mode 100644 index 0000000..1a2f2de --- /dev/null +++ b/docs/JobsApi.md @@ -0,0 +1,675 @@ +# JobsApi + +All URIs are relative to *https://connectors-admin.lilt.com/api/v1.0* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**servicesApiJobsAddFile**](JobsApi.md#servicesApiJobsAddFile) | **POST** /jobs/{id}/files | Add a file to a Job. | +| [**servicesApiJobsCreateJob**](JobsApi.md#servicesApiJobsCreateJob) | **POST** /jobs | Create a Connector Job. | +| [**servicesApiJobsDeleteJobById**](JobsApi.md#servicesApiJobsDeleteJobById) | **DELETE** /jobs/{id} | Delete a Connector Job. | +| [**servicesApiJobsGetJobById**](JobsApi.md#servicesApiJobsGetJobById) | **GET** /jobs/{id} | Retrieve a Connector Job. | +| [**servicesApiJobsGetJobTranslations**](JobsApi.md#servicesApiJobsGetJobTranslations) | **GET** /jobs/translations | Retrieve a list of Translations with their Job information. | +| [**servicesApiJobsGetJobs**](JobsApi.md#servicesApiJobsGetJobs) | **GET** /jobs | Retrieve a list of Connector Jobs. | +| [**servicesApiJobsStartJob**](JobsApi.md#servicesApiJobsStartJob) | **POST** /jobs/{id}/start | Start a Job. | +| [**servicesApiJobsSyncJob**](JobsApi.md#servicesApiJobsSyncJob) | **POST** /jobs/{id}/sync | Start a Sync. | +| [**servicesApiJobsUpdateJob**](JobsApi.md#servicesApiJobsUpdateJob) | **PUT** /jobs/{id} | Update a Connector Job. | + + + +# **servicesApiJobsAddFile** +> servicesApiJobsAddFile(id, name, trglang, srclang, due, body) + +Add a file to a Job. + +Add files to a job to submit them for translation. + +### Example +```java +// Import classes: +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.auth.*; +import LiltConnectorSDK.models.*; +import org.openapitools.client.api.JobsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://connectors-admin.lilt.com/api/v1.0"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + JobsApi apiInstance = new JobsApi(defaultClient); + Integer id = 12345; // Integer | The Job ID. + String name = "sample.txt"; // String | The file name. + List trglang = Arrays.asList(); // List | The target language. Many target languages can be added to a source file. To add more than one target language pass in the trglang query parameter multiple times. For example: ?trglang=fr-FR&trglang=es-ES. + String srclang = "en-US"; // String | The source language. + OffsetDateTime due = OffsetDateTime.parse("2022-05-20T04:09:39Z"); // OffsetDateTime | The due date for the file as an ISO-8601 string. + File body = new File("/path/to/file"); // File | + try { + apiInstance.servicesApiJobsAddFile(id, name, trglang, srclang, due, body); + } catch (ApiException e) { + System.err.println("Exception when calling JobsApi#servicesApiJobsAddFile"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **Integer**| The Job ID. | | +| **name** | **String**| The file name. | | +| **trglang** | [**List<String>**](String.md)| The target language. Many target languages can be added to a source file. To add more than one target language pass in the trglang query parameter multiple times. For example: ?trglang=fr-FR&trglang=es-ES. | | +| **srclang** | **String**| The source language. | [optional] [default to en-US] | +| **due** | **OffsetDateTime**| The due date for the file as an ISO-8601 string. | [optional] | +| **body** | **File**| | [optional] | + +### Return type + +null (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/octet-stream + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Upon success a response with an empty body is returned. | - | +| **400** | The Bad Request response. | - | +| **401** | The Unauthorized response. | - | +| **403** | The Forbidden response. | - | +| **404** | The Not Found response. | - | +| **500** | The Server Error response. | - | + + +# **servicesApiJobsCreateJob** +> JobResponse servicesApiJobsCreateJob(newJobOptions) + +Create a Connector Job. + +The general workflow for a job is as follows. 1. Create a job. 1. Add files to a job. 1. Start the job. 1. Poll for translation completion. 1. Download the translated files. + +### Example +```java +// Import classes: +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.auth.*; +import LiltConnectorSDK.models.*; +import org.openapitools.client.api.JobsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://connectors-admin.lilt.com/api/v1.0"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + JobsApi apiInstance = new JobsApi(defaultClient); + NewJobOptions newJobOptions = new NewJobOptions(); // NewJobOptions | + try { + JobResponse result = apiInstance.servicesApiJobsCreateJob(newJobOptions); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JobsApi#servicesApiJobsCreateJob"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **newJobOptions** | [**NewJobOptions**](NewJobOptions.md)| | [optional] | + +### Return type + +[**JobResponse**](JobResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | The job response. | - | +| **400** | The Bad Request response. | - | +| **401** | The Unauthorized response. | - | +| **403** | The Forbidden response. | - | +| **500** | The Server Error response. | - | + + +# **servicesApiJobsDeleteJobById** +> servicesApiJobsDeleteJobById(id) + +Delete a Connector Job. + +### Example +```java +// Import classes: +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.auth.*; +import LiltConnectorSDK.models.*; +import org.openapitools.client.api.JobsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://connectors-admin.lilt.com/api/v1.0"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + JobsApi apiInstance = new JobsApi(defaultClient); + Integer id = 12345; // Integer | The Job ID. + try { + apiInstance.servicesApiJobsDeleteJobById(id); + } catch (ApiException e) { + System.err.println("Exception when calling JobsApi#servicesApiJobsDeleteJobById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **Integer**| The Job ID. | | + +### Return type + +null (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Upon success a response with an empty body is returned. | - | +| **400** | The Bad Request response. | - | +| **401** | The Unauthorized response. | - | +| **403** | The Forbidden response. | - | +| **404** | The Not Found response. | - | +| **500** | The Server Error response. | - | + + +# **servicesApiJobsGetJobById** +> JobResponse servicesApiJobsGetJobById(id) + +Retrieve a Connector Job. + +### Example +```java +// Import classes: +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.auth.*; +import LiltConnectorSDK.models.*; +import org.openapitools.client.api.JobsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://connectors-admin.lilt.com/api/v1.0"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + JobsApi apiInstance = new JobsApi(defaultClient); + Integer id = 12345; // Integer | The Job ID. + try { + JobResponse result = apiInstance.servicesApiJobsGetJobById(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JobsApi#servicesApiJobsGetJobById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **Integer**| The Job ID. | | + +### Return type + +[**JobResponse**](JobResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The job response. | - | +| **400** | The Bad Request response. | - | +| **401** | The Unauthorized response. | - | +| **403** | The Forbidden response. | - | +| **404** | The Not Found response. | - | +| **500** | The Server Error response. | - | + + +# **servicesApiJobsGetJobTranslations** +> JobsResponse servicesApiJobsGetJobTranslations(limit, start, order, filterOutCompleted, liltTranslationWorkflow, orderStatus) + +Retrieve a list of Translations with their Job information. + +### Example +```java +// Import classes: +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.auth.*; +import LiltConnectorSDK.models.*; +import org.openapitools.client.api.JobsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://connectors-admin.lilt.com/api/v1.0"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + JobsApi apiInstance = new JobsApi(defaultClient); + Integer limit = 25; // Integer | the query limit + Integer start = 0; // Integer | where to start + String order = "asc"; // String | how to order the returned results + Boolean filterOutCompleted = false; // Boolean | Weather it should filter out completed translations + String liltTranslationWorkflow = "HITL"; // String | Filter by selected translation workflow + String orderStatus = "complete,draft"; // String | Filter by list of order level statuses + try { + JobsResponse result = apiInstance.servicesApiJobsGetJobTranslations(limit, start, order, filterOutCompleted, liltTranslationWorkflow, orderStatus); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JobsApi#servicesApiJobsGetJobTranslations"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **limit** | **Integer**| the query limit | [optional] [default to 25] | +| **start** | **Integer**| where to start | [optional] [default to 0] | +| **order** | **String**| how to order the returned results | [optional] [default to asc] [enum: asc, desc] | +| **filterOutCompleted** | **Boolean**| Weather it should filter out completed translations | [optional] [default to false] | +| **liltTranslationWorkflow** | **String**| Filter by selected translation workflow | [optional] [enum: HITL, MT] | +| **orderStatus** | **String**| Filter by list of order level statuses | [optional] | + +### Return type + +[**JobsResponse**](JobsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The jobs response. | - | +| **400** | The Bad Request response. | - | +| **401** | The Unauthorized response. | - | +| **403** | The Forbidden response. | - | +| **500** | The Server Error response. | - | + + +# **servicesApiJobsGetJobs** +> JobsResponse servicesApiJobsGetJobs(limit, start, order) + +Retrieve a list of Connector Jobs. + +### Example +```java +// Import classes: +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.auth.*; +import LiltConnectorSDK.models.*; +import org.openapitools.client.api.JobsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://connectors-admin.lilt.com/api/v1.0"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + JobsApi apiInstance = new JobsApi(defaultClient); + Integer limit = 25; // Integer | the query limit + Integer start = 0; // Integer | where to start + String order = "asc"; // String | how to order the returned results + try { + JobsResponse result = apiInstance.servicesApiJobsGetJobs(limit, start, order); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JobsApi#servicesApiJobsGetJobs"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **limit** | **Integer**| the query limit | [optional] [default to 25] | +| **start** | **Integer**| where to start | [optional] [default to 0] | +| **order** | **String**| how to order the returned results | [optional] [default to asc] [enum: asc, desc] | + +### Return type + +[**JobsResponse**](JobsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The jobs response. | - | +| **400** | The Bad Request response. | - | +| **401** | The Unauthorized response. | - | +| **403** | The Forbidden response. | - | +| **500** | The Server Error response. | - | + + +# **servicesApiJobsStartJob** +> servicesApiJobsStartJob(id) + +Start a Job. + +Start a job once all of the source files have been added. Use the Job ID to poll for completion to ensure everything has been well received by Lilt. + +### Example +```java +// Import classes: +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.auth.*; +import LiltConnectorSDK.models.*; +import org.openapitools.client.api.JobsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://connectors-admin.lilt.com/api/v1.0"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + JobsApi apiInstance = new JobsApi(defaultClient); + Integer id = 12345; // Integer | The Job ID. + try { + apiInstance.servicesApiJobsStartJob(id); + } catch (ApiException e) { + System.err.println("Exception when calling JobsApi#servicesApiJobsStartJob"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **Integer**| The Job ID. | | + +### Return type + +null (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Upon success a response with an empty body is returned. Use the job ID to poll for subsequent status changes. | - | +| **400** | The Bad Request response. | - | +| **401** | The Unauthorized response. | - | +| **403** | The Forbidden response. | - | +| **404** | The Not Found response. | - | +| **500** | The Server Error response. | - | + + +# **servicesApiJobsSyncJob** +> servicesApiJobsSyncJob(id) + +Start a Sync. + +Checks for updates to the translations. Use the Job ID to poll for successful completion of the sync. When the sync is complete the translations endpoint can be used to view the translation status for the job. + +### Example +```java +// Import classes: +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.auth.*; +import LiltConnectorSDK.models.*; +import org.openapitools.client.api.JobsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://connectors-admin.lilt.com/api/v1.0"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + JobsApi apiInstance = new JobsApi(defaultClient); + Integer id = 12345; // Integer | The Job ID. + try { + apiInstance.servicesApiJobsSyncJob(id); + } catch (ApiException e) { + System.err.println("Exception when calling JobsApi#servicesApiJobsSyncJob"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **Integer**| The Job ID. | | + +### Return type + +null (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Upon success a response with an empty body is returned. Use the job ID to poll for subsequent status changes. | - | +| **400** | The Bad Request response. | - | +| **401** | The Unauthorized response. | - | +| **403** | The Forbidden response. | - | +| **404** | The Not Found response. | - | +| **500** | The Server Error response. | - | + + +# **servicesApiJobsUpdateJob** +> JobResponse servicesApiJobsUpdateJob(id, updateJobOptions) + +Update a Connector Job. + +Update a job to change the status or error message. + +### Example +```java +// Import classes: +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.auth.*; +import LiltConnectorSDK.models.*; +import org.openapitools.client.api.JobsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://connectors-admin.lilt.com/api/v1.0"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + JobsApi apiInstance = new JobsApi(defaultClient); + Integer id = 12345; // Integer | The Job ID. + UpdateJobOptions updateJobOptions = new UpdateJobOptions(); // UpdateJobOptions | + try { + JobResponse result = apiInstance.servicesApiJobsUpdateJob(id, updateJobOptions); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JobsApi#servicesApiJobsUpdateJob"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **Integer**| The Job ID. | | +| **updateJobOptions** | [**UpdateJobOptions**](UpdateJobOptions.md)| | [optional] | + +### Return type + +[**JobResponse**](JobResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The job response. | - | +| **400** | The Bad Request response. | - | +| **401** | The Unauthorized response. | - | +| **403** | The Forbidden response. | - | +| **500** | The Server Error response. | - | + diff --git a/docs/JobsResponse.md b/docs/JobsResponse.md new file mode 100644 index 0000000..316c133 --- /dev/null +++ b/docs/JobsResponse.md @@ -0,0 +1,15 @@ + + +# JobsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**limit** | **Integer** | | [optional] | +|**start** | **Integer** | | [optional] | +|**results** | [**List<JobResponse>**](JobResponse.md) | | [optional] | + + + diff --git a/docs/NewJobOptions.md b/docs/NewJobOptions.md new file mode 100644 index 0000000..a700f6c --- /dev/null +++ b/docs/NewJobOptions.md @@ -0,0 +1,28 @@ + + +# NewJobOptions + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**projectPrefix** | **String** | A string value to include in the Project name. | [optional] | +|**projectNameTemplate** | **String** | The template string to use when generating Project names. The available template options are: - **today** - Today's date. Formatted as YYYY-MM-DD. - **trglocale** - The target locale for the given project. - **filename** - The name of the current file being uploaded. - **project_prefix** - The project_prefix value provided in the configuration. - **project_name** - The project_name value assigned to the file in the code. - **connector_id** - The Connector ID. - **connector_type** - The Connector Type (e.g. \"xtm\", \"salesforce\"). | [optional] | +|**liltTranslationWorkflow** | [**LiltTranslationWorkflowEnum**](#LiltTranslationWorkflowEnum) | | [optional] | +|**liltDefaultDueDate** | **String** | The due date to use when creating Lilt Jobs/Projects if no specific due date is specified on the file level. | [optional] | +|**liltTargetLanguages** | **List<String>** | The list of target languages to use for the new job. The values provided should be present in the target_memories section of the configuration. | [optional] | +|**handleCreditTransactions** | **Boolean** | If true, credit transactions will be handled by the connector. If false, no credit transactions will be created for the job. | [optional] | +|**sourceWordCount** | **BigDecimal** | The source word count to use when creating credits transaction for instant transaltion jobs. | [optional] | + + + +## Enum: LiltTranslationWorkflowEnum + +| Name | Value | +|---- | -----| +| INSTANT | "INSTANT" | +| VERIFIED | "VERIFIED" | + + + diff --git a/docs/NewOrganizationOptions.md b/docs/NewOrganizationOptions.md new file mode 100644 index 0000000..9ac97ba --- /dev/null +++ b/docs/NewOrganizationOptions.md @@ -0,0 +1,17 @@ + + +# NewOrganizationOptions + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name to identify the organization by | [optional] | +|**email** | **String** | Contact email for the owner of the organization | [optional] | +|**registrationMetadata** | **Object** | Relevant information for the organization being created | [optional] | +|**instantTranslationCredits** | **Integer** | Amount of credits the organization starts with, usable for instant translation jobs | [optional] | +|**verifiedTranslationCredits** | **Integer** | Amount of credits the organization starts with, usable for verified translation jobs | [optional] | + + + diff --git a/docs/OrganizationApi.md b/docs/OrganizationApi.md new file mode 100644 index 0000000..24f106a --- /dev/null +++ b/docs/OrganizationApi.md @@ -0,0 +1,74 @@ +# OrganizationApi + +All URIs are relative to *https://connectors-admin.lilt.com/api/v1.0* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**servicesApiOrganizationGetOrganizationRecord**](OrganizationApi.md#servicesApiOrganizationGetOrganizationRecord) | **GET** /organization | Get information about the organization based on lilt_token | + + + +# **servicesApiOrganizationGetOrganizationRecord** +> OrganizationResponse servicesApiOrganizationGetOrganizationRecord() + +Get information about the organization based on lilt_token + +### Example +```java +// Import classes: +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.auth.*; +import LiltConnectorSDK.models.*; +import org.openapitools.client.api.OrganizationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://connectors-admin.lilt.com/api/v1.0"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + OrganizationApi apiInstance = new OrganizationApi(defaultClient); + try { + OrganizationResponse result = apiInstance.servicesApiOrganizationGetOrganizationRecord(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#servicesApiOrganizationGetOrganizationRecord"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**OrganizationResponse**](OrganizationResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The settings response. | - | +| **400** | The Bad Request response. | - | +| **401** | The Unauthorized response. | - | +| **403** | The Forbidden response. | - | +| **500** | The Server Error response. | - | + diff --git a/docs/OrganizationResponse.md b/docs/OrganizationResponse.md new file mode 100644 index 0000000..4477602 --- /dev/null +++ b/docs/OrganizationResponse.md @@ -0,0 +1,15 @@ + + +# OrganizationResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**name** | **String** | Name of the organization | [optional] | +|**instantTranslationCredits** | **BigDecimal** | The amount of credits the organization has remaining | [optional] | +|**verifiedTranslationCredits** | **BigDecimal** | The amount of credits the organization has remaining | [optional] | + + + diff --git a/docs/PreviewTranslationResponseInner.md b/docs/PreviewTranslationResponseInner.md new file mode 100644 index 0000000..c7f4761 --- /dev/null +++ b/docs/PreviewTranslationResponseInner.md @@ -0,0 +1,15 @@ + + +# PreviewTranslationResponseInner + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**key** | **String** | The key of the content field. | [optional] | +|**source** | **String** | The source content of the field. | [optional] | +|**target** | **String** | The target content of the field. | [optional] | + + + diff --git a/docs/RegistrationApi.md b/docs/RegistrationApi.md new file mode 100644 index 0000000..2212afa --- /dev/null +++ b/docs/RegistrationApi.md @@ -0,0 +1,72 @@ +# RegistrationApi + +All URIs are relative to *https://connectors-admin.lilt.com/api/v1.0* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**servicesApiRegistrationRegisterCreditsBasedOrganization**](RegistrationApi.md#servicesApiRegistrationRegisterCreditsBasedOrganization) | **POST** /register | Register a new Connectors Organization | + + + +# **servicesApiRegistrationRegisterCreditsBasedOrganization** +> servicesApiRegistrationRegisterCreditsBasedOrganization(newOrganizationOptions) + +Register a new Connectors Organization + +This endpoint is used to register a connector organization in preparation to handle credits management. + +### Example +```java +// Import classes: +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.models.*; +import org.openapitools.client.api.RegistrationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://connectors-admin.lilt.com/api/v1.0"); + + RegistrationApi apiInstance = new RegistrationApi(defaultClient); + NewOrganizationOptions newOrganizationOptions = new NewOrganizationOptions(); // NewOrganizationOptions | + try { + apiInstance.servicesApiRegistrationRegisterCreditsBasedOrganization(newOrganizationOptions); + } catch (ApiException e) { + System.err.println("Exception when calling RegistrationApi#servicesApiRegistrationRegisterCreditsBasedOrganization"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **newOrganizationOptions** | [**NewOrganizationOptions**](NewOrganizationOptions.md)| | [optional] | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Upon success a response with an empty body is returned. | - | +| **400** | The Bad Request response. | - | +| **500** | The Server Error response. | - | + diff --git a/docs/ServicesApiCreditTransactionCreateCreditTransactionRequest.md b/docs/ServicesApiCreditTransactionCreateCreditTransactionRequest.md new file mode 100644 index 0000000..1e2f61d --- /dev/null +++ b/docs/ServicesApiCreditTransactionCreateCreditTransactionRequest.md @@ -0,0 +1,13 @@ + + +# ServicesApiCreditTransactionCreateCreditTransactionRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**payload** | **String** | | [optional] | + + + diff --git a/docs/SettingsApi.md b/docs/SettingsApi.md new file mode 100644 index 0000000..b26c65a --- /dev/null +++ b/docs/SettingsApi.md @@ -0,0 +1,144 @@ +# SettingsApi + +All URIs are relative to *https://connectors-admin.lilt.com/api/v1.0* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**servicesApiSettingsGetSettings**](SettingsApi.md#servicesApiSettingsGetSettings) | **GET** /settings | Retrieve the settings. | +| [**servicesApiSettingsUpdateSettings**](SettingsApi.md#servicesApiSettingsUpdateSettings) | **PUT** /settings | Update the settings. | + + + +# **servicesApiSettingsGetSettings** +> SettingsResponse servicesApiSettingsGetSettings() + +Retrieve the settings. + +### Example +```java +// Import classes: +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.auth.*; +import LiltConnectorSDK.models.*; +import org.openapitools.client.api.SettingsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://connectors-admin.lilt.com/api/v1.0"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + SettingsApi apiInstance = new SettingsApi(defaultClient); + try { + SettingsResponse result = apiInstance.servicesApiSettingsGetSettings(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SettingsApi#servicesApiSettingsGetSettings"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**SettingsResponse**](SettingsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The settings response. | - | +| **400** | The Bad Request response. | - | +| **401** | The Unauthorized response. | - | +| **403** | The Forbidden response. | - | +| **500** | The Server Error response. | - | + + +# **servicesApiSettingsUpdateSettings** +> SettingsResponse servicesApiSettingsUpdateSettings(settingsResponse) + +Update the settings. + +### Example +```java +// Import classes: +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.auth.*; +import LiltConnectorSDK.models.*; +import org.openapitools.client.api.SettingsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://connectors-admin.lilt.com/api/v1.0"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + SettingsApi apiInstance = new SettingsApi(defaultClient); + SettingsResponse settingsResponse = new SettingsResponse(); // SettingsResponse | + try { + SettingsResponse result = apiInstance.servicesApiSettingsUpdateSettings(settingsResponse); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SettingsApi#servicesApiSettingsUpdateSettings"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **settingsResponse** | [**SettingsResponse**](SettingsResponse.md)| | [optional] | + +### Return type + +[**SettingsResponse**](SettingsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The settings response. | - | +| **400** | The Bad Request response. | - | +| **401** | The Unauthorized response. | - | +| **403** | The Forbidden response. | - | +| **500** | The Server Error response. | - | + diff --git a/docs/SettingsResponse.md b/docs/SettingsResponse.md new file mode 100644 index 0000000..6f7207d --- /dev/null +++ b/docs/SettingsResponse.md @@ -0,0 +1,25 @@ + + +# SettingsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**projectPrefix** | **String** | A string value to include in the Project name. | [optional] | +|**projectNameTemplate** | **String** | The template string to use when generating Project names. The available template options are: - **today** - Today's date. Formatted as YYYY-MM-DD. - **trglocale** - The target locale for the given project. - **filename** - The name of the current file being uploaded. - **project_prefix** - The project_prefix value provided in the configuration. - **project_name** - The project_name value assigned to the file in the code. - **connector_id** - The Connector ID. - **connector_type** - The Connector Type (e.g. \"xtm\", \"salesforce\"). | [optional] | +|**liltTranslationWorkflow** | [**LiltTranslationWorkflowEnum**](#LiltTranslationWorkflowEnum) | This indicates the translation workflow being used. UNKNOWN will only be displayed in exceptional cases. | [optional] | + + + +## Enum: LiltTranslationWorkflowEnum + +| Name | Value | +|---- | -----| +| INSTANT | "INSTANT" | +| VERIFIED | "VERIFIED" | +| UNKNOWN | "UNKNOWN" | + + + diff --git a/docs/TranslationResponse.md b/docs/TranslationResponse.md new file mode 100644 index 0000000..eddc21c --- /dev/null +++ b/docs/TranslationResponse.md @@ -0,0 +1,36 @@ + + +# TranslationResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Integer** | | | +|**name** | **String** | | | +|**status** | [**StatusEnum**](#StatusEnum) | This value tracks the status of the delivery. | | +|**srcLang** | **String** | | | +|**srcLocale** | **String** | | [optional] | +|**trgLang** | **String** | | | +|**trgLocale** | **String** | | [optional] | +|**errorMsg** | **String** | | [optional] | +|**createdAt** | **OffsetDateTime** | | | +|**updatedAt** | **OffsetDateTime** | | | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| IMPORT_COMPLETE | "import_complete" | +| IMPORT_FAILED | "import_failed" | +| EXPORT_COMPLETE | "export_complete" | +| EXPORT_FAILED | "export_failed" | +| MT_COMPLETE | "mt_complete" | +| MT_FAILED | "mt_failed" | +| PLUGIN_COMPLETE | "plugin_complete" | + + + diff --git a/docs/TranslationsApi.md b/docs/TranslationsApi.md new file mode 100644 index 0000000..5e304ce --- /dev/null +++ b/docs/TranslationsApi.md @@ -0,0 +1,510 @@ +# TranslationsApi + +All URIs are relative to *https://connectors-admin.lilt.com/api/v1.0* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**servicesApiDeliveriesCompleteDelivery**](TranslationsApi.md#servicesApiDeliveriesCompleteDelivery) | **POST** /translations/{id}/complete | Complete a Translation. | +| [**servicesApiDeliveriesDownloadDelivery**](TranslationsApi.md#servicesApiDeliveriesDownloadDelivery) | **GET** /translations/{id}/download | Download a Translation. | +| [**servicesApiDeliveriesDownloadDeliverySource**](TranslationsApi.md#servicesApiDeliveriesDownloadDeliverySource) | **GET** /translations/{id}/source | Download a Translation Source. | +| [**servicesApiDeliveriesGetDeliveriesByJobId**](TranslationsApi.md#servicesApiDeliveriesGetDeliveriesByJobId) | **GET** /translations | Retrieve a list of Translations. | +| [**servicesApiDeliveriesGetDeliveryById**](TranslationsApi.md#servicesApiDeliveriesGetDeliveryById) | **GET** /translations/{id} | Retrieve a Translation. | +| [**servicesApiDeliveriesPreviewDelivery**](TranslationsApi.md#servicesApiDeliveriesPreviewDelivery) | **GET** /translations/{id}/preview | Get a Translation's source to target mapping. | +| [**servicesApiDeliveriesUpdateDelivery**](TranslationsApi.md#servicesApiDeliveriesUpdateDelivery) | **PUT** /translations/{id} | Update a Translation. | + + + +# **servicesApiDeliveriesCompleteDelivery** +> servicesApiDeliveriesCompleteDelivery(id) + +Complete a Translation. + +### Example +```java +// Import classes: +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.auth.*; +import LiltConnectorSDK.models.*; +import org.openapitools.client.api.TranslationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://connectors-admin.lilt.com/api/v1.0"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + TranslationsApi apiInstance = new TranslationsApi(defaultClient); + Integer id = 12345; // Integer | The ID. + try { + apiInstance.servicesApiDeliveriesCompleteDelivery(id); + } catch (ApiException e) { + System.err.println("Exception when calling TranslationsApi#servicesApiDeliveriesCompleteDelivery"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **Integer**| The ID. | | + +### Return type + +null (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Upon success a response with an empty body is returned. | - | +| **400** | The Bad Request response. | - | +| **401** | The Unauthorized response. | - | +| **403** | The Forbidden response. | - | +| **404** | The Not Found response. | - | +| **500** | The Server Error response. | - | + + +# **servicesApiDeliveriesDownloadDelivery** +> String servicesApiDeliveriesDownloadDelivery(id) + +Download a Translation. + +### Example +```java +// Import classes: +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.auth.*; +import LiltConnectorSDK.models.*; +import org.openapitools.client.api.TranslationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://connectors-admin.lilt.com/api/v1.0"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + TranslationsApi apiInstance = new TranslationsApi(defaultClient); + Integer id = 12345; // Integer | The ID. + try { + String result = apiInstance.servicesApiDeliveriesDownloadDelivery(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TranslationsApi#servicesApiDeliveriesDownloadDelivery"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **Integer**| The ID. | | + +### Return type + +**String** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/octet-stream, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The translation contents. | - | +| **400** | The Bad Request response. | - | +| **401** | The Unauthorized response. | - | +| **403** | The Forbidden response. | - | +| **404** | The Not Found response. | - | +| **500** | The Server Error response. | - | + + +# **servicesApiDeliveriesDownloadDeliverySource** +> String servicesApiDeliveriesDownloadDeliverySource(id) + +Download a Translation Source. + +### Example +```java +// Import classes: +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.auth.*; +import LiltConnectorSDK.models.*; +import org.openapitools.client.api.TranslationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://connectors-admin.lilt.com/api/v1.0"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + TranslationsApi apiInstance = new TranslationsApi(defaultClient); + Integer id = 12345; // Integer | The ID. + try { + String result = apiInstance.servicesApiDeliveriesDownloadDeliverySource(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TranslationsApi#servicesApiDeliveriesDownloadDeliverySource"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **Integer**| The ID. | | + +### Return type + +**String** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/octet-stream, application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The translation source contents. | - | +| **400** | The Bad Request response. | - | +| **401** | The Unauthorized response. | - | +| **403** | The Forbidden response. | - | +| **404** | The Not Found response. | - | +| **500** | The Server Error response. | - | + + +# **servicesApiDeliveriesGetDeliveriesByJobId** +> TranslationsResponse servicesApiDeliveriesGetDeliveriesByJobId(limit, start, jobId) + +Retrieve a list of Translations. + +### Example +```java +// Import classes: +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.auth.*; +import LiltConnectorSDK.models.*; +import org.openapitools.client.api.TranslationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://connectors-admin.lilt.com/api/v1.0"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + TranslationsApi apiInstance = new TranslationsApi(defaultClient); + Integer limit = 25; // Integer | the query limit + Integer start = 0; // Integer | where to start + Integer jobId = 12345; // Integer | The Job ID. + try { + TranslationsResponse result = apiInstance.servicesApiDeliveriesGetDeliveriesByJobId(limit, start, jobId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TranslationsApi#servicesApiDeliveriesGetDeliveriesByJobId"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **limit** | **Integer**| the query limit | [optional] [default to 25] | +| **start** | **Integer**| where to start | [optional] [default to 0] | +| **jobId** | **Integer**| The Job ID. | [optional] | + +### Return type + +[**TranslationsResponse**](TranslationsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The translations response. | - | +| **400** | The Bad Request response. | - | +| **401** | The Unauthorized response. | - | +| **403** | The Forbidden response. | - | +| **404** | The Not Found response. | - | +| **500** | The Server Error response. | - | + + +# **servicesApiDeliveriesGetDeliveryById** +> TranslationResponse servicesApiDeliveriesGetDeliveryById(id) + +Retrieve a Translation. + +### Example +```java +// Import classes: +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.auth.*; +import LiltConnectorSDK.models.*; +import org.openapitools.client.api.TranslationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://connectors-admin.lilt.com/api/v1.0"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + TranslationsApi apiInstance = new TranslationsApi(defaultClient); + Integer id = 12345; // Integer | The ID. + try { + TranslationResponse result = apiInstance.servicesApiDeliveriesGetDeliveryById(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TranslationsApi#servicesApiDeliveriesGetDeliveryById"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **Integer**| The ID. | | + +### Return type + +[**TranslationResponse**](TranslationResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The translation response. | - | +| **400** | The Bad Request response. | - | +| **401** | The Unauthorized response. | - | +| **403** | The Forbidden response. | - | +| **404** | The Not Found response. | - | +| **500** | The Server Error response. | - | + + +# **servicesApiDeliveriesPreviewDelivery** +> List<PreviewTranslationResponseInner> servicesApiDeliveriesPreviewDelivery(id) + +Get a Translation's source to target mapping. + +### Example +```java +// Import classes: +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.auth.*; +import LiltConnectorSDK.models.*; +import org.openapitools.client.api.TranslationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://connectors-admin.lilt.com/api/v1.0"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + TranslationsApi apiInstance = new TranslationsApi(defaultClient); + Integer id = 12345; // Integer | The ID. + try { + List result = apiInstance.servicesApiDeliveriesPreviewDelivery(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TranslationsApi#servicesApiDeliveriesPreviewDelivery"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **Integer**| The ID. | | + +### Return type + +[**List<PreviewTranslationResponseInner>**](PreviewTranslationResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The translation response. | - | +| **400** | The Bad Request response. | - | +| **401** | The Unauthorized response. | - | +| **403** | The Forbidden response. | - | +| **404** | The Not Found response. | - | +| **500** | The Server Error response. | - | + + +# **servicesApiDeliveriesUpdateDelivery** +> TranslationResponse servicesApiDeliveriesUpdateDelivery(id, updateDeliveryOptions) + +Update a Translation. + +### Example +```java +// Import classes: +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.auth.*; +import LiltConnectorSDK.models.*; +import org.openapitools.client.api.TranslationsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://connectors-admin.lilt.com/api/v1.0"); + + // Configure HTTP bearer authorization: BearerAuth + HttpBearerAuth BearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("BearerAuth"); + BearerAuth.setBearerToken("BEARER TOKEN"); + + TranslationsApi apiInstance = new TranslationsApi(defaultClient); + Integer id = 12345; // Integer | The ID. + UpdateDeliveryOptions updateDeliveryOptions = new UpdateDeliveryOptions(); // UpdateDeliveryOptions | + try { + TranslationResponse result = apiInstance.servicesApiDeliveriesUpdateDelivery(id, updateDeliveryOptions); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling TranslationsApi#servicesApiDeliveriesUpdateDelivery"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **id** | **Integer**| The ID. | | +| **updateDeliveryOptions** | [**UpdateDeliveryOptions**](UpdateDeliveryOptions.md)| | [optional] | + +### Return type + +[**TranslationResponse**](TranslationResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | The translation response. | - | +| **400** | The Bad Request response. | - | +| **401** | The Unauthorized response. | - | +| **403** | The Forbidden response. | - | +| **404** | The Not Found response. | - | +| **500** | The Server Error response. | - | + diff --git a/docs/TranslationsResponse.md b/docs/TranslationsResponse.md new file mode 100644 index 0000000..1deca44 --- /dev/null +++ b/docs/TranslationsResponse.md @@ -0,0 +1,15 @@ + + +# TranslationsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**limit** | **Integer** | | [optional] | +|**start** | **Integer** | | [optional] | +|**results** | [**List<TranslationResponse>**](TranslationResponse.md) | | [optional] | + + + diff --git a/docs/UpdateDeliveryOptions.md b/docs/UpdateDeliveryOptions.md new file mode 100644 index 0000000..f3fb300 --- /dev/null +++ b/docs/UpdateDeliveryOptions.md @@ -0,0 +1,28 @@ + + +# UpdateDeliveryOptions + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | [**StatusEnum**](#StatusEnum) | This value tracks the status of the delivery. | [optional] | +|**errorMessage** | **String** | | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| IMPORT_COMPLETE | "import_complete" | +| IMPORT_FAILED | "import_failed" | +| EXPORT_COMPLETE | "export_complete" | +| EXPORT_FAILED | "export_failed" | +| MT_COMPLETE | "mt_complete" | +| MT_FAILED | "mt_failed" | +| PLUGIN_COMPLETE | "plugin_complete" | + + + diff --git a/docs/UpdateJobOptions.md b/docs/UpdateJobOptions.md new file mode 100644 index 0000000..290af86 --- /dev/null +++ b/docs/UpdateJobOptions.md @@ -0,0 +1,28 @@ + + +# UpdateJobOptions + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | [**StatusEnum**](#StatusEnum) | This value tracks the async processing status of the job. | [optional] | +|**errorMessage** | **String** | | [optional] | +|**sourceWordCount** | **BigDecimal** | | [optional] | + + + +## Enum: StatusEnum + +| Name | Value | +|---- | -----| +| DRAFT | "draft" | +| QUEUED | "queued" | +| PROCESSING | "processing" | +| COMPLETE | "complete" | +| CANCELED | "canceled" | +| FAILED | "failed" | + + + diff --git a/git_push.sh b/git_push.sh new file mode 100644 index 0000000..dcf0780 --- /dev/null +++ b/git_push.sh @@ -0,0 +1,57 @@ +#!/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 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="lilt" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="lilt-connector-sdk-java" + 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://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${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://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..a340857 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,6 @@ +# This file is automatically generated by OpenAPI Generator (https://github.com/openAPITools/openapi-generator). +# To include other gradle properties as part of the code generation process, please use the `gradleProperties` option. +# +# Gradle properties reference: https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties +# For example, uncomment below to build for Android +#target = android diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..7454180f2ae8848c63b8b4dea2cb829da983f2fa GIT binary patch literal 59536 zcma&NbC71ylI~qywr$(CZQJHswz}-9F59+k+g;UV+cs{`J?GrGXYR~=-ydruB3JCa zB64N^cILAcWk5iofq)<(fq;O7{th4@;QxID0)qN`mJ?GIqLY#rX8-|G{5M0pdVW5^ zzXk$-2kQTAC?_N@B`&6-N-rmVFE=$QD?>*=4<|!MJu@}isLc4AW#{m2if&A5T5g&~ ziuMQeS*U5sL6J698wOd)K@oK@1{peP5&Esut<#VH^u)gp`9H4)`uE!2$>RTctN+^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V9ym*T`xAhHih-v$7U}8=dfXi2i*aAB!xM(Xekg*ix@r|ymDw*{*s0?dlVys2e)z62u1 z+k3esbJE=-P5S$&KdFp+2H7_2e=}OKDrf( z9-207?6$@f4m4B+9E*e((Y89!q?zH|mz_vM>kp*HGXldO0Hg#!EtFhRuOm$u8e~a9 z5(roy7m$Kh+zjW6@zw{&20u?1f2uP&boD}$#Zy)4o&T;vyBoqFiF2t;*g=|1=)PxB z8eM3Mp=l_obbc?I^xyLz?4Y1YDWPa+nm;O<$Cn;@ane616`J9OO2r=rZr{I_Kizyc zP#^^WCdIEp*()rRT+*YZK>V@^Zs=ht32x>Kwe zab)@ZEffz;VM4{XA6e421^h~`ji5r%)B{wZu#hD}f3$y@L0JV9f3g{-RK!A?vBUA}${YF(vO4)@`6f1 z-A|}e#LN{)(eXloDnX4Vs7eH|<@{r#LodP@Nz--$Dg_Par%DCpu2>2jUnqy~|J?eZ zBG4FVsz_A+ibdwv>mLp>P!(t}E>$JGaK$R~;fb{O3($y1ssQQo|5M;^JqC?7qe|hg zu0ZOqeFcp?qVn&Qu7FQJ4hcFi&|nR!*j)MF#b}QO^lN%5)4p*D^H+B){n8%VPUzi! zDihoGcP71a6!ab`l^hK&*dYrVYzJ0)#}xVrp!e;lI!+x+bfCN0KXwUAPU9@#l7@0& QuEJmfE|#`Dqx|px0L@K;Y5)KL literal 0 HcmV?d00001 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..ffed3a2 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100644 index 0000000..005bcde --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +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" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..6a68175 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@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 + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@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=-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m" + +@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 execute + +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 execute + +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 + +: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 %* + +: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/pom.xml b/pom.xml new file mode 100644 index 0000000..8c6d313 --- /dev/null +++ b/pom.xml @@ -0,0 +1,344 @@ + + 4.0.0 + org.openapitools + openapi-java-client + jar + openapi-java-client + 1.0 + https://github.com/openapitools/openapi-generator + OpenAPI Java + + scm:git:git@github.com:openapitools/openapi-generator.git + scm:git:git@github.com:openapitools/openapi-generator.git + https://github.com/openapitools/openapi-generator + + + + + Unlicense + http://unlicense.org + repo + + + + + + OpenAPI-Generator Contributors + team@openapitools.org + OpenAPITools.org + http://openapitools.org + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + true + 128m + 512m + + -Xlint:all + -J-Xss4m + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.4.1 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.22.2 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + 10 + + + + + org.junit.jupiter + junit-jupiter-engine + ${junit-version} + + + + + maven-dependency-plugin + 3.6.1 + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.3.0 + + + + test-jar + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.5.0 + + + 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 + 3.6.3 + + + attach-javadocs + + jar + + + + + none + + + http.response.details + a + Http Response Details: + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.3.0 + + + attach-sources + + jar-no-fork + + + + + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless.version} + + + + + + + .gitignore + + + + + + true + 4 + + + + + + + + + + 1.8 + + true + + + + + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.2.1 + + + sign-artifacts + verify + + sign + + + + + + + + + + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.squareup.okhttp3 + okhttp + ${okhttp-version} + + + com.squareup.okhttp3 + logging-interceptor + ${okhttp-version} + + + com.google.code.gson + gson + ${gson-version} + + + io.gsonfire + gson-fire + ${gson-fire-version} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + + jakarta.annotation + jakarta.annotation-api + ${jakarta-annotation-version} + provided + + + org.openapitools + jackson-databind-nullable + ${jackson-databind-nullable-version} + + + javax.ws.rs + jsr311-api + ${jsr311-api-version} + + + javax.ws.rs + javax.ws.rs-api + ${javax.ws.rs-api-version} + + + + org.junit.jupiter + junit-jupiter-engine + ${junit-version} + test + + + org.junit.platform + junit-platform-runner + ${junit-platform-runner.version} + test + + + + 1.8 + ${java.version} + ${java.version} + 1.9.0 + 4.11.0 + 2.10.1 + 3.14.0 + 0.2.6 + 1.3.5 + 5.10.0 + 1.10.0 + 2.1.1 + 1.1.1 + UTF-8 + 2.43.0 + + diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..369ba54 --- /dev/null +++ b/settings.gradle @@ -0,0 +1 @@ +rootProject.name = "openapi-java-client" \ No newline at end of file diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml new file mode 100644 index 0000000..c471836 --- /dev/null +++ b/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/src/main/java/LiltConnectorSDK/ApiCallback.java b/src/main/java/LiltConnectorSDK/ApiCallback.java new file mode 100644 index 0000000..a196d0f --- /dev/null +++ b/src/main/java/LiltConnectorSDK/ApiCallback.java @@ -0,0 +1,62 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package LiltConnectorSDK; + +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 download processing. + * + * @param bytesRead bytes Read + * @param contentLength content length of the response + * @param done Read end + */ + void onDownloadProgress(long bytesRead, long contentLength, boolean done); +} diff --git a/src/main/java/LiltConnectorSDK/ApiClient.java b/src/main/java/LiltConnectorSDK/ApiClient.java new file mode 100644 index 0000000..b19a78c --- /dev/null +++ b/src/main/java/LiltConnectorSDK/ApiClient.java @@ -0,0 +1,1593 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package LiltConnectorSDK; + +import okhttp3.*; +import okhttp3.internal.http.HttpMethod; +import okhttp3.internal.tls.OkHostnameVerifier; +import okhttp3.logging.HttpLoggingInterceptor; +import okhttp3.logging.HttpLoggingInterceptor.Level; +import okio.Buffer; +import okio.BufferedSink; +import okio.Okio; + +import javax.net.ssl.*; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; +import java.lang.reflect.Type; +import java.net.URI; +import java.net.URLConnection; +import java.net.URLEncoder; +import java.nio.file.Files; +import java.nio.file.Paths; +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.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; +import java.util.*; +import java.util.Map.Entry; +import java.util.concurrent.TimeUnit; +import java.util.function.Supplier; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import LiltConnectorSDK.auth.Authentication; +import LiltConnectorSDK.auth.HttpBasicAuth; +import LiltConnectorSDK.auth.HttpBearerAuth; +import LiltConnectorSDK.auth.ApiKeyAuth; + +/** + *

ApiClient class.

+ */ +public class ApiClient { + + private String basePath = "https://connectors-admin.lilt.com/api/v1.0"; + protected List servers = new ArrayList(Arrays.asList( + new ServerConfiguration( + "https://connectors-admin.lilt.com/api/v1.0", + "No description provided", + new HashMap() + ), + new ServerConfiguration( + "http://localhost:5000/api/v1.0", + "No description provided", + new HashMap() + ) + )); + protected Integer serverIndex = 0; + protected Map serverVariables = null; + private boolean debugging = false; + private Map defaultHeaderMap = new HashMap(); + private Map defaultCookieMap = 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 KeyManager[] keyManagers; + + private OkHttpClient httpClient; + private JSON json; + + private HttpLoggingInterceptor loggingInterceptor; + + /** + * Basic constructor for ApiClient + */ + public ApiClient() { + init(); + initHttpClient(); + + // Setup authentications (key: authentication name, value: authentication). + authentications.put("BearerAuth", new HttpBearerAuth("bearer")); + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + /** + * Basic constructor with custom OkHttpClient + * + * @param client a {@link okhttp3.OkHttpClient} object + */ + public ApiClient(OkHttpClient client) { + init(); + + httpClient = client; + + // Setup authentications (key: authentication name, value: authentication). + authentications.put("BearerAuth", new HttpBearerAuth("bearer")); + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + private void initHttpClient() { + initHttpClient(Collections.emptyList()); + } + + private void initHttpClient(List interceptors) { + OkHttpClient.Builder builder = new OkHttpClient.Builder(); + builder.addNetworkInterceptor(getProgressInterceptor()); + for (Interceptor interceptor: interceptors) { + builder.addInterceptor(interceptor); + } + + httpClient = builder.build(); + } + + private void init() { + verifyingSsl = true; + + json = new JSON(); + + // Set default User-Agent. + setUserAgent("OpenAPI-Generator/1.0/java"); + + authentications = new HashMap(); + } + + /** + * Get base path + * + * @return Base path + */ + public String getBasePath() { + return basePath; + } + + /** + * Set base path + * + * @param basePath Base path of the URL (e.g https://connectors-admin.lilt.com/api/v1.0 + * @return An instance of OkHttpClient + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + this.serverIndex = null; + return this; + } + + public List getServers() { + return servers; + } + + public ApiClient setServers(List servers) { + this.servers = servers; + return this; + } + + public Integer getServerIndex() { + return serverIndex; + } + + public ApiClient setServerIndex(Integer serverIndex) { + this.serverIndex = serverIndex; + return this; + } + + public Map getServerVariables() { + return serverVariables; + } + + public ApiClient setServerVariables(Map serverVariables) { + this.serverVariables = serverVariables; + return this; + } + + /** + * Get HTTP client + * + * @return An instance of OkHttpClient + */ + public OkHttpClient getHttpClient() { + return httpClient; + } + + /** + * Set HTTP client, which must never be null. + * + * @param newHttpClient An instance of OkHttpClient + * @return Api Client + * @throws java.lang.NullPointerException when newHttpClient is null + */ + public ApiClient setHttpClient(OkHttpClient newHttpClient) { + this.httpClient = Objects.requireNonNull(newHttpClient, "HttpClient must not be null!"); + 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; + } + + /** + *

Getter for the field keyManagers.

+ * + * @return an array of {@link javax.net.ssl.KeyManager} objects + */ + 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; + } + + /** + *

Getter for the field dateFormat.

+ * + * @return a {@link java.text.DateFormat} object + */ + public DateFormat getDateFormat() { + return dateFormat; + } + + /** + *

Setter for the field dateFormat.

+ * + * @param dateFormat a {@link java.text.DateFormat} object + * @return a {@link LiltConnectorSDK.ApiClient} object + */ + public ApiClient setDateFormat(DateFormat dateFormat) { + JSON.setDateFormat(dateFormat); + return this; + } + + /** + *

Set SqlDateFormat.

+ * + * @param dateFormat a {@link java.text.DateFormat} object + * @return a {@link LiltConnectorSDK.ApiClient} object + */ + public ApiClient setSqlDateFormat(DateFormat dateFormat) { + JSON.setSqlDateFormat(dateFormat); + return this; + } + + /** + *

Set OffsetDateTimeFormat.

+ * + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object + * @return a {@link LiltConnectorSDK.ApiClient} object + */ + public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + JSON.setOffsetDateTimeFormat(dateFormat); + return this; + } + + /** + *

Set LocalDateFormat.

+ * + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object + * @return a {@link LiltConnectorSDK.ApiClient} object + */ + public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { + JSON.setLocalDateFormat(dateFormat); + return this; + } + + /** + *

Set LenientOnJson.

+ * + * @param lenientOnJson a boolean + * @return a {@link LiltConnectorSDK.ApiClient} object + */ + public ApiClient setLenientOnJson(boolean lenientOnJson) { + JSON.setLenientOnJson(lenientOnJson); + return this; + } + + /** + * 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 access token for the first Bearer authentication. + * @param bearerToken Bearer token + */ + public void setBearerToken(String bearerToken) { + setBearerToken(() -> bearerToken); + } + + /** + * Helper method to set the supplier of access tokens for Bearer authentication. + * + * @param tokenSupplier The supplier of bearer tokens + */ + public void setBearerToken(Supplier tokenSupplier) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(tokenSupplier); + return; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + + /** + * 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) { + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration(String accessKey, String secretKey, String region, String service) { + throw new RuntimeException("No AWS4 authentication configured!"); + } + + /** + * Helper method to set credentials for AWSV4 Signature + * + * @param accessKey Access Key + * @param secretKey Secret Key + * @param sessionToken Session Token + * @param region Region + * @param service Service to access to + */ + public void setAWS4Configuration(String accessKey, String secretKey, String sessionToken, String region, String service) { + throw new RuntimeException("No AWS4 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; + } + + /** + * Add a default cookie. + * + * @param key The cookie's key + * @param value The cookie's value + * @return ApiClient + */ + public ApiClient addDefaultCookie(String key, String value) { + defaultCookieMap.put(key, value); + 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 = httpClient.newBuilder().addInterceptor(loggingInterceptor).build(); + } else { + final OkHttpClient.Builder builder = httpClient.newBuilder(); + builder.interceptors().remove(loggingInterceptor); + httpClient = builder.build(); + 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 temporary folder. + * + * @see
createTempFile + * @return Temporary folder path + */ + public String getTempFolderPath() { + return tempFolderPath; + } + + /** + * Set the temporary 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.connectTimeoutMillis(); + } + + /** + * Sets the connect timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link java.lang.Integer#MAX_VALUE}. + * + * @param connectionTimeout connection timeout in milliseconds + * @return Api client + */ + public ApiClient setConnectTimeout(int connectionTimeout) { + httpClient = httpClient.newBuilder().connectTimeout(connectionTimeout, TimeUnit.MILLISECONDS).build(); + return this; + } + + /** + * Get read timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public int getReadTimeout() { + return httpClient.readTimeoutMillis(); + } + + /** + * Sets the read timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link java.lang.Integer#MAX_VALUE}. + * + * @param readTimeout read timeout in milliseconds + * @return Api client + */ + public ApiClient setReadTimeout(int readTimeout) { + httpClient = httpClient.newBuilder().readTimeout(readTimeout, TimeUnit.MILLISECONDS).build(); + return this; + } + + /** + * Get write timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public int getWriteTimeout() { + return httpClient.writeTimeoutMillis(); + } + + /** + * Sets the write timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link java.lang.Integer#MAX_VALUE}. + * + * @param writeTimeout connection timeout in milliseconds + * @return Api client + */ + public ApiClient setWriteTimeout(int writeTimeout) { + httpClient = httpClient.newBuilder().writeTimeout(writeTimeout, TimeUnit.MILLISECONDS).build(); + 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 || param instanceof OffsetDateTime || param instanceof LocalDate) { + //Serialize to json string and remove the " enclosing characters + String jsonStr = JSON.serialize(param); + return jsonStr.substring(1, jsonStr.length() - 1); + } else if (param instanceof Collection) { + StringBuilder b = new StringBuilder(); + for (Object o : (Collection) param) { + if (b.length() > 0) { + b.append(","); + } + b.append(o); + } + return b.toString(); + } else { + return String.valueOf(param); + } + } + + /** + * Formats the specified query parameter to a list containing a single {@code Pair} object. + * + * Note that {@code value} must not be a collection. + * + * @param name The name of the parameter. + * @param value The value of the parameter. + * @return A list containing a single {@code Pair} object. + */ + public List parameterToPair(String name, Object value) { + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null || value instanceof Collection) { + return params; + } + + params.add(new Pair(name, parameterToString(value))); + return params; + } + + /** + * Formats the specified collection query parameters to a list of {@code Pair} objects. + * + * Note that the values of each of the returned Pair objects are percent-encoded. + * + * @param collectionFormat The collection format of the parameter. + * @param name The name of the parameter. + * @param value The value of the parameter. + * @return A list of {@code Pair} objects. + */ + public List parameterToPairs(String collectionFormat, String name, Collection value) { + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null || value.isEmpty()) { + return params; + } + + // create the params based on the collection format + if ("multi".equals(collectionFormat)) { + for (Object item : value) { + params.add(new Pair(name, escapeString(parameterToString(item)))); + } + return params; + } + + // collectionFormat is assumed to be "csv" by default + String delimiter = ","; + + // escape all delimiters except commas, which are URI reserved + // characters + if ("ssv".equals(collectionFormat)) { + delimiter = escapeString(" "); + } else if ("tsv".equals(collectionFormat)) { + delimiter = escapeString("\t"); + } else if ("pipes".equals(collectionFormat)) { + delimiter = escapeString("|"); + } + + StringBuilder sb = new StringBuilder(); + for (Object item : value) { + sb.append(delimiter); + sb.append(escapeString(parameterToString(item))); + } + + params.add(new Pair(name, sb.substring(delimiter.length()))); + + return params; + } + + /** + * Formats the specified collection path parameter to a string value. + * + * @param collectionFormat The collection format of the parameter. + * @param value The value of the parameter. + * @return String representation of the parameter + */ + public String collectionPathParameterToString(String collectionFormat, Collection value) { + // create the value based on the collection format + if ("multi".equals(collectionFormat)) { + // not valid for path params + return parameterToString(value); + } + + // collectionFormat is assumed to be "csv" by default + String delimiter = ","; + + if ("ssv".equals(collectionFormat)) { + delimiter = " "; + } else if ("tsv".equals(collectionFormat)) { + delimiter = "\t"; + } else if ("pipes".equals(collectionFormat)) { + delimiter = "|"; + } + + StringBuilder sb = new StringBuilder() ; + for (Object item : value) { + sb.append(delimiter); + sb.append(parameterToString(item)); + } + + return sb.substring(delimiter.length()); + } + + /** + * 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 + * application/vnd.company+json + * "* / *" is also default to JSON + * @param mime MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public boolean isJsonMime(String mime) { + String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"; + return mime != null && (mime.matches(jsonMime) || mime.equals("*/*")); + } + + /** + * 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, + * returns null. If it matches "any", JSON will be used. + */ + public String selectHeaderContentType(String[] contentTypes) { + if (contentTypes.length == 0) { + return null; + } + + if (contentTypes[0].equals("*/*")) { + 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 LiltConnectorSDK.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 LiltConnectorSDK.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((byte[]) obj, MediaType.parse(contentType)); + } else if (obj instanceof File) { + // File body parameter support. + return RequestBody.create((File) obj, MediaType.parse(contentType)); + } else if ("text/plain".equals(contentType) && obj instanceof String) { + return RequestBody.create((String) obj, MediaType.parse(contentType)); + } else if (isJsonMime(contentType)) { + String content; + if (obj != null) { + content = JSON.serialize(obj); + } else { + content = null; + } + return RequestBody.create(content, MediaType.parse(contentType)); + } else if (obj instanceof String) { + return RequestBody.create((String) obj, MediaType.parse(contentType)); + } 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 LiltConnectorSDK.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 + * @return Prepared file for the download + * @throws java.io.IOException If fail to prepare file for 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); + } + // Files.createTempFile requires the prefix to be at least three characters long + if (prefix.length() < 3) + prefix = "download-"; + } + + if (tempFolderPath == null) + return Files.createTempFile(prefix, suffix).toFile(); + else + return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); + } + + /** + * {@link #execute(Call, Type)} + * + * @param Type + * @param call An instance of the Call object + * @return ApiResponse<T> + * @throws LiltConnectorSDK.ApiException If fail to execute the call + */ + 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 LiltConnectorSDK.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. + * + * @param Type + * @param call The callback to be executed when the API call finishes + * @param returnType Return type + * @param callback ApiCallback + * @see #execute(Call, Type) + */ + @SuppressWarnings("unchecked") + public void executeAsync(Call call, final Type returnType, final ApiCallback callback) { + call.enqueue(new Callback() { + @Override + public void onFailure(Call call, IOException e) { + callback.onFailure(new ApiException(e), 0, null); + } + + @Override + public void onResponse(Call call, Response response) throws IOException { + T result; + try { + result = (T) handleResponse(response, returnType); + } catch (ApiException e) { + callback.onFailure(e, response.code(), response.headers().toMultimap()); + return; + } catch (Exception e) { + callback.onFailure(new ApiException(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 + * @return Type + * @throws LiltConnectorSDK.ApiException If the response has an unsuccessful status code or + * fail to deserialize the response body + */ + 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) + if (response.body() != null) { + try { + response.body().close(); + } catch (Exception e) { + throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); + } + } + 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 baseUrl The base URL + * @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 collectionQueryParams The collection query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param cookieParams The cookie parameters + * @param formParams The form parameters + * @param authNames The authentications to apply + * @param callback Callback for upload/download progress + * @return The HTTP call + * @throws LiltConnectorSDK.ApiException If fail to serialize the request body object + */ + public Call buildCall(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { + Request request = buildRequest(baseUrl, path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback); + + return httpClient.newCall(request); + } + + /** + * Build an HTTP request with the given options. + * + * @param baseUrl The base URL + * @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 collectionQueryParams The collection query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param cookieParams The cookie parameters + * @param formParams The form parameters + * @param authNames The authentications to apply + * @param callback Callback for upload/download progress + * @return The HTTP request + * @throws LiltConnectorSDK.ApiException If fail to serialize the request body object + */ + public Request buildRequest(String baseUrl, String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { + // aggregate queryParams (non-collection) and collectionQueryParams into allQueryParams + List allQueryParams = new ArrayList(queryParams); + allQueryParams.addAll(collectionQueryParams); + + final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams); + + // prepare HTTP request body + RequestBody reqBody; + String contentType = headerParams.get("Content-Type"); + String contentTypePure = contentType; + if (contentTypePure != null && contentTypePure.contains(";")) { + contentTypePure = contentType.substring(0, contentType.indexOf(";")); + } + if (!HttpMethod.permitsRequestBody(method)) { + reqBody = null; + } else if ("application/x-www-form-urlencoded".equals(contentTypePure)) { + reqBody = buildRequestBodyFormEncoding(formParams); + } else if ("multipart/form-data".equals(contentTypePure)) { + 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("", contentType == null ? null : MediaType.parse(contentType)); + } + } else { + reqBody = serialize(body, contentType); + } + + // update parameters with authentication settings + updateParamsForAuth(authNames, allQueryParams, headerParams, cookieParams, requestBodyToString(reqBody), method, URI.create(url)); + + final Request.Builder reqBuilder = new Request.Builder().url(url); + processHeaderParams(headerParams, reqBuilder); + processCookieParams(cookieParams, reqBuilder); + + // Associate callback with request (if not null) so interceptor can + // access it when creating ProgressResponseBody + reqBuilder.tag(callback); + + Request request = null; + + if (callback != null && reqBody != null) { + ProgressRequestBody progressRequestBody = new ProgressRequestBody(reqBody, callback); + request = reqBuilder.method(method, progressRequestBody).build(); + } else { + request = reqBuilder.method(method, reqBody).build(); + } + + return request; + } + + /** + * Build full URL by concatenating base path, the given sub path and query parameters. + * + * @param baseUrl The base URL + * @param path The sub path + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @return The full URL + */ + public String buildUrl(String baseUrl, String path, List queryParams, List collectionQueryParams) { + final StringBuilder url = new StringBuilder(); + if (baseUrl != null) { + url.append(baseUrl).append(path); + } else { + String baseURL; + if (serverIndex != null) { + if (serverIndex < 0 || serverIndex >= servers.size()) { + throw new ArrayIndexOutOfBoundsException(String.format( + "Invalid index %d when selecting the host settings. Must be less than %d", serverIndex, servers.size() + )); + } + baseURL = servers.get(serverIndex).URL(serverVariables); + } else { + baseURL = basePath; + } + url.append(baseURL).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)); + } + } + } + + if (collectionQueryParams != null && !collectionQueryParams.isEmpty()) { + String prefix = url.toString().contains("?") ? "&" : "?"; + for (Pair param : collectionQueryParams) { + if (param.getValue() != null) { + if (prefix != null) { + url.append(prefix); + prefix = null; + } else { + url.append("&"); + } + String value = parameterToString(param.getValue()); + // collection query parameter value already escaped as part of parameterToPairs + url.append(escapeString(param.getName())).append("=").append(value); + } + } + } + + return url.toString(); + } + + /** + * Set header parameters to the request builder, including default headers. + * + * @param headerParams Header parameters in the form of Map + * @param reqBuilder Request.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())); + } + } + } + + /** + * Set cookie parameters to the request builder, including default cookies. + * + * @param cookieParams Cookie parameters in the form of Map + * @param reqBuilder Request.Builder + */ + public void processCookieParams(Map cookieParams, Request.Builder reqBuilder) { + for (Entry param : cookieParams.entrySet()) { + reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + } + for (Entry param : defaultCookieMap.entrySet()) { + if (!cookieParams.containsKey(param.getKey())) { + reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.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 + * @param cookieParams Map of cookie parameters + * @param payload HTTP request body + * @param method HTTP method + * @param uri URI + * @throws LiltConnectorSDK.ApiException If fails to update the parameters + */ + public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, + Map cookieParams, String payload, String method, URI uri) throws ApiException { + for (String authName : authNames) { + Authentication auth = authentications.get(authName); + if (auth == null) { + throw new RuntimeException("Authentication undefined: " + authName); + } + auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri); + } + } + + /** + * 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) { + okhttp3.FormBody.Builder formBuilder = new okhttp3.FormBody.Builder(); + 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) { + MultipartBody.Builder mpBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); + for (Entry param : formParams.entrySet()) { + if (param.getValue() instanceof File) { + File file = (File) param.getValue(); + addPartToMultiPartBuilder(mpBuilder, param.getKey(), file); + } else if (param.getValue() instanceof List) { + List list = (List) param.getValue(); + for (Object item: list) { + if (item instanceof File) { + addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item); + } else { + addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue()); + } + } + } else { + addPartToMultiPartBuilder(mpBuilder, param.getKey(), 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; + } + } + + /** + * Add a Content-Disposition Header for the given key and file to the MultipartBody Builder. + * + * @param mpBuilder MultipartBody.Builder + * @param key The key of the Header element + * @param file The file to add to the Header + */ + private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, File file) { + Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\"; filename=\"" + file.getName() + "\""); + MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); + mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType)); + } + + /** + * Add a Content-Disposition Header for the given key and complex object to the MultipartBody Builder. + * + * @param mpBuilder MultipartBody.Builder + * @param key The key of the Header element + * @param obj The complex object to add to the Header + */ + private void addPartToMultiPartBuilder(MultipartBody.Builder mpBuilder, String key, Object obj) { + RequestBody requestBody; + if (obj instanceof String) { + requestBody = RequestBody.create((String) obj, MediaType.parse("text/plain")); + } else { + String content; + if (obj != null) { + content = JSON.serialize(obj); + } else { + content = null; + } + requestBody = RequestBody.create(content, MediaType.parse("application/json")); + } + + Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\""); + mpBuilder.addPart(partHeaders, requestBody); + } + + /** + * Get network interceptor to add it to the httpClient to track download progress for + * async requests. + */ + private Interceptor getProgressInterceptor() { + return new Interceptor() { + @Override + public Response intercept(Interceptor.Chain chain) throws IOException { + final Request request = chain.request(); + final Response originalResponse = chain.proceed(request); + if (request.tag() instanceof ApiCallback) { + final ApiCallback callback = (ApiCallback) request.tag(); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), callback)) + .build(); + } + return originalResponse; + } + }; + } + + /** + * Apply SSL related settings to httpClient according to the current values of + * verifyingSsl and sslCaCert. + */ + private void applySslSettings() { + try { + TrustManager[] trustManagers; + HostnameVerifier hostnameVerifier; + if (!verifyingSsl) { + trustManagers = new TrustManager[]{ + new X509TrustManager() { + @Override + public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { + } + + @Override + public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { + } + + @Override + public java.security.cert.X509Certificate[] getAcceptedIssuers() { + return new java.security.cert.X509Certificate[]{}; + } + } + }; + hostnameVerifier = new HostnameVerifier() { + @Override + public boolean verify(String hostname, SSLSession session) { + return true; + } + }; + } else { + TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); + + if (sslCaCert == null) { + trustManagerFactory.init((KeyStore) null); + } else { + 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" + (index++); + caKeyStore.setCertificateEntry(certificateAlias, certificate); + } + trustManagerFactory.init(caKeyStore); + } + trustManagers = trustManagerFactory.getTrustManagers(); + hostnameVerifier = OkHostnameVerifier.INSTANCE; + } + + SSLContext sslContext = SSLContext.getInstance("TLS"); + sslContext.init(keyManagers, trustManagers, new SecureRandom()); + httpClient = httpClient.newBuilder() + .sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustManagers[0]) + .hostnameVerifier(hostnameVerifier) + .build(); + } 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); + } + } + + /** + * Convert the HTTP request body to a string. + * + * @param requestBody The HTTP request object + * @return The string representation of the HTTP request body + * @throws LiltConnectorSDK.ApiException If fail to serialize the request body object into a string + */ + private String requestBodyToString(RequestBody requestBody) throws ApiException { + if (requestBody != null) { + try { + final Buffer buffer = new Buffer(); + requestBody.writeTo(buffer); + return buffer.readUtf8(); + } catch (final IOException e) { + throw new ApiException(e); + } + } + + // empty http request body + return ""; + } +} diff --git a/src/main/java/LiltConnectorSDK/ApiException.java b/src/main/java/LiltConnectorSDK/ApiException.java new file mode 100644 index 0000000..0c30284 --- /dev/null +++ b/src/main/java/LiltConnectorSDK/ApiException.java @@ -0,0 +1,167 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package LiltConnectorSDK; + +import java.util.Map; +import java.util.List; + + +/** + *

ApiException class.

+ */ +@SuppressWarnings("serial") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class ApiException extends Exception { + private static final long serialVersionUID = 1L; + + private int code = 0; + private Map> responseHeaders = null; + private String responseBody = null; + + /** + *

Constructor for ApiException.

+ */ + public ApiException() {} + + /** + *

Constructor for ApiException.

+ * + * @param throwable a {@link java.lang.Throwable} object + */ + public ApiException(Throwable throwable) { + super(throwable); + } + + /** + *

Constructor for ApiException.

+ * + * @param message the error message + */ + public ApiException(String message) { + super(message); + } + + /** + *

Constructor for ApiException.

+ * + * @param message the error message + * @param throwable a {@link java.lang.Throwable} object + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { + super(message, throwable); + this.code = code; + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + /** + *

Constructor for ApiException.

+ * + * @param message the error message + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ + public ApiException(String message, int code, Map> responseHeaders, String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + /** + *

Constructor for ApiException.

+ * + * @param message the error message + * @param throwable a {@link java.lang.Throwable} object + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + */ + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + /** + *

Constructor for ApiException.

+ * + * @param code HTTP status code + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ + public ApiException(int code, Map> responseHeaders, String responseBody) { + this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody); + } + + /** + *

Constructor for ApiException.

+ * + * @param code HTTP status code + * @param message a {@link java.lang.String} object + */ + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + /** + *

Constructor for ApiException.

+ * + * @param code HTTP status code + * @param message the error message + * @param responseHeaders a {@link java.util.Map} of HTTP response headers + * @param responseBody the response body + */ + 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; + } + + /** + * Get the exception message including HTTP response data. + * + * @return The exception message + */ + public String getMessage() { + return String.format("Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s", + super.getMessage(), this.getCode(), this.getResponseBody(), this.getResponseHeaders()); + } +} diff --git a/src/main/java/LiltConnectorSDK/ApiResponse.java b/src/main/java/LiltConnectorSDK/ApiResponse.java new file mode 100644 index 0000000..541547c --- /dev/null +++ b/src/main/java/LiltConnectorSDK/ApiResponse.java @@ -0,0 +1,76 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package LiltConnectorSDK; + +import java.util.List; +import java.util.Map; + +/** + * API response returned by API call. + */ +public class ApiResponse { + final private int statusCode; + final private Map> headers; + final private T data; + + /** + *

Constructor for ApiResponse.

+ * + * @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); + } + + /** + *

Constructor for ApiResponse.

+ * + * @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; + } + + /** + *

Get the status code.

+ * + * @return the status code + */ + public int getStatusCode() { + return statusCode; + } + + /** + *

Get the headers.

+ * + * @return a {@link java.util.Map} of headers + */ + public Map> getHeaders() { + return headers; + } + + /** + *

Get the data.

+ * + * @return the data + */ + public T getData() { + return data; + } +} diff --git a/src/main/java/LiltConnectorSDK/Configuration.java b/src/main/java/LiltConnectorSDK/Configuration.java new file mode 100644 index 0000000..02e2593 --- /dev/null +++ b/src/main/java/LiltConnectorSDK/Configuration.java @@ -0,0 +1,41 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package LiltConnectorSDK; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class Configuration { + public static final String VERSION = "1.0"; + + 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/src/main/java/LiltConnectorSDK/GzipRequestInterceptor.java b/src/main/java/LiltConnectorSDK/GzipRequestInterceptor.java new file mode 100644 index 0000000..7bf6e02 --- /dev/null +++ b/src/main/java/LiltConnectorSDK/GzipRequestInterceptor.java @@ -0,0 +1,85 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package LiltConnectorSDK; + +import okhttp3.*; +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(); + } + }; + } +} diff --git a/src/main/java/LiltConnectorSDK/JSON.java b/src/main/java/LiltConnectorSDK/JSON.java new file mode 100644 index 0000000..33f8878 --- /dev/null +++ b/src/main/java/LiltConnectorSDK/JSON.java @@ -0,0 +1,420 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package LiltConnectorSDK; + +import com.fasterxml.jackson.databind.util.StdDateFormat; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonElement; +import io.gsonfire.GsonFireBuilder; +import io.gsonfire.TypeSelector; + +import okio.ByteString; + +import java.io.IOException; +import java.io.StringReader; +import java.lang.reflect.Type; +import java.text.DateFormat; +import java.text.ParseException; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.time.ZoneId; +import java.time.ZoneOffset; +import java.time.format.DateTimeFormatter; +import java.util.Date; +import java.util.Locale; +import java.util.Map; +import java.util.HashMap; +import java.util.TimeZone; + +/* + * A JSON utility class + * + * NOTE: in the future, this class may be converted to static, which may break + * backward-compatibility + */ +public class JSON { + private static Gson gson; + private static boolean isLenientOnJson = false; + private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); + private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); + private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); + private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); + private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); + + private static final StdDateFormat sdf = new StdDateFormat() + .withTimeZone(TimeZone.getTimeZone(ZoneId.systemDefault())) + .withColonInTimeZone(true); + private static final DateTimeFormatter dtf = DateTimeFormatter.ISO_OFFSET_DATE_TIME; + + @SuppressWarnings("unchecked") + public static GsonBuilder createGson() { + GsonFireBuilder fireBuilder = new GsonFireBuilder() + ; + GsonBuilder builder = fireBuilder.createGsonBuilder(); + return builder; + } + + private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { + JsonElement element = readElement.getAsJsonObject().get(discriminatorField); + if (null == element) { + throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); + } + return element.getAsString(); + } + + /** + * Returns the Java class that implements the OpenAPI schema for the specified discriminator value. + * + * @param classByDiscriminatorValue The map of discriminator values to Java classes. + * @param discriminatorValue The value of the OpenAPI discriminator in the input data. + * @return The Java class that implements the OpenAPI schema + */ + private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) { + Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue); + if (null == clazz) { + throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); + } + return clazz; + } + + static { + GsonBuilder gsonBuilder = createGson(); + gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter); + gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); + gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); + gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); + gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ErrorResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.JobResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.JobsResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NewJobOptions.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NewOrganizationOptions.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OrganizationResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.PreviewTranslationResponseInner.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ServicesApiCreditTransactionCreateCreditTransactionRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.SettingsResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TranslationResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TranslationsResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateDeliveryOptions.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.UpdateJobOptions.CustomTypeAdapterFactory()); + gson = gsonBuilder.create(); + } + + /** + * Get Gson. + * + * @return Gson + */ + public static Gson getGson() { + return gson; + } + + /** + * Set Gson. + * + * @param gson Gson + */ + public static void setGson(Gson gson) { + JSON.gson = gson; + } + + public static void setLenientOnJson(boolean lenientOnJson) { + isLenientOnJson = lenientOnJson; + } + + /** + * Serialize the given Java object into JSON string. + * + * @param obj Object + * @return String representation of the JSON + */ + public static 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 static T deserialize(String body, Type returnType) { + try { + if (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; + if (returnType.equals(String.class)) { + return (T) body; + } else { + throw (e); + } + } + } + + /** + * Gson TypeAdapter for Byte Array type + */ + public static class ByteArrayAdapter extends TypeAdapter { + + @Override + public void write(JsonWriter out, byte[] value) throws IOException { + if (value == null) { + out.nullValue(); + } else { + out.value(ByteString.of(value).base64()); + } + } + + @Override + public byte[] read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String bytesAsBase64 = in.nextString(); + ByteString byteString = ByteString.decodeBase64(bytesAsBase64); + return byteString.toByteArray(); + } + } + } + + /** + * Gson TypeAdapter for JSR310 OffsetDateTime type + */ + public static class OffsetDateTimeTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public OffsetDateTimeTypeAdapter() { + this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); + } + + public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @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 + */ + public static class LocalDateTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public LocalDateTypeAdapter() { + this(DateTimeFormatter.ISO_LOCAL_DATE); + } + + public LocalDateTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @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); + } + } + } + + public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + offsetDateTimeTypeAdapter.setFormat(dateFormat); + } + + public static void setLocalDateFormat(DateTimeFormatter dateFormat) { + localDateTypeAdapter.setFormat(dateFormat); + } + + /** + * Gson TypeAdapter for java.sql.Date type + * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used + * (more efficient than SimpleDateFormat). + */ + public static class SqlDateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public SqlDateTypeAdapter() {} + + public SqlDateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, java.sql.Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = date.toString(); + } + out.value(value); + } + } + + @Override + public java.sql.Date read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return new java.sql.Date(dateFormat.parse(date).getTime()); + } + return new java.sql.Date(sdf.parse(date).getTime()); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } + } + + /** + * Gson TypeAdapter for java.util.Date type + * If the dateFormat is null, DateTimeFormatter will be used. + */ + public static class DateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public DateTypeAdapter() {} + + public DateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = date.toInstant().atOffset(ZoneOffset.UTC).format(dtf); + } + out.value(value); + } + } + + @Override + public Date read(JsonReader in) throws IOException { + try { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return dateFormat.parse(date); + } + return sdf.parse(date); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } catch (IllegalArgumentException e) { + throw new JsonParseException(e); + } + } + } + + public static void setDateFormat(DateFormat dateFormat) { + dateTypeAdapter.setFormat(dateFormat); + } + + public static void setSqlDateFormat(DateFormat dateFormat) { + sqlDateTypeAdapter.setFormat(dateFormat); + } +} diff --git a/src/main/java/LiltConnectorSDK/Pair.java b/src/main/java/LiltConnectorSDK/Pair.java new file mode 100644 index 0000000..d318495 --- /dev/null +++ b/src/main/java/LiltConnectorSDK/Pair.java @@ -0,0 +1,57 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package LiltConnectorSDK; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +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; + } + + return true; + } +} diff --git a/src/main/java/LiltConnectorSDK/ProgressRequestBody.java b/src/main/java/LiltConnectorSDK/ProgressRequestBody.java new file mode 100644 index 0000000..317f463 --- /dev/null +++ b/src/main/java/LiltConnectorSDK/ProgressRequestBody.java @@ -0,0 +1,73 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package LiltConnectorSDK; + +import okhttp3.MediaType; +import okhttp3.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 { + + private final RequestBody requestBody; + + private final ApiCallback callback; + + public ProgressRequestBody(RequestBody requestBody, ApiCallback callback) { + this.requestBody = requestBody; + this.callback = callback; + } + + @Override + public MediaType contentType() { + return requestBody.contentType(); + } + + @Override + public long contentLength() throws IOException { + return requestBody.contentLength(); + } + + @Override + public void writeTo(BufferedSink sink) throws IOException { + BufferedSink 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; + callback.onUploadProgress(bytesWritten, contentLength, bytesWritten == contentLength); + } + }; + } +} diff --git a/src/main/java/LiltConnectorSDK/ProgressResponseBody.java b/src/main/java/LiltConnectorSDK/ProgressResponseBody.java new file mode 100644 index 0000000..f0104a9 --- /dev/null +++ b/src/main/java/LiltConnectorSDK/ProgressResponseBody.java @@ -0,0 +1,70 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package LiltConnectorSDK; + +import okhttp3.MediaType; +import okhttp3.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 { + + private final ResponseBody responseBody; + private final ApiCallback callback; + private BufferedSource bufferedSource; + + public ProgressResponseBody(ResponseBody responseBody, ApiCallback callback) { + this.responseBody = responseBody; + this.callback = callback; + } + + @Override + public MediaType contentType() { + return responseBody.contentType(); + } + + @Override + public long contentLength() { + return responseBody.contentLength(); + } + + @Override + public BufferedSource source() { + 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; + callback.onDownloadProgress(totalBytesRead, responseBody.contentLength(), bytesRead == -1); + return bytesRead; + } + }; + } +} diff --git a/src/main/java/LiltConnectorSDK/ServerConfiguration.java b/src/main/java/LiltConnectorSDK/ServerConfiguration.java new file mode 100644 index 0000000..da7295e --- /dev/null +++ b/src/main/java/LiltConnectorSDK/ServerConfiguration.java @@ -0,0 +1,59 @@ +package LiltConnectorSDK; + +import java.util.Map; + +/** + * Representing a Server configuration. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class ServerConfiguration { + public String URL; + public String description; + public Map variables; + + /** + * @param URL A URL to the target host. + * @param description A description of the host designated by the URL. + * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. + */ + public ServerConfiguration(String URL, String description, Map variables) { + this.URL = URL; + this.description = description; + this.variables = variables; + } + + /** + * Format URL template using given variables. + * + * @param variables A map between a variable name and its value. + * @return Formatted URL. + */ + public String URL(Map variables) { + String url = this.URL; + + // go through variables and replace placeholders + for (Map.Entry variable: this.variables.entrySet()) { + String name = variable.getKey(); + ServerVariable serverVariable = variable.getValue(); + String value = serverVariable.defaultValue; + + if (variables != null && variables.containsKey(name)) { + value = variables.get(name); + if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { + throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); + } + } + url = url.replace("{" + name + "}", value); + } + return url; + } + + /** + * Format URL template using default server variables. + * + * @return Formatted URL. + */ + public String URL() { + return URL(null); + } +} diff --git a/src/main/java/LiltConnectorSDK/ServerVariable.java b/src/main/java/LiltConnectorSDK/ServerVariable.java new file mode 100644 index 0000000..5799f59 --- /dev/null +++ b/src/main/java/LiltConnectorSDK/ServerVariable.java @@ -0,0 +1,24 @@ +package LiltConnectorSDK; + +import java.util.HashSet; + +/** + * Representing a Server Variable for server URL template substitution. + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class ServerVariable { + public String description; + public String defaultValue; + public HashSet enumValues = null; + + /** + * @param description A description for the server variable. + * @param defaultValue The default value to use for substitution. + * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. + */ + public ServerVariable(String description, String defaultValue, HashSet enumValues) { + this.description = description; + this.defaultValue = defaultValue; + this.enumValues = enumValues; + } +} diff --git a/src/main/java/LiltConnectorSDK/StringUtil.java b/src/main/java/LiltConnectorSDK/StringUtil.java new file mode 100644 index 0000000..58ed631 --- /dev/null +++ b/src/main/java/LiltConnectorSDK/StringUtil.java @@ -0,0 +1,83 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package LiltConnectorSDK; + +import java.util.Collection; +import java.util.Iterator; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +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(); + } + + /** + * Join a list of strings with the given separator. + * + * @param list The list of strings + * @param separator The separator + * @return the resulting string + */ + public static String join(Collection list, String separator) { + Iterator iterator = list.iterator(); + StringBuilder out = new StringBuilder(); + if (iterator.hasNext()) { + out.append(iterator.next()); + } + while (iterator.hasNext()) { + out.append(separator).append(iterator.next()); + } + return out.toString(); + } +} diff --git a/src/main/java/LiltConnectorSDK/auth/ApiKeyAuth.java b/src/main/java/LiltConnectorSDK/auth/ApiKeyAuth.java new file mode 100644 index 0000000..cd3488a --- /dev/null +++ b/src/main/java/LiltConnectorSDK/auth/ApiKeyAuth.java @@ -0,0 +1,80 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package LiltConnectorSDK.auth; + +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.Pair; + +import java.net.URI; +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +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, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + 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); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); + } + } +} diff --git a/src/main/java/LiltConnectorSDK/auth/Authentication.java b/src/main/java/LiltConnectorSDK/auth/Authentication.java new file mode 100644 index 0000000..a23d99d --- /dev/null +++ b/src/main/java/LiltConnectorSDK/auth/Authentication.java @@ -0,0 +1,36 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package LiltConnectorSDK.auth; + +import LiltConnectorSDK.Pair; +import LiltConnectorSDK.ApiException; + +import java.net.URI; +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 + * @param cookieParams Map of cookie parameters + * @param payload HTTP request body + * @param method HTTP method + * @param uri URI + * @throws ApiException if failed to update the parameters + */ + void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException; +} diff --git a/src/main/java/LiltConnectorSDK/auth/HttpBasicAuth.java b/src/main/java/LiltConnectorSDK/auth/HttpBasicAuth.java new file mode 100644 index 0000000..4c6eb89 --- /dev/null +++ b/src/main/java/LiltConnectorSDK/auth/HttpBasicAuth.java @@ -0,0 +1,57 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package LiltConnectorSDK.auth; + +import LiltConnectorSDK.Pair; +import LiltConnectorSDK.ApiException; + +import okhttp3.Credentials; + +import java.net.URI; +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, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + if (username == null && password == null) { + return; + } + headerParams.put("Authorization", Credentials.basic( + username == null ? "" : username, + password == null ? "" : password)); + } +} diff --git a/src/main/java/LiltConnectorSDK/auth/HttpBearerAuth.java b/src/main/java/LiltConnectorSDK/auth/HttpBearerAuth.java new file mode 100644 index 0000000..7f0c7a7 --- /dev/null +++ b/src/main/java/LiltConnectorSDK/auth/HttpBearerAuth.java @@ -0,0 +1,75 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package LiltConnectorSDK.auth; + +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.Pair; + +import java.net.URI; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.function.Supplier; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class HttpBearerAuth implements Authentication { + private final String scheme; + private Supplier tokenSupplier; + + public HttpBearerAuth(String scheme) { + this.scheme = scheme; + } + + /** + * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @return The bearer token + */ + public String getBearerToken() { + return tokenSupplier.get(); + } + + /** + * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param bearerToken The bearer token to send in the Authorization header + */ + public void setBearerToken(String bearerToken) { + this.tokenSupplier = () -> bearerToken; + } + + /** + * Sets the supplier of tokens, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param tokenSupplier The supplier of bearer tokens to send in the Authorization header + */ + public void setBearerToken(Supplier tokenSupplier) { + this.tokenSupplier = tokenSupplier; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams, + String payload, String method, URI uri) throws ApiException { + String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null); + if (bearerToken == null) { + return; + } + + headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + } + + private static String upperCaseBearer(String scheme) { + return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + } +} diff --git a/src/main/java/org/openapitools/client/api/CreditTransactionsApi.java b/src/main/java/org/openapitools/client/api/CreditTransactionsApi.java new file mode 100644 index 0000000..c264d5b --- /dev/null +++ b/src/main/java/org/openapitools/client/api/CreditTransactionsApi.java @@ -0,0 +1,206 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import LiltConnectorSDK.ApiCallback; +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.ApiResponse; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.Pair; +import LiltConnectorSDK.ProgressRequestBody; +import LiltConnectorSDK.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import org.openapitools.client.model.ErrorResponse; +import org.openapitools.client.model.ServicesApiCreditTransactionCreateCreditTransactionRequest; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class CreditTransactionsApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public CreditTransactionsApi() { + this(Configuration.getDefaultApiClient()); + } + + public CreditTransactionsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for servicesApiCreditTransactionCreateCreditTransaction + * @param servicesApiCreditTransactionCreateCreditTransactionRequest (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiCreditTransactionCreateCreditTransactionCall(ServicesApiCreditTransactionCreateCreditTransactionRequest servicesApiCreditTransactionCreateCreditTransactionRequest, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = servicesApiCreditTransactionCreateCreditTransactionRequest; + + // create path and map variables + String localVarPath = "/credit-transaction"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call servicesApiCreditTransactionCreateCreditTransactionValidateBeforeCall(ServicesApiCreditTransactionCreateCreditTransactionRequest servicesApiCreditTransactionCreateCreditTransactionRequest, final ApiCallback _callback) throws ApiException { + return servicesApiCreditTransactionCreateCreditTransactionCall(servicesApiCreditTransactionCreateCreditTransactionRequest, _callback); + + } + + /** + * Create a credit transaction. Request is expected to contain credits information encoded in jwt_token payload. Request encoded should have info for instant_translation_credits_change value, verified_translation_credits_change value, source_metadata which contains any identifying information to attach to the transaction, email for the user starting the transaction, and optionally lilt_token for the connector configuration. + * + * @param servicesApiCreditTransactionCreateCreditTransactionRequest (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public void servicesApiCreditTransactionCreateCreditTransaction(ServicesApiCreditTransactionCreateCreditTransactionRequest servicesApiCreditTransactionCreateCreditTransactionRequest) throws ApiException { + servicesApiCreditTransactionCreateCreditTransactionWithHttpInfo(servicesApiCreditTransactionCreateCreditTransactionRequest); + } + + /** + * Create a credit transaction. Request is expected to contain credits information encoded in jwt_token payload. Request encoded should have info for instant_translation_credits_change value, verified_translation_credits_change value, source_metadata which contains any identifying information to attach to the transaction, email for the user starting the transaction, and optionally lilt_token for the connector configuration. + * + * @param servicesApiCreditTransactionCreateCreditTransactionRequest (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public ApiResponse servicesApiCreditTransactionCreateCreditTransactionWithHttpInfo(ServicesApiCreditTransactionCreateCreditTransactionRequest servicesApiCreditTransactionCreateCreditTransactionRequest) throws ApiException { + okhttp3.Call localVarCall = servicesApiCreditTransactionCreateCreditTransactionValidateBeforeCall(servicesApiCreditTransactionCreateCreditTransactionRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Create a credit transaction. Request is expected to contain credits information encoded in jwt_token payload. Request encoded should have info for instant_translation_credits_change value, verified_translation_credits_change value, source_metadata which contains any identifying information to attach to the transaction, email for the user starting the transaction, and optionally lilt_token for the connector configuration. (asynchronously) + * + * @param servicesApiCreditTransactionCreateCreditTransactionRequest (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 + * @http.response.details + + + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiCreditTransactionCreateCreditTransactionAsync(ServicesApiCreditTransactionCreateCreditTransactionRequest servicesApiCreditTransactionCreateCreditTransactionRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = servicesApiCreditTransactionCreateCreditTransactionValidateBeforeCall(servicesApiCreditTransactionCreateCreditTransactionRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/src/main/java/org/openapitools/client/api/JobsApi.java b/src/main/java/org/openapitools/client/api/JobsApi.java new file mode 100644 index 0000000..1e15249 --- /dev/null +++ b/src/main/java/org/openapitools/client/api/JobsApi.java @@ -0,0 +1,1435 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import LiltConnectorSDK.ApiCallback; +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.ApiResponse; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.Pair; +import LiltConnectorSDK.ProgressRequestBody; +import LiltConnectorSDK.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import org.openapitools.client.model.ErrorResponse; +import java.io.File; +import org.openapitools.client.model.JobResponse; +import org.openapitools.client.model.JobsResponse; +import org.openapitools.client.model.NewJobOptions; +import java.time.OffsetDateTime; +import org.openapitools.client.model.UpdateJobOptions; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class JobsApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public JobsApi() { + this(Configuration.getDefaultApiClient()); + } + + public JobsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for servicesApiJobsAddFile + * @param id The Job ID. (required) + * @param name The file name. (required) + * @param trglang The target language. Many target languages can be added to a source file. To add more than one target language pass in the trglang query parameter multiple times. For example: ?trglang=fr-FR&trglang=es-ES. (required) + * @param srclang The source language. (optional, default to en-US) + * @param due The due date for the file as an ISO-8601 string. (optional) + * @param body (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiJobsAddFileCall(Integer id, String name, List trglang, String srclang, OffsetDateTime due, File body, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/jobs/{id}/files" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (name != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("name", name)); + } + + if (srclang != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("srclang", srclang)); + } + + if (trglang != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "trglang", trglang)); + } + + if (due != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("due", due)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/octet-stream" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call servicesApiJobsAddFileValidateBeforeCall(Integer id, String name, List trglang, String srclang, OffsetDateTime due, File body, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling servicesApiJobsAddFile(Async)"); + } + + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling servicesApiJobsAddFile(Async)"); + } + + // verify the required parameter 'trglang' is set + if (trglang == null) { + throw new ApiException("Missing the required parameter 'trglang' when calling servicesApiJobsAddFile(Async)"); + } + + return servicesApiJobsAddFileCall(id, name, trglang, srclang, due, body, _callback); + + } + + /** + * Add a file to a Job. + * Add files to a job to submit them for translation. + * @param id The Job ID. (required) + * @param name The file name. (required) + * @param trglang The target language. Many target languages can be added to a source file. To add more than one target language pass in the trglang query parameter multiple times. For example: ?trglang=fr-FR&trglang=es-ES. (required) + * @param srclang The source language. (optional, default to en-US) + * @param due The due date for the file as an ISO-8601 string. (optional) + * @param body (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public void servicesApiJobsAddFile(Integer id, String name, List trglang, String srclang, OffsetDateTime due, File body) throws ApiException { + servicesApiJobsAddFileWithHttpInfo(id, name, trglang, srclang, due, body); + } + + /** + * Add a file to a Job. + * Add files to a job to submit them for translation. + * @param id The Job ID. (required) + * @param name The file name. (required) + * @param trglang The target language. Many target languages can be added to a source file. To add more than one target language pass in the trglang query parameter multiple times. For example: ?trglang=fr-FR&trglang=es-ES. (required) + * @param srclang The source language. (optional, default to en-US) + * @param due The due date for the file as an ISO-8601 string. (optional) + * @param body (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public ApiResponse servicesApiJobsAddFileWithHttpInfo(Integer id, String name, List trglang, String srclang, OffsetDateTime due, File body) throws ApiException { + okhttp3.Call localVarCall = servicesApiJobsAddFileValidateBeforeCall(id, name, trglang, srclang, due, body, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Add a file to a Job. (asynchronously) + * Add files to a job to submit them for translation. + * @param id The Job ID. (required) + * @param name The file name. (required) + * @param trglang The target language. Many target languages can be added to a source file. To add more than one target language pass in the trglang query parameter multiple times. For example: ?trglang=fr-FR&trglang=es-ES. (required) + * @param srclang The source language. (optional, default to en-US) + * @param due The due date for the file as an ISO-8601 string. (optional) + * @param body (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 + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiJobsAddFileAsync(Integer id, String name, List trglang, String srclang, OffsetDateTime due, File body, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = servicesApiJobsAddFileValidateBeforeCall(id, name, trglang, srclang, due, body, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for servicesApiJobsCreateJob + * @param newJobOptions (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
201 The job response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiJobsCreateJobCall(NewJobOptions newJobOptions, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = newJobOptions; + + // create path and map variables + String localVarPath = "/jobs"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call servicesApiJobsCreateJobValidateBeforeCall(NewJobOptions newJobOptions, final ApiCallback _callback) throws ApiException { + return servicesApiJobsCreateJobCall(newJobOptions, _callback); + + } + + /** + * Create a Connector Job. + * The general workflow for a job is as follows. 1. Create a job. 1. Add files to a job. 1. Start the job. 1. Poll for translation completion. 1. Download the translated files. + * @param newJobOptions (optional) + * @return JobResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
201 The job response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public JobResponse servicesApiJobsCreateJob(NewJobOptions newJobOptions) throws ApiException { + ApiResponse localVarResp = servicesApiJobsCreateJobWithHttpInfo(newJobOptions); + return localVarResp.getData(); + } + + /** + * Create a Connector Job. + * The general workflow for a job is as follows. 1. Create a job. 1. Add files to a job. 1. Start the job. 1. Poll for translation completion. 1. Download the translated files. + * @param newJobOptions (optional) + * @return ApiResponse<JobResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
201 The job response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public ApiResponse servicesApiJobsCreateJobWithHttpInfo(NewJobOptions newJobOptions) throws ApiException { + okhttp3.Call localVarCall = servicesApiJobsCreateJobValidateBeforeCall(newJobOptions, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create a Connector Job. (asynchronously) + * The general workflow for a job is as follows. 1. Create a job. 1. Add files to a job. 1. Start the job. 1. Poll for translation completion. 1. Download the translated files. + * @param newJobOptions (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 + * @http.response.details + + + + + + + +
Status Code Description Response Headers
201 The job response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiJobsCreateJobAsync(NewJobOptions newJobOptions, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = servicesApiJobsCreateJobValidateBeforeCall(newJobOptions, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for servicesApiJobsDeleteJobById + * @param id The Job ID. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiJobsDeleteJobByIdCall(Integer id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/jobs/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call servicesApiJobsDeleteJobByIdValidateBeforeCall(Integer id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling servicesApiJobsDeleteJobById(Async)"); + } + + return servicesApiJobsDeleteJobByIdCall(id, _callback); + + } + + /** + * Delete a Connector Job. + * + * @param id The Job ID. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public void servicesApiJobsDeleteJobById(Integer id) throws ApiException { + servicesApiJobsDeleteJobByIdWithHttpInfo(id); + } + + /** + * Delete a Connector Job. + * + * @param id The Job ID. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public ApiResponse servicesApiJobsDeleteJobByIdWithHttpInfo(Integer id) throws ApiException { + okhttp3.Call localVarCall = servicesApiJobsDeleteJobByIdValidateBeforeCall(id, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete a Connector Job. (asynchronously) + * + * @param id The Job ID. (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 + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiJobsDeleteJobByIdAsync(Integer id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = servicesApiJobsDeleteJobByIdValidateBeforeCall(id, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for servicesApiJobsGetJobById + * @param id The Job ID. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The job response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiJobsGetJobByIdCall(Integer id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/jobs/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call servicesApiJobsGetJobByIdValidateBeforeCall(Integer id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling servicesApiJobsGetJobById(Async)"); + } + + return servicesApiJobsGetJobByIdCall(id, _callback); + + } + + /** + * Retrieve a Connector Job. + * + * @param id The Job ID. (required) + * @return JobResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The job response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public JobResponse servicesApiJobsGetJobById(Integer id) throws ApiException { + ApiResponse localVarResp = servicesApiJobsGetJobByIdWithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Retrieve a Connector Job. + * + * @param id The Job ID. (required) + * @return ApiResponse<JobResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The job response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public ApiResponse servicesApiJobsGetJobByIdWithHttpInfo(Integer id) throws ApiException { + okhttp3.Call localVarCall = servicesApiJobsGetJobByIdValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Retrieve a Connector Job. (asynchronously) + * + * @param id The Job ID. (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 + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The job response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiJobsGetJobByIdAsync(Integer id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = servicesApiJobsGetJobByIdValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for servicesApiJobsGetJobTranslations + * @param limit the query limit (optional, default to 25) + * @param start where to start (optional, default to 0) + * @param order how to order the returned results (optional, default to asc) + * @param filterOutCompleted Weather it should filter out completed translations (optional, default to false) + * @param liltTranslationWorkflow Filter by selected translation workflow (optional) + * @param orderStatus Filter by list of order level statuses (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 The jobs response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiJobsGetJobTranslationsCall(Integer limit, Integer start, String order, Boolean filterOutCompleted, String liltTranslationWorkflow, String orderStatus, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/jobs/translations"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (start != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("start", start)); + } + + if (order != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("order", order)); + } + + if (filterOutCompleted != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter_out_completed", filterOutCompleted)); + } + + if (liltTranslationWorkflow != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("lilt_translation_workflow", liltTranslationWorkflow)); + } + + if (orderStatus != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("order_status", orderStatus)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call servicesApiJobsGetJobTranslationsValidateBeforeCall(Integer limit, Integer start, String order, Boolean filterOutCompleted, String liltTranslationWorkflow, String orderStatus, final ApiCallback _callback) throws ApiException { + return servicesApiJobsGetJobTranslationsCall(limit, start, order, filterOutCompleted, liltTranslationWorkflow, orderStatus, _callback); + + } + + /** + * Retrieve a list of Translations with their Job information. + * + * @param limit the query limit (optional, default to 25) + * @param start where to start (optional, default to 0) + * @param order how to order the returned results (optional, default to asc) + * @param filterOutCompleted Weather it should filter out completed translations (optional, default to false) + * @param liltTranslationWorkflow Filter by selected translation workflow (optional) + * @param orderStatus Filter by list of order level statuses (optional) + * @return JobsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 The jobs response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public JobsResponse servicesApiJobsGetJobTranslations(Integer limit, Integer start, String order, Boolean filterOutCompleted, String liltTranslationWorkflow, String orderStatus) throws ApiException { + ApiResponse localVarResp = servicesApiJobsGetJobTranslationsWithHttpInfo(limit, start, order, filterOutCompleted, liltTranslationWorkflow, orderStatus); + return localVarResp.getData(); + } + + /** + * Retrieve a list of Translations with their Job information. + * + * @param limit the query limit (optional, default to 25) + * @param start where to start (optional, default to 0) + * @param order how to order the returned results (optional, default to asc) + * @param filterOutCompleted Weather it should filter out completed translations (optional, default to false) + * @param liltTranslationWorkflow Filter by selected translation workflow (optional) + * @param orderStatus Filter by list of order level statuses (optional) + * @return ApiResponse<JobsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 The jobs response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public ApiResponse servicesApiJobsGetJobTranslationsWithHttpInfo(Integer limit, Integer start, String order, Boolean filterOutCompleted, String liltTranslationWorkflow, String orderStatus) throws ApiException { + okhttp3.Call localVarCall = servicesApiJobsGetJobTranslationsValidateBeforeCall(limit, start, order, filterOutCompleted, liltTranslationWorkflow, orderStatus, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Retrieve a list of Translations with their Job information. (asynchronously) + * + * @param limit the query limit (optional, default to 25) + * @param start where to start (optional, default to 0) + * @param order how to order the returned results (optional, default to asc) + * @param filterOutCompleted Weather it should filter out completed translations (optional, default to false) + * @param liltTranslationWorkflow Filter by selected translation workflow (optional) + * @param orderStatus Filter by list of order level statuses (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 + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 The jobs response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiJobsGetJobTranslationsAsync(Integer limit, Integer start, String order, Boolean filterOutCompleted, String liltTranslationWorkflow, String orderStatus, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = servicesApiJobsGetJobTranslationsValidateBeforeCall(limit, start, order, filterOutCompleted, liltTranslationWorkflow, orderStatus, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for servicesApiJobsGetJobs + * @param limit the query limit (optional, default to 25) + * @param start where to start (optional, default to 0) + * @param order how to order the returned results (optional, default to asc) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 The jobs response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiJobsGetJobsCall(Integer limit, Integer start, String order, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/jobs"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (start != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("start", start)); + } + + if (order != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("order", order)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call servicesApiJobsGetJobsValidateBeforeCall(Integer limit, Integer start, String order, final ApiCallback _callback) throws ApiException { + return servicesApiJobsGetJobsCall(limit, start, order, _callback); + + } + + /** + * Retrieve a list of Connector Jobs. + * + * @param limit the query limit (optional, default to 25) + * @param start where to start (optional, default to 0) + * @param order how to order the returned results (optional, default to asc) + * @return JobsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 The jobs response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public JobsResponse servicesApiJobsGetJobs(Integer limit, Integer start, String order) throws ApiException { + ApiResponse localVarResp = servicesApiJobsGetJobsWithHttpInfo(limit, start, order); + return localVarResp.getData(); + } + + /** + * Retrieve a list of Connector Jobs. + * + * @param limit the query limit (optional, default to 25) + * @param start where to start (optional, default to 0) + * @param order how to order the returned results (optional, default to asc) + * @return ApiResponse<JobsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 The jobs response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public ApiResponse servicesApiJobsGetJobsWithHttpInfo(Integer limit, Integer start, String order) throws ApiException { + okhttp3.Call localVarCall = servicesApiJobsGetJobsValidateBeforeCall(limit, start, order, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Retrieve a list of Connector Jobs. (asynchronously) + * + * @param limit the query limit (optional, default to 25) + * @param start where to start (optional, default to 0) + * @param order how to order the returned results (optional, default to asc) + * @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 + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 The jobs response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiJobsGetJobsAsync(Integer limit, Integer start, String order, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = servicesApiJobsGetJobsValidateBeforeCall(limit, start, order, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for servicesApiJobsStartJob + * @param id The Job ID. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. Use the job ID to poll for subsequent status changes. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiJobsStartJobCall(Integer id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/jobs/{id}/start" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call servicesApiJobsStartJobValidateBeforeCall(Integer id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling servicesApiJobsStartJob(Async)"); + } + + return servicesApiJobsStartJobCall(id, _callback); + + } + + /** + * Start a Job. + * Start a job once all of the source files have been added. Use the Job ID to poll for completion to ensure everything has been well received by Lilt. + * @param id The Job ID. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. Use the job ID to poll for subsequent status changes. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public void servicesApiJobsStartJob(Integer id) throws ApiException { + servicesApiJobsStartJobWithHttpInfo(id); + } + + /** + * Start a Job. + * Start a job once all of the source files have been added. Use the Job ID to poll for completion to ensure everything has been well received by Lilt. + * @param id The Job ID. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. Use the job ID to poll for subsequent status changes. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public ApiResponse servicesApiJobsStartJobWithHttpInfo(Integer id) throws ApiException { + okhttp3.Call localVarCall = servicesApiJobsStartJobValidateBeforeCall(id, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Start a Job. (asynchronously) + * Start a job once all of the source files have been added. Use the Job ID to poll for completion to ensure everything has been well received by Lilt. + * @param id The Job ID. (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 + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. Use the job ID to poll for subsequent status changes. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiJobsStartJobAsync(Integer id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = servicesApiJobsStartJobValidateBeforeCall(id, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for servicesApiJobsSyncJob + * @param id The Job ID. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. Use the job ID to poll for subsequent status changes. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiJobsSyncJobCall(Integer id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/jobs/{id}/sync" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call servicesApiJobsSyncJobValidateBeforeCall(Integer id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling servicesApiJobsSyncJob(Async)"); + } + + return servicesApiJobsSyncJobCall(id, _callback); + + } + + /** + * Start a Sync. + * Checks for updates to the translations. Use the Job ID to poll for successful completion of the sync. When the sync is complete the translations endpoint can be used to view the translation status for the job. + * @param id The Job ID. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. Use the job ID to poll for subsequent status changes. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public void servicesApiJobsSyncJob(Integer id) throws ApiException { + servicesApiJobsSyncJobWithHttpInfo(id); + } + + /** + * Start a Sync. + * Checks for updates to the translations. Use the Job ID to poll for successful completion of the sync. When the sync is complete the translations endpoint can be used to view the translation status for the job. + * @param id The Job ID. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. Use the job ID to poll for subsequent status changes. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public ApiResponse servicesApiJobsSyncJobWithHttpInfo(Integer id) throws ApiException { + okhttp3.Call localVarCall = servicesApiJobsSyncJobValidateBeforeCall(id, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Start a Sync. (asynchronously) + * Checks for updates to the translations. Use the Job ID to poll for successful completion of the sync. When the sync is complete the translations endpoint can be used to view the translation status for the job. + * @param id The Job ID. (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 + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. Use the job ID to poll for subsequent status changes. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiJobsSyncJobAsync(Integer id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = servicesApiJobsSyncJobValidateBeforeCall(id, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for servicesApiJobsUpdateJob + * @param id The Job ID. (required) + * @param updateJobOptions (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 The job response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiJobsUpdateJobCall(Integer id, UpdateJobOptions updateJobOptions, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateJobOptions; + + // create path and map variables + String localVarPath = "/jobs/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call servicesApiJobsUpdateJobValidateBeforeCall(Integer id, UpdateJobOptions updateJobOptions, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling servicesApiJobsUpdateJob(Async)"); + } + + return servicesApiJobsUpdateJobCall(id, updateJobOptions, _callback); + + } + + /** + * Update a Connector Job. + * Update a job to change the status or error message. + * @param id The Job ID. (required) + * @param updateJobOptions (optional) + * @return JobResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 The job response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public JobResponse servicesApiJobsUpdateJob(Integer id, UpdateJobOptions updateJobOptions) throws ApiException { + ApiResponse localVarResp = servicesApiJobsUpdateJobWithHttpInfo(id, updateJobOptions); + return localVarResp.getData(); + } + + /** + * Update a Connector Job. + * Update a job to change the status or error message. + * @param id The Job ID. (required) + * @param updateJobOptions (optional) + * @return ApiResponse<JobResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 The job response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public ApiResponse servicesApiJobsUpdateJobWithHttpInfo(Integer id, UpdateJobOptions updateJobOptions) throws ApiException { + okhttp3.Call localVarCall = servicesApiJobsUpdateJobValidateBeforeCall(id, updateJobOptions, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update a Connector Job. (asynchronously) + * Update a job to change the status or error message. + * @param id The Job ID. (required) + * @param updateJobOptions (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 + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 The job response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiJobsUpdateJobAsync(Integer id, UpdateJobOptions updateJobOptions, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = servicesApiJobsUpdateJobValidateBeforeCall(id, updateJobOptions, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/org/openapitools/client/api/OrganizationApi.java b/src/main/java/org/openapitools/client/api/OrganizationApi.java new file mode 100644 index 0000000..2767784 --- /dev/null +++ b/src/main/java/org/openapitools/client/api/OrganizationApi.java @@ -0,0 +1,205 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import LiltConnectorSDK.ApiCallback; +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.ApiResponse; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.Pair; +import LiltConnectorSDK.ProgressRequestBody; +import LiltConnectorSDK.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import org.openapitools.client.model.ErrorResponse; +import org.openapitools.client.model.OrganizationResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class OrganizationApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public OrganizationApi() { + this(Configuration.getDefaultApiClient()); + } + + public OrganizationApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for servicesApiOrganizationGetOrganizationRecord + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 The settings response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiOrganizationGetOrganizationRecordCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/organization"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call servicesApiOrganizationGetOrganizationRecordValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return servicesApiOrganizationGetOrganizationRecordCall(_callback); + + } + + /** + * Get information about the organization based on lilt_token + * + * @return OrganizationResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 The settings response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public OrganizationResponse servicesApiOrganizationGetOrganizationRecord() throws ApiException { + ApiResponse localVarResp = servicesApiOrganizationGetOrganizationRecordWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Get information about the organization based on lilt_token + * + * @return ApiResponse<OrganizationResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 The settings response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public ApiResponse servicesApiOrganizationGetOrganizationRecordWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = servicesApiOrganizationGetOrganizationRecordValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get information about the organization based on lilt_token (asynchronously) + * + * @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 + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 The settings response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiOrganizationGetOrganizationRecordAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = servicesApiOrganizationGetOrganizationRecordValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/org/openapitools/client/api/RegistrationApi.java b/src/main/java/org/openapitools/client/api/RegistrationApi.java new file mode 100644 index 0000000..4da623e --- /dev/null +++ b/src/main/java/org/openapitools/client/api/RegistrationApi.java @@ -0,0 +1,198 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import LiltConnectorSDK.ApiCallback; +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.ApiResponse; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.Pair; +import LiltConnectorSDK.ProgressRequestBody; +import LiltConnectorSDK.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import org.openapitools.client.model.ErrorResponse; +import org.openapitools.client.model.NewOrganizationOptions; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class RegistrationApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public RegistrationApi() { + this(Configuration.getDefaultApiClient()); + } + + public RegistrationApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for servicesApiRegistrationRegisterCreditsBasedOrganization + * @param newOrganizationOptions (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. -
400 The Bad Request response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiRegistrationRegisterCreditsBasedOrganizationCall(NewOrganizationOptions newOrganizationOptions, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = newOrganizationOptions; + + // create path and map variables + String localVarPath = "/register"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call servicesApiRegistrationRegisterCreditsBasedOrganizationValidateBeforeCall(NewOrganizationOptions newOrganizationOptions, final ApiCallback _callback) throws ApiException { + return servicesApiRegistrationRegisterCreditsBasedOrganizationCall(newOrganizationOptions, _callback); + + } + + /** + * Register a new Connectors Organization + * This endpoint is used to register a connector organization in preparation to handle credits management. + * @param newOrganizationOptions (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. -
400 The Bad Request response. -
500 The Server Error response. -
+ */ + public void servicesApiRegistrationRegisterCreditsBasedOrganization(NewOrganizationOptions newOrganizationOptions) throws ApiException { + servicesApiRegistrationRegisterCreditsBasedOrganizationWithHttpInfo(newOrganizationOptions); + } + + /** + * Register a new Connectors Organization + * This endpoint is used to register a connector organization in preparation to handle credits management. + * @param newOrganizationOptions (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. -
400 The Bad Request response. -
500 The Server Error response. -
+ */ + public ApiResponse servicesApiRegistrationRegisterCreditsBasedOrganizationWithHttpInfo(NewOrganizationOptions newOrganizationOptions) throws ApiException { + okhttp3.Call localVarCall = servicesApiRegistrationRegisterCreditsBasedOrganizationValidateBeforeCall(newOrganizationOptions, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Register a new Connectors Organization (asynchronously) + * This endpoint is used to register a connector organization in preparation to handle credits management. + * @param newOrganizationOptions (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 + * @http.response.details + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. -
400 The Bad Request response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiRegistrationRegisterCreditsBasedOrganizationAsync(NewOrganizationOptions newOrganizationOptions, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = servicesApiRegistrationRegisterCreditsBasedOrganizationValidateBeforeCall(newOrganizationOptions, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/src/main/java/org/openapitools/client/api/SettingsApi.java b/src/main/java/org/openapitools/client/api/SettingsApi.java new file mode 100644 index 0000000..759b9ff --- /dev/null +++ b/src/main/java/org/openapitools/client/api/SettingsApi.java @@ -0,0 +1,339 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import LiltConnectorSDK.ApiCallback; +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.ApiResponse; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.Pair; +import LiltConnectorSDK.ProgressRequestBody; +import LiltConnectorSDK.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import org.openapitools.client.model.ErrorResponse; +import org.openapitools.client.model.SettingsResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class SettingsApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public SettingsApi() { + this(Configuration.getDefaultApiClient()); + } + + public SettingsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for servicesApiSettingsGetSettings + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 The settings response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiSettingsGetSettingsCall(final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/settings"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call servicesApiSettingsGetSettingsValidateBeforeCall(final ApiCallback _callback) throws ApiException { + return servicesApiSettingsGetSettingsCall(_callback); + + } + + /** + * Retrieve the settings. + * + * @return SettingsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 The settings response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public SettingsResponse servicesApiSettingsGetSettings() throws ApiException { + ApiResponse localVarResp = servicesApiSettingsGetSettingsWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Retrieve the settings. + * + * @return ApiResponse<SettingsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 The settings response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public ApiResponse servicesApiSettingsGetSettingsWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = servicesApiSettingsGetSettingsValidateBeforeCall(null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Retrieve the settings. (asynchronously) + * + * @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 + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 The settings response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiSettingsGetSettingsAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = servicesApiSettingsGetSettingsValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for servicesApiSettingsUpdateSettings + * @param settingsResponse (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 The settings response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiSettingsUpdateSettingsCall(SettingsResponse settingsResponse, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = settingsResponse; + + // create path and map variables + String localVarPath = "/settings"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call servicesApiSettingsUpdateSettingsValidateBeforeCall(SettingsResponse settingsResponse, final ApiCallback _callback) throws ApiException { + return servicesApiSettingsUpdateSettingsCall(settingsResponse, _callback); + + } + + /** + * Update the settings. + * + * @param settingsResponse (optional) + * @return SettingsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 The settings response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public SettingsResponse servicesApiSettingsUpdateSettings(SettingsResponse settingsResponse) throws ApiException { + ApiResponse localVarResp = servicesApiSettingsUpdateSettingsWithHttpInfo(settingsResponse); + return localVarResp.getData(); + } + + /** + * Update the settings. + * + * @param settingsResponse (optional) + * @return ApiResponse<SettingsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 The settings response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public ApiResponse servicesApiSettingsUpdateSettingsWithHttpInfo(SettingsResponse settingsResponse) throws ApiException { + okhttp3.Call localVarCall = servicesApiSettingsUpdateSettingsValidateBeforeCall(settingsResponse, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update the settings. (asynchronously) + * + * @param settingsResponse (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 + * @http.response.details + + + + + + + +
Status Code Description Response Headers
200 The settings response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiSettingsUpdateSettingsAsync(SettingsResponse settingsResponse, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = servicesApiSettingsUpdateSettingsValidateBeforeCall(settingsResponse, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/org/openapitools/client/api/TranslationsApi.java b/src/main/java/org/openapitools/client/api/TranslationsApi.java new file mode 100644 index 0000000..6935ccb --- /dev/null +++ b/src/main/java/org/openapitools/client/api/TranslationsApi.java @@ -0,0 +1,1097 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import LiltConnectorSDK.ApiCallback; +import LiltConnectorSDK.ApiClient; +import LiltConnectorSDK.ApiException; +import LiltConnectorSDK.ApiResponse; +import LiltConnectorSDK.Configuration; +import LiltConnectorSDK.Pair; +import LiltConnectorSDK.ProgressRequestBody; +import LiltConnectorSDK.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import org.openapitools.client.model.ErrorResponse; +import org.openapitools.client.model.PreviewTranslationResponseInner; +import org.openapitools.client.model.TranslationResponse; +import org.openapitools.client.model.TranslationsResponse; +import org.openapitools.client.model.UpdateDeliveryOptions; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class TranslationsApi { + private ApiClient localVarApiClient; + private int localHostIndex; + private String localCustomBaseUrl; + + public TranslationsApi() { + this(Configuration.getDefaultApiClient()); + } + + public TranslationsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public int getHostIndex() { + return localHostIndex; + } + + public void setHostIndex(int hostIndex) { + this.localHostIndex = hostIndex; + } + + public String getCustomBaseUrl() { + return localCustomBaseUrl; + } + + public void setCustomBaseUrl(String customBaseUrl) { + this.localCustomBaseUrl = customBaseUrl; + } + + /** + * Build call for servicesApiDeliveriesCompleteDelivery + * @param id The ID. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiDeliveriesCompleteDeliveryCall(Integer id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/translations/{id}/complete" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call servicesApiDeliveriesCompleteDeliveryValidateBeforeCall(Integer id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling servicesApiDeliveriesCompleteDelivery(Async)"); + } + + return servicesApiDeliveriesCompleteDeliveryCall(id, _callback); + + } + + /** + * Complete a Translation. + * + * @param id The ID. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public void servicesApiDeliveriesCompleteDelivery(Integer id) throws ApiException { + servicesApiDeliveriesCompleteDeliveryWithHttpInfo(id); + } + + /** + * Complete a Translation. + * + * @param id The ID. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public ApiResponse servicesApiDeliveriesCompleteDeliveryWithHttpInfo(Integer id) throws ApiException { + okhttp3.Call localVarCall = servicesApiDeliveriesCompleteDeliveryValidateBeforeCall(id, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Complete a Translation. (asynchronously) + * + * @param id The ID. (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 + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
204 Upon success a response with an empty body is returned. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiDeliveriesCompleteDeliveryAsync(Integer id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = servicesApiDeliveriesCompleteDeliveryValidateBeforeCall(id, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for servicesApiDeliveriesDownloadDelivery + * @param id The ID. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The translation contents. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiDeliveriesDownloadDeliveryCall(Integer id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/translations/{id}/download" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/octet-stream", + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call servicesApiDeliveriesDownloadDeliveryValidateBeforeCall(Integer id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling servicesApiDeliveriesDownloadDelivery(Async)"); + } + + return servicesApiDeliveriesDownloadDeliveryCall(id, _callback); + + } + + /** + * Download a Translation. + * + * @param id The ID. (required) + * @return String + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The translation contents. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public String servicesApiDeliveriesDownloadDelivery(Integer id) throws ApiException { + ApiResponse localVarResp = servicesApiDeliveriesDownloadDeliveryWithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Download a Translation. + * + * @param id The ID. (required) + * @return ApiResponse<String> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The translation contents. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public ApiResponse servicesApiDeliveriesDownloadDeliveryWithHttpInfo(Integer id) throws ApiException { + okhttp3.Call localVarCall = servicesApiDeliveriesDownloadDeliveryValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Download a Translation. (asynchronously) + * + * @param id The ID. (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 + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The translation contents. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiDeliveriesDownloadDeliveryAsync(Integer id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = servicesApiDeliveriesDownloadDeliveryValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for servicesApiDeliveriesDownloadDeliverySource + * @param id The ID. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The translation source contents. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiDeliveriesDownloadDeliverySourceCall(Integer id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/translations/{id}/source" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/octet-stream", + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call servicesApiDeliveriesDownloadDeliverySourceValidateBeforeCall(Integer id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling servicesApiDeliveriesDownloadDeliverySource(Async)"); + } + + return servicesApiDeliveriesDownloadDeliverySourceCall(id, _callback); + + } + + /** + * Download a Translation Source. + * + * @param id The ID. (required) + * @return String + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The translation source contents. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public String servicesApiDeliveriesDownloadDeliverySource(Integer id) throws ApiException { + ApiResponse localVarResp = servicesApiDeliveriesDownloadDeliverySourceWithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Download a Translation Source. + * + * @param id The ID. (required) + * @return ApiResponse<String> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The translation source contents. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public ApiResponse servicesApiDeliveriesDownloadDeliverySourceWithHttpInfo(Integer id) throws ApiException { + okhttp3.Call localVarCall = servicesApiDeliveriesDownloadDeliverySourceValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Download a Translation Source. (asynchronously) + * + * @param id The ID. (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 + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The translation source contents. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiDeliveriesDownloadDeliverySourceAsync(Integer id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = servicesApiDeliveriesDownloadDeliverySourceValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for servicesApiDeliveriesGetDeliveriesByJobId + * @param limit the query limit (optional, default to 25) + * @param start where to start (optional, default to 0) + * @param jobId The Job ID. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The translations response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiDeliveriesGetDeliveriesByJobIdCall(Integer limit, Integer start, Integer jobId, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/translations"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + + if (start != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("start", start)); + } + + if (jobId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("job_id", jobId)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call servicesApiDeliveriesGetDeliveriesByJobIdValidateBeforeCall(Integer limit, Integer start, Integer jobId, final ApiCallback _callback) throws ApiException { + return servicesApiDeliveriesGetDeliveriesByJobIdCall(limit, start, jobId, _callback); + + } + + /** + * Retrieve a list of Translations. + * + * @param limit the query limit (optional, default to 25) + * @param start where to start (optional, default to 0) + * @param jobId The Job ID. (optional) + * @return TranslationsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The translations response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public TranslationsResponse servicesApiDeliveriesGetDeliveriesByJobId(Integer limit, Integer start, Integer jobId) throws ApiException { + ApiResponse localVarResp = servicesApiDeliveriesGetDeliveriesByJobIdWithHttpInfo(limit, start, jobId); + return localVarResp.getData(); + } + + /** + * Retrieve a list of Translations. + * + * @param limit the query limit (optional, default to 25) + * @param start where to start (optional, default to 0) + * @param jobId The Job ID. (optional) + * @return ApiResponse<TranslationsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The translations response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public ApiResponse servicesApiDeliveriesGetDeliveriesByJobIdWithHttpInfo(Integer limit, Integer start, Integer jobId) throws ApiException { + okhttp3.Call localVarCall = servicesApiDeliveriesGetDeliveriesByJobIdValidateBeforeCall(limit, start, jobId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Retrieve a list of Translations. (asynchronously) + * + * @param limit the query limit (optional, default to 25) + * @param start where to start (optional, default to 0) + * @param jobId The Job ID. (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 + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The translations response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiDeliveriesGetDeliveriesByJobIdAsync(Integer limit, Integer start, Integer jobId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = servicesApiDeliveriesGetDeliveriesByJobIdValidateBeforeCall(limit, start, jobId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for servicesApiDeliveriesGetDeliveryById + * @param id The ID. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The translation response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiDeliveriesGetDeliveryByIdCall(Integer id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/translations/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call servicesApiDeliveriesGetDeliveryByIdValidateBeforeCall(Integer id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling servicesApiDeliveriesGetDeliveryById(Async)"); + } + + return servicesApiDeliveriesGetDeliveryByIdCall(id, _callback); + + } + + /** + * Retrieve a Translation. + * + * @param id The ID. (required) + * @return TranslationResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The translation response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public TranslationResponse servicesApiDeliveriesGetDeliveryById(Integer id) throws ApiException { + ApiResponse localVarResp = servicesApiDeliveriesGetDeliveryByIdWithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Retrieve a Translation. + * + * @param id The ID. (required) + * @return ApiResponse<TranslationResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The translation response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public ApiResponse servicesApiDeliveriesGetDeliveryByIdWithHttpInfo(Integer id) throws ApiException { + okhttp3.Call localVarCall = servicesApiDeliveriesGetDeliveryByIdValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Retrieve a Translation. (asynchronously) + * + * @param id The ID. (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 + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The translation response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiDeliveriesGetDeliveryByIdAsync(Integer id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = servicesApiDeliveriesGetDeliveryByIdValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for servicesApiDeliveriesPreviewDelivery + * @param id The ID. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The translation response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiDeliveriesPreviewDeliveryCall(Integer id, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/translations/{id}/preview" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call servicesApiDeliveriesPreviewDeliveryValidateBeforeCall(Integer id, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling servicesApiDeliveriesPreviewDelivery(Async)"); + } + + return servicesApiDeliveriesPreviewDeliveryCall(id, _callback); + + } + + /** + * Get a Translation's source to target mapping. + * + * @param id The ID. (required) + * @return List<PreviewTranslationResponseInner> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The translation response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public List servicesApiDeliveriesPreviewDelivery(Integer id) throws ApiException { + ApiResponse> localVarResp = servicesApiDeliveriesPreviewDeliveryWithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Get a Translation's source to target mapping. + * + * @param id The ID. (required) + * @return ApiResponse<List<PreviewTranslationResponseInner>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The translation response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public ApiResponse> servicesApiDeliveriesPreviewDeliveryWithHttpInfo(Integer id) throws ApiException { + okhttp3.Call localVarCall = servicesApiDeliveriesPreviewDeliveryValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get a Translation's source to target mapping. (asynchronously) + * + * @param id The ID. (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 + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The translation response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiDeliveriesPreviewDeliveryAsync(Integer id, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = servicesApiDeliveriesPreviewDeliveryValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for servicesApiDeliveriesUpdateDelivery + * @param id The ID. (required) + * @param updateDeliveryOptions (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The translation response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiDeliveriesUpdateDeliveryCall(Integer id, UpdateDeliveryOptions updateDeliveryOptions, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = updateDeliveryOptions; + + // create path and map variables + String localVarPath = "/translations/{id}" + .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "BearerAuth" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call servicesApiDeliveriesUpdateDeliveryValidateBeforeCall(Integer id, UpdateDeliveryOptions updateDeliveryOptions, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling servicesApiDeliveriesUpdateDelivery(Async)"); + } + + return servicesApiDeliveriesUpdateDeliveryCall(id, updateDeliveryOptions, _callback); + + } + + /** + * Update a Translation. + * + * @param id The ID. (required) + * @param updateDeliveryOptions (optional) + * @return TranslationResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The translation response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public TranslationResponse servicesApiDeliveriesUpdateDelivery(Integer id, UpdateDeliveryOptions updateDeliveryOptions) throws ApiException { + ApiResponse localVarResp = servicesApiDeliveriesUpdateDeliveryWithHttpInfo(id, updateDeliveryOptions); + return localVarResp.getData(); + } + + /** + * Update a Translation. + * + * @param id The ID. (required) + * @param updateDeliveryOptions (optional) + * @return ApiResponse<TranslationResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The translation response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public ApiResponse servicesApiDeliveriesUpdateDeliveryWithHttpInfo(Integer id, UpdateDeliveryOptions updateDeliveryOptions) throws ApiException { + okhttp3.Call localVarCall = servicesApiDeliveriesUpdateDeliveryValidateBeforeCall(id, updateDeliveryOptions, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update a Translation. (asynchronously) + * + * @param id The ID. (required) + * @param updateDeliveryOptions (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 + * @http.response.details + + + + + + + + +
Status Code Description Response Headers
200 The translation response. -
400 The Bad Request response. -
401 The Unauthorized response. -
403 The Forbidden response. -
404 The Not Found response. -
500 The Server Error response. -
+ */ + public okhttp3.Call servicesApiDeliveriesUpdateDeliveryAsync(Integer id, UpdateDeliveryOptions updateDeliveryOptions, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = servicesApiDeliveriesUpdateDeliveryValidateBeforeCall(id, updateDeliveryOptions, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java b/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java new file mode 100644 index 0000000..b62c578 --- /dev/null +++ b/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java @@ -0,0 +1,146 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import LiltConnectorSDK.ApiException; +import java.util.Objects; +import java.lang.reflect.Type; +import java.util.Map; + +/** + * Abstract class for oneOf,anyOf schemas defined in OpenAPI spec + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public abstract class AbstractOpenApiSchema { + + // store the actual instance of the schema/object + private Object instance; + + // is nullable + private Boolean isNullable; + + // schema type (e.g. oneOf, anyOf) + private final String schemaType; + + public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { + this.schemaType = schemaType; + this.isNullable = isNullable; + } + + /** + * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object + * + * @return an instance of the actual schema/object + */ + public abstract Map> getSchemas(); + + /** + * Get the actual instance + * + * @return an instance of the actual schema/object + */ + //@JsonValue + public Object getActualInstance() {return instance;} + + /** + * Set the actual instance + * + * @param instance the actual instance of the schema/object + */ + public void setActualInstance(Object instance) {this.instance = instance;} + + /** + * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well + * + * @return an instance of the actual schema/object + */ + public Object getActualInstanceRecursively() { + return getActualInstanceRecursively(this); + } + + private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { + if (object.getActualInstance() == null) { + return null; + } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { + return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); + } else { + return object.getActualInstance(); + } + } + + /** + * Get the schema type (e.g. anyOf, oneOf) + * + * @return the schema type + */ + public String getSchemaType() { + return schemaType; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ").append(getClass()).append(" {\n"); + sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); + sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); + sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; + return Objects.equals(this.instance, a.instance) && + Objects.equals(this.isNullable, a.isNullable) && + Objects.equals(this.schemaType, a.schemaType); + } + + @Override + public int hashCode() { + return Objects.hash(instance, isNullable, schemaType); + } + + /** + * Is nullable + * + * @return true if it's nullable + */ + public Boolean isNullable() { + if (Boolean.TRUE.equals(isNullable)) { + return Boolean.TRUE; + } else { + return Boolean.FALSE; + } + } + + + +} diff --git a/src/main/java/org/openapitools/client/model/ErrorResponse.java b/src/main/java/org/openapitools/client/model/ErrorResponse.java new file mode 100644 index 0000000..64832b2 --- /dev/null +++ b/src/main/java/org/openapitools/client/model/ErrorResponse.java @@ -0,0 +1,261 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import LiltConnectorSDK.JSON; + +/** + * ErrorResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class ErrorResponse { + public static final String SERIALIZED_NAME_ERROR = "error"; + @SerializedName(SERIALIZED_NAME_ERROR) + private String error; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + private String message; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private Integer status; + + public ErrorResponse() { + } + + public ErrorResponse error(String error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + **/ + @javax.annotation.Nullable + public String getError() { + return error; + } + + public void setError(String error) { + this.error = error; + } + + + public ErrorResponse message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + **/ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + + public ErrorResponse status(Integer status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @javax.annotation.Nullable + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ErrorResponse errorResponse = (ErrorResponse) o; + return Objects.equals(this.error, errorResponse.error) && + Objects.equals(this.message, errorResponse.message) && + Objects.equals(this.status, errorResponse.status); + } + + @Override + public int hashCode() { + return Objects.hash(error, message, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ErrorResponse {\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).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(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("error"); + openapiFields.add("message"); + openapiFields.add("status"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ErrorResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ErrorResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ErrorResponse is not found in the empty JSON string", ErrorResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ErrorResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ErrorResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("error") != null && !jsonObj.get("error").isJsonNull()) && !jsonObj.get("error").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString())); + } + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ErrorResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ErrorResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ErrorResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ErrorResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ErrorResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ErrorResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of ErrorResponse + * @throws IOException if the JSON string is invalid with respect to ErrorResponse + */ + public static ErrorResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ErrorResponse.class); + } + + /** + * Convert an instance of ErrorResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/JobResponse.java b/src/main/java/org/openapitools/client/model/JobResponse.java new file mode 100644 index 0000000..ab3464c --- /dev/null +++ b/src/main/java/org/openapitools/client/model/JobResponse.java @@ -0,0 +1,653 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import LiltConnectorSDK.JSON; + +/** + * JobResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class JobResponse { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private Integer id; + + public static final String SERIALIZED_NAME_PROJECT_PREFIX = "project_prefix"; + @SerializedName(SERIALIZED_NAME_PROJECT_PREFIX) + private String projectPrefix; + + /** + * This value tracks the async processing status of the job. + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + DRAFT("draft"), + + QUEUED("queued"), + + PROCESSING("processing"), + + COMPLETE("complete"), + + CANCELED("canceled"), + + FAILED("failed"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + 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(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private StatusEnum status; + + /** + * This value tracks the completion status of the translation order. + */ + @JsonAdapter(OrderStatusEnum.Adapter.class) + public enum OrderStatusEnum { + DRAFT("Draft"), + + STARTED("Started"), + + IN_PROGRESS("In Progress"), + + DELIVERED("Delivered"), + + COMPLETE("Complete"), + + NEEDS_ATTENTION("Needs Attention"); + + private String value; + + OrderStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OrderStatusEnum fromValue(String value) { + for (OrderStatusEnum b : OrderStatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OrderStatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OrderStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OrderStatusEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + OrderStatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_ORDER_STATUS = "orderStatus"; + @SerializedName(SERIALIZED_NAME_ORDER_STATUS) + private OrderStatusEnum orderStatus; + + public static final String SERIALIZED_NAME_TARGET_LANGUAGES = "targetLanguages"; + @SerializedName(SERIALIZED_NAME_TARGET_LANGUAGES) + private List targetLanguages = new ArrayList<>(); + + /** + * This indicates the translation workflow being used. UNKNOWN will only be displayed in exceptional cases. + */ + @JsonAdapter(TranslationWorkflowEnum.Adapter.class) + public enum TranslationWorkflowEnum { + INSTANT("INSTANT"), + + VERIFIED("VERIFIED"), + + UNKNOWN("UNKNOWN"); + + private String value; + + TranslationWorkflowEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TranslationWorkflowEnum fromValue(String value) { + for (TranslationWorkflowEnum b : TranslationWorkflowEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TranslationWorkflowEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TranslationWorkflowEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TranslationWorkflowEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TranslationWorkflowEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TRANSLATION_WORKFLOW = "translationWorkflow"; + @SerializedName(SERIALIZED_NAME_TRANSLATION_WORKFLOW) + private TranslationWorkflowEnum translationWorkflow; + + public static final String SERIALIZED_NAME_DUE_DATE = "dueDate"; + @SerializedName(SERIALIZED_NAME_DUE_DATE) + private OffsetDateTime dueDate; + + public static final String SERIALIZED_NAME_ERROR_MSG = "errorMsg"; + @SerializedName(SERIALIZED_NAME_ERROR_MSG) + private String errorMsg; + + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + private OffsetDateTime createdAt; + + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + private OffsetDateTime updatedAt; + + public JobResponse() { + } + + public JobResponse id(Integer id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + + public JobResponse projectPrefix(String projectPrefix) { + this.projectPrefix = projectPrefix; + return this; + } + + /** + * Get projectPrefix + * @return projectPrefix + **/ + @javax.annotation.Nullable + public String getProjectPrefix() { + return projectPrefix; + } + + public void setProjectPrefix(String projectPrefix) { + this.projectPrefix = projectPrefix; + } + + + public JobResponse status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * This value tracks the async processing status of the job. + * @return status + **/ + @javax.annotation.Nullable + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public JobResponse orderStatus(OrderStatusEnum orderStatus) { + this.orderStatus = orderStatus; + return this; + } + + /** + * This value tracks the completion status of the translation order. + * @return orderStatus + **/ + @javax.annotation.Nullable + public OrderStatusEnum getOrderStatus() { + return orderStatus; + } + + public void setOrderStatus(OrderStatusEnum orderStatus) { + this.orderStatus = orderStatus; + } + + + public JobResponse targetLanguages(List targetLanguages) { + this.targetLanguages = targetLanguages; + return this; + } + + public JobResponse addTargetLanguagesItem(String targetLanguagesItem) { + if (this.targetLanguages == null) { + this.targetLanguages = new ArrayList<>(); + } + this.targetLanguages.add(targetLanguagesItem); + return this; + } + + /** + * Get targetLanguages + * @return targetLanguages + **/ + @javax.annotation.Nullable + public List getTargetLanguages() { + return targetLanguages; + } + + public void setTargetLanguages(List targetLanguages) { + this.targetLanguages = targetLanguages; + } + + + public JobResponse translationWorkflow(TranslationWorkflowEnum translationWorkflow) { + this.translationWorkflow = translationWorkflow; + return this; + } + + /** + * This indicates the translation workflow being used. UNKNOWN will only be displayed in exceptional cases. + * @return translationWorkflow + **/ + @javax.annotation.Nullable + public TranslationWorkflowEnum getTranslationWorkflow() { + return translationWorkflow; + } + + public void setTranslationWorkflow(TranslationWorkflowEnum translationWorkflow) { + this.translationWorkflow = translationWorkflow; + } + + + public JobResponse dueDate(OffsetDateTime dueDate) { + this.dueDate = dueDate; + return this; + } + + /** + * Get dueDate + * @return dueDate + **/ + @javax.annotation.Nullable + public OffsetDateTime getDueDate() { + return dueDate; + } + + public void setDueDate(OffsetDateTime dueDate) { + this.dueDate = dueDate; + } + + + public JobResponse errorMsg(String errorMsg) { + this.errorMsg = errorMsg; + return this; + } + + /** + * Get errorMsg + * @return errorMsg + **/ + @javax.annotation.Nullable + public String getErrorMsg() { + return errorMsg; + } + + public void setErrorMsg(String errorMsg) { + this.errorMsg = errorMsg; + } + + + public JobResponse createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @javax.annotation.Nullable + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public JobResponse updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + **/ + @javax.annotation.Nullable + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JobResponse jobResponse = (JobResponse) o; + return Objects.equals(this.id, jobResponse.id) && + Objects.equals(this.projectPrefix, jobResponse.projectPrefix) && + Objects.equals(this.status, jobResponse.status) && + Objects.equals(this.orderStatus, jobResponse.orderStatus) && + Objects.equals(this.targetLanguages, jobResponse.targetLanguages) && + Objects.equals(this.translationWorkflow, jobResponse.translationWorkflow) && + Objects.equals(this.dueDate, jobResponse.dueDate) && + Objects.equals(this.errorMsg, jobResponse.errorMsg) && + Objects.equals(this.createdAt, jobResponse.createdAt) && + Objects.equals(this.updatedAt, jobResponse.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(id, projectPrefix, status, orderStatus, targetLanguages, translationWorkflow, dueDate, errorMsg, createdAt, updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JobResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" projectPrefix: ").append(toIndentedString(projectPrefix)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" orderStatus: ").append(toIndentedString(orderStatus)).append("\n"); + sb.append(" targetLanguages: ").append(toIndentedString(targetLanguages)).append("\n"); + sb.append(" translationWorkflow: ").append(toIndentedString(translationWorkflow)).append("\n"); + sb.append(" dueDate: ").append(toIndentedString(dueDate)).append("\n"); + sb.append(" errorMsg: ").append(toIndentedString(errorMsg)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("project_prefix"); + openapiFields.add("status"); + openapiFields.add("orderStatus"); + openapiFields.add("targetLanguages"); + openapiFields.add("translationWorkflow"); + openapiFields.add("dueDate"); + openapiFields.add("errorMsg"); + openapiFields.add("createdAt"); + openapiFields.add("updatedAt"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to JobResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!JobResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in JobResponse is not found in the empty JSON string", JobResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!JobResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `JobResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("project_prefix") != null && !jsonObj.get("project_prefix").isJsonNull()) && !jsonObj.get("project_prefix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `project_prefix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("project_prefix").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + StatusEnum.validateJsonElement(jsonObj.get("status")); + } + if ((jsonObj.get("orderStatus") != null && !jsonObj.get("orderStatus").isJsonNull()) && !jsonObj.get("orderStatus").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `orderStatus` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orderStatus").toString())); + } + // validate the optional field `orderStatus` + if (jsonObj.get("orderStatus") != null && !jsonObj.get("orderStatus").isJsonNull()) { + OrderStatusEnum.validateJsonElement(jsonObj.get("orderStatus")); + } + // ensure the optional json data is an array if present + if (jsonObj.get("targetLanguages") != null && !jsonObj.get("targetLanguages").isJsonNull() && !jsonObj.get("targetLanguages").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `targetLanguages` to be an array in the JSON string but got `%s`", jsonObj.get("targetLanguages").toString())); + } + if ((jsonObj.get("translationWorkflow") != null && !jsonObj.get("translationWorkflow").isJsonNull()) && !jsonObj.get("translationWorkflow").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `translationWorkflow` to be a primitive type in the JSON string but got `%s`", jsonObj.get("translationWorkflow").toString())); + } + // validate the optional field `translationWorkflow` + if (jsonObj.get("translationWorkflow") != null && !jsonObj.get("translationWorkflow").isJsonNull()) { + TranslationWorkflowEnum.validateJsonElement(jsonObj.get("translationWorkflow")); + } + if ((jsonObj.get("errorMsg") != null && !jsonObj.get("errorMsg").isJsonNull()) && !jsonObj.get("errorMsg").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `errorMsg` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMsg").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!JobResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'JobResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(JobResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, JobResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public JobResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of JobResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of JobResponse + * @throws IOException if the JSON string is invalid with respect to JobResponse + */ + public static JobResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, JobResponse.class); + } + + /** + * Convert an instance of JobResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/JobsResponse.java b/src/main/java/org/openapitools/client/model/JobsResponse.java new file mode 100644 index 0000000..9f09c57 --- /dev/null +++ b/src/main/java/org/openapitools/client/model/JobsResponse.java @@ -0,0 +1,280 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.JobResponse; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import LiltConnectorSDK.JSON; + +/** + * JobsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class JobsResponse { + public static final String SERIALIZED_NAME_LIMIT = "limit"; + @SerializedName(SERIALIZED_NAME_LIMIT) + private Integer limit; + + public static final String SERIALIZED_NAME_START = "start"; + @SerializedName(SERIALIZED_NAME_START) + private Integer start; + + public static final String SERIALIZED_NAME_RESULTS = "results"; + @SerializedName(SERIALIZED_NAME_RESULTS) + private List results = new ArrayList<>(); + + public JobsResponse() { + } + + public JobsResponse limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Get limit + * @return limit + **/ + @javax.annotation.Nullable + public Integer getLimit() { + return limit; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + + public JobsResponse start(Integer start) { + this.start = start; + return this; + } + + /** + * Get start + * @return start + **/ + @javax.annotation.Nullable + public Integer getStart() { + return start; + } + + public void setStart(Integer start) { + this.start = start; + } + + + public JobsResponse results(List results) { + this.results = results; + return this; + } + + public JobsResponse addResultsItem(JobResponse resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + **/ + @javax.annotation.Nullable + public List getResults() { + return results; + } + + public void setResults(List results) { + this.results = results; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JobsResponse jobsResponse = (JobsResponse) o; + return Objects.equals(this.limit, jobsResponse.limit) && + Objects.equals(this.start, jobsResponse.start) && + Objects.equals(this.results, jobsResponse.results); + } + + @Override + public int hashCode() { + return Objects.hash(limit, start, results); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JobsResponse {\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" start: ").append(toIndentedString(start)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("limit"); + openapiFields.add("start"); + openapiFields.add("results"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to JobsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!JobsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in JobsResponse is not found in the empty JSON string", JobsResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!JobsResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `JobsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("results") != null && !jsonObj.get("results").isJsonNull()) { + JsonArray jsonArrayresults = jsonObj.getAsJsonArray("results"); + if (jsonArrayresults != null) { + // ensure the json data is an array + if (!jsonObj.get("results").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); + } + + // validate the optional field `results` (array) + for (int i = 0; i < jsonArrayresults.size(); i++) { + JobResponse.validateJsonElement(jsonArrayresults.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!JobsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'JobsResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(JobsResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, JobsResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public JobsResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of JobsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of JobsResponse + * @throws IOException if the JSON string is invalid with respect to JobsResponse + */ + public static JobsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, JobsResponse.class); + } + + /** + * Convert an instance of JobsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/NewJobOptions.java b/src/main/java/org/openapitools/client/model/NewJobOptions.java new file mode 100644 index 0000000..3dc61d3 --- /dev/null +++ b/src/main/java/org/openapitools/client/model/NewJobOptions.java @@ -0,0 +1,442 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import LiltConnectorSDK.JSON; + +/** + * NewJobOptions + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class NewJobOptions { + public static final String SERIALIZED_NAME_PROJECT_PREFIX = "project_prefix"; + @SerializedName(SERIALIZED_NAME_PROJECT_PREFIX) + private String projectPrefix; + + public static final String SERIALIZED_NAME_PROJECT_NAME_TEMPLATE = "project_name_template"; + @SerializedName(SERIALIZED_NAME_PROJECT_NAME_TEMPLATE) + private String projectNameTemplate; + + /** + * Gets or Sets liltTranslationWorkflow + */ + @JsonAdapter(LiltTranslationWorkflowEnum.Adapter.class) + public enum LiltTranslationWorkflowEnum { + INSTANT("INSTANT"), + + VERIFIED("VERIFIED"); + + private String value; + + LiltTranslationWorkflowEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static LiltTranslationWorkflowEnum fromValue(String value) { + for (LiltTranslationWorkflowEnum b : LiltTranslationWorkflowEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final LiltTranslationWorkflowEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public LiltTranslationWorkflowEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return LiltTranslationWorkflowEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + LiltTranslationWorkflowEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_LILT_TRANSLATION_WORKFLOW = "lilt_translation_workflow"; + @SerializedName(SERIALIZED_NAME_LILT_TRANSLATION_WORKFLOW) + private LiltTranslationWorkflowEnum liltTranslationWorkflow; + + public static final String SERIALIZED_NAME_LILT_DEFAULT_DUE_DATE = "lilt_default_due_date"; + @SerializedName(SERIALIZED_NAME_LILT_DEFAULT_DUE_DATE) + private String liltDefaultDueDate; + + public static final String SERIALIZED_NAME_LILT_TARGET_LANGUAGES = "lilt_target_languages"; + @SerializedName(SERIALIZED_NAME_LILT_TARGET_LANGUAGES) + private List liltTargetLanguages = new ArrayList<>(); + + public static final String SERIALIZED_NAME_HANDLE_CREDIT_TRANSACTIONS = "handle_credit_transactions"; + @SerializedName(SERIALIZED_NAME_HANDLE_CREDIT_TRANSACTIONS) + private Boolean handleCreditTransactions = false; + + public static final String SERIALIZED_NAME_SOURCE_WORD_COUNT = "source_word_count"; + @SerializedName(SERIALIZED_NAME_SOURCE_WORD_COUNT) + private BigDecimal sourceWordCount; + + public NewJobOptions() { + } + + public NewJobOptions projectPrefix(String projectPrefix) { + this.projectPrefix = projectPrefix; + return this; + } + + /** + * A string value to include in the Project name. + * @return projectPrefix + **/ + @javax.annotation.Nullable + public String getProjectPrefix() { + return projectPrefix; + } + + public void setProjectPrefix(String projectPrefix) { + this.projectPrefix = projectPrefix; + } + + + public NewJobOptions projectNameTemplate(String projectNameTemplate) { + this.projectNameTemplate = projectNameTemplate; + return this; + } + + /** + * The template string to use when generating Project names. The available template options are: - **today** - Today's date. Formatted as YYYY-MM-DD. - **trglocale** - The target locale for the given project. - **filename** - The name of the current file being uploaded. - **project_prefix** - The project_prefix value provided in the configuration. - **project_name** - The project_name value assigned to the file in the code. - **connector_id** - The Connector ID. - **connector_type** - The Connector Type (e.g. \"xtm\", \"salesforce\"). + * @return projectNameTemplate + **/ + @javax.annotation.Nullable + public String getProjectNameTemplate() { + return projectNameTemplate; + } + + public void setProjectNameTemplate(String projectNameTemplate) { + this.projectNameTemplate = projectNameTemplate; + } + + + public NewJobOptions liltTranslationWorkflow(LiltTranslationWorkflowEnum liltTranslationWorkflow) { + this.liltTranslationWorkflow = liltTranslationWorkflow; + return this; + } + + /** + * Get liltTranslationWorkflow + * @return liltTranslationWorkflow + **/ + @javax.annotation.Nullable + public LiltTranslationWorkflowEnum getLiltTranslationWorkflow() { + return liltTranslationWorkflow; + } + + public void setLiltTranslationWorkflow(LiltTranslationWorkflowEnum liltTranslationWorkflow) { + this.liltTranslationWorkflow = liltTranslationWorkflow; + } + + + public NewJobOptions liltDefaultDueDate(String liltDefaultDueDate) { + this.liltDefaultDueDate = liltDefaultDueDate; + return this; + } + + /** + * The due date to use when creating Lilt Jobs/Projects if no specific due date is specified on the file level. + * @return liltDefaultDueDate + **/ + @javax.annotation.Nullable + public String getLiltDefaultDueDate() { + return liltDefaultDueDate; + } + + public void setLiltDefaultDueDate(String liltDefaultDueDate) { + this.liltDefaultDueDate = liltDefaultDueDate; + } + + + public NewJobOptions liltTargetLanguages(List liltTargetLanguages) { + this.liltTargetLanguages = liltTargetLanguages; + return this; + } + + public NewJobOptions addLiltTargetLanguagesItem(String liltTargetLanguagesItem) { + if (this.liltTargetLanguages == null) { + this.liltTargetLanguages = new ArrayList<>(); + } + this.liltTargetLanguages.add(liltTargetLanguagesItem); + return this; + } + + /** + * The list of target languages to use for the new job. The values provided should be present in the target_memories section of the configuration. + * @return liltTargetLanguages + **/ + @javax.annotation.Nullable + public List getLiltTargetLanguages() { + return liltTargetLanguages; + } + + public void setLiltTargetLanguages(List liltTargetLanguages) { + this.liltTargetLanguages = liltTargetLanguages; + } + + + public NewJobOptions handleCreditTransactions(Boolean handleCreditTransactions) { + this.handleCreditTransactions = handleCreditTransactions; + return this; + } + + /** + * If true, credit transactions will be handled by the connector. If false, no credit transactions will be created for the job. + * @return handleCreditTransactions + **/ + @javax.annotation.Nullable + public Boolean getHandleCreditTransactions() { + return handleCreditTransactions; + } + + public void setHandleCreditTransactions(Boolean handleCreditTransactions) { + this.handleCreditTransactions = handleCreditTransactions; + } + + + public NewJobOptions sourceWordCount(BigDecimal sourceWordCount) { + this.sourceWordCount = sourceWordCount; + return this; + } + + /** + * The source word count to use when creating credits transaction for instant transaltion jobs. + * @return sourceWordCount + **/ + @javax.annotation.Nullable + public BigDecimal getSourceWordCount() { + return sourceWordCount; + } + + public void setSourceWordCount(BigDecimal sourceWordCount) { + this.sourceWordCount = sourceWordCount; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NewJobOptions newJobOptions = (NewJobOptions) o; + return Objects.equals(this.projectPrefix, newJobOptions.projectPrefix) && + Objects.equals(this.projectNameTemplate, newJobOptions.projectNameTemplate) && + Objects.equals(this.liltTranslationWorkflow, newJobOptions.liltTranslationWorkflow) && + Objects.equals(this.liltDefaultDueDate, newJobOptions.liltDefaultDueDate) && + Objects.equals(this.liltTargetLanguages, newJobOptions.liltTargetLanguages) && + Objects.equals(this.handleCreditTransactions, newJobOptions.handleCreditTransactions) && + Objects.equals(this.sourceWordCount, newJobOptions.sourceWordCount); + } + + @Override + public int hashCode() { + return Objects.hash(projectPrefix, projectNameTemplate, liltTranslationWorkflow, liltDefaultDueDate, liltTargetLanguages, handleCreditTransactions, sourceWordCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NewJobOptions {\n"); + sb.append(" projectPrefix: ").append(toIndentedString(projectPrefix)).append("\n"); + sb.append(" projectNameTemplate: ").append(toIndentedString(projectNameTemplate)).append("\n"); + sb.append(" liltTranslationWorkflow: ").append(toIndentedString(liltTranslationWorkflow)).append("\n"); + sb.append(" liltDefaultDueDate: ").append(toIndentedString(liltDefaultDueDate)).append("\n"); + sb.append(" liltTargetLanguages: ").append(toIndentedString(liltTargetLanguages)).append("\n"); + sb.append(" handleCreditTransactions: ").append(toIndentedString(handleCreditTransactions)).append("\n"); + sb.append(" sourceWordCount: ").append(toIndentedString(sourceWordCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("project_prefix"); + openapiFields.add("project_name_template"); + openapiFields.add("lilt_translation_workflow"); + openapiFields.add("lilt_default_due_date"); + openapiFields.add("lilt_target_languages"); + openapiFields.add("handle_credit_transactions"); + openapiFields.add("source_word_count"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to NewJobOptions + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NewJobOptions.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in NewJobOptions is not found in the empty JSON string", NewJobOptions.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NewJobOptions.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NewJobOptions` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("project_prefix") != null && !jsonObj.get("project_prefix").isJsonNull()) && !jsonObj.get("project_prefix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `project_prefix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("project_prefix").toString())); + } + if ((jsonObj.get("project_name_template") != null && !jsonObj.get("project_name_template").isJsonNull()) && !jsonObj.get("project_name_template").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `project_name_template` to be a primitive type in the JSON string but got `%s`", jsonObj.get("project_name_template").toString())); + } + if ((jsonObj.get("lilt_translation_workflow") != null && !jsonObj.get("lilt_translation_workflow").isJsonNull()) && !jsonObj.get("lilt_translation_workflow").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lilt_translation_workflow` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lilt_translation_workflow").toString())); + } + // validate the optional field `lilt_translation_workflow` + if (jsonObj.get("lilt_translation_workflow") != null && !jsonObj.get("lilt_translation_workflow").isJsonNull()) { + LiltTranslationWorkflowEnum.validateJsonElement(jsonObj.get("lilt_translation_workflow")); + } + if ((jsonObj.get("lilt_default_due_date") != null && !jsonObj.get("lilt_default_due_date").isJsonNull()) && !jsonObj.get("lilt_default_due_date").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lilt_default_due_date` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lilt_default_due_date").toString())); + } + // ensure the optional json data is an array if present + if (jsonObj.get("lilt_target_languages") != null && !jsonObj.get("lilt_target_languages").isJsonNull() && !jsonObj.get("lilt_target_languages").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `lilt_target_languages` to be an array in the JSON string but got `%s`", jsonObj.get("lilt_target_languages").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NewJobOptions.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NewJobOptions' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NewJobOptions.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NewJobOptions value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public NewJobOptions read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of NewJobOptions given an JSON string + * + * @param jsonString JSON string + * @return An instance of NewJobOptions + * @throws IOException if the JSON string is invalid with respect to NewJobOptions + */ + public static NewJobOptions fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, NewJobOptions.class); + } + + /** + * Convert an instance of NewJobOptions to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/NewOrganizationOptions.java b/src/main/java/org/openapitools/client/model/NewOrganizationOptions.java new file mode 100644 index 0000000..c577fb2 --- /dev/null +++ b/src/main/java/org/openapitools/client/model/NewOrganizationOptions.java @@ -0,0 +1,313 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import LiltConnectorSDK.JSON; + +/** + * NewOrganizationOptions + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class NewOrganizationOptions { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_REGISTRATION_METADATA = "registrationMetadata"; + @SerializedName(SERIALIZED_NAME_REGISTRATION_METADATA) + private Object registrationMetadata; + + public static final String SERIALIZED_NAME_INSTANT_TRANSLATION_CREDITS = "instantTranslationCredits"; + @SerializedName(SERIALIZED_NAME_INSTANT_TRANSLATION_CREDITS) + private Integer instantTranslationCredits; + + public static final String SERIALIZED_NAME_VERIFIED_TRANSLATION_CREDITS = "verifiedTranslationCredits"; + @SerializedName(SERIALIZED_NAME_VERIFIED_TRANSLATION_CREDITS) + private Integer verifiedTranslationCredits; + + public NewOrganizationOptions() { + } + + public NewOrganizationOptions name(String name) { + this.name = name; + return this; + } + + /** + * Name to identify the organization by + * @return name + **/ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public NewOrganizationOptions email(String email) { + this.email = email; + return this; + } + + /** + * Contact email for the owner of the organization + * @return email + **/ + @javax.annotation.Nullable + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + public NewOrganizationOptions registrationMetadata(Object registrationMetadata) { + this.registrationMetadata = registrationMetadata; + return this; + } + + /** + * Relevant information for the organization being created + * @return registrationMetadata + **/ + @javax.annotation.Nullable + public Object getRegistrationMetadata() { + return registrationMetadata; + } + + public void setRegistrationMetadata(Object registrationMetadata) { + this.registrationMetadata = registrationMetadata; + } + + + public NewOrganizationOptions instantTranslationCredits(Integer instantTranslationCredits) { + this.instantTranslationCredits = instantTranslationCredits; + return this; + } + + /** + * Amount of credits the organization starts with, usable for instant translation jobs + * @return instantTranslationCredits + **/ + @javax.annotation.Nullable + public Integer getInstantTranslationCredits() { + return instantTranslationCredits; + } + + public void setInstantTranslationCredits(Integer instantTranslationCredits) { + this.instantTranslationCredits = instantTranslationCredits; + } + + + public NewOrganizationOptions verifiedTranslationCredits(Integer verifiedTranslationCredits) { + this.verifiedTranslationCredits = verifiedTranslationCredits; + return this; + } + + /** + * Amount of credits the organization starts with, usable for verified translation jobs + * @return verifiedTranslationCredits + **/ + @javax.annotation.Nullable + public Integer getVerifiedTranslationCredits() { + return verifiedTranslationCredits; + } + + public void setVerifiedTranslationCredits(Integer verifiedTranslationCredits) { + this.verifiedTranslationCredits = verifiedTranslationCredits; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NewOrganizationOptions newOrganizationOptions = (NewOrganizationOptions) o; + return Objects.equals(this.name, newOrganizationOptions.name) && + Objects.equals(this.email, newOrganizationOptions.email) && + Objects.equals(this.registrationMetadata, newOrganizationOptions.registrationMetadata) && + Objects.equals(this.instantTranslationCredits, newOrganizationOptions.instantTranslationCredits) && + Objects.equals(this.verifiedTranslationCredits, newOrganizationOptions.verifiedTranslationCredits); + } + + @Override + public int hashCode() { + return Objects.hash(name, email, registrationMetadata, instantTranslationCredits, verifiedTranslationCredits); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NewOrganizationOptions {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" registrationMetadata: ").append(toIndentedString(registrationMetadata)).append("\n"); + sb.append(" instantTranslationCredits: ").append(toIndentedString(instantTranslationCredits)).append("\n"); + sb.append(" verifiedTranslationCredits: ").append(toIndentedString(verifiedTranslationCredits)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("email"); + openapiFields.add("registrationMetadata"); + openapiFields.add("instantTranslationCredits"); + openapiFields.add("verifiedTranslationCredits"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to NewOrganizationOptions + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NewOrganizationOptions.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in NewOrganizationOptions is not found in the empty JSON string", NewOrganizationOptions.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!NewOrganizationOptions.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `NewOrganizationOptions` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NewOrganizationOptions.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NewOrganizationOptions' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(NewOrganizationOptions.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, NewOrganizationOptions value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public NewOrganizationOptions read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of NewOrganizationOptions given an JSON string + * + * @param jsonString JSON string + * @return An instance of NewOrganizationOptions + * @throws IOException if the JSON string is invalid with respect to NewOrganizationOptions + */ + public static NewOrganizationOptions fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, NewOrganizationOptions.class); + } + + /** + * Convert an instance of NewOrganizationOptions to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/OrganizationResponse.java b/src/main/java/org/openapitools/client/model/OrganizationResponse.java new file mode 100644 index 0000000..8ef980d --- /dev/null +++ b/src/main/java/org/openapitools/client/model/OrganizationResponse.java @@ -0,0 +1,259 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import LiltConnectorSDK.JSON; + +/** + * OrganizationResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class OrganizationResponse { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_INSTANT_TRANSLATION_CREDITS = "instantTranslationCredits"; + @SerializedName(SERIALIZED_NAME_INSTANT_TRANSLATION_CREDITS) + private BigDecimal instantTranslationCredits; + + public static final String SERIALIZED_NAME_VERIFIED_TRANSLATION_CREDITS = "verifiedTranslationCredits"; + @SerializedName(SERIALIZED_NAME_VERIFIED_TRANSLATION_CREDITS) + private BigDecimal verifiedTranslationCredits; + + public OrganizationResponse() { + } + + public OrganizationResponse name(String name) { + this.name = name; + return this; + } + + /** + * Name of the organization + * @return name + **/ + @javax.annotation.Nullable + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public OrganizationResponse instantTranslationCredits(BigDecimal instantTranslationCredits) { + this.instantTranslationCredits = instantTranslationCredits; + return this; + } + + /** + * The amount of credits the organization has remaining + * @return instantTranslationCredits + **/ + @javax.annotation.Nullable + public BigDecimal getInstantTranslationCredits() { + return instantTranslationCredits; + } + + public void setInstantTranslationCredits(BigDecimal instantTranslationCredits) { + this.instantTranslationCredits = instantTranslationCredits; + } + + + public OrganizationResponse verifiedTranslationCredits(BigDecimal verifiedTranslationCredits) { + this.verifiedTranslationCredits = verifiedTranslationCredits; + return this; + } + + /** + * The amount of credits the organization has remaining + * @return verifiedTranslationCredits + **/ + @javax.annotation.Nullable + public BigDecimal getVerifiedTranslationCredits() { + return verifiedTranslationCredits; + } + + public void setVerifiedTranslationCredits(BigDecimal verifiedTranslationCredits) { + this.verifiedTranslationCredits = verifiedTranslationCredits; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + OrganizationResponse organizationResponse = (OrganizationResponse) o; + return Objects.equals(this.name, organizationResponse.name) && + Objects.equals(this.instantTranslationCredits, organizationResponse.instantTranslationCredits) && + Objects.equals(this.verifiedTranslationCredits, organizationResponse.verifiedTranslationCredits); + } + + @Override + public int hashCode() { + return Objects.hash(name, instantTranslationCredits, verifiedTranslationCredits); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class OrganizationResponse {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" instantTranslationCredits: ").append(toIndentedString(instantTranslationCredits)).append("\n"); + sb.append(" verifiedTranslationCredits: ").append(toIndentedString(verifiedTranslationCredits)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("name"); + openapiFields.add("instantTranslationCredits"); + openapiFields.add("verifiedTranslationCredits"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to OrganizationResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!OrganizationResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in OrganizationResponse is not found in the empty JSON string", OrganizationResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!OrganizationResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OrganizationResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!OrganizationResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'OrganizationResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(OrganizationResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, OrganizationResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public OrganizationResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of OrganizationResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of OrganizationResponse + * @throws IOException if the JSON string is invalid with respect to OrganizationResponse + */ + public static OrganizationResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, OrganizationResponse.class); + } + + /** + * Convert an instance of OrganizationResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/PreviewTranslationResponseInner.java b/src/main/java/org/openapitools/client/model/PreviewTranslationResponseInner.java new file mode 100644 index 0000000..8131d6c --- /dev/null +++ b/src/main/java/org/openapitools/client/model/PreviewTranslationResponseInner.java @@ -0,0 +1,264 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import LiltConnectorSDK.JSON; + +/** + * PreviewTranslationResponseInner + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class PreviewTranslationResponseInner { + public static final String SERIALIZED_NAME_KEY = "key"; + @SerializedName(SERIALIZED_NAME_KEY) + private String key; + + public static final String SERIALIZED_NAME_SOURCE = "source"; + @SerializedName(SERIALIZED_NAME_SOURCE) + private String source; + + public static final String SERIALIZED_NAME_TARGET = "target"; + @SerializedName(SERIALIZED_NAME_TARGET) + private String target; + + public PreviewTranslationResponseInner() { + } + + public PreviewTranslationResponseInner key(String key) { + this.key = key; + return this; + } + + /** + * The key of the content field. + * @return key + **/ + @javax.annotation.Nullable + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + + public PreviewTranslationResponseInner source(String source) { + this.source = source; + return this; + } + + /** + * The source content of the field. + * @return source + **/ + @javax.annotation.Nullable + public String getSource() { + return source; + } + + public void setSource(String source) { + this.source = source; + } + + + public PreviewTranslationResponseInner target(String target) { + this.target = target; + return this; + } + + /** + * The target content of the field. + * @return target + **/ + @javax.annotation.Nullable + public String getTarget() { + return target; + } + + public void setTarget(String target) { + this.target = target; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PreviewTranslationResponseInner previewTranslationResponseInner = (PreviewTranslationResponseInner) o; + return Objects.equals(this.key, previewTranslationResponseInner.key) && + Objects.equals(this.source, previewTranslationResponseInner.source) && + Objects.equals(this.target, previewTranslationResponseInner.target); + } + + @Override + public int hashCode() { + return Objects.hash(key, source, target); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PreviewTranslationResponseInner {\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" target: ").append(toIndentedString(target)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("key"); + openapiFields.add("source"); + openapiFields.add("target"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PreviewTranslationResponseInner + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PreviewTranslationResponseInner.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in PreviewTranslationResponseInner is not found in the empty JSON string", PreviewTranslationResponseInner.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!PreviewTranslationResponseInner.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `PreviewTranslationResponseInner` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) && !jsonObj.get("key").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); + } + if ((jsonObj.get("source") != null && !jsonObj.get("source").isJsonNull()) && !jsonObj.get("source").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `source` to be a primitive type in the JSON string but got `%s`", jsonObj.get("source").toString())); + } + if ((jsonObj.get("target") != null && !jsonObj.get("target").isJsonNull()) && !jsonObj.get("target").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `target` to be a primitive type in the JSON string but got `%s`", jsonObj.get("target").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PreviewTranslationResponseInner.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PreviewTranslationResponseInner' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PreviewTranslationResponseInner.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PreviewTranslationResponseInner value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public PreviewTranslationResponseInner read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PreviewTranslationResponseInner given an JSON string + * + * @param jsonString JSON string + * @return An instance of PreviewTranslationResponseInner + * @throws IOException if the JSON string is invalid with respect to PreviewTranslationResponseInner + */ + public static PreviewTranslationResponseInner fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PreviewTranslationResponseInner.class); + } + + /** + * Convert an instance of PreviewTranslationResponseInner to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/ServicesApiCreditTransactionCreateCreditTransactionRequest.java b/src/main/java/org/openapitools/client/model/ServicesApiCreditTransactionCreateCreditTransactionRequest.java new file mode 100644 index 0000000..4de7fd5 --- /dev/null +++ b/src/main/java/org/openapitools/client/model/ServicesApiCreditTransactionCreateCreditTransactionRequest.java @@ -0,0 +1,206 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import LiltConnectorSDK.JSON; + +/** + * ServicesApiCreditTransactionCreateCreditTransactionRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class ServicesApiCreditTransactionCreateCreditTransactionRequest { + public static final String SERIALIZED_NAME_PAYLOAD = "payload"; + @SerializedName(SERIALIZED_NAME_PAYLOAD) + private String payload; + + public ServicesApiCreditTransactionCreateCreditTransactionRequest() { + } + + public ServicesApiCreditTransactionCreateCreditTransactionRequest payload(String payload) { + this.payload = payload; + return this; + } + + /** + * Get payload + * @return payload + **/ + @javax.annotation.Nullable + public String getPayload() { + return payload; + } + + public void setPayload(String payload) { + this.payload = payload; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ServicesApiCreditTransactionCreateCreditTransactionRequest servicesApiCreditTransactionCreateCreditTransactionRequest = (ServicesApiCreditTransactionCreateCreditTransactionRequest) o; + return Objects.equals(this.payload, servicesApiCreditTransactionCreateCreditTransactionRequest.payload); + } + + @Override + public int hashCode() { + return Objects.hash(payload); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ServicesApiCreditTransactionCreateCreditTransactionRequest {\n"); + sb.append(" payload: ").append(toIndentedString(payload)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("payload"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ServicesApiCreditTransactionCreateCreditTransactionRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ServicesApiCreditTransactionCreateCreditTransactionRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in ServicesApiCreditTransactionCreateCreditTransactionRequest is not found in the empty JSON string", ServicesApiCreditTransactionCreateCreditTransactionRequest.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!ServicesApiCreditTransactionCreateCreditTransactionRequest.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ServicesApiCreditTransactionCreateCreditTransactionRequest` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("payload") != null && !jsonObj.get("payload").isJsonNull()) && !jsonObj.get("payload").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `payload` to be a primitive type in the JSON string but got `%s`", jsonObj.get("payload").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ServicesApiCreditTransactionCreateCreditTransactionRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ServicesApiCreditTransactionCreateCreditTransactionRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(ServicesApiCreditTransactionCreateCreditTransactionRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ServicesApiCreditTransactionCreateCreditTransactionRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public ServicesApiCreditTransactionCreateCreditTransactionRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of ServicesApiCreditTransactionCreateCreditTransactionRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of ServicesApiCreditTransactionCreateCreditTransactionRequest + * @throws IOException if the JSON string is invalid with respect to ServicesApiCreditTransactionCreateCreditTransactionRequest + */ + public static ServicesApiCreditTransactionCreateCreditTransactionRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ServicesApiCreditTransactionCreateCreditTransactionRequest.class); + } + + /** + * Convert an instance of ServicesApiCreditTransactionCreateCreditTransactionRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/SettingsResponse.java b/src/main/java/org/openapitools/client/model/SettingsResponse.java new file mode 100644 index 0000000..7cd623b --- /dev/null +++ b/src/main/java/org/openapitools/client/model/SettingsResponse.java @@ -0,0 +1,322 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import LiltConnectorSDK.JSON; + +/** + * SettingsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class SettingsResponse { + public static final String SERIALIZED_NAME_PROJECT_PREFIX = "project_prefix"; + @SerializedName(SERIALIZED_NAME_PROJECT_PREFIX) + private String projectPrefix; + + public static final String SERIALIZED_NAME_PROJECT_NAME_TEMPLATE = "project_name_template"; + @SerializedName(SERIALIZED_NAME_PROJECT_NAME_TEMPLATE) + private String projectNameTemplate; + + /** + * This indicates the translation workflow being used. UNKNOWN will only be displayed in exceptional cases. + */ + @JsonAdapter(LiltTranslationWorkflowEnum.Adapter.class) + public enum LiltTranslationWorkflowEnum { + INSTANT("INSTANT"), + + VERIFIED("VERIFIED"), + + UNKNOWN("UNKNOWN"); + + private String value; + + LiltTranslationWorkflowEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static LiltTranslationWorkflowEnum fromValue(String value) { + for (LiltTranslationWorkflowEnum b : LiltTranslationWorkflowEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final LiltTranslationWorkflowEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public LiltTranslationWorkflowEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return LiltTranslationWorkflowEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + LiltTranslationWorkflowEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_LILT_TRANSLATION_WORKFLOW = "lilt_translation_workflow"; + @SerializedName(SERIALIZED_NAME_LILT_TRANSLATION_WORKFLOW) + private LiltTranslationWorkflowEnum liltTranslationWorkflow; + + public SettingsResponse() { + } + + public SettingsResponse projectPrefix(String projectPrefix) { + this.projectPrefix = projectPrefix; + return this; + } + + /** + * A string value to include in the Project name. + * @return projectPrefix + **/ + @javax.annotation.Nullable + public String getProjectPrefix() { + return projectPrefix; + } + + public void setProjectPrefix(String projectPrefix) { + this.projectPrefix = projectPrefix; + } + + + public SettingsResponse projectNameTemplate(String projectNameTemplate) { + this.projectNameTemplate = projectNameTemplate; + return this; + } + + /** + * The template string to use when generating Project names. The available template options are: - **today** - Today's date. Formatted as YYYY-MM-DD. - **trglocale** - The target locale for the given project. - **filename** - The name of the current file being uploaded. - **project_prefix** - The project_prefix value provided in the configuration. - **project_name** - The project_name value assigned to the file in the code. - **connector_id** - The Connector ID. - **connector_type** - The Connector Type (e.g. \"xtm\", \"salesforce\"). + * @return projectNameTemplate + **/ + @javax.annotation.Nullable + public String getProjectNameTemplate() { + return projectNameTemplate; + } + + public void setProjectNameTemplate(String projectNameTemplate) { + this.projectNameTemplate = projectNameTemplate; + } + + + public SettingsResponse liltTranslationWorkflow(LiltTranslationWorkflowEnum liltTranslationWorkflow) { + this.liltTranslationWorkflow = liltTranslationWorkflow; + return this; + } + + /** + * This indicates the translation workflow being used. UNKNOWN will only be displayed in exceptional cases. + * @return liltTranslationWorkflow + **/ + @javax.annotation.Nullable + public LiltTranslationWorkflowEnum getLiltTranslationWorkflow() { + return liltTranslationWorkflow; + } + + public void setLiltTranslationWorkflow(LiltTranslationWorkflowEnum liltTranslationWorkflow) { + this.liltTranslationWorkflow = liltTranslationWorkflow; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SettingsResponse settingsResponse = (SettingsResponse) o; + return Objects.equals(this.projectPrefix, settingsResponse.projectPrefix) && + Objects.equals(this.projectNameTemplate, settingsResponse.projectNameTemplate) && + Objects.equals(this.liltTranslationWorkflow, settingsResponse.liltTranslationWorkflow); + } + + @Override + public int hashCode() { + return Objects.hash(projectPrefix, projectNameTemplate, liltTranslationWorkflow); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SettingsResponse {\n"); + sb.append(" projectPrefix: ").append(toIndentedString(projectPrefix)).append("\n"); + sb.append(" projectNameTemplate: ").append(toIndentedString(projectNameTemplate)).append("\n"); + sb.append(" liltTranslationWorkflow: ").append(toIndentedString(liltTranslationWorkflow)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("project_prefix"); + openapiFields.add("project_name_template"); + openapiFields.add("lilt_translation_workflow"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to SettingsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!SettingsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in SettingsResponse is not found in the empty JSON string", SettingsResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!SettingsResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SettingsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("project_prefix") != null && !jsonObj.get("project_prefix").isJsonNull()) && !jsonObj.get("project_prefix").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `project_prefix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("project_prefix").toString())); + } + if ((jsonObj.get("project_name_template") != null && !jsonObj.get("project_name_template").isJsonNull()) && !jsonObj.get("project_name_template").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `project_name_template` to be a primitive type in the JSON string but got `%s`", jsonObj.get("project_name_template").toString())); + } + if ((jsonObj.get("lilt_translation_workflow") != null && !jsonObj.get("lilt_translation_workflow").isJsonNull()) && !jsonObj.get("lilt_translation_workflow").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `lilt_translation_workflow` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lilt_translation_workflow").toString())); + } + // validate the optional field `lilt_translation_workflow` + if (jsonObj.get("lilt_translation_workflow") != null && !jsonObj.get("lilt_translation_workflow").isJsonNull()) { + LiltTranslationWorkflowEnum.validateJsonElement(jsonObj.get("lilt_translation_workflow")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!SettingsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'SettingsResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(SettingsResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, SettingsResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public SettingsResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of SettingsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of SettingsResponse + * @throws IOException if the JSON string is invalid with respect to SettingsResponse + */ + public static SettingsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, SettingsResponse.class); + } + + /** + * Convert an instance of SettingsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/TranslationResponse.java b/src/main/java/org/openapitools/client/model/TranslationResponse.java new file mode 100644 index 0000000..3974ad4 --- /dev/null +++ b/src/main/java/org/openapitools/client/model/TranslationResponse.java @@ -0,0 +1,537 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import LiltConnectorSDK.JSON; + +/** + * TranslationResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class TranslationResponse { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private Integer id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + /** + * This value tracks the status of the delivery. + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + IMPORT_COMPLETE("import_complete"), + + IMPORT_FAILED("import_failed"), + + EXPORT_COMPLETE("export_complete"), + + EXPORT_FAILED("export_failed"), + + MT_COMPLETE("mt_complete"), + + MT_FAILED("mt_failed"), + + PLUGIN_COMPLETE("plugin_complete"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + 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(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private StatusEnum status; + + public static final String SERIALIZED_NAME_SRC_LANG = "srcLang"; + @SerializedName(SERIALIZED_NAME_SRC_LANG) + private String srcLang; + + public static final String SERIALIZED_NAME_SRC_LOCALE = "srcLocale"; + @SerializedName(SERIALIZED_NAME_SRC_LOCALE) + private String srcLocale; + + public static final String SERIALIZED_NAME_TRG_LANG = "trgLang"; + @SerializedName(SERIALIZED_NAME_TRG_LANG) + private String trgLang; + + public static final String SERIALIZED_NAME_TRG_LOCALE = "trgLocale"; + @SerializedName(SERIALIZED_NAME_TRG_LOCALE) + private String trgLocale; + + public static final String SERIALIZED_NAME_ERROR_MSG = "errorMsg"; + @SerializedName(SERIALIZED_NAME_ERROR_MSG) + private String errorMsg; + + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + private OffsetDateTime createdAt; + + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + private OffsetDateTime updatedAt; + + public TranslationResponse() { + } + + public TranslationResponse id(Integer id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nonnull + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + + public TranslationResponse name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + public TranslationResponse status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * This value tracks the status of the delivery. + * @return status + **/ + @javax.annotation.Nonnull + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public TranslationResponse srcLang(String srcLang) { + this.srcLang = srcLang; + return this; + } + + /** + * Get srcLang + * @return srcLang + **/ + @javax.annotation.Nonnull + public String getSrcLang() { + return srcLang; + } + + public void setSrcLang(String srcLang) { + this.srcLang = srcLang; + } + + + public TranslationResponse srcLocale(String srcLocale) { + this.srcLocale = srcLocale; + return this; + } + + /** + * Get srcLocale + * @return srcLocale + **/ + @javax.annotation.Nullable + public String getSrcLocale() { + return srcLocale; + } + + public void setSrcLocale(String srcLocale) { + this.srcLocale = srcLocale; + } + + + public TranslationResponse trgLang(String trgLang) { + this.trgLang = trgLang; + return this; + } + + /** + * Get trgLang + * @return trgLang + **/ + @javax.annotation.Nonnull + public String getTrgLang() { + return trgLang; + } + + public void setTrgLang(String trgLang) { + this.trgLang = trgLang; + } + + + public TranslationResponse trgLocale(String trgLocale) { + this.trgLocale = trgLocale; + return this; + } + + /** + * Get trgLocale + * @return trgLocale + **/ + @javax.annotation.Nullable + public String getTrgLocale() { + return trgLocale; + } + + public void setTrgLocale(String trgLocale) { + this.trgLocale = trgLocale; + } + + + public TranslationResponse errorMsg(String errorMsg) { + this.errorMsg = errorMsg; + return this; + } + + /** + * Get errorMsg + * @return errorMsg + **/ + @javax.annotation.Nullable + public String getErrorMsg() { + return errorMsg; + } + + public void setErrorMsg(String errorMsg) { + this.errorMsg = errorMsg; + } + + + public TranslationResponse createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @javax.annotation.Nonnull + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + + public TranslationResponse updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + **/ + @javax.annotation.Nonnull + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TranslationResponse translationResponse = (TranslationResponse) o; + return Objects.equals(this.id, translationResponse.id) && + Objects.equals(this.name, translationResponse.name) && + Objects.equals(this.status, translationResponse.status) && + Objects.equals(this.srcLang, translationResponse.srcLang) && + Objects.equals(this.srcLocale, translationResponse.srcLocale) && + Objects.equals(this.trgLang, translationResponse.trgLang) && + Objects.equals(this.trgLocale, translationResponse.trgLocale) && + Objects.equals(this.errorMsg, translationResponse.errorMsg) && + Objects.equals(this.createdAt, translationResponse.createdAt) && + Objects.equals(this.updatedAt, translationResponse.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, status, srcLang, srcLocale, trgLang, trgLocale, errorMsg, createdAt, updatedAt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TranslationResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" srcLang: ").append(toIndentedString(srcLang)).append("\n"); + sb.append(" srcLocale: ").append(toIndentedString(srcLocale)).append("\n"); + sb.append(" trgLang: ").append(toIndentedString(trgLang)).append("\n"); + sb.append(" trgLocale: ").append(toIndentedString(trgLocale)).append("\n"); + sb.append(" errorMsg: ").append(toIndentedString(errorMsg)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("id"); + openapiFields.add("name"); + openapiFields.add("status"); + openapiFields.add("srcLang"); + openapiFields.add("srcLocale"); + openapiFields.add("trgLang"); + openapiFields.add("trgLocale"); + openapiFields.add("errorMsg"); + openapiFields.add("createdAt"); + openapiFields.add("updatedAt"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("id"); + openapiRequiredFields.add("name"); + openapiRequiredFields.add("status"); + openapiRequiredFields.add("srcLang"); + openapiRequiredFields.add("trgLang"); + openapiRequiredFields.add("createdAt"); + openapiRequiredFields.add("updatedAt"); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TranslationResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TranslationResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in TranslationResponse is not found in the empty JSON string", TranslationResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TranslationResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TranslationResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : TranslationResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); + } + if (!jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + // validate the required field `status` + StatusEnum.validateJsonElement(jsonObj.get("status")); + if (!jsonObj.get("srcLang").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `srcLang` to be a primitive type in the JSON string but got `%s`", jsonObj.get("srcLang").toString())); + } + if ((jsonObj.get("srcLocale") != null && !jsonObj.get("srcLocale").isJsonNull()) && !jsonObj.get("srcLocale").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `srcLocale` to be a primitive type in the JSON string but got `%s`", jsonObj.get("srcLocale").toString())); + } + if (!jsonObj.get("trgLang").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `trgLang` to be a primitive type in the JSON string but got `%s`", jsonObj.get("trgLang").toString())); + } + if ((jsonObj.get("trgLocale") != null && !jsonObj.get("trgLocale").isJsonNull()) && !jsonObj.get("trgLocale").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `trgLocale` to be a primitive type in the JSON string but got `%s`", jsonObj.get("trgLocale").toString())); + } + if ((jsonObj.get("errorMsg") != null && !jsonObj.get("errorMsg").isJsonNull()) && !jsonObj.get("errorMsg").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `errorMsg` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMsg").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TranslationResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TranslationResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TranslationResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TranslationResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TranslationResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of TranslationResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of TranslationResponse + * @throws IOException if the JSON string is invalid with respect to TranslationResponse + */ + public static TranslationResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TranslationResponse.class); + } + + /** + * Convert an instance of TranslationResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/TranslationsResponse.java b/src/main/java/org/openapitools/client/model/TranslationsResponse.java new file mode 100644 index 0000000..86f9c9a --- /dev/null +++ b/src/main/java/org/openapitools/client/model/TranslationsResponse.java @@ -0,0 +1,280 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.TranslationResponse; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import LiltConnectorSDK.JSON; + +/** + * TranslationsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class TranslationsResponse { + public static final String SERIALIZED_NAME_LIMIT = "limit"; + @SerializedName(SERIALIZED_NAME_LIMIT) + private Integer limit; + + public static final String SERIALIZED_NAME_START = "start"; + @SerializedName(SERIALIZED_NAME_START) + private Integer start; + + public static final String SERIALIZED_NAME_RESULTS = "results"; + @SerializedName(SERIALIZED_NAME_RESULTS) + private List results = new ArrayList<>(); + + public TranslationsResponse() { + } + + public TranslationsResponse limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Get limit + * @return limit + **/ + @javax.annotation.Nullable + public Integer getLimit() { + return limit; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + + public TranslationsResponse start(Integer start) { + this.start = start; + return this; + } + + /** + * Get start + * @return start + **/ + @javax.annotation.Nullable + public Integer getStart() { + return start; + } + + public void setStart(Integer start) { + this.start = start; + } + + + public TranslationsResponse results(List results) { + this.results = results; + return this; + } + + public TranslationsResponse addResultsItem(TranslationResponse resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + **/ + @javax.annotation.Nullable + public List getResults() { + return results; + } + + public void setResults(List results) { + this.results = results; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TranslationsResponse translationsResponse = (TranslationsResponse) o; + return Objects.equals(this.limit, translationsResponse.limit) && + Objects.equals(this.start, translationsResponse.start) && + Objects.equals(this.results, translationsResponse.results); + } + + @Override + public int hashCode() { + return Objects.hash(limit, start, results); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TranslationsResponse {\n"); + sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); + sb.append(" start: ").append(toIndentedString(start)).append("\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("limit"); + openapiFields.add("start"); + openapiFields.add("results"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to TranslationsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!TranslationsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in TranslationsResponse is not found in the empty JSON string", TranslationsResponse.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!TranslationsResponse.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TranslationsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (jsonObj.get("results") != null && !jsonObj.get("results").isJsonNull()) { + JsonArray jsonArrayresults = jsonObj.getAsJsonArray("results"); + if (jsonArrayresults != null) { + // ensure the json data is an array + if (!jsonObj.get("results").isJsonArray()) { + throw new IllegalArgumentException(String.format("Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); + } + + // validate the optional field `results` (array) + for (int i = 0; i < jsonArrayresults.size(); i++) { + TranslationResponse.validateJsonElement(jsonArrayresults.get(i)); + }; + } + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!TranslationsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'TranslationsResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(TranslationsResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, TranslationsResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public TranslationsResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of TranslationsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of TranslationsResponse + * @throws IOException if the JSON string is invalid with respect to TranslationsResponse + */ + public static TranslationsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, TranslationsResponse.class); + } + + /** + * Convert an instance of TranslationsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/UpdateDeliveryOptions.java b/src/main/java/org/openapitools/client/model/UpdateDeliveryOptions.java new file mode 100644 index 0000000..f933a1e --- /dev/null +++ b/src/main/java/org/openapitools/client/model/UpdateDeliveryOptions.java @@ -0,0 +1,301 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import LiltConnectorSDK.JSON; + +/** + * UpdateDeliveryOptions + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class UpdateDeliveryOptions { + /** + * This value tracks the status of the delivery. + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + IMPORT_COMPLETE("import_complete"), + + IMPORT_FAILED("import_failed"), + + EXPORT_COMPLETE("export_complete"), + + EXPORT_FAILED("export_failed"), + + MT_COMPLETE("mt_complete"), + + MT_FAILED("mt_failed"), + + PLUGIN_COMPLETE("plugin_complete"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + 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(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private StatusEnum status; + + public static final String SERIALIZED_NAME_ERROR_MESSAGE = "error_message"; + @SerializedName(SERIALIZED_NAME_ERROR_MESSAGE) + private String errorMessage; + + public UpdateDeliveryOptions() { + } + + public UpdateDeliveryOptions status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * This value tracks the status of the delivery. + * @return status + **/ + @javax.annotation.Nullable + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public UpdateDeliveryOptions errorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + /** + * Get errorMessage + * @return errorMessage + **/ + @javax.annotation.Nullable + public String getErrorMessage() { + return errorMessage; + } + + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateDeliveryOptions updateDeliveryOptions = (UpdateDeliveryOptions) o; + return Objects.equals(this.status, updateDeliveryOptions.status) && + Objects.equals(this.errorMessage, updateDeliveryOptions.errorMessage); + } + + @Override + public int hashCode() { + return Objects.hash(status, errorMessage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateDeliveryOptions {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("status"); + openapiFields.add("error_message"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateDeliveryOptions + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateDeliveryOptions.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateDeliveryOptions is not found in the empty JSON string", UpdateDeliveryOptions.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateDeliveryOptions.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateDeliveryOptions` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + StatusEnum.validateJsonElement(jsonObj.get("status")); + } + if ((jsonObj.get("error_message") != null && !jsonObj.get("error_message").isJsonNull()) && !jsonObj.get("error_message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `error_message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error_message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateDeliveryOptions.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateDeliveryOptions' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateDeliveryOptions.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateDeliveryOptions value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateDeliveryOptions read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateDeliveryOptions given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateDeliveryOptions + * @throws IOException if the JSON string is invalid with respect to UpdateDeliveryOptions + */ + public static UpdateDeliveryOptions fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateDeliveryOptions.class); + } + + /** + * Convert an instance of UpdateDeliveryOptions to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/org/openapitools/client/model/UpdateJobOptions.java b/src/main/java/org/openapitools/client/model/UpdateJobOptions.java new file mode 100644 index 0000000..66890b0 --- /dev/null +++ b/src/main/java/org/openapitools/client/model/UpdateJobOptions.java @@ -0,0 +1,326 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.lang.reflect.Type; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import LiltConnectorSDK.JSON; + +/** + * UpdateJobOptions + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-01-05T09:10:14.232589379Z[Etc/UTC]", comments = "Generator version: 7.6.0-SNAPSHOT") +public class UpdateJobOptions { + /** + * This value tracks the async processing status of the job. + */ + @JsonAdapter(StatusEnum.Adapter.class) + public enum StatusEnum { + DRAFT("draft"), + + QUEUED("queued"), + + PROCESSING("processing"), + + COMPLETE("complete"), + + CANCELED("canceled"), + + FAILED("failed"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + 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(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + StatusEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private StatusEnum status; + + public static final String SERIALIZED_NAME_ERROR_MESSAGE = "error_message"; + @SerializedName(SERIALIZED_NAME_ERROR_MESSAGE) + private String errorMessage; + + public static final String SERIALIZED_NAME_SOURCE_WORD_COUNT = "source_word_count"; + @SerializedName(SERIALIZED_NAME_SOURCE_WORD_COUNT) + private BigDecimal sourceWordCount; + + public UpdateJobOptions() { + } + + public UpdateJobOptions status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * This value tracks the async processing status of the job. + * @return status + **/ + @javax.annotation.Nullable + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + + public UpdateJobOptions errorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + /** + * Get errorMessage + * @return errorMessage + **/ + @javax.annotation.Nullable + public String getErrorMessage() { + return errorMessage; + } + + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } + + + public UpdateJobOptions sourceWordCount(BigDecimal sourceWordCount) { + this.sourceWordCount = sourceWordCount; + return this; + } + + /** + * Get sourceWordCount + * @return sourceWordCount + **/ + @javax.annotation.Nullable + public BigDecimal getSourceWordCount() { + return sourceWordCount; + } + + public void setSourceWordCount(BigDecimal sourceWordCount) { + this.sourceWordCount = sourceWordCount; + } + + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateJobOptions updateJobOptions = (UpdateJobOptions) o; + return Objects.equals(this.status, updateJobOptions.status) && + Objects.equals(this.errorMessage, updateJobOptions.errorMessage) && + Objects.equals(this.sourceWordCount, updateJobOptions.sourceWordCount); + } + + @Override + public int hashCode() { + return Objects.hash(status, errorMessage, sourceWordCount); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateJobOptions {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n"); + sb.append(" sourceWordCount: ").append(toIndentedString(sourceWordCount)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(); + openapiFields.add("status"); + openapiFields.add("error_message"); + openapiFields.add("source_word_count"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to UpdateJobOptions + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateJobOptions.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in UpdateJobOptions is not found in the empty JSON string", UpdateJobOptions.openapiRequiredFields.toString())); + } + } + + Set> entries = jsonElement.getAsJsonObject().entrySet(); + // check to see if the JSON string contains additional fields + for (Map.Entry entry : entries) { + if (!UpdateJobOptions.openapiFields.contains(entry.getKey())) { + throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `UpdateJobOptions` properties. JSON: %s", entry.getKey(), jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); + } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + StatusEnum.validateJsonElement(jsonObj.get("status")); + } + if ((jsonObj.get("error_message") != null && !jsonObj.get("error_message").isJsonNull()) && !jsonObj.get("error_message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `error_message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error_message").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateJobOptions.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateJobOptions' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(UpdateJobOptions.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateJobOptions value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + elementAdapter.write(out, obj); + } + + @Override + public UpdateJobOptions read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + return thisAdapter.fromJsonTree(jsonElement); + } + + }.nullSafe(); + } + } + + /** + * Create an instance of UpdateJobOptions given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateJobOptions + * @throws IOException if the JSON string is invalid with respect to UpdateJobOptions + */ + public static UpdateJobOptions fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateJobOptions.class); + } + + /** + * Convert an instance of UpdateJobOptions to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/test/java/org/openapitools/client/api/CreditTransactionsApiTest.java b/src/test/java/org/openapitools/client/api/CreditTransactionsApiTest.java new file mode 100644 index 0000000..f683c83 --- /dev/null +++ b/src/test/java/org/openapitools/client/api/CreditTransactionsApiTest.java @@ -0,0 +1,47 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import LiltConnectorSDK.ApiException; +import org.openapitools.client.model.ErrorResponse; +import org.openapitools.client.model.ServicesApiCreditTransactionCreateCreditTransactionRequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for CreditTransactionsApi + */ +@Disabled +public class CreditTransactionsApiTest { + + private final CreditTransactionsApi api = new CreditTransactionsApi(); + + /** + * Create a credit transaction. Request is expected to contain credits information encoded in jwt_token payload. Request encoded should have info for instant_translation_credits_change value, verified_translation_credits_change value, source_metadata which contains any identifying information to attach to the transaction, email for the user starting the transaction, and optionally lilt_token for the connector configuration. + * + * @throws ApiException if the Api call fails + */ + @Test + public void servicesApiCreditTransactionCreateCreditTransactionTest() throws ApiException { + ServicesApiCreditTransactionCreateCreditTransactionRequest servicesApiCreditTransactionCreateCreditTransactionRequest = null; + api.servicesApiCreditTransactionCreateCreditTransaction(servicesApiCreditTransactionCreateCreditTransactionRequest); + // TODO: test validations + } + +} diff --git a/src/test/java/org/openapitools/client/api/JobsApiTest.java b/src/test/java/org/openapitools/client/api/JobsApiTest.java new file mode 100644 index 0000000..748e178 --- /dev/null +++ b/src/test/java/org/openapitools/client/api/JobsApiTest.java @@ -0,0 +1,171 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import LiltConnectorSDK.ApiException; +import org.openapitools.client.model.ErrorResponse; +import java.io.File; +import org.openapitools.client.model.JobResponse; +import org.openapitools.client.model.JobsResponse; +import org.openapitools.client.model.NewJobOptions; +import java.time.OffsetDateTime; +import org.openapitools.client.model.UpdateJobOptions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for JobsApi + */ +@Disabled +public class JobsApiTest { + + private final JobsApi api = new JobsApi(); + + /** + * Add a file to a Job. + * + * Add files to a job to submit them for translation. + * + * @throws ApiException if the Api call fails + */ + @Test + public void servicesApiJobsAddFileTest() throws ApiException { + Integer id = null; + String name = null; + List trglang = null; + String srclang = null; + OffsetDateTime due = null; + File body = null; + api.servicesApiJobsAddFile(id, name, trglang, srclang, due, body); + // TODO: test validations + } + + /** + * Create a Connector Job. + * + * The general workflow for a job is as follows. 1. Create a job. 1. Add files to a job. 1. Start the job. 1. Poll for translation completion. 1. Download the translated files. + * + * @throws ApiException if the Api call fails + */ + @Test + public void servicesApiJobsCreateJobTest() throws ApiException { + NewJobOptions newJobOptions = null; + JobResponse response = api.servicesApiJobsCreateJob(newJobOptions); + // TODO: test validations + } + + /** + * Delete a Connector Job. + * + * @throws ApiException if the Api call fails + */ + @Test + public void servicesApiJobsDeleteJobByIdTest() throws ApiException { + Integer id = null; + api.servicesApiJobsDeleteJobById(id); + // TODO: test validations + } + + /** + * Retrieve a Connector Job. + * + * @throws ApiException if the Api call fails + */ + @Test + public void servicesApiJobsGetJobByIdTest() throws ApiException { + Integer id = null; + JobResponse response = api.servicesApiJobsGetJobById(id); + // TODO: test validations + } + + /** + * Retrieve a list of Translations with their Job information. + * + * @throws ApiException if the Api call fails + */ + @Test + public void servicesApiJobsGetJobTranslationsTest() throws ApiException { + Integer limit = null; + Integer start = null; + String order = null; + Boolean filterOutCompleted = null; + String liltTranslationWorkflow = null; + String orderStatus = null; + JobsResponse response = api.servicesApiJobsGetJobTranslations(limit, start, order, filterOutCompleted, liltTranslationWorkflow, orderStatus); + // TODO: test validations + } + + /** + * Retrieve a list of Connector Jobs. + * + * @throws ApiException if the Api call fails + */ + @Test + public void servicesApiJobsGetJobsTest() throws ApiException { + Integer limit = null; + Integer start = null; + String order = null; + JobsResponse response = api.servicesApiJobsGetJobs(limit, start, order); + // TODO: test validations + } + + /** + * Start a Job. + * + * Start a job once all of the source files have been added. Use the Job ID to poll for completion to ensure everything has been well received by Lilt. + * + * @throws ApiException if the Api call fails + */ + @Test + public void servicesApiJobsStartJobTest() throws ApiException { + Integer id = null; + api.servicesApiJobsStartJob(id); + // TODO: test validations + } + + /** + * Start a Sync. + * + * Checks for updates to the translations. Use the Job ID to poll for successful completion of the sync. When the sync is complete the translations endpoint can be used to view the translation status for the job. + * + * @throws ApiException if the Api call fails + */ + @Test + public void servicesApiJobsSyncJobTest() throws ApiException { + Integer id = null; + api.servicesApiJobsSyncJob(id); + // TODO: test validations + } + + /** + * Update a Connector Job. + * + * Update a job to change the status or error message. + * + * @throws ApiException if the Api call fails + */ + @Test + public void servicesApiJobsUpdateJobTest() throws ApiException { + Integer id = null; + UpdateJobOptions updateJobOptions = null; + JobResponse response = api.servicesApiJobsUpdateJob(id, updateJobOptions); + // TODO: test validations + } + +} diff --git a/src/test/java/org/openapitools/client/api/OrganizationApiTest.java b/src/test/java/org/openapitools/client/api/OrganizationApiTest.java new file mode 100644 index 0000000..b390da6 --- /dev/null +++ b/src/test/java/org/openapitools/client/api/OrganizationApiTest.java @@ -0,0 +1,46 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import LiltConnectorSDK.ApiException; +import org.openapitools.client.model.ErrorResponse; +import org.openapitools.client.model.OrganizationResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for OrganizationApi + */ +@Disabled +public class OrganizationApiTest { + + private final OrganizationApi api = new OrganizationApi(); + + /** + * Get information about the organization based on lilt_token + * + * @throws ApiException if the Api call fails + */ + @Test + public void servicesApiOrganizationGetOrganizationRecordTest() throws ApiException { + OrganizationResponse response = api.servicesApiOrganizationGetOrganizationRecord(); + // TODO: test validations + } + +} diff --git a/src/test/java/org/openapitools/client/api/RegistrationApiTest.java b/src/test/java/org/openapitools/client/api/RegistrationApiTest.java new file mode 100644 index 0000000..665ba70 --- /dev/null +++ b/src/test/java/org/openapitools/client/api/RegistrationApiTest.java @@ -0,0 +1,49 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import LiltConnectorSDK.ApiException; +import org.openapitools.client.model.ErrorResponse; +import org.openapitools.client.model.NewOrganizationOptions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for RegistrationApi + */ +@Disabled +public class RegistrationApiTest { + + private final RegistrationApi api = new RegistrationApi(); + + /** + * Register a new Connectors Organization + * + * This endpoint is used to register a connector organization in preparation to handle credits management. + * + * @throws ApiException if the Api call fails + */ + @Test + public void servicesApiRegistrationRegisterCreditsBasedOrganizationTest() throws ApiException { + NewOrganizationOptions newOrganizationOptions = null; + api.servicesApiRegistrationRegisterCreditsBasedOrganization(newOrganizationOptions); + // TODO: test validations + } + +} diff --git a/src/test/java/org/openapitools/client/api/SettingsApiTest.java b/src/test/java/org/openapitools/client/api/SettingsApiTest.java new file mode 100644 index 0000000..92ff2f5 --- /dev/null +++ b/src/test/java/org/openapitools/client/api/SettingsApiTest.java @@ -0,0 +1,58 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import LiltConnectorSDK.ApiException; +import org.openapitools.client.model.ErrorResponse; +import org.openapitools.client.model.SettingsResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for SettingsApi + */ +@Disabled +public class SettingsApiTest { + + private final SettingsApi api = new SettingsApi(); + + /** + * Retrieve the settings. + * + * @throws ApiException if the Api call fails + */ + @Test + public void servicesApiSettingsGetSettingsTest() throws ApiException { + SettingsResponse response = api.servicesApiSettingsGetSettings(); + // TODO: test validations + } + + /** + * Update the settings. + * + * @throws ApiException if the Api call fails + */ + @Test + public void servicesApiSettingsUpdateSettingsTest() throws ApiException { + SettingsResponse settingsResponse = null; + SettingsResponse response = api.servicesApiSettingsUpdateSettings(settingsResponse); + // TODO: test validations + } + +} diff --git a/src/test/java/org/openapitools/client/api/TranslationsApiTest.java b/src/test/java/org/openapitools/client/api/TranslationsApiTest.java new file mode 100644 index 0000000..7f8bff9 --- /dev/null +++ b/src/test/java/org/openapitools/client/api/TranslationsApiTest.java @@ -0,0 +1,125 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import LiltConnectorSDK.ApiException; +import org.openapitools.client.model.ErrorResponse; +import org.openapitools.client.model.PreviewTranslationResponseInner; +import org.openapitools.client.model.TranslationResponse; +import org.openapitools.client.model.TranslationsResponse; +import org.openapitools.client.model.UpdateDeliveryOptions; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for TranslationsApi + */ +@Disabled +public class TranslationsApiTest { + + private final TranslationsApi api = new TranslationsApi(); + + /** + * Complete a Translation. + * + * @throws ApiException if the Api call fails + */ + @Test + public void servicesApiDeliveriesCompleteDeliveryTest() throws ApiException { + Integer id = null; + api.servicesApiDeliveriesCompleteDelivery(id); + // TODO: test validations + } + + /** + * Download a Translation. + * + * @throws ApiException if the Api call fails + */ + @Test + public void servicesApiDeliveriesDownloadDeliveryTest() throws ApiException { + Integer id = null; + String response = api.servicesApiDeliveriesDownloadDelivery(id); + // TODO: test validations + } + + /** + * Download a Translation Source. + * + * @throws ApiException if the Api call fails + */ + @Test + public void servicesApiDeliveriesDownloadDeliverySourceTest() throws ApiException { + Integer id = null; + String response = api.servicesApiDeliveriesDownloadDeliverySource(id); + // TODO: test validations + } + + /** + * Retrieve a list of Translations. + * + * @throws ApiException if the Api call fails + */ + @Test + public void servicesApiDeliveriesGetDeliveriesByJobIdTest() throws ApiException { + Integer limit = null; + Integer start = null; + Integer jobId = null; + TranslationsResponse response = api.servicesApiDeliveriesGetDeliveriesByJobId(limit, start, jobId); + // TODO: test validations + } + + /** + * Retrieve a Translation. + * + * @throws ApiException if the Api call fails + */ + @Test + public void servicesApiDeliveriesGetDeliveryByIdTest() throws ApiException { + Integer id = null; + TranslationResponse response = api.servicesApiDeliveriesGetDeliveryById(id); + // TODO: test validations + } + + /** + * Get a Translation's source to target mapping. + * + * @throws ApiException if the Api call fails + */ + @Test + public void servicesApiDeliveriesPreviewDeliveryTest() throws ApiException { + Integer id = null; + List response = api.servicesApiDeliveriesPreviewDelivery(id); + // TODO: test validations + } + + /** + * Update a Translation. + * + * @throws ApiException if the Api call fails + */ + @Test + public void servicesApiDeliveriesUpdateDeliveryTest() throws ApiException { + Integer id = null; + UpdateDeliveryOptions updateDeliveryOptions = null; + TranslationResponse response = api.servicesApiDeliveriesUpdateDelivery(id, updateDeliveryOptions); + // TODO: test validations + } + +} diff --git a/src/test/java/org/openapitools/client/model/ErrorResponseTest.java b/src/test/java/org/openapitools/client/model/ErrorResponseTest.java new file mode 100644 index 0000000..48d43a6 --- /dev/null +++ b/src/test/java/org/openapitools/client/model/ErrorResponseTest.java @@ -0,0 +1,64 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ErrorResponse + */ +public class ErrorResponseTest { + private final ErrorResponse model = new ErrorResponse(); + + /** + * Model tests for ErrorResponse + */ + @Test + public void testErrorResponse() { + // TODO: test ErrorResponse + } + + /** + * Test the property 'error' + */ + @Test + public void errorTest() { + // TODO: test error + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + +} diff --git a/src/test/java/org/openapitools/client/model/JobResponseTest.java b/src/test/java/org/openapitools/client/model/JobResponseTest.java new file mode 100644 index 0000000..b4e8063 --- /dev/null +++ b/src/test/java/org/openapitools/client/model/JobResponseTest.java @@ -0,0 +1,123 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for JobResponse + */ +public class JobResponseTest { + private final JobResponse model = new JobResponse(); + + /** + * Model tests for JobResponse + */ + @Test + public void testJobResponse() { + // TODO: test JobResponse + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'projectPrefix' + */ + @Test + public void projectPrefixTest() { + // TODO: test projectPrefix + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'orderStatus' + */ + @Test + public void orderStatusTest() { + // TODO: test orderStatus + } + + /** + * Test the property 'targetLanguages' + */ + @Test + public void targetLanguagesTest() { + // TODO: test targetLanguages + } + + /** + * Test the property 'translationWorkflow' + */ + @Test + public void translationWorkflowTest() { + // TODO: test translationWorkflow + } + + /** + * Test the property 'dueDate' + */ + @Test + public void dueDateTest() { + // TODO: test dueDate + } + + /** + * Test the property 'errorMsg' + */ + @Test + public void errorMsgTest() { + // TODO: test errorMsg + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + +} diff --git a/src/test/java/org/openapitools/client/model/JobsResponseTest.java b/src/test/java/org/openapitools/client/model/JobsResponseTest.java new file mode 100644 index 0000000..cdb0778 --- /dev/null +++ b/src/test/java/org/openapitools/client/model/JobsResponseTest.java @@ -0,0 +1,67 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.JobResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for JobsResponse + */ +public class JobsResponseTest { + private final JobsResponse model = new JobsResponse(); + + /** + * Model tests for JobsResponse + */ + @Test + public void testJobsResponse() { + // TODO: test JobsResponse + } + + /** + * Test the property 'limit' + */ + @Test + public void limitTest() { + // TODO: test limit + } + + /** + * Test the property 'start' + */ + @Test + public void startTest() { + // TODO: test start + } + + /** + * Test the property 'results' + */ + @Test + public void resultsTest() { + // TODO: test results + } + +} diff --git a/src/test/java/org/openapitools/client/model/NewJobOptionsTest.java b/src/test/java/org/openapitools/client/model/NewJobOptionsTest.java new file mode 100644 index 0000000..3f18664 --- /dev/null +++ b/src/test/java/org/openapitools/client/model/NewJobOptionsTest.java @@ -0,0 +1,99 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for NewJobOptions + */ +public class NewJobOptionsTest { + private final NewJobOptions model = new NewJobOptions(); + + /** + * Model tests for NewJobOptions + */ + @Test + public void testNewJobOptions() { + // TODO: test NewJobOptions + } + + /** + * Test the property 'projectPrefix' + */ + @Test + public void projectPrefixTest() { + // TODO: test projectPrefix + } + + /** + * Test the property 'projectNameTemplate' + */ + @Test + public void projectNameTemplateTest() { + // TODO: test projectNameTemplate + } + + /** + * Test the property 'liltTranslationWorkflow' + */ + @Test + public void liltTranslationWorkflowTest() { + // TODO: test liltTranslationWorkflow + } + + /** + * Test the property 'liltDefaultDueDate' + */ + @Test + public void liltDefaultDueDateTest() { + // TODO: test liltDefaultDueDate + } + + /** + * Test the property 'liltTargetLanguages' + */ + @Test + public void liltTargetLanguagesTest() { + // TODO: test liltTargetLanguages + } + + /** + * Test the property 'handleCreditTransactions' + */ + @Test + public void handleCreditTransactionsTest() { + // TODO: test handleCreditTransactions + } + + /** + * Test the property 'sourceWordCount' + */ + @Test + public void sourceWordCountTest() { + // TODO: test sourceWordCount + } + +} diff --git a/src/test/java/org/openapitools/client/model/NewOrganizationOptionsTest.java b/src/test/java/org/openapitools/client/model/NewOrganizationOptionsTest.java new file mode 100644 index 0000000..747572e --- /dev/null +++ b/src/test/java/org/openapitools/client/model/NewOrganizationOptionsTest.java @@ -0,0 +1,80 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for NewOrganizationOptions + */ +public class NewOrganizationOptionsTest { + private final NewOrganizationOptions model = new NewOrganizationOptions(); + + /** + * Model tests for NewOrganizationOptions + */ + @Test + public void testNewOrganizationOptions() { + // TODO: test NewOrganizationOptions + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'registrationMetadata' + */ + @Test + public void registrationMetadataTest() { + // TODO: test registrationMetadata + } + + /** + * Test the property 'instantTranslationCredits' + */ + @Test + public void instantTranslationCreditsTest() { + // TODO: test instantTranslationCredits + } + + /** + * Test the property 'verifiedTranslationCredits' + */ + @Test + public void verifiedTranslationCreditsTest() { + // TODO: test verifiedTranslationCredits + } + +} diff --git a/src/test/java/org/openapitools/client/model/OrganizationResponseTest.java b/src/test/java/org/openapitools/client/model/OrganizationResponseTest.java new file mode 100644 index 0000000..77c73d0 --- /dev/null +++ b/src/test/java/org/openapitools/client/model/OrganizationResponseTest.java @@ -0,0 +1,65 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for OrganizationResponse + */ +public class OrganizationResponseTest { + private final OrganizationResponse model = new OrganizationResponse(); + + /** + * Model tests for OrganizationResponse + */ + @Test + public void testOrganizationResponse() { + // TODO: test OrganizationResponse + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'instantTranslationCredits' + */ + @Test + public void instantTranslationCreditsTest() { + // TODO: test instantTranslationCredits + } + + /** + * Test the property 'verifiedTranslationCredits' + */ + @Test + public void verifiedTranslationCreditsTest() { + // TODO: test verifiedTranslationCredits + } + +} diff --git a/src/test/java/org/openapitools/client/model/PreviewTranslationResponseInnerTest.java b/src/test/java/org/openapitools/client/model/PreviewTranslationResponseInnerTest.java new file mode 100644 index 0000000..0c8a84b --- /dev/null +++ b/src/test/java/org/openapitools/client/model/PreviewTranslationResponseInnerTest.java @@ -0,0 +1,64 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for PreviewTranslationResponseInner + */ +public class PreviewTranslationResponseInnerTest { + private final PreviewTranslationResponseInner model = new PreviewTranslationResponseInner(); + + /** + * Model tests for PreviewTranslationResponseInner + */ + @Test + public void testPreviewTranslationResponseInner() { + // TODO: test PreviewTranslationResponseInner + } + + /** + * Test the property 'key' + */ + @Test + public void keyTest() { + // TODO: test key + } + + /** + * Test the property 'source' + */ + @Test + public void sourceTest() { + // TODO: test source + } + + /** + * Test the property 'target' + */ + @Test + public void targetTest() { + // TODO: test target + } + +} diff --git a/src/test/java/org/openapitools/client/model/ServicesApiCreditTransactionCreateCreditTransactionRequestTest.java b/src/test/java/org/openapitools/client/model/ServicesApiCreditTransactionCreateCreditTransactionRequestTest.java new file mode 100644 index 0000000..13b3a51 --- /dev/null +++ b/src/test/java/org/openapitools/client/model/ServicesApiCreditTransactionCreateCreditTransactionRequestTest.java @@ -0,0 +1,48 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for ServicesApiCreditTransactionCreateCreditTransactionRequest + */ +public class ServicesApiCreditTransactionCreateCreditTransactionRequestTest { + private final ServicesApiCreditTransactionCreateCreditTransactionRequest model = new ServicesApiCreditTransactionCreateCreditTransactionRequest(); + + /** + * Model tests for ServicesApiCreditTransactionCreateCreditTransactionRequest + */ + @Test + public void testServicesApiCreditTransactionCreateCreditTransactionRequest() { + // TODO: test ServicesApiCreditTransactionCreateCreditTransactionRequest + } + + /** + * Test the property 'payload' + */ + @Test + public void payloadTest() { + // TODO: test payload + } + +} diff --git a/src/test/java/org/openapitools/client/model/SettingsResponseTest.java b/src/test/java/org/openapitools/client/model/SettingsResponseTest.java new file mode 100644 index 0000000..3f2676d --- /dev/null +++ b/src/test/java/org/openapitools/client/model/SettingsResponseTest.java @@ -0,0 +1,64 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for SettingsResponse + */ +public class SettingsResponseTest { + private final SettingsResponse model = new SettingsResponse(); + + /** + * Model tests for SettingsResponse + */ + @Test + public void testSettingsResponse() { + // TODO: test SettingsResponse + } + + /** + * Test the property 'projectPrefix' + */ + @Test + public void projectPrefixTest() { + // TODO: test projectPrefix + } + + /** + * Test the property 'projectNameTemplate' + */ + @Test + public void projectNameTemplateTest() { + // TODO: test projectNameTemplate + } + + /** + * Test the property 'liltTranslationWorkflow' + */ + @Test + public void liltTranslationWorkflowTest() { + // TODO: test liltTranslationWorkflow + } + +} diff --git a/src/test/java/org/openapitools/client/model/TranslationResponseTest.java b/src/test/java/org/openapitools/client/model/TranslationResponseTest.java new file mode 100644 index 0000000..f06f777 --- /dev/null +++ b/src/test/java/org/openapitools/client/model/TranslationResponseTest.java @@ -0,0 +1,121 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for TranslationResponse + */ +public class TranslationResponseTest { + private final TranslationResponse model = new TranslationResponse(); + + /** + * Model tests for TranslationResponse + */ + @Test + public void testTranslationResponse() { + // TODO: test TranslationResponse + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'srcLang' + */ + @Test + public void srcLangTest() { + // TODO: test srcLang + } + + /** + * Test the property 'srcLocale' + */ + @Test + public void srcLocaleTest() { + // TODO: test srcLocale + } + + /** + * Test the property 'trgLang' + */ + @Test + public void trgLangTest() { + // TODO: test trgLang + } + + /** + * Test the property 'trgLocale' + */ + @Test + public void trgLocaleTest() { + // TODO: test trgLocale + } + + /** + * Test the property 'errorMsg' + */ + @Test + public void errorMsgTest() { + // TODO: test errorMsg + } + + /** + * Test the property 'createdAt' + */ + @Test + public void createdAtTest() { + // TODO: test createdAt + } + + /** + * Test the property 'updatedAt' + */ + @Test + public void updatedAtTest() { + // TODO: test updatedAt + } + +} diff --git a/src/test/java/org/openapitools/client/model/TranslationsResponseTest.java b/src/test/java/org/openapitools/client/model/TranslationsResponseTest.java new file mode 100644 index 0000000..d2cbbc6 --- /dev/null +++ b/src/test/java/org/openapitools/client/model/TranslationsResponseTest.java @@ -0,0 +1,67 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.TranslationResponse; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for TranslationsResponse + */ +public class TranslationsResponseTest { + private final TranslationsResponse model = new TranslationsResponse(); + + /** + * Model tests for TranslationsResponse + */ + @Test + public void testTranslationsResponse() { + // TODO: test TranslationsResponse + } + + /** + * Test the property 'limit' + */ + @Test + public void limitTest() { + // TODO: test limit + } + + /** + * Test the property 'start' + */ + @Test + public void startTest() { + // TODO: test start + } + + /** + * Test the property 'results' + */ + @Test + public void resultsTest() { + // TODO: test results + } + +} diff --git a/src/test/java/org/openapitools/client/model/UpdateDeliveryOptionsTest.java b/src/test/java/org/openapitools/client/model/UpdateDeliveryOptionsTest.java new file mode 100644 index 0000000..407656f --- /dev/null +++ b/src/test/java/org/openapitools/client/model/UpdateDeliveryOptionsTest.java @@ -0,0 +1,56 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for UpdateDeliveryOptions + */ +public class UpdateDeliveryOptionsTest { + private final UpdateDeliveryOptions model = new UpdateDeliveryOptions(); + + /** + * Model tests for UpdateDeliveryOptions + */ + @Test + public void testUpdateDeliveryOptions() { + // TODO: test UpdateDeliveryOptions + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'errorMessage' + */ + @Test + public void errorMessageTest() { + // TODO: test errorMessage + } + +} diff --git a/src/test/java/org/openapitools/client/model/UpdateJobOptionsTest.java b/src/test/java/org/openapitools/client/model/UpdateJobOptionsTest.java new file mode 100644 index 0000000..356c6b1 --- /dev/null +++ b/src/test/java/org/openapitools/client/model/UpdateJobOptionsTest.java @@ -0,0 +1,65 @@ +/* + * Lilt Connector Plugin API + * This document describes the Plugin API for Lilt's Connector platform. The Plugin API is intented to be used by developers who wish to build integrations into their desired systems. The purpose of this API is to enable content transfer and status monitoring for localization projects. - Read more about the concepts and workflows in the [user guide](/docs/api/v1.0). - Test the API interactively via [Swagger UI](/api/v1.0/ui). + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for UpdateJobOptions + */ +public class UpdateJobOptionsTest { + private final UpdateJobOptions model = new UpdateJobOptions(); + + /** + * Model tests for UpdateJobOptions + */ + @Test + public void testUpdateJobOptions() { + // TODO: test UpdateJobOptions + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'errorMessage' + */ + @Test + public void errorMessageTest() { + // TODO: test errorMessage + } + + /** + * Test the property 'sourceWordCount' + */ + @Test + public void sourceWordCountTest() { + // TODO: test sourceWordCount + } + +}