diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index ea5e6e83e..7f008af63 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -2,39 +2,13 @@ README.md api/openapi.yaml docs/AddFileLabelRequest.md -docs/Annotation.md -docs/ApiRoot.md -docs/Comment.md -docs/CommentBody.md -docs/CommentDeleteResponse.md -docs/CommentsApi.md -docs/Connector.md -docs/ConnectorArguments.md -docs/ConnectorDeleteResponse.md -docs/ConnectorJob.md -docs/ConnectorsApi.md -docs/ConverterConfigApi.md -docs/ConverterConfigUpdateResponse.md +docs/CreateApi.md docs/CreateConverterConfigParameters.md -docs/DocumentAssignmentParameters.md -docs/DocumentAssignmentResponse.md -docs/DocumentComments.md -docs/DocumentDeleteResponse.md -docs/DocumentDoneUpdateParameters.md -docs/DocumentDoneUpdateParameters1.md -docs/DocumentDoneUpdateParameters2.md -docs/DocumentParameters.md -docs/DocumentPretranslateParameters.md -docs/DocumentPretranslateResponse.md -docs/DocumentPretranslating.md -docs/DocumentPretranslatingStatus.md -docs/DocumentQuote.md -docs/DocumentUpdateParameters.md +docs/DeleteSegmentFromMemoryResponse.md docs/DocumentWithSegments.md docs/DocumentWithoutSegments.md docs/DocumentWithoutSegmentsStatus.md docs/DocumentsApi.md -docs/EditFilterMappingParameters.md docs/Error.md docs/FileDeleteResponse.md docs/FilesApi.md @@ -43,7 +17,6 @@ docs/Job.md docs/JobCreateParameters.md docs/JobDeleteResponse.md docs/JobLeverageStats.md -docs/JobLeverageStatsProjects.md docs/JobProject.md docs/JobStats.md docs/JobUpdateParameters.md @@ -51,62 +24,30 @@ docs/JobsApi.md docs/LanguagePair.md docs/LanguagesApi.md docs/LanguagesResponse.md -docs/LexiconApi.md -docs/LexiconEntry.md -docs/LexiconEntryExamples.md -docs/LexiconEntrySourceSpan.md -docs/LexiconEntryTargetSpan.md -docs/LexiconEntryTranslations.md -docs/LexiconUpdateParameters.md -docs/LexiconUpdateResponse.md -docs/MatchBand.md +docs/LiltCreateContent.md docs/MemoriesApi.md docs/Memory.md docs/MemoryCreateParameters.md docs/MemoryDeleteResponse.md docs/MemoryImportResponse.md -docs/MemoryInsertResponse.md -docs/MemorySyncDeleteResponse.md docs/MemoryUpdateParameters.md -docs/MemoryUpdateResponse.md docs/Project.md docs/ProjectCreateParameters.md docs/ProjectDeleteResponse.md -docs/ProjectQuote.md -docs/ProjectStatus.md -docs/ProjectUpdateResponse.md +docs/ProjectStats.md docs/ProjectsApi.md -docs/QARuleMatches.md -docs/QARuleMatchesContext.md -docs/QARuleMatchesCustomRules.md -docs/QARuleMatchesMatches.md -docs/QARuleMatchesReplacements.md -docs/QARuleMatchesRule.md -docs/QARuleMatchesRuleCategory.md -docs/QARuleMatchesRuleUrls.md -docs/QaApi.md -docs/ResourceStatus.md -docs/RootApi.md +docs/SDLXLIFFFilter.md docs/Segment.md -docs/SegmentCreateParameters.md -docs/SegmentDeleteResponse.md -docs/SegmentDoneResponse.md -docs/SegmentUpdateParameters.md -docs/SegmentWithComments.md -docs/SegmentsApi.md -docs/Setting.md -docs/SettingUpsertBody.md -docs/SettingUpsertResponse.md -docs/SettingsApi.md +docs/SignLiltCreateTermsResponse.md docs/SourceFile.md -docs/TaggedSegment.md +docs/TermbaseExportResponse.md docs/TranslateApi.md -docs/TranslateRegisterResponse.md docs/TranslateSegmentBody.md docs/Translation.md docs/TranslationInfo.md docs/TranslationList.md docs/TranslationMemoryEntry.md +docs/WorkflowStageAssignment.md pom.xml src/main/AndroidManifest.xml src/main/java/com/lilt/client/ApiCallback.java @@ -122,55 +63,24 @@ src/main/java/com/lilt/client/ProgressResponseBody.java src/main/java/com/lilt/client/ServerConfiguration.java src/main/java/com/lilt/client/ServerVariable.java src/main/java/com/lilt/client/StringUtil.java -src/main/java/com/lilt/client/api/CommentsApi.java -src/main/java/com/lilt/client/api/ConnectorsApi.java -src/main/java/com/lilt/client/api/ConverterConfigApi.java +src/main/java/com/lilt/client/api/CreateApi.java src/main/java/com/lilt/client/api/DocumentsApi.java src/main/java/com/lilt/client/api/FilesApi.java src/main/java/com/lilt/client/api/JobsApi.java src/main/java/com/lilt/client/api/LanguagesApi.java -src/main/java/com/lilt/client/api/LexiconApi.java src/main/java/com/lilt/client/api/MemoriesApi.java src/main/java/com/lilt/client/api/ProjectsApi.java -src/main/java/com/lilt/client/api/QaApi.java -src/main/java/com/lilt/client/api/RootApi.java -src/main/java/com/lilt/client/api/SegmentsApi.java -src/main/java/com/lilt/client/api/SettingsApi.java src/main/java/com/lilt/client/api/TranslateApi.java src/main/java/com/lilt/client/auth/ApiKeyAuth.java src/main/java/com/lilt/client/auth/Authentication.java src/main/java/com/lilt/client/auth/HttpBasicAuth.java src/main/java/com/lilt/client/auth/HttpBearerAuth.java src/main/java/com/lilt/client/model/AddFileLabelRequest.java -src/main/java/com/lilt/client/model/Annotation.java -src/main/java/com/lilt/client/model/ApiRoot.java -src/main/java/com/lilt/client/model/Comment.java -src/main/java/com/lilt/client/model/CommentBody.java -src/main/java/com/lilt/client/model/CommentDeleteResponse.java -src/main/java/com/lilt/client/model/Connector.java -src/main/java/com/lilt/client/model/ConnectorArguments.java -src/main/java/com/lilt/client/model/ConnectorDeleteResponse.java -src/main/java/com/lilt/client/model/ConnectorJob.java -src/main/java/com/lilt/client/model/ConverterConfigUpdateResponse.java src/main/java/com/lilt/client/model/CreateConverterConfigParameters.java -src/main/java/com/lilt/client/model/DocumentAssignmentParameters.java -src/main/java/com/lilt/client/model/DocumentAssignmentResponse.java -src/main/java/com/lilt/client/model/DocumentComments.java -src/main/java/com/lilt/client/model/DocumentDeleteResponse.java -src/main/java/com/lilt/client/model/DocumentDoneUpdateParameters.java -src/main/java/com/lilt/client/model/DocumentDoneUpdateParameters1.java -src/main/java/com/lilt/client/model/DocumentDoneUpdateParameters2.java -src/main/java/com/lilt/client/model/DocumentParameters.java -src/main/java/com/lilt/client/model/DocumentPretranslateParameters.java -src/main/java/com/lilt/client/model/DocumentPretranslateResponse.java -src/main/java/com/lilt/client/model/DocumentPretranslating.java -src/main/java/com/lilt/client/model/DocumentPretranslatingStatus.java -src/main/java/com/lilt/client/model/DocumentQuote.java -src/main/java/com/lilt/client/model/DocumentUpdateParameters.java +src/main/java/com/lilt/client/model/DeleteSegmentFromMemoryResponse.java src/main/java/com/lilt/client/model/DocumentWithSegments.java src/main/java/com/lilt/client/model/DocumentWithoutSegments.java src/main/java/com/lilt/client/model/DocumentWithoutSegmentsStatus.java -src/main/java/com/lilt/client/model/EditFilterMappingParameters.java src/main/java/com/lilt/client/model/Error.java src/main/java/com/lilt/client/model/FileDeleteResponse.java src/main/java/com/lilt/client/model/InlineResponse200.java @@ -178,57 +88,29 @@ src/main/java/com/lilt/client/model/Job.java src/main/java/com/lilt/client/model/JobCreateParameters.java src/main/java/com/lilt/client/model/JobDeleteResponse.java src/main/java/com/lilt/client/model/JobLeverageStats.java -src/main/java/com/lilt/client/model/JobLeverageStatsProjects.java src/main/java/com/lilt/client/model/JobProject.java src/main/java/com/lilt/client/model/JobStats.java src/main/java/com/lilt/client/model/JobUpdateParameters.java src/main/java/com/lilt/client/model/LanguagePair.java src/main/java/com/lilt/client/model/LanguagesResponse.java -src/main/java/com/lilt/client/model/LexiconEntry.java -src/main/java/com/lilt/client/model/LexiconEntryExamples.java -src/main/java/com/lilt/client/model/LexiconEntrySourceSpan.java -src/main/java/com/lilt/client/model/LexiconEntryTargetSpan.java -src/main/java/com/lilt/client/model/LexiconEntryTranslations.java -src/main/java/com/lilt/client/model/LexiconUpdateParameters.java -src/main/java/com/lilt/client/model/LexiconUpdateResponse.java -src/main/java/com/lilt/client/model/MatchBand.java +src/main/java/com/lilt/client/model/LiltCreateContent.java src/main/java/com/lilt/client/model/Memory.java src/main/java/com/lilt/client/model/MemoryCreateParameters.java src/main/java/com/lilt/client/model/MemoryDeleteResponse.java src/main/java/com/lilt/client/model/MemoryImportResponse.java -src/main/java/com/lilt/client/model/MemoryInsertResponse.java -src/main/java/com/lilt/client/model/MemorySyncDeleteResponse.java src/main/java/com/lilt/client/model/MemoryUpdateParameters.java -src/main/java/com/lilt/client/model/MemoryUpdateResponse.java src/main/java/com/lilt/client/model/Project.java src/main/java/com/lilt/client/model/ProjectCreateParameters.java src/main/java/com/lilt/client/model/ProjectDeleteResponse.java -src/main/java/com/lilt/client/model/ProjectQuote.java -src/main/java/com/lilt/client/model/ProjectStatus.java -src/main/java/com/lilt/client/model/ProjectUpdateResponse.java -src/main/java/com/lilt/client/model/QARuleMatches.java -src/main/java/com/lilt/client/model/QARuleMatchesContext.java -src/main/java/com/lilt/client/model/QARuleMatchesCustomRules.java -src/main/java/com/lilt/client/model/QARuleMatchesMatches.java -src/main/java/com/lilt/client/model/QARuleMatchesReplacements.java -src/main/java/com/lilt/client/model/QARuleMatchesRule.java -src/main/java/com/lilt/client/model/QARuleMatchesRuleCategory.java -src/main/java/com/lilt/client/model/QARuleMatchesRuleUrls.java -src/main/java/com/lilt/client/model/ResourceStatus.java +src/main/java/com/lilt/client/model/ProjectStats.java +src/main/java/com/lilt/client/model/SDLXLIFFFilter.java src/main/java/com/lilt/client/model/Segment.java -src/main/java/com/lilt/client/model/SegmentCreateParameters.java -src/main/java/com/lilt/client/model/SegmentDeleteResponse.java -src/main/java/com/lilt/client/model/SegmentDoneResponse.java -src/main/java/com/lilt/client/model/SegmentUpdateParameters.java -src/main/java/com/lilt/client/model/SegmentWithComments.java -src/main/java/com/lilt/client/model/Setting.java -src/main/java/com/lilt/client/model/SettingUpsertBody.java -src/main/java/com/lilt/client/model/SettingUpsertResponse.java +src/main/java/com/lilt/client/model/SignLiltCreateTermsResponse.java src/main/java/com/lilt/client/model/SourceFile.java -src/main/java/com/lilt/client/model/TaggedSegment.java -src/main/java/com/lilt/client/model/TranslateRegisterResponse.java +src/main/java/com/lilt/client/model/TermbaseExportResponse.java src/main/java/com/lilt/client/model/TranslateSegmentBody.java src/main/java/com/lilt/client/model/Translation.java src/main/java/com/lilt/client/model/TranslationInfo.java src/main/java/com/lilt/client/model/TranslationList.java src/main/java/com/lilt/client/model/TranslationMemoryEntry.java +src/main/java/com/lilt/client/model/WorkflowStageAssignment.java diff --git a/README.md b/README.md index 2dae66b41..3c3b4d915 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# Lilt-java-client +# openapi-java-client Lilt REST API -- API version: v2.0 - - Build date: 2021-03-15T14:22:49.219647-07:00[America/Los_Angeles] +- API version: v3.0 + - Build date: 2024-07-22T00:19:36.591Z[GMT] The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation @@ -12,15 +12,21 @@ The Lilt REST API enables programmatic access to the full-range of Lilt backend * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. + ## Authentication + Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. +## Quotas + +Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. - For more information, please visit [https://lilt.com/docs/api](https://lilt.com/docs/api) + + For more information, please visit [https://developers.lilt.com/](https://developers.lilt.com/) *Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* @@ -49,33 +55,25 @@ Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) f ### Maven users -The library is hosted in GitHub packages, so configure your project's POM -to point to the correct repository: - -```xml - - - github - Github Packages - https://maven.pkg.github.com/lilt/lilt-java - - - ``` - -You will also need to authenticate with GitHub Packages by updating -your `~/.m2/settings.xml` file as described [here](https://docs.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-apache-maven-for-use-with-github-packages#authenticating-to-github-packages). - Add this dependency to your project's POM: ```xml - com.lilt.client - lilt-java-client + org.openapitools + openapi-java-client 2.2.0 compile ``` +### Gradle users + +Add this dependency to your project's build file: + +```groovy +compile "org.openapitools:openapi-java-client:2.2.0" +``` + ### Others At first generate the JAR by executing: @@ -86,7 +84,7 @@ mvn clean package Then manually install the following JARs: -* `target/lilt-java-client-2.2.0.jar` +* `target/openapi-java-client-2.2.0.jar` * `target/lib/*.jar` ## Getting Started @@ -101,12 +99,12 @@ import com.lilt.client.ApiException; import com.lilt.client.Configuration; import com.lilt.client.auth.*; import com.lilt.client.models.*; -import com.lilt.client.api.CommentsApi; +import com.lilt.client.api.CreateApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -119,15 +117,13 @@ public class Example { BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); - CommentsApi apiInstance = new CommentsApi(defaultClient); - Integer documentId = 56; // Integer | A unique document identifier. - Integer segmentId = 56; // Integer | A unique segment identifier. - CommentBody body = new CommentBody(); // CommentBody | The comment being created + CreateApi apiInstance = new CreateApi(defaultClient); + Integer contentId = 56; // Integer | The content ID. try { - Comment result = apiInstance.createComment(documentId, segmentId, body); + InlineResponse200 result = apiInstance.deleteLiltCreateContent(contentId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling CommentsApi#createComment"); + System.err.println("Exception when calling CreateApi#deleteLiltCreateContent"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -140,127 +136,66 @@ public class Example { ## Documentation for API Endpoints -All URIs are relative to *https://lilt.com/2* +All URIs are relative to *https://api.lilt.com* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*CommentsApi* | [**createComment**](docs/CommentsApi.md#createComment) | **POST** /comments | Create a new comment -*CommentsApi* | [**deleteComment**](docs/CommentsApi.md#deleteComment) | **DELETE** /comments | Delete a Comment -*CommentsApi* | [**getDocumentComments**](docs/CommentsApi.md#getDocumentComments) | **GET** /comments | Retrieve a document's comments by segment -*CommentsApi* | [**updateComment**](docs/CommentsApi.md#updateComment) | **PUT** /comments | Update an existing comment -*ConnectorsApi* | [**createConnector**](docs/ConnectorsApi.md#createConnector) | **POST** /connectors | Upload a Connector -*ConnectorsApi* | [**deleteConnector**](docs/ConnectorsApi.md#deleteConnector) | **DELETE** /connectors | Delete a Connector -*ConnectorsApi* | [**exportConnectorJob**](docs/ConnectorsApi.md#exportConnectorJob) | **POST** /connectors/jobs/deliver | Deliver a Connector Job -*ConnectorsApi* | [**getConnectorJobs**](docs/ConnectorsApi.md#getConnectorJobs) | **GET** /connectors/jobs | Retrieve a Connector Job -*ConnectorsApi* | [**getConnectors**](docs/ConnectorsApi.md#getConnectors) | **GET** /connectors | Retrieve a Connector -*ConnectorsApi* | [**syncConnector**](docs/ConnectorsApi.md#syncConnector) | **POST** /connectors/sync | Sync a Connector -*ConnectorsApi* | [**updateConnector**](docs/ConnectorsApi.md#updateConnector) | **PUT** /connectors | Upload a Connector -*ConverterConfigApi* | [**addConverterConfig**](docs/ConverterConfigApi.md#addConverterConfig) | **PUT** /configs/converter | Add Converter Config -*ConverterConfigApi* | [**deleteConverterConfig**](docs/ConverterConfigApi.md#deleteConverterConfig) | **DELETE** /configs/converter/{configId} | Delete Converter Config -*ConverterConfigApi* | [**deleteFilterMapping**](docs/ConverterConfigApi.md#deleteFilterMapping) | **DELETE** /configs/converter/{configId}/{fileExtension} | Delete Filter Mapping -*ConverterConfigApi* | [**editFilterMapping**](docs/ConverterConfigApi.md#editFilterMapping) | **PUT** /configs/converter/{configId}/{fileExtension} | Add Filter Mapping -*ConverterConfigApi* | [**getConverterConfigById**](docs/ConverterConfigApi.md#getConverterConfigById) | **GET** /configs/converter/{configId} | Fetch Converter Config by Id -*ConverterConfigApi* | [**getConverterConfigs**](docs/ConverterConfigApi.md#getConverterConfigs) | **GET** /configs/converter | List Converter Configs -*DocumentsApi* | [**assignDocument**](docs/DocumentsApi.md#assignDocument) | **PUT** /documents/share | Assign a Document -*DocumentsApi* | [**createDocument**](docs/DocumentsApi.md#createDocument) | **POST** /documents | Create a Document -*DocumentsApi* | [**deleteDocument**](docs/DocumentsApi.md#deleteDocument) | **DELETE** /documents | Delete a Document -*DocumentsApi* | [**downloadDocument**](docs/DocumentsApi.md#downloadDocument) | **GET** /documents/files | Download a Document -*DocumentsApi* | [**getDocument**](docs/DocumentsApi.md#getDocument) | **GET** /documents | Retrieve a Document -*DocumentsApi* | [**markReviewDone**](docs/DocumentsApi.md#markReviewDone) | **POST** /documents/done/review | Mark review done -*DocumentsApi* | [**markTranslationDone**](docs/DocumentsApi.md#markTranslationDone) | **POST** /documents/done/translation | Mark translation done -*DocumentsApi* | [**pretranslateDocuments**](docs/DocumentsApi.md#pretranslateDocuments) | **POST** /documents/pretranslate | Pretranslate a Document -*DocumentsApi* | [**unlockDocuments**](docs/DocumentsApi.md#unlockDocuments) | **POST** /documents/done/unlock | Unlock documents -*DocumentsApi* | [**updateDocument**](docs/DocumentsApi.md#updateDocument) | **PUT** /documents | Update a Document -*DocumentsApi* | [**uploadDocument**](docs/DocumentsApi.md#uploadDocument) | **POST** /documents/files | Upload a File -*FilesApi* | [**addLabel**](docs/FilesApi.md#addLabel) | **POST** /files/labels | Add Label to File -*FilesApi* | [**deleteFile**](docs/FilesApi.md#deleteFile) | **DELETE** /files | Delete a File -*FilesApi* | [**download**](docs/FilesApi.md#download) | **GET** /files/download | Download file -*FilesApi* | [**getFiles**](docs/FilesApi.md#getFiles) | **GET** /files | Retrieve a File -*FilesApi* | [**removeLabel**](docs/FilesApi.md#removeLabel) | **DELETE** /files/labels | Remove Label from File -*FilesApi* | [**uploadFile**](docs/FilesApi.md#uploadFile) | **POST** /files | Upload a File -*JobsApi* | [**archiveJob**](docs/JobsApi.md#archiveJob) | **POST** /jobs/{jobId}/archive | Archive a Job -*JobsApi* | [**createJob**](docs/JobsApi.md#createJob) | **POST** /jobs | Create a Job -*JobsApi* | [**deleteJob**](docs/JobsApi.md#deleteJob) | **DELETE** /jobs/{jobId} | Delete a Job -*JobsApi* | [**deliverJob**](docs/JobsApi.md#deliverJob) | **POST** /jobs/{jobId}/deliver | Deliver a Job -*JobsApi* | [**downloadJob**](docs/JobsApi.md#downloadJob) | **GET** /jobs/{jobId}/downlod | Download a Job -*JobsApi* | [**exportJob**](docs/JobsApi.md#exportJob) | **GET** /jobs/{jobId}/export | Export a Job -*JobsApi* | [**getJob**](docs/JobsApi.md#getJob) | **GET** /jobs/{jobId} | Retrieve a Job -*JobsApi* | [**getJobLeverageStats**](docs/JobsApi.md#getJobLeverageStats) | **POST** /jobs/{jobId}/stats | Retrieve Job Leverage Stats -*JobsApi* | [**reactivateJob**](docs/JobsApi.md#reactivateJob) | **POST** /jobs/{jobId}/reactivate | Reactivate a Job -*JobsApi* | [**retrieveAllJobs**](docs/JobsApi.md#retrieveAllJobs) | **GET** /jobs | Retrieve all Jobs -*JobsApi* | [**unarchiveJob**](docs/JobsApi.md#unarchiveJob) | **POST** /jobs/{jobId}/unarchive | Unarchive a Job -*JobsApi* | [**updateJob**](docs/JobsApi.md#updateJob) | **PUT** /jobs/{jobId} | Update a Job -*LanguagesApi* | [**getLanguages**](docs/LanguagesApi.md#getLanguages) | **GET** /languages | Retrieve supported languages -*LexiconApi* | [**queryLexicon**](docs/LexiconApi.md#queryLexicon) | **GET** /lexicon | Query a Lexicon -*LexiconApi* | [**updateLexicon**](docs/LexiconApi.md#updateLexicon) | **POST** /lexicon | Update a Lexicon -*MemoriesApi* | [**createMemory**](docs/MemoriesApi.md#createMemory) | **POST** /memories | Create a Memory -*MemoriesApi* | [**deleteMemory**](docs/MemoriesApi.md#deleteMemory) | **DELETE** /memories | Delete a Memory -*MemoriesApi* | [**getMemory**](docs/MemoriesApi.md#getMemory) | **GET** /memories | Retrieve a Memory -*MemoriesApi* | [**importMemoryFile**](docs/MemoriesApi.md#importMemoryFile) | **POST** /memories/import | File import for a Memory -*MemoriesApi* | [**queryMemory**](docs/MemoriesApi.md#queryMemory) | **GET** /memories/query | Query a Memory -*MemoriesApi* | [**syncDeleteMemory**](docs/MemoriesApi.md#syncDeleteMemory) | **DELETE** /memories/sync | Delete-sync for a Memory -*MemoriesApi* | [**syncDownMemory**](docs/MemoriesApi.md#syncDownMemory) | **GET** /memories/sync | Get-sync for a Memory -*MemoriesApi* | [**syncInsertMemory**](docs/MemoriesApi.md#syncInsertMemory) | **POST** /memories/sync | Insert-sync for a Memory -*MemoriesApi* | [**syncUpdateMemory**](docs/MemoriesApi.md#syncUpdateMemory) | **PUT** /memories/sync | Update-sync for a Memory -*MemoriesApi* | [**updateMemory**](docs/MemoriesApi.md#updateMemory) | **PUT** /memories | Update the name of a Memory -*ProjectsApi* | [**createProject**](docs/ProjectsApi.md#createProject) | **POST** /projects | Create a Project -*ProjectsApi* | [**deleteProject**](docs/ProjectsApi.md#deleteProject) | **DELETE** /projects | Delete a Project -*ProjectsApi* | [**getProjectReport**](docs/ProjectsApi.md#getProjectReport) | **GET** /projects/quote | Retrieve Project report -*ProjectsApi* | [**getProjectRevisionReport**](docs/ProjectsApi.md#getProjectRevisionReport) | **GET** /projects/{id}/revision | Retrieve Project revision report -*ProjectsApi* | [**getProjectStatus**](docs/ProjectsApi.md#getProjectStatus) | **GET** /projects/status | Retrieve Project status -*ProjectsApi* | [**getProjects**](docs/ProjectsApi.md#getProjects) | **GET** /projects | Retrieve a Project -*ProjectsApi* | [**updateProject**](docs/ProjectsApi.md#updateProject) | **PUT** /projects | Update a Project -*QaApi* | [**qaCheck**](docs/QaApi.md#qaCheck) | **GET** /qa | Perform QA check -*RootApi* | [**root**](docs/RootApi.md#root) | **GET** / | Retrieve the REST API root -*SegmentsApi* | [**createSegment**](docs/SegmentsApi.md#createSegment) | **POST** /segments | Create a Segment -*SegmentsApi* | [**deleteSegment**](docs/SegmentsApi.md#deleteSegment) | **DELETE** /segments | Delete a Segment -*SegmentsApi* | [**getSegment**](docs/SegmentsApi.md#getSegment) | **GET** /segments | Retrieve a Segment -*SegmentsApi* | [**tagSegment**](docs/SegmentsApi.md#tagSegment) | **GET** /segments/tag | Tag a Segment -*SegmentsApi* | [**unlockSegments**](docs/SegmentsApi.md#unlockSegments) | **POST** /segments/review/unlock | Unaccept and unlock segments -*SegmentsApi* | [**updateSegment**](docs/SegmentsApi.md#updateSegment) | **PUT** /segments | Update a Segment -*SettingsApi* | [**getOrganizationSettings**](docs/SettingsApi.md#getOrganizationSettings) | **GET** /settings/organization | Get organization-level settings -*SettingsApi* | [**getProjectSettings**](docs/SettingsApi.md#getProjectSettings) | **GET** /settings/project/{projectId} | Get settings for a project -*SettingsApi* | [**getUserSettings**](docs/SettingsApi.md#getUserSettings) | **GET** /settings/user | Get settings for the authenticated user -*SettingsApi* | [**upsertSetting**](docs/SettingsApi.md#upsertSetting) | **POST** /settings | Update or create a setting -*TranslateApi* | [**batchTranslateFile**](docs/TranslateApi.md#batchTranslateFile) | **POST** /translate/file | Translate a File -*TranslateApi* | [**downloadFile**](docs/TranslateApi.md#downloadFile) | **GET** /translate/files | Download translated file -*TranslateApi* | [**monitorFileTranslation**](docs/TranslateApi.md#monitorFileTranslation) | **GET** /translate/file | Monitor file translation -*TranslateApi* | [**registerSegment**](docs/TranslateApi.md#registerSegment) | **GET** /translate/register | Register a segment -*TranslateApi* | [**translateSegment**](docs/TranslateApi.md#translateSegment) | **GET** /translate | Translate a segment +*CreateApi* | [**deleteLiltCreateContent**](docs/CreateApi.md#deleteLiltCreateContent) | **DELETE** /v2/create/{contentId} | Delete Lilt Create content +*CreateApi* | [**generateLiltCreateContent**](docs/CreateApi.md#generateLiltCreateContent) | **POST** /v2/create | Generate new Lilt Create content +*CreateApi* | [**getLiltCreateById**](docs/CreateApi.md#getLiltCreateById) | **GET** /v2/create/{contentId} | Get Lilt Create content by ID. +*CreateApi* | [**getLiltCreateContent**](docs/CreateApi.md#getLiltCreateContent) | **GET** /v2/create | Get Lilt Create content +*CreateApi* | [**getLiltCreatePreferences**](docs/CreateApi.md#getLiltCreatePreferences) | **GET** /v2/create/preferences | Get Lilt Create preferences +*CreateApi* | [**regenerateLiltCreateContent**](docs/CreateApi.md#regenerateLiltCreateContent) | **GET** /v2/create/{contentId}/create | Regenerate Lilt Create content +*CreateApi* | [**signLiltCreateTerms**](docs/CreateApi.md#signLiltCreateTerms) | **POST** /v2/create/terms-and-conditions | Sign the Lilt Create terms and conditions +*CreateApi* | [**updateLiltCreateContent**](docs/CreateApi.md#updateLiltCreateContent) | **PUT** /v2/create/{contentId} | Update Lilt Create content +*CreateApi* | [**updateLiltCreatePreferences**](docs/CreateApi.md#updateLiltCreatePreferences) | **PUT** /v2/create/preferences | Update Lilt Create preferences +*DocumentsApi* | [**downloadDocument**](docs/DocumentsApi.md#downloadDocument) | **GET** /v2/documents/files | Download a Document +*DocumentsApi* | [**uploadDocument**](docs/DocumentsApi.md#uploadDocument) | **POST** /v2/documents/files | Upload a File +*FilesApi* | [**addLabel**](docs/FilesApi.md#addLabel) | **POST** /v2/files/labels | Add Label to File +*FilesApi* | [**deleteFile**](docs/FilesApi.md#deleteFile) | **DELETE** /v2/files | Delete a File +*FilesApi* | [**download**](docs/FilesApi.md#download) | **GET** /v2/files/download | Download file +*FilesApi* | [**getFiles**](docs/FilesApi.md#getFiles) | **GET** /v2/files | Retrieve a File +*FilesApi* | [**removeLabel**](docs/FilesApi.md#removeLabel) | **DELETE** /v2/files/labels | Remove Label from File +*FilesApi* | [**uploadFile**](docs/FilesApi.md#uploadFile) | **POST** /v2/files | Upload a File +*JobsApi* | [**archiveJob**](docs/JobsApi.md#archiveJob) | **POST** /v2/jobs/{jobId}/archive | Archive a Job +*JobsApi* | [**createJob**](docs/JobsApi.md#createJob) | **POST** /v2/jobs | Create a Job +*JobsApi* | [**deleteJob**](docs/JobsApi.md#deleteJob) | **DELETE** /v2/jobs/{jobId} | Delete a Job +*JobsApi* | [**deliverJob**](docs/JobsApi.md#deliverJob) | **POST** /v2/jobs/{jobId}/deliver | Deliver a Job +*JobsApi* | [**downloadJob**](docs/JobsApi.md#downloadJob) | **GET** /v2/jobs/{jobId}/downlod | Download a Job +*JobsApi* | [**exportJob**](docs/JobsApi.md#exportJob) | **GET** /v2/jobs/{jobId}/export | Export a Job +*JobsApi* | [**getJob**](docs/JobsApi.md#getJob) | **GET** /v2/jobs/{jobId} | Retrieve a Job +*JobsApi* | [**getJobLeverageStats**](docs/JobsApi.md#getJobLeverageStats) | **POST** /v2/jobs/{jobId}/stats | Retrieve Job Leverage Stats +*JobsApi* | [**reactivateJob**](docs/JobsApi.md#reactivateJob) | **POST** /v2/jobs/{jobId}/reactivate | Reactivate a Job +*JobsApi* | [**retrieveAllJobs**](docs/JobsApi.md#retrieveAllJobs) | **GET** /v2/jobs | Retrieve all Jobs +*JobsApi* | [**unarchiveJob**](docs/JobsApi.md#unarchiveJob) | **POST** /v2/jobs/{jobId}/unarchive | Unarchive a Job +*JobsApi* | [**updateJob**](docs/JobsApi.md#updateJob) | **PUT** /v2/jobs/{jobId} | Update a Job +*LanguagesApi* | [**getLanguages**](docs/LanguagesApi.md#getLanguages) | **GET** /v2/languages | Retrieve supported languages +*MemoriesApi* | [**createMemory**](docs/MemoriesApi.md#createMemory) | **POST** /v2/memories | Create a Memory +*MemoriesApi* | [**deleteMemory**](docs/MemoriesApi.md#deleteMemory) | **DELETE** /v2/memories | Delete a Memory +*MemoriesApi* | [**deleteSegmentFromMemory**](docs/MemoriesApi.md#deleteSegmentFromMemory) | **DELETE** /v2/memories/segment | Delete a segment from a memory. +*MemoriesApi* | [**downloadTermbase**](docs/MemoriesApi.md#downloadTermbase) | **GET** /v2/memories/termbase/download | Termbase download for a Memory +*MemoriesApi* | [**exportTermbase**](docs/MemoriesApi.md#exportTermbase) | **POST** /v2/memories/termbase/export | Termbase export for a Memory +*MemoriesApi* | [**getMemory**](docs/MemoriesApi.md#getMemory) | **GET** /v2/memories | Retrieve a Memory +*MemoriesApi* | [**importMemoryFile**](docs/MemoriesApi.md#importMemoryFile) | **POST** /v2/memories/import | File import for a Memory +*MemoriesApi* | [**queryMemory**](docs/MemoriesApi.md#queryMemory) | **GET** /v2/memories/query | Query a Memory +*MemoriesApi* | [**updateMemory**](docs/MemoriesApi.md#updateMemory) | **PUT** /v2/memories | Update the name of a Memory +*ProjectsApi* | [**createProject**](docs/ProjectsApi.md#createProject) | **POST** /v2/projects | Create a Project +*ProjectsApi* | [**deleteProject**](docs/ProjectsApi.md#deleteProject) | **DELETE** /v2/projects | Delete a Project +*ProjectsApi* | [**getProjects**](docs/ProjectsApi.md#getProjects) | **GET** /v2/projects | Retrieve a Project +*TranslateApi* | [**batchTranslateFile**](docs/TranslateApi.md#batchTranslateFile) | **POST** /v2/translate/file | Translate a File +*TranslateApi* | [**downloadFile**](docs/TranslateApi.md#downloadFile) | **GET** /v2/translate/files | Download translated file +*TranslateApi* | [**monitorFileTranslation**](docs/TranslateApi.md#monitorFileTranslation) | **GET** /v2/translate/file | Monitor file translation +*TranslateApi* | [**translateSegmentPost**](docs/TranslateApi.md#translateSegmentPost) | **POST** /v2/translate | Translate a segment ## Documentation for Models - [AddFileLabelRequest](docs/AddFileLabelRequest.md) - - [Annotation](docs/Annotation.md) - - [ApiRoot](docs/ApiRoot.md) - - [Comment](docs/Comment.md) - - [CommentBody](docs/CommentBody.md) - - [CommentDeleteResponse](docs/CommentDeleteResponse.md) - - [Connector](docs/Connector.md) - - [ConnectorArguments](docs/ConnectorArguments.md) - - [ConnectorDeleteResponse](docs/ConnectorDeleteResponse.md) - - [ConnectorJob](docs/ConnectorJob.md) - - [ConverterConfigUpdateResponse](docs/ConverterConfigUpdateResponse.md) - [CreateConverterConfigParameters](docs/CreateConverterConfigParameters.md) - - [DocumentAssignmentParameters](docs/DocumentAssignmentParameters.md) - - [DocumentAssignmentResponse](docs/DocumentAssignmentResponse.md) - - [DocumentComments](docs/DocumentComments.md) - - [DocumentDeleteResponse](docs/DocumentDeleteResponse.md) - - [DocumentDoneUpdateParameters](docs/DocumentDoneUpdateParameters.md) - - [DocumentDoneUpdateParameters1](docs/DocumentDoneUpdateParameters1.md) - - [DocumentDoneUpdateParameters2](docs/DocumentDoneUpdateParameters2.md) - - [DocumentParameters](docs/DocumentParameters.md) - - [DocumentPretranslateParameters](docs/DocumentPretranslateParameters.md) - - [DocumentPretranslateResponse](docs/DocumentPretranslateResponse.md) - - [DocumentPretranslating](docs/DocumentPretranslating.md) - - [DocumentPretranslatingStatus](docs/DocumentPretranslatingStatus.md) - - [DocumentQuote](docs/DocumentQuote.md) - - [DocumentUpdateParameters](docs/DocumentUpdateParameters.md) + - [DeleteSegmentFromMemoryResponse](docs/DeleteSegmentFromMemoryResponse.md) - [DocumentWithSegments](docs/DocumentWithSegments.md) - [DocumentWithoutSegments](docs/DocumentWithoutSegments.md) - [DocumentWithoutSegmentsStatus](docs/DocumentWithoutSegmentsStatus.md) - - [EditFilterMappingParameters](docs/EditFilterMappingParameters.md) - [Error](docs/Error.md) - [FileDeleteResponse](docs/FileDeleteResponse.md) - [InlineResponse200](docs/InlineResponse200.md) @@ -268,60 +203,32 @@ Class | Method | HTTP request | Description - [JobCreateParameters](docs/JobCreateParameters.md) - [JobDeleteResponse](docs/JobDeleteResponse.md) - [JobLeverageStats](docs/JobLeverageStats.md) - - [JobLeverageStatsProjects](docs/JobLeverageStatsProjects.md) - [JobProject](docs/JobProject.md) - [JobStats](docs/JobStats.md) - [JobUpdateParameters](docs/JobUpdateParameters.md) - [LanguagePair](docs/LanguagePair.md) - [LanguagesResponse](docs/LanguagesResponse.md) - - [LexiconEntry](docs/LexiconEntry.md) - - [LexiconEntryExamples](docs/LexiconEntryExamples.md) - - [LexiconEntrySourceSpan](docs/LexiconEntrySourceSpan.md) - - [LexiconEntryTargetSpan](docs/LexiconEntryTargetSpan.md) - - [LexiconEntryTranslations](docs/LexiconEntryTranslations.md) - - [LexiconUpdateParameters](docs/LexiconUpdateParameters.md) - - [LexiconUpdateResponse](docs/LexiconUpdateResponse.md) - - [MatchBand](docs/MatchBand.md) + - [LiltCreateContent](docs/LiltCreateContent.md) - [Memory](docs/Memory.md) - [MemoryCreateParameters](docs/MemoryCreateParameters.md) - [MemoryDeleteResponse](docs/MemoryDeleteResponse.md) - [MemoryImportResponse](docs/MemoryImportResponse.md) - - [MemoryInsertResponse](docs/MemoryInsertResponse.md) - - [MemorySyncDeleteResponse](docs/MemorySyncDeleteResponse.md) - [MemoryUpdateParameters](docs/MemoryUpdateParameters.md) - - [MemoryUpdateResponse](docs/MemoryUpdateResponse.md) - [Project](docs/Project.md) - [ProjectCreateParameters](docs/ProjectCreateParameters.md) - [ProjectDeleteResponse](docs/ProjectDeleteResponse.md) - - [ProjectQuote](docs/ProjectQuote.md) - - [ProjectStatus](docs/ProjectStatus.md) - - [ProjectUpdateResponse](docs/ProjectUpdateResponse.md) - - [QARuleMatches](docs/QARuleMatches.md) - - [QARuleMatchesContext](docs/QARuleMatchesContext.md) - - [QARuleMatchesCustomRules](docs/QARuleMatchesCustomRules.md) - - [QARuleMatchesMatches](docs/QARuleMatchesMatches.md) - - [QARuleMatchesReplacements](docs/QARuleMatchesReplacements.md) - - [QARuleMatchesRule](docs/QARuleMatchesRule.md) - - [QARuleMatchesRuleCategory](docs/QARuleMatchesRuleCategory.md) - - [QARuleMatchesRuleUrls](docs/QARuleMatchesRuleUrls.md) - - [ResourceStatus](docs/ResourceStatus.md) + - [ProjectStats](docs/ProjectStats.md) + - [SDLXLIFFFilter](docs/SDLXLIFFFilter.md) - [Segment](docs/Segment.md) - - [SegmentCreateParameters](docs/SegmentCreateParameters.md) - - [SegmentDeleteResponse](docs/SegmentDeleteResponse.md) - - [SegmentDoneResponse](docs/SegmentDoneResponse.md) - - [SegmentUpdateParameters](docs/SegmentUpdateParameters.md) - - [SegmentWithComments](docs/SegmentWithComments.md) - - [Setting](docs/Setting.md) - - [SettingUpsertBody](docs/SettingUpsertBody.md) - - [SettingUpsertResponse](docs/SettingUpsertResponse.md) + - [SignLiltCreateTermsResponse](docs/SignLiltCreateTermsResponse.md) - [SourceFile](docs/SourceFile.md) - - [TaggedSegment](docs/TaggedSegment.md) - - [TranslateRegisterResponse](docs/TranslateRegisterResponse.md) + - [TermbaseExportResponse](docs/TermbaseExportResponse.md) - [TranslateSegmentBody](docs/TranslateSegmentBody.md) - [Translation](docs/Translation.md) - [TranslationInfo](docs/TranslationInfo.md) - [TranslationList](docs/TranslationList.md) - [TranslationMemoryEntry](docs/TranslationMemoryEntry.md) + - [WorkflowStageAssignment](docs/WorkflowStageAssignment.md) ## Documentation for Authorization diff --git a/api/openapi.yaml b/api/openapi.yaml index 55059895f..7e91f26d3 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -3,7 +3,7 @@ info: contact: email: support@lilt.com name: Lilt REST API Support - url: https://lilt.com/docs/api + url: https://developers.lilt.com/ description: | The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation @@ -13,70 +13,70 @@ info: * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. + ## Authentication + Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + + ## Quotas + + Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. title: Lilt REST API - version: v2.0 + version: v3.0 servers: -- url: https://lilt.com/2 +- url: https://api.lilt.com/ security: - ApiKeyAuth: [] - BasicAuth: [] paths: - /: + /v2/languages: get: description: |+ - This resource does not have any attributes. It lists the name of the - REST API. - - This endpoint can be used to verify REST API keys and to check the - availability of the REST API. + Get a list of supported languages. - operationId: root + operationId: getLanguages responses: "200": content: application/json: schema: - $ref: '#/components/schemas/ApiRoot' - description: A status object. + $ref: '#/components/schemas/LanguagesResponse' + description: An object listing supported languages and their corresponding + locales. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Retrieve the REST API root + summary: Retrieve supported languages tags: - - Root + - Languages x-accepts: application/json - /files: + /v2/memories: delete: - description: |+ - Delete a File. - - Example CURL command: - ``` - curl -X DELETE https://lilt.com/2/files?key=API_KEY&id=123 ``` - - operationId: deleteFile + description: | + Delete a Memory. + operationId: deleteMemory parameters: - - description: A unique File identifier. + - description: A unique Memory identifier. + explode: true in: query name: id required: true schema: type: integer + style: form responses: - "204": + "200": content: application/json: schema: - $ref: '#/components/schemas/FileDeleteResponse' + $ref: '#/components/schemas/MemoryDeleteResponse' description: A status object. default: content: @@ -84,36 +84,23 @@ paths: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Delete a File + summary: Delete a Memory tags: - - Files + - Memories x-accepts: application/json get: - description: |- - Retrieves one or more files available to your user. Files are not associated with a project or a memory. They are unprocessed and can be used later in the project/document creation workflow step. - - To retrieve a specific file, specify the id request parameter. To retrieve all files, omit the id request parameter. + description: |+ + Retrieve a Memory. If you cannot access the Memory (401 error) please check permissions (e.g. in case you created the Memory via the web app with a different account you may have to explicitly share that Memory). - Example CURL command: - ``` - curl -X GET https://lilt.com/2/files?key=API_KEY&id=274``` - operationId: getFiles + operationId: getMemory parameters: - - description: A unique File identifier. + - description: An optional Memory identifier. + explode: true in: query name: id + required: false schema: type: integer - - description: | - One or more labels. This will return the files which contain all of - the given labels. - explode: false - in: query - name: labels - schema: - items: - type: string - type: array style: form responses: "200": @@ -121,245 +108,317 @@ paths: application/json: schema: items: - $ref: '#/components/schemas/SourceFile' - title: FilesList + $ref: '#/components/schemas/Memory' + title: MemoryResponse type: array - description: A list of files. - "403": - content: {} - description: Unauthorized. - "410": - content: {} - description: File deleted. + description: A list of Memory objects. default: content: application/json: schema: $ref: '#/components/schemas/Error' - description: Unexpected error. - summary: Retrieve a File + description: Unexpected error + summary: Retrieve a Memory tags: - - Files + - Memories x-accepts: application/json post: description: |+ - Upload a File in any of the formats [documented in our knowledge - base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). - Request parameters should be passed in as query string parameters. - - Example CURL command: - ``` - curl -X POST https://lilt.com/2/files?key=API_KEY&name=en_US.json \ - --header "Content-Type: application/octet-stream" \ - --data-binary @en_US.json - ``` - Calls to GET /files are used to monitor the language detection results. The API response will be augmented to include detected language and confidence score. - - The language detection will complete asynchronously. Prior to completion, the `detected_lang` value will be `zxx`, the reserved ISO 639-2 code for "No linguistic content/not applicable". + Create a new Memory. A Memory is a container that collects source/target + sentences for a specific language pair (e.g., English>French). The data + in the Memory is used to train the MT system, populate the TM, and + update the lexicon. Memories are private to your account - the data is + not shared across users - unless you explicitly share a Memory with your + team (via web app only). - If the language can not be determined, or the detection process fails, the `detected_lang` field will return `und`, the reserved ISO 639-2 code for undetermined language, and the `detected_lang_confidence` score will be `0`. + Refer + to our KB for a more detailed description. - operationId: uploadFile - parameters: - - description: A file name. - in: query - name: name + operationId: createMemory + requestBody: + $ref: '#/components/requestBodies/MemoryCreateParameters' + content: + application/json: + schema: + example: + trglocale: FR + name: automotive + srclang: en + srclocale: US + trglang: fr + properties: + name: + description: A name for the Memory. + example: automotive + type: string + srclang: + description: An ISO 639-1 language identifier. + example: en + type: string + trglang: + description: An ISO 639-1 language identifier. + example: fr + type: string + srclocale: + description: An ISO 3166-1 region name for language locales + example: US + type: string + trglocale: + description: An ISO 3166-1 region name for language locales + example: FR + type: string + required: + - name + - srclang + - trglang + title: MemoryCreateParameters + type: object + description: The Memory resource to create. required: true - schema: - type: string - - description: A hash value to associate with the file. The MD5 hash of the - body contents will be used by default if a value isn't provided. - in: query - name: file_hash - schema: - type: string - - description: Flag indicating whether to perform language detection on the - uploaded file. Default is false. - in: query - name: langId - schema: - type: boolean - - description: The project to associate the uploaded file with. - in: query - name: project_id - schema: - type: integer - - description: The category of the file. The options are `REFERENCE`, or `API`. - The default is API. Files with the `REFERENCE` category will be displayed - as reference material. - in: query - name: category - schema: - type: string - - description: Comma-separated list of labels to add to the uploaded document. - in: query - name: labels - schema: - type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Memory' + description: A Memory object. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Create a Memory + tags: + - Memories + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + put: + description: | + Update a Memory. + operationId: updateMemory requestBody: + $ref: '#/components/requestBodies/MemoryUpdateParameters' content: - application/octet-stream: + application/json: schema: - example: |- - - - ... - - format: binary - title: FileUploadBody - type: string - description: The file contents to be uploaded. The entire POST body will be - treated as the file. + example: + name: Automotive Memory + id: 7246 + properties: + id: + description: A unique Memory identifier. + example: 7246 + type: integer + name: + description: The Memory name. + example: Automotive Memory + type: string + required: + - id + - name + title: MemoryUpdateParameters + type: object + description: The Memory resource to update. required: true responses: - "201": + "200": content: application/json: schema: - $ref: '#/components/schemas/SourceFile' - description: A SourceFile object. + $ref: '#/components/schemas/Memory' + description: A Memory object. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Upload a File + summary: Update the name of a Memory tags: - - Files + - Memories x-codegen-request-body-name: body - x-contentType: application/octet-stream + x-contentType: application/json x-accepts: application/json - /files/download: + /v2/memories/query: get: - description: | - Download a File. + description: |+ + Perform a translation memory query. - Example CURL: - ``` - curl --X --request GET 'https://lilt.com/2/files/download?key=API_KEY&id=1' - ``` - operationId: download + operationId: queryMemory parameters: - - description: A File id. + - description: A unique Memory identifier. + explode: true in: query name: id required: true + schema: + type: integer + style: form + - description: A source query. + explode: true + in: query + name: query + required: true schema: type: string - responses: - "200": - content: - application/octet-stream: - schema: - format: byte - title: DocumentDownloadResponse - type: string - description: A file. - summary: Download file - tags: - - Files - x-accepts: application/octet-stream - /files/labels: - delete: - description: | - Remove a label from a File. - - Example CURL: - ``` - curl --X --request DELETE 'https://lilt.com/2/files/labels?key=API_KEY&id=1&name=label_name' - ``` - operationId: removeLabel - parameters: - - description: A File id. - in: query - name: id - required: true - schema: - type: string - - description: A label name. + style: form + - description: Maximum number of results to return. + explode: true in: query - name: name - required: true + name: "n" + required: false schema: - type: string + default: 10 + type: integer + style: form responses: - "204": - content: {} - description: A success response. - summary: Remove Label from File + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/TranslationMemoryEntry' + title: MemoryQueryResponse + type: array + description: A list of TranslationMemoryEntry objects. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Query a Memory tags: - - Files + - Memories x-accepts: application/json + /v2/memories/import: post: - description: | - Add a label to a File. + description: |+ + Imports common translation memory or termbase file formats to a specific Lilt memory. Currently supported file formats are `*.tmx`, `*.sdltm`, `*.sdlxliff`(With custom Filters), '*.xliff', and `*.tmq` for TM data; `*.csv` and `*.tbx` for termbase data. Request parameters should be passed as JSON object with the header field `LILT-API`. - Example CURL: + Example CURL command to upload a translation memory file named `my_memory.sdltm` in the current working directory: ``` - curl --X --request POST 'https://lilt.com/2/files/labels?key=API_KEY&id=1' - --header 'Content-Type: application/json' \ - --data-raw '{ - "name": "label_name" - }' + curl -X POST https://api.lilt.com/v2/memories/import?key=API_KEY \ + --header "LILT-API: {\"name\": \"my_memory.sdltm\",\"memory_id\": 42}" \ + --header "Content-Type: application/octet-stream" \ + --data-binary @my_memory.sdltm ``` - operationId: addLabel + + Example CURL command to upload a translation memory file named `my_memory.sdlxliff` in the current working directory, with Custom Filters based on SDLXLIFF fields, conf_name which maps to, percentage, and whether we should ignore unlocked segments. + ``` + curl -X POST https://api.lilt.com/v2/memories/import?key=API_KEY \ + --header "LILT-API: {\"name\": \"my_memory.sdlxliff\",\"memory_id\": 12,\"sdlxliff_filters\":[{\"conf_name\": \"Translated\", \"percentage\": 100, \"allow_unlocked\": false}]"}" \ + --header "Content-Type: application/octet-stream" \ + --data-binary @my_memory.sdlxliff + + + operationId: importMemoryFile parameters: - - description: A File id. - in: query - name: id + - description: A unique Memory identifier. + explode: false + in: header + name: memory_id + required: true + schema: + type: integer + style: simple + - description: Name of the TM or termbase file. + explode: false + in: header + name: name required: true schema: type: string + style: simple + - description: Contains Filter information Unique to SDLXLIFF + explode: false + in: header + name: sdlxliff_filters + required: false + schema: + items: + $ref: '#/components/schemas/SDLXLIFFFilter' + type: array + style: simple + - description: A flag indicating whether an imported Termbase CSV has a header + row or not (the default value is `false`). + explode: false + in: header + name: has_header_row + required: false + schema: + type: boolean + style: simple + - description: | + A flag indicating whether or not to skip the import of segments + which already exist in the memory. (the default value is `false`). + explode: false + in: header + name: skip_duplicates + required: false + schema: + type: boolean + style: simple requestBody: - $ref: '#/components/requestBodies/AddFileLabelRequest' content: - application/json: + application/octet-stream: schema: - example: - name: label_name - properties: - name: - description: The Label name. - example: label_name - type: string - title: AddFileLabelRequest - type: object - description: A label name. + format: binary + title: MemoryImportBody + type: string + description: The file contents to be uploaded. The entire POST body will be + treated as the file. required: true responses: - "204": - content: {} - description: A success response. - summary: Add Label to File + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MemoryImportResponse' + description: A status object. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: File import for a Memory tags: - - Files - x-codegen-request-body-name: name - x-contentType: application/json + - Memories + x-codegen-request-body-name: body + x-contentType: application/octet-stream x-accepts: application/json - /comments: - delete: + /v2/memories/termbase/export: + post: description: | - Delete a Comment. + Exports the termbase entries for the given memory into a CSV file. + + Calling this endpoint will begin the export process in the background. + Check that the processing is complete by polling the `GET /2/memories` + endpoint. When the `is_processing` value is 0 then call the + `POST /2/memories/termbase/download` endpoint. - Example CURL command: ``` - curl -X DELETE https://lilt.com/2/comments?key=API_KEY&comment_id=123 + curl -X POST https://api.lilt.com/v2/memories/termbase/export?key=API_KEY&id=ID ``` - operationId: deleteComment + operationId: exportTermbase parameters: - - description: A unique Comment identifier. + - description: A unique Memory identifier. + explode: true in: query - name: comment_id + name: id required: true schema: type: integer + style: form responses: - "204": + "200": content: application/json: schema: - $ref: '#/components/schemas/CommentDeleteResponse' + $ref: '#/components/schemas/TermbaseExportResponse' description: A status object. default: content: @@ -367,1511 +426,1329 @@ paths: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Delete a Comment + summary: Termbase export for a Memory tags: - - Comments + - Memories x-accepts: application/json + /v2/memories/termbase/download: get: description: | - Retrieves all comments associated with a specified document, grouped by their Segment's ID. + Downloads the termbase export for the given memory as a CSV file. - To retrieve a document's comments, specify the document_id request parameter. + Ensure you first call the `/2/memories/termbase/export` endpoint to + start the export process before you try to download it. - Example CURL command: ``` - curl -X GET https://lilt.com/2/comments?key=API_KEY&document_id=123 + curl -X GET https://api.lilt.com/v2/memories/termbase/download?key=API_KEY&id=ID ``` - operationId: getDocumentComments + operationId: downloadTermbase parameters: - - description: A unique document identifier. + - description: A unique Memory identifier. + explode: true in: query - name: document_id + name: id required: true schema: type: integer + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/DocumentComments' - description: An object containing lists of comments identified by the id - of the segment to which they belong. - "403": - content: {} - description: Unauthorized. - "410": - content: {} - description: Comment deleted. + format: byte + title: TermbaseDownloadResponse + type: string + description: A file. default: content: application/json: schema: $ref: '#/components/schemas/Error' - description: Unexpected error. - summary: Retrieve a document's comments by segment + description: Unexpected error + summary: Termbase download for a Memory tags: - - Comments + - Memories x-accepts: application/json - post: - description: Create a new comment for the specified Segment ID. - operationId: createComment + /v2/memories/segment: + delete: + description: | + Delete a segment from a memory. + + ``` + curl -X DELETE https://api.lilt.com/v2/memories/segment?key=API_KEY&id=ID&segment_id=$SEGMENT_ID + ``` + operationId: deleteSegmentFromMemory parameters: - - description: A unique document identifier. + - description: A unique Memory identifier. + explode: true in: query - name: document_id + name: id required: true schema: type: integer - - description: A unique segment identifier. + style: form + - description: A unique Segment identifier. + explode: true in: query name: segment_id required: true schema: type: integer - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CommentBody' - description: The comment being created - required: true + style: form responses: - "201": + "200": content: application/json: schema: - $ref: '#/components/schemas/Comment' - description: A Comment object. + $ref: '#/components/schemas/DeleteSegmentFromMemoryResponse' + description: A success resposne. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Create a new comment + summary: Delete a segment from a memory. tags: - - Comments - x-codegen-request-body-name: body - x-contentType: application/json + - Memories x-accepts: application/json - put: - description: Update an existing comment. - operationId: updateComment - parameters: - - description: A unique comment identifier. - in: query - name: comment_id - required: true - schema: - type: integer - - description: A unique document identifier. - in: query - name: document_id - required: true - schema: - type: integer + /v2/translate: + post: + description: |+ + Translate a source string. + + Setting the `rich` parameter to `true` will change the response format + to include additional information about each translation including a + model score, word alignments, and formatting information. The rich + format can be seen in the example response on this page. + + By default, this endpoint also returns translation memory (TM) fuzzy matches, along + with associated scores. Fuzzy matches always appear ahead of machine translation + output in the response. + + The maximum source length is 5,000 characters. + + Usage charges apply to this endpoint for production REST API keys. + + operationId: translateSegmentPost requestBody: + $ref: '#/components/requestBodies/TranslateSegmentBody' content: application/json: schema: - $ref: '#/components/schemas/CommentBody' - description: The comment being updated. - required: true + example: + memory_id: 0 + tm_matches: true + prefix: prefix + containsICUData: false + rich: false + source: source + source_hash: 6 + n: 1 + project_tags: false + properties: + source: + description: A unique Segment identifier. + type: string + memory_id: + description: A unique Memory identifier. + type: integer + source_hash: + description: A source hash code. + type: integer + n: + description: Return top n translations (deprecated). + type: integer + prefix: + description: A target prefix + type: string + rich: + default: false + description: Returns rich translation information (e.g., with word + alignments). + type: boolean + tm_matches: + default: true + description: Include translation memory fuzzy matches. + type: boolean + project_tags: + default: false + description: Project tags. Projects tags in source to target if + set to true. + type: boolean + containsICUData: + default: false + description: Contains ICU data. If true then tags in the source + following the ICU standard will be parsed and retained. + type: boolean + required: + - memory_id + title: TranslateSegmentBody + type: object + required: false responses: - "201": + "200": content: application/json: schema: - $ref: '#/components/schemas/Comment' - description: A Comment object. + $ref: '#/components/schemas/TranslationList' + description: A TranslationList object. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Update an existing comment + summary: Translate a segment tags: - - Comments + - Translate x-codegen-request-body-name: body x-contentType: application/json x-accepts: application/json - /connectors: - delete: + /v2/translate/file: + get: description: |+ - Delete a Connector. + Get information about the one or more Files that are being translated with machine translation. Query filters are optional but at least one must be provided. - Example CURL command: + Example CURL: + ``` + curl --X --request GET 'https://api.lilt.com/v2/translate/file?key=API_KEY&translationIds=1,2&fromTime=1607966744&toTime=1707966744&status=InProgress' ``` - curl -X DELETE https://lilt.com/2/connectors?key=API_KEY&id=123 ``` - operationId: deleteConnector + operationId: monitorFileTranslation parameters: - - description: A unique Connector identifier. + - description: List of translation ids, comma separated + explode: true in: query - name: id - required: true + name: translationIds + required: false schema: - type: integer + type: string + style: form + - description: One of the translation statuses - `InProgress`, `Completed`, + `Failed`, `ReadyForDownload` + explode: true + in: query + name: status + required: false + schema: + type: string + style: form + - description: Results after this time (inclusive) will be returned, specified + as seconds since the Unix epoch. + explode: true + in: query + name: fromTime + required: false + schema: + type: number + style: form + - description: Results before this time (exclusive) will be returned, specified + as seconds since the Unix epoch. + explode: true + in: query + name: toTime + required: false + schema: + type: number + style: form responses: - "204": + "200": content: application/json: schema: - $ref: '#/components/schemas/ConnectorDeleteResponse' - description: A status object. + $ref: '#/components/schemas/TranslationInfo' + description: Translation info default: content: application/json: schema: - $ref: '#/components/schemas/Error' + $ref: '#/components/schemas/MonitorFileTranslationTypeError' description: Unexpected error - summary: Delete a Connector + summary: Monitor file translation tags: - - Connectors + - Translate x-accepts: application/json - get: - description: |- - Retrieves one or more connectors available to your user. Connectors are not associated with a project or a memory. - - To retrieve a specific connector, specify the id request parameter. To retrieve all connectors, omit the id request parameter. + post: + description: |+ + Start machine translation of one or more Files that have previously been uploaded. The response will include an `id` parameter that can be used to monitor and download the translations in subsequent calls. - Example CURL command: + Example CURL: ``` - curl -X GET https://lilt.com/2/connectors?key=API_KEY&id=274``` - operationId: getConnectors + curl --X --request POST 'https://api.lilt.com/v2/translate/file?key=API_KEY&fileId=583&memoryId=2495&configId=123&withTM=true' + ``` + + operationId: batchTranslateFile parameters: - - description: A unique Connector identifier. + - description: List of File ids to be translated, comma separated. + explode: true in: query - name: id + name: fileId + required: true schema: - type: integer + type: string + style: form + - description: Id of Memory to use in translation. + explode: true + in: query + name: memoryId + required: true + schema: + type: string + style: form + - description: An optional pararameter to specify an import configuration to + be applied when extracting translatable content from this file. + explode: true + in: query + name: configId + required: false + schema: + type: number + style: form + - description: An optional boolean parameter to toggle the use of Translation + Memory in the translation of the file. + explode: true + in: query + name: withTM + required: false + schema: + type: boolean + style: form responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/Connector' - title: ConnectorsList - type: array - description: A list of Connectors. - "403": - content: {} - description: Unauthorized. - "410": - content: {} - description: Connector deleted. + $ref: '#/components/schemas/TranslationInfo' + description: Translation info default: content: application/json: schema: $ref: '#/components/schemas/Error' - description: Unexpected error. - summary: Retrieve a Connector + description: Unexpected error + summary: Translate a File tags: - - Connectors + - Translate x-accepts: application/json - post: - description: | - Create a new connector linked to a supported external cms. - operationId: createConnector - requestBody: - $ref: '#/components/requestBodies/connector' - content: - application/json: - schema: - properties: - name: - description: Name of connector. - type: string - args: - description: Connector parameters. - properties: {} - type: object - schedule: - description: Cron string - example: 0 0 * * * - type: string - title: connector - type: object - description: Connector arguments. + /v2/translate/files: + get: + description: |+ + Download a translated File. + + Example CURL: + ``` + curl --X --request GET 'https://api.lilt.com/v2/translate/files?key=API_KEY&id=1' + ``` + + operationId: downloadFile + parameters: + - description: A translation id. + explode: true + in: query + name: id required: true + schema: + type: string + style: form responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/Connector' - description: A Connector object. - default: + "200": content: - application/json: + application/octet-stream: schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Upload a Connector + format: byte + title: DocumentDownloadResponse + type: string + description: A file. + summary: Download translated file tags: - - Connectors - x-codegen-request-body-name: body - x-contentType: application/json - x-accepts: application/json - put: - description: | - Create a new connector linked to a supported external content source. - operationId: updateConnector + - Translate + x-accepts: application/octet-stream + /v2/create/terms-and-conditions: + post: + description: |+ + Lilt Create requires that the terms and conditions are signed first + before using it. The terms and conditions can be signed by using this + endpoint. + + Example CURL: + ``` + curl --X --request POST 'https://api.lilt.com/v2/create/terms-and-conditions?key=API_KEY' \ + --header 'Content-Type: application/json' \ + --data-raw '{"signedAgreement": true}' + ``` + + operationId: signLiltCreateTerms requestBody: - $ref: '#/components/requestBodies/ConnectorArguments' + $ref: '#/components/requestBodies/CreateConverterConfigParameters' content: application/json: schema: example: - args: '{}' - schedule: 0 0 * * * - name: zendesk - id: 46530 + signedAgreement: true properties: - id: - description: A unique Connector identifier. - example: 46530 - type: integer - name: - description: Name of connector. - example: zendesk - type: string - args: - description: Connector parameters. - properties: {} - type: object - schedule: - description: Cron string - example: 0 0 * * * - type: string - title: ConnectorArguments + signedAgreement: + description: Signifies that the Organization has signed the agreement + or not. + type: boolean + required: + - signedAgreement + title: CreateConverterConfigParameters type: object - description: Connector arguments. + description: Whether or not to sign the agreement. required: true responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/Connector' - description: A Connector object. - default: + "200": content: application/json: schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Upload a Connector + $ref: '#/components/schemas/signLiltCreateTermsResponse' + description: | + An object indicating whether the agreement has been signed or not. + summary: Sign the Lilt Create terms and conditions tags: - - Connectors - x-codegen-request-body-name: body + - Create + x-codegen-request-body-name: signedAgreement x-contentType: application/json x-accepts: application/json - /connectors/sync: - post: - description: | - Request an import job for the given connector ID. This will check the - target system for new content to pull into Lilt. + /v2/create: + get: + description: |+ + Get a list of all content that has been generated by Lilt Create. - Example CURL command: + Example CURL: ``` - curl -X GET https://lilt.com/2/connectors/sync?key=API_KEY&id=128 + curl --X --request GET 'https://api.lilt.com/v2/create?key=API_KEY' ``` - operationId: syncConnector - parameters: - - description: A unique Connector identifier. - in: query - name: id - required: true - schema: - type: integer + + operationId: getLiltCreateContent responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/ConnectorJob' - description: A Connector Job object. - default: + "200": content: application/json: schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Sync a Connector + items: + $ref: '#/components/schemas/LiltCreateContent' + type: array + description: An object with a documents next task Workflow metadata. + summary: Get Lilt Create content tags: - - Connectors + - Create x-accepts: application/json - /connectors/jobs: - get: - description: | - Retrieves a connector job available to your user. Use this to check the - status of jobs started by the `/connectors/sync` and - `/connectors/jobs/deliver` endpoints. + post: + description: |+ + Generate new Lilt Create content with the given parameters. - Example CURL command: + Example CURL: ``` - curl -X GET https://lilt.com/2/connectors/jobs?key=API_KEY&id=9274 + curl --X --request POST 'https://api.lilt.com/v2/create?key=API_KEY' \ + --header 'Content-Type: application/json' \ + --data-raw '{ + "language":"en-US", + "template":"blog-post", + "templateParams":{ + "contentLength":"100", + "language":"en-US", + "sections":[], + "summary":"a blog post about hiking" + }, + "preferences":{"tone":"formal","styleguide":""} + }' ``` - operationId: getConnectorJobs - parameters: - - description: A unique Connector Job identifier. - in: query - name: id + + operationId: generateLiltCreateContent + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LiltCreateContent' + description: | + Input parameters that determine what content will be generated. required: true - schema: - type: integer responses: "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/ConnectorJob' - title: ConnectorJobsList - type: array - description: A list of Connector Jobs. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Retrieve a Connector Job + content: {} + description: | + An event stream produced by Server Side Events. The following + events are supported. + - message: an object with the newly generated text (e.g. {"text": "hello"}) + - message: upon completion of events the string "[DONE]" will be emitted + - fullcontent: an object containing the full response + summary: Generate new Lilt Create content tags: - - Connectors + - Create + x-codegen-request-body-name: templateParams + x-contentType: application/json x-accepts: application/json - /connectors/jobs/deliver: - post: - description: | - Request an export job for the given connector job ID. This will check - Lilt for completed projects that are associated with this job and - deliver them to the target system. + /v2/create/preferences: + get: + description: |+ + Get the stored preferences for Lilt Create. - Example CURL command: + Example CURL: ``` - curl -X POST https://lilt.com/2/connectors/jobs/deliver?key=API_KEY&id=9274 + curl --X --request POST 'https://api.lilt.com/v2/create/preferences?key=API_KEY' ``` - operationId: exportConnectorJob - parameters: - - description: A unique Connector Job identifier. - in: query - name: id - required: true - schema: - type: integer + + operationId: getLiltCreatePreferences responses: "200": content: {} - description: A success status code. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Deliver a Connector Job + description: An object describing the stored preferences. + summary: Get Lilt Create preferences tags: - - Connectors - x-accepts: application/json - /configs/converter: - get: - description: | - List all file filter configurations for your Organization. - operationId: getConverterConfigs - parameters: - - description: A unique Organization identifier. - in: query - name: organizationId - required: true - schema: - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ConverterConfigMap' - description: A map of config id to string escaped config json. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: List Converter Configs - tags: - - ConverterConfig + - Create x-accepts: application/json put: - description: | - Add a file filter configuration for your Organization. - operationId: addConverterConfig - parameters: - - description: A unique Organization identifier. - in: query - name: organizationId - required: true - schema: - type: integer + description: |+ + Update the stored preferences for Lilt Create. + + Example CURL: + ``` + curl --X --request PUT + 'https://api.lilt.com/v2/create/preferences?key=API_KEY' \ + --header 'Content-Type: application/json' \ + --data-raw '{"tone": "formal", "styleguide": ""}' + ``` + + operationId: updateLiltCreatePreferences requestBody: - $ref: '#/components/requestBodies/CreateConverterConfigParameters' content: application/json: schema: - example: - configName: my_config - configJson: '{"registry": {".md": {"type": "OkapiFprm", "version": - 1, "filterName": "okf_markdown", "filterConfig": "#v1\nuseCodeFinder.b=false\ntranslateUrls.b=true\nurlToTranslatePattern=.+\ntranslateCodeBlocks.b=false\ntranslateInlineCodeBlocks.b=true\ntranslateHeaderMetadata.b=true\ntranslateImageAltText.b=true\nuseLinkSubflow.b=true\ncodeFinderRules.count.i=1\ncodeFinderRules.rule0=\\{\\{[^}]+\\}\\}\ncodeFinderRules.sample={{#test}} - handle bar test {{/test}}$0a${{stand-alone handle bar}}$0a$\ncodeFinderRules.useAllRulesWhenTesting.b=true\n", - "extractAllTags": true, "exportReplacements": {"patterns": [], "replacements": - []}, "importReplacements": {"patterns": [], "replacements": []}}}' - configDescription: config for custom markdown escaping - properties: - configJson: - description: The configuration json blob, string escaped. - example: '{"registry": {".md": {"type": "OkapiFprm", "version": - 1, "filterName": "okf_markdown", "filterConfig": "#v1\nuseCodeFinder.b=false\ntranslateUrls.b=true\nurlToTranslatePattern=.+\ntranslateCodeBlocks.b=false\ntranslateInlineCodeBlocks.b=true\ntranslateHeaderMetadata.b=true\ntranslateImageAltText.b=true\nuseLinkSubflow.b=true\ncodeFinderRules.count.i=1\ncodeFinderRules.rule0=\\{\\{[^}]+\\}\\}\ncodeFinderRules.sample={{#test}} - handle bar test {{/test}}$0a${{stand-alone handle bar}}$0a$\ncodeFinderRules.useAllRulesWhenTesting.b=true\n", - "extractAllTags": true, "exportReplacements": {"patterns": [], - "replacements": []}, "importReplacements": {"patterns": [], "replacements": - []}}}' - type: string - configName: - description: The user defined name of your configuration. - example: my_config - type: string - configDescription: - description: A description for the configuration. - example: config for custom markdown escaping - type: string - required: - - configDescription - - configJson - - configName - title: CreateConverterConfigParameters - type: object - description: The file filter configuration to create. + $ref: '#/components/schemas/LiltCreateContent' + description: Which styleguide to use. required: false responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ConverterConfigUpdateResponse' - description: The config id of the configuration created. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Add Converter Config + content: {} + description: The updated Lilt Create preferences. + summary: Update Lilt Create preferences tags: - - ConverterConfig - x-codegen-request-body-name: body + - Create + x-codegen-request-body-name: styleguide x-contentType: application/json x-accepts: application/json - /configs/converter/{configId}: + /v2/create/{contentId}: delete: - description: | - Delete a file filter configuration by id. - operationId: deleteConverterConfig + description: |+ + Delete a piece of Lilt Create content. + + Example CURL: + ``` + curl --X --request DELETE 'https://api.lilt.com/v2/create/1234?key=API_KEY' + ``` + + operationId: deleteLiltCreateContent parameters: - - description: A unique configuration identifier. + - description: The content ID. + explode: false in: path - name: configId + name: contentId required: true schema: type: integer + style: simple responses: "200": content: application/json: schema: $ref: '#/components/schemas/inline_response_200' - description: The config id of the configuration deleted. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Delete Converter Config + description: The Delete Lilt Create Content Response. + summary: Delete Lilt Create content tags: - - ConverterConfig + - Create x-accepts: application/json get: - description: | - Fetch a file filter configuration by id. - operationId: getConverterConfigById - parameters: - - description: A unique configuration identifier. - in: path - name: configId - required: true - schema: - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ConverterConfigMap' - description: A map of config id to string escaped config json. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Fetch Converter Config by Id - tags: - - ConverterConfig - x-accepts: application/json - /configs/converter/{configId}/{fileExtension}: - delete: - description: | - Delete a file filter mapping by id and file extension. - operationId: deleteFilterMapping + description: |+ + Get Lilt Create content by ID. + + Example CURL: + ``` + curl --X --request GET 'https://api.lilt.com/v2/create/1234?key=API_KEY' + ``` + + operationId: getLiltCreateById parameters: - - description: A unique configuration identifier. + - description: The content ID. + explode: false in: path - name: configId + name: contentId required: true schema: type: integer - - description: A file extension to delete. - in: path - name: fileExtension - required: true - schema: - type: string + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/ConverterConfigMap' - description: A map of config id to string escaped config json. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Delete Filter Mapping + $ref: '#/components/schemas/LiltCreateContent' + description: The Lilt Create content. + summary: Get Lilt Create content by ID. tags: - - ConverterConfig + - Create x-accepts: application/json put: - description: | - Add a specific filter mapping to your file filter configuration - operationId: editFilterMapping + description: |+ + Update a piece of Lilt Create content. + + Example CURL: + ``` + curl --X --request PUT 'https://api.lilt.com/v2/create/1234?key=API_KEY' \ + --header 'Content-Type: application/json' \ + --data-raw '{"language":"de-DE"}' + ``` + + operationId: updateLiltCreateContent parameters: - - description: A unique configuration identifier. + - description: The content ID. + explode: false in: path - name: configId + name: contentId required: true schema: type: integer - - description: A file extension for the filter mapping. - in: path - name: fileExtension - required: true - schema: - type: string + style: simple requestBody: - $ref: '#/components/requestBodies/EditFilterMappingParameters' content: application/json: schema: - example: - configName: my_config - configDescription: config for custom markdown escaping - registryEntryJson: '{"type": "OkapiFprm", "version": 1, "filterName": - "okf_markdown", "filterConfig": "#v1\nuseCodeFinder.b=false\ntranslateUrls.b=true\nurlToTranslatePattern=.+\ntranslateCodeBlocks.b=false\ntranslateInlineCodeBlocks.b=true\ntranslateHeaderMetadata.b=true\ntranslateImageAltText.b=true\nuseLinkSubflow.b=true\ncodeFinderRules.count.i=1\ncodeFinderRules.rule0=\\{\\{[^}]+\\}\\}\ncodeFinderRules.sample={{#test}} - handle bar test {{/test}}$0a${{stand-alone handle bar}}$0a$\ncodeFinderRules.useAllRulesWhenTesting.b=true\n", - "extractAllTags": true, "exportReplacements": {"patterns": [], "replacements": - []}, "importReplacements": {"patterns": [], "replacements": []}' - properties: - registryEntryJson: - description: The filter mapping json blob, string escaped. - example: '{"type": "OkapiFprm", "version": 1, "filterName": "okf_markdown", - "filterConfig": "#v1\nuseCodeFinder.b=false\ntranslateUrls.b=true\nurlToTranslatePattern=.+\ntranslateCodeBlocks.b=false\ntranslateInlineCodeBlocks.b=true\ntranslateHeaderMetadata.b=true\ntranslateImageAltText.b=true\nuseLinkSubflow.b=true\ncodeFinderRules.count.i=1\ncodeFinderRules.rule0=\\{\\{[^}]+\\}\\}\ncodeFinderRules.sample={{#test}} - handle bar test {{/test}}$0a${{stand-alone handle bar}}$0a$\ncodeFinderRules.useAllRulesWhenTesting.b=true\n", - "extractAllTags": true, "exportReplacements": {"patterns": [], - "replacements": []}, "importReplacements": {"patterns": [], "replacements": - []}' - type: string - configName: - description: The user defined name of your configuration. - example: my_config - type: string - configDescription: - description: A description for the configuration. - example: config for custom markdown escaping - type: string - required: - - configDescription - - configName - title: EditFilterMappingParameters - type: object - description: The file filter mapping to create. + $ref: '#/components/schemas/LiltCreateContent' required: false responses: "200": content: application/json: schema: - $ref: '#/components/schemas/ConverterConfigMap' - description: A map of config id to string escaped config json. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Add Filter Mapping + $ref: '#/components/schemas/LiltCreateContent' + description: The updated Lilt Create content. + summary: Update Lilt Create content tags: - - ConverterConfig + - Create x-codegen-request-body-name: body x-contentType: application/json x-accepts: application/json - /documents: - delete: - description: | - Delete a Document. - operationId: deleteDocument + /v2/create/{contentId}/create: + get: + description: |+ + Regenerate the given piece of content with the current parameters. + + Example CURL: + ``` + curl --X --request GET 'https://api.lilt.com/v2/create/1234/create?key=API_KEY' + ``` + + operationId: regenerateLiltCreateContent parameters: - - description: A unique Document identifier. - in: query - name: id + - description: The content ID. + explode: false + in: path + name: contentId required: true schema: type: integer + style: simple responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/DocumentDeleteResponse' - description: A status object. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Delete a Document + content: {} + description: | + An event stream produced by Server Side Events. The following + events are supported. + - message: an object with the newly generated text (e.g. {"text": "hello"}) + - message: upon completion of events the string "[DONE]" will be emitted + - fullcontent: an object containing the full response + summary: Regenerate Lilt Create content tags: - - Documents + - Create x-accepts: application/json + /v2/jobs: get: description: |- - List a Document. + Get all Jobs within a given offset and limit. You can retrieve jobs from your account using the above API. + + Example CURL command: - The listing will include the pretranslation status for the document. When pretranslation is in progress for a document, the `GET /documents` endpoint's response will include `is_pretranslating = true` as well as a more detailed status property `status.pretranslation` one of `idle`, `pending`, or `running`. - operationId: getDocument + ``` + curl -X GET 'https://api.lilt.com/v2/jobs?key=API_KEY&isArchived=false' + ``` + operationId: retrieveAllJobs parameters: - - description: A unique Document identifier. + - description: Retrieves all jobs that are archived. + explode: true in: query - name: id - required: true + name: isArchived + required: false schema: - type: integer - - description: Flag indicating whether full segment information should be returned. + type: boolean + style: form + - description: Retrieves all jobs that are delivered. + explode: true in: query - name: with_segments + name: isDelivered + required: false schema: type: boolean + style: form + - description: Return jobs starting at the offset row. If not given the default + offset will be 0. + explode: true + in: query + name: offset + required: false + schema: + minimum: 0 + type: integer + style: form + - description: The maximum number of jobs to be returned. If not given the default + limit will be 25. + explode: true + in: query + name: limit + required: false + schema: + maximum: 50 + type: integer + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/DocumentWithSegments' - description: A Document object. + items: + $ref: '#/components/schemas/Job' + title: JobsResponse + type: array + description: A list of Job objects. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Retrieve a Document + summary: Retrieve all Jobs tags: - - Documents + - Jobs x-accepts: application/json post: - description: | - Create a new Document. A Document is a collection of one or more Segments. - Documents are nested inside of Projects, and appear in the Project details view in the web app. - Document-level relationships between Segments are considered by the machine translation system during adaptation. If there is no inherent document structure in your data, you still might consider grouping related Segments into Documents to improve translation quality. - operationId: createDocument + description: |+ + Create a Job. A Job is a collection of Projects. + A Job will contain multiple projects, based on the language pair. + A Project is associated with exactly one Memory. + + Jobs appear in the Jobs dashboard of the web app. + + Example CURL command: + + ``` + curl -X POST 'https://api.lilt.com/v2/jobs?key=API_KEY' \ + --header 'Content-Type: application/json' \ + --data-raw '{ + "name": "test job", + "fileIds": [5009, 5010, 5011], + "due": "2022-05-05T10:56:44.985Z", + "srcLang": "en", + "srcLocale": "US", + "languagePairs": [ + { "memoryId": 3121, "trgLang": "de" }, + { "memoryId": 2508, "trgLang": "fr" }, + { "memoryId": 3037, "trgLang": "zh" } + ] + }' + ``` + + operationId: createJob requestBody: - $ref: '#/components/requestBodies/DocumentParameters' + $ref: '#/components/requestBodies/JobCreateParameters' content: application/json: schema: example: - project_id: 23618 - name: Introduction.xliff + languagePairs: + - workflowStageAssignments: + - workflowStageTemplateId: 12345 + userId: 123 + email: username@domain.com + - workflowStageTemplateId: 12345 + userId: 123 + email: username@domain.com + pretranslate: true + trgLocale: DE + caseSensitive: true + dueDate: 2021-10-03T13:43:00.000Z + workflowTemplateName: 0 + takeMatchAttribution: true + externalModelId: 44 + workflowTemplateId: 14 + autoAccept: true + configId: 2332 + srcLocale: US + memoryId: 1241 + trgLang: de + srcLang: en + - workflowStageAssignments: + - workflowStageTemplateId: 12345 + userId: 123 + email: username@domain.com + - workflowStageTemplateId: 12345 + userId: 123 + email: username@domain.com + pretranslate: true + trgLocale: DE + caseSensitive: true + dueDate: 2021-10-03T13:43:00.000Z + workflowTemplateName: 0 + takeMatchAttribution: true + externalModelId: 44 + workflowTemplateId: 14 + autoAccept: true + configId: 2332 + srcLocale: US + memoryId: 1241 + trgLang: de + srcLang: en + workflowTemplateId: 123 + fileIds: + - 298 + - 299 + due: 2021-10-05T14:48:00.000Z + name: My new Job + srcLocale: US + isPlural: true + workflowTemplateName: 6 + srcLang: en properties: name: - description: The document name. - example: Introduction.xliff + description: A name for the Job. + example: My new Job type: string - project_id: - description: A unique Project identifier. - example: 23618 - type: integer - required: - - name - - project_id - title: DocumentParameters - type: object - description: The Document resource to create. - required: false - responses: - "200": + languagePairs: + description: Language pairs is a set of one or more pairs that includes + source language, source locale(optional), target language, target + locale(optional), and memoryId. + items: + $ref: '#/components/schemas/LanguagePair' + type: array + fileIds: + description: A list of file ids to upload to job creation. + example: + - 298 + - 299 + items: + type: integer + type: array + due: + description: An ISO string date representing job due date. + example: 2021-10-05T14:48:00.000Z + type: string + srcLang: + description: 2-letter ISO source language code + example: en + type: string + srcLocale: + description: 2-letter source language code + example: US + type: string + isPlural: + description: A boolean value representing if the files have plurals. + example: true + type: boolean + workflowTemplateId: + description: Identifier of the workflow template to be used when + creating a job. If not passed the organization default will be + used. + example: 123 + type: integer + workflowTemplateName: + description: Name of the workflow template to be used, must be passed + with teamId or look up will fail. If workflowTemplateId is passed + it supercedes any other look up. + type: integer + required: + - fileIds + - languagePairs + - name + - srcLang + - srcLocale + title: JobCreateParameters + type: object + description: The Job resource to create. + required: true + responses: + "200": content: application/json: schema: - $ref: '#/components/schemas/DocumentWithSegments' - description: A Document object. + $ref: '#/components/schemas/Job' + description: A Job object. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Create a Document + summary: Create a Job tags: - - Documents + - Jobs x-codegen-request-body-name: body x-contentType: application/json x-accepts: application/json - put: - description: | - Update a Document. - operationId: updateDocument - requestBody: - $ref: '#/components/requestBodies/DocumentUpdateParameters' - content: - application/json: - schema: - example: - name: Introduction to our App - id: 46530 - properties: - id: - description: A unique Document identifier. - example: 46530 - type: integer - name: - description: The Document name. - example: Introduction to our App - type: string - required: - - id - - name - title: DocumentUpdateParameters - type: object - description: The Document resource to update. + /v2/jobs/{jobId}: + delete: + description: |- + Delete a job, deletes all projects and documents in the job, deletes all the segments from all the job's translation memories. + + Example CURL command: + + ``` + curl -X DELETE 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' + ``` + operationId: deleteJob + parameters: + - description: A job id. + explode: false + in: path + name: jobId required: true + schema: + type: integer + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/DocumentWithSegments' - description: A Document object. + $ref: '#/components/schemas/JobDeleteResponse' + description: A status object. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Update a Document + summary: Delete a Job tags: - - Documents - x-codegen-request-body-name: body - x-contentType: application/json + - Jobs x-accepts: application/json - /documents/share: - put: - description: |+ - Assign and unassign a Document for translation and/or review. + get: + description: |- + Retrieves a job data along with stats. To retrieve a specific job, you will need the job `id` in the url path. - operationId: assignDocument - requestBody: - $ref: '#/components/requestBodies/DocumentAssignmentParameters' - content: - application/json: - schema: - example: - is_reviewer: false - due_date: 2000-01-23T04:56:07.000+00:00 - is_translator: true - id: 46530 - email: user@email.com - properties: - id: - description: A unique Document identifier. - example: 46530 - type: integer - email: - description: An email address. - example: user@email.com - type: string - is_translator: - description: If true, assign for translating. If false, then unassign. - example: true - type: boolean - is_reviewer: - description: If true, assign for reviewing. If false, then unassign. - example: false - type: boolean - due_date: - description: Due date for translation or review (set based on `is_translator` - and `is_reviewer` flags). - format: date-time - type: string - required: - - email - - id - title: DocumentAssignmentParameters - type: object - description: Attributes of the Document resource to assign. + Example CURL command: + + ``` + curl -X GET 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' + ``` + operationId: getJob + parameters: + - description: A job id. + explode: false + in: path + name: jobId required: true + schema: + type: integer + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/DocumentAssignmentResponse' - description: A status object. + $ref: '#/components/schemas/Job' + description: A job object. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Assign a Document + summary: Retrieve a Job tags: - - Documents - x-codegen-request-body-name: body - x-contentType: application/json + - Jobs x-accepts: application/json - /documents/pretranslate: - post: - description: | - Initiate pretranslation of a list of Documents. This request will mark - document(s) as being pretranslated. Pretranslation in this context is: - - Applying and confirming exact TM matches based on the Memory of the - Project; - - Translating all other segments via MT without confirming - them. + put: + description: |- + Updates a job with the new job properties. To update a specific job, you will need the job `id` in the url path. + + You can update job's name and due date by passing the property and new value in the body. Example CURL command: + ``` - curl -X POST https://lilt.com/2/documents/pretranslate?key=API_KEY -d {"id": [123]} -H "Content-Type: application/json" + curl -X PUT 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' \ + --header 'Content-Type: application/json' \ + --data-raw '{ + "name": "test job", + "due": "2022-05-05T10:56:44.985Z" + }' ``` - - Document translation is an asynchronous process that, in effect, is - performed in the background. - - To check the status of pretranslation for a document, use the `GET - /documents` endpoint. When pretranslation is in progress for a document, - the `GET /documents` endpoint's response will include `is_pretranslating - = true` as well as a more detailed status property - `status.pretranslation` one of `idle`, `pending`, or `running`. - - Once pretranslation is finished, the document can be downloaded via `GET - /documents/files`. - operationId: pretranslateDocuments + operationId: updateJob parameters: - - description: Deprecated, use body param instead. Optional parameter for auto-accepting - 100% TM hits. - in: query - name: auto_accept - schema: - type: boolean - - description: Deprecated, use body param instead. Optional for using case matching - against TM hits. - in: query - name: case_sensitive - schema: - type: boolean - - description: Deprecated, use body param instead. Optional parameter for attributing - translation authorship of exact matches to document creator. - in: query - name: attribute_to_creator - schema: - type: boolean - - description: | - Deprecated, use body param instead. An optional parameter indicating how the document will be pretranslated. - - The accepted values are `tm`, or `tm+mt`. Default is `tm`. - in: query - name: mode + - description: A job id. + explode: false + in: path + name: jobId + required: true schema: - type: string + type: integer + style: simple requestBody: - $ref: '#/components/requestBodies/DocumentPretranslateParameters' + $ref: '#/components/requestBodies/JobUpdateParameters' content: application/json: schema: example: - mode: tm+mt - attribute_to_creator: false - case_sensitive: false - id: - - 123 - - 234 - auto_accept: false + dueDate: 0 + name: My new Job + isProcessing: ExportError + processingErrorMsg: Authentication failed. Check your Contentful API + Key. properties: - id: - description: A list of unique Document identifiers. - example: - - 123 - - 234 - items: - type: integer - type: array - auto_accept: - description: Optional parameter for auto-accepting 100% TM hits. - example: false - type: boolean - case_sensitive: - description: Optional for using case matching against TM hits.. - example: false - type: boolean - attribute_to_creator: - description: Optional parameter for attributing translation authorship - of exact matches to document creator. - example: false - type: boolean - mode: + name: + description: A name for the Job. + example: My new Job + type: string + dueDate: + description: An ISO string date. + type: integer + isProcessing: description: | - An optional parameter indicating how the document will be pretranslated. - - The accepted values are `tm`, or `tm+mt`. Default is `tm`. - example: tm+mt + The processing status of the job. Provide one of the following + integers to indicate the status. + + Ok = 0 + Started = 1 + ExportError = -2 + enum: + - "0" + - "1" + - -2 + example: ExportError type: string - required: - - id - title: DocumentPretranslateParameters + processingErrorMsg: + description: The processing error message. + example: Authentication failed. Check your Contentful API Key. + type: string + title: JobUpdateParameters type: object - description: A list of unique Document identifiers. - required: true + description: The Job resource to update. + required: false responses: - "202": + "200": content: application/json: schema: - $ref: '#/components/schemas/DocumentPretranslateResponse' - description: A status object. + $ref: '#/components/schemas/Job' + description: A job object. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Pretranslate a Document + summary: Update a Job tags: - - Documents + - Jobs x-codegen-request-body-name: body x-contentType: application/json x-accepts: application/json - /documents/files: - get: - description: |+ - Export a Document that has been translated in the Lilt web application. - Any Document can be downloaded in XLIFF 1.2 format, or can be retrieved in its original uploaded format by setting `is_xliff=false`. - This endpoint will fail if either (a) export or (b) pre-translation operations are in-progress. The status of those operations can be determined by retrieving the Document resource. + /v2/jobs/{jobId}/stats: + post: + description: |- + Get the TM leverage stats for the job (new/exact/fuzzy matches). + Example CURL command: + ``` - curl -X GET https://lilt.com/2/documents/files?key=API_KEY&id=274 -o from_lilt.xliff + curl -X POST 'https://api.lilt.com/v2/jobs/{id}/stats?key=API_KEY' ``` - - operationId: downloadDocument + operationId: getJobLeverageStats parameters: - - description: An unique Document identifier. - in: query - name: id + - description: A job id. + explode: false + in: path + name: jobId required: true schema: type: integer - - description: Download the document in XLIFF 1.2 format. - in: query - name: is_xliff - schema: - default: true - type: boolean + style: simple responses: "200": content: - application/octet-stream: + application/json: schema: - format: byte - title: DocumentDownloadResponse - type: string - description: A file. - "502": - content: {} - description: File in pretranslation. + $ref: '#/components/schemas/JobLeverageStats' + description: A job leverage stats object. default: content: - application/octet-stream: + application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Download a Document + summary: Retrieve Job Leverage Stats tags: - - Documents - x-accepts: application/octet-stream + - Jobs + x-accepts: application/json + /v2/jobs/{jobId}/archive: post: - description: |+ - Create a Document from a file in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). - Request parameters should be passed as JSON object with the header field `LILT-API`. + description: |- + Set job to archived, unassign all linguists and archive all projects and documents inside the job. - File names in the header can only contain [US-ASCII characters](https://en.wikipedia.org/wiki/ASCII). File names with characters outside of US-ASCII should be [URI encoded](https://en.wikipedia.org/wiki/Percent-encoding) or transliterated to US-ASCII strings. + It will return the archived job. Example CURL command: + ``` - curl -X POST https://lilt.com/2/documents/files?key=API_KEY \ - --header "LILT-API: {\"name\": \"introduction.xliff\",\"pretranslate\": \"tm+mt\",\"project_id\": 9}" \ - --header "Content-Type: application/octet-stream" \ - --data-binary @Introduction.xliff + curl -X POST 'https://api.lilt.com/v2/jobs/{id}/archive?key=API_KEY' ``` - - operationId: uploadDocument + operationId: archiveJob parameters: - - description: A file name. - in: header - name: name - required: true - schema: - type: string - - description: A unique Project identifier. - in: header - name: project_id + - description: A job id. + explode: false + in: path + name: jobId required: true schema: type: integer - - description: | - An optional parameter indicating if and how the document will be - pretranslated upon being uploaded. - The accepted values are `TM`, or `TM+MT` - in: header - name: pretranslate - schema: - type: string - - description: | - An optional parameter to auto-accept segments with 100% translation - memory matches when the `pretranslate` option is also set, or to - auto-accept any target data that is present when the uploaded file - is XLIFF. If omitted or set to `false`, no segments will be - auto-accepted. - in: header - name: auto_accept - schema: - type: boolean - - description: | - An optional parameter to use case sensitive translation memory matching when the `pretranslate` - option is also enabled. Matches must have identical character-by-character case to qualify as matches. - Default value is `false` - in: header - name: case_sensitive - schema: - type: boolean - - description: | - An optional parameter to attribute translation authorship of exact matches to the author of the file - when the `pretranslate` option is also enabled. Default value is `false` - in: header - name: match_attribution - schema: - type: boolean - - description: | - An optional pararameter to specify an import configuration to - be applied when extracting translatable content from this file. - in: header - name: config_id - schema: - type: integer - requestBody: - content: - application/octet-stream: - schema: - example: |- - - - ... - - format: binary - title: DocumentUploadBody - type: string - description: | - The file contents to be uploaded. The entire POST body will be - treated as the file. - required: true + style: simple responses: "200": content: application/json: schema: - $ref: '#/components/schemas/DocumentWithSegments' - description: A Document object. + $ref: '#/components/schemas/Job' + description: A job object. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Upload a File + summary: Archive a Job tags: - - Documents - x-codegen-request-body-name: body - x-contentType: application/octet-stream + - Jobs x-accepts: application/json - /documents/done/unlock: + /v2/jobs/{jobId}/unarchive: post: - description: | - Unlock documents for translation. - Sets document "Translation Done" and "Review Done" to false. + description: |- + Set job to unarchived, the job will move to active status. + + Example CURL command: - Example curl: ``` - curl --X --request POST 'https://lilt.com/2/documents/done/unlock?key=API_KEY' \ - --header 'Content-Type: application/json' \ - --data-raw '{ - "documentIds": [23921, 23922] - }' + curl -X POST 'https://api.lilt.com/v2/jobs/{id}/unarchive?key=API_KEY' ``` - operationId: unlockDocuments - requestBody: - $ref: '#/components/requestBodies/DocumentDoneUpdateParameters' - content: - application/json: - schema: - example: - documentIds: - - 10641 - - 10642 - properties: - documentIds: - description: array of document ids - example: - - 10641 - - 10642 - items: - type: number - type: array - required: - - documentIds - title: DocumentDoneUpdateParameters - type: object - description: document ids to update + operationId: unarchiveJob + parameters: + - description: A job id. + explode: false + in: path + name: jobId required: true + schema: + type: integer + style: simple responses: "200": content: application/json: schema: - items: - type: number - title: DocumentDoneResponse - type: array - description: array of updated documents - summary: Unlock documents + $ref: '#/components/schemas/Job' + description: A job object. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Unarchive a Job tags: - - Documents - x-codegen-request-body-name: body - x-contentType: application/json + - Jobs x-accepts: application/json - /documents/done/translation: + /v2/jobs/{jobId}/deliver: post: - description: | - Mark the translation of documents as done/undone in bulk. - - When being marked positively as done: + description: |- + Set the job state to delivered and set all the projects in the job to done - - Documents must not already be marked as done and all segments must be confirmed. - - This request will also trigger an email notification to a document's assigned reviewer that the document is ready for review. + It will return the delivered job. - When being marked as un-done: - - Documents must not be marked as complete for review. + Example CURL command: - Example curl: ``` - curl --X --request POST 'https://lilt.com/2/documents/done/translation?key=API_KEY' \ - --header 'Content-Type: application/json' \ - --data-raw '{ - "documentIds": [23921, 23922], - "isDone": true - }' + curl -X POST 'https://api.lilt.com/v2/jobs/{id}/deliver?key=API_KEY' ``` - operationId: markTranslationDone - requestBody: - $ref: '#/components/requestBodies/DocumentDoneUpdateParameters_1' - content: - application/json: - schema: - properties: - documentIds: - description: array of document ids - example: - - 10641 - - 10642 - items: - type: number - type: array - isDone: - example: true - type: boolean - required: - - documentIds - - isDone - title: DocumentDoneUpdateParameters - type: object - description: document ids to update + operationId: deliverJob + parameters: + - description: A job id. + explode: false + in: path + name: jobId required: true + schema: + type: integer + style: simple responses: "200": content: application/json: schema: - items: - type: number - title: DocumentDoneResponse - type: array - description: array of updated documents - summary: Mark translation done + $ref: '#/components/schemas/Job' + description: A job object. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Deliver a Job tags: - - Documents - x-codegen-request-body-name: body - x-contentType: application/json + - Jobs x-accepts: application/json - /documents/done/review: + /v2/jobs/{jobId}/reactivate: post: - description: | - Mark the review of documents as done/undone in bulk. + description: |- + Set the job state to active. Does not change the state of projects associated with the given job. - When being marked positively as done: + It will return the reactivated job. - - Documents must not already be marked as done for review. - - Documents must already be marked as done for translation. - - This request will also trigger an email notification. + Example CURL command: - Example curl: ``` - curl --X --request POST 'https://lilt.com/2/documents/done/review?key=API_KEY' \ - --header 'Content-Type: application/json' \ - --data-raw '{ - "documentIds": [23921, 23922], - "isDone": true - }' + curl -X POST 'https://api.lilt.com/v2/jobs/{id}/reactivate?key=API_KEY' ``` - operationId: markReviewDone - requestBody: - $ref: '#/components/requestBodies/DocumentDoneUpdateParameters_2' - content: - application/json: - schema: - properties: - documentIds: - description: array of document ids - example: - - 10641 - - 10642 - items: - type: number - type: array - isDone: - example: true - type: boolean - required: - - documentIds - - isDone - title: DocumentDoneUpdateParameters - type: object - description: document ids to update + operationId: reactivateJob + parameters: + - description: A job id. + explode: false + in: path + name: jobId required: true + schema: + type: integer + style: simple responses: "200": content: application/json: schema: - items: - type: number - title: DocumentDoneResponse - type: array - description: array of updated documents - summary: Mark review done - tags: - - Documents - x-codegen-request-body-name: body - x-contentType: application/json - x-accepts: application/json - /languages: - get: - description: |+ - Get a list of supported languages. - - operationId: getLanguages - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/LanguagesResponse' - description: An object listing supported languages and their corresponding - locales. + $ref: '#/components/schemas/Job' + description: A job object. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Retrieve supported languages + summary: Reactivate a Job tags: - - Languages + - Jobs x-accepts: application/json - /lexicon: + /v2/jobs/{jobId}/export: get: - description: |+ - Query the Lexicon. The Lexicon is an editable termbase / concordance that is integrated with the Memory. + description: |- + Prepare job files for download. + To export translated documents from the job use the query parameter `type=files`: + + Example CURL command: - operationId: queryLexicon + ``` + curl -X GET 'https://api.lilt.com/v2/jobs/{id}/export?key=API_KEY&type=files' + ``` + + To export job memories use the query parameter `type=memory`. + + The status of the export can be checked by requesting the job `GET /jobs/:jobId`, `job.isProcessing` will be `1` while in progress, + `0` when idle and `-2` when the export failed. + operationId: exportJob parameters: - - description: A unique Memory identifier. - in: query - name: memory_id + - description: A job id. + explode: false + in: path + name: jobId required: true schema: type: integer - - description: An ISO 639-1 language code. - in: query - name: srclang - required: true - schema: - type: string - - description: An ISO 639-1 language code. - in: query - name: trglang - required: true - schema: - type: string - - description: The query term. + style: simple + - description: category for files and memory. + explode: true in: query - name: query + name: type required: true schema: type: string - - description: The maximum number of results to return. - in: query - name: "n" - schema: - default: 1 - type: integer + style: form responses: "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/LexiconEntry' - title: LexiconQueryResponse - type: array - description: A list of LexiconEntry objects. + content: {} + description: 200 status. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Query a Lexicon + summary: Export a Job tags: - - Lexicon + - Jobs x-accepts: application/json - post: - description: |+ - Update the Lexicon (Termbase as displayed in the ui) with a new term. The maximum source length is 250 - characters. - - operationId: updateLexicon - requestBody: - $ref: '#/components/requestBodies/LexiconUpdateParameters' - content: - application/json: - schema: - example: - memory_id: 10641 - source: washing machine - target: Waschmaschine - properties: - memory_id: - description: A unique Memory identifier. - example: 10641 - type: integer - source: - description: The source side of the lexicon entry. - example: washing machine - type: string - target: - description: The target side of the lexicon entry. - example: Waschmaschine - type: string - required: - - memory_id - - source - - target - title: LexiconUpdateParameters - type: object - description: The lexicon entry. + /v2/jobs/{jobId}/downlod: + get: + description: |- + Make sure you have exported a job with the same id before using this api. + + Downloading files requires the exported job `id` in the param. + + Example CURL command: + + ``` + curl -X GET 'https://api.lilt.com/v2/jobs/{id}/download?key=API_KEY' + ``` + operationId: downloadJob + parameters: + - description: A job id. + explode: false + in: path + name: jobId required: true + schema: + type: integer + style: simple responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/LexiconUpdateResponse' - description: A status object. + content: {} + description: zipped file default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Update a Lexicon + summary: Download a Job tags: - - Lexicon - x-codegen-request-body-name: body - x-contentType: application/json + - Jobs x-accepts: application/json - /memories: + /v2/projects: delete: description: | - Delete a Memory. - operationId: deleteMemory + Delete a Project. + operationId: deleteProject parameters: - - description: A unique Memory identifier. + - description: A unique Project identifier. + explode: true in: query name: id - required: true + required: false schema: type: integer + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/MemoryDeleteResponse' + $ref: '#/components/schemas/ProjectDeleteResponse' description: A status object. default: content: @@ -1879,247 +1756,384 @@ paths: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Delete a Memory + summary: Delete a Project tags: - - Memories + - Projects x-accepts: application/json get: - description: |+ - Retrieve a Memory. If you cannot access the Memory (401 error) please check permissions (e.g. in case you created the Memory via the web app with a different account you may have to explicitly share that Memory). + description: |- + Retrieves one or more projects, including the documents associated with each project. Retrieving a project is the most efficient way to retrieve a single project, multiple projects or a list of all available projects. - operationId: getMemory + To retrieve a specific project, specify the `id` request parameter or you can retrieve multiple projects by adding comma (,) between ids eg. `?id=1234,5678`. To retrieve all projects, omit the `id` request parameter. To limit the retrieved projects to those with a particular source language or target language, specify the corresponding ISO 639-1 language codes in the `srclang` and `trglang` request parameters, respectively. + operationId: getProjects parameters: - - description: An optional Memory identifier. + - description: A unique Project identifier. It can be a single id or multiple + ids separated by a comma + explode: true in: query name: id + required: false schema: type: integer + style: form + - description: An ISO 639-1 language code. + explode: true + in: query + name: srclang + required: false + schema: + type: string + style: form + - description: An ISO 639-1 language code. + explode: true + in: query + name: trglang + required: false + schema: + type: string + style: form + - description: Unix time stamp (epoch, in seconds) of Projects with `created_at` + greater than or equal to the value. + explode: true + in: query + name: from_time + required: false + schema: + type: integer + style: form + - description: Unix time stamp (epoch, in seconds) of Projects with `created_at` + less than the value. + explode: true + in: query + name: to_time + required: false + schema: + type: integer + style: form + - description: A project state (backlog, inProgress, inReview, inQA, done). + explode: true + in: query + name: state + required: false + schema: + type: string + style: form + - description: A flag that toggles whether to include archived projects in the + response (the default is `true`). + explode: true + in: query + name: archived + required: false + schema: + type: boolean + style: form + - description: A unique Connector identifier. + explode: true + in: query + name: connector_id + required: false + schema: + type: integer + style: form responses: "200": content: application/json: schema: items: - $ref: '#/components/schemas/Memory' - title: MemoryResponse + $ref: '#/components/schemas/Project' + title: ProjectResponse type: array - description: A list of Memory objects. + description: A list of Project objects. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Retrieve a Memory + summary: Retrieve a Project tags: - - Memories + - Projects x-accepts: application/json post: description: |+ - Create a new Memory. A Memory is a container that collects source/target - sentences for a specific language pair (e.g., English>French). The data - in the Memory is used to train the MT system, populate the TM, and - update the lexicon. Memories are private to your account - the data is - not shared across users - unless you explicitly share a Memory with your - team (via web app only). + Create a Project. A Project is a collection of Documents. - Refer - to our KB for a more detailed description. + A Project is associated with exactly one Memory. - operationId: createMemory + Projects appear in the dashboard of the web app. + + operationId: createProject requestBody: - $ref: '#/components/requestBodies/MemoryCreateParameters' + $ref: '#/components/requestBodies/ProjectCreateParameters' content: application/json: schema: example: - trglocale: FR - name: automotive - srclang: en - srclocale: US - trglang: fr + metadata: + connectorType: github + notes: example metadata + memory_id: 1234 + workflowTemplateId: 14 + job_id: 1234 + name: My new project + due_date: 1489147692 properties: name: - description: A name for the Memory. - example: automotive - type: string - srclang: - description: An ISO 639-1 language identifier. - example: en - type: string - trglang: - description: An ISO 639-1 language identifier. - example: fr - type: string - srclocale: - description: An ISO 3166-1 region name for language locales - example: US - type: string - trglocale: - description: An ISO 3166-1 region name for language locales - example: FR + description: A name for the Project. + example: My new project type: string + memory_id: + description: The Memory to associate with this new Project. + example: 1234 + type: integer + job_id: + description: | + The Job to associate with this new Project. If a Job ID is not + provided then a new Job will be created to contain the + Project. + example: 1234 + type: integer + due_date: + description: The due date. Measured in seconds since the Unix epoch. + example: 1489147692 + type: integer + metadata: + description: A JSON object of key/value string pairs. Stores custom + project information. + example: + connectorType: github + notes: example metadata + properties: {} + type: object + workflowTemplateId: + description: The workflow template used to create this project. + WorkflowTemplateIds can be retrieved via the /workflows/templates + endpoint. If not specified then the organization default workflowTemplateId + will be used. + example: 14 + type: integer required: + - memory_id - name - - srclang - - trglang - title: MemoryCreateParameters + title: ProjectCreateParameters type: object - description: The Memory resource to create. + description: The Project resource to create. required: true responses: "200": content: application/json: schema: - $ref: '#/components/schemas/Memory' - description: A Memory object. + $ref: '#/components/schemas/Project' + description: A Project object. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Create a Memory + summary: Create a Project tags: - - Memories + - Projects x-codegen-request-body-name: body x-contentType: application/json x-accepts: application/json - put: - description: | - Update a Memory. - operationId: updateMemory - requestBody: - $ref: '#/components/requestBodies/MemoryUpdateParameters' - content: - application/json: - schema: - example: - name: Automotive Memory - id: 7246 - properties: - id: - description: A unique Memory identifier. - example: 7246 - type: integer - name: - description: The Memory name. - example: Automotive Memory - type: string - required: - - id - - name - title: MemoryUpdateParameters - type: object - description: The Memory resource to update. + /v2/documents/files: + get: + description: |+ + Export a Document that has been translated in the Lilt web application. + Any Document can be downloaded in XLIFF 1.2 format, or can be retrieved in its original uploaded format by setting `is_xliff=false`. + This endpoint will fail if either (a) export or (b) pre-translation operations are in-progress. The status of those operations can be determined by retrieving the Document resource. + Example CURL command: + ``` + curl -X GET https://api.lilt.com/v2/documents/files?key=API_KEY&id=274 -o from_lilt.xliff + ``` + + operationId: downloadDocument + parameters: + - description: An unique Document identifier. + explode: true + in: query + name: id required: true - responses: + schema: + type: integer + style: form + - description: Download the document in XLIFF 1.2 format. + explode: true + in: query + name: is_xliff + required: false + schema: + default: true + type: boolean + style: form + responses: "200": content: - application/json: + application/octet-stream: schema: - $ref: '#/components/schemas/Memory' - description: A Memory object. + format: byte + title: DocumentDownloadResponse + type: string + description: A file. + "502": + content: {} + description: File in pretranslation. default: content: - application/json: + application/octet-stream: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Update the name of a Memory + summary: Download a Document tags: - - Memories - x-codegen-request-body-name: body - x-contentType: application/json - x-accepts: application/json - /memories/query: - get: + - Documents + x-accepts: application/octet-stream + post: description: |+ - Perform a translation memory query. + Create a Document from a file in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). + Request parameters should be passed as JSON object with the header field `LILT-API`. - operationId: queryMemory + File names in the header can only contain [US-ASCII characters](https://en.wikipedia.org/wiki/ASCII). File names with characters outside of US-ASCII should be [URI encoded](https://en.wikipedia.org/wiki/Percent-encoding) or transliterated to US-ASCII strings. + + Example CURL command: + ``` + curl -X POST https://api.lilt.com/v2/documents/files?key=API_KEY \ + --header "LILT-API: {\"name\": \"introduction.xliff\",\"pretranslate\": \"tm+mt\",\"project_id\": 9}" \ + --header "Content-Type: application/octet-stream" \ + --data-binary @Introduction.xliff + ``` + + operationId: uploadDocument parameters: - - description: A unique Memory identifier. - in: query - name: id + - description: A file name. + explode: false + in: header + name: name required: true schema: - type: integer - - description: A source query. - in: query - name: query + type: string + style: simple + - description: A unique Project identifier. + explode: false + in: header + name: project_id required: true + schema: + type: integer + style: simple + - description: | + An optional parameter indicating if and how the document will be + pretranslated upon being uploaded. + The accepted values are `TM`, or `TM+MT` + explode: false + in: header + name: pretranslate + required: false schema: type: string - - description: Maximum number of results to return. - in: query - name: "n" + style: simple + - description: | + An optional parameter to auto-accept segments with 100% translation + memory matches when the `pretranslate` option is also set, or to + auto-accept any target data that is present when the uploaded file + is XLIFF. If omitted it will default to your organization settings for `Accept and lock exact matches`, + if set to `false`, no segments will be auto-accepted. + explode: false + in: header + name: auto_accept + required: false + schema: + type: boolean + style: simple + - description: | + An optional parameter to use case sensitive translation memory matching when the `pretranslate` + option is also enabled. Matches must have identical character-by-character case to qualify as matches. + Default value matches your organization settings for `Use case sensitive translation memory matching` setting + explode: false + in: header + name: case_sensitive + required: false + schema: + type: boolean + style: simple + - description: | + An optional parameter to attribute translation authorship of exact matches to the author of the file + when the `pretranslate` option is also enabled. Default value matches your organization settings for `Translation authorship` setting + explode: false + in: header + name: match_attribution + required: false + schema: + type: boolean + style: simple + - description: | + An optional pararameter to specify an import configuration to + be applied when extracting translatable content from this file. + explode: false + in: header + name: config_id + required: false schema: - default: 10 type: integer + style: simple + requestBody: + content: + application/octet-stream: + schema: + format: binary + title: DocumentUploadBody + type: string + description: | + The file contents to be uploaded. The entire POST body will be + treated as the file. + required: true responses: "200": content: application/json: schema: - items: - $ref: '#/components/schemas/TranslationMemoryEntry' - title: MemoryQueryResponse - type: array - description: A list of TranslationMemoryEntry objects. + $ref: '#/components/schemas/DocumentWithSegments' + description: A Document object. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Query a Memory + summary: Upload a File tags: - - Memories + - Documents + x-codegen-request-body-name: body + x-contentType: application/octet-stream x-accepts: application/json - /memories/sync: + /v2/files: delete: description: |+ - Deletes segments in the Memory matching the `from_time`, `to_time` and `when` parameters. + Delete a File. Example CURL command: ``` - curl -X DELETE https://lilt.com/2/memories/sync?key=API_KEY&id=42&from_time=1491048000&to_time=1491049800&when=created - ``` + curl -X DELETE https://api.lilt.com/v2/files?key=API_KEY&id=123 ``` - operationId: syncDeleteMemory + operationId: deleteFile parameters: - - description: A unique Memory identifier. + - description: A unique File identifier. + explode: true in: query name: id required: true schema: type: integer - - description: Unix time stamp (epoch, in seconds) of the start of the Memory - section. - in: query - name: from_time - schema: - type: integer - - description: Unix time stamp (epoch, in seconds) of the end of the Memory - section. - in: query - name: to_time - schema: - type: integer - - description: 'The date field on which retrieved segments match from/to time - stamps: `created`, `updated`, `deleted`.' - in: query - name: when - schema: - type: string + style: form responses: - "200": + "204": content: application/json: schema: - $ref: '#/components/schemas/MemorySyncDeleteResponse' + $ref: '#/components/schemas/FileDeleteResponse' description: A status object. default: content: @@ -2127,3320 +2141,343 @@ paths: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Delete-sync for a Memory + summary: Delete a File tags: - - Memories + - Files x-accepts: application/json get: - description: |+ - Get all or part of a memory in TMX 1.4b format. If the `from_time` and/or `to_time` are omitted, then all segments are returned. The parameter `when` specifies on which date field `from_time` and `to_time` are matched. Possible values are `created` (when the segment was originally created in the memory), `updated` (when the segment was lastly updated), and `deleted` (when the segment was deleted). + description: |- + Retrieves one or more files available to your user. Files are not associated with a project or a memory. They are unprocessed and can be used later in the project/document creation workflow step. + + To retrieve a specific file, specify the id request parameter. To retrieve all files, omit the id request parameter. Example CURL command: ``` - curl -X GET https://lilt.com/2/memories/sync?key=API_KEY&id=42 -o from_lilt.tmx - ``` - - operationId: syncDownMemory + curl -X GET https://api.lilt.com/v2/files?key=API_KEY&id=274``` + operationId: getFiles parameters: - - description: A unique Memory identifier. + - description: A unique File identifier. + explode: true in: query name: id - required: true - schema: - type: integer - - description: Unix time stamp (epoch, in seconds) of the start of the Memory - section. - in: query - name: from_time - schema: - type: integer - - description: Unix time stamp (epoch, in seconds) of the end of the Memory - section. - in: query - name: to_time + required: false schema: type: integer - - description: 'The date field on which retrieved segments match from/to time - stamps: `created`, `updated`, `deleted`. If this parameter is omitted, then - the whole Memory is returned.' + style: form + - description: | + One or more labels. This will return the files which contain all of + the given labels. + explode: false in: query - name: when + name: labels + required: false schema: - type: string + items: + type: string + type: array + style: form responses: "200": content: - application/x-tmx: + application/json: schema: - format: byte - title: MemorySyncResponse - type: string - description: A TMX 1.4b file. + items: + $ref: '#/components/schemas/SourceFile' + title: FilesList + type: array + description: A list of files. + "403": + content: {} + description: User does not have permission for provided file. + "410": + content: {} + description: File deleted. default: content: - application/x-tmx: + application/json: schema: $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Get-sync for a Memory + description: Unexpected error. + summary: Retrieve a File tags: - - Memories - x-accepts: application/x-tmx + - Files + x-accepts: application/json post: description: |+ - Inserts a TM in TMX 1.4b format into the Memory. Request parameters should be passed as JSON object with the header field `LILT-API`. + Upload a File in any of the formats [documented in our knowledge + base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). + Request parameters should be passed in as query string parameters. Example CURL command: ``` - curl -X POST https://lilt.com/2/memories/sync?key=API_KEY \ - --header "LILT-API: {\"name\": \"my_memory.tmx\",\"id\": 42}" \ - --header "Content-Type: application/octet-stream" \ - --data-binary @my_memory.tmx + curl -X POST https://api.lilt.com/v2/files?key=API_KEY&name=en_US.json \ + --header "Content-Type: application/octet-stream" \ + --data-binary @en_US.json ``` + Calls to GET /files are used to monitor the language detection results. The API response will be augmented to include detected language and confidence score. + + The language detection will complete asynchronously. Prior to completion, the `detected_lang` value will be `zxx`, the reserved ISO 639-2 code for "No linguistic content/not applicable". + + If the language can not be determined, or the detection process fails, the `detected_lang` field will return `und`, the reserved ISO 639-2 code for undetermined language, and the `detected_lang_confidence` score will be `0`. - operationId: syncInsertMemory + operationId: uploadFile parameters: - - description: A unique Memory identifier. - in: header - name: id + - description: A file name. + explode: true + in: query + name: name required: true schema: - type: integer - - description: Name of the TMX file. - in: header - name: name + type: string + style: form + - description: A hash value to associate with the file. The MD5 hash of the + body contents will be used by default if a value isn't provided. + explode: true + in: query + name: file_hash + required: false schema: type: string - requestBody: - content: - application/octet-stream: - schema: - title: MemoryInsertBody - type: string - description: The file contents to be uploaded. The entire POST body will be - treated as the file. - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/MemoryInsertResponse' - description: A status object. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Insert-sync for a Memory - tags: - - Memories - x-codegen-request-body-name: body - x-contentType: application/octet-stream - x-accepts: application/json - put: - description: |+ - Updates the Memory with given TMX file. Request parameters should be passed as JSON object with the header field `LILT-API`. The number of segments returned by the `from_time`, `to_time`, `when` parameters and the number of segments in the TMX file need to be identical. - - Example CURL command: - ``` - curl -X PUT https://lilt.com/2/memories/sync?key=API_KEY \ - --header "LILT-API: {\"name\": \"my_memory.tmx\", \"id\": 42, \"from_time\": 1491048000, \"to_time\": 1491049800, "when": "Updated"}" \ - --header "Content-Type: application/octet-stream" \ - --data-binary @my_memory.tmx - ``` - - operationId: syncUpdateMemory - parameters: - - description: A unique Memory identifier. - in: header - name: id - required: true + style: form + - description: Flag indicating whether to perform language detection on the + uploaded file. Default is false. + explode: true + in: query + name: langId + required: false schema: - type: integer - - description: Unix time stamp (epoch, in seconds) of the start of the Memory - section. - in: header - name: from_time + type: boolean + style: form + - description: The project to associate the uploaded file with. + explode: true + in: query + name: project_id + required: false schema: type: integer - - description: Unix time stamp (epoch, in seconds) of the end of the Memory - section. - in: header - name: to_time + style: form + - description: The category of the file. The options are `REFERENCE`, or `API`. + The default is API. Files with the `REFERENCE` category will be displayed + as reference material. + explode: true + in: query + name: category + required: false schema: - type: integer - - description: 'The date field on which retrieved segments match from/to time - stamps: `created`, `updated`, `deleted`.' - in: header - name: when + type: string + style: form + - description: Comma-separated list of labels to add to the uploaded document. + explode: true + in: query + name: labels + required: false schema: type: string + style: form requestBody: content: - application/json: + application/octet-stream: schema: - title: MemoryUpdateBody + format: binary + title: FileUploadBody type: string - description: The file contents to be uploaded. The entire PUT body will be + description: The file contents to be uploaded. The entire POST body will be treated as the file. required: true responses: - "200": + "201": content: application/json: schema: - $ref: '#/components/schemas/MemoryUpdateResponse' - description: A status object. + $ref: '#/components/schemas/SourceFile' + description: A SourceFile object. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Update-sync for a Memory + summary: Upload a File tags: - - Memories + - Files x-codegen-request-body-name: body - x-contentType: application/json + x-contentType: application/octet-stream x-accepts: application/json - /memories/import: - post: - description: |+ - Imports common translation memory or termbase file formats to a specific Lilt memory. Currently supported file formats are `*.tmx`, `*.sdltm` and `*.tmq` for TM data; `*.csv` and `*.tbx` for termbase data. Request parameters should be passed as JSON object with the header field `LILT-API`. + /v2/files/download: + get: + description: | + Download a File. - Example CURL command to upload a translation memory file named `my_memory.sdltm` in the current working directory: + Example CURL: ``` - curl -X POST https://lilt.com/2/memories/import?key=API_KEY \ - --header "LILT-API: {\"name\": \"my_memory.sdltm\",\"memory_id\": 42}" \ - --header "Content-Type: application/octet-stream" \ - --data-binary @my_memory.sdltm + curl --X --request GET 'https://api.lilt.com/v2/files/download?key=API_KEY&id=1' ``` - - operationId: importMemoryFile + operationId: download parameters: - - description: A unique Memory identifier. - in: header - name: memory_id - required: true - schema: - type: integer - - description: Name of the TM or termbase file. - in: header - name: name + - description: A File id. + explode: true + in: query + name: id required: true schema: type: string - - description: A flag indicating whether an imported Termbase CSV has a header - row or not (the default value is `false`). - in: header - name: has_header_row - schema: - type: boolean - requestBody: - content: - application/octet-stream: - schema: - format: binary - title: MemoryImportBody - type: string - description: The file contents to be uploaded. The entire POST body will be - treated as the file. - required: true + style: form responses: "200": content: - application/json: - schema: - $ref: '#/components/schemas/MemoryImportResponse' - description: A status object. - default: - content: - application/json: + application/octet-stream: schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: File import for a Memory + format: byte + title: DocumentDownloadResponse + type: string + description: A file. + summary: Download file tags: - - Memories - x-codegen-request-body-name: body - x-contentType: application/octet-stream - x-accepts: application/json - /jobs: - get: - description: |- - Get all Jobs. You can retrieve all jobs from your account using the above API. - - Example CURL command: + - Files + x-accepts: application/octet-stream + /v2/files/labels: + delete: + description: | + Remove a label from a File. + Example CURL: ``` - curl -X GET 'https://lilt.com/2/jobs?key=API_KEY&isArchived=false' + curl --X --request DELETE 'https://api.lilt.com/v2/files/labels?key=API_KEY&id=1&name=label_name' ``` - operationId: retrieveAllJobs + operationId: removeLabel parameters: - - description: Retrieves all jobs that are archived. + - description: A File id. + explode: true in: query - name: isArchived + name: id + required: true schema: - type: boolean + type: string + style: form + - description: A label name. + explode: true + in: query + name: name + required: true + schema: + type: string + style: form responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/Job' - title: JobsResponse - type: array - description: A list of Job objects. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Retrieve all Jobs + "204": + content: {} + description: A success response. + summary: Remove Label from File tags: - - Jobs + - Files x-accepts: application/json post: - description: |+ - Create a Job. A Job is a collection of Projects. - A Job will contain multiple projects, based on the language pair. - A Project is associated with exactly one Memory. - - Jobs appear in the Jobs dashboard of the web app. - - Example CURL command: + description: | + Add a label to a File. + Example CURL: ``` - curl -X POST 'https://lilt.com/2/jobs?key=API_KEY' \ + curl --X --request POST 'https://api.lilt.com/v2/files/labels?key=API_KEY&id=1' --header 'Content-Type: application/json' \ --data-raw '{ - "name": "test job", - "fileIds": [5009, 5010, 5011], - "due": "2022-05-05T10:56:44.985Z", - "srcLang": "en", - "srcLocale": "US", - "languagePairs": [ - { "memoryId": 3121, "trgLang": "de" }, - { "memoryId": 2508, "trgLang": "fr" }, - { "memoryId": 3037, "trgLang": "zh" } - ] + "name": "label_name" }' ``` - - operationId: createJob + operationId: addLabel + parameters: + - description: A File id. + explode: true + in: query + name: id + required: true + schema: + type: string + style: form requestBody: - $ref: '#/components/requestBodies/JobCreateParameters' + $ref: '#/components/requestBodies/AddFileLabelRequest' content: application/json: schema: example: - languagePairs: - - pretranslate: true - autoAccept: true - trgLocale: DE - caseSensitive: true - configId: 2332 - dueDate: 2021-10-03T13:43:00.000Z - srcLocale: US - memoryId: 1241 - trgLang: de - takeMatchAttribution: true - srcLang: en - - pretranslate: true - autoAccept: true - trgLocale: DE - caseSensitive: true - configId: 2332 - dueDate: 2021-10-03T13:43:00.000Z - srcLocale: US - memoryId: 1241 - trgLang: de - takeMatchAttribution: true - srcLang: en - due: 2021-10-05T14:48:00.000Z - fileIds: - - 298 - - 299 - name: My new Job + name: label_name properties: name: - description: A name for the Job. - example: My new Job - type: string - due: - description: An ISO string date. - example: 2021-10-05T14:48:00.000Z + description: The Label name. + example: label_name type: string - languagePairs: - description: Language pairs is a set of one or more pairs that includes - source language, source locale(optional), target language, target - locale(optional), and memoryId. - items: - $ref: '#/components/schemas/LanguagePair' - type: array - fileIds: - description: A list of file ids to upload to job creation. - example: - - 298 - - 299 - items: - type: integer - type: array - required: - - fileIds - - languagePairs - - name - title: JobCreateParameters + title: AddFileLabelRequest type: object - description: The Job resource to create. - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Job' - description: A Job object. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Create a Job - tags: - - Jobs - x-codegen-request-body-name: body - x-contentType: application/json - x-accepts: application/json - /jobs/{jobId}: - delete: - description: |- - Delete a job, deletes all projects and documents in the job, deletes all the segments from all the job's translation memories. - - Example CURL command: - - ``` - curl -X DELETE 'https://lilt.com/2/jobs/{id}?key=API_KEY' - ``` - operationId: deleteJob - parameters: - - description: A job id. - in: path - name: jobId - required: true - schema: - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/JobDeleteResponse' - description: A status object. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Delete a Job - tags: - - Jobs - x-accepts: application/json - get: - description: |- - Retrieves a job data along with stats. To retrieve a specific job, you will need the job `id` in the url path. - - Example CURL command: - - ``` - curl -X GET 'https://lilt.com/2/jobs/{id}?key=API_KEY' - ``` - operationId: getJob - parameters: - - description: A job id. - in: path - name: jobId - required: true - schema: - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Job' - description: A job object. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Retrieve a Job - tags: - - Jobs - x-accepts: application/json - put: - description: |- - Updates a job with the new job properties. To update a specific job, you will need the job `id` in the url path. - - You can update job's name and due date by passing the property and new value in the body. - - Example CURL command: - - ``` - curl -X PUT 'https://lilt.com/2/jobs/{id}?key=API_KEY' \ - --header 'Content-Type: application/json' \ - --data-raw '{ - "name": "test job", - "due": "2022-05-05T10:56:44.985Z" - }' - ``` - operationId: updateJob - parameters: - - description: A job id. - in: path - name: jobId + description: A label name. required: true - schema: - type: integer - requestBody: - $ref: '#/components/requestBodies/JobUpdateParameters' - content: - application/json: - schema: - example: - dueDate: 0 - name: My new Job - properties: - name: - description: A name for the Job. - example: My new Job - type: string - dueDate: - description: An ISO string date. - type: integer - title: JobUpdateParameters - type: object - description: The Job resource to update. - required: false responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Job' - description: A job object. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Update a Job + "204": + content: {} + description: A success response. + summary: Add Label to File tags: - - Jobs - x-codegen-request-body-name: body + - Files + x-codegen-request-body-name: name x-contentType: application/json x-accepts: application/json - /jobs/{jobId}/stats: - post: - description: |- - Get the TM leverage stats for the job (new/exact/fuzzy matches). - - Example CURL command: - - ``` - curl -X POST 'https://lilt.com/2/jobs/{id}/stats?key=API_KEY' - ``` - operationId: getJobLeverageStats - parameters: - - description: A job id. - in: path - name: jobId - required: true - schema: - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/JobLeverageStats' - description: A job leverage stats object. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Retrieve Job Leverage Stats - tags: - - Jobs - x-accepts: application/json - /jobs/{jobId}/archive: - post: - description: |- - Set job to archived, unassign all linguists and archive all projects and documents inside the job. - - It will return the archived job. - - Example CURL command: - - ``` - curl -X POST 'https://lilt.com/2/jobs/{id}/archive?key=API_KEY' - ``` - operationId: archiveJob - parameters: - - description: A job id. - in: path - name: jobId - required: true - schema: - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Job' - description: A job object. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Archive a Job - tags: - - Jobs - x-accepts: application/json - /jobs/{jobId}/unarchive: - post: - description: |- - Set job to unarchived, the job will move to active status. - - Example CURL command: - - ``` - curl -X POST 'https://lilt.com/2/jobs/{id}/unarchive?key=API_KEY' - ``` - operationId: unarchiveJob - parameters: - - description: A job id. - in: path - name: jobId - required: true - schema: - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Job' - description: A job object. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Unarchive a Job - tags: - - Jobs - x-accepts: application/json - /jobs/{jobId}/deliver: - post: - description: |- - Set the job state to delivered and set all the projects in the job to done - - It will return the delivered job. - - Example CURL command: - - ``` - curl -X POST 'https://lilt.com/2/jobs/{id}/deliver?key=API_KEY' - ``` - operationId: deliverJob - parameters: - - description: A job id. - in: path - name: jobId - required: true - schema: - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Job' - description: A job object. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Deliver a Job - tags: - - Jobs - x-accepts: application/json - /jobs/{jobId}/reactivate: - post: - description: |- - Set the job state to active. Does not change the state of projects associated with the given job. - - It will return the reactivated job. - - Example CURL command: - - ``` - curl -X POST 'https://lilt.com/2/jobs/{id}/reactivate?key=API_KEY' - ``` - operationId: reactivateJob - parameters: - - description: A job id. - in: path - name: jobId - required: true - schema: - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Job' - description: A job object. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Reactivate a Job - tags: - - Jobs - x-accepts: application/json - /jobs/{jobId}/export: - get: - description: |- - Prepare job files for download. - To export translated documents from the job use the query parameter `type=files`: - - Example CURL command: - - ``` - curl -X GET 'https://lilt.com/2/jobs/{id}/export?key=API_KEY&type=files' - ``` - - To export job memories use the query parameter `type=memory`. - - The status of the export can be checked by requesting the job `GET /jobs/:jobId`, `job.isProcessing` will be `1` while in progress, - `0` when idle and `-2` when the export failed. - operationId: exportJob - parameters: - - description: A job id. - in: path - name: jobId - required: true - schema: - type: integer - - description: category for files and memory. - in: query - name: type - required: true - schema: - type: string - responses: - "200": - content: {} - description: 200 status. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Export a Job - tags: - - Jobs - x-accepts: application/json - /jobs/{jobId}/downlod: - get: - description: |- - Make sure you have exported a job with the same id before using this api. - - Downloading files requires the exported job `id` in the param. - - Example CURL command: - - ``` - curl -X GET 'https://lilt.com/2/jobs/{id}/download?key=API_KEY' - ``` - operationId: downloadJob - parameters: - - description: A job id. - in: path - name: jobId - required: true - schema: - type: integer - responses: - "200": - content: {} - description: zipped file - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Download a Job - tags: - - Jobs - x-accepts: application/json - /projects: - delete: - description: | - Delete a Project. - operationId: deleteProject - parameters: - - description: A unique Project identifier. - in: query - name: id - schema: - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectDeleteResponse' - description: A status object. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Delete a Project - tags: - - Projects - x-accepts: application/json - get: - description: |- - Retrieves one or more projects, including the documents associated with each project. Retrieving a project is the most efficient way to retrieve a single project or a list of all available projects. - - To retrieve a specific project, specify the `id` request parameter. To retrieve all projects, omit the `id` request parameter. To limit the retrieved projects to those with a particular source language or target language, specify the corresponding ISO 639-1 language codes in the `srclang` and `trglang` request parameters, respectively. - operationId: getProjects - parameters: - - description: A unique Project identifier. - in: query - name: id - schema: - type: integer - - description: An ISO 639-1 language code. - in: query - name: srclang - schema: - type: string - - description: An ISO 639-1 language code. - in: query - name: trglang - schema: - type: string - - description: Unix time stamp (epoch, in seconds) of Projects with `created_at` - greater than or equal to the value. - in: query - name: from_time - schema: - type: integer - - description: Unix time stamp (epoch, in seconds) of Projects with `created_at` - less than the value. - in: query - name: to_time - schema: - type: integer - - description: A project state (backlog, inProgress, inReview, inQA, done). - in: query - name: state - schema: - type: string - - description: A flag that toggles whether to include archived projects in the - response (the default is `true`). - in: query - name: archived - schema: - type: boolean - - description: A unique Connector identifier. - in: query - name: connector_id - schema: - type: integer - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/Project' - title: ProjectResponse - type: array - description: A list of Project objects. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Retrieve a Project - tags: - - Projects - x-accepts: application/json - post: - description: |+ - Create a Project. A Project is a collection of Documents. - - A Project is associated with exactly one Memory. - - Projects appear in the dashboard of the web app. - - operationId: createProject - requestBody: - $ref: '#/components/requestBodies/ProjectCreateParameters' - content: - application/json: - schema: - example: - metadata: - connectorType: github - notes: example metadata - memory_id: 1234 - job_id: 1234 - name: My new project - due_date: 1489147692 - properties: - name: - description: A name for the Project. - example: My new project - type: string - memory_id: - description: The Memory to associate with this new Project. - example: 1234 - type: integer - job_id: - description: | - The Job to associate with this new Project. If a Job ID is not - provided then a new Job will be created to contain the - Project. - example: 1234 - type: integer - due_date: - description: The due date. Measured in seconds since the Unix epoch. - example: 1489147692 - type: integer - metadata: - description: A JSON object of key/value string pairs. Stores custom - project information. - example: - connectorType: github - notes: example metadata - properties: {} - type: object - required: - - memory_id - - name - title: ProjectCreateParameters - type: object - description: The Project resource to create. - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Project' - description: A Project object. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Create a Project - tags: - - Projects - x-codegen-request-body-name: body - x-contentType: application/json - x-accepts: application/json - put: - description: | - Update a Project. - operationId: updateProject - requestBody: - $ref: '#/components/requestBodies/ProjectUpdateResponse' - content: - application/json: - schema: - example: - archived: false - metadata: - connectorType: github - notes: example metadata - sample_review_percentage: 20 - name: Walker Percy Essays - due_date: 1489147692 - id: 1234 - state: backlog - properties: - id: - description: A unique Project identifier. - example: 1234 - type: integer - name: - description: The Project name. - example: Walker Percy Essays - type: string - state: - description: The project's state. The possible states are 'backlog', - 'inProgress', 'inReview', 'inQA', and 'done' - example: backlog - type: string - due_date: - description: The due date. Measured in seconds since the Unix epoch. - example: 1489147692 - type: integer - archived: - description: True if the project is archived. Otherwise, false. - example: false - type: boolean - metadata: - description: Metadata associated with a project. This field must - be valid JSON. - example: - connectorType: github - notes: example metadata - properties: {} - type: object - sample_review_percentage: - description: The Project's sample review percentage. Must be an - integer between 10 and 100, a multiple of 10 and greater than - minimum value (displayed in error message). - example: 20 - type: integer - required: - - id - title: ProjectUpdateResponse - type: object - description: The Project resource to update. - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Project' - description: A Project object. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Update a Project - tags: - - Projects - x-codegen-request-body-name: body - x-contentType: application/json - x-accepts: application/json - /projects/quote: - get: - description: |+ - Get information about a project that can be used for quoting. This includes: - * A translation memory leverage report - * Word count - * Segment count - - operationId: getProjectReport - parameters: - - description: A unique Project identifier. - in: query - name: id - required: true - schema: - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectQuote' - description: An object that represents a Project quote. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Retrieve Project report - tags: - - Projects - x-accepts: application/json - /projects/{id}/revision: - get: - description: |+ - Get information about a project's revision report. This includes: - * Stats on accepted segments - * reviewer details - * Error rate - - operationId: getProjectRevisionReport - parameters: - - description: A unique Project identifier. - in: path - name: id - required: true - schema: - type: integer - responses: - "200": - content: {} - description: A csv file containing revision report. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Retrieve Project revision report - tags: - - Projects - x-accepts: application/json - /projects/status: - get: - description: |+ - Retrieve the status of a Project. - - operationId: getProjectStatus - parameters: - - description: A unique Project identifier. - in: query - name: id - required: true - schema: - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectStatus' - description: An object that represents a Project status report. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Retrieve Project status - tags: - - Projects - x-accepts: application/json - /qa: - get: - description: | - Perform QA checks on a target string. Optionally, you can specify a source string for additional bilingual checks, e.g. number consistency. - operationId: qaCheck - parameters: - - description: A target string to be checked. - in: query - name: target - required: true - schema: - type: string - - description: An ISO 639-1 language code. - in: query - name: trglang - required: true - schema: - type: string - - description: An optional source string. - in: query - name: source - schema: - type: string - - description: An ISO 639-1 language code. - in: query - name: srclang - schema: - type: string - - description: | - Any custom rules defined for this Memory will also be applied as part - of the QA check. - in: query - name: memory_id - schema: - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/QARuleMatches' - description: A QARuleMatches object. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Perform QA check - tags: - - QA - x-accepts: application/json - /segments: - delete: - description: | - Delete a Segment from memory. This will not delete a segment from a document. - operationId: deleteSegment - parameters: - - description: A unique Segment identifier. - in: query - name: id - required: true - schema: - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SegmentDeleteResponse' - description: A status object. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Delete a Segment - tags: - - Segments - x-accepts: application/json - get: - description: |+ - Retrieve a Segment. - - operationId: getSegment - parameters: - - description: A unique Segment identifier. - in: query - name: id - required: true - schema: - type: integer - - description: Include comments in the response. - in: query - name: include_comments - schema: - default: false - type: boolean - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SegmentWithComments' - description: A Segment object. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Retrieve a Segment - tags: - - Segments - x-accepts: application/json - post: - description: |+ - Create a Segment and add it to a Memory. A Segment is a source/target - pair that is used to train the machine translation system and populate - the translation memory. This is not intended to be used on documents and will throw an error. - - The maximum source length is 5,000 characters. - - operationId: createSegment - requestBody: - $ref: '#/components/requestBodies/SegmentCreateParameters' - content: - application/json: - schema: - example: - memory_id: 10641 - source: Code zur Fehleranalyse einschalten - document_id: 1876 - target: Enable debugging code - properties: - memory_id: - description: A unique Memory identifier. - example: 10641 - type: integer - document_id: - description: A unique Document identifier. - example: 1876 - type: integer - source: - description: The source string. - example: Code zur Fehleranalyse einschalten - type: string - target: - description: The target string. - example: Enable debugging code - type: string - required: - - source - title: SegmentCreateParameters - type: object - description: | - The Segment resource to create. - - To add a Segment to a Memory, include the `memory_id` and `target` parameters. - - To add a Segment to a Document, include the `document_id` and the `source` parameters. - The `target` parameter is optional. - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Segment' - description: A Segment object. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Create a Segment - tags: - - Segments - x-codegen-request-body-name: body - x-contentType: application/json - x-accepts: application/json - put: - description: |+ - Update a Segment in memory. The Memory will be updated with the new target string. - - operationId: updateSegment - requestBody: - $ref: '#/components/requestBodies/SegmentUpdateParameters' - content: - application/json: - schema: - example: - id: 84480010 - target: Enable debug code - properties: - id: - description: A unique Segment identifier. - example: 84480010 - type: integer - target: - description: The target string. - example: Enable debug code - type: string - required: - - id - - target - title: SegmentUpdateParameters - type: object - description: The Segment resource to update. - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Segment' - description: A Segment object. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Update a Segment - tags: - - Segments - x-codegen-request-body-name: body - x-contentType: application/json - x-accepts: application/json - /segments/review/unlock: - post: - description: | - Unaccept and unlock segments. - Sets individual segments' "Review Done" to false. Confirmed segments will remain confirmed. - - Example curl: - ``` - curl --X --request POST 'https://lilt.com/2/segments/review/unlock?key=API_KEY' \ - --header 'Content-Type: application/json' \ - --data-raw '{ - "segmentIds": [23921, 23922] - }' - ``` - operationId: unlockSegments - requestBody: - $ref: '#/components/requestBodies/SegmentDoneResponse' - content: - application/json: - schema: - example: - documentIds: - - 30032 - - 30125 - properties: - documentIds: - description: array of segment ids - example: - - 30032 - - 30125 - items: - type: number - type: array - required: - - documentIds - title: SegmentDoneResponse - type: object - description: segment ids to update - required: true - responses: - "200": - content: - application/json: - schema: - items: - type: number - title: SegmentDoneResponse - type: array - description: array of updated segments - summary: Unaccept and unlock segments - tags: - - Segments - x-codegen-request-body-name: body - x-contentType: application/json - x-accepts: application/json - /segments/tag: - get: - description: |+ - Project tags for a segment. The `source_tagged` string contains one or more SGML - tags. The `target` string is untagged. This endpoint will automatically place the - source tags in the target. - - Usage charges apply to this endpoint for production REST API keys. - - operationId: tagSegment - parameters: - - description: The tagged source string. - in: query - name: source_tagged - required: true - schema: - type: string - - description: The target string. - in: query - name: target - required: true - schema: - type: string - - description: A unique Memory identifier. - in: query - name: memory_id - required: true - schema: - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/TaggedSegment' - description: A TaggedSegment object. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Tag a Segment - tags: - - Segments - x-accepts: application/json - /settings: - post: - description: |+ - Create or update the value for the given setting and setting scope. - - Example CURL to set an organization-level setting: - - ``` - curl --location --request POST 'https://lilt.com/2/settings?key=' \ - --header 'Content-Type: application/json' \ - --data-raw '{ - "settingName": "requireBatchQaTranslator", - "value": false, - "organizationId": 285, - "scope": "Organization" - }' - ``` - - operationId: upsertSetting - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SettingUpsertBody' - required: false - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SettingUpsertResponse' - description: Updated settings object and updated active settings. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Update or create a setting - tags: - - Settings - x-codegen-request-body-name: body - x-contentType: application/json - x-accepts: application/json - /settings/organization: - get: - description: |+ - Get the organization-level settings for the active users organization - - Example CURL: - - ``` - curl --location --request GET 'https://lilt.com/2/settings/organization?key=' \ - ``` - - operationId: getOrganizationSettings - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SettingDictionary' - description: Organization settings dictionary. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Get organization-level settings - tags: - - Settings - x-accepts: application/json - /settings/project/{projectId}: - get: - description: |+ - Get the settings as applied to a specific project. - Active settings will combine project-level settings, organization-level settings and fallback to setting default values. - - Example CURL: - - ``` - curl --location --request GET 'https://lilt.com/2/settings/project/123?key=' \ - ``` - - operationId: getProjectSettings - parameters: - - description: A project id. - in: path - name: projectId - required: true - schema: - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SettingDictionary' - description: Project settings dictionary. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Get settings for a project - tags: - - Settings - x-accepts: application/json - /settings/user: - get: - description: |+ - Get the active settings applied to the authenticated user. - - Example CURL: - - ``` - curl --location --request GET 'https://lilt.com/2/settings/user?key=' \ - ``` - - operationId: getUserSettings - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SettingDictionary' - description: Settings dictionary. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Get settings for the authenticated user - tags: - - Settings - x-accepts: application/json - /translate: - get: - description: |+ - Translate a source string. - - Setting the `rich` parameter to `true` will change the response format - to include additional information about each translation including a - model score, word alignments, and formatting information. The rich - format can be seen in the example response on this page. - - By default, this endpoint also returns translation memory (TM) fuzzy matches, along - with associated scores. Fuzzy matches always appear ahead of machine translation - output in the response. - - The `source` parameter may be supplied in the query or in the request body. - - The maximum source length is 5,000 characters. - - Usage charges apply to this endpoint for production REST API keys. - - operationId: translateSegment - parameters: - - description: A unique Memory identifier. - in: query - name: memory_id - required: true - schema: - type: integer - - description: The source text to be translated. - in: query - name: source - schema: - type: string - - description: A source hash code. - in: query - name: source_hash - schema: - type: integer - - description: A target prefix. - in: query - name: prefix - schema: - type: string - - description: Return top n translations (deprecated). - in: query - name: "n" - schema: - default: 1 - type: integer - - description: Returns rich translation information (e.g., with word alignments). - in: query - name: rich - schema: - default: false - type: boolean - - description: Include translation memory fuzzy matches. - in: query - name: tm_matches - schema: - default: true - type: boolean - - description: Project tags. Projects tags in source to target if set to true. - in: query - name: project_tags - schema: - default: false - type: boolean - requestBody: - $ref: '#/components/requestBodies/TranslateSegmentBody' - content: - application/json: - schema: - example: - source: source - properties: - source: - description: A unique Segment identifier. - type: string - title: TranslateSegmentBody - type: object - description: The source text to be translated. - required: false - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/TranslationList' - description: A TranslationList object. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Translate a segment - tags: - - Translate - x-codegen-request-body-name: body - x-contentType: application/json - x-accepts: application/json - /translate/register: - get: - description: |+ - Register a source string for interactive translation. The `source_hash` value that is returned by this request is required by the `prefix` parameter for the translation endpoint. - The maximum source length is 5,000 characters. - Usage charges apply to this endpoint for production REST API keys. - - operationId: registerSegment - parameters: - - description: A source string to be registered. - in: query - name: source - required: true - schema: - type: string - - description: An ISO 639-1 language code. - in: query - name: srclang - required: true - schema: - type: string - - description: An ISO 639-1 language code. - in: query - name: trglang - required: true - schema: - type: string - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/TranslateRegisterResponse' - description: A status object. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Register a segment - tags: - - Translate - x-accepts: application/json - /translate/file: - get: - description: |+ - Get information about the one or more Files that are being translated with machine translation. Query filters are optional but at least one must be provided. - - Example CURL: - ``` - curl --X --request GET 'https://lilt.com/2/translate/file?key=API_KEY&translationIds=1,2&fromTime=1607966744&toTime=1707966744&status=InProgress' - ``` - - operationId: monitorFileTranslation - parameters: - - description: List of translation ids, comma separated - in: query - name: translationIds - schema: - type: string - - description: One of the translation statuses - `InProgress`, `Completed`, - `Failed`, `ReadyForDownload` - in: query - name: status - schema: - type: string - - description: Results after this time (inclusive) will be returned, specified - as seconds since the Unix epoch. - in: query - name: fromTime - schema: - type: number - - description: Results before this time (exclusive) will be returned, specified - as seconds since the Unix epoch. - in: query - name: toTime - schema: - type: number - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/TranslationInfo' - description: Translation info - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Monitor file translation - tags: - - Translate - x-accepts: application/json - post: - description: |+ - Start machine translation of one or more Files that have previously been uploaded. The response will include an `id` parameter that can be used to monitor and download the translations in subsequent calls. - - Example CURL: - ``` - curl --X --request POST 'https://lilt.com/2/translate/file?key=API_KEY&fileId=583&memoryId=2495&configId=123&withTM=true' - ``` - - operationId: batchTranslateFile - parameters: - - description: List of File ids to be translated, comma separated. - in: query - name: fileId - required: true - schema: - type: string - - description: Id of Memory to use in translation. - in: query - name: memoryId - required: true - schema: - type: string - - description: An optional pararameter to specify an import configuration to - be applied when extracting translatable content from this file. - in: query - name: configId - schema: - type: number - - description: An optional boolean parameter to toggle the use of Translation - Memory in the translation of the file. - in: query - name: withTM - schema: - type: boolean - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/TranslationInfo' - description: Translation info - default: - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - description: Unexpected error - summary: Translate a File - tags: - - Translate - x-accepts: application/json - /translate/files: - get: - description: |+ - Download a translated File. - - Example CURL: - ``` - curl --X --request GET 'https://lilt.com/2/translate/files?key=API_KEY&id=1' - ``` - - operationId: downloadFile - parameters: - - description: A translation id. - in: query - name: id - required: true - schema: - type: string - responses: - "200": - content: - application/octet-stream: - schema: - format: byte - title: DocumentDownloadResponse - type: string - description: A file. - summary: Download translated file - tags: - - Translate - x-accepts: application/octet-stream -components: - requestBodies: - LexiconUpdateParameters: - content: - application/json: - schema: - $ref: '#/components/schemas/LexiconUpdateParameters' - required: true - MemoryCreateParameters: - content: - application/json: - schema: - $ref: '#/components/schemas/MemoryCreateParameters' - required: true - SegmentDoneResponse: - content: - application/json: - schema: - $ref: '#/components/schemas/SegmentDoneResponse' - required: true - DocumentDoneUpdateParameters: - content: - application/json: - schema: - $ref: '#/components/schemas/DocumentDoneUpdateParameters' - required: true - CreateConverterConfigParameters: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateConverterConfigParameters' - required: false - DocumentUpdateParameters: - content: - application/json: - schema: - $ref: '#/components/schemas/DocumentUpdateParameters' - required: true - SegmentUpdateParameters: - content: - application/json: - schema: - $ref: '#/components/schemas/SegmentUpdateParameters' - required: true - DocumentDoneUpdateParameters_1: - content: - application/json: - schema: - $ref: '#/components/schemas/DocumentDoneUpdateParameters_1' - required: true - DocumentDoneUpdateParameters_2: - content: - application/json: - schema: - $ref: '#/components/schemas/DocumentDoneUpdateParameters_2' - required: true - MemoryUpdateParameters: - content: - application/json: - schema: - $ref: '#/components/schemas/MemoryUpdateParameters' - required: true - DocumentAssignmentParameters: - content: - application/json: - schema: - $ref: '#/components/schemas/DocumentAssignmentParameters' - required: true - EditFilterMappingParameters: - content: - application/json: - schema: - $ref: '#/components/schemas/EditFilterMappingParameters' - required: false - TranslateSegmentBody: - content: - application/json: - schema: - $ref: '#/components/schemas/TranslateSegmentBody' - required: false - SegmentCreateParameters: - content: - application/json: - schema: - $ref: '#/components/schemas/SegmentCreateParameters' - required: true - DocumentPretranslateParameters: - content: - application/json: - schema: - $ref: '#/components/schemas/DocumentPretranslateParameters' - required: true - JobCreateParameters: - content: - application/json: - schema: - $ref: '#/components/schemas/JobCreateParameters' - required: true - JobUpdateParameters: - content: - application/json: - schema: - $ref: '#/components/schemas/JobUpdateParameters' - required: false - DocumentParameters: - content: - application/json: - schema: - $ref: '#/components/schemas/DocumentParameters' - required: false - connector: - content: - application/json: - schema: - $ref: '#/components/schemas/connector' - required: true - ProjectCreateParameters: - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectCreateParameters' - required: true - ConnectorArguments: - content: - application/json: - schema: - $ref: '#/components/schemas/ConnectorArguments' - required: true - ProjectUpdateResponse: - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectUpdateResponse' - required: true - AddFileLabelRequest: - content: - application/json: - schema: - $ref: '#/components/schemas/AddFileLabelRequest' - required: true - schemas: - TranslationInfo: - description: | - Information describing a batch translation process. - example: - id: 1 - fileId: 2, - status: InProgress - createdAt: 1609357135 - properties: - id: - description: Unique identifier for this translation. - type: integer - fileId: - description: id of the File that is being translated. - type: integer - status: - description: Status of the translation - `InProgress`, `ReadyForDownload`, - `Completed`, `Failed`. - type: string - createdAt: - description: Time when this translation was started, in seconds since the - Unix epoch. - type: integer - errorMsg: - description: Error message, present when status is `Failed`. - type: string - type: object - Error: - description: | - Response in the event of an unexpected error. - example: - message: Internal server error. - properties: - message: - description: A human-readable message describing the error. - type: object - type: object - Connector: - description: | - A Connector is a Lilt managed api bridge between a content source and Lilt services. - example: - args: '{}' - schedule: schedule - updated_at: updated_at - healthy: true - name: name - created_at: created_at - id: 0 - last_check: last_check - properties: - id: - type: integer - name: - type: string - schedule: - type: string - last_check: - type: string - healthy: - type: boolean - args: - properties: {} - type: object - created_at: - type: string - updated_at: - type: string - type: object - ConnectorJob: - description: | - A ConnectorJob tracks the status of an import or export action. - example: - args: '{}' - updated_at: updated_at - created_at: created_at - id: 0 - status: status - properties: - id: - type: integer - status: - type: string - args: - properties: {} - type: object - created_at: - type: string - updated_at: - type: string - type: object - Job: - description: | - A Job is a collection of multiple Projects. Each project is specific to a language pair, and is associated with exactly one Memory for that language pair. The Memory association cannot be changed after the Project is created. - example: - due: 2021-06-03T13:43:00Z - stats: - exactWords: 0 - percentReviewed: 0 - projects: - - trgLocale: CA - isArchived: false - numSourceTokens: 2134 - createdAt: 2021-04-01T13:43:00.000Z - isDeleted: false - due: 2021-10-03T13:43:00.000Z - name: My new project - srcLocale: US - id: 0 - state: inProgress - memoryId: 2134 - trgLang: fr - srcLang: en - isComplete: false - updatedAt: 2021-06-03T13:43:00.000Z - - trgLocale: CA - isArchived: false - numSourceTokens: 2134 - createdAt: 2021-04-01T13:43:00.000Z - isDeleted: false - due: 2021-10-03T13:43:00.000Z - name: My new project - srcLocale: US - id: 0 - state: inProgress - memoryId: 2134 - trgLang: fr - srcLang: en - isComplete: false - updatedAt: 2021-06-03T13:43:00.000Z - uniqueLanguagePairs: 1 - percentTranslated: 0 - fuzzyWords: 0 - numLanguagePairs: 0 - newWords: 0 - numProjects: 0 - numDeliveredProjects: 0 - uniqueLinguists: 1 - sourceWords: 0 - creationStatus: COMPLETE - name: My New Job - isProcessing: 0 - id: 241 - deliveredAt: 2021-06-03T13:43:00Z - status: active - properties: - name: - description: A name for the job. - example: My New Job - type: string - creationStatus: - description: Status of job creation process that includes PENDING, COMPLETE, - and FAILED. - example: COMPLETE - type: string - deliveredAt: - example: 2021-06-03T13:43:00Z - format: date-time - type: string - status: - description: Current status of job that includes archived, delivered, and - active. - example: active - type: string - due: - description: An ISO string date. - example: 2021-06-03T13:43:00Z - format: date-time - type: string - id: - description: An id for the job. - example: 241 - type: integer - isProcessing: - description: Values include `1` while in progress, `0` when idle and `-2` - when processing failed. - example: 0 - type: integer - stats: - $ref: '#/components/schemas/JobStats' - type: object - JobStats: - description: | - A job stats shows an overview of job's statistical data including total number of exact words, fuzzy words, language pairs, projects, etc. - example: - exactWords: 0 - percentReviewed: 0 - projects: - - trgLocale: CA - isArchived: false - numSourceTokens: 2134 - createdAt: 2021-04-01T13:43:00.000Z - isDeleted: false - due: 2021-10-03T13:43:00.000Z - name: My new project - srcLocale: US - id: 0 - state: inProgress - memoryId: 2134 - trgLang: fr - srcLang: en - isComplete: false - updatedAt: 2021-06-03T13:43:00.000Z - - trgLocale: CA - isArchived: false - numSourceTokens: 2134 - createdAt: 2021-04-01T13:43:00.000Z - isDeleted: false - due: 2021-10-03T13:43:00.000Z - name: My new project - srcLocale: US - id: 0 - state: inProgress - memoryId: 2134 - trgLang: fr - srcLang: en - isComplete: false - updatedAt: 2021-06-03T13:43:00.000Z - uniqueLanguagePairs: 1 - percentTranslated: 0 - fuzzyWords: 0 - numLanguagePairs: 0 - newWords: 0 - numProjects: 0 - numDeliveredProjects: 0 - uniqueLinguists: 1 - sourceWords: 0 - properties: - exactWords: - description: Total number of exact words. - example: 0 - type: integer - fuzzyWords: - description: Total number of fuzzy words. - example: 0 - type: integer - newWords: - description: Total number of fuzzy words. - example: 0 - type: integer - numDeliveredProjects: - description: Total number of delivered projects. - example: 0 - type: integer - numLanguagePairs: - description: Total number of delivered projects. - example: 0 - type: integer - numProjects: - description: Total number of projects. - example: 0 - type: integer - percentReviewed: - description: Overall percentage of documents reviewed. - example: 0 - type: integer - percentTranslated: - example: 0 - type: integer - projects: - items: - $ref: '#/components/schemas/JobProject' - type: array - sourceWords: - description: Total number of source words. - example: 0 - type: integer - uniqueLanguagePairs: - description: Number of unique language pairs. - example: 1 - type: integer - uniqueLinguists: - description: Number of unique linguists. - example: 1 - type: integer - type: object - JobLeverageStats: - description: | - A job leverage stats object shows an overview of job's statistical data - including total number of exact words, fuzzy words, and exact words for - the job in total and for each project. - example: - exactWords: 0 - projects: - - exactWords: 0 - fuzzyWords: 0 - id: 0 - newWords: 0 - sourceWords: 0 - - exactWords: 0 - fuzzyWords: 0 - id: 0 - newWords: 0 - sourceWords: 0 - fuzzyWords: 0 - newWords: 0 - sourceWords: 0 - properties: - sourceWords: - description: Total number of source words. - example: 0 - type: integer - exactWords: - description: Total number of exact words. - example: 0 - type: integer - fuzzyWords: - description: Total number of fuzzy words. - example: 0 - type: integer - newWords: - description: Total number of new words. - example: 0 - type: integer - projects: - items: - $ref: '#/components/schemas/JobLeverageStats_projects' - type: array - type: object - JobProject: - description: | - A job project contains project statistcal data that belongs to a specific job. - example: - trgLocale: CA - isArchived: false - numSourceTokens: 2134 - createdAt: 2021-04-01T13:43:00.000Z - isDeleted: false - due: 2021-10-03T13:43:00.000Z - name: My new project - srcLocale: US - id: 0 - state: inProgress - memoryId: 2134 - trgLang: fr - srcLang: en - isComplete: false - updatedAt: 2021-06-03T13:43:00.000Z - properties: - id: - description: An id for the project. - type: integer - srcLang: - description: Source langauge, an ISO 639-1 language identifier. - example: en - type: string - srcLocale: - description: A locale identifier, supported for source langauge. - example: US - type: string - trgLang: - description: Target langauge, an ISO 639-1 language identifier. - example: fr - type: string - trgLocale: - description: A locale identifier, supported for target langauge. - example: CA - type: string - name: - description: A name for the project. - example: My new project - type: string - due: - description: An ISO date. - example: 2021-10-03T13:43:00.000Z - type: string - isComplete: - description: A state that checks project was completed. - example: false - type: boolean - isArchived: - description: The archived state of the project. - example: false - type: boolean - state: - description: Current state of the project. Example, backlog, inProgress, - inReview, done. - example: inProgress - type: string - numSourceTokens: - description: Total number of source tokens. - example: 2134 - type: integer - createdAt: - description: Time at which the object was created. - example: 2021-04-01T13:43:00.000Z - type: string - updatedAt: - description: Time at which the object was updated. - example: 2021-06-03T13:43:00.000Z - type: string - isDeleted: - description: A state that checks project was deleted. - example: false - type: boolean - memoryId: - description: A unique number identifying the associated Memory. - example: 2134 - type: integer - type: object - LanguagePair: - description: | - A language pair couples the source and target language along with memory and pre-translations settings associated to a project. - example: - pretranslate: true - autoAccept: true - trgLocale: DE - caseSensitive: true - configId: 2332 - dueDate: 2021-10-03T13:43:00.000Z - srcLocale: US - memoryId: 1241 - trgLang: de - takeMatchAttribution: true - srcLang: en - properties: - srcLang: - description: Source langauge, an ISO 639-1 language identifier. - example: en - type: string - srcLocale: - description: A locale identifier, supported for source langauge. - example: US - type: string - trgLang: - description: Target langauge, an ISO 639-1 language identifier. - example: de - type: string - trgLocale: - description: A locale identifier, supported for target language. - example: DE - type: string - dueDate: - description: An ISO date. - example: 2021-10-03T13:43:00.000Z - type: string - memoryId: - description: A unique number identifying the associated Memory. - example: 1241 - type: integer - pretranslate: - description: Attribute translation authorship of exact matches to the creator - of the document being pretranslated. - type: boolean - autoAccept: - description: Accept and lock exact matches. - example: true - type: boolean - caseSensitive: - description: Use case sensitive translation memory matching. - type: boolean - takeMatchAttribution: - description: Use MT for unmatched segments. - example: true - type: boolean - configId: - description: Configuration id - example: 2332 - type: integer - required: - - memoryId - - trgLang - type: object - Project: - description: | - A Project is a collection of zero or more Documents. It is specific to a language pair, and is associated with exactly one Memory for that language pair. The Memory association cannot be changed after the Project is created. - example: - metadata: - connectorType: github - notes: example metadata - trglocale: FR - document: - - srclang: en - created_at: 1489147692 - reviewer_email: reviewer@example.com - export_succeeded: false - trglang: de - import_in_progress: false - import_error_message: Could not parse XML. - import_succeeded: false - export_error_message: Could not parse XML. - updated_at: 1489147692 - project_id: 287 - name: Introduction.xliff - id: 46530 - export_in_progress: false - is_pretranslating: false - translator_email: translator@example.com - status: - pretranslation: idle - - srclang: en - created_at: 1489147692 - reviewer_email: reviewer@example.com - export_succeeded: false - trglang: de - import_in_progress: false - import_error_message: Could not parse XML. - import_succeeded: false - export_error_message: Could not parse XML. - updated_at: 1489147692 - project_id: 287 - name: Introduction.xliff - id: 46530 - export_in_progress: false - is_pretranslating: false - translator_email: translator@example.com - status: - pretranslation: idle - srclang: en - due_date: 1489147692 - created_at: 1489147692 - trglang: fr - archived: false - memory_id: 1234 - updated_at: 1489147692 - sample_review_percentage: 20 - job_id: 1234 - name: My New Project - id: 448 - state: backlog - srclocale: US - properties: - id: - description: A unique number identifying the Project. - example: 448 - type: integer - memory_id: - description: A unique number identifying the associated Memory. - example: 1234 - type: integer - job_id: - description: A unique number identifying the associated Job. - example: 1234 - type: integer - srclang: - description: An ISO 639-1 language identifier. - example: en - type: string - trglang: - description: An ISO 639-1 language identifier. - example: fr - type: string - srclocale: - description: A locale identifier, supported for srclang. - example: US - type: string - trglocale: - description: A locale identifier, supported for trglang. - example: FR - type: string - name: - description: A name for the project. - example: My New Project - type: string - state: - description: The project's state. The possible states are `backlog`, `inProgress`, - `inReview`, `inQA`, and `done`. - example: backlog - type: string - due_date: - description: The due date. Measured in seconds since the Unix epoch. - example: 1489147692 - type: integer - archived: - description: The archived state of the Project. - example: false - type: boolean - metadata: - description: A JSON object of key/value string pairs. Stores custom project - information. - example: - connectorType: github - notes: example metadata - properties: {} - type: object - sample_review_percentage: - description: The project's sample review percentage. - example: 20 - type: integer - created_at: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - example: 1489147692 - type: integer - updated_at: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - example: 1489147692 - type: integer - document: - description: A list of Documents. - items: - $ref: '#/components/schemas/DocumentWithoutSegments' - type: array - type: object - ProjectQuote: - description: | - Quoting information for a Project. - example: - num_source_words: 8000 - documents: - - num_source_words: 8000 - num_segments_new: 151 - num_segments_repetition: 2980000 - id: 21902 - num_words_repetition: 12 - bands: - - maximum_score: 85 - num_source_words: 151 - num_segments: 12 - minimum_score: 94 - - maximum_score: 85 - num_source_words: 151 - num_segments: 12 - minimum_score: 94 - num_words_new: 6039 - - num_source_words: 8000 - num_segments_new: 151 - num_segments_repetition: 2980000 - id: 21902 - num_words_repetition: 12 - bands: - - maximum_score: 85 - num_source_words: 151 - num_segments: 12 - minimum_score: 94 - - maximum_score: 85 - num_source_words: 151 - num_segments: 12 - minimum_score: 94 - num_words_new: 6039 - num_segments_new: 151 - num_segments_repetition: 2980000 - id: 21902 - num_words_repetition: 12 - bands: - - maximum_score: 85 - num_source_words: 151 - num_segments: 12 - minimum_score: 94 - - maximum_score: 85 - num_source_words: 151 - num_segments: 12 - minimum_score: 94 - num_words_new: 6039 - properties: - id: - description: A unique Project identifier. - example: 21902 - type: integer - num_source_words: - description: The number of source words in the Project. - example: 8000 - type: integer - num_words_new: - description: The number of new source words in the Project. - example: 6039 - type: integer - num_segments_new: - description: The number of new segments in the Project. - example: 151 - type: integer - num_words_repetition: - description: The number of repetition source words in the Project. - example: 12 - type: integer - num_segments_repetition: - description: The number of repetition segments in the Project. - example: 2980000 - type: integer - bands: - description: A list of MatchBand objects that represent translation memory - leverage statistics. - items: - $ref: '#/components/schemas/MatchBand' - type: array - documents: - description: A list of DocumentQuote objects that quotes information for - a Document. - items: - $ref: '#/components/schemas/DocumentQuote' - type: array - type: object - DocumentQuote: - description: | - Quoting information for a Document. - example: - num_source_words: 8000 - num_segments_new: 151 - num_segments_repetition: 2980000 - id: 21902 - num_words_repetition: 12 - bands: - - maximum_score: 85 - num_source_words: 151 - num_segments: 12 - minimum_score: 94 - - maximum_score: 85 - num_source_words: 151 - num_segments: 12 - minimum_score: 94 - num_words_new: 6039 - properties: - id: - description: A unique Document identifier. - example: 21902 - type: integer - num_source_words: - description: The number of source words in the Document. - example: 8000 - type: integer - num_words_new: - description: The number of new source words in the Document. - example: 6039 - type: integer - num_segments_new: - description: The number of new segments in the Document. - example: 151 - type: integer - num_words_repetition: - description: The number of repetition source words in the Document. - example: 12 - type: integer - num_segments_repetition: - description: The number of repetition segments in the Document. - example: 2980000 - type: integer - bands: - description: A list of MatchBand objects that represent translation memory - leverage statistics. - items: - $ref: '#/components/schemas/MatchBand' - type: array - type: object - MatchBand: - description: | - A translation memory match band. - example: - maximum_score: 85 - num_source_words: 151 - num_segments: 12 - minimum_score: 94 - properties: - minimum_score: - description: The minimum fuzzy match score. - example: 94 - type: integer - maximum_score: - description: The maximum fuzzy match score. - example: 85 - type: integer - num_source_words: - description: The number of source words in the band. - example: 151 - type: integer - num_segments: - description: The number of source segments in the band. - example: 12 - type: integer - type: object - ProjectStatus: - description: | - The status of a Project. - example: - time_elapsed_translation: 33487 - time_elapsed_review: 66521 - num_words_reviewed: 12 - num_source_words: 6039 - time_elapsed: 2980000 - resources: - - time_elapsed_review: 1172000 - num_words_reviewed: 182 - time_elapsed: 1172000 - num_words_new: 12 - time_elapsed_research: 1172000 - time_elapsed_translation: 1172000 - num_words_exact: 56 - num_words_fuzzy: 24 - num_segments_reviewed: 30 - name: Joe Strummer - num_words_confirmed: 151 - email: joe.strummer@lilt.com - num_segments_confirmed: 25 - - time_elapsed_review: 1172000 - num_words_reviewed: 182 - time_elapsed: 1172000 - num_words_new: 12 - time_elapsed_research: 1172000 - time_elapsed_translation: 1172000 - num_words_exact: 56 - num_words_fuzzy: 24 - num_segments_reviewed: 30 - name: Joe Strummer - num_words_confirmed: 151 - email: joe.strummer@lilt.com - num_segments_confirmed: 25 - id: 21902 - num_words_confirmed: 151 - time_elapsed_research: 912348 - properties: - id: - description: A unique Project identifier. - example: 21902 - type: integer - num_source_words: - description: The number of source words in the Project. - example: 6039 - type: integer - num_words_confirmed: - description: The number of confirmed source words. - example: 151 - type: integer - num_words_reviewed: - description: The number of reviewed source words. - example: 12 - type: integer - time_elapsed: - description: The total time spent on the project by all resources. Measured - in milliseconds. - example: 2980000 - type: integer - time_elapsed_translation: - description: The total time spent on translation by all resources. Measured - in milliseconds. - example: 33487 - type: integer - time_elapsed_research: - description: The total time spent on research by all resources. Measured - in milliseconds. - example: 912348 - type: integer - time_elapsed_review: - description: The total time spent on reviewing by all resources. Measured - in milliseconds. - example: 66521 - type: integer - resources: - description: A list of ResourceStatus objects that represent per-resource - statistics. - items: - $ref: '#/components/schemas/ResourceStatus' - type: array - type: object - ResourceStatus: - description: | - The status of a resource working on a Project. - example: - time_elapsed_review: 1172000 - num_words_reviewed: 182 - time_elapsed: 1172000 - num_words_new: 12 - time_elapsed_research: 1172000 - time_elapsed_translation: 1172000 - num_words_exact: 56 - num_words_fuzzy: 24 - num_segments_reviewed: 30 - name: Joe Strummer - num_words_confirmed: 151 - email: joe.strummer@lilt.com - num_segments_confirmed: 25 - properties: - email: - description: An email address. - example: joe.strummer@lilt.com - type: string - name: - description: The full name. - example: Joe Strummer - type: string - num_words_confirmed: - description: The number of source words confirmed. - example: 151 - type: integer - num_words_new: - description: The number of new source words confirmed. - example: 12 - type: integer - num_words_fuzzy: - description: The number of fuzzy match source words confirmed. - example: 24 - type: integer - num_words_exact: - description: The number of exact match source words confirmed. - example: 56 - type: integer - num_words_reviewed: - description: The number of source words reviewed. - example: 182 - type: integer - time_elapsed: - description: The total time spent on translation and research. Measured - in milliseconds. - example: 1172000 - type: integer - time_elapsed_translation: - description: The total time spent translating. Measured in milliseconds. - example: 1172000 - type: integer - time_elapsed_research: - description: The total time spent on research. Measured in milliseconds. - example: 1172000 - type: integer - time_elapsed_review: - description: The total time spent reviewing. Measured in milliseconds. - example: 1172000 - type: integer - num_segments_confirmed: - description: The number of source segments confirmed. - example: 25 - type: integer - num_segments_reviewed: - description: The number of source segments reviewed. - example: 30 - type: integer - type: object - SourceFile: - description: A SourceFile is an unprocessed source file that can later be added - to a project. - example: - detected_lang_confidence: 0.7 - file_hash: 3858f62230ac3c915f300c664312c63f - updated_at: 2000-01-23T04:56:07.000+00:00 - name: en_US.json - created_at: 2000-01-23T04:56:07.000+00:00 - id: 46530 - category: REFERENCE - detected_lang: de - labels: [] - properties: - id: - description: A unique number identifying the SourceFile. - example: 46530 - type: integer - name: - description: The file name. - example: en_US.json - type: string - file_hash: - description: A unique hash value associated with the file. An MD5 hash of - the file content will be used by default. - example: 3858f62230ac3c915f300c664312c63f - type: string - detected_lang: - description: Language associated with the file. - example: de - type: string - detected_lang_confidence: - description: Confidence score for the language associated with the file. - example: 0.7 - type: number - category: - description: The category of the file. The options are `REFERENCE`, or `API`. - The default is API. Files with the `REFERENCE` category will be displayed - as reference material. - example: REFERENCE - type: string - labels: - description: The list of labels associated with the file. - example: [] - items: - type: string - type: array - created_at: - description: Time at which the object was created. - format: date-time - type: string - updated_at: - description: Time at which the object was created. - format: date-time - type: string - type: object - DocumentWithoutSegments: - description: | - A Document is a collection of zero or more Segments. - example: - srclang: en - created_at: 1489147692 - reviewer_email: reviewer@example.com - export_succeeded: false - trglang: de - import_in_progress: false - import_error_message: Could not parse XML. - import_succeeded: false - export_error_message: Could not parse XML. - updated_at: 1489147692 - project_id: 287 - name: Introduction.xliff - id: 46530 - export_in_progress: false - is_pretranslating: false - translator_email: translator@example.com - status: - pretranslation: idle - properties: - id: - description: A unique number identifying the Document. - example: 46530 - type: integer - project_id: - description: A unique number identifying the Project. - example: 287 - type: integer - srclang: - description: An ISO 639-1 language identifier. - example: en - type: string - trglang: - description: An ISO 639-1 language identifier. - example: de - type: string - name: - description: The document name. - example: Introduction.xliff - type: string - import_in_progress: - description: True if the document is currently being imported - example: false - type: boolean - import_succeeded: - description: True if the import process succeeded. - example: false - type: boolean - import_error_message: - description: Error message if `import_succeeded=false` - example: Could not parse XML. - type: string - export_in_progress: - description: True if the document is currently being exported for download - example: false - type: boolean - export_succeeded: - description: True if the export process succeeded. - example: false - type: boolean - export_error_message: - description: Error message if `export_succeeded=false` - example: Could not parse XML. - type: string - is_pretranslating: - description: True if the document is currently being pretranslated. - example: false - type: boolean - status: - $ref: '#/components/schemas/DocumentWithoutSegments_status' - translator_email: - description: The email of the assigned translator. - example: translator@example.com - type: string - reviewer_email: - description: The email of the assigned reviewer. - example: reviewer@example.com - type: string - created_at: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - example: 1489147692 - type: integer - updated_at: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - example: 1489147692 - type: integer - type: object - DocumentWithSegments: - description: | - A Document is a collection of zero or more Segments. - example: - srclang: en - created_at: 1489147692 - reviewer_email: reviewer@example.com - export_succeeded: false - trglang: de - import_in_progress: false - segments: - - is_reviewed: true - memory_id: 5678 - updated_at: 1489147692 - is_confirmed: true - srclang: en - created_at: 1489147692 - id: 84480010 - source: The red bus. - document_id: 1234 - trglang: fr - target: Le bus rouge. - - is_reviewed: true - memory_id: 5678 - updated_at: 1489147692 - is_confirmed: true - srclang: en - created_at: 1489147692 - id: 84480010 - source: The red bus. - document_id: 1234 - trglang: fr - target: Le bus rouge. - import_error_message: Could not parse XML. - import_succeeded: false - export_error_message: Could not parse XML. - updated_at: 1489147692 - project_id: 287 - name: Introduction.xliff - id: 46530 - export_in_progress: false - is_pretranslating: false - translator_email: translator@example.com - status: - pretranslation: idle - properties: - id: - description: A unique number identifying the Document. - example: 46530 - type: integer - project_id: - description: A unique number identifying the Project. - example: 287 - type: integer - srclang: - description: An ISO 639-1 language identifier. - example: en - type: string - trglang: - description: An ISO 639-1 language identifier. - example: de - type: string - name: - description: The document name. - example: Introduction.xliff - type: string - import_in_progress: - description: True if the document is currently being imported - example: false - type: boolean - import_succeeded: - description: True if the import process succeeded. - example: false - type: boolean - import_error_message: - description: Error message if `import_succeeded=false` - example: Could not parse XML. - type: string - export_in_progress: - description: True if the document is currently being exported for download - example: false - type: boolean - export_succeeded: - description: True if the export process succeeded. - example: false - type: boolean - export_error_message: - description: Error message if `export_succeeded=false` - example: Could not parse XML. - type: string - is_pretranslating: - description: True if the document is currently being pretranslated. - example: false - type: boolean - status: - $ref: '#/components/schemas/DocumentWithoutSegments_status' - translator_email: - description: The email of the assigned translator. - example: translator@example.com - type: string - reviewer_email: - description: The email of the assigned reviewer. - example: reviewer@example.com - type: string - created_at: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - example: 1489147692 - type: integer - updated_at: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - example: 1489147692 - type: integer - segments: - description: A list of Segments. - items: - $ref: '#/components/schemas/Segment' - type: array - type: object - ConverterConfigMap: - additionalProperties: - type: string - description: | - A map of config ids to converter configs. - example: - "145": '{"registry": {".xlsx": {"type": "OkapiFprm", "version": 1, "filterName": - "okf_openxml", "filterConfig": "#v1\nbPreferenceTranslateDocProperties.b=false\nbPreferenceTranslateComments.b=true\nbPreferenceTranslatePowerpointNotes.b=true\nbPreferenceTranslatePowerpointMasters.b=true\nbPreferenceIgnorePlaceholdersInPowerpointMasters.b=false\nbPreferenceTranslateWordHeadersFooters.b=true\nbPreferenceTranslateWordHidden.b=false\nbPreferenceTranslateWordExcludeGraphicMetaData.b=true\nbPreferenceTranslatePowerpointHidden.b=false\nbPreferenceTranslateExcelHidden.b=false\nbPreferenceTranslateExcelExcludeColors.b=false\nbPreferenceTranslateExcelExcludeColumns.b=false\nbPreferenceTranslateExcelSheetNames.b=false\nbPreferenceAddLineSeparatorAsCharacter.b=false\nsPreferenceLineSeparatorReplacement=$0a$\nbPreferenceReplaceNoBreakHyphenTag.b=false\nbPreferenceIgnoreSoftHyphenTag.b=false\nbPreferenceAddTabAsCharacter.b=false\nbPreferenceAggressiveCleanup.b=true\nbPreferenceAutomaticallyAcceptRevisions.b=true\nbPreferencePowerpointIncludedSlideNumbersOnly.b=false\nbPreferenceTranslateExcelDiagramData.b=false\nbPreferenceTranslateExcelDrawings.b=false\nsubfilter=okf_plaintext\nbInExcludeMode.b=true\nbInExcludeHighlightMode.b=true\nbPreferenceTranslateWordExcludeColors.b=false\nbReorderPowerpointNotesAndComments.b=true\ntsComplexFieldDefinitionsToExtract.i=1\ncfd0=HYPERLINK\ntsExcelExcludedColors.i=0\ntsExcelExcludedColumns.i=0\ntsExcludeWordStyles.i=0\ntsWordHighlightColors.i=0\ntsWordExcludedColors.i=0\ntsPowerpointIncludedSlideNumbers.i=0\nbExtractExternalHyperlinks.b=false\n", - "extractAllTags": true, "exportReplacements": {"patterns": [], "replacements": - []}, "importReplacements": {"patterns": [], "replacements": []}}}}' - "432": '{"registry": {".md": {"type": "OkapiFprm", "version": 1, "filterName": - "okf_markdown", "filterConfig": "#v1\nuseCodeFinder.b=false\ntranslateUrls.b=true\nurlToTranslatePattern=.+\ntranslateCodeBlocks.b=false\ntranslateInlineCodeBlocks.b=true\ntranslateHeaderMetadata.b=true\ntranslateImageAltText.b=true\nuseLinkSubflow.b=true\ncodeFinderRules.count.i=1\ncodeFinderRules.rule0=\\{\\{[^}]+\\}\\}\ncodeFinderRules.sample={{#test}} - handle bar test {{/test}}$0a${{stand-alone handle bar}}$0a$\ncodeFinderRules.useAllRulesWhenTesting.b=true\n", - "extractAllTags": true, "exportReplacements": {"patterns": [], "replacements": - []}, "importReplacements": {"patterns": [], "replacements": []}}}' - type: object - LexiconEntry: - description: | - An Lexicon entry for a source term or phrase. - example: - examples: - - - source: Waschmaschine - sourceDelimiters: - - "" - - "" - target: - - washing - - machine - targetDelimiters: - - "" - - ' ' - - "" - sourceSpan: - start: 0 - length: 1 - targetSpan: - start: 1 - length: 1 - similarity: 0 - memoryId: 10641 - - - source: Waschmaschine - sourceDelimiters: - - "" - - "" - target: - - washing - - machine - targetDelimiters: - - "" - - ' ' - - "" - sourceSpan: - start: 0 - length: 1 - targetSpan: - start: 1 - length: 1 - similarity: 0 - memoryId: 10641 - translations: [] - properties: - translations: - description: A list of translations for the query term. - example: [] - items: - $ref: '#/components/schemas/LexiconEntry_translations' - type: array - examples: - description: A list of concordance examples for the query term. - items: - $ref: '#/components/schemas/LexiconEntry_examples' - type: array - type: object - DocumentPretranslating: - description: | - Document object for which pretranslation was requested. - example: - import_error_message: "" - import_succeeded: true - id: 123.0 - is_processing: false - is_pretranslating: true - import_in_progress: false - status: - pretranslation: running - properties: - id: - description: A status object indicating the pretranslation status. - example: 123.0 - type: number - import_in_progress: - description: Indicates that the document is being imported. - example: false - type: boolean - import_succeeded: - description: Indicates that the document was successfully imported. - example: true - type: boolean - import_error_message: - description: Indicates there was an error importing the document. - example: "" - type: string - is_processing: - description: Indicates the document is being processed. - example: false - type: boolean - is_pretranslating: - description: Indicates the document is being pretranslated. - example: true - type: boolean - status: - $ref: '#/components/schemas/DocumentPretranslating_status' +components: + requestBodies: + JobCreateParameters: + content: + application/json: + schema: + $ref: '#/components/schemas/JobCreateParameters' + required: true + JobUpdateParameters: + content: + application/json: + schema: + $ref: '#/components/schemas/JobUpdateParameters' + required: false + MemoryCreateParameters: + content: + application/json: + schema: + $ref: '#/components/schemas/MemoryCreateParameters' + required: true + CreateConverterConfigParameters: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateConverterConfigParameters' + required: true + ProjectCreateParameters: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectCreateParameters' + required: true + MemoryUpdateParameters: + content: + application/json: + schema: + $ref: '#/components/schemas/MemoryUpdateParameters' + required: true + TranslateSegmentBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TranslateSegmentBody' + required: false + AddFileLabelRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/AddFileLabelRequest' + required: true + schemas: + Error: + description: | + Response in the event of an unexpected error. + example: + message: Internal server error. + properties: + message: + description: A human-readable message describing the error. + type: object type: object Memory: description: | @@ -5459,9 +2496,9 @@ components: - resources - resources id: 1234 + is_processing: false srclocale: US version: 78 - num_segments: 1028 trglang: fr properties: id: @@ -5488,6 +2525,10 @@ components: description: A name for the Memory. example: Acme Corp Support Content type: string + is_processing: + description: Indicates the memory is being processed. + example: false + type: boolean version: description: The current version of the Memory, which is the number of updates since the memory was created. @@ -5503,10 +2544,6 @@ components: the Unix epoch. example: 1489147692 type: integer - num_segments: - description: The number of confirmed Segments incorporated into this Memory. - example: 1028 - type: integer resources: description: The resource files (translation memories and termbases) associated with this Memory. @@ -5514,6 +2551,56 @@ components: type: string type: array type: object + TranslationMemoryEntry: + description: A translation memory entry. + example: + score: 100 + metadata: '{}' + source: The red bus. + target: Le bus rouge. + properties: + source: + description: The source string. + example: The red bus. + type: string + target: + description: The target string. Tags will be automatically placed according + to the query string. + example: Le bus rouge. + type: string + score: + description: The fuzzy match score. + example: 100 + type: integer + metadata: + description: Attributes describing the translation memory entry. + properties: {} + type: object + type: object + SDLXLIFFFilter: + properties: + confName: + description: the current state of the SDLXLIFF Trans Unit. + enum: + - Translated + - Draft + - ApprovedTranslation + - Locked + - SignedOff + type: string + allowablePercentage: + description: This represents for the current conf_name what percentage the + filter applies to. If you pass -1 it will take any value for this field + and won't ignore blank values. If you pass 50, Lilt will only import Segments + that have a 50 percent match or better. + type: integer + allowUnlockedSegments: + description: Boolean that tells Lilt whether we should allow unlocked Segments + for this conf_name. + type: boolean + required: + - confName + type: object Translation: description: A machine translation (MT) or a translation memory (TM) match of a source segment. @@ -5648,886 +2735,1071 @@ components: $ref: '#/components/schemas/Translation' type: array type: object - Segment: + MonitorFileTranslationTypeError: description: | - A Segment is a source string and, optionally, its translation. A Segment can be associated with both a Memory and a Document. The Segment object contains additional metadata about the source and target strings. + Monitor file translation can have different errors based on reasons explained in the examples. example: - is_reviewed: true - memory_id: 5678 - updated_at: 1489147692 - is_confirmed: true - srclang: en - created_at: 1489147692 - id: 84480010 - source: The red bus. - document_id: 1234 - trglang: fr - target: Le bus rouge. + Unsupported_file_type: + message: Customer gave us garbage. + File_extraction_error: + message: Customer gave us garbage. + No_translatable_content: + message: Customer gave us an empty file. + Batch_MT_initiation_failure: + message: Something is wrong with MT. + Batch_MT_response_failure: + message: Something is wrong with MT. + File_reassembly_error: + message: We couldn't put the translated file back together.(okapi error) + Billing_error: + message: We couldn't log the information about the MT to our billing system. + Invalid_memory: + message: Something is wrong with the memory. + Storage_error: + message: Error occurred interacting with file storage. + type: object + TranslationInfo: + description: | + Information describing a batch translation process. + example: + id: 1 + fileId: 2, + status: InProgress + createdAt: 1609357135 properties: id: - description: A unique number identifying the Segment. - example: 84480010 - type: integer - created_at: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - example: 1489147692 - type: integer - updated_at: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - example: 1489147692 + description: Unique identifier for this translation. type: integer - document_id: - description: A unique Document identifier. - example: 1234 + fileId: + description: id of the File that is being translated. type: integer - memory_id: - description: The Memory with which this Segment is associated. - example: 5678 + status: + description: Status of the translation - `InProgress`, `ReadyForDownload`, + `Completed`, `Failed`. + type: string + createdAt: + description: Time when this translation was started, in seconds since the + Unix epoch. type: integer - source: - description: The source string. - example: The red bus. + errorMsg: + description: Error message, present when status is `Failed`. type: string - srclang: - description: An ISO 639-1 language code. + type: object + LiltCreateContent: + description: | + Content Parameters for LiltCreate. + example: + summary: summary + tone: tone + terms: terms + language: language + memoryId: memoryId + sections: + - sections + - sections + properties: + tone: + description: The tone of the content. + type: string + terms: + description: The terms of the content. + type: string + summary: + description: The summary of the content. + type: string + language: + description: The language of the content. + type: string + memoryId: + description: The memory ID of the content. + type: string + sections: + description: The sections of the content. + items: + type: string + type: array + type: object + JobProject: + description: | + A job project contains project statistical data that belongs to a specific job. + example: + trgLocale: CA + isArchived: false + workflowStatus: READY_TO_START + workflowName: Translate > Review > Analyst Review + numSourceTokens: 2134 + createdAt: 2021-04-01T13:43:00.000Z + isDeleted: false + due: 2021-10-03T13:43:00.000Z + name: My new project + srcLocale: US + id: 0 + state: inProgress + memoryId: 2134 + trgLang: fr + srcLang: en + isComplete: false + updatedAt: 2021-06-03T13:43:00.000Z + properties: + id: + description: An id for the project. + type: integer + srcLang: + description: Source language, an ISO 639-1 language identifier. example: en type: string - target: - description: The target string. - example: Le bus rouge. + srcLocale: + description: A locale identifier, supported for source language. + example: US type: string - trglang: - description: An ISO 639-1 language code. + trgLang: + description: Target language, an ISO 639-1 language identifier. example: fr type: string - is_confirmed: - description: The confirmation status. - example: true + trgLocale: + description: A locale identifier, supported for target language. + example: CA + type: string + name: + description: A name for the project. + example: My new project + type: string + due: + description: An ISO date. + example: 2021-10-03T13:43:00.000Z + type: string + isComplete: + description: A state that checks project was completed. + example: false type: boolean - is_reviewed: - description: The review status. - example: true + isArchived: + description: The archived state of the project. + example: false + type: boolean + state: + description: Current state of the project. Example, backlog, inProgress, + inReview, done. + example: inProgress + type: string + numSourceTokens: + description: Total number of source tokens. + example: 2134 + type: integer + createdAt: + description: Time at which the object was created. + example: 2021-04-01T13:43:00.000Z + type: string + updatedAt: + description: Time at which the object was updated. + example: 2021-06-03T13:43:00.000Z + type: string + isDeleted: + description: A state that checks project was deleted. + example: false type: boolean + memoryId: + description: A unique number identifying the associated Memory. + example: 2134 + type: integer + workflowStatus: + description: The status of the Workflow for the current project. + enum: + - READY_TO_START + - IN_PROGRESS + - DONE + example: READY_TO_START + type: string + workflowName: + description: Human readable name of the workflow associated with the current + project. + example: Translate > Review > Analyst Review + type: string type: object - SegmentWithComments: + JobStats: description: | - A Segment is a source string and, optionally, its translation. A Segment can be associated with both a Memory and a Document. The Segment object contains additional metadata about the source and target strings. + A job stats shows an overview of job's statistical data including total number of exact words, fuzzy words, language pairs, projects, etc. example: - is_reviewed: true - memory_id: 5678 - comments: - - is_resolved: true - user_id: 5678 - segment_revision_id: 5678 - annotations: - - text: mistranslation - - text: mistranslation - created_at: 1489147692 - id: 84480010 - text: This is incorrect. - document_id: 5678 - segment_id: 5678 - - is_resolved: true - user_id: 5678 - segment_revision_id: 5678 - annotations: - - text: mistranslation - - text: mistranslation - created_at: 1489147692 - id: 84480010 - text: This is incorrect. - document_id: 5678 - segment_id: 5678 - updated_at: 1489147692 - is_confirmed: true - srclang: en - created_at: 1489147692 - id: 84480010 - source: The red bus. - document_id: 1234 - trglang: fr - target: Le bus rouge. + percentReviewed: 0 + projects: + - trgLocale: CA + isArchived: false + workflowStatus: READY_TO_START + workflowName: Translate > Review > Analyst Review + numSourceTokens: 2134 + createdAt: 2021-04-01T13:43:00.000Z + isDeleted: false + due: 2021-10-03T13:43:00.000Z + name: My new project + srcLocale: US + id: 0 + state: inProgress + memoryId: 2134 + trgLang: fr + srcLang: en + isComplete: false + updatedAt: 2021-06-03T13:43:00.000Z + - trgLocale: CA + isArchived: false + workflowStatus: READY_TO_START + workflowName: Translate > Review > Analyst Review + numSourceTokens: 2134 + createdAt: 2021-04-01T13:43:00.000Z + isDeleted: false + due: 2021-10-03T13:43:00.000Z + name: My new project + srcLocale: US + id: 0 + state: inProgress + memoryId: 2134 + trgLang: fr + srcLang: en + isComplete: false + updatedAt: 2021-06-03T13:43:00.000Z + uniqueLanguagePairs: 1 + workflowStatus: READY_TO_START + numLanguagePairs: 0 + newWords: 0 + numProjects: 0 + numDeliveredProjects: 0 + uniqueLinguists: 1 + sourceWords: 0 + exactWords: 0 + percentTranslated: 0 + fuzzyWords: 0 properties: - id: - description: A unique number identifying the Segment. - example: 84480010 + exactWords: + description: Total number of exact words. + example: 0 type: integer - created_at: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - example: 1489147692 + fuzzyWords: + description: Total number of fuzzy words. + example: 0 type: integer - updated_at: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - example: 1489147692 + newWords: + description: Total number of fuzzy words. + example: 0 type: integer - document_id: - description: A unique Document identifier. - example: 1234 + numDeliveredProjects: + description: Total number of delivered projects. + example: 0 type: integer - memory_id: - description: The Memory with which this Segment is associated. - example: 5678 + numLanguagePairs: + description: Total number of delivered projects. + example: 0 type: integer - source: - description: The source string. - example: The red bus. - type: string - srclang: - description: An ISO 639-1 language code. - example: en - type: string - target: - description: The target string. - example: Le bus rouge. - type: string - trglang: - description: An ISO 639-1 language code. - example: fr - type: string - is_confirmed: - description: The confirmation status. - example: true - type: boolean - is_reviewed: - description: The review status. - example: true - type: boolean - comments: - description: A list of Comments. + numProjects: + description: Total number of projects. + example: 0 + type: integer + percentReviewed: + description: Overall percentage of documents reviewed. + example: 0 + type: integer + percentTranslated: + description: Overall percentage of documents translated. + example: 0 + type: integer + projects: items: - $ref: '#/components/schemas/Comment' + $ref: '#/components/schemas/JobProject' type: array + sourceWords: + description: Total number of source words. + example: 0 + type: integer + uniqueLanguagePairs: + description: Number of unique language pairs. + example: 1 + type: integer + uniqueLinguists: + description: Number of unique linguists. + example: 1 + type: integer + workflowStatus: + description: The status of the Workflow for the current job. + enum: + - READY_TO_START + - IN_PROGRESS + - DONE + example: READY_TO_START + type: string type: object - Comment: + Job: description: | - A Comment is a translator's or a reviewer's comment on a segment. + A Job is a collection of multiple Projects. Each project is specific to a language pair, and is associated with exactly one Memory for that language pair. The Memory association cannot be changed after the Project is created. example: - is_resolved: true - user_id: 5678 - segment_revision_id: 5678 - annotations: - - text: mistranslation - - text: mistranslation - created_at: 1489147692 - id: 84480010 - text: This is incorrect. - document_id: 5678 - segment_id: 5678 + due: 2021-06-03T13:43:00Z + stats: + percentReviewed: 0 + projects: + - trgLocale: CA + isArchived: false + workflowStatus: READY_TO_START + workflowName: Translate > Review > Analyst Review + numSourceTokens: 2134 + createdAt: 2021-04-01T13:43:00.000Z + isDeleted: false + due: 2021-10-03T13:43:00.000Z + name: My new project + srcLocale: US + id: 0 + state: inProgress + memoryId: 2134 + trgLang: fr + srcLang: en + isComplete: false + updatedAt: 2021-06-03T13:43:00.000Z + - trgLocale: CA + isArchived: false + workflowStatus: READY_TO_START + workflowName: Translate > Review > Analyst Review + numSourceTokens: 2134 + createdAt: 2021-04-01T13:43:00.000Z + isDeleted: false + due: 2021-10-03T13:43:00.000Z + name: My new project + srcLocale: US + id: 0 + state: inProgress + memoryId: 2134 + trgLang: fr + srcLang: en + isComplete: false + updatedAt: 2021-06-03T13:43:00.000Z + uniqueLanguagePairs: 1 + workflowStatus: READY_TO_START + numLanguagePairs: 0 + newWords: 0 + numProjects: 0 + numDeliveredProjects: 0 + uniqueLinguists: 1 + sourceWords: 0 + exactWords: 0 + percentTranslated: 0 + fuzzyWords: 0 + creationStatus: COMPLETE + name: My New Job + isProcessing: 0 + id: 241 + deliveredAt: 2021-06-03T13:43:00Z + status: active properties: - id: - description: A unique number identifying the Comment. - example: 84480010 - type: integer - text: - description: The comment text. - example: This is incorrect. + name: + description: A name for the job. + example: My New Job type: string - annotations: - description: A list of optional Annotations. - items: - $ref: '#/components/schemas/Annotation' - type: array - is_resolved: - description: Whether the Comment is resolved. - example: true - type: boolean - document_id: - description: The document to which the comment belongs. - example: 5678 - type: integer - segment_id: - description: The individual segment to which the comment applies. - example: 5678 - type: integer - segment_revision_id: - description: The revision of the individual segment to which the comment - applies. - example: 5678 - type: integer - user_id: - description: The user who created this comment. - example: 5678 + creationStatus: + description: Status of job creation process that includes PENDING, COMPLETE, + and FAILED. + example: COMPLETE + type: string + deliveredAt: + example: 2021-06-03T13:43:00Z + format: date-time + type: string + status: + description: Current status of job that includes archived, delivered, and + active. + example: active + type: string + due: + description: An ISO string date. + example: 2021-06-03T13:43:00Z + format: date-time + type: string + id: + description: An id for the job. + example: 241 type: integer - created_at: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - example: 1489147692 + isProcessing: + description: Values include `1` while in progress, `0` when idle and `-2` + when processing failed. + example: 0 type: integer + stats: + $ref: '#/components/schemas/JobStats' type: object - CommentBody: - description: | - The body of a comment being created or updated. + WorkflowStageAssignment: + description: An assignment object that associates a user to a workflow stage + template. example: - annotations: - - text: mistranslation - - text: mistranslation - text: Please update this segment - isResolved: "false" + workflowStageTemplateId: 12345 + userId: 123 + email: username@domain.com properties: - text: - description: The main comment value. - example: Please update this segment - type: string - annotations: - description: A list of optional Annotations. - items: - $ref: '#/components/schemas/Annotation' - type: array - isResolved: - example: "false" + workflowStageTemplateId: + example: 12345 + type: integer + userId: + example: 123 + type: integer + email: + example: username@domain.com type: string + required: + - workflowStageTemplateId type: object - DocumentComments: + LanguagePair: description: | - A set of comments for a given document, grouped with Segment ID as the key. + A language pair couples the source and target language along with memory and pre-translations settings associated to a project. example: - "1234567": - - is_resolved: true - user_id: 5678 - segment_revision_id: 5678 - annotations: - - text: mistranslation - - text: mistranslation - created_at: 1489147692 - id: 84480010 - text: This is incorrect. - document_id: 5678 - segment_id: 5678 - - is_resolved: true - user_id: 5678 - segment_revision_id: 5678 - annotations: - - text: mistranslation - - text: mistranslation - created_at: 1489147692 - id: 84480010 - text: This is incorrect. - document_id: 5678 - segment_id: 5678 + workflowStageAssignments: + - workflowStageTemplateId: 12345 + userId: 123 + email: username@domain.com + - workflowStageTemplateId: 12345 + userId: 123 + email: username@domain.com + pretranslate: true + trgLocale: DE + caseSensitive: true + dueDate: 2021-10-03T13:43:00.000Z + workflowTemplateName: 0 + takeMatchAttribution: true + externalModelId: 44 + workflowTemplateId: 14 + autoAccept: true + configId: 2332 + srcLocale: US + memoryId: 1241 + trgLang: de + srcLang: en properties: - "1234567": + srcLang: + description: Source language, an ISO 639-1 language identifier. + example: en + type: string + srcLocale: + description: A locale identifier, supported for source language. + example: US + type: string + trgLang: + description: Target language, an ISO 639-1 language identifier. + example: de + type: string + trgLocale: + description: A locale identifier, supported for target language. + example: DE + type: string + dueDate: + description: An ISO date. + example: 2021-10-03T13:43:00.000Z + type: string + memoryId: + description: A unique number identifying the associated Memory. + example: 1241 + type: integer + externalModelId: + description: A unique identifier for working with a third party model in + the Lilt Platform + example: 44 + type: integer + pretranslate: + description: Attribute translation authorship of exact matches to the creator + of the document being pretranslated. + type: boolean + autoAccept: + description: Accept and lock exact matches. + example: true + type: boolean + caseSensitive: + description: Use case sensitive translation memory matching. + type: boolean + takeMatchAttribution: + description: Use MT for unmatched segments. + example: true + type: boolean + configId: + description: Configuration id + example: 2332 + type: integer + workflowTemplateId: + description: Workflow Template id, to assign a specific Workflow to the + project created out of this Language Pair. WorkflowTemplateIds can be + retrieved via the /workflows/templates endpoint. If not specified then + the Job level workflowTemplateId will be used. + example: 14 + type: integer + workflowTemplateName: + description: Workflow Template Name, when passed with TeamId it allows for + an on the fly look up of the correct WorkflowTemplate to use. If workflowTemplateId + is passed the workflowTemplateId supercedes other lookups. + type: integer + workflowStageAssignments: items: - $ref: '#/components/schemas/Comment' + $ref: '#/components/schemas/WorkflowStageAssignment' type: array + required: + - memoryId + - trgLang type: object - Annotation: - description: | - A Comment's annotation. - example: - text: mistranslation - properties: - text: - description: The Comment's annotation text. - example: mistranslation - type: string - type: object - TaggedSegment: - description: A source string with tags automatically projected from source to - target. - example: - source_tagged: The red bus. - target_tagged: Le bus rouge. - properties: - source_tagged: - description: The tagged source string. - example: The red bus. - type: string - target_tagged: - description: The tagged target string. - example: Le bus rouge. - type: string - type: object - TranslationMemoryEntry: - description: A translation memory entry. + ProjectStats: example: - score: 100 - metadata: '{}' - source: The red bus. - target: Le bus rouge. + exactWords: 800 + fuzzyWords: 150 + id: 1 + newWords: 50 + sourceWords: 1000 properties: - source: - description: The source string. - example: The red bus. - type: string - target: - description: The target string. Tags will be automatically placed according - to the query string. - example: Le bus rouge. - type: string - score: - description: The fuzzy match score. - example: 100 + id: + example: 1 type: integer - metadata: - description: Attributes describing the translation memory entry. - properties: {} - type: object + sourceWords: + example: 1000 + type: integer + exactWords: + example: 800 + type: integer + fuzzyWords: + example: 150 + type: integer + newWords: + example: 50 + type: integer + required: + - exactWords + - fuzzyWords + - id + - newWords + - sourceWords type: object - QARuleMatches: - description: QA rules describing the errors in the text. + JobLeverageStats: + description: | + A job leverage stats object shows an overview of job's statistical data + including total number of exact words, fuzzy words, and exact words for + the job in total and for each project. example: - custom_rules: - - description: Mistake detected by a custom rule. - - description: Mistake detected by a custom rule. - matches: - - offset: 19 - context: - offset: 19 - length: 7 - text: This segment has a speling mistake - length: 7 - shortMessage: Spelling mistake - rule: - issueType: misspelling - subId: "" - urls: [] - description: Possible spelling mistake - id: MORFOLOGIK_RULE_EN_US - category: - name: Possible Typo - id: TYPOS - replacements: - - value: spelling - - value: spewing - - value: spieling - message: Possible spelling mistake found - - offset: 19 - context: - offset: 19 - length: 7 - text: This segment has a speling mistake - length: 7 - shortMessage: Spelling mistake - rule: - issueType: misspelling - subId: "" - urls: [] - description: Possible spelling mistake - id: MORFOLOGIK_RULE_EN_US - category: - name: Possible Typo - id: TYPOS - replacements: - - value: spelling - - value: spewing - - value: spieling - message: Possible spelling mistake found + exactWords: 0 + projects: + - exactWords: 800 + fuzzyWords: 150 + id: 1 + newWords: 50 + sourceWords: 1000 + - exactWords: 800 + fuzzyWords: 150 + id: 1 + newWords: 50 + sourceWords: 1000 + fuzzyWords: 0 + newWords: 0 + sourceWords: 0 properties: - matches: - items: - $ref: '#/components/schemas/QARuleMatches_matches' - type: array - custom_rules: + sourceWords: + description: Total number of source words. + example: 0 + type: integer + exactWords: + description: Total number of exact words. + example: 0 + type: integer + fuzzyWords: + description: Total number of fuzzy words. + example: 0 + type: integer + newWords: + description: Total number of new words. + example: 0 + type: integer + projects: items: - $ref: '#/components/schemas/QARuleMatches_custom_rules' + $ref: '#/components/schemas/ProjectStats' type: array type: object - SettingDictionary: - additionalProperties: - $ref: '#/components/schemas/Setting' - description: A dictionary of configuration settings, keyed by setting name - type: object - SettingUpsertResponse: - description: Response from upserting a setting - example: - activeSettings: - key: - isUserFacing: true - isDefault: true - valueType: valueType - name: name - id: 0 - scopedSetting: - isUserFacing: true - isDefault: true - valueType: valueType - name: name - id: 0 - properties: - scopedSetting: - $ref: '#/components/schemas/Setting' - activeSettings: - additionalProperties: - $ref: '#/components/schemas/Setting' - description: A dictionary of configuration settings, keyed by setting name - type: object - type: object - Setting: - description: A configuration setting. + DocumentWithoutSegments: + description: | + A Document is a collection of zero or more Segments. example: - isUserFacing: true - isDefault: true - valueType: valueType - name: name - id: 0 + customer_reviewer_email: reviewer@example.com + srclang: en + created_at: 1489147692 + reviewer_email: reviewer@example.com + export_succeeded: false + trglang: de + is_review_complete: true + import_in_progress: false + import_error_message: Could not parse XML. + import_succeeded: false + export_error_message: Could not parse XML. + updated_at: 1489147692 + project_id: 287 + name: Introduction.xliff + id: 46530 + export_in_progress: false + is_pretranslating: false + translator_email: translator@example.com + status: + pretranslation: idle properties: id: - description: The identifier of the setting. - format: int32 + description: A unique number identifying the Document. + example: 46530 type: integer - name: - description: The name of the setting. + project_id: + description: A unique number identifying the Project. + example: 287 + type: integer + srclang: + description: An ISO 639-1 language identifier. + example: en type: string - valueType: - description: the type of value the setting may have - Boolean, Json, Number, - String. + trglang: + description: An ISO 639-1 language identifier. + example: de + type: string + name: + description: The document name. + example: Introduction.xliff type: string - isUserFacing: - description: Whether the setting is editable by the user. + import_in_progress: + description: True if the document is currently being imported + example: false type: boolean - isDefault: - description: True when the setting value is inherited from the default setting. + import_succeeded: + description: True if the import process succeeded. + example: false type: boolean - type: object - SettingUpsertBody: - description: Body to create or update a setting. - example: - organizationId: 123.0 - scope: Organization - isEnforced: true - projectId: 0.8008281904610115 - settingName: requireBatchQaTranslator - properties: - settingName: - description: The name of the setting. - example: requireBatchQaTranslator + import_error_message: + description: Error message if `import_succeeded=false` + example: Could not parse XML. type: string - scope: - description: The entity scope the setting should be applied to. - example: Organization + export_in_progress: + description: True if the document is currently being exported for download + example: false + type: boolean + export_succeeded: + description: True if the export process succeeded. + example: false + type: boolean + export_error_message: + description: Error message if `export_succeeded=false` + example: Could not parse XML. type: string - isEnforced: - description: | - Whether this value should override others set for the same setting key. + is_pretranslating: + description: True if the document is currently being pretranslated. + example: false type: boolean - projectId: - description: | - Id of the the project the setting will be applied to. Required when scope is `Project`. - type: number - organizationId: - description: | - Id of the the project the setting will be applied to. Required when scope is `Organization`. - example: 123.0 - type: number - type: object - ApiRoot: - example: - api_name: Lilt REST API v2 - api_root: /2 - properties: - api_name: - example: Lilt REST API v2 + status: + $ref: '#/components/schemas/DocumentWithoutSegments_status' + translator_email: + description: The email of the assigned translator. + example: translator@example.com type: string - api_root: - example: /2 + reviewer_email: + description: The email of the assigned reviewer. + example: reviewer@example.com type: string - title: ApiRoot - type: object - FileDeleteResponse: - example: - deleted: true - id: 12345 - properties: - id: - description: A unique File identifier. - example: 12345 + customer_reviewer_email: + description: The email of the assigned customer reviewer. Only present if + the project was request by id. + example: reviewer@example.com + type: string + created_at: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + example: 1489147692 type: integer - deleted: - description: If the operation succeeded, then `true`. Otherwise, `false`. + updated_at: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + example: 1489147692 + type: integer + is_review_complete: + description: Document review status. example: true type: boolean - title: FileDeleteResponse type: object - AddFileLabelRequest: - example: - name: label_name - properties: - name: - description: The Label name. - example: label_name - type: string - title: AddFileLabelRequest - type: object - CommentDeleteResponse: + Project: + description: | + A Project is a collection of zero or more Documents. It is specific to a language pair, and is associated with exactly one Memory for that language pair. The Memory association cannot be changed after the Project is created. example: - id: 12345 + metadata: + connectorType: github + notes: example metadata + trglocale: FR + workflowStatus: READY_TO_START + document: + - customer_reviewer_email: reviewer@example.com + srclang: en + created_at: 1489147692 + reviewer_email: reviewer@example.com + export_succeeded: false + trglang: de + is_review_complete: true + import_in_progress: false + import_error_message: Could not parse XML. + import_succeeded: false + export_error_message: Could not parse XML. + updated_at: 1489147692 + project_id: 287 + name: Introduction.xliff + id: 46530 + export_in_progress: false + is_pretranslating: false + translator_email: translator@example.com + status: + pretranslation: idle + - customer_reviewer_email: reviewer@example.com + srclang: en + created_at: 1489147692 + reviewer_email: reviewer@example.com + export_succeeded: false + trglang: de + is_review_complete: true + import_in_progress: false + import_error_message: Could not parse XML. + import_succeeded: false + export_error_message: Could not parse XML. + updated_at: 1489147692 + project_id: 287 + name: Introduction.xliff + id: 46530 + export_in_progress: false + is_pretranslating: false + translator_email: translator@example.com + status: + pretranslation: idle + srclang: en + due_date: 1489147692 + created_at: 1489147692 + trglang: fr + archived: false + memory_id: 1234 + updated_at: 1489147692 + sample_review_percentage: 20 + job_id: 1234 + name: My New Project + id: 448 + state: backlog + srclocale: US properties: id: - description: A unique Comment identifier. - example: 12345 + description: A unique number identifying the Project. + example: 448 type: integer - title: CommentDeleteResponse - type: object - ConnectorArguments: - example: - args: '{}' - schedule: 0 0 * * * - name: zendesk - id: 46530 - properties: - id: - description: A unique Connector identifier. - example: 46530 + memory_id: + description: A unique number identifying the associated Memory. + example: 1234 type: integer - name: - description: Name of connector. - example: zendesk + job_id: + description: A unique number identifying the associated Job. + example: 1234 + type: integer + srclang: + description: An ISO 639-1 language identifier. + example: en type: string - args: - description: Connector parameters. - properties: {} - type: object - schedule: - description: Cron string - example: 0 0 * * * + trglang: + description: An ISO 639-1 language identifier. + example: fr + type: string + srclocale: + description: A locale identifier, supported for srclang. + example: US + type: string + trglocale: + description: A locale identifier, supported for trglang. + example: FR type: string - title: ConnectorArguments - type: object - connector: - properties: name: - description: Name of connector. + description: A name for the project. + example: My New Project + type: string + state: + description: The project's state. The possible states are `backlog`, `inProgress`, + `inReview`, `inQA`, and `done`. + example: backlog type: string - args: - description: Connector parameters. + due_date: + description: The due date. Measured in seconds since the Unix epoch. + example: 1489147692 + type: integer + archived: + description: The archived state of the Project. + example: false + type: boolean + metadata: + description: A JSON object of key/value string pairs. Stores custom project + information. + example: + connectorType: github + notes: example metadata properties: {} type: object - schedule: - description: Cron string - example: 0 0 * * * + sample_review_percentage: + description: The project's sample review percentage. + example: 20 + type: integer + created_at: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + example: 1489147692 + type: integer + updated_at: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + example: 1489147692 + type: integer + workflowStatus: + description: The status of the Workflow for the current project. This may + not be present for all project endpoints even with workflows enabled. + enum: + - READY_TO_START + - IN_PROGRESS + - DONE + example: READY_TO_START type: string - title: connector + document: + description: A list of Documents. + items: + $ref: '#/components/schemas/DocumentWithoutSegments' + type: array type: object - ConnectorDeleteResponse: + Segment: + description: | + A Segment is a source string and, optionally, its translation. A Segment can be associated with both a Memory and a Document. The Segment object contains additional metadata about the source and target strings. example: - deleted: true - id: 12345 + is_reviewed: true + memory_id: 5678 + updated_at: 1489147692 + is_confirmed: true + srclang: en + created_at: 1489147692 + id: 84480010 + source: The red bus. + document_id: 1234 + trglang: fr + target: Le bus rouge. properties: id: - description: A unique Connector identifier. - example: 12345 + description: A unique number identifying the Segment. + example: 84480010 type: integer - deleted: - description: If the operation succeeded, then `true`. Otherwise, `false`. - example: true - type: boolean - title: ConnectorDeleteResponse - type: object - CreateConverterConfigParameters: - example: - configName: my_config - configJson: '{"registry": {".md": {"type": "OkapiFprm", "version": 1, "filterName": - "okf_markdown", "filterConfig": "#v1\nuseCodeFinder.b=false\ntranslateUrls.b=true\nurlToTranslatePattern=.+\ntranslateCodeBlocks.b=false\ntranslateInlineCodeBlocks.b=true\ntranslateHeaderMetadata.b=true\ntranslateImageAltText.b=true\nuseLinkSubflow.b=true\ncodeFinderRules.count.i=1\ncodeFinderRules.rule0=\\{\\{[^}]+\\}\\}\ncodeFinderRules.sample={{#test}} - handle bar test {{/test}}$0a${{stand-alone handle bar}}$0a$\ncodeFinderRules.useAllRulesWhenTesting.b=true\n", - "extractAllTags": true, "exportReplacements": {"patterns": [], "replacements": - []}, "importReplacements": {"patterns": [], "replacements": []}}}' - configDescription: config for custom markdown escaping - properties: - configJson: - description: The configuration json blob, string escaped. - example: '{"registry": {".md": {"type": "OkapiFprm", "version": 1, "filterName": - "okf_markdown", "filterConfig": "#v1\nuseCodeFinder.b=false\ntranslateUrls.b=true\nurlToTranslatePattern=.+\ntranslateCodeBlocks.b=false\ntranslateInlineCodeBlocks.b=true\ntranslateHeaderMetadata.b=true\ntranslateImageAltText.b=true\nuseLinkSubflow.b=true\ncodeFinderRules.count.i=1\ncodeFinderRules.rule0=\\{\\{[^}]+\\}\\}\ncodeFinderRules.sample={{#test}} - handle bar test {{/test}}$0a${{stand-alone handle bar}}$0a$\ncodeFinderRules.useAllRulesWhenTesting.b=true\n", - "extractAllTags": true, "exportReplacements": {"patterns": [], "replacements": - []}, "importReplacements": {"patterns": [], "replacements": []}}}' - type: string - configName: - description: The user defined name of your configuration. - example: my_config - type: string - configDescription: - description: A description for the configuration. - example: config for custom markdown escaping - type: string - required: - - configDescription - - configJson - - configName - title: CreateConverterConfigParameters - type: object - ConverterConfigUpdateResponse: - example: - configId: 0 - properties: - configId: + created_at: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + example: 1489147692 type: integer - title: ConverterConfigUpdateResponse - type: object - inline_response_200: - example: - configId: 0 - properties: - configId: + updated_at: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + example: 1489147692 type: integer - type: object - EditFilterMappingParameters: - example: - configName: my_config - configDescription: config for custom markdown escaping - registryEntryJson: '{"type": "OkapiFprm", "version": 1, "filterName": "okf_markdown", - "filterConfig": "#v1\nuseCodeFinder.b=false\ntranslateUrls.b=true\nurlToTranslatePattern=.+\ntranslateCodeBlocks.b=false\ntranslateInlineCodeBlocks.b=true\ntranslateHeaderMetadata.b=true\ntranslateImageAltText.b=true\nuseLinkSubflow.b=true\ncodeFinderRules.count.i=1\ncodeFinderRules.rule0=\\{\\{[^}]+\\}\\}\ncodeFinderRules.sample={{#test}} - handle bar test {{/test}}$0a${{stand-alone handle bar}}$0a$\ncodeFinderRules.useAllRulesWhenTesting.b=true\n", - "extractAllTags": true, "exportReplacements": {"patterns": [], "replacements": - []}, "importReplacements": {"patterns": [], "replacements": []}' - properties: - registryEntryJson: - description: The filter mapping json blob, string escaped. - example: '{"type": "OkapiFprm", "version": 1, "filterName": "okf_markdown", - "filterConfig": "#v1\nuseCodeFinder.b=false\ntranslateUrls.b=true\nurlToTranslatePattern=.+\ntranslateCodeBlocks.b=false\ntranslateInlineCodeBlocks.b=true\ntranslateHeaderMetadata.b=true\ntranslateImageAltText.b=true\nuseLinkSubflow.b=true\ncodeFinderRules.count.i=1\ncodeFinderRules.rule0=\\{\\{[^}]+\\}\\}\ncodeFinderRules.sample={{#test}} - handle bar test {{/test}}$0a${{stand-alone handle bar}}$0a$\ncodeFinderRules.useAllRulesWhenTesting.b=true\n", - "extractAllTags": true, "exportReplacements": {"patterns": [], "replacements": - []}, "importReplacements": {"patterns": [], "replacements": []}' + document_id: + description: A unique Document identifier. + example: 1234 + type: integer + memory_id: + description: The Memory with which this Segment is associated. + example: 5678 + type: integer + source: + description: The source string. + example: The red bus. + type: string + srclang: + description: An ISO 639-1 language code. + example: en type: string - configName: - description: The user defined name of your configuration. - example: my_config + target: + description: The target string. + example: Le bus rouge. type: string - configDescription: - description: A description for the configuration. - example: config for custom markdown escaping + trglang: + description: An ISO 639-1 language code. + example: fr type: string - required: - - configDescription - - configName - title: EditFilterMappingParameters + is_confirmed: + description: The confirmation status. + example: true + type: boolean + is_reviewed: + description: The review status. + example: true + type: boolean type: object - DocumentUpdateParameters: + DocumentWithSegments: + description: | + A Document is a collection of zero or more Segments. example: - name: Introduction to our App + srclang: en + created_at: 1489147692 + reviewer_email: reviewer@example.com + export_succeeded: false + trglang: de + is_review_complete: true + import_in_progress: false + segments: + - is_reviewed: true + memory_id: 5678 + updated_at: 1489147692 + is_confirmed: true + srclang: en + created_at: 1489147692 + id: 84480010 + source: The red bus. + document_id: 1234 + trglang: fr + target: Le bus rouge. + - is_reviewed: true + memory_id: 5678 + updated_at: 1489147692 + is_confirmed: true + srclang: en + created_at: 1489147692 + id: 84480010 + source: The red bus. + document_id: 1234 + trglang: fr + target: Le bus rouge. + import_error_message: Could not parse XML. + import_succeeded: false + export_error_message: Could not parse XML. + updated_at: 1489147692 + project_id: 287 + name: Introduction.xliff id: 46530 + export_in_progress: false + is_pretranslating: false + translator_email: translator@example.com + status: + pretranslation: idle properties: id: - description: A unique Document identifier. + description: A unique number identifying the Document. example: 46530 type: integer - name: - description: The Document name. - example: Introduction to our App + project_id: + description: A unique number identifying the Project. + example: 287 + type: integer + srclang: + description: An ISO 639-1 language identifier. + example: en + type: string + trglang: + description: An ISO 639-1 language identifier. + example: de type: string - required: - - id - - name - title: DocumentUpdateParameters - type: object - DocumentParameters: - example: - project_id: 23618 - name: Introduction.xliff - properties: name: description: The document name. example: Introduction.xliff type: string - project_id: - description: A unique Project identifier. - example: 23618 - type: integer - required: - - name - - project_id - title: DocumentParameters - type: object - DocumentDeleteResponse: - example: - deleted: true - id: 46530 - properties: - id: - description: A unique Document identifier. - example: 46530 - type: integer - deleted: - description: If the operation succeeded, then `true`. Otherwise, `false`. - example: true - type: boolean - title: DocumentDeleteResponse - type: object - DocumentAssignmentParameters: - example: - is_reviewer: false - due_date: 2000-01-23T04:56:07.000+00:00 - is_translator: true - id: 46530 - email: user@email.com - properties: - id: - description: A unique Document identifier. - example: 46530 - type: integer - email: - description: An email address. - example: user@email.com - type: string - is_translator: - description: If true, assign for translating. If false, then unassign. - example: true + import_in_progress: + description: True if the document is currently being imported + example: false type: boolean - is_reviewer: - description: If true, assign for reviewing. If false, then unassign. + import_succeeded: + description: True if the import process succeeded. example: false type: boolean - due_date: - description: Due date for translation or review (set based on `is_translator` - and `is_reviewer` flags). - format: date-time + import_error_message: + description: Error message if `import_succeeded=false` + example: Could not parse XML. type: string - required: - - email - - id - title: DocumentAssignmentParameters - type: object - DocumentAssignmentResponse: - example: - id: 46530 - properties: - id: - description: A unique Document identifier. - example: 46530 - type: integer - title: DocumentAssignmentResponse - type: object - DocumentPretranslateParameters: - example: - mode: tm+mt - attribute_to_creator: false - case_sensitive: false - id: - - 123 - - 234 - auto_accept: false - properties: - id: - description: A list of unique Document identifiers. - example: - - 123 - - 234 - items: - type: integer - type: array - auto_accept: - description: Optional parameter for auto-accepting 100% TM hits. + export_in_progress: + description: True if the document is currently being exported for download example: false type: boolean - case_sensitive: - description: Optional for using case matching against TM hits.. + export_succeeded: + description: True if the export process succeeded. example: false type: boolean - attribute_to_creator: - description: Optional parameter for attributing translation authorship of - exact matches to document creator. + export_error_message: + description: Error message if `export_succeeded=false` + example: Could not parse XML. + type: string + is_pretranslating: + description: True if the document is currently being pretranslated. example: false type: boolean - mode: - description: | - An optional parameter indicating how the document will be pretranslated. - - The accepted values are `tm`, or `tm+mt`. Default is `tm`. - example: tm+mt + status: + $ref: '#/components/schemas/DocumentWithoutSegments_status' + translator_email: + description: The email of the assigned translator. + example: translator@example.com type: string - required: - - id - title: DocumentPretranslateParameters - type: object - DocumentPretranslateResponse: - example: - documents: - - import_error_message: "" - import_succeeded: true - id: 123.0 - is_processing: false - is_pretranslating: true - import_in_progress: false - status: - pretranslation: running - - import_error_message: "" - import_succeeded: true - id: 123.0 - is_processing: false - is_pretranslating: true - import_in_progress: false - status: - pretranslation: running - id: - - 123 - - 234 - is_pretranslating: true - properties: - id: - description: A list of documents being pretranslated. - example: - - 123 - - 234 - items: - type: integer - type: array - is_pretranslating: - description: If the operation succeeded, then `true`. Otherwise, `false`. + reviewer_email: + description: The email of the assigned reviewer. + example: reviewer@example.com + type: string + created_at: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + example: 1489147692 + type: integer + updated_at: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + example: 1489147692 + type: integer + is_review_complete: + description: Document review status. example: true type: boolean - documents: - description: Document pretranslation status. + segments: + description: A list of Segments. items: - $ref: '#/components/schemas/DocumentPretranslating' + $ref: '#/components/schemas/Segment' type: array - title: DocumentPretranslateResponse type: object - DocumentDoneUpdateParameters: + SourceFile: + description: A SourceFile is an unprocessed source file that can later be added + to a project. example: - documentIds: - - 10641 - - 10642 - properties: - documentIds: - description: array of document ids - example: - - 10641 - - 10642 - items: - type: number - type: array - required: - - documentIds - title: DocumentDoneUpdateParameters - type: object - DocumentDoneUpdateParameters_1: - properties: - documentIds: - description: array of document ids - example: - - 10641 - - 10642 - items: - type: number - type: array - isDone: - example: true - type: boolean - required: - - documentIds - - isDone - title: DocumentDoneUpdateParameters - type: object - DocumentDoneUpdateParameters_2: + detected_lang_confidence: 0.7 + file_hash: 3858f62230ac3c915f300c664312c63f + updated_at: 2019-10-16T22:12:34Z + name: en_US.json + created_at: 2019-10-16T22:12:34Z + id: 46530 + category: REFERENCE + detected_lang: de + labels: [] properties: - documentIds: - description: array of document ids - example: - - 10641 - - 10642 + id: + description: A unique number identifying the SourceFile. + example: 46530 + type: integer + name: + description: The file name. + example: en_US.json + type: string + file_hash: + description: A unique hash value associated with the file. An MD5 hash of + the file content will be used by default. + example: 3858f62230ac3c915f300c664312c63f + type: string + detected_lang: + description: Language associated with the file. + example: de + type: string + detected_lang_confidence: + description: Confidence score for the language associated with the file. + example: 0.7 + type: number + category: + description: The category of the file. The options are `REFERENCE`, or `API`. + The default is API. Files with the `REFERENCE` category will be displayed + as reference material. + example: REFERENCE + type: string + labels: + description: The list of labels associated with the file. + example: [] items: - type: number + type: string type: array - isDone: - example: true - type: boolean - required: - - documentIds - - isDone - title: DocumentDoneUpdateParameters + created_at: + description: Time at which the object was created. + example: 2019-10-16T22:12:34Z + format: date-time + type: string + updated_at: + description: Time at which the object was created. + example: 2019-10-16T22:12:34Z + format: date-time + type: string type: object LanguagesResponse: example: @@ -6569,45 +3841,6 @@ components: type: object title: LanguagesResponse type: object - LexiconUpdateParameters: - example: - memory_id: 10641 - source: washing machine - target: Waschmaschine - properties: - memory_id: - description: A unique Memory identifier. - example: 10641 - type: integer - source: - description: The source side of the lexicon entry. - example: washing machine - type: string - target: - description: The target side of the lexicon entry. - example: Waschmaschine - type: string - required: - - memory_id - - source - - target - title: LexiconUpdateParameters - type: object - LexiconUpdateResponse: - example: - memory_id: 46530 - success: true - properties: - memory_id: - description: A unique Memory identifier. - example: 46530 - type: integer - success: - description: If the operation succeeded, then `true`. Otherwise, `false`. - example: true - type: boolean - title: LexiconUpdateResponse - type: object MemoryUpdateParameters: example: name: Automotive Memory @@ -6675,104 +3908,182 @@ components: type: boolean title: MemoryDeleteResponse type: object - MemoryUpdateResponse: + MemoryImportResponse: example: + isProcessing: 1 id: 123 - num_updates: 0 properties: id: description: A unique Memory identifier. example: 123 type: integer - num_updates: - description: The number of updates to the Memory. + isProcessing: + description: The current state of the import. + example: 1 type: integer - title: MemoryUpdateResponse + title: MemoryImportResponse type: object - MemoryInsertResponse: + TermbaseExportResponse: example: id: 123 - num_updates: 107 + is_processing: 1 properties: id: description: A unique Memory identifier. example: 123 type: integer - num_updates: - description: The number of updates to the Memory. - example: 107 + is_processing: + description: The current state of the import. + example: 1 type: integer - title: MemoryInsertResponse + title: TermbaseExportResponse type: object - MemorySyncDeleteResponse: + DeleteSegmentFromMemoryResponse: example: - id: 123 - num_updates: 107 + success: true properties: - id: + success: + type: boolean + title: DeleteSegmentFromMemoryResponse + type: object + TranslateSegmentBody: + example: + memory_id: 0 + tm_matches: true + prefix: prefix + containsICUData: false + rich: false + source: source + source_hash: 6 + n: 1 + project_tags: false + properties: + source: + description: A unique Segment identifier. + type: string + memory_id: description: A unique Memory identifier. - example: 123 type: integer - num_updates: - description: The number of updates to the Memory. - example: 107 + source_hash: + description: A source hash code. + type: integer + n: + description: Return top n translations (deprecated). type: integer - title: MemorySyncDeleteResponse + prefix: + description: A target prefix + type: string + rich: + default: false + description: Returns rich translation information (e.g., with word alignments). + type: boolean + tm_matches: + default: true + description: Include translation memory fuzzy matches. + type: boolean + project_tags: + default: false + description: Project tags. Projects tags in source to target if set to true. + type: boolean + containsICUData: + default: false + description: Contains ICU data. If true then tags in the source following + the ICU standard will be parsed and retained. + type: boolean + required: + - memory_id + title: TranslateSegmentBody type: object - MemoryImportResponse: + CreateConverterConfigParameters: example: - isProcessing: 1 - id: 123 + signedAgreement: true + properties: + signedAgreement: + description: Signifies that the Organization has signed the agreement or + not. + type: boolean + required: + - signedAgreement + title: CreateConverterConfigParameters + type: object + signLiltCreateTermsResponse: + example: + signedAgreement: true + properties: + signedAgreement: + description: Whether or not the agreement has been signed. + example: true + type: boolean + title: signLiltCreateTermsResponse + type: object + inline_response_200: + example: + id: 0 properties: id: - description: A unique Memory identifier. - example: 123 - type: integer - isProcessing: - description: The current state of the import. - example: 1 + description: The ID of the deleted Lilt Create content. type: integer - title: MemoryImportResponse type: object JobCreateParameters: example: languagePairs: - - pretranslate: true - autoAccept: true + - workflowStageAssignments: + - workflowStageTemplateId: 12345 + userId: 123 + email: username@domain.com + - workflowStageTemplateId: 12345 + userId: 123 + email: username@domain.com + pretranslate: true trgLocale: DE caseSensitive: true - configId: 2332 dueDate: 2021-10-03T13:43:00.000Z + workflowTemplateName: 0 + takeMatchAttribution: true + externalModelId: 44 + workflowTemplateId: 14 + autoAccept: true + configId: 2332 srcLocale: US memoryId: 1241 trgLang: de - takeMatchAttribution: true srcLang: en - - pretranslate: true - autoAccept: true + - workflowStageAssignments: + - workflowStageTemplateId: 12345 + userId: 123 + email: username@domain.com + - workflowStageTemplateId: 12345 + userId: 123 + email: username@domain.com + pretranslate: true trgLocale: DE caseSensitive: true - configId: 2332 dueDate: 2021-10-03T13:43:00.000Z + workflowTemplateName: 0 + takeMatchAttribution: true + externalModelId: 44 + workflowTemplateId: 14 + autoAccept: true + configId: 2332 srcLocale: US memoryId: 1241 trgLang: de - takeMatchAttribution: true srcLang: en - due: 2021-10-05T14:48:00.000Z + workflowTemplateId: 123 fileIds: - 298 - 299 + due: 2021-10-05T14:48:00.000Z name: My new Job + srcLocale: US + isPlural: true + workflowTemplateName: 6 + srcLang: en properties: name: description: A name for the Job. example: My new Job type: string - due: - description: An ISO string date. - example: 2021-10-05T14:48:00.000Z - type: string languagePairs: description: Language pairs is a set of one or more pairs that includes source language, source locale(optional), target language, target locale(optional), @@ -6788,16 +4099,46 @@ components: items: type: integer type: array + due: + description: An ISO string date representing job due date. + example: 2021-10-05T14:48:00.000Z + type: string + srcLang: + description: 2-letter ISO source language code + example: en + type: string + srcLocale: + description: 2-letter source language code + example: US + type: string + isPlural: + description: A boolean value representing if the files have plurals. + example: true + type: boolean + workflowTemplateId: + description: Identifier of the workflow template to be used when creating + a job. If not passed the organization default will be used. + example: 123 + type: integer + workflowTemplateName: + description: Name of the workflow template to be used, must be passed with + teamId or look up will fail. If workflowTemplateId is passed it supercedes + any other look up. + type: integer required: - fileIds - languagePairs - name + - srcLang + - srcLocale title: JobCreateParameters type: object JobUpdateParameters: example: dueDate: 0 name: My new Job + isProcessing: ExportError + processingErrorMsg: Authentication failed. Check your Contentful API Key. properties: name: description: A name for the Job. @@ -6806,6 +4147,24 @@ components: dueDate: description: An ISO string date. type: integer + isProcessing: + description: | + The processing status of the job. Provide one of the following + integers to indicate the status. + + Ok = 0 + Started = 1 + ExportError = -2 + enum: + - "0" + - "1" + - -2 + example: ExportError + type: string + processingErrorMsg: + description: The processing error message. + example: Authentication failed. Check your Contentful API Key. + type: string title: JobUpdateParameters type: object JobDeleteResponse: @@ -6818,63 +4177,13 @@ components: type: integer title: JobDeleteResponse type: object - ProjectUpdateResponse: - example: - archived: false - metadata: - connectorType: github - notes: example metadata - sample_review_percentage: 20 - name: Walker Percy Essays - due_date: 1489147692 - id: 1234 - state: backlog - properties: - id: - description: A unique Project identifier. - example: 1234 - type: integer - name: - description: The Project name. - example: Walker Percy Essays - type: string - state: - description: The project's state. The possible states are 'backlog', 'inProgress', - 'inReview', 'inQA', and 'done' - example: backlog - type: string - due_date: - description: The due date. Measured in seconds since the Unix epoch. - example: 1489147692 - type: integer - archived: - description: True if the project is archived. Otherwise, false. - example: false - type: boolean - metadata: - description: Metadata associated with a project. This field must be valid - JSON. - example: - connectorType: github - notes: example metadata - properties: {} - type: object - sample_review_percentage: - description: The Project's sample review percentage. Must be an integer - between 10 and 100, a multiple of 10 and greater than minimum value (displayed - in error message). - example: 20 - type: integer - required: - - id - title: ProjectUpdateResponse - type: object ProjectCreateParameters: example: metadata: connectorType: github notes: example metadata memory_id: 1234 + workflowTemplateId: 14 job_id: 1234 name: My new project due_date: 1489147692 @@ -6906,6 +4215,12 @@ components: notes: example metadata properties: {} type: object + workflowTemplateId: + description: The workflow template used to create this project. WorkflowTemplateIds + can be retrieved via the /workflows/templates endpoint. If not specified + then the organization default workflowTemplateId will be used. + example: 14 + type: integer required: - memory_id - name @@ -6926,137 +4241,30 @@ components: type: boolean title: ProjectDeleteResponse type: object - SegmentUpdateParameters: - example: - id: 84480010 - target: Enable debug code - properties: - id: - description: A unique Segment identifier. - example: 84480010 - type: integer - target: - description: The target string. - example: Enable debug code - type: string - required: - - id - - target - title: SegmentUpdateParameters - type: object - SegmentCreateParameters: - example: - memory_id: 10641 - source: Code zur Fehleranalyse einschalten - document_id: 1876 - target: Enable debugging code - properties: - memory_id: - description: A unique Memory identifier. - example: 10641 - type: integer - document_id: - description: A unique Document identifier. - example: 1876 - type: integer - source: - description: The source string. - example: Code zur Fehleranalyse einschalten - type: string - target: - description: The target string. - example: Enable debugging code - type: string - required: - - source - title: SegmentCreateParameters - type: object - SegmentDeleteResponse: + FileDeleteResponse: example: deleted: true - id: 46530 + id: 12345 properties: id: - description: A unique Segment identifier. - example: 46530 + description: A unique File identifier. + example: 12345 type: integer deleted: description: If the operation succeeded, then `true`. Otherwise, `false`. example: true type: boolean - title: SegmentDeleteResponse - type: object - SegmentDoneResponse: - example: - documentIds: - - 30032 - - 30125 - properties: - documentIds: - description: array of segment ids - example: - - 30032 - - 30125 - items: - type: number - type: array - required: - - documentIds - title: SegmentDoneResponse + title: FileDeleteResponse type: object - TranslateSegmentBody: + AddFileLabelRequest: example: - source: source + name: label_name properties: - source: - description: A unique Segment identifier. + name: + description: The Label name. + example: label_name type: string - title: TranslateSegmentBody - type: object - TranslateRegisterResponse: - example: - num_words: 88 - source_hash: 11476 - properties: - source_hash: - description: A unique source token required by the `prefix` parameter for - translation requests. - example: 11476 - type: integer - num_words: - description: The number of billed words in the segment. - example: 88 - type: integer - title: TranslateRegisterResponse - type: object - JobLeverageStats_projects: - example: - exactWords: 0 - fuzzyWords: 0 - id: 0 - newWords: 0 - sourceWords: 0 - properties: - id: - description: The Project ID. - example: 0 - type: integer - sourceWords: - description: Total number of source words. - example: 0 - type: integer - exactWords: - description: Total number of exact words. - example: 0 - type: integer - fuzzyWords: - description: Total number of fuzzy words. - example: 0 - type: integer - newWords: - description: Total number of fuzzy words. - example: 0 - type: integer + title: AddFileLabelRequest type: object DocumentWithoutSegments_status: description: A list of translations for the query term. @@ -7064,7 +4272,6 @@ components: pretranslation: idle properties: pretranslation: - description: "" enum: - idle - pending @@ -7072,276 +4279,6 @@ components: example: idle type: string type: object - LexiconEntry_translations: - properties: - source: - description: The source string. - type: string - target: - description: The target string. - type: string - frequency: - description: The frequency of the term in the Lexicon. - type: number - memory_id: - description: | - A unique Memory identifier. If this identifier is missing, then - the term comes from the generic termbase. - type: number - type: object - LexiconEntry_sourceSpan: - description: An object that indicates where the query term appears in the source. - properties: - start: - description: | - The zero-indexed start index when `source` is split on whitespace. - type: number - length: - description: | - The length in words after `start` of the source query term. - type: number - type: object - LexiconEntry_targetSpan: - description: | - An object that indicates the location in the target of contiguous - words that align with the source query. - properties: - start: - description: | - The zero-indexed start index when `target` is split on whitespace. - type: number - length: - description: | - The length in words after `start` of the target aligned - phrase. - type: number - type: object - LexiconEntry_examples: - example: - - source: Waschmaschine - sourceDelimiters: - - "" - - "" - target: - - washing - - machine - targetDelimiters: - - "" - - ' ' - - "" - sourceSpan: - start: 0 - length: 1 - targetSpan: - start: 1 - length: 1 - similarity: 0 - memoryId: 10641 - properties: - source: - description: The source string. - type: string - sourceDelimiters: - description: | - A format string that indicates, for each word, if the source word - should be preceded by a space. - items: - type: string - type: array - target: - description: The target string - type: string - targetDelimiters: - description: | - A format string that indicates, for each word, if the target word - should be preceded by a space. - items: - type: string - type: array - sourceSpan: - $ref: '#/components/schemas/LexiconEntry_sourceSpan' - targetSpan: - $ref: '#/components/schemas/LexiconEntry_targetSpan' - similarity: - type: number - memory_id: - description: | - A unique Memory identifier. If this identifier is missing, then - the term comes from the generic concordance. - type: number - type: object - DocumentPretranslating_status: - description: A status object indicating the pretranslation status. - example: - pretranslation: running - properties: - pretranslation: - description: "" - example: running - type: string - type: object - QARuleMatches_context: - example: - offset: 19 - length: 7 - text: This segment has a speling mistake - properties: - length: - description: The length of the error in characters in the context. - example: 7 - type: integer - offset: - description: The 0-based character offset of the error in the context text. - example: 19 - type: integer - text: - description: Context of the error, i.e. the error and some text to the left - and to the left. - example: This segment has a speling mistake - type: string - required: - - length - - offset - - text - type: object - QARuleMatches_replacements: - properties: - value: - description: the replacement string - type: string - type: object - QARuleMatches_rule_category: - example: - name: Possible Typo - id: TYPOS - properties: - id: - description: A category's identifier that's unique for this language. - example: TYPOS - type: string - name: - description: A short description of the category. - example: Possible Typo - type: string - type: object - QARuleMatches_rule_urls: - properties: - value: - description: the URL - type: string - type: object - QARuleMatches_rule: - example: - issueType: misspelling - subId: "" - urls: [] - description: Possible spelling mistake - id: MORFOLOGIK_RULE_EN_US - category: - name: Possible Typo - id: TYPOS - properties: - category: - $ref: '#/components/schemas/QARuleMatches_rule_category' - description: - example: Possible spelling mistake - type: string - id: - description: An rule's identifier that's unique for this language. - example: MORFOLOGIK_RULE_EN_US - type: string - issueType: - description: The Localization Quality Issue Type. This is not defined for - all languages, in which case it will always be 'Uncategorized'. - example: misspelling - type: string - subId: - description: An optional sub identifier of the rule, used when several rules - are grouped. - example: "" - type: string - urls: - description: An optional array of URLs with a more detailed description - of the error. - example: [] - items: - $ref: '#/components/schemas/QARuleMatches_rule_urls' - type: array - required: - - category - - description - - id - type: object - QARuleMatches_matches: - example: - offset: 19 - context: - offset: 19 - length: 7 - text: This segment has a speling mistake - length: 7 - shortMessage: Spelling mistake - rule: - issueType: misspelling - subId: "" - urls: [] - description: Possible spelling mistake - id: MORFOLOGIK_RULE_EN_US - category: - name: Possible Typo - id: TYPOS - replacements: - - value: spelling - - value: spewing - - value: spieling - message: Possible spelling mistake found - properties: - context: - $ref: '#/components/schemas/QARuleMatches_context' - length: - description: The length of the error in characters. - example: 7 - type: integer - message: - description: Message about the error displayed to the user. - example: Possible spelling mistake found - type: string - offset: - description: The 0-based character offset of the error in the text. - example: 19 - type: integer - replacements: - description: Replacements that might correct the error. The array can be - empty, in this case there is no suggested replacement. - example: - - value: spelling - - value: spewing - - value: spieling - items: - $ref: '#/components/schemas/QARuleMatches_replacements' - type: array - rule: - $ref: '#/components/schemas/QARuleMatches_rule' - shortMessage: - description: An optional shorter version of 'message'. - example: Spelling mistake - type: string - required: - - context - - length - - message - - offset - - replacements - type: object - QARuleMatches_custom_rules: - example: - description: Mistake detected by a custom rule. - properties: - description: - description: A QA warning defined by a custom rule. - example: Mistake detected by a custom rule. - type: string - type: object securitySchemes: BasicAuth: scheme: basic diff --git a/docs/CreateApi.md b/docs/CreateApi.md new file mode 100644 index 000000000..9d87a9d96 --- /dev/null +++ b/docs/CreateApi.md @@ -0,0 +1,673 @@ +# CreateApi + +All URIs are relative to *https://api.lilt.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteLiltCreateContent**](CreateApi.md#deleteLiltCreateContent) | **DELETE** /v2/create/{contentId} | Delete Lilt Create content +[**generateLiltCreateContent**](CreateApi.md#generateLiltCreateContent) | **POST** /v2/create | Generate new Lilt Create content +[**getLiltCreateById**](CreateApi.md#getLiltCreateById) | **GET** /v2/create/{contentId} | Get Lilt Create content by ID. +[**getLiltCreateContent**](CreateApi.md#getLiltCreateContent) | **GET** /v2/create | Get Lilt Create content +[**getLiltCreatePreferences**](CreateApi.md#getLiltCreatePreferences) | **GET** /v2/create/preferences | Get Lilt Create preferences +[**regenerateLiltCreateContent**](CreateApi.md#regenerateLiltCreateContent) | **GET** /v2/create/{contentId}/create | Regenerate Lilt Create content +[**signLiltCreateTerms**](CreateApi.md#signLiltCreateTerms) | **POST** /v2/create/terms-and-conditions | Sign the Lilt Create terms and conditions +[**updateLiltCreateContent**](CreateApi.md#updateLiltCreateContent) | **PUT** /v2/create/{contentId} | Update Lilt Create content +[**updateLiltCreatePreferences**](CreateApi.md#updateLiltCreatePreferences) | **PUT** /v2/create/preferences | Update Lilt Create preferences + + + +# **deleteLiltCreateContent** +> InlineResponse200 deleteLiltCreateContent(contentId) + +Delete Lilt Create content + +Delete a piece of Lilt Create content. Example CURL: ``` curl --X --request DELETE 'https://api.lilt.com/v2/create/1234?key=API_KEY' ``` + +### Example +```java +// Import classes: +import com.lilt.client.ApiClient; +import com.lilt.client.ApiException; +import com.lilt.client.Configuration; +import com.lilt.client.auth.*; +import com.lilt.client.models.*; +import com.lilt.client.api.CreateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.lilt.com"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + CreateApi apiInstance = new CreateApi(defaultClient); + Integer contentId = 56; // Integer | The content ID. + try { + InlineResponse200 result = apiInstance.deleteLiltCreateContent(contentId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CreateApi#deleteLiltCreateContent"); + 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 +------------- | ------------- | ------------- | ------------- + **contentId** | **Integer**| The content ID. | + +### Return type + +[**InlineResponse200**](InlineResponse200.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The Delete Lilt Create Content Response. | - | + + +# **generateLiltCreateContent** +> generateLiltCreateContent(templateParams) + +Generate new Lilt Create content + +Generate new Lilt Create content with the given parameters. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/create?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"language\":\"en-US\", \"template\":\"blog-post\", \"templateParams\":{ \"contentLength\":\"100\", \"language\":\"en-US\", \"sections\":[], \"summary\":\"a blog post about hiking\" }, \"preferences\":{\"tone\":\"formal\",\"styleguide\":\"\"} }' ``` + +### Example +```java +// Import classes: +import com.lilt.client.ApiClient; +import com.lilt.client.ApiException; +import com.lilt.client.Configuration; +import com.lilt.client.auth.*; +import com.lilt.client.models.*; +import com.lilt.client.api.CreateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.lilt.com"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + CreateApi apiInstance = new CreateApi(defaultClient); + LiltCreateContent templateParams = new LiltCreateContent(); // LiltCreateContent | Input parameters that determine what content will be generated. + try { + apiInstance.generateLiltCreateContent(templateParams); + } catch (ApiException e) { + System.err.println("Exception when calling CreateApi#generateLiltCreateContent"); + 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 +------------- | ------------- | ------------- | ------------- + **templateParams** | [**LiltCreateContent**](LiltCreateContent.md)| Input parameters that determine what content will be generated. | + +### Return type + +null (empty response body) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | An event stream produced by Server Side Events. The following events are supported. - message: an object with the newly generated text (e.g. {\"text\": \"hello\"}) - message: upon completion of events the string \"[DONE]\" will be emitted - fullcontent: an object containing the full response | - | + + +# **getLiltCreateById** +> LiltCreateContent getLiltCreateById(contentId) + +Get Lilt Create content by ID. + +Get Lilt Create content by ID. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/create/1234?key=API_KEY' ``` + +### Example +```java +// Import classes: +import com.lilt.client.ApiClient; +import com.lilt.client.ApiException; +import com.lilt.client.Configuration; +import com.lilt.client.auth.*; +import com.lilt.client.models.*; +import com.lilt.client.api.CreateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.lilt.com"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + CreateApi apiInstance = new CreateApi(defaultClient); + Integer contentId = 56; // Integer | The content ID. + try { + LiltCreateContent result = apiInstance.getLiltCreateById(contentId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CreateApi#getLiltCreateById"); + 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 +------------- | ------------- | ------------- | ------------- + **contentId** | **Integer**| The content ID. | + +### Return type + +[**LiltCreateContent**](LiltCreateContent.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The Lilt Create content. | - | + + +# **getLiltCreateContent** +> List<LiltCreateContent> getLiltCreateContent() + +Get Lilt Create content + +Get a list of all content that has been generated by Lilt Create. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/create?key=API_KEY' ``` + +### Example +```java +// Import classes: +import com.lilt.client.ApiClient; +import com.lilt.client.ApiException; +import com.lilt.client.Configuration; +import com.lilt.client.auth.*; +import com.lilt.client.models.*; +import com.lilt.client.api.CreateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.lilt.com"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + CreateApi apiInstance = new CreateApi(defaultClient); + try { + List result = apiInstance.getLiltCreateContent(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CreateApi#getLiltCreateContent"); + 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 + +[**List<LiltCreateContent>**](LiltCreateContent.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | An object with a documents next task Workflow metadata. | - | + + +# **getLiltCreatePreferences** +> getLiltCreatePreferences() + +Get Lilt Create preferences + +Get the stored preferences for Lilt Create. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/create/preferences?key=API_KEY' ``` + +### Example +```java +// Import classes: +import com.lilt.client.ApiClient; +import com.lilt.client.ApiException; +import com.lilt.client.Configuration; +import com.lilt.client.auth.*; +import com.lilt.client.models.*; +import com.lilt.client.api.CreateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.lilt.com"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + CreateApi apiInstance = new CreateApi(defaultClient); + try { + apiInstance.getLiltCreatePreferences(); + } catch (ApiException e) { + System.err.println("Exception when calling CreateApi#getLiltCreatePreferences"); + 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 + +null (empty response body) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | An object describing the stored preferences. | - | + + +# **regenerateLiltCreateContent** +> regenerateLiltCreateContent(contentId) + +Regenerate Lilt Create content + +Regenerate the given piece of content with the current parameters. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/create/1234/create?key=API_KEY' ``` + +### Example +```java +// Import classes: +import com.lilt.client.ApiClient; +import com.lilt.client.ApiException; +import com.lilt.client.Configuration; +import com.lilt.client.auth.*; +import com.lilt.client.models.*; +import com.lilt.client.api.CreateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.lilt.com"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + CreateApi apiInstance = new CreateApi(defaultClient); + Integer contentId = 56; // Integer | The content ID. + try { + apiInstance.regenerateLiltCreateContent(contentId); + } catch (ApiException e) { + System.err.println("Exception when calling CreateApi#regenerateLiltCreateContent"); + 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 +------------- | ------------- | ------------- | ------------- + **contentId** | **Integer**| The content ID. | + +### Return type + +null (empty response body) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | An event stream produced by Server Side Events. The following events are supported. - message: an object with the newly generated text (e.g. {\"text\": \"hello\"}) - message: upon completion of events the string \"[DONE]\" will be emitted - fullcontent: an object containing the full response | - | + + +# **signLiltCreateTerms** +> SignLiltCreateTermsResponse signLiltCreateTerms(signedAgreement) + +Sign the Lilt Create terms and conditions + +Lilt Create requires that the terms and conditions are signed first before using it. The terms and conditions can be signed by using this endpoint. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/create/terms-and-conditions?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{\"signedAgreement\": true}' ``` + +### Example +```java +// Import classes: +import com.lilt.client.ApiClient; +import com.lilt.client.ApiException; +import com.lilt.client.Configuration; +import com.lilt.client.auth.*; +import com.lilt.client.models.*; +import com.lilt.client.api.CreateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.lilt.com"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + CreateApi apiInstance = new CreateApi(defaultClient); + CreateConverterConfigParameters signedAgreement = new CreateConverterConfigParameters(); // CreateConverterConfigParameters | + try { + SignLiltCreateTermsResponse result = apiInstance.signLiltCreateTerms(signedAgreement); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CreateApi#signLiltCreateTerms"); + 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 +------------- | ------------- | ------------- | ------------- + **signedAgreement** | [**CreateConverterConfigParameters**](CreateConverterConfigParameters.md)| | + +### Return type + +[**SignLiltCreateTermsResponse**](SignLiltCreateTermsResponse.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | An object indicating whether the agreement has been signed or not. | - | + + +# **updateLiltCreateContent** +> LiltCreateContent updateLiltCreateContent(contentId, body) + +Update Lilt Create content + +Update a piece of Lilt Create content. Example CURL: ``` curl --X --request PUT 'https://api.lilt.com/v2/create/1234?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{\"language\":\"de-DE\"}' ``` + +### Example +```java +// Import classes: +import com.lilt.client.ApiClient; +import com.lilt.client.ApiException; +import com.lilt.client.Configuration; +import com.lilt.client.auth.*; +import com.lilt.client.models.*; +import com.lilt.client.api.CreateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.lilt.com"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + CreateApi apiInstance = new CreateApi(defaultClient); + Integer contentId = 56; // Integer | The content ID. + LiltCreateContent body = new LiltCreateContent(); // LiltCreateContent | + try { + LiltCreateContent result = apiInstance.updateLiltCreateContent(contentId, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CreateApi#updateLiltCreateContent"); + 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 +------------- | ------------- | ------------- | ------------- + **contentId** | **Integer**| The content ID. | + **body** | [**LiltCreateContent**](LiltCreateContent.md)| | [optional] + +### Return type + +[**LiltCreateContent**](LiltCreateContent.md) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The updated Lilt Create content. | - | + + +# **updateLiltCreatePreferences** +> updateLiltCreatePreferences(styleguide) + +Update Lilt Create preferences + +Update the stored preferences for Lilt Create. Example CURL: ``` curl --X --request PUT 'https://api.lilt.com/v2/create/preferences?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{\"tone\": \"formal\", \"styleguide\": \"\"}' ``` + +### Example +```java +// Import classes: +import com.lilt.client.ApiClient; +import com.lilt.client.ApiException; +import com.lilt.client.Configuration; +import com.lilt.client.auth.*; +import com.lilt.client.models.*; +import com.lilt.client.api.CreateApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.lilt.com"); + + // Configure API key authorization: ApiKeyAuth + ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); + ApiKeyAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //ApiKeyAuth.setApiKeyPrefix("Token"); + + // Configure HTTP basic authorization: BasicAuth + HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); + BasicAuth.setUsername("YOUR USERNAME"); + BasicAuth.setPassword("YOUR PASSWORD"); + + CreateApi apiInstance = new CreateApi(defaultClient); + LiltCreateContent styleguide = new LiltCreateContent(); // LiltCreateContent | Which styleguide to use. + try { + apiInstance.updateLiltCreatePreferences(styleguide); + } catch (ApiException e) { + System.err.println("Exception when calling CreateApi#updateLiltCreatePreferences"); + 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 +------------- | ------------- | ------------- | ------------- + **styleguide** | [**LiltCreateContent**](LiltCreateContent.md)| Which styleguide to use. | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | The updated Lilt Create preferences. | - | + diff --git a/docs/CreateConverterConfigParameters.md b/docs/CreateConverterConfigParameters.md index a51fa6794..6c5538c70 100644 --- a/docs/CreateConverterConfigParameters.md +++ b/docs/CreateConverterConfigParameters.md @@ -6,9 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**configJson** | **String** | The configuration json blob, string escaped. | -**configName** | **String** | The user defined name of your configuration. | -**configDescription** | **String** | A description for the configuration. | +**signedAgreement** | **Boolean** | Signifies that the Organization has signed the agreement or not. | diff --git a/docs/DeleteSegmentFromMemoryResponse.md b/docs/DeleteSegmentFromMemoryResponse.md new file mode 100644 index 000000000..c0c19d08e --- /dev/null +++ b/docs/DeleteSegmentFromMemoryResponse.md @@ -0,0 +1,12 @@ + + +# DeleteSegmentFromMemoryResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**success** | **Boolean** | | [optional] + + + diff --git a/docs/DocumentWithSegments.md b/docs/DocumentWithSegments.md index 51299afe0..65a6b94d7 100644 --- a/docs/DocumentWithSegments.md +++ b/docs/DocumentWithSegments.md @@ -24,6 +24,7 @@ Name | Type | Description | Notes **reviewerEmail** | **String** | The email of the assigned reviewer. | [optional] **createdAt** | **Integer** | Time at which the object was created. Measured in seconds since the Unix epoch. | [optional] **updatedAt** | **Integer** | Time at which the object was created. Measured in seconds since the Unix epoch. | [optional] +**isReviewComplete** | **Boolean** | Document review status. | [optional] **segments** | [**List<Segment>**](Segment.md) | A list of Segments. | [optional] diff --git a/docs/DocumentWithoutSegments.md b/docs/DocumentWithoutSegments.md index 01ae1228c..30ca0341c 100644 --- a/docs/DocumentWithoutSegments.md +++ b/docs/DocumentWithoutSegments.md @@ -22,8 +22,10 @@ Name | Type | Description | Notes **status** | [**DocumentWithoutSegmentsStatus**](DocumentWithoutSegmentsStatus.md) | | [optional] **translatorEmail** | **String** | The email of the assigned translator. | [optional] **reviewerEmail** | **String** | The email of the assigned reviewer. | [optional] +**customerReviewerEmail** | **String** | The email of the assigned customer reviewer. Only present if the project was request by id. | [optional] **createdAt** | **Integer** | Time at which the object was created. Measured in seconds since the Unix epoch. | [optional] **updatedAt** | **Integer** | Time at which the object was created. Measured in seconds since the Unix epoch. | [optional] +**isReviewComplete** | **Boolean** | Document review status. | [optional] diff --git a/docs/DocumentsApi.md b/docs/DocumentsApi.md index 69aef08df..bb486885a 100644 --- a/docs/DocumentsApi.md +++ b/docs/DocumentsApi.md @@ -1,254 +1,20 @@ # DocumentsApi -All URIs are relative to *https://lilt.com/2* +All URIs are relative to *https://api.lilt.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**assignDocument**](DocumentsApi.md#assignDocument) | **PUT** /documents/share | Assign a Document -[**createDocument**](DocumentsApi.md#createDocument) | **POST** /documents | Create a Document -[**deleteDocument**](DocumentsApi.md#deleteDocument) | **DELETE** /documents | Delete a Document -[**downloadDocument**](DocumentsApi.md#downloadDocument) | **GET** /documents/files | Download a Document -[**getDocument**](DocumentsApi.md#getDocument) | **GET** /documents | Retrieve a Document -[**markReviewDone**](DocumentsApi.md#markReviewDone) | **POST** /documents/done/review | Mark review done -[**markTranslationDone**](DocumentsApi.md#markTranslationDone) | **POST** /documents/done/translation | Mark translation done -[**pretranslateDocuments**](DocumentsApi.md#pretranslateDocuments) | **POST** /documents/pretranslate | Pretranslate a Document -[**unlockDocuments**](DocumentsApi.md#unlockDocuments) | **POST** /documents/done/unlock | Unlock documents -[**updateDocument**](DocumentsApi.md#updateDocument) | **PUT** /documents | Update a Document -[**uploadDocument**](DocumentsApi.md#uploadDocument) | **POST** /documents/files | Upload a File +[**downloadDocument**](DocumentsApi.md#downloadDocument) | **GET** /v2/documents/files | Download a Document +[**uploadDocument**](DocumentsApi.md#uploadDocument) | **POST** /v2/documents/files | Upload a File - -# **assignDocument** -> DocumentAssignmentResponse assignDocument(body) - -Assign a Document - -Assign and unassign a Document for translation and/or review. - -### Example -```java -// Import classes: -import com.lilt.client.ApiClient; -import com.lilt.client.ApiException; -import com.lilt.client.Configuration; -import com.lilt.client.auth.*; -import com.lilt.client.models.*; -import com.lilt.client.api.DocumentsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - DocumentsApi apiInstance = new DocumentsApi(defaultClient); - DocumentAssignmentParameters body = new DocumentAssignmentParameters(); // DocumentAssignmentParameters | - try { - DocumentAssignmentResponse result = apiInstance.assignDocument(body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DocumentsApi#assignDocument"); - 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 -------------- | ------------- | ------------- | ------------- - **body** | [**DocumentAssignmentParameters**](DocumentAssignmentParameters.md)| | - -### Return type - -[**DocumentAssignmentResponse**](DocumentAssignmentResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | A status object. | - | -**0** | Unexpected error | - | - - -# **createDocument** -> DocumentWithSegments createDocument(body) - -Create a Document - -Create a new Document. A Document is a collection of one or more Segments. Documents are nested inside of Projects, and appear in the Project details view in the web app. Document-level relationships between Segments are considered by the machine translation system during adaptation. If there is no inherent document structure in your data, you still might consider grouping related Segments into Documents to improve translation quality. - -### Example -```java -// Import classes: -import com.lilt.client.ApiClient; -import com.lilt.client.ApiException; -import com.lilt.client.Configuration; -import com.lilt.client.auth.*; -import com.lilt.client.models.*; -import com.lilt.client.api.DocumentsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - DocumentsApi apiInstance = new DocumentsApi(defaultClient); - DocumentParameters body = new DocumentParameters(); // DocumentParameters | - try { - DocumentWithSegments result = apiInstance.createDocument(body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DocumentsApi#createDocument"); - 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 -------------- | ------------- | ------------- | ------------- - **body** | [**DocumentParameters**](DocumentParameters.md)| | [optional] - -### Return type - -[**DocumentWithSegments**](DocumentWithSegments.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | A Document object. | - | -**0** | Unexpected error | - | - - -# **deleteDocument** -> DocumentDeleteResponse deleteDocument(id) - -Delete a Document - -Delete a Document. - -### Example -```java -// Import classes: -import com.lilt.client.ApiClient; -import com.lilt.client.ApiException; -import com.lilt.client.Configuration; -import com.lilt.client.auth.*; -import com.lilt.client.models.*; -import com.lilt.client.api.DocumentsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - DocumentsApi apiInstance = new DocumentsApi(defaultClient); - Integer id = 56; // Integer | A unique Document identifier. - try { - DocumentDeleteResponse result = apiInstance.deleteDocument(id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DocumentsApi#deleteDocument"); - 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**| A unique Document identifier. | - -### Return type - -[**DocumentDeleteResponse**](DocumentDeleteResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | A status object. | - | -**0** | Unexpected error | - | - # **downloadDocument** > byte[] downloadDocument(id, isXliff) Download a Document -Export a Document that has been translated in the Lilt web application. Any Document can be downloaded in XLIFF 1.2 format, or can be retrieved in its original uploaded format by setting `is_xliff=false`. This endpoint will fail if either (a) export or (b) pre-translation operations are in-progress. The status of those operations can be determined by retrieving the Document resource. Example CURL command: ``` curl -X GET https://lilt.com/2/documents/files?key=API_KEY&id=274 -o from_lilt.xliff ``` +Export a Document that has been translated in the Lilt web application. Any Document can be downloaded in XLIFF 1.2 format, or can be retrieved in its original uploaded format by setting `is_xliff=false`. This endpoint will fail if either (a) export or (b) pre-translation operations are in-progress. The status of those operations can be determined by retrieving the Document resource. Example CURL command: ``` curl -X GET https://api.lilt.com/v2/documents/files?key=API_KEY&id=274 -o from_lilt.xliff ``` ### Example ```java @@ -263,7 +29,7 @@ import com.lilt.client.api.DocumentsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -320,470 +86,13 @@ Name | Type | Description | Notes **502** | File in pretranslation. | - | **0** | Unexpected error | - | - -# **getDocument** -> DocumentWithSegments getDocument(id, withSegments) - -Retrieve a Document - -List a Document. The listing will include the pretranslation status for the document. When pretranslation is in progress for a document, the `GET /documents` endpoint's response will include `is_pretranslating = true` as well as a more detailed status property `status.pretranslation` one of `idle`, `pending`, or `running`. - -### Example -```java -// Import classes: -import com.lilt.client.ApiClient; -import com.lilt.client.ApiException; -import com.lilt.client.Configuration; -import com.lilt.client.auth.*; -import com.lilt.client.models.*; -import com.lilt.client.api.DocumentsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - DocumentsApi apiInstance = new DocumentsApi(defaultClient); - Integer id = 56; // Integer | A unique Document identifier. - Boolean withSegments = true; // Boolean | Flag indicating whether full segment information should be returned. - try { - DocumentWithSegments result = apiInstance.getDocument(id, withSegments); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DocumentsApi#getDocument"); - 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**| A unique Document identifier. | - **withSegments** | **Boolean**| Flag indicating whether full segment information should be returned. | [optional] - -### Return type - -[**DocumentWithSegments**](DocumentWithSegments.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | A Document object. | - | -**0** | Unexpected error | - | - - -# **markReviewDone** -> List<BigDecimal> markReviewDone(body) - -Mark review done - -Mark the review of documents as done/undone in bulk. When being marked positively as done: - Documents must not already be marked as done for review. - Documents must already be marked as done for translation. - This request will also trigger an email notification. Example curl: ``` curl --X --request POST 'https://lilt.com/2/documents/done/review?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"documentIds\": [23921, 23922], \"isDone\": true }' ``` - -### Example -```java -// Import classes: -import com.lilt.client.ApiClient; -import com.lilt.client.ApiException; -import com.lilt.client.Configuration; -import com.lilt.client.auth.*; -import com.lilt.client.models.*; -import com.lilt.client.api.DocumentsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - DocumentsApi apiInstance = new DocumentsApi(defaultClient); - DocumentDoneUpdateParameters2 body = new DocumentDoneUpdateParameters2(); // DocumentDoneUpdateParameters2 | - try { - List result = apiInstance.markReviewDone(body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DocumentsApi#markReviewDone"); - 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 -------------- | ------------- | ------------- | ------------- - **body** | [**DocumentDoneUpdateParameters2**](DocumentDoneUpdateParameters2.md)| | - -### Return type - -[**List<BigDecimal>**](BigDecimal.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | array of updated documents | - | - - -# **markTranslationDone** -> List<BigDecimal> markTranslationDone(body) - -Mark translation done - -Mark the translation of documents as done/undone in bulk. When being marked positively as done: - Documents must not already be marked as done and all segments must be confirmed. - This request will also trigger an email notification to a document's assigned reviewer that the document is ready for review. When being marked as un-done: - Documents must not be marked as complete for review. Example curl: ``` curl --X --request POST 'https://lilt.com/2/documents/done/translation?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"documentIds\": [23921, 23922], \"isDone\": true }' ``` - -### Example -```java -// Import classes: -import com.lilt.client.ApiClient; -import com.lilt.client.ApiException; -import com.lilt.client.Configuration; -import com.lilt.client.auth.*; -import com.lilt.client.models.*; -import com.lilt.client.api.DocumentsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - DocumentsApi apiInstance = new DocumentsApi(defaultClient); - DocumentDoneUpdateParameters1 body = new DocumentDoneUpdateParameters1(); // DocumentDoneUpdateParameters1 | - try { - List result = apiInstance.markTranslationDone(body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DocumentsApi#markTranslationDone"); - 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 -------------- | ------------- | ------------- | ------------- - **body** | [**DocumentDoneUpdateParameters1**](DocumentDoneUpdateParameters1.md)| | - -### Return type - -[**List<BigDecimal>**](BigDecimal.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | array of updated documents | - | - - -# **pretranslateDocuments** -> DocumentPretranslateResponse pretranslateDocuments(body, autoAccept, caseSensitive, attributeToCreator, mode) - -Pretranslate a Document - -Initiate pretranslation of a list of Documents. This request will mark document(s) as being pretranslated. Pretranslation in this context is: - Applying and confirming exact TM matches based on the Memory of the Project; - Translating all other segments via MT without confirming them. Example CURL command: ``` curl -X POST https://lilt.com/2/documents/pretranslate?key=API_KEY -d {\"id\": [123]} -H \"Content-Type: application/json\" ``` Document translation is an asynchronous process that, in effect, is performed in the background. To check the status of pretranslation for a document, use the `GET /documents` endpoint. When pretranslation is in progress for a document, the `GET /documents` endpoint's response will include `is_pretranslating = true` as well as a more detailed status property `status.pretranslation` one of `idle`, `pending`, or `running`. Once pretranslation is finished, the document can be downloaded via `GET /documents/files`. - -### Example -```java -// Import classes: -import com.lilt.client.ApiClient; -import com.lilt.client.ApiException; -import com.lilt.client.Configuration; -import com.lilt.client.auth.*; -import com.lilt.client.models.*; -import com.lilt.client.api.DocumentsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - DocumentsApi apiInstance = new DocumentsApi(defaultClient); - DocumentPretranslateParameters body = new DocumentPretranslateParameters(); // DocumentPretranslateParameters | - Boolean autoAccept = true; // Boolean | Deprecated, use body param instead. Optional parameter for auto-accepting 100% TM hits. - Boolean caseSensitive = true; // Boolean | Deprecated, use body param instead. Optional for using case matching against TM hits. - Boolean attributeToCreator = true; // Boolean | Deprecated, use body param instead. Optional parameter for attributing translation authorship of exact matches to document creator. - String mode = "mode_example"; // String | Deprecated, use body param instead. An optional parameter indicating how the document will be pretranslated. The accepted values are `tm`, or `tm+mt`. Default is `tm`. - try { - DocumentPretranslateResponse result = apiInstance.pretranslateDocuments(body, autoAccept, caseSensitive, attributeToCreator, mode); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DocumentsApi#pretranslateDocuments"); - 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 -------------- | ------------- | ------------- | ------------- - **body** | [**DocumentPretranslateParameters**](DocumentPretranslateParameters.md)| | - **autoAccept** | **Boolean**| Deprecated, use body param instead. Optional parameter for auto-accepting 100% TM hits. | [optional] - **caseSensitive** | **Boolean**| Deprecated, use body param instead. Optional for using case matching against TM hits. | [optional] - **attributeToCreator** | **Boolean**| Deprecated, use body param instead. Optional parameter for attributing translation authorship of exact matches to document creator. | [optional] - **mode** | **String**| Deprecated, use body param instead. An optional parameter indicating how the document will be pretranslated. The accepted values are `tm`, or `tm+mt`. Default is `tm`. | [optional] - -### Return type - -[**DocumentPretranslateResponse**](DocumentPretranslateResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**202** | A status object. | - | -**0** | Unexpected error | - | - - -# **unlockDocuments** -> List<BigDecimal> unlockDocuments(body) - -Unlock documents - -Unlock documents for translation. Sets document \"Translation Done\" and \"Review Done\" to false. Example curl: ``` curl --X --request POST 'https://lilt.com/2/documents/done/unlock?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"documentIds\": [23921, 23922] }' ``` - -### Example -```java -// Import classes: -import com.lilt.client.ApiClient; -import com.lilt.client.ApiException; -import com.lilt.client.Configuration; -import com.lilt.client.auth.*; -import com.lilt.client.models.*; -import com.lilt.client.api.DocumentsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - DocumentsApi apiInstance = new DocumentsApi(defaultClient); - DocumentDoneUpdateParameters body = new DocumentDoneUpdateParameters(); // DocumentDoneUpdateParameters | - try { - List result = apiInstance.unlockDocuments(body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DocumentsApi#unlockDocuments"); - 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 -------------- | ------------- | ------------- | ------------- - **body** | [**DocumentDoneUpdateParameters**](DocumentDoneUpdateParameters.md)| | - -### Return type - -[**List<BigDecimal>**](BigDecimal.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | array of updated documents | - | - - -# **updateDocument** -> DocumentWithSegments updateDocument(body) - -Update a Document - -Update a Document. - -### Example -```java -// Import classes: -import com.lilt.client.ApiClient; -import com.lilt.client.ApiException; -import com.lilt.client.Configuration; -import com.lilt.client.auth.*; -import com.lilt.client.models.*; -import com.lilt.client.api.DocumentsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - DocumentsApi apiInstance = new DocumentsApi(defaultClient); - DocumentUpdateParameters body = new DocumentUpdateParameters(); // DocumentUpdateParameters | - try { - DocumentWithSegments result = apiInstance.updateDocument(body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DocumentsApi#updateDocument"); - 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 -------------- | ------------- | ------------- | ------------- - **body** | [**DocumentUpdateParameters**](DocumentUpdateParameters.md)| | - -### Return type - -[**DocumentWithSegments**](DocumentWithSegments.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | A Document object. | - | -**0** | Unexpected error | - | - # **uploadDocument** > DocumentWithSegments uploadDocument(name, projectId, body, pretranslate, autoAccept, caseSensitive, matchAttribution, configId) Upload a File -Create a Document from a file in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed as JSON object with the header field `LILT-API`. File names in the header can only contain [US-ASCII characters](https://en.wikipedia.org/wiki/ASCII). File names with characters outside of US-ASCII should be [URI encoded](https://en.wikipedia.org/wiki/Percent-encoding) or transliterated to US-ASCII strings. Example CURL command: ``` curl -X POST https://lilt.com/2/documents/files?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"introduction.xliff\\\",\\\"pretranslate\\\": \\\"tm+mt\\\",\\\"project_id\\\": 9}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @Introduction.xliff ``` +Create a Document from a file in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed as JSON object with the header field `LILT-API`. File names in the header can only contain [US-ASCII characters](https://en.wikipedia.org/wiki/ASCII). File names with characters outside of US-ASCII should be [URI encoded](https://en.wikipedia.org/wiki/Percent-encoding) or transliterated to US-ASCII strings. Example CURL command: ``` curl -X POST https://api.lilt.com/v2/documents/files?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"introduction.xliff\\\",\\\"pretranslate\\\": \\\"tm+mt\\\",\\\"project_id\\\": 9}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @Introduction.xliff ``` ### Example ```java @@ -798,7 +107,7 @@ import com.lilt.client.api.DocumentsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -816,9 +125,9 @@ public class Example { Integer projectId = 56; // Integer | A unique Project identifier. File body = new File("/path/to/file"); // File | The file contents to be uploaded. The entire POST body will be treated as the file. String pretranslate = "pretranslate_example"; // String | An optional parameter indicating if and how the document will be pretranslated upon being uploaded. The accepted values are `TM`, or `TM+MT` - Boolean autoAccept = true; // Boolean | An optional parameter to auto-accept segments with 100% translation memory matches when the `pretranslate` option is also set, or to auto-accept any target data that is present when the uploaded file is XLIFF. If omitted or set to `false`, no segments will be auto-accepted. - Boolean caseSensitive = true; // Boolean | An optional parameter to use case sensitive translation memory matching when the `pretranslate` option is also enabled. Matches must have identical character-by-character case to qualify as matches. Default value is `false` - Boolean matchAttribution = true; // Boolean | An optional parameter to attribute translation authorship of exact matches to the author of the file when the `pretranslate` option is also enabled. Default value is `false` + Boolean autoAccept = true; // Boolean | An optional parameter to auto-accept segments with 100% translation memory matches when the `pretranslate` option is also set, or to auto-accept any target data that is present when the uploaded file is XLIFF. If omitted it will default to your organization settings for `Accept and lock exact matches`, if set to `false`, no segments will be auto-accepted. + Boolean caseSensitive = true; // Boolean | An optional parameter to use case sensitive translation memory matching when the `pretranslate` option is also enabled. Matches must have identical character-by-character case to qualify as matches. Default value matches your organization settings for `Use case sensitive translation memory matching` setting + Boolean matchAttribution = true; // Boolean | An optional parameter to attribute translation authorship of exact matches to the author of the file when the `pretranslate` option is also enabled. Default value matches your organization settings for `Translation authorship` setting Integer configId = 56; // Integer | An optional pararameter to specify an import configuration to be applied when extracting translatable content from this file. try { DocumentWithSegments result = apiInstance.uploadDocument(name, projectId, body, pretranslate, autoAccept, caseSensitive, matchAttribution, configId); @@ -842,9 +151,9 @@ Name | Type | Description | Notes **projectId** | **Integer**| A unique Project identifier. | **body** | **File**| The file contents to be uploaded. The entire POST body will be treated as the file. | **pretranslate** | **String**| An optional parameter indicating if and how the document will be pretranslated upon being uploaded. The accepted values are `TM`, or `TM+MT` | [optional] - **autoAccept** | **Boolean**| An optional parameter to auto-accept segments with 100% translation memory matches when the `pretranslate` option is also set, or to auto-accept any target data that is present when the uploaded file is XLIFF. If omitted or set to `false`, no segments will be auto-accepted. | [optional] - **caseSensitive** | **Boolean**| An optional parameter to use case sensitive translation memory matching when the `pretranslate` option is also enabled. Matches must have identical character-by-character case to qualify as matches. Default value is `false` | [optional] - **matchAttribution** | **Boolean**| An optional parameter to attribute translation authorship of exact matches to the author of the file when the `pretranslate` option is also enabled. Default value is `false` | [optional] + **autoAccept** | **Boolean**| An optional parameter to auto-accept segments with 100% translation memory matches when the `pretranslate` option is also set, or to auto-accept any target data that is present when the uploaded file is XLIFF. If omitted it will default to your organization settings for `Accept and lock exact matches`, if set to `false`, no segments will be auto-accepted. | [optional] + **caseSensitive** | **Boolean**| An optional parameter to use case sensitive translation memory matching when the `pretranslate` option is also enabled. Matches must have identical character-by-character case to qualify as matches. Default value matches your organization settings for `Use case sensitive translation memory matching` setting | [optional] + **matchAttribution** | **Boolean**| An optional parameter to attribute translation authorship of exact matches to the author of the file when the `pretranslate` option is also enabled. Default value matches your organization settings for `Translation authorship` setting | [optional] **configId** | **Integer**| An optional pararameter to specify an import configuration to be applied when extracting translatable content from this file. | [optional] ### Return type diff --git a/docs/FilesApi.md b/docs/FilesApi.md index 4494fc74c..9715a7944 100644 --- a/docs/FilesApi.md +++ b/docs/FilesApi.md @@ -1,15 +1,15 @@ # FilesApi -All URIs are relative to *https://lilt.com/2* +All URIs are relative to *https://api.lilt.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**addLabel**](FilesApi.md#addLabel) | **POST** /files/labels | Add Label to File -[**deleteFile**](FilesApi.md#deleteFile) | **DELETE** /files | Delete a File -[**download**](FilesApi.md#download) | **GET** /files/download | Download file -[**getFiles**](FilesApi.md#getFiles) | **GET** /files | Retrieve a File -[**removeLabel**](FilesApi.md#removeLabel) | **DELETE** /files/labels | Remove Label from File -[**uploadFile**](FilesApi.md#uploadFile) | **POST** /files | Upload a File +[**addLabel**](FilesApi.md#addLabel) | **POST** /v2/files/labels | Add Label to File +[**deleteFile**](FilesApi.md#deleteFile) | **DELETE** /v2/files | Delete a File +[**download**](FilesApi.md#download) | **GET** /v2/files/download | Download file +[**getFiles**](FilesApi.md#getFiles) | **GET** /v2/files | Retrieve a File +[**removeLabel**](FilesApi.md#removeLabel) | **DELETE** /v2/files/labels | Remove Label from File +[**uploadFile**](FilesApi.md#uploadFile) | **POST** /v2/files | Upload a File @@ -18,7 +18,7 @@ Method | HTTP request | Description Add Label to File -Add a label to a File. Example CURL: ``` curl --X --request POST 'https://lilt.com/2/files/labels?key=API_KEY&id=1' --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"label_name\" }' ``` +Add a label to a File. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/files/labels?key=API_KEY&id=1' --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"label_name\" }' ``` ### Example ```java @@ -33,7 +33,7 @@ import com.lilt.client.api.FilesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -93,7 +93,7 @@ null (empty response body) Delete a File -Delete a File. Example CURL command: ``` curl -X DELETE https://lilt.com/2/files?key=API_KEY&id=123 ``` +Delete a File. Example CURL command: ``` curl -X DELETE https://api.lilt.com/v2/files?key=API_KEY&id=123 ``` ### Example ```java @@ -108,7 +108,7 @@ import com.lilt.client.api.FilesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -168,7 +168,7 @@ Name | Type | Description | Notes Download file -Download a File. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/files/download?key=API_KEY&id=1' ``` +Download a File. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/files/download?key=API_KEY&id=1' ``` ### Example ```java @@ -183,7 +183,7 @@ import com.lilt.client.api.FilesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -242,7 +242,7 @@ Name | Type | Description | Notes Retrieve a File -Retrieves one or more files available to your user. Files are not associated with a project or a memory. They are unprocessed and can be used later in the project/document creation workflow step. To retrieve a specific file, specify the <strong>id</strong> request parameter. To retrieve all files, omit the <strong>id</strong> request parameter. Example CURL command: ``` curl -X GET https://lilt.com/2/files?key=API_KEY&id=274``` +Retrieves one or more files available to your user. Files are not associated with a project or a memory. They are unprocessed and can be used later in the project/document creation workflow step. To retrieve a specific file, specify the <strong>id</strong> request parameter. To retrieve all files, omit the <strong>id</strong> request parameter. Example CURL command: ``` curl -X GET https://api.lilt.com/v2/files?key=API_KEY&id=274``` ### Example ```java @@ -257,7 +257,7 @@ import com.lilt.client.api.FilesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -311,7 +311,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A list of files. | - | -**403** | Unauthorized. | - | +**403** | User does not have permission for provided file. | - | **410** | File deleted. | - | **0** | Unexpected error. | - | @@ -321,7 +321,7 @@ Name | Type | Description | Notes Remove Label from File -Remove a label from a File. Example CURL: ``` curl --X --request DELETE 'https://lilt.com/2/files/labels?key=API_KEY&id=1&name=label_name' ``` +Remove a label from a File. Example CURL: ``` curl --X --request DELETE 'https://api.lilt.com/v2/files/labels?key=API_KEY&id=1&name=label_name' ``` ### Example ```java @@ -336,7 +336,7 @@ import com.lilt.client.api.FilesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -396,7 +396,7 @@ null (empty response body) Upload a File -Upload a File in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed in as query string parameters. Example CURL command: ``` curl -X POST https://lilt.com/2/files?key=API_KEY&name=en_US.json \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @en_US.json ``` Calls to GET /files are used to monitor the language detection results. The API response will be augmented to include detected language and confidence score. The language detection will complete asynchronously. Prior to completion, the `detected_lang` value will be `zxx`, the reserved ISO 639-2 code for \"No linguistic content/not applicable\". If the language can not be determined, or the detection process fails, the `detected_lang` field will return `und`, the reserved ISO 639-2 code for undetermined language, and the `detected_lang_confidence` score will be `0`. +Upload a File in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed in as query string parameters. Example CURL command: ``` curl -X POST https://api.lilt.com/v2/files?key=API_KEY&name=en_US.json \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @en_US.json ``` Calls to GET /files are used to monitor the language detection results. The API response will be augmented to include detected language and confidence score. The language detection will complete asynchronously. Prior to completion, the `detected_lang` value will be `zxx`, the reserved ISO 639-2 code for \"No linguistic content/not applicable\". If the language can not be determined, or the detection process fails, the `detected_lang` field will return `und`, the reserved ISO 639-2 code for undetermined language, and the `detected_lang_confidence` score will be `0`. ### Example ```java @@ -411,7 +411,7 @@ import com.lilt.client.api.FilesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); diff --git a/docs/InlineResponse200.md b/docs/InlineResponse200.md index 6180d3614..2c3a4ff00 100644 --- a/docs/InlineResponse200.md +++ b/docs/InlineResponse200.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**configId** | **Integer** | | [optional] +**id** | **Integer** | The ID of the deleted Lilt Create content. | [optional] diff --git a/docs/JobCreateParameters.md b/docs/JobCreateParameters.md index a7abf81a3..d337d1462 100644 --- a/docs/JobCreateParameters.md +++ b/docs/JobCreateParameters.md @@ -7,9 +7,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **String** | A name for the Job. | -**due** | **String** | An ISO string date. | [optional] **languagePairs** | [**List<LanguagePair>**](LanguagePair.md) | Language pairs is a set of one or more pairs that includes source language, source locale(optional), target language, target locale(optional), and memoryId. | **fileIds** | **List<Integer>** | A list of file ids to upload to job creation. | +**due** | **String** | An ISO string date representing job due date. | [optional] +**srcLang** | **String** | 2-letter ISO source language code | +**srcLocale** | **String** | 2-letter source language code | +**isPlural** | **Boolean** | A boolean value representing if the files have plurals. | [optional] +**workflowTemplateId** | **Integer** | Identifier of the workflow template to be used when creating a job. If not passed the organization default will be used. | [optional] +**workflowTemplateName** | **Integer** | Name of the workflow template to be used, must be passed with teamId or look up will fail. If workflowTemplateId is passed it supercedes any other look up. | [optional] diff --git a/docs/JobLeverageStats.md b/docs/JobLeverageStats.md index 043608fd1..56e0bb753 100644 --- a/docs/JobLeverageStats.md +++ b/docs/JobLeverageStats.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **exactWords** | **Integer** | Total number of exact words. | [optional] **fuzzyWords** | **Integer** | Total number of fuzzy words. | [optional] **newWords** | **Integer** | Total number of new words. | [optional] -**projects** | [**List<JobLeverageStatsProjects>**](JobLeverageStatsProjects.md) | | [optional] +**projects** | [**List<ProjectStats>**](ProjectStats.md) | | [optional] diff --git a/docs/JobProject.md b/docs/JobProject.md index 242a9ecd0..d728b27c1 100644 --- a/docs/JobProject.md +++ b/docs/JobProject.md @@ -2,16 +2,16 @@ # JobProject -A job project contains project statistcal data that belongs to a specific job. +A job project contains project statistical data that belongs to a specific job. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **Integer** | An id for the project. | [optional] -**srcLang** | **String** | Source langauge, an ISO 639-1 language identifier. | [optional] -**srcLocale** | **String** | A locale identifier, supported for source langauge. | [optional] -**trgLang** | **String** | Target langauge, an ISO 639-1 language identifier. | [optional] -**trgLocale** | **String** | A locale identifier, supported for target langauge. | [optional] +**srcLang** | **String** | Source language, an ISO 639-1 language identifier. | [optional] +**srcLocale** | **String** | A locale identifier, supported for source language. | [optional] +**trgLang** | **String** | Target language, an ISO 639-1 language identifier. | [optional] +**trgLocale** | **String** | A locale identifier, supported for target language. | [optional] **name** | **String** | A name for the project. | [optional] **due** | **String** | An ISO date. | [optional] **isComplete** | **Boolean** | A state that checks project was completed. | [optional] @@ -22,6 +22,18 @@ Name | Type | Description | Notes **updatedAt** | **String** | Time at which the object was updated. | [optional] **isDeleted** | **Boolean** | A state that checks project was deleted. | [optional] **memoryId** | **Integer** | A unique number identifying the associated Memory. | [optional] +**workflowStatus** | [**WorkflowStatusEnum**](#WorkflowStatusEnum) | The status of the Workflow for the current project. | [optional] +**workflowName** | **String** | Human readable name of the workflow associated with the current project. | [optional] + + + +## Enum: WorkflowStatusEnum + +Name | Value +---- | ----- +READY_TO_START | "READY_TO_START" +IN_PROGRESS | "IN_PROGRESS" +DONE | "DONE" diff --git a/docs/JobStats.md b/docs/JobStats.md index aa4acd38d..86c762772 100644 --- a/docs/JobStats.md +++ b/docs/JobStats.md @@ -14,11 +14,22 @@ Name | Type | Description | Notes **numLanguagePairs** | **Integer** | Total number of delivered projects. | [optional] **numProjects** | **Integer** | Total number of projects. | [optional] **percentReviewed** | **Integer** | Overall percentage of documents reviewed. | [optional] -**percentTranslated** | **Integer** | | [optional] +**percentTranslated** | **Integer** | Overall percentage of documents translated. | [optional] **projects** | [**List<JobProject>**](JobProject.md) | | [optional] **sourceWords** | **Integer** | Total number of source words. | [optional] **uniqueLanguagePairs** | **Integer** | Number of unique language pairs. | [optional] **uniqueLinguists** | **Integer** | Number of unique linguists. | [optional] +**workflowStatus** | [**WorkflowStatusEnum**](#WorkflowStatusEnum) | The status of the Workflow for the current job. | [optional] + + + +## Enum: WorkflowStatusEnum + +Name | Value +---- | ----- +READY_TO_START | "READY_TO_START" +IN_PROGRESS | "IN_PROGRESS" +DONE | "DONE" diff --git a/docs/JobUpdateParameters.md b/docs/JobUpdateParameters.md index d55cdee40..a80a97ca5 100644 --- a/docs/JobUpdateParameters.md +++ b/docs/JobUpdateParameters.md @@ -8,6 +8,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **String** | A name for the Job. | [optional] **dueDate** | **Integer** | An ISO string date. | [optional] +**isProcessing** | [**IsProcessingEnum**](#IsProcessingEnum) | The processing status of the job. Provide one of the following integers to indicate the status. Ok = 0 Started = 1 ExportError = -2 | [optional] +**processingErrorMsg** | **String** | The processing error message. | [optional] + + + +## Enum: IsProcessingEnum + +Name | Value +---- | ----- +_0 | "0" +_1 | "1" +_2 | "-2" diff --git a/docs/JobsApi.md b/docs/JobsApi.md index 1a9f21c16..608599886 100644 --- a/docs/JobsApi.md +++ b/docs/JobsApi.md @@ -1,21 +1,21 @@ # JobsApi -All URIs are relative to *https://lilt.com/2* +All URIs are relative to *https://api.lilt.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**archiveJob**](JobsApi.md#archiveJob) | **POST** /jobs/{jobId}/archive | Archive a Job -[**createJob**](JobsApi.md#createJob) | **POST** /jobs | Create a Job -[**deleteJob**](JobsApi.md#deleteJob) | **DELETE** /jobs/{jobId} | Delete a Job -[**deliverJob**](JobsApi.md#deliverJob) | **POST** /jobs/{jobId}/deliver | Deliver a Job -[**downloadJob**](JobsApi.md#downloadJob) | **GET** /jobs/{jobId}/downlod | Download a Job -[**exportJob**](JobsApi.md#exportJob) | **GET** /jobs/{jobId}/export | Export a Job -[**getJob**](JobsApi.md#getJob) | **GET** /jobs/{jobId} | Retrieve a Job -[**getJobLeverageStats**](JobsApi.md#getJobLeverageStats) | **POST** /jobs/{jobId}/stats | Retrieve Job Leverage Stats -[**reactivateJob**](JobsApi.md#reactivateJob) | **POST** /jobs/{jobId}/reactivate | Reactivate a Job -[**retrieveAllJobs**](JobsApi.md#retrieveAllJobs) | **GET** /jobs | Retrieve all Jobs -[**unarchiveJob**](JobsApi.md#unarchiveJob) | **POST** /jobs/{jobId}/unarchive | Unarchive a Job -[**updateJob**](JobsApi.md#updateJob) | **PUT** /jobs/{jobId} | Update a Job +[**archiveJob**](JobsApi.md#archiveJob) | **POST** /v2/jobs/{jobId}/archive | Archive a Job +[**createJob**](JobsApi.md#createJob) | **POST** /v2/jobs | Create a Job +[**deleteJob**](JobsApi.md#deleteJob) | **DELETE** /v2/jobs/{jobId} | Delete a Job +[**deliverJob**](JobsApi.md#deliverJob) | **POST** /v2/jobs/{jobId}/deliver | Deliver a Job +[**downloadJob**](JobsApi.md#downloadJob) | **GET** /v2/jobs/{jobId}/downlod | Download a Job +[**exportJob**](JobsApi.md#exportJob) | **GET** /v2/jobs/{jobId}/export | Export a Job +[**getJob**](JobsApi.md#getJob) | **GET** /v2/jobs/{jobId} | Retrieve a Job +[**getJobLeverageStats**](JobsApi.md#getJobLeverageStats) | **POST** /v2/jobs/{jobId}/stats | Retrieve Job Leverage Stats +[**reactivateJob**](JobsApi.md#reactivateJob) | **POST** /v2/jobs/{jobId}/reactivate | Reactivate a Job +[**retrieveAllJobs**](JobsApi.md#retrieveAllJobs) | **GET** /v2/jobs | Retrieve all Jobs +[**unarchiveJob**](JobsApi.md#unarchiveJob) | **POST** /v2/jobs/{jobId}/unarchive | Unarchive a Job +[**updateJob**](JobsApi.md#updateJob) | **PUT** /v2/jobs/{jobId} | Update a Job @@ -24,7 +24,7 @@ Method | HTTP request | Description Archive a Job -Set job to archived, unassign all linguists and archive all projects and documents inside the job. It will return the archived job. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/archive?key=API_KEY' ``` +Set job to archived, unassign all linguists and archive all projects and documents inside the job. It will return the archived job. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/archive?key=API_KEY' ``` ### Example ```java @@ -39,7 +39,7 @@ import com.lilt.client.api.JobsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -99,7 +99,7 @@ Name | Type | Description | Notes Create a Job -Create a Job. A Job is a collection of Projects. A Job will contain multiple projects, based on the language pair. A Project is associated with exactly one Memory. Jobs appear in the Jobs dashboard of the web app. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"fileIds\": [5009, 5010, 5011], \"due\": \"2022-05-05T10:56:44.985Z\", \"srcLang\": \"en\", \"srcLocale\": \"US\", \"languagePairs\": [ { \"memoryId\": 3121, \"trgLang\": \"de\" }, { \"memoryId\": 2508, \"trgLang\": \"fr\" }, { \"memoryId\": 3037, \"trgLang\": \"zh\" } ] }' ``` +Create a Job. A Job is a collection of Projects. A Job will contain multiple projects, based on the language pair. A Project is associated with exactly one Memory. Jobs appear in the Jobs dashboard of the web app. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"fileIds\": [5009, 5010, 5011], \"due\": \"2022-05-05T10:56:44.985Z\", \"srcLang\": \"en\", \"srcLocale\": \"US\", \"languagePairs\": [ { \"memoryId\": 3121, \"trgLang\": \"de\" }, { \"memoryId\": 2508, \"trgLang\": \"fr\" }, { \"memoryId\": 3037, \"trgLang\": \"zh\" } ] }' ``` ### Example ```java @@ -114,7 +114,7 @@ import com.lilt.client.api.JobsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -174,7 +174,7 @@ Name | Type | Description | Notes Delete a Job -Delete a job, deletes all projects and documents in the job, deletes all the segments from all the job's translation memories. Example CURL command: ``` curl -X DELETE 'https://lilt.com/2/jobs/{id}?key=API_KEY' ``` +Delete a job, deletes all projects and documents in the job, deletes all the segments from all the job's translation memories. Example CURL command: ``` curl -X DELETE 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' ``` ### Example ```java @@ -189,7 +189,7 @@ import com.lilt.client.api.JobsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -249,7 +249,7 @@ Name | Type | Description | Notes Deliver a Job -Set the job state to delivered and set all the projects in the job to done It will return the delivered job. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/deliver?key=API_KEY' ``` +Set the job state to delivered and set all the projects in the job to done It will return the delivered job. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/deliver?key=API_KEY' ``` ### Example ```java @@ -264,7 +264,7 @@ import com.lilt.client.api.JobsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -324,7 +324,7 @@ Name | Type | Description | Notes Download a Job -Make sure you have exported a job with the same id before using this api. Downloading files requires the exported job `id` in the param. Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs/{id}/download?key=API_KEY' ``` +Make sure you have exported a job with the same id before using this api. Downloading files requires the exported job `id` in the param. Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs/{id}/download?key=API_KEY' ``` ### Example ```java @@ -339,7 +339,7 @@ import com.lilt.client.api.JobsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -398,7 +398,7 @@ null (empty response body) Export a Job -Prepare job files for download. To export translated documents from the job use the query parameter `type=files`: Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs/{id}/export?key=API_KEY&type=files' ``` To export job memories use the query parameter `type=memory`. The status of the export can be checked by requesting the job `GET /jobs/:jobId`, `job.isProcessing` will be `1` while in progress, `0` when idle and `-2` when the export failed. +Prepare job files for download. To export translated documents from the job use the query parameter `type=files`: Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs/{id}/export?key=API_KEY&type=files' ``` To export job memories use the query parameter `type=memory`. The status of the export can be checked by requesting the job `GET /jobs/:jobId`, `job.isProcessing` will be `1` while in progress, `0` when idle and `-2` when the export failed. ### Example ```java @@ -413,7 +413,7 @@ import com.lilt.client.api.JobsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -474,7 +474,7 @@ null (empty response body) Retrieve a Job -Retrieves a job data along with stats. To retrieve a specific job, you will need the job `id` in the url path. Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs/{id}?key=API_KEY' ``` +Retrieves a job data along with stats. To retrieve a specific job, you will need the job `id` in the url path. Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' ``` ### Example ```java @@ -489,7 +489,7 @@ import com.lilt.client.api.JobsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -549,7 +549,7 @@ Name | Type | Description | Notes Retrieve Job Leverage Stats -Get the TM leverage stats for the job (new/exact/fuzzy matches). Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/stats?key=API_KEY' ``` +Get the TM leverage stats for the job (new/exact/fuzzy matches). Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/stats?key=API_KEY' ``` ### Example ```java @@ -564,7 +564,7 @@ import com.lilt.client.api.JobsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -624,7 +624,7 @@ Name | Type | Description | Notes Reactivate a Job -Set the job state to active. Does not change the state of projects associated with the given job. It will return the reactivated job. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/reactivate?key=API_KEY' ``` +Set the job state to active. Does not change the state of projects associated with the given job. It will return the reactivated job. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/reactivate?key=API_KEY' ``` ### Example ```java @@ -639,7 +639,7 @@ import com.lilt.client.api.JobsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -695,11 +695,11 @@ Name | Type | Description | Notes # **retrieveAllJobs** -> List<Job> retrieveAllJobs(isArchived) +> List<Job> retrieveAllJobs(isArchived, isDelivered, offset, limit) Retrieve all Jobs -Get all Jobs. You can retrieve all jobs from your account using the above API. Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs?key=API_KEY&isArchived=false' ``` +Get all Jobs within a given offset and limit. You can retrieve jobs from your account using the above API. Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs?key=API_KEY&isArchived=false' ``` ### Example ```java @@ -714,7 +714,7 @@ import com.lilt.client.api.JobsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -729,8 +729,11 @@ public class Example { JobsApi apiInstance = new JobsApi(defaultClient); Boolean isArchived = true; // Boolean | Retrieves all jobs that are archived. + Boolean isDelivered = true; // Boolean | Retrieves all jobs that are delivered. + Integer offset = 56; // Integer | Return jobs starting at the offset row. If not given the default offset will be 0. + Integer limit = 56; // Integer | The maximum number of jobs to be returned. If not given the default limit will be 25. try { - List result = apiInstance.retrieveAllJobs(isArchived); + List result = apiInstance.retrieveAllJobs(isArchived, isDelivered, offset, limit); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling JobsApi#retrieveAllJobs"); @@ -748,6 +751,9 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **isArchived** | **Boolean**| Retrieves all jobs that are archived. | [optional] + **isDelivered** | **Boolean**| Retrieves all jobs that are delivered. | [optional] + **offset** | **Integer**| Return jobs starting at the offset row. If not given the default offset will be 0. | [optional] + **limit** | **Integer**| The maximum number of jobs to be returned. If not given the default limit will be 25. | [optional] ### Return type @@ -774,7 +780,7 @@ Name | Type | Description | Notes Unarchive a Job -Set job to unarchived, the job will move to active status. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/unarchive?key=API_KEY' ``` +Set job to unarchived, the job will move to active status. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/unarchive?key=API_KEY' ``` ### Example ```java @@ -789,7 +795,7 @@ import com.lilt.client.api.JobsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -849,7 +855,7 @@ Name | Type | Description | Notes Update a Job -Updates a job with the new job properties. To update a specific job, you will need the job `id` in the url path. You can update job's name and due date by passing the property and new value in the body. Example CURL command: ``` curl -X PUT 'https://lilt.com/2/jobs/{id}?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"due\": \"2022-05-05T10:56:44.985Z\" }' ``` +Updates a job with the new job properties. To update a specific job, you will need the job `id` in the url path. You can update job's name and due date by passing the property and new value in the body. Example CURL command: ``` curl -X PUT 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"due\": \"2022-05-05T10:56:44.985Z\" }' ``` ### Example ```java @@ -864,7 +870,7 @@ import com.lilt.client.api.JobsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); diff --git a/docs/LanguagePair.md b/docs/LanguagePair.md index a04b0cd23..d1fd253a7 100644 --- a/docs/LanguagePair.md +++ b/docs/LanguagePair.md @@ -7,17 +7,21 @@ A language pair couples the source and target language along with memory and pre Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**srcLang** | **String** | Source langauge, an ISO 639-1 language identifier. | [optional] -**srcLocale** | **String** | A locale identifier, supported for source langauge. | [optional] -**trgLang** | **String** | Target langauge, an ISO 639-1 language identifier. | +**srcLang** | **String** | Source language, an ISO 639-1 language identifier. | [optional] +**srcLocale** | **String** | A locale identifier, supported for source language. | [optional] +**trgLang** | **String** | Target language, an ISO 639-1 language identifier. | **trgLocale** | **String** | A locale identifier, supported for target language. | [optional] **dueDate** | **String** | An ISO date. | [optional] **memoryId** | **Integer** | A unique number identifying the associated Memory. | +**externalModelId** | **Integer** | A unique identifier for working with a third party model in the Lilt Platform | [optional] **pretranslate** | **Boolean** | Attribute translation authorship of exact matches to the creator of the document being pretranslated. | [optional] **autoAccept** | **Boolean** | Accept and lock exact matches. | [optional] **caseSensitive** | **Boolean** | Use case sensitive translation memory matching. | [optional] **takeMatchAttribution** | **Boolean** | Use MT for unmatched segments. | [optional] **configId** | **Integer** | Configuration id | [optional] +**workflowTemplateId** | **Integer** | Workflow Template id, to assign a specific Workflow to the project created out of this Language Pair. WorkflowTemplateIds can be retrieved via the /workflows/templates endpoint. If not specified then the Job level workflowTemplateId will be used. | [optional] +**workflowTemplateName** | **Integer** | Workflow Template Name, when passed with TeamId it allows for an on the fly look up of the correct WorkflowTemplate to use. If workflowTemplateId is passed the workflowTemplateId supercedes other lookups. | [optional] +**workflowStageAssignments** | [**List<WorkflowStageAssignment>**](WorkflowStageAssignment.md) | | [optional] diff --git a/docs/LanguagesApi.md b/docs/LanguagesApi.md index 93751dc64..102469c5d 100644 --- a/docs/LanguagesApi.md +++ b/docs/LanguagesApi.md @@ -1,10 +1,10 @@ # LanguagesApi -All URIs are relative to *https://lilt.com/2* +All URIs are relative to *https://api.lilt.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**getLanguages**](LanguagesApi.md#getLanguages) | **GET** /languages | Retrieve supported languages +[**getLanguages**](LanguagesApi.md#getLanguages) | **GET** /v2/languages | Retrieve supported languages @@ -28,7 +28,7 @@ import com.lilt.client.api.LanguagesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); diff --git a/docs/LiltCreateContent.md b/docs/LiltCreateContent.md new file mode 100644 index 000000000..1616bd396 --- /dev/null +++ b/docs/LiltCreateContent.md @@ -0,0 +1,18 @@ + + +# LiltCreateContent + +Content Parameters for LiltCreate. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**tone** | **String** | The tone of the content. | [optional] +**terms** | **String** | The terms of the content. | [optional] +**summary** | **String** | The summary of the content. | [optional] +**language** | **String** | The language of the content. | [optional] +**memoryId** | **String** | The memory ID of the content. | [optional] +**sections** | **List<String>** | The sections of the content. | [optional] + + + diff --git a/docs/MemoriesApi.md b/docs/MemoriesApi.md index c84df126c..09774ec38 100644 --- a/docs/MemoriesApi.md +++ b/docs/MemoriesApi.md @@ -1,19 +1,18 @@ # MemoriesApi -All URIs are relative to *https://lilt.com/2* +All URIs are relative to *https://api.lilt.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**createMemory**](MemoriesApi.md#createMemory) | **POST** /memories | Create a Memory -[**deleteMemory**](MemoriesApi.md#deleteMemory) | **DELETE** /memories | Delete a Memory -[**getMemory**](MemoriesApi.md#getMemory) | **GET** /memories | Retrieve a Memory -[**importMemoryFile**](MemoriesApi.md#importMemoryFile) | **POST** /memories/import | File import for a Memory -[**queryMemory**](MemoriesApi.md#queryMemory) | **GET** /memories/query | Query a Memory -[**syncDeleteMemory**](MemoriesApi.md#syncDeleteMemory) | **DELETE** /memories/sync | Delete-sync for a Memory -[**syncDownMemory**](MemoriesApi.md#syncDownMemory) | **GET** /memories/sync | Get-sync for a Memory -[**syncInsertMemory**](MemoriesApi.md#syncInsertMemory) | **POST** /memories/sync | Insert-sync for a Memory -[**syncUpdateMemory**](MemoriesApi.md#syncUpdateMemory) | **PUT** /memories/sync | Update-sync for a Memory -[**updateMemory**](MemoriesApi.md#updateMemory) | **PUT** /memories | Update the name of a Memory +[**createMemory**](MemoriesApi.md#createMemory) | **POST** /v2/memories | Create a Memory +[**deleteMemory**](MemoriesApi.md#deleteMemory) | **DELETE** /v2/memories | Delete a Memory +[**deleteSegmentFromMemory**](MemoriesApi.md#deleteSegmentFromMemory) | **DELETE** /v2/memories/segment | Delete a segment from a memory. +[**downloadTermbase**](MemoriesApi.md#downloadTermbase) | **GET** /v2/memories/termbase/download | Termbase download for a Memory +[**exportTermbase**](MemoriesApi.md#exportTermbase) | **POST** /v2/memories/termbase/export | Termbase export for a Memory +[**getMemory**](MemoriesApi.md#getMemory) | **GET** /v2/memories | Retrieve a Memory +[**importMemoryFile**](MemoriesApi.md#importMemoryFile) | **POST** /v2/memories/import | File import for a Memory +[**queryMemory**](MemoriesApi.md#queryMemory) | **GET** /v2/memories/query | Query a Memory +[**updateMemory**](MemoriesApi.md#updateMemory) | **PUT** /v2/memories | Update the name of a Memory @@ -37,7 +36,7 @@ import com.lilt.client.api.MemoriesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -112,7 +111,7 @@ import com.lilt.client.api.MemoriesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -166,13 +165,13 @@ Name | Type | Description | Notes **200** | A status object. | - | **0** | Unexpected error | - | - -# **getMemory** -> List<Memory> getMemory(id) + +# **deleteSegmentFromMemory** +> DeleteSegmentFromMemoryResponse deleteSegmentFromMemory(id, segmentId) -Retrieve a Memory +Delete a segment from a memory. -Retrieve a Memory. If you cannot access the Memory (401 error) please check permissions (e.g. in case you created the Memory via the web app with a different account you may have to explicitly share that Memory). +Delete a segment from a memory. ``` curl -X DELETE https://api.lilt.com/v2/memories/segment?key=API_KEY&id=ID&segment_id=$SEGMENT_ID ``` ### Example ```java @@ -187,7 +186,7 @@ import com.lilt.client.api.MemoriesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -201,12 +200,13 @@ public class Example { BasicAuth.setPassword("YOUR PASSWORD"); MemoriesApi apiInstance = new MemoriesApi(defaultClient); - Integer id = 56; // Integer | An optional Memory identifier. + Integer id = 56; // Integer | A unique Memory identifier. + Integer segmentId = 56; // Integer | A unique Segment identifier. try { - List result = apiInstance.getMemory(id); + DeleteSegmentFromMemoryResponse result = apiInstance.deleteSegmentFromMemory(id, segmentId); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling MemoriesApi#getMemory"); + System.err.println("Exception when calling MemoriesApi#deleteSegmentFromMemory"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -220,11 +220,12 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **Integer**| An optional Memory identifier. | [optional] + **id** | **Integer**| A unique Memory identifier. | + **segmentId** | **Integer**| A unique Segment identifier. | ### Return type -[**List<Memory>**](Memory.md) +[**DeleteSegmentFromMemoryResponse**](DeleteSegmentFromMemoryResponse.md) ### Authorization @@ -238,97 +239,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | A list of Memory objects. | - | -**0** | Unexpected error | - | - - -# **importMemoryFile** -> MemoryImportResponse importMemoryFile(memoryId, name, body, hasHeaderRow) - -File import for a Memory - -Imports common translation memory or termbase file formats to a specific Lilt memory. Currently supported file formats are `*.tmx`, `*.sdltm` and `*.tmq` for TM data; `*.csv` and `*.tbx` for termbase data. Request parameters should be passed as JSON object with the header field `LILT-API`. Example CURL command to upload a translation memory file named `my_memory.sdltm` in the current working directory: ``` curl -X POST https://lilt.com/2/memories/import?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.sdltm\\\",\\\"memory_id\\\": 42}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.sdltm ``` - -### Example -```java -// Import classes: -import com.lilt.client.ApiClient; -import com.lilt.client.ApiException; -import com.lilt.client.Configuration; -import com.lilt.client.auth.*; -import com.lilt.client.models.*; -import com.lilt.client.api.MemoriesApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - MemoriesApi apiInstance = new MemoriesApi(defaultClient); - Integer memoryId = 56; // Integer | A unique Memory identifier. - String name = "name_example"; // String | Name of the TM or termbase file. - File body = new File("/path/to/file"); // File | The file contents to be uploaded. The entire POST body will be treated as the file. - Boolean hasHeaderRow = true; // Boolean | A flag indicating whether an imported Termbase CSV has a header row or not (the default value is `false`). - try { - MemoryImportResponse result = apiInstance.importMemoryFile(memoryId, name, body, hasHeaderRow); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling MemoriesApi#importMemoryFile"); - 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 -------------- | ------------- | ------------- | ------------- - **memoryId** | **Integer**| A unique Memory identifier. | - **name** | **String**| Name of the TM or termbase file. | - **body** | **File**| The file contents to be uploaded. The entire POST body will be treated as the file. | - **hasHeaderRow** | **Boolean**| A flag indicating whether an imported Termbase CSV has a header row or not (the default value is `false`). | [optional] - -### Return type - -[**MemoryImportResponse**](MemoryImportResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: application/octet-stream - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | A status object. | - | +**200** | A success resposne. | - | **0** | Unexpected error | - | - -# **queryMemory** -> List<TranslationMemoryEntry> queryMemory(id, query, n) + +# **downloadTermbase** +> byte[] downloadTermbase(id) -Query a Memory +Termbase download for a Memory -Perform a translation memory query. +Downloads the termbase export for the given memory as a CSV file. Ensure you first call the `/2/memories/termbase/export` endpoint to start the export process before you try to download it. ``` curl -X GET https://api.lilt.com/v2/memories/termbase/download?key=API_KEY&id=ID ``` ### Example ```java @@ -343,7 +263,7 @@ import com.lilt.client.api.MemoriesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -358,13 +278,11 @@ public class Example { MemoriesApi apiInstance = new MemoriesApi(defaultClient); Integer id = 56; // Integer | A unique Memory identifier. - String query = "query_example"; // String | A source query. - Integer n = 10; // Integer | Maximum number of results to return. try { - List result = apiInstance.queryMemory(id, query, n); + byte[] result = apiInstance.downloadTermbase(id); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling MemoriesApi#queryMemory"); + System.err.println("Exception when calling MemoriesApi#downloadTermbase"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -379,12 +297,10 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Integer**| A unique Memory identifier. | - **query** | **String**| A source query. | - **n** | **Integer**| Maximum number of results to return. | [optional] [default to 10] ### Return type -[**List<TranslationMemoryEntry>**](TranslationMemoryEntry.md) +**byte[]** ### Authorization @@ -398,16 +314,16 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | A list of TranslationMemoryEntry objects. | - | +**200** | A file. | - | **0** | Unexpected error | - | - -# **syncDeleteMemory** -> MemorySyncDeleteResponse syncDeleteMemory(id, fromTime, toTime, when) + +# **exportTermbase** +> TermbaseExportResponse exportTermbase(id) -Delete-sync for a Memory +Termbase export for a Memory -Deletes segments in the Memory matching the `from_time`, `to_time` and `when` parameters. Example CURL command: ``` curl -X DELETE https://lilt.com/2/memories/sync?key=API_KEY&id=42&from_time=1491048000&to_time=1491049800&when=created ``` +Exports the termbase entries for the given memory into a CSV file. Calling this endpoint will begin the export process in the background. Check that the processing is complete by polling the `GET /2/memories` endpoint. When the `is_processing` value is 0 then call the `POST /2/memories/termbase/download` endpoint. ``` curl -X POST https://api.lilt.com/v2/memories/termbase/export?key=API_KEY&id=ID ``` ### Example ```java @@ -422,7 +338,7 @@ import com.lilt.client.api.MemoriesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -437,14 +353,11 @@ public class Example { MemoriesApi apiInstance = new MemoriesApi(defaultClient); Integer id = 56; // Integer | A unique Memory identifier. - Integer fromTime = 56; // Integer | Unix time stamp (epoch, in seconds) of the start of the Memory section. - Integer toTime = 56; // Integer | Unix time stamp (epoch, in seconds) of the end of the Memory section. - String when = "when_example"; // String | The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. try { - MemorySyncDeleteResponse result = apiInstance.syncDeleteMemory(id, fromTime, toTime, when); + TermbaseExportResponse result = apiInstance.exportTermbase(id); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling MemoriesApi#syncDeleteMemory"); + System.err.println("Exception when calling MemoriesApi#exportTermbase"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -459,13 +372,10 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Integer**| A unique Memory identifier. | - **fromTime** | **Integer**| Unix time stamp (epoch, in seconds) of the start of the Memory section. | [optional] - **toTime** | **Integer**| Unix time stamp (epoch, in seconds) of the end of the Memory section. | [optional] - **when** | **String**| The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. | [optional] ### Return type -[**MemorySyncDeleteResponse**](MemorySyncDeleteResponse.md) +[**TermbaseExportResponse**](TermbaseExportResponse.md) ### Authorization @@ -482,13 +392,13 @@ Name | Type | Description | Notes **200** | A status object. | - | **0** | Unexpected error | - | - -# **syncDownMemory** -> byte[] syncDownMemory(id, fromTime, toTime, when) + +# **getMemory** +> List<Memory> getMemory(id) -Get-sync for a Memory +Retrieve a Memory -Get all or part of a memory in TMX 1.4b format. If the `from_time` and/or `to_time` are omitted, then all segments are returned. The parameter `when` specifies on which date field `from_time` and `to_time` are matched. Possible values are `created` (when the segment was originally created in the memory), `updated` (when the segment was lastly updated), and `deleted` (when the segment was deleted). Example CURL command: ``` curl -X GET https://lilt.com/2/memories/sync?key=API_KEY&id=42 -o from_lilt.tmx ``` +Retrieve a Memory. If you cannot access the Memory (401 error) please check permissions (e.g. in case you created the Memory via the web app with a different account you may have to explicitly share that Memory). ### Example ```java @@ -503,7 +413,7 @@ import com.lilt.client.api.MemoriesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -517,15 +427,12 @@ public class Example { BasicAuth.setPassword("YOUR PASSWORD"); MemoriesApi apiInstance = new MemoriesApi(defaultClient); - Integer id = 56; // Integer | A unique Memory identifier. - Integer fromTime = 56; // Integer | Unix time stamp (epoch, in seconds) of the start of the Memory section. - Integer toTime = 56; // Integer | Unix time stamp (epoch, in seconds) of the end of the Memory section. - String when = "when_example"; // String | The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. If this parameter is omitted, then the whole Memory is returned. + Integer id = 56; // Integer | An optional Memory identifier. try { - byte[] result = apiInstance.syncDownMemory(id, fromTime, toTime, when); + List result = apiInstance.getMemory(id); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling MemoriesApi#syncDownMemory"); + System.err.println("Exception when calling MemoriesApi#getMemory"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -539,14 +446,11 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **Integer**| A unique Memory identifier. | - **fromTime** | **Integer**| Unix time stamp (epoch, in seconds) of the start of the Memory section. | [optional] - **toTime** | **Integer**| Unix time stamp (epoch, in seconds) of the end of the Memory section. | [optional] - **when** | **String**| The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. If this parameter is omitted, then the whole Memory is returned. | [optional] + **id** | **Integer**| An optional Memory identifier. | [optional] ### Return type -**byte[]** +[**List<Memory>**](Memory.md) ### Authorization @@ -555,21 +459,21 @@ Name | Type | Description | Notes ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/x-tmx + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | A TMX 1.4b file. | - | +**200** | A list of Memory objects. | - | **0** | Unexpected error | - | - -# **syncInsertMemory** -> MemoryInsertResponse syncInsertMemory(id, body, name) + +# **importMemoryFile** +> MemoryImportResponse importMemoryFile(memoryId, name, body, sdlxliffFilters, hasHeaderRow, skipDuplicates) -Insert-sync for a Memory +File import for a Memory -Inserts a TM in TMX 1.4b format into the Memory. Request parameters should be passed as JSON object with the header field `LILT-API`. Example CURL command: ``` curl -X POST https://lilt.com/2/memories/sync?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.tmx\\\",\\\"id\\\": 42}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.tmx ``` +Imports common translation memory or termbase file formats to a specific Lilt memory. Currently supported file formats are `*.tmx`, `*.sdltm`, `*.sdlxliff`(With custom Filters), '*.xliff', and `*.tmq` for TM data; `*.csv` and `*.tbx` for termbase data. Request parameters should be passed as JSON object with the header field `LILT-API`. Example CURL command to upload a translation memory file named `my_memory.sdltm` in the current working directory: ``` curl -X POST https://api.lilt.com/v2/memories/import?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.sdltm\\\",\\\"memory_id\\\": 42}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.sdltm ``` Example CURL command to upload a translation memory file named `my_memory.sdlxliff` in the current working directory, with Custom Filters based on SDLXLIFF fields, conf_name which maps to, percentage, and whether we should ignore unlocked segments. ``` curl -X POST https://api.lilt.com/v2/memories/import?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.sdlxliff\\\",\\\"memory_id\\\": 12,\\\"sdlxliff_filters\\\":[{\\\"conf_name\\\": \\\"Translated\\\", \\\"percentage\\\": 100, \\\"allow_unlocked\\\": false}]\"}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.sdlxliff ### Example ```java @@ -584,7 +488,7 @@ import com.lilt.client.api.MemoriesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -598,14 +502,17 @@ public class Example { BasicAuth.setPassword("YOUR PASSWORD"); MemoriesApi apiInstance = new MemoriesApi(defaultClient); - Integer id = 56; // Integer | A unique Memory identifier. - String body = "body_example"; // String | The file contents to be uploaded. The entire POST body will be treated as the file. - String name = "name_example"; // String | Name of the TMX file. + Integer memoryId = 56; // Integer | A unique Memory identifier. + String name = "name_example"; // String | Name of the TM or termbase file. + File body = new File("/path/to/file"); // File | The file contents to be uploaded. The entire POST body will be treated as the file. + List sdlxliffFilters = Arrays.asList(); // List | Contains Filter information Unique to SDLXLIFF + Boolean hasHeaderRow = true; // Boolean | A flag indicating whether an imported Termbase CSV has a header row or not (the default value is `false`). + Boolean skipDuplicates = true; // Boolean | A flag indicating whether or not to skip the import of segments which already exist in the memory. (the default value is `false`). try { - MemoryInsertResponse result = apiInstance.syncInsertMemory(id, body, name); + MemoryImportResponse result = apiInstance.importMemoryFile(memoryId, name, body, sdlxliffFilters, hasHeaderRow, skipDuplicates); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling MemoriesApi#syncInsertMemory"); + System.err.println("Exception when calling MemoriesApi#importMemoryFile"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -619,13 +526,16 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **Integer**| A unique Memory identifier. | - **body** | **String**| The file contents to be uploaded. The entire POST body will be treated as the file. | - **name** | **String**| Name of the TMX file. | [optional] + **memoryId** | **Integer**| A unique Memory identifier. | + **name** | **String**| Name of the TM or termbase file. | + **body** | **File**| The file contents to be uploaded. The entire POST body will be treated as the file. | + **sdlxliffFilters** | [**List<SDLXLIFFFilter>**](SDLXLIFFFilter.md)| Contains Filter information Unique to SDLXLIFF | [optional] + **hasHeaderRow** | **Boolean**| A flag indicating whether an imported Termbase CSV has a header row or not (the default value is `false`). | [optional] + **skipDuplicates** | **Boolean**| A flag indicating whether or not to skip the import of segments which already exist in the memory. (the default value is `false`). | [optional] ### Return type -[**MemoryInsertResponse**](MemoryInsertResponse.md) +[**MemoryImportResponse**](MemoryImportResponse.md) ### Authorization @@ -642,13 +552,13 @@ Name | Type | Description | Notes **200** | A status object. | - | **0** | Unexpected error | - | - -# **syncUpdateMemory** -> MemoryUpdateResponse syncUpdateMemory(id, body, fromTime, toTime, when) + +# **queryMemory** +> List<TranslationMemoryEntry> queryMemory(id, query, n) -Update-sync for a Memory +Query a Memory -Updates the Memory with given TMX file. Request parameters should be passed as JSON object with the header field `LILT-API`. The number of segments returned by the `from_time`, `to_time`, `when` parameters and the number of segments in the TMX file need to be identical. Example CURL command: ``` curl -X PUT https://lilt.com/2/memories/sync?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.tmx\\\", \\\"id\\\": 42, \\\"from_time\\\": 1491048000, \\\"to_time\\\": 1491049800, \"when\": \"Updated\"}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.tmx ``` +Perform a translation memory query. ### Example ```java @@ -663,7 +573,7 @@ import com.lilt.client.api.MemoriesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -678,15 +588,13 @@ public class Example { MemoriesApi apiInstance = new MemoriesApi(defaultClient); Integer id = 56; // Integer | A unique Memory identifier. - String body = "body_example"; // String | The file contents to be uploaded. The entire PUT body will be treated as the file. - Integer fromTime = 56; // Integer | Unix time stamp (epoch, in seconds) of the start of the Memory section. - Integer toTime = 56; // Integer | Unix time stamp (epoch, in seconds) of the end of the Memory section. - String when = "when_example"; // String | The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. + String query = "query_example"; // String | A source query. + Integer n = 10; // Integer | Maximum number of results to return. try { - MemoryUpdateResponse result = apiInstance.syncUpdateMemory(id, body, fromTime, toTime, when); + List result = apiInstance.queryMemory(id, query, n); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling MemoriesApi#syncUpdateMemory"); + System.err.println("Exception when calling MemoriesApi#queryMemory"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -701,14 +609,12 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Integer**| A unique Memory identifier. | - **body** | **String**| The file contents to be uploaded. The entire PUT body will be treated as the file. | - **fromTime** | **Integer**| Unix time stamp (epoch, in seconds) of the start of the Memory section. | [optional] - **toTime** | **Integer**| Unix time stamp (epoch, in seconds) of the end of the Memory section. | [optional] - **when** | **String**| The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. | [optional] + **query** | **String**| A source query. | + **n** | **Integer**| Maximum number of results to return. | [optional] [default to 10] ### Return type -[**MemoryUpdateResponse**](MemoryUpdateResponse.md) +[**List<TranslationMemoryEntry>**](TranslationMemoryEntry.md) ### Authorization @@ -716,13 +622,13 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | A status object. | - | +**200** | A list of TranslationMemoryEntry objects. | - | **0** | Unexpected error | - | @@ -746,7 +652,7 @@ import com.lilt.client.api.MemoriesApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); diff --git a/docs/Memory.md b/docs/Memory.md index fc158d163..e06adf379 100644 --- a/docs/Memory.md +++ b/docs/Memory.md @@ -13,10 +13,10 @@ Name | Type | Description | Notes **srclocale** | **String** | An ISO 639-1 language identifier. | [optional] **trglocale** | **String** | An ISO 639-1 language identifier. | [optional] **name** | **String** | A name for the Memory. | [optional] +**isProcessing** | **Boolean** | Indicates the memory is being processed. | [optional] **version** | **Integer** | The current version of the Memory, which is the number of updates since the memory was created. | [optional] **createdAt** | **Integer** | Time at which the object was created. Measured in seconds since the Unix epoch. | [optional] **updatedAt** | **Integer** | Time at which the object was created. Measured in seconds since the Unix epoch. | [optional] -**numSegments** | **Integer** | The number of confirmed Segments incorporated into this Memory. | [optional] **resources** | **List<String>** | The resource files (translation memories and termbases) associated with this Memory. | [optional] diff --git a/docs/Project.md b/docs/Project.md index f8ca2c1f3..04969a518 100644 --- a/docs/Project.md +++ b/docs/Project.md @@ -22,7 +22,18 @@ Name | Type | Description | Notes **sampleReviewPercentage** | **Integer** | The project's sample review percentage. | [optional] **createdAt** | **Integer** | Time at which the object was created. Measured in seconds since the Unix epoch. | [optional] **updatedAt** | **Integer** | Time at which the object was created. Measured in seconds since the Unix epoch. | [optional] +**workflowStatus** | [**WorkflowStatusEnum**](#WorkflowStatusEnum) | The status of the Workflow for the current project. This may not be present for all project endpoints even with workflows enabled. | [optional] **document** | [**List<DocumentWithoutSegments>**](DocumentWithoutSegments.md) | A list of Documents. | [optional] +## Enum: WorkflowStatusEnum + +Name | Value +---- | ----- +READY_TO_START | "READY_TO_START" +IN_PROGRESS | "IN_PROGRESS" +DONE | "DONE" + + + diff --git a/docs/ProjectCreateParameters.md b/docs/ProjectCreateParameters.md index bd7672ec7..2b711576b 100644 --- a/docs/ProjectCreateParameters.md +++ b/docs/ProjectCreateParameters.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **jobId** | **Integer** | The Job to associate with this new Project. If a Job ID is not provided then a new Job will be created to contain the Project. | [optional] **dueDate** | **Integer** | The due date. Measured in seconds since the Unix epoch. | [optional] **metadata** | **Object** | A JSON object of key/value string pairs. Stores custom project information. | [optional] +**workflowTemplateId** | **Integer** | The workflow template used to create this project. WorkflowTemplateIds can be retrieved via the /workflows/templates endpoint. If not specified then the organization default workflowTemplateId will be used. | [optional] diff --git a/docs/ProjectStats.md b/docs/ProjectStats.md new file mode 100644 index 000000000..6dbe6c779 --- /dev/null +++ b/docs/ProjectStats.md @@ -0,0 +1,16 @@ + + +# ProjectStats + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Integer** | | +**sourceWords** | **Integer** | | +**exactWords** | **Integer** | | +**fuzzyWords** | **Integer** | | +**newWords** | **Integer** | | + + + diff --git a/docs/ProjectsApi.md b/docs/ProjectsApi.md index 06887f69f..759990c1b 100644 --- a/docs/ProjectsApi.md +++ b/docs/ProjectsApi.md @@ -1,16 +1,12 @@ # ProjectsApi -All URIs are relative to *https://lilt.com/2* +All URIs are relative to *https://api.lilt.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**createProject**](ProjectsApi.md#createProject) | **POST** /projects | Create a Project -[**deleteProject**](ProjectsApi.md#deleteProject) | **DELETE** /projects | Delete a Project -[**getProjectReport**](ProjectsApi.md#getProjectReport) | **GET** /projects/quote | Retrieve Project report -[**getProjectRevisionReport**](ProjectsApi.md#getProjectRevisionReport) | **GET** /projects/{id}/revision | Retrieve Project revision report -[**getProjectStatus**](ProjectsApi.md#getProjectStatus) | **GET** /projects/status | Retrieve Project status -[**getProjects**](ProjectsApi.md#getProjects) | **GET** /projects | Retrieve a Project -[**updateProject**](ProjectsApi.md#updateProject) | **PUT** /projects | Update a Project +[**createProject**](ProjectsApi.md#createProject) | **POST** /v2/projects | Create a Project +[**deleteProject**](ProjectsApi.md#deleteProject) | **DELETE** /v2/projects | Delete a Project +[**getProjects**](ProjectsApi.md#getProjects) | **GET** /v2/projects | Retrieve a Project @@ -34,7 +30,7 @@ import com.lilt.client.api.ProjectsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -109,7 +105,7 @@ import com.lilt.client.api.ProjectsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -163,237 +159,13 @@ Name | Type | Description | Notes **200** | A status object. | - | **0** | Unexpected error | - | - -# **getProjectReport** -> ProjectQuote getProjectReport(id) - -Retrieve Project report - -Get information about a project that can be used for quoting. This includes: * A translation memory leverage report * Word count * Segment count - -### Example -```java -// Import classes: -import com.lilt.client.ApiClient; -import com.lilt.client.ApiException; -import com.lilt.client.Configuration; -import com.lilt.client.auth.*; -import com.lilt.client.models.*; -import com.lilt.client.api.ProjectsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ProjectsApi apiInstance = new ProjectsApi(defaultClient); - Integer id = 56; // Integer | A unique Project identifier. - try { - ProjectQuote result = apiInstance.getProjectReport(id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ProjectsApi#getProjectReport"); - 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**| A unique Project identifier. | - -### Return type - -[**ProjectQuote**](ProjectQuote.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | An object that represents a Project quote. | - | -**0** | Unexpected error | - | - - -# **getProjectRevisionReport** -> getProjectRevisionReport(id) - -Retrieve Project revision report - -Get information about a project's revision report. This includes: * Stats on accepted segments * reviewer details * Error rate - -### Example -```java -// Import classes: -import com.lilt.client.ApiClient; -import com.lilt.client.ApiException; -import com.lilt.client.Configuration; -import com.lilt.client.auth.*; -import com.lilt.client.models.*; -import com.lilt.client.api.ProjectsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ProjectsApi apiInstance = new ProjectsApi(defaultClient); - Integer id = 56; // Integer | A unique Project identifier. - try { - apiInstance.getProjectRevisionReport(id); - } catch (ApiException e) { - System.err.println("Exception when calling ProjectsApi#getProjectRevisionReport"); - 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**| A unique Project identifier. | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | A csv file containing revision report. | - | -**0** | Unexpected error | - | - - -# **getProjectStatus** -> ProjectStatus getProjectStatus(id) - -Retrieve Project status - -Retrieve the status of a Project. - -### Example -```java -// Import classes: -import com.lilt.client.ApiClient; -import com.lilt.client.ApiException; -import com.lilt.client.Configuration; -import com.lilt.client.auth.*; -import com.lilt.client.models.*; -import com.lilt.client.api.ProjectsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ProjectsApi apiInstance = new ProjectsApi(defaultClient); - Integer id = 56; // Integer | A unique Project identifier. - try { - ProjectStatus result = apiInstance.getProjectStatus(id); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ProjectsApi#getProjectStatus"); - 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**| A unique Project identifier. | - -### Return type - -[**ProjectStatus**](ProjectStatus.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | An object that represents a Project status report. | - | -**0** | Unexpected error | - | - # **getProjects** > List<Project> getProjects(id, srclang, trglang, fromTime, toTime, state, archived, connectorId) Retrieve a Project -Retrieves one or more projects, including the documents associated with each project. Retrieving a project is the most efficient way to retrieve a single project or a list of all available projects. To retrieve a specific project, specify the `id` request parameter. To retrieve all projects, omit the `id` request parameter. To limit the retrieved projects to those with a particular source language or target language, specify the corresponding ISO 639-1 language codes in the `srclang` and `trglang` request parameters, respectively. +Retrieves one or more projects, including the documents associated with each project. Retrieving a project is the most efficient way to retrieve a single project, multiple projects or a list of all available projects. To retrieve a specific project, specify the `id` request parameter or you can retrieve multiple projects by adding comma (,) between ids eg. `?id=1234,5678`. To retrieve all projects, omit the `id` request parameter. To limit the retrieved projects to those with a particular source language or target language, specify the corresponding ISO 639-1 language codes in the `srclang` and `trglang` request parameters, respectively. ### Example ```java @@ -408,7 +180,7 @@ import com.lilt.client.api.ProjectsApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -422,7 +194,7 @@ public class Example { BasicAuth.setPassword("YOUR PASSWORD"); ProjectsApi apiInstance = new ProjectsApi(defaultClient); - Integer id = 56; // Integer | A unique Project identifier. + Integer id = 56; // Integer | A unique Project identifier. It can be a single id or multiple ids separated by a comma String srclang = "srclang_example"; // String | An ISO 639-1 language code. String trglang = "trglang_example"; // String | An ISO 639-1 language code. Integer fromTime = 56; // Integer | Unix time stamp (epoch, in seconds) of Projects with `created_at` greater than or equal to the value. @@ -448,7 +220,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **Integer**| A unique Project identifier. | [optional] + **id** | **Integer**| A unique Project identifier. It can be a single id or multiple ids separated by a comma | [optional] **srclang** | **String**| An ISO 639-1 language code. | [optional] **trglang** | **String**| An ISO 639-1 language code. | [optional] **fromTime** | **Integer**| Unix time stamp (epoch, in seconds) of Projects with `created_at` greater than or equal to the value. | [optional] @@ -476,78 +248,3 @@ Name | Type | Description | Notes **200** | A list of Project objects. | - | **0** | Unexpected error | - | - -# **updateProject** -> Project updateProject(body) - -Update a Project - -Update a Project. - -### Example -```java -// Import classes: -import com.lilt.client.ApiClient; -import com.lilt.client.ApiException; -import com.lilt.client.Configuration; -import com.lilt.client.auth.*; -import com.lilt.client.models.*; -import com.lilt.client.api.ProjectsApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - ProjectsApi apiInstance = new ProjectsApi(defaultClient); - ProjectUpdateResponse body = new ProjectUpdateResponse(); // ProjectUpdateResponse | - try { - Project result = apiInstance.updateProject(body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ProjectsApi#updateProject"); - 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 -------------- | ------------- | ------------- | ------------- - **body** | [**ProjectUpdateResponse**](ProjectUpdateResponse.md)| | - -### Return type - -[**Project**](Project.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | A Project object. | - | -**0** | Unexpected error | - | - diff --git a/docs/SDLXLIFFFilter.md b/docs/SDLXLIFFFilter.md new file mode 100644 index 000000000..727fbd3c5 --- /dev/null +++ b/docs/SDLXLIFFFilter.md @@ -0,0 +1,26 @@ + + +# SDLXLIFFFilter + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**confName** | [**ConfNameEnum**](#ConfNameEnum) | the current state of the SDLXLIFF Trans Unit. | +**allowablePercentage** | **Integer** | This represents for the current conf_name what percentage the filter applies to. If you pass -1 it will take any value for this field and won't ignore blank values. If you pass 50, Lilt will only import Segments that have a 50 percent match or better. | [optional] +**allowUnlockedSegments** | **Boolean** | Boolean that tells Lilt whether we should allow unlocked Segments for this conf_name. | [optional] + + + +## Enum: ConfNameEnum + +Name | Value +---- | ----- +TRANSLATED | "Translated" +DRAFT | "Draft" +APPROVEDTRANSLATION | "ApprovedTranslation" +LOCKED | "Locked" +SIGNEDOFF | "SignedOff" + + + diff --git a/docs/SignLiltCreateTermsResponse.md b/docs/SignLiltCreateTermsResponse.md new file mode 100644 index 000000000..708177784 --- /dev/null +++ b/docs/SignLiltCreateTermsResponse.md @@ -0,0 +1,12 @@ + + +# SignLiltCreateTermsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**signedAgreement** | **Boolean** | Whether or not the agreement has been signed. | [optional] + + + diff --git a/docs/TermbaseExportResponse.md b/docs/TermbaseExportResponse.md new file mode 100644 index 000000000..cb516f498 --- /dev/null +++ b/docs/TermbaseExportResponse.md @@ -0,0 +1,13 @@ + + +# TermbaseExportResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Integer** | A unique Memory identifier. | [optional] +**isProcessing** | **Integer** | The current state of the import. | [optional] + + + diff --git a/docs/TranslateApi.md b/docs/TranslateApi.md index a6b61761d..9afcd9fff 100644 --- a/docs/TranslateApi.md +++ b/docs/TranslateApi.md @@ -1,14 +1,13 @@ # TranslateApi -All URIs are relative to *https://lilt.com/2* +All URIs are relative to *https://api.lilt.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**batchTranslateFile**](TranslateApi.md#batchTranslateFile) | **POST** /translate/file | Translate a File -[**downloadFile**](TranslateApi.md#downloadFile) | **GET** /translate/files | Download translated file -[**monitorFileTranslation**](TranslateApi.md#monitorFileTranslation) | **GET** /translate/file | Monitor file translation -[**registerSegment**](TranslateApi.md#registerSegment) | **GET** /translate/register | Register a segment -[**translateSegment**](TranslateApi.md#translateSegment) | **GET** /translate | Translate a segment +[**batchTranslateFile**](TranslateApi.md#batchTranslateFile) | **POST** /v2/translate/file | Translate a File +[**downloadFile**](TranslateApi.md#downloadFile) | **GET** /v2/translate/files | Download translated file +[**monitorFileTranslation**](TranslateApi.md#monitorFileTranslation) | **GET** /v2/translate/file | Monitor file translation +[**translateSegmentPost**](TranslateApi.md#translateSegmentPost) | **POST** /v2/translate | Translate a segment @@ -17,7 +16,7 @@ Method | HTTP request | Description Translate a File -Start machine translation of one or more Files that have previously been uploaded. The response will include an `id` parameter that can be used to monitor and download the translations in subsequent calls. Example CURL: ``` curl --X --request POST 'https://lilt.com/2/translate/file?key=API_KEY&fileId=583&memoryId=2495&configId=123&withTM=true' ``` +Start machine translation of one or more Files that have previously been uploaded. The response will include an `id` parameter that can be used to monitor and download the translations in subsequent calls. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/translate/file?key=API_KEY&fileId=583&memoryId=2495&configId=123&withTM=true' ``` ### Example ```java @@ -32,7 +31,7 @@ import com.lilt.client.api.TranslateApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -98,7 +97,7 @@ Name | Type | Description | Notes Download translated file -Download a translated File. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/translate/files?key=API_KEY&id=1' ``` +Download a translated File. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/translate/files?key=API_KEY&id=1' ``` ### Example ```java @@ -113,7 +112,7 @@ import com.lilt.client.api.TranslateApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -172,7 +171,7 @@ Name | Type | Description | Notes Monitor file translation -Get information about the one or more Files that are being translated with machine translation. Query filters are optional but at least one must be provided. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/translate/file?key=API_KEY&translationIds=1,2&fromTime=1607966744&toTime=1707966744&status=InProgress' ``` +Get information about the one or more Files that are being translated with machine translation. Query filters are optional but at least one must be provided. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/translate/file?key=API_KEY&translationIds=1,2&fromTime=1607966744&toTime=1707966744&status=InProgress' ``` ### Example ```java @@ -187,7 +186,7 @@ import com.lilt.client.api.TranslateApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -247,92 +246,13 @@ Name | Type | Description | Notes **200** | Translation info | - | **0** | Unexpected error | - | - -# **registerSegment** -> TranslateRegisterResponse registerSegment(source, srclang, trglang) - -Register a segment - -Register a source string for interactive translation. The `source_hash` value that is returned by this request is required by the `prefix` parameter for the translation endpoint. The maximum source length is 5,000 characters. Usage charges apply to this endpoint for production REST API keys. - -### Example -```java -// Import classes: -import com.lilt.client.ApiClient; -import com.lilt.client.ApiException; -import com.lilt.client.Configuration; -import com.lilt.client.auth.*; -import com.lilt.client.models.*; -import com.lilt.client.api.TranslateApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - // Configure HTTP basic authorization: BasicAuth - HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); - BasicAuth.setUsername("YOUR USERNAME"); - BasicAuth.setPassword("YOUR PASSWORD"); - - TranslateApi apiInstance = new TranslateApi(defaultClient); - String source = "source_example"; // String | A source string to be registered. - String srclang = "srclang_example"; // String | An ISO 639-1 language code. - String trglang = "trglang_example"; // String | An ISO 639-1 language code. - try { - TranslateRegisterResponse result = apiInstance.registerSegment(source, srclang, trglang); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling TranslateApi#registerSegment"); - 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 -------------- | ------------- | ------------- | ------------- - **source** | **String**| A source string to be registered. | - **srclang** | **String**| An ISO 639-1 language code. | - **trglang** | **String**| An ISO 639-1 language code. | - -### Return type - -[**TranslateRegisterResponse**](TranslateRegisterResponse.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | A status object. | - | -**0** | Unexpected error | - | - - -# **translateSegment** -> TranslationList translateSegment(memoryId, source, sourceHash, prefix, n, rich, tmMatches, projectTags, body) + +# **translateSegmentPost** +> TranslationList translateSegmentPost(body) Translate a segment -Translate a source string. Setting the `rich` parameter to `true` will change the response format to include additional information about each translation including a model score, word alignments, and formatting information. The rich format can be seen in the example response on this page. By default, this endpoint also returns translation memory (TM) fuzzy matches, along with associated scores. Fuzzy matches always appear ahead of machine translation output in the response. The `source` parameter may be supplied in the query or in the request body. The maximum source length is 5,000 characters. Usage charges apply to this endpoint for production REST API keys. +Translate a source string. Setting the `rich` parameter to `true` will change the response format to include additional information about each translation including a model score, word alignments, and formatting information. The rich format can be seen in the example response on this page. By default, this endpoint also returns translation memory (TM) fuzzy matches, along with associated scores. Fuzzy matches always appear ahead of machine translation output in the response. The maximum source length is 5,000 characters. Usage charges apply to this endpoint for production REST API keys. ### Example ```java @@ -347,7 +267,7 @@ import com.lilt.client.api.TranslateApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("https://lilt.com/2"); + defaultClient.setBasePath("https://api.lilt.com"); // Configure API key authorization: ApiKeyAuth ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); @@ -361,20 +281,12 @@ public class Example { BasicAuth.setPassword("YOUR PASSWORD"); TranslateApi apiInstance = new TranslateApi(defaultClient); - Integer memoryId = 56; // Integer | A unique Memory identifier. - String source = "source_example"; // String | The source text to be translated. - Integer sourceHash = 56; // Integer | A source hash code. - String prefix = "prefix_example"; // String | A target prefix. - Integer n = 1; // Integer | Return top n translations (deprecated). - Boolean rich = false; // Boolean | Returns rich translation information (e.g., with word alignments). - Boolean tmMatches = true; // Boolean | Include translation memory fuzzy matches. - Boolean projectTags = false; // Boolean | Project tags. Projects tags in source to target if set to true. TranslateSegmentBody body = new TranslateSegmentBody(); // TranslateSegmentBody | try { - TranslationList result = apiInstance.translateSegment(memoryId, source, sourceHash, prefix, n, rich, tmMatches, projectTags, body); + TranslationList result = apiInstance.translateSegmentPost(body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling TranslateApi#translateSegment"); + System.err.println("Exception when calling TranslateApi#translateSegmentPost"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -388,14 +300,6 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **memoryId** | **Integer**| A unique Memory identifier. | - **source** | **String**| The source text to be translated. | [optional] - **sourceHash** | **Integer**| A source hash code. | [optional] - **prefix** | **String**| A target prefix. | [optional] - **n** | **Integer**| Return top n translations (deprecated). | [optional] [default to 1] - **rich** | **Boolean**| Returns rich translation information (e.g., with word alignments). | [optional] [default to false] - **tmMatches** | **Boolean**| Include translation memory fuzzy matches. | [optional] [default to true] - **projectTags** | **Boolean**| Project tags. Projects tags in source to target if set to true. | [optional] [default to false] **body** | [**TranslateSegmentBody**](TranslateSegmentBody.md)| | [optional] ### Return type diff --git a/docs/TranslateSegmentBody.md b/docs/TranslateSegmentBody.md index fc0e25e71..84bf9d5bf 100644 --- a/docs/TranslateSegmentBody.md +++ b/docs/TranslateSegmentBody.md @@ -7,6 +7,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **source** | **String** | A unique Segment identifier. | [optional] +**memoryId** | **Integer** | A unique Memory identifier. | +**sourceHash** | **Integer** | A source hash code. | [optional] +**n** | **Integer** | Return top n translations (deprecated). | [optional] +**prefix** | **String** | A target prefix | [optional] +**rich** | **Boolean** | Returns rich translation information (e.g., with word alignments). | [optional] +**tmMatches** | **Boolean** | Include translation memory fuzzy matches. | [optional] +**projectTags** | **Boolean** | Project tags. Projects tags in source to target if set to true. | [optional] +**containsICUData** | **Boolean** | Contains ICU data. If true then tags in the source following the ICU standard will be parsed and retained. | [optional] diff --git a/docs/WorkflowStageAssignment.md b/docs/WorkflowStageAssignment.md new file mode 100644 index 000000000..f39253efa --- /dev/null +++ b/docs/WorkflowStageAssignment.md @@ -0,0 +1,15 @@ + + +# WorkflowStageAssignment + +An assignment object that associates a user to a workflow stage template. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**workflowStageTemplateId** | **Integer** | | +**userId** | **Integer** | | [optional] +**email** | **String** | | [optional] + + + diff --git a/src/main/java/com/lilt/client/ApiCallback.java b/src/main/java/com/lilt/client/ApiCallback.java index a06eaf613..7e638f3c1 100644 --- a/src/main/java/com/lilt/client/ApiCallback.java +++ b/src/main/java/com/lilt/client/ApiCallback.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/lilt/client/ApiClient.java b/src/main/java/com/lilt/client/ApiClient.java index 0d1a07e11..7a27128f5 100644 --- a/src/main/java/com/lilt/client/ApiClient.java +++ b/src/main/java/com/lilt/client/ApiClient.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -54,7 +54,7 @@ public class ApiClient { - private String basePath = "https://lilt.com/2"; + private String basePath = "https://api.lilt.com"; private boolean debugging = false; private Map defaultHeaderMap = new HashMap(); private Map defaultCookieMap = new HashMap(); @@ -142,7 +142,7 @@ public String getBasePath() { /** * Set base path * - * @param basePath Base path of the URL (e.g https://lilt.com/2 + * @param basePath Base path of the URL (e.g https://api.lilt.com * @return An instance of OkHttpClient */ public ApiClient setBasePath(String basePath) { diff --git a/src/main/java/com/lilt/client/ApiException.java b/src/main/java/com/lilt/client/ApiException.java index bfcea5676..0be2734a9 100644 --- a/src/main/java/com/lilt/client/ApiException.java +++ b/src/main/java/com/lilt/client/ApiException.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,7 +16,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/com/lilt/client/ApiResponse.java b/src/main/java/com/lilt/client/ApiResponse.java index c642d9c21..63501644e 100644 --- a/src/main/java/com/lilt/client/ApiResponse.java +++ b/src/main/java/com/lilt/client/ApiResponse.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/lilt/client/Configuration.java b/src/main/java/com/lilt/client/Configuration.java index 51e74262f..cf493b65d 100644 --- a/src/main/java/com/lilt/client/Configuration.java +++ b/src/main/java/com/lilt/client/Configuration.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,7 @@ package com.lilt.client; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class Configuration { private static ApiClient defaultApiClient = new ApiClient(); diff --git a/src/main/java/com/lilt/client/GzipRequestInterceptor.java b/src/main/java/com/lilt/client/GzipRequestInterceptor.java index b0d701fbe..967490dfc 100644 --- a/src/main/java/com/lilt/client/GzipRequestInterceptor.java +++ b/src/main/java/com/lilt/client/GzipRequestInterceptor.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/lilt/client/JSON.java b/src/main/java/com/lilt/client/JSON.java index 64aeab9f2..d07044411 100644 --- a/src/main/java/com/lilt/client/JSON.java +++ b/src/main/java/com/lilt/client/JSON.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/lilt/client/Pair.java b/src/main/java/com/lilt/client/Pair.java index 75cd690b6..9875c3b8a 100644 --- a/src/main/java/com/lilt/client/Pair.java +++ b/src/main/java/com/lilt/client/Pair.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -13,7 +13,7 @@ package com.lilt.client; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/com/lilt/client/ProgressRequestBody.java b/src/main/java/com/lilt/client/ProgressRequestBody.java index add86cee7..210b2835d 100644 --- a/src/main/java/com/lilt/client/ProgressRequestBody.java +++ b/src/main/java/com/lilt/client/ProgressRequestBody.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/lilt/client/ProgressResponseBody.java b/src/main/java/com/lilt/client/ProgressResponseBody.java index 0683097c7..b4d9342ae 100644 --- a/src/main/java/com/lilt/client/ProgressResponseBody.java +++ b/src/main/java/com/lilt/client/ProgressResponseBody.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/lilt/client/StringUtil.java b/src/main/java/com/lilt/client/StringUtil.java index b35548021..572280335 100644 --- a/src/main/java/com/lilt/client/StringUtil.java +++ b/src/main/java/com/lilt/client/StringUtil.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/com/lilt/client/api/CreateApi.java b/src/main/java/com/lilt/client/api/CreateApi.java new file mode 100644 index 000000000..9d683f04c --- /dev/null +++ b/src/main/java/com/lilt/client/api/CreateApi.java @@ -0,0 +1,1028 @@ +/* + * Lilt REST API + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * + * The version of the OpenAPI document: v3.0 + * Contact: support@lilt.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.lilt.client.api; + +import com.lilt.client.ApiCallback; +import com.lilt.client.ApiClient; +import com.lilt.client.ApiException; +import com.lilt.client.ApiResponse; +import com.lilt.client.Configuration; +import com.lilt.client.Pair; +import com.lilt.client.ProgressRequestBody; +import com.lilt.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import com.lilt.client.model.CreateConverterConfigParameters; +import com.lilt.client.model.InlineResponse200; +import com.lilt.client.model.LiltCreateContent; +import com.lilt.client.model.SignLiltCreateTermsResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class CreateApi { + private ApiClient localVarApiClient; + + public CreateApi() { + this(Configuration.getDefaultApiClient()); + } + + public CreateApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + /** + * Build call for deleteLiltCreateContent + * @param contentId The content 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 Delete Lilt Create Content Response. -
+ */ + public okhttp3.Call deleteLiltCreateContentCall(Integer contentId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v2/create/{contentId}" + .replaceAll("\\{" + "contentId" + "\\}", localVarApiClient.escapeString(contentId.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); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteLiltCreateContentValidateBeforeCall(Integer contentId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'contentId' is set + if (contentId == null) { + throw new ApiException("Missing the required parameter 'contentId' when calling deleteLiltCreateContent(Async)"); + } + + + okhttp3.Call localVarCall = deleteLiltCreateContentCall(contentId, _callback); + return localVarCall; + + } + + /** + * Delete Lilt Create content + * Delete a piece of Lilt Create content. Example CURL: ``` curl --X --request DELETE 'https://api.lilt.com/v2/create/1234?key=API_KEY' ``` + * @param contentId The content ID. (required) + * @return InlineResponse200 + * @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 Delete Lilt Create Content Response. -
+ */ + public InlineResponse200 deleteLiltCreateContent(Integer contentId) throws ApiException { + ApiResponse localVarResp = deleteLiltCreateContentWithHttpInfo(contentId); + return localVarResp.getData(); + } + + /** + * Delete Lilt Create content + * Delete a piece of Lilt Create content. Example CURL: ``` curl --X --request DELETE 'https://api.lilt.com/v2/create/1234?key=API_KEY' ``` + * @param contentId The content ID. (required) + * @return ApiResponse<InlineResponse200> + * @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 Delete Lilt Create Content Response. -
+ */ + public ApiResponse deleteLiltCreateContentWithHttpInfo(Integer contentId) throws ApiException { + okhttp3.Call localVarCall = deleteLiltCreateContentValidateBeforeCall(contentId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Delete Lilt Create content (asynchronously) + * Delete a piece of Lilt Create content. Example CURL: ``` curl --X --request DELETE 'https://api.lilt.com/v2/create/1234?key=API_KEY' ``` + * @param contentId The content 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 Delete Lilt Create Content Response. -
+ */ + public okhttp3.Call deleteLiltCreateContentAsync(Integer contentId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteLiltCreateContentValidateBeforeCall(contentId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for generateLiltCreateContent + * @param templateParams Input parameters that determine what content will be generated. (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 An event stream produced by Server Side Events. The following events are supported. - message: an object with the newly generated text (e.g. {\"text\": \"hello\"}) - message: upon completion of events the string \"[DONE]\" will be emitted - fullcontent: an object containing the full response -
+ */ + public okhttp3.Call generateLiltCreateContentCall(LiltCreateContent templateParams, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = templateParams; + + // create path and map variables + String localVarPath = "/v2/create"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call generateLiltCreateContentValidateBeforeCall(LiltCreateContent templateParams, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'templateParams' is set + if (templateParams == null) { + throw new ApiException("Missing the required parameter 'templateParams' when calling generateLiltCreateContent(Async)"); + } + + + okhttp3.Call localVarCall = generateLiltCreateContentCall(templateParams, _callback); + return localVarCall; + + } + + /** + * Generate new Lilt Create content + * Generate new Lilt Create content with the given parameters. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/create?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"language\":\"en-US\", \"template\":\"blog-post\", \"templateParams\":{ \"contentLength\":\"100\", \"language\":\"en-US\", \"sections\":[], \"summary\":\"a blog post about hiking\" }, \"preferences\":{\"tone\":\"formal\",\"styleguide\":\"\"} }' ``` + * @param templateParams Input parameters that determine what content will be generated. (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
200 An event stream produced by Server Side Events. The following events are supported. - message: an object with the newly generated text (e.g. {\"text\": \"hello\"}) - message: upon completion of events the string \"[DONE]\" will be emitted - fullcontent: an object containing the full response -
+ */ + public void generateLiltCreateContent(LiltCreateContent templateParams) throws ApiException { + generateLiltCreateContentWithHttpInfo(templateParams); + } + + /** + * Generate new Lilt Create content + * Generate new Lilt Create content with the given parameters. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/create?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"language\":\"en-US\", \"template\":\"blog-post\", \"templateParams\":{ \"contentLength\":\"100\", \"language\":\"en-US\", \"sections\":[], \"summary\":\"a blog post about hiking\" }, \"preferences\":{\"tone\":\"formal\",\"styleguide\":\"\"} }' ``` + * @param templateParams Input parameters that determine what content will be generated. (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
200 An event stream produced by Server Side Events. The following events are supported. - message: an object with the newly generated text (e.g. {\"text\": \"hello\"}) - message: upon completion of events the string \"[DONE]\" will be emitted - fullcontent: an object containing the full response -
+ */ + public ApiResponse generateLiltCreateContentWithHttpInfo(LiltCreateContent templateParams) throws ApiException { + okhttp3.Call localVarCall = generateLiltCreateContentValidateBeforeCall(templateParams, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Generate new Lilt Create content (asynchronously) + * Generate new Lilt Create content with the given parameters. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/create?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"language\":\"en-US\", \"template\":\"blog-post\", \"templateParams\":{ \"contentLength\":\"100\", \"language\":\"en-US\", \"sections\":[], \"summary\":\"a blog post about hiking\" }, \"preferences\":{\"tone\":\"formal\",\"styleguide\":\"\"} }' ``` + * @param templateParams Input parameters that determine what content will be generated. (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 An event stream produced by Server Side Events. The following events are supported. - message: an object with the newly generated text (e.g. {\"text\": \"hello\"}) - message: upon completion of events the string \"[DONE]\" will be emitted - fullcontent: an object containing the full response -
+ */ + public okhttp3.Call generateLiltCreateContentAsync(LiltCreateContent templateParams, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = generateLiltCreateContentValidateBeforeCall(templateParams, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for getLiltCreateById + * @param contentId The content 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 Lilt Create content. -
+ */ + public okhttp3.Call getLiltCreateByIdCall(Integer contentId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v2/create/{contentId}" + .replaceAll("\\{" + "contentId" + "\\}", localVarApiClient.escapeString(contentId.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); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getLiltCreateByIdValidateBeforeCall(Integer contentId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'contentId' is set + if (contentId == null) { + throw new ApiException("Missing the required parameter 'contentId' when calling getLiltCreateById(Async)"); + } + + + okhttp3.Call localVarCall = getLiltCreateByIdCall(contentId, _callback); + return localVarCall; + + } + + /** + * Get Lilt Create content by ID. + * Get Lilt Create content by ID. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/create/1234?key=API_KEY' ``` + * @param contentId The content ID. (required) + * @return LiltCreateContent + * @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 Lilt Create content. -
+ */ + public LiltCreateContent getLiltCreateById(Integer contentId) throws ApiException { + ApiResponse localVarResp = getLiltCreateByIdWithHttpInfo(contentId); + return localVarResp.getData(); + } + + /** + * Get Lilt Create content by ID. + * Get Lilt Create content by ID. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/create/1234?key=API_KEY' ``` + * @param contentId The content ID. (required) + * @return ApiResponse<LiltCreateContent> + * @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 Lilt Create content. -
+ */ + public ApiResponse getLiltCreateByIdWithHttpInfo(Integer contentId) throws ApiException { + okhttp3.Call localVarCall = getLiltCreateByIdValidateBeforeCall(contentId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Lilt Create content by ID. (asynchronously) + * Get Lilt Create content by ID. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/create/1234?key=API_KEY' ``` + * @param contentId The content 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 Lilt Create content. -
+ */ + public okhttp3.Call getLiltCreateByIdAsync(Integer contentId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getLiltCreateByIdValidateBeforeCall(contentId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getLiltCreateContent + * @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 An object with a documents next task Workflow metadata. -
+ */ + public okhttp3.Call getLiltCreateContentCall(final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v2/create"; + + 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); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getLiltCreateContentValidateBeforeCall(final ApiCallback _callback) throws ApiException { + + + okhttp3.Call localVarCall = getLiltCreateContentCall(_callback); + return localVarCall; + + } + + /** + * Get Lilt Create content + * Get a list of all content that has been generated by Lilt Create. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/create?key=API_KEY' ``` + * @return List<LiltCreateContent> + * @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 An object with a documents next task Workflow metadata. -
+ */ + public List getLiltCreateContent() throws ApiException { + ApiResponse> localVarResp = getLiltCreateContentWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Get Lilt Create content + * Get a list of all content that has been generated by Lilt Create. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/create?key=API_KEY' ``` + * @return ApiResponse<List<LiltCreateContent>> + * @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 An object with a documents next task Workflow metadata. -
+ */ + public ApiResponse> getLiltCreateContentWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getLiltCreateContentValidateBeforeCall(null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get Lilt Create content (asynchronously) + * Get a list of all content that has been generated by Lilt Create. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/create?key=API_KEY' ``` + * @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 An object with a documents next task Workflow metadata. -
+ */ + public okhttp3.Call getLiltCreateContentAsync(final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getLiltCreateContentValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getLiltCreatePreferences + * @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 An object describing the stored preferences. -
+ */ + public okhttp3.Call getLiltCreatePreferencesCall(final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v2/create/preferences"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getLiltCreatePreferencesValidateBeforeCall(final ApiCallback _callback) throws ApiException { + + + okhttp3.Call localVarCall = getLiltCreatePreferencesCall(_callback); + return localVarCall; + + } + + /** + * Get Lilt Create preferences + * Get the stored preferences for Lilt Create. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/create/preferences?key=API_KEY' ``` + * @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 An object describing the stored preferences. -
+ */ + public void getLiltCreatePreferences() throws ApiException { + getLiltCreatePreferencesWithHttpInfo(); + } + + /** + * Get Lilt Create preferences + * Get the stored preferences for Lilt Create. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/create/preferences?key=API_KEY' ``` + * @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
200 An object describing the stored preferences. -
+ */ + public ApiResponse getLiltCreatePreferencesWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getLiltCreatePreferencesValidateBeforeCall(null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Get Lilt Create preferences (asynchronously) + * Get the stored preferences for Lilt Create. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/create/preferences?key=API_KEY' ``` + * @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 An object describing the stored preferences. -
+ */ + public okhttp3.Call getLiltCreatePreferencesAsync(final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getLiltCreatePreferencesValidateBeforeCall(_callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for regenerateLiltCreateContent + * @param contentId The content 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 An event stream produced by Server Side Events. The following events are supported. - message: an object with the newly generated text (e.g. {\"text\": \"hello\"}) - message: upon completion of events the string \"[DONE]\" will be emitted - fullcontent: an object containing the full response -
+ */ + public okhttp3.Call regenerateLiltCreateContentCall(Integer contentId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v2/create/{contentId}/create" + .replaceAll("\\{" + "contentId" + "\\}", localVarApiClient.escapeString(contentId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call regenerateLiltCreateContentValidateBeforeCall(Integer contentId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'contentId' is set + if (contentId == null) { + throw new ApiException("Missing the required parameter 'contentId' when calling regenerateLiltCreateContent(Async)"); + } + + + okhttp3.Call localVarCall = regenerateLiltCreateContentCall(contentId, _callback); + return localVarCall; + + } + + /** + * Regenerate Lilt Create content + * Regenerate the given piece of content with the current parameters. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/create/1234/create?key=API_KEY' ``` + * @param contentId The content 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
200 An event stream produced by Server Side Events. The following events are supported. - message: an object with the newly generated text (e.g. {\"text\": \"hello\"}) - message: upon completion of events the string \"[DONE]\" will be emitted - fullcontent: an object containing the full response -
+ */ + public void regenerateLiltCreateContent(Integer contentId) throws ApiException { + regenerateLiltCreateContentWithHttpInfo(contentId); + } + + /** + * Regenerate Lilt Create content + * Regenerate the given piece of content with the current parameters. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/create/1234/create?key=API_KEY' ``` + * @param contentId The content 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
200 An event stream produced by Server Side Events. The following events are supported. - message: an object with the newly generated text (e.g. {\"text\": \"hello\"}) - message: upon completion of events the string \"[DONE]\" will be emitted - fullcontent: an object containing the full response -
+ */ + public ApiResponse regenerateLiltCreateContentWithHttpInfo(Integer contentId) throws ApiException { + okhttp3.Call localVarCall = regenerateLiltCreateContentValidateBeforeCall(contentId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Regenerate Lilt Create content (asynchronously) + * Regenerate the given piece of content with the current parameters. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/create/1234/create?key=API_KEY' ``` + * @param contentId The content 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 An event stream produced by Server Side Events. The following events are supported. - message: an object with the newly generated text (e.g. {\"text\": \"hello\"}) - message: upon completion of events the string \"[DONE]\" will be emitted - fullcontent: an object containing the full response -
+ */ + public okhttp3.Call regenerateLiltCreateContentAsync(Integer contentId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = regenerateLiltCreateContentValidateBeforeCall(contentId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for signLiltCreateTerms + * @param signedAgreement (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 An object indicating whether the agreement has been signed or not. -
+ */ + public okhttp3.Call signLiltCreateTermsCall(CreateConverterConfigParameters signedAgreement, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = signedAgreement; + + // create path and map variables + String localVarPath = "/v2/create/terms-and-conditions"; + + 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); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call signLiltCreateTermsValidateBeforeCall(CreateConverterConfigParameters signedAgreement, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'signedAgreement' is set + if (signedAgreement == null) { + throw new ApiException("Missing the required parameter 'signedAgreement' when calling signLiltCreateTerms(Async)"); + } + + + okhttp3.Call localVarCall = signLiltCreateTermsCall(signedAgreement, _callback); + return localVarCall; + + } + + /** + * Sign the Lilt Create terms and conditions + * Lilt Create requires that the terms and conditions are signed first before using it. The terms and conditions can be signed by using this endpoint. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/create/terms-and-conditions?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{\"signedAgreement\": true}' ``` + * @param signedAgreement (required) + * @return SignLiltCreateTermsResponse + * @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 An object indicating whether the agreement has been signed or not. -
+ */ + public SignLiltCreateTermsResponse signLiltCreateTerms(CreateConverterConfigParameters signedAgreement) throws ApiException { + ApiResponse localVarResp = signLiltCreateTermsWithHttpInfo(signedAgreement); + return localVarResp.getData(); + } + + /** + * Sign the Lilt Create terms and conditions + * Lilt Create requires that the terms and conditions are signed first before using it. The terms and conditions can be signed by using this endpoint. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/create/terms-and-conditions?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{\"signedAgreement\": true}' ``` + * @param signedAgreement (required) + * @return ApiResponse<SignLiltCreateTermsResponse> + * @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 An object indicating whether the agreement has been signed or not. -
+ */ + public ApiResponse signLiltCreateTermsWithHttpInfo(CreateConverterConfigParameters signedAgreement) throws ApiException { + okhttp3.Call localVarCall = signLiltCreateTermsValidateBeforeCall(signedAgreement, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Sign the Lilt Create terms and conditions (asynchronously) + * Lilt Create requires that the terms and conditions are signed first before using it. The terms and conditions can be signed by using this endpoint. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/create/terms-and-conditions?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{\"signedAgreement\": true}' ``` + * @param signedAgreement (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 An object indicating whether the agreement has been signed or not. -
+ */ + public okhttp3.Call signLiltCreateTermsAsync(CreateConverterConfigParameters signedAgreement, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = signLiltCreateTermsValidateBeforeCall(signedAgreement, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateLiltCreateContent + * @param contentId The content ID. (required) + * @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
200 The updated Lilt Create content. -
+ */ + public okhttp3.Call updateLiltCreateContentCall(Integer contentId, LiltCreateContent body, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/v2/create/{contentId}" + .replaceAll("\\{" + "contentId" + "\\}", localVarApiClient.escapeString(contentId.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); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateLiltCreateContentValidateBeforeCall(Integer contentId, LiltCreateContent body, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'contentId' is set + if (contentId == null) { + throw new ApiException("Missing the required parameter 'contentId' when calling updateLiltCreateContent(Async)"); + } + + + okhttp3.Call localVarCall = updateLiltCreateContentCall(contentId, body, _callback); + return localVarCall; + + } + + /** + * Update Lilt Create content + * Update a piece of Lilt Create content. Example CURL: ``` curl --X --request PUT 'https://api.lilt.com/v2/create/1234?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{\"language\":\"de-DE\"}' ``` + * @param contentId The content ID. (required) + * @param body (optional) + * @return LiltCreateContent + * @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 updated Lilt Create content. -
+ */ + public LiltCreateContent updateLiltCreateContent(Integer contentId, LiltCreateContent body) throws ApiException { + ApiResponse localVarResp = updateLiltCreateContentWithHttpInfo(contentId, body); + return localVarResp.getData(); + } + + /** + * Update Lilt Create content + * Update a piece of Lilt Create content. Example CURL: ``` curl --X --request PUT 'https://api.lilt.com/v2/create/1234?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{\"language\":\"de-DE\"}' ``` + * @param contentId The content ID. (required) + * @param body (optional) + * @return ApiResponse<LiltCreateContent> + * @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 updated Lilt Create content. -
+ */ + public ApiResponse updateLiltCreateContentWithHttpInfo(Integer contentId, LiltCreateContent body) throws ApiException { + okhttp3.Call localVarCall = updateLiltCreateContentValidateBeforeCall(contentId, body, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update Lilt Create content (asynchronously) + * Update a piece of Lilt Create content. Example CURL: ``` curl --X --request PUT 'https://api.lilt.com/v2/create/1234?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{\"language\":\"de-DE\"}' ``` + * @param contentId The content ID. (required) + * @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
200 The updated Lilt Create content. -
+ */ + public okhttp3.Call updateLiltCreateContentAsync(Integer contentId, LiltCreateContent body, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateLiltCreateContentValidateBeforeCall(contentId, body, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateLiltCreatePreferences + * @param styleguide Which styleguide to use. (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 updated Lilt Create preferences. -
+ */ + public okhttp3.Call updateLiltCreatePreferencesCall(LiltCreateContent styleguide, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = styleguide; + + // create path and map variables + String localVarPath = "/v2/create/preferences"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; + return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call updateLiltCreatePreferencesValidateBeforeCall(LiltCreateContent styleguide, final ApiCallback _callback) throws ApiException { + + + okhttp3.Call localVarCall = updateLiltCreatePreferencesCall(styleguide, _callback); + return localVarCall; + + } + + /** + * Update Lilt Create preferences + * Update the stored preferences for Lilt Create. Example CURL: ``` curl --X --request PUT 'https://api.lilt.com/v2/create/preferences?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{\"tone\": \"formal\", \"styleguide\": \"\"}' ``` + * @param styleguide Which styleguide to use. (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
200 The updated Lilt Create preferences. -
+ */ + public void updateLiltCreatePreferences(LiltCreateContent styleguide) throws ApiException { + updateLiltCreatePreferencesWithHttpInfo(styleguide); + } + + /** + * Update Lilt Create preferences + * Update the stored preferences for Lilt Create. Example CURL: ``` curl --X --request PUT 'https://api.lilt.com/v2/create/preferences?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{\"tone\": \"formal\", \"styleguide\": \"\"}' ``` + * @param styleguide Which styleguide to use. (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
200 The updated Lilt Create preferences. -
+ */ + public ApiResponse updateLiltCreatePreferencesWithHttpInfo(LiltCreateContent styleguide) throws ApiException { + okhttp3.Call localVarCall = updateLiltCreatePreferencesValidateBeforeCall(styleguide, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Update Lilt Create preferences (asynchronously) + * Update the stored preferences for Lilt Create. Example CURL: ``` curl --X --request PUT 'https://api.lilt.com/v2/create/preferences?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{\"tone\": \"formal\", \"styleguide\": \"\"}' ``` + * @param styleguide Which styleguide to use. (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 updated Lilt Create preferences. -
+ */ + public okhttp3.Call updateLiltCreatePreferencesAsync(LiltCreateContent styleguide, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateLiltCreatePreferencesValidateBeforeCall(styleguide, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/src/main/java/com/lilt/client/api/DocumentsApi.java b/src/main/java/com/lilt/client/api/DocumentsApi.java index 9a269e398..ee4893425 100644 --- a/src/main/java/com/lilt/client/api/DocumentsApi.java +++ b/src/main/java/com/lilt/client/api/DocumentsApi.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,17 +27,6 @@ import java.io.IOException; -import java.math.BigDecimal; -import com.lilt.client.model.DocumentAssignmentParameters; -import com.lilt.client.model.DocumentAssignmentResponse; -import com.lilt.client.model.DocumentDeleteResponse; -import com.lilt.client.model.DocumentDoneUpdateParameters; -import com.lilt.client.model.DocumentDoneUpdateParameters1; -import com.lilt.client.model.DocumentDoneUpdateParameters2; -import com.lilt.client.model.DocumentParameters; -import com.lilt.client.model.DocumentPretranslateParameters; -import com.lilt.client.model.DocumentPretranslateResponse; -import com.lilt.client.model.DocumentUpdateParameters; import com.lilt.client.model.DocumentWithSegments; import com.lilt.client.model.Error; import java.io.File; @@ -68,248 +57,25 @@ public void setApiClient(ApiClient apiClient) { } /** - * Build call for assignDocument - * @param body (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 A status object. -
0 Unexpected error -
- */ - public okhttp3.Call assignDocumentCall(DocumentAssignmentParameters body, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/documents/share"; - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call assignDocumentValidateBeforeCall(DocumentAssignmentParameters body, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling assignDocument(Async)"); - } - - - okhttp3.Call localVarCall = assignDocumentCall(body, _callback); - return localVarCall; - - } - - /** - * Assign a Document - * Assign and unassign a Document for translation and/or review. - * @param body (required) - * @return DocumentAssignmentResponse - * @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 A status object. -
0 Unexpected error -
- */ - public DocumentAssignmentResponse assignDocument(DocumentAssignmentParameters body) throws ApiException { - ApiResponse localVarResp = assignDocumentWithHttpInfo(body); - return localVarResp.getData(); - } - - /** - * Assign a Document - * Assign and unassign a Document for translation and/or review. - * @param body (required) - * @return ApiResponse<DocumentAssignmentResponse> - * @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 A status object. -
0 Unexpected error -
- */ - public ApiResponse assignDocumentWithHttpInfo(DocumentAssignmentParameters body) throws ApiException { - okhttp3.Call localVarCall = assignDocumentValidateBeforeCall(body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Assign a Document (asynchronously) - * Assign and unassign a Document for translation and/or review. - * @param body (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 A status object. -
0 Unexpected error -
- */ - public okhttp3.Call assignDocumentAsync(DocumentAssignmentParameters body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = assignDocumentValidateBeforeCall(body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createDocument - * @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
200 A Document object. -
0 Unexpected error -
- */ - public okhttp3.Call createDocumentCall(DocumentParameters body, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/documents"; - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createDocumentValidateBeforeCall(DocumentParameters body, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = createDocumentCall(body, _callback); - return localVarCall; - - } - - /** - * Create a Document - * Create a new Document. A Document is a collection of one or more Segments. Documents are nested inside of Projects, and appear in the Project details view in the web app. Document-level relationships between Segments are considered by the machine translation system during adaptation. If there is no inherent document structure in your data, you still might consider grouping related Segments into Documents to improve translation quality. - * @param body (optional) - * @return DocumentWithSegments - * @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 A Document object. -
0 Unexpected error -
- */ - public DocumentWithSegments createDocument(DocumentParameters body) throws ApiException { - ApiResponse localVarResp = createDocumentWithHttpInfo(body); - return localVarResp.getData(); - } - - /** - * Create a Document - * Create a new Document. A Document is a collection of one or more Segments. Documents are nested inside of Projects, and appear in the Project details view in the web app. Document-level relationships between Segments are considered by the machine translation system during adaptation. If there is no inherent document structure in your data, you still might consider grouping related Segments into Documents to improve translation quality. - * @param body (optional) - * @return ApiResponse<DocumentWithSegments> - * @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 A Document object. -
0 Unexpected error -
- */ - public ApiResponse createDocumentWithHttpInfo(DocumentParameters body) throws ApiException { - okhttp3.Call localVarCall = createDocumentValidateBeforeCall(body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Create a Document (asynchronously) - * Create a new Document. A Document is a collection of one or more Segments. Documents are nested inside of Projects, and appear in the Project details view in the web app. Document-level relationships between Segments are considered by the machine translation system during adaptation. If there is no inherent document structure in your data, you still might consider grouping related Segments into Documents to improve translation quality. - * @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
200 A Document object. -
0 Unexpected error -
- */ - public okhttp3.Call createDocumentAsync(DocumentParameters body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createDocumentValidateBeforeCall(body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteDocument - * @param id A unique Document identifier. (required) + * Build call for downloadDocument + * @param id An unique Document identifier. (required) + * @param isXliff Download the document in XLIFF 1.2 format. (optional, default to true) * @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 A status object. -
200 A file. -
502 File in pretranslation. -
0 Unexpected error -
*/ - public okhttp3.Call deleteDocumentCall(Integer id, final ApiCallback _callback) throws ApiException { + public okhttp3.Call downloadDocumentCall(Integer id, Boolean isXliff, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/documents"; + String localVarPath = "/v2/documents/files"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -321,8 +87,12 @@ public okhttp3.Call deleteDocumentCall(Integer id, final ApiCallback _callback) localVarQueryParams.addAll(localVarApiClient.parameterToPair("id", id)); } + if (isXliff != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("is_xliff", isXliff)); + } + final String[] localVarAccepts = { - "application/json" + "application/octet-stream" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -336,89 +106,73 @@ public okhttp3.Call deleteDocumentCall(Integer id, final ApiCallback _callback) localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteDocumentValidateBeforeCall(Integer id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call downloadDocumentValidateBeforeCall(Integer id, Boolean isXliff, 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 deleteDocument(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling downloadDocument(Async)"); } - okhttp3.Call localVarCall = deleteDocumentCall(id, _callback); + okhttp3.Call localVarCall = downloadDocumentCall(id, isXliff, _callback); return localVarCall; } /** - * Delete a Document - * Delete a Document. - * @param id A unique Document identifier. (required) - * @return DocumentDeleteResponse + * Download a Document + * Export a Document that has been translated in the Lilt web application. Any Document can be downloaded in XLIFF 1.2 format, or can be retrieved in its original uploaded format by setting `is_xliff=false`. This endpoint will fail if either (a) export or (b) pre-translation operations are in-progress. The status of those operations can be determined by retrieving the Document resource. Example CURL command: ``` curl -X GET https://api.lilt.com/v2/documents/files?key=API_KEY&id=274 -o from_lilt.xliff ``` + * @param id An unique Document identifier. (required) + * @param isXliff Download the document in XLIFF 1.2 format. (optional, default to true) + * @return byte[] * @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 A status object. -
200 A file. -
502 File in pretranslation. -
0 Unexpected error -
*/ - public DocumentDeleteResponse deleteDocument(Integer id) throws ApiException { - ApiResponse localVarResp = deleteDocumentWithHttpInfo(id); + public byte[] downloadDocument(Integer id, Boolean isXliff) throws ApiException { + ApiResponse localVarResp = downloadDocumentWithHttpInfo(id, isXliff); return localVarResp.getData(); } /** - * Delete a Document - * Delete a Document. - * @param id A unique Document identifier. (required) - * @return ApiResponse<DocumentDeleteResponse> + * Download a Document + * Export a Document that has been translated in the Lilt web application. Any Document can be downloaded in XLIFF 1.2 format, or can be retrieved in its original uploaded format by setting `is_xliff=false`. This endpoint will fail if either (a) export or (b) pre-translation operations are in-progress. The status of those operations can be determined by retrieving the Document resource. Example CURL command: ``` curl -X GET https://api.lilt.com/v2/documents/files?key=API_KEY&id=274 -o from_lilt.xliff ``` + * @param id An unique Document identifier. (required) + * @param isXliff Download the document in XLIFF 1.2 format. (optional, default to true) + * @return ApiResponse<byte[]> * @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 A status object. -
200 A file. -
502 File in pretranslation. -
0 Unexpected error -
*/ - public ApiResponse deleteDocumentWithHttpInfo(Integer id) throws ApiException { - okhttp3.Call localVarCall = deleteDocumentValidateBeforeCall(id, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse downloadDocumentWithHttpInfo(Integer id, Boolean isXliff) throws ApiException { + okhttp3.Call localVarCall = downloadDocumentValidateBeforeCall(id, isXliff, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Delete a Document (asynchronously) - * Delete a Document. - * @param id A unique Document identifier. (required) + * Download a Document (asynchronously) + * Export a Document that has been translated in the Lilt web application. Any Document can be downloaded in XLIFF 1.2 format, or can be retrieved in its original uploaded format by setting `is_xliff=false`. This endpoint will fail if either (a) export or (b) pre-translation operations are in-progress. The status of those operations can be determined by retrieving the Document resource. Example CURL command: ``` curl -X GET https://api.lilt.com/v2/documents/files?key=API_KEY&id=274 -o from_lilt.xliff ``` + * @param id An unique Document identifier. (required) + * @param isXliff Download the document in XLIFF 1.2 format. (optional, default to true) * @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 A status object. -
0 Unexpected error -
- */ - public okhttp3.Call deleteDocumentAsync(Integer id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteDocumentValidateBeforeCall(id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for downloadDocument - * @param id An unique Document identifier. (required) - * @param isXliff Download the document in XLIFF 1.2 format. (optional, default to true) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details @@ -426,853 +180,22 @@ public okhttp3.Call deleteDocumentAsync(Integer id, final ApiCallback
Status Code Description Response Headers
200 A file. -
0 Unexpected error -
*/ - public okhttp3.Call downloadDocumentCall(Integer id, Boolean isXliff, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/documents/files"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (id != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("id", id)); - } - - if (isXliff != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("is_xliff", isXliff)); - } - - final String[] localVarAccepts = { - "application/octet-stream" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call downloadDocumentValidateBeforeCall(Integer id, Boolean isXliff, 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 downloadDocument(Async)"); - } - - - okhttp3.Call localVarCall = downloadDocumentCall(id, isXliff, _callback); - return localVarCall; - - } - - /** - * Download a Document - * Export a Document that has been translated in the Lilt web application. Any Document can be downloaded in XLIFF 1.2 format, or can be retrieved in its original uploaded format by setting `is_xliff=false`. This endpoint will fail if either (a) export or (b) pre-translation operations are in-progress. The status of those operations can be determined by retrieving the Document resource. Example CURL command: ``` curl -X GET https://lilt.com/2/documents/files?key=API_KEY&id=274 -o from_lilt.xliff ``` - * @param id An unique Document identifier. (required) - * @param isXliff Download the document in XLIFF 1.2 format. (optional, default to true) - * @return byte[] - * @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 A file. -
502 File in pretranslation. -
0 Unexpected error -
- */ - public byte[] downloadDocument(Integer id, Boolean isXliff) throws ApiException { - ApiResponse localVarResp = downloadDocumentWithHttpInfo(id, isXliff); - return localVarResp.getData(); - } - - /** - * Download a Document - * Export a Document that has been translated in the Lilt web application. Any Document can be downloaded in XLIFF 1.2 format, or can be retrieved in its original uploaded format by setting `is_xliff=false`. This endpoint will fail if either (a) export or (b) pre-translation operations are in-progress. The status of those operations can be determined by retrieving the Document resource. Example CURL command: ``` curl -X GET https://lilt.com/2/documents/files?key=API_KEY&id=274 -o from_lilt.xliff ``` - * @param id An unique Document identifier. (required) - * @param isXliff Download the document in XLIFF 1.2 format. (optional, default to true) - * @return ApiResponse<byte[]> - * @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 A file. -
502 File in pretranslation. -
0 Unexpected error -
- */ - public ApiResponse downloadDocumentWithHttpInfo(Integer id, Boolean isXliff) throws ApiException { - okhttp3.Call localVarCall = downloadDocumentValidateBeforeCall(id, isXliff, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Download a Document (asynchronously) - * Export a Document that has been translated in the Lilt web application. Any Document can be downloaded in XLIFF 1.2 format, or can be retrieved in its original uploaded format by setting `is_xliff=false`. This endpoint will fail if either (a) export or (b) pre-translation operations are in-progress. The status of those operations can be determined by retrieving the Document resource. Example CURL command: ``` curl -X GET https://lilt.com/2/documents/files?key=API_KEY&id=274 -o from_lilt.xliff ``` - * @param id An unique Document identifier. (required) - * @param isXliff Download the document in XLIFF 1.2 format. (optional, default to true) - * @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 A file. -
502 File in pretranslation. -
0 Unexpected error -
- */ - public okhttp3.Call downloadDocumentAsync(Integer id, Boolean isXliff, final ApiCallback _callback) throws ApiException { + public okhttp3.Call downloadDocumentAsync(Integer id, Boolean isXliff, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = downloadDocumentValidateBeforeCall(id, isXliff, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for getDocument - * @param id A unique Document identifier. (required) - * @param withSegments Flag indicating whether full segment information should be returned. (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 A Document object. -
0 Unexpected error -
- */ - public okhttp3.Call getDocumentCall(Integer id, Boolean withSegments, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/documents"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (id != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("id", id)); - } - - if (withSegments != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("with_segments", withSegments)); - } - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getDocumentValidateBeforeCall(Integer id, Boolean withSegments, 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 getDocument(Async)"); - } - - - okhttp3.Call localVarCall = getDocumentCall(id, withSegments, _callback); - return localVarCall; - - } - - /** - * Retrieve a Document - * List a Document. The listing will include the pretranslation status for the document. When pretranslation is in progress for a document, the `GET /documents` endpoint's response will include `is_pretranslating = true` as well as a more detailed status property `status.pretranslation` one of `idle`, `pending`, or `running`. - * @param id A unique Document identifier. (required) - * @param withSegments Flag indicating whether full segment information should be returned. (optional) - * @return DocumentWithSegments - * @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 A Document object. -
0 Unexpected error -
- */ - public DocumentWithSegments getDocument(Integer id, Boolean withSegments) throws ApiException { - ApiResponse localVarResp = getDocumentWithHttpInfo(id, withSegments); - return localVarResp.getData(); - } - - /** - * Retrieve a Document - * List a Document. The listing will include the pretranslation status for the document. When pretranslation is in progress for a document, the `GET /documents` endpoint's response will include `is_pretranslating = true` as well as a more detailed status property `status.pretranslation` one of `idle`, `pending`, or `running`. - * @param id A unique Document identifier. (required) - * @param withSegments Flag indicating whether full segment information should be returned. (optional) - * @return ApiResponse<DocumentWithSegments> - * @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 A Document object. -
0 Unexpected error -
- */ - public ApiResponse getDocumentWithHttpInfo(Integer id, Boolean withSegments) throws ApiException { - okhttp3.Call localVarCall = getDocumentValidateBeforeCall(id, withSegments, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a Document (asynchronously) - * List a Document. The listing will include the pretranslation status for the document. When pretranslation is in progress for a document, the `GET /documents` endpoint's response will include `is_pretranslating = true` as well as a more detailed status property `status.pretranslation` one of `idle`, `pending`, or `running`. - * @param id A unique Document identifier. (required) - * @param withSegments Flag indicating whether full segment information should be returned. (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 A Document object. -
0 Unexpected error -
- */ - public okhttp3.Call getDocumentAsync(Integer id, Boolean withSegments, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getDocumentValidateBeforeCall(id, withSegments, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for markReviewDone - * @param body (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 array of updated documents -
- */ - public okhttp3.Call markReviewDoneCall(DocumentDoneUpdateParameters2 body, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/documents/done/review"; - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call markReviewDoneValidateBeforeCall(DocumentDoneUpdateParameters2 body, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling markReviewDone(Async)"); - } - - - okhttp3.Call localVarCall = markReviewDoneCall(body, _callback); - return localVarCall; - - } - - /** - * Mark review done - * Mark the review of documents as done/undone in bulk. When being marked positively as done: - Documents must not already be marked as done for review. - Documents must already be marked as done for translation. - This request will also trigger an email notification. Example curl: ``` curl --X --request POST 'https://lilt.com/2/documents/done/review?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"documentIds\": [23921, 23922], \"isDone\": true }' ``` - * @param body (required) - * @return List<BigDecimal> - * @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 array of updated documents -
- */ - public List markReviewDone(DocumentDoneUpdateParameters2 body) throws ApiException { - ApiResponse> localVarResp = markReviewDoneWithHttpInfo(body); - return localVarResp.getData(); - } - - /** - * Mark review done - * Mark the review of documents as done/undone in bulk. When being marked positively as done: - Documents must not already be marked as done for review. - Documents must already be marked as done for translation. - This request will also trigger an email notification. Example curl: ``` curl --X --request POST 'https://lilt.com/2/documents/done/review?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"documentIds\": [23921, 23922], \"isDone\": true }' ``` - * @param body (required) - * @return ApiResponse<List<BigDecimal>> - * @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 array of updated documents -
- */ - public ApiResponse> markReviewDoneWithHttpInfo(DocumentDoneUpdateParameters2 body) throws ApiException { - okhttp3.Call localVarCall = markReviewDoneValidateBeforeCall(body, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Mark review done (asynchronously) - * Mark the review of documents as done/undone in bulk. When being marked positively as done: - Documents must not already be marked as done for review. - Documents must already be marked as done for translation. - This request will also trigger an email notification. Example curl: ``` curl --X --request POST 'https://lilt.com/2/documents/done/review?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"documentIds\": [23921, 23922], \"isDone\": true }' ``` - * @param body (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 array of updated documents -
- */ - public okhttp3.Call markReviewDoneAsync(DocumentDoneUpdateParameters2 body, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = markReviewDoneValidateBeforeCall(body, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for markTranslationDone - * @param body (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 array of updated documents -
- */ - public okhttp3.Call markTranslationDoneCall(DocumentDoneUpdateParameters1 body, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/documents/done/translation"; - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call markTranslationDoneValidateBeforeCall(DocumentDoneUpdateParameters1 body, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling markTranslationDone(Async)"); - } - - - okhttp3.Call localVarCall = markTranslationDoneCall(body, _callback); - return localVarCall; - - } - - /** - * Mark translation done - * Mark the translation of documents as done/undone in bulk. When being marked positively as done: - Documents must not already be marked as done and all segments must be confirmed. - This request will also trigger an email notification to a document's assigned reviewer that the document is ready for review. When being marked as un-done: - Documents must not be marked as complete for review. Example curl: ``` curl --X --request POST 'https://lilt.com/2/documents/done/translation?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"documentIds\": [23921, 23922], \"isDone\": true }' ``` - * @param body (required) - * @return List<BigDecimal> - * @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 array of updated documents -
- */ - public List markTranslationDone(DocumentDoneUpdateParameters1 body) throws ApiException { - ApiResponse> localVarResp = markTranslationDoneWithHttpInfo(body); - return localVarResp.getData(); - } - - /** - * Mark translation done - * Mark the translation of documents as done/undone in bulk. When being marked positively as done: - Documents must not already be marked as done and all segments must be confirmed. - This request will also trigger an email notification to a document's assigned reviewer that the document is ready for review. When being marked as un-done: - Documents must not be marked as complete for review. Example curl: ``` curl --X --request POST 'https://lilt.com/2/documents/done/translation?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"documentIds\": [23921, 23922], \"isDone\": true }' ``` - * @param body (required) - * @return ApiResponse<List<BigDecimal>> - * @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 array of updated documents -
- */ - public ApiResponse> markTranslationDoneWithHttpInfo(DocumentDoneUpdateParameters1 body) throws ApiException { - okhttp3.Call localVarCall = markTranslationDoneValidateBeforeCall(body, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Mark translation done (asynchronously) - * Mark the translation of documents as done/undone in bulk. When being marked positively as done: - Documents must not already be marked as done and all segments must be confirmed. - This request will also trigger an email notification to a document's assigned reviewer that the document is ready for review. When being marked as un-done: - Documents must not be marked as complete for review. Example curl: ``` curl --X --request POST 'https://lilt.com/2/documents/done/translation?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"documentIds\": [23921, 23922], \"isDone\": true }' ``` - * @param body (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 array of updated documents -
- */ - public okhttp3.Call markTranslationDoneAsync(DocumentDoneUpdateParameters1 body, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = markTranslationDoneValidateBeforeCall(body, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for pretranslateDocuments - * @param body (required) - * @param autoAccept Deprecated, use body param instead. Optional parameter for auto-accepting 100% TM hits. (optional) - * @param caseSensitive Deprecated, use body param instead. Optional for using case matching against TM hits. (optional) - * @param attributeToCreator Deprecated, use body param instead. Optional parameter for attributing translation authorship of exact matches to document creator. (optional) - * @param mode Deprecated, use body param instead. An optional parameter indicating how the document will be pretranslated. The accepted values are `tm`, or `tm+mt`. Default is `tm`. (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
202 A status object. -
0 Unexpected error -
- */ - public okhttp3.Call pretranslateDocumentsCall(DocumentPretranslateParameters body, Boolean autoAccept, Boolean caseSensitive, Boolean attributeToCreator, String mode, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/documents/pretranslate"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (autoAccept != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("auto_accept", autoAccept)); - } - - if (caseSensitive != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("case_sensitive", caseSensitive)); - } - - if (attributeToCreator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("attribute_to_creator", attributeToCreator)); - } - - if (mode != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("mode", mode)); - } - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call pretranslateDocumentsValidateBeforeCall(DocumentPretranslateParameters body, Boolean autoAccept, Boolean caseSensitive, Boolean attributeToCreator, String mode, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling pretranslateDocuments(Async)"); - } - - - okhttp3.Call localVarCall = pretranslateDocumentsCall(body, autoAccept, caseSensitive, attributeToCreator, mode, _callback); - return localVarCall; - - } - - /** - * Pretranslate a Document - * Initiate pretranslation of a list of Documents. This request will mark document(s) as being pretranslated. Pretranslation in this context is: - Applying and confirming exact TM matches based on the Memory of the Project; - Translating all other segments via MT without confirming them. Example CURL command: ``` curl -X POST https://lilt.com/2/documents/pretranslate?key=API_KEY -d {\"id\": [123]} -H \"Content-Type: application/json\" ``` Document translation is an asynchronous process that, in effect, is performed in the background. To check the status of pretranslation for a document, use the `GET /documents` endpoint. When pretranslation is in progress for a document, the `GET /documents` endpoint's response will include `is_pretranslating = true` as well as a more detailed status property `status.pretranslation` one of `idle`, `pending`, or `running`. Once pretranslation is finished, the document can be downloaded via `GET /documents/files`. - * @param body (required) - * @param autoAccept Deprecated, use body param instead. Optional parameter for auto-accepting 100% TM hits. (optional) - * @param caseSensitive Deprecated, use body param instead. Optional for using case matching against TM hits. (optional) - * @param attributeToCreator Deprecated, use body param instead. Optional parameter for attributing translation authorship of exact matches to document creator. (optional) - * @param mode Deprecated, use body param instead. An optional parameter indicating how the document will be pretranslated. The accepted values are `tm`, or `tm+mt`. Default is `tm`. (optional) - * @return DocumentPretranslateResponse - * @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
202 A status object. -
0 Unexpected error -
- */ - public DocumentPretranslateResponse pretranslateDocuments(DocumentPretranslateParameters body, Boolean autoAccept, Boolean caseSensitive, Boolean attributeToCreator, String mode) throws ApiException { - ApiResponse localVarResp = pretranslateDocumentsWithHttpInfo(body, autoAccept, caseSensitive, attributeToCreator, mode); - return localVarResp.getData(); - } - - /** - * Pretranslate a Document - * Initiate pretranslation of a list of Documents. This request will mark document(s) as being pretranslated. Pretranslation in this context is: - Applying and confirming exact TM matches based on the Memory of the Project; - Translating all other segments via MT without confirming them. Example CURL command: ``` curl -X POST https://lilt.com/2/documents/pretranslate?key=API_KEY -d {\"id\": [123]} -H \"Content-Type: application/json\" ``` Document translation is an asynchronous process that, in effect, is performed in the background. To check the status of pretranslation for a document, use the `GET /documents` endpoint. When pretranslation is in progress for a document, the `GET /documents` endpoint's response will include `is_pretranslating = true` as well as a more detailed status property `status.pretranslation` one of `idle`, `pending`, or `running`. Once pretranslation is finished, the document can be downloaded via `GET /documents/files`. - * @param body (required) - * @param autoAccept Deprecated, use body param instead. Optional parameter for auto-accepting 100% TM hits. (optional) - * @param caseSensitive Deprecated, use body param instead. Optional for using case matching against TM hits. (optional) - * @param attributeToCreator Deprecated, use body param instead. Optional parameter for attributing translation authorship of exact matches to document creator. (optional) - * @param mode Deprecated, use body param instead. An optional parameter indicating how the document will be pretranslated. The accepted values are `tm`, or `tm+mt`. Default is `tm`. (optional) - * @return ApiResponse<DocumentPretranslateResponse> - * @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
202 A status object. -
0 Unexpected error -
- */ - public ApiResponse pretranslateDocumentsWithHttpInfo(DocumentPretranslateParameters body, Boolean autoAccept, Boolean caseSensitive, Boolean attributeToCreator, String mode) throws ApiException { - okhttp3.Call localVarCall = pretranslateDocumentsValidateBeforeCall(body, autoAccept, caseSensitive, attributeToCreator, mode, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Pretranslate a Document (asynchronously) - * Initiate pretranslation of a list of Documents. This request will mark document(s) as being pretranslated. Pretranslation in this context is: - Applying and confirming exact TM matches based on the Memory of the Project; - Translating all other segments via MT without confirming them. Example CURL command: ``` curl -X POST https://lilt.com/2/documents/pretranslate?key=API_KEY -d {\"id\": [123]} -H \"Content-Type: application/json\" ``` Document translation is an asynchronous process that, in effect, is performed in the background. To check the status of pretranslation for a document, use the `GET /documents` endpoint. When pretranslation is in progress for a document, the `GET /documents` endpoint's response will include `is_pretranslating = true` as well as a more detailed status property `status.pretranslation` one of `idle`, `pending`, or `running`. Once pretranslation is finished, the document can be downloaded via `GET /documents/files`. - * @param body (required) - * @param autoAccept Deprecated, use body param instead. Optional parameter for auto-accepting 100% TM hits. (optional) - * @param caseSensitive Deprecated, use body param instead. Optional for using case matching against TM hits. (optional) - * @param attributeToCreator Deprecated, use body param instead. Optional parameter for attributing translation authorship of exact matches to document creator. (optional) - * @param mode Deprecated, use body param instead. An optional parameter indicating how the document will be pretranslated. The accepted values are `tm`, or `tm+mt`. Default is `tm`. (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
202 A status object. -
0 Unexpected error -
- */ - public okhttp3.Call pretranslateDocumentsAsync(DocumentPretranslateParameters body, Boolean autoAccept, Boolean caseSensitive, Boolean attributeToCreator, String mode, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = pretranslateDocumentsValidateBeforeCall(body, autoAccept, caseSensitive, attributeToCreator, mode, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for unlockDocuments - * @param body (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 array of updated documents -
- */ - public okhttp3.Call unlockDocumentsCall(DocumentDoneUpdateParameters body, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/documents/done/unlock"; - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call unlockDocumentsValidateBeforeCall(DocumentDoneUpdateParameters body, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling unlockDocuments(Async)"); - } - - - okhttp3.Call localVarCall = unlockDocumentsCall(body, _callback); - return localVarCall; - - } - - /** - * Unlock documents - * Unlock documents for translation. Sets document \"Translation Done\" and \"Review Done\" to false. Example curl: ``` curl --X --request POST 'https://lilt.com/2/documents/done/unlock?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"documentIds\": [23921, 23922] }' ``` - * @param body (required) - * @return List<BigDecimal> - * @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 array of updated documents -
- */ - public List unlockDocuments(DocumentDoneUpdateParameters body) throws ApiException { - ApiResponse> localVarResp = unlockDocumentsWithHttpInfo(body); - return localVarResp.getData(); - } - - /** - * Unlock documents - * Unlock documents for translation. Sets document \"Translation Done\" and \"Review Done\" to false. Example curl: ``` curl --X --request POST 'https://lilt.com/2/documents/done/unlock?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"documentIds\": [23921, 23922] }' ``` - * @param body (required) - * @return ApiResponse<List<BigDecimal>> - * @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 array of updated documents -
- */ - public ApiResponse> unlockDocumentsWithHttpInfo(DocumentDoneUpdateParameters body) throws ApiException { - okhttp3.Call localVarCall = unlockDocumentsValidateBeforeCall(body, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Unlock documents (asynchronously) - * Unlock documents for translation. Sets document \"Translation Done\" and \"Review Done\" to false. Example curl: ``` curl --X --request POST 'https://lilt.com/2/documents/done/unlock?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"documentIds\": [23921, 23922] }' ``` - * @param body (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 array of updated documents -
- */ - public okhttp3.Call unlockDocumentsAsync(DocumentDoneUpdateParameters body, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = unlockDocumentsValidateBeforeCall(body, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateDocument - * @param body (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 A Document object. -
0 Unexpected error -
- */ - public okhttp3.Call updateDocumentCall(DocumentUpdateParameters body, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/documents"; - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateDocumentValidateBeforeCall(DocumentUpdateParameters body, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling updateDocument(Async)"); - } - - - okhttp3.Call localVarCall = updateDocumentCall(body, _callback); - return localVarCall; - - } - - /** - * Update a Document - * Update a Document. - * @param body (required) - * @return DocumentWithSegments - * @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 A Document object. -
0 Unexpected error -
- */ - public DocumentWithSegments updateDocument(DocumentUpdateParameters body) throws ApiException { - ApiResponse localVarResp = updateDocumentWithHttpInfo(body); - return localVarResp.getData(); - } - - /** - * Update a Document - * Update a Document. - * @param body (required) - * @return ApiResponse<DocumentWithSegments> - * @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 A Document object. -
0 Unexpected error -
- */ - public ApiResponse updateDocumentWithHttpInfo(DocumentUpdateParameters body) throws ApiException { - okhttp3.Call localVarCall = updateDocumentValidateBeforeCall(body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update a Document (asynchronously) - * Update a Document. - * @param body (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 A Document object. -
0 Unexpected error -
- */ - public okhttp3.Call updateDocumentAsync(DocumentUpdateParameters body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateDocumentValidateBeforeCall(body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for uploadDocument * @param name A file name. (required) * @param projectId A unique Project identifier. (required) * @param body The file contents to be uploaded. The entire POST body will be treated as the file. (required) * @param pretranslate An optional parameter indicating if and how the document will be pretranslated upon being uploaded. The accepted values are `TM`, or `TM+MT` (optional) - * @param autoAccept An optional parameter to auto-accept segments with 100% translation memory matches when the `pretranslate` option is also set, or to auto-accept any target data that is present when the uploaded file is XLIFF. If omitted or set to `false`, no segments will be auto-accepted. (optional) - * @param caseSensitive An optional parameter to use case sensitive translation memory matching when the `pretranslate` option is also enabled. Matches must have identical character-by-character case to qualify as matches. Default value is `false` (optional) - * @param matchAttribution An optional parameter to attribute translation authorship of exact matches to the author of the file when the `pretranslate` option is also enabled. Default value is `false` (optional) + * @param autoAccept An optional parameter to auto-accept segments with 100% translation memory matches when the `pretranslate` option is also set, or to auto-accept any target data that is present when the uploaded file is XLIFF. If omitted it will default to your organization settings for `Accept and lock exact matches`, if set to `false`, no segments will be auto-accepted. (optional) + * @param caseSensitive An optional parameter to use case sensitive translation memory matching when the `pretranslate` option is also enabled. Matches must have identical character-by-character case to qualify as matches. Default value matches your organization settings for `Use case sensitive translation memory matching` setting (optional) + * @param matchAttribution An optional parameter to attribute translation authorship of exact matches to the author of the file when the `pretranslate` option is also enabled. Default value matches your organization settings for `Translation authorship` setting (optional) * @param configId An optional pararameter to specify an import configuration to be applied when extracting translatable content from this file. (optional) * @param _callback Callback for upload/download progress * @return Call to execute @@ -1288,7 +211,7 @@ public okhttp3.Call uploadDocumentCall(String name, Integer projectId, File body Object localVarPostBody = body; // create path and map variables - String localVarPath = "/documents/files"; + String localVarPath = "/v2/documents/files"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1368,14 +291,14 @@ private okhttp3.Call uploadDocumentValidateBeforeCall(String name, Integer proje /** * Upload a File - * Create a Document from a file in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed as JSON object with the header field `LILT-API`. File names in the header can only contain [US-ASCII characters](https://en.wikipedia.org/wiki/ASCII). File names with characters outside of US-ASCII should be [URI encoded](https://en.wikipedia.org/wiki/Percent-encoding) or transliterated to US-ASCII strings. Example CURL command: ``` curl -X POST https://lilt.com/2/documents/files?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"introduction.xliff\\\",\\\"pretranslate\\\": \\\"tm+mt\\\",\\\"project_id\\\": 9}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @Introduction.xliff ``` + * Create a Document from a file in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed as JSON object with the header field `LILT-API`. File names in the header can only contain [US-ASCII characters](https://en.wikipedia.org/wiki/ASCII). File names with characters outside of US-ASCII should be [URI encoded](https://en.wikipedia.org/wiki/Percent-encoding) or transliterated to US-ASCII strings. Example CURL command: ``` curl -X POST https://api.lilt.com/v2/documents/files?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"introduction.xliff\\\",\\\"pretranslate\\\": \\\"tm+mt\\\",\\\"project_id\\\": 9}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @Introduction.xliff ``` * @param name A file name. (required) * @param projectId A unique Project identifier. (required) * @param body The file contents to be uploaded. The entire POST body will be treated as the file. (required) * @param pretranslate An optional parameter indicating if and how the document will be pretranslated upon being uploaded. The accepted values are `TM`, or `TM+MT` (optional) - * @param autoAccept An optional parameter to auto-accept segments with 100% translation memory matches when the `pretranslate` option is also set, or to auto-accept any target data that is present when the uploaded file is XLIFF. If omitted or set to `false`, no segments will be auto-accepted. (optional) - * @param caseSensitive An optional parameter to use case sensitive translation memory matching when the `pretranslate` option is also enabled. Matches must have identical character-by-character case to qualify as matches. Default value is `false` (optional) - * @param matchAttribution An optional parameter to attribute translation authorship of exact matches to the author of the file when the `pretranslate` option is also enabled. Default value is `false` (optional) + * @param autoAccept An optional parameter to auto-accept segments with 100% translation memory matches when the `pretranslate` option is also set, or to auto-accept any target data that is present when the uploaded file is XLIFF. If omitted it will default to your organization settings for `Accept and lock exact matches`, if set to `false`, no segments will be auto-accepted. (optional) + * @param caseSensitive An optional parameter to use case sensitive translation memory matching when the `pretranslate` option is also enabled. Matches must have identical character-by-character case to qualify as matches. Default value matches your organization settings for `Use case sensitive translation memory matching` setting (optional) + * @param matchAttribution An optional parameter to attribute translation authorship of exact matches to the author of the file when the `pretranslate` option is also enabled. Default value matches your organization settings for `Translation authorship` setting (optional) * @param configId An optional pararameter to specify an import configuration to be applied when extracting translatable content from this file. (optional) * @return DocumentWithSegments * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -1393,14 +316,14 @@ public DocumentWithSegments uploadDocument(String name, Integer projectId, File /** * Upload a File - * Create a Document from a file in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed as JSON object with the header field `LILT-API`. File names in the header can only contain [US-ASCII characters](https://en.wikipedia.org/wiki/ASCII). File names with characters outside of US-ASCII should be [URI encoded](https://en.wikipedia.org/wiki/Percent-encoding) or transliterated to US-ASCII strings. Example CURL command: ``` curl -X POST https://lilt.com/2/documents/files?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"introduction.xliff\\\",\\\"pretranslate\\\": \\\"tm+mt\\\",\\\"project_id\\\": 9}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @Introduction.xliff ``` + * Create a Document from a file in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed as JSON object with the header field `LILT-API`. File names in the header can only contain [US-ASCII characters](https://en.wikipedia.org/wiki/ASCII). File names with characters outside of US-ASCII should be [URI encoded](https://en.wikipedia.org/wiki/Percent-encoding) or transliterated to US-ASCII strings. Example CURL command: ``` curl -X POST https://api.lilt.com/v2/documents/files?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"introduction.xliff\\\",\\\"pretranslate\\\": \\\"tm+mt\\\",\\\"project_id\\\": 9}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @Introduction.xliff ``` * @param name A file name. (required) * @param projectId A unique Project identifier. (required) * @param body The file contents to be uploaded. The entire POST body will be treated as the file. (required) * @param pretranslate An optional parameter indicating if and how the document will be pretranslated upon being uploaded. The accepted values are `TM`, or `TM+MT` (optional) - * @param autoAccept An optional parameter to auto-accept segments with 100% translation memory matches when the `pretranslate` option is also set, or to auto-accept any target data that is present when the uploaded file is XLIFF. If omitted or set to `false`, no segments will be auto-accepted. (optional) - * @param caseSensitive An optional parameter to use case sensitive translation memory matching when the `pretranslate` option is also enabled. Matches must have identical character-by-character case to qualify as matches. Default value is `false` (optional) - * @param matchAttribution An optional parameter to attribute translation authorship of exact matches to the author of the file when the `pretranslate` option is also enabled. Default value is `false` (optional) + * @param autoAccept An optional parameter to auto-accept segments with 100% translation memory matches when the `pretranslate` option is also set, or to auto-accept any target data that is present when the uploaded file is XLIFF. If omitted it will default to your organization settings for `Accept and lock exact matches`, if set to `false`, no segments will be auto-accepted. (optional) + * @param caseSensitive An optional parameter to use case sensitive translation memory matching when the `pretranslate` option is also enabled. Matches must have identical character-by-character case to qualify as matches. Default value matches your organization settings for `Use case sensitive translation memory matching` setting (optional) + * @param matchAttribution An optional parameter to attribute translation authorship of exact matches to the author of the file when the `pretranslate` option is also enabled. Default value matches your organization settings for `Translation authorship` setting (optional) * @param configId An optional pararameter to specify an import configuration to be applied when extracting translatable content from this file. (optional) * @return ApiResponse<DocumentWithSegments> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -1419,14 +342,14 @@ public ApiResponse uploadDocumentWithHttpInfo(String name, /** * Upload a File (asynchronously) - * Create a Document from a file in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed as JSON object with the header field `LILT-API`. File names in the header can only contain [US-ASCII characters](https://en.wikipedia.org/wiki/ASCII). File names with characters outside of US-ASCII should be [URI encoded](https://en.wikipedia.org/wiki/Percent-encoding) or transliterated to US-ASCII strings. Example CURL command: ``` curl -X POST https://lilt.com/2/documents/files?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"introduction.xliff\\\",\\\"pretranslate\\\": \\\"tm+mt\\\",\\\"project_id\\\": 9}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @Introduction.xliff ``` + * Create a Document from a file in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed as JSON object with the header field `LILT-API`. File names in the header can only contain [US-ASCII characters](https://en.wikipedia.org/wiki/ASCII). File names with characters outside of US-ASCII should be [URI encoded](https://en.wikipedia.org/wiki/Percent-encoding) or transliterated to US-ASCII strings. Example CURL command: ``` curl -X POST https://api.lilt.com/v2/documents/files?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"introduction.xliff\\\",\\\"pretranslate\\\": \\\"tm+mt\\\",\\\"project_id\\\": 9}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @Introduction.xliff ``` * @param name A file name. (required) * @param projectId A unique Project identifier. (required) * @param body The file contents to be uploaded. The entire POST body will be treated as the file. (required) * @param pretranslate An optional parameter indicating if and how the document will be pretranslated upon being uploaded. The accepted values are `TM`, or `TM+MT` (optional) - * @param autoAccept An optional parameter to auto-accept segments with 100% translation memory matches when the `pretranslate` option is also set, or to auto-accept any target data that is present when the uploaded file is XLIFF. If omitted or set to `false`, no segments will be auto-accepted. (optional) - * @param caseSensitive An optional parameter to use case sensitive translation memory matching when the `pretranslate` option is also enabled. Matches must have identical character-by-character case to qualify as matches. Default value is `false` (optional) - * @param matchAttribution An optional parameter to attribute translation authorship of exact matches to the author of the file when the `pretranslate` option is also enabled. Default value is `false` (optional) + * @param autoAccept An optional parameter to auto-accept segments with 100% translation memory matches when the `pretranslate` option is also set, or to auto-accept any target data that is present when the uploaded file is XLIFF. If omitted it will default to your organization settings for `Accept and lock exact matches`, if set to `false`, no segments will be auto-accepted. (optional) + * @param caseSensitive An optional parameter to use case sensitive translation memory matching when the `pretranslate` option is also enabled. Matches must have identical character-by-character case to qualify as matches. Default value matches your organization settings for `Use case sensitive translation memory matching` setting (optional) + * @param matchAttribution An optional parameter to attribute translation authorship of exact matches to the author of the file when the `pretranslate` option is also enabled. Default value matches your organization settings for `Translation authorship` setting (optional) * @param configId An optional pararameter to specify an import configuration to be applied when extracting translatable content from this file. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call diff --git a/src/main/java/com/lilt/client/api/FilesApi.java b/src/main/java/com/lilt/client/api/FilesApi.java index a05069f87..b01356a70 100644 --- a/src/main/java/com/lilt/client/api/FilesApi.java +++ b/src/main/java/com/lilt/client/api/FilesApi.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -75,7 +75,7 @@ public okhttp3.Call addLabelCall(String id, AddFileLabelRequest name, final ApiC Object localVarPostBody = name; // create path and map variables - String localVarPath = "/files/labels"; + String localVarPath = "/v2/files/labels"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -126,7 +126,7 @@ private okhttp3.Call addLabelValidateBeforeCall(String id, AddFileLabelRequest n /** * Add Label to File - * Add a label to a File. Example CURL: ``` curl --X --request POST 'https://lilt.com/2/files/labels?key=API_KEY&id=1' --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"label_name\" }' ``` + * Add a label to a File. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/files/labels?key=API_KEY&id=1' --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"label_name\" }' ``` * @param id A File id. (required) * @param name (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -142,7 +142,7 @@ public void addLabel(String id, AddFileLabelRequest name) throws ApiException { /** * Add Label to File - * Add a label to a File. Example CURL: ``` curl --X --request POST 'https://lilt.com/2/files/labels?key=API_KEY&id=1' --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"label_name\" }' ``` + * Add a label to a File. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/files/labels?key=API_KEY&id=1' --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"label_name\" }' ``` * @param id A File id. (required) * @param name (required) * @return ApiResponse<Void> @@ -160,7 +160,7 @@ public ApiResponse addLabelWithHttpInfo(String id, AddFileLabelRequest nam /** * Add Label to File (asynchronously) - * Add a label to a File. Example CURL: ``` curl --X --request POST 'https://lilt.com/2/files/labels?key=API_KEY&id=1' --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"label_name\" }' ``` + * Add a label to a File. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/files/labels?key=API_KEY&id=1' --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"label_name\" }' ``` * @param id A File id. (required) * @param name (required) * @param _callback The callback to be executed when the API call finishes @@ -195,7 +195,7 @@ public okhttp3.Call deleteFileCall(Integer id, final ApiCallback _callback) thro Object localVarPostBody = null; // create path and map variables - String localVarPath = "/files"; + String localVarPath = "/v2/files"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -241,7 +241,7 @@ private okhttp3.Call deleteFileValidateBeforeCall(Integer id, final ApiCallback /** * Delete a File - * Delete a File. Example CURL command: ``` curl -X DELETE https://lilt.com/2/files?key=API_KEY&id=123 ``` + * Delete a File. Example CURL command: ``` curl -X DELETE https://api.lilt.com/v2/files?key=API_KEY&id=123 ``` * @param id A unique File identifier. (required) * @return FileDeleteResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -259,7 +259,7 @@ public FileDeleteResponse deleteFile(Integer id) throws ApiException { /** * Delete a File - * Delete a File. Example CURL command: ``` curl -X DELETE https://lilt.com/2/files?key=API_KEY&id=123 ``` + * Delete a File. Example CURL command: ``` curl -X DELETE https://api.lilt.com/v2/files?key=API_KEY&id=123 ``` * @param id A unique File identifier. (required) * @return ApiResponse<FileDeleteResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -278,7 +278,7 @@ public ApiResponse deleteFileWithHttpInfo(Integer id) throws /** * Delete a File (asynchronously) - * Delete a File. Example CURL command: ``` curl -X DELETE https://lilt.com/2/files?key=API_KEY&id=123 ``` + * Delete a File. Example CURL command: ``` curl -X DELETE https://api.lilt.com/v2/files?key=API_KEY&id=123 ``` * @param id A unique File identifier. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -313,7 +313,7 @@ public okhttp3.Call downloadCall(String id, final ApiCallback _callback) throws Object localVarPostBody = null; // create path and map variables - String localVarPath = "/files/download"; + String localVarPath = "/v2/files/download"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -359,7 +359,7 @@ private okhttp3.Call downloadValidateBeforeCall(String id, final ApiCallback _ca /** * Download file - * Download a File. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/files/download?key=API_KEY&id=1' ``` + * Download a File. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/files/download?key=API_KEY&id=1' ``` * @param id A File id. (required) * @return byte[] * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -376,7 +376,7 @@ public byte[] download(String id) throws ApiException { /** * Download file - * Download a File. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/files/download?key=API_KEY&id=1' ``` + * Download a File. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/files/download?key=API_KEY&id=1' ``` * @param id A File id. (required) * @return ApiResponse<byte[]> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -394,7 +394,7 @@ public ApiResponse downloadWithHttpInfo(String id) throws ApiException { /** * Download file (asynchronously) - * Download a File. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/files/download?key=API_KEY&id=1' ``` + * Download a File. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/files/download?key=API_KEY&id=1' ``` * @param id A File id. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -423,7 +423,7 @@ public okhttp3.Call downloadAsync(String id, final ApiCallback _callback - +
Status Code Description Response Headers
200 A list of files. -
403 Unauthorized. -
403 User does not have permission for provided file. -
410 File deleted. -
0 Unexpected error. -
@@ -432,7 +432,7 @@ public okhttp3.Call getFilesCall(Integer id, List labels, final ApiCallb Object localVarPostBody = null; // create path and map variables - String localVarPath = "/files"; + String localVarPath = "/v2/files"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -477,7 +477,7 @@ private okhttp3.Call getFilesValidateBeforeCall(Integer id, List labels, /** * Retrieve a File - * Retrieves one or more files available to your user. Files are not associated with a project or a memory. They are unprocessed and can be used later in the project/document creation workflow step. To retrieve a specific file, specify the <strong>id</strong> request parameter. To retrieve all files, omit the <strong>id</strong> request parameter. Example CURL command: ``` curl -X GET https://lilt.com/2/files?key=API_KEY&id=274``` + * Retrieves one or more files available to your user. Files are not associated with a project or a memory. They are unprocessed and can be used later in the project/document creation workflow step. To retrieve a specific file, specify the <strong>id</strong> request parameter. To retrieve all files, omit the <strong>id</strong> request parameter. Example CURL command: ``` curl -X GET https://api.lilt.com/v2/files?key=API_KEY&id=274``` * @param id A unique File identifier. (optional) * @param labels One or more labels. This will return the files which contain all of the given labels. (optional) * @return List<SourceFile> @@ -486,7 +486,7 @@ private okhttp3.Call getFilesValidateBeforeCall(Integer id, List labels, - +
Status Code Description Response Headers
200 A list of files. -
403 Unauthorized. -
403 User does not have permission for provided file. -
410 File deleted. -
0 Unexpected error. -
@@ -498,7 +498,7 @@ public List getFiles(Integer id, List labels) throws ApiExce /** * Retrieve a File - * Retrieves one or more files available to your user. Files are not associated with a project or a memory. They are unprocessed and can be used later in the project/document creation workflow step. To retrieve a specific file, specify the <strong>id</strong> request parameter. To retrieve all files, omit the <strong>id</strong> request parameter. Example CURL command: ``` curl -X GET https://lilt.com/2/files?key=API_KEY&id=274``` + * Retrieves one or more files available to your user. Files are not associated with a project or a memory. They are unprocessed and can be used later in the project/document creation workflow step. To retrieve a specific file, specify the <strong>id</strong> request parameter. To retrieve all files, omit the <strong>id</strong> request parameter. Example CURL command: ``` curl -X GET https://api.lilt.com/v2/files?key=API_KEY&id=274``` * @param id A unique File identifier. (optional) * @param labels One or more labels. This will return the files which contain all of the given labels. (optional) * @return ApiResponse<List<SourceFile>> @@ -507,7 +507,7 @@ public List getFiles(Integer id, List labels) throws ApiExce - +
Status Code Description Response Headers
200 A list of files. -
403 Unauthorized. -
403 User does not have permission for provided file. -
410 File deleted. -
0 Unexpected error. -
@@ -520,7 +520,7 @@ public ApiResponse> getFilesWithHttpInfo(Integer id, List> getFilesWithHttpInfo(Integer id, List Status Code Description Response Headers 200 A list of files. - - 403 Unauthorized. - + 403 User does not have permission for provided file. - 410 File deleted. - 0 Unexpected error. - @@ -559,7 +559,7 @@ public okhttp3.Call removeLabelCall(String id, String name, final ApiCallback _c Object localVarPostBody = null; // create path and map variables - String localVarPath = "/files/labels"; + String localVarPath = "/v2/files/labels"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -614,7 +614,7 @@ private okhttp3.Call removeLabelValidateBeforeCall(String id, String name, final /** * Remove Label from File - * Remove a label from a File. Example CURL: ``` curl --X --request DELETE 'https://lilt.com/2/files/labels?key=API_KEY&id=1&name=label_name' ``` + * Remove a label from a File. Example CURL: ``` curl --X --request DELETE 'https://api.lilt.com/v2/files/labels?key=API_KEY&id=1&name=label_name' ``` * @param id A File id. (required) * @param name A label name. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -630,7 +630,7 @@ public void removeLabel(String id, String name) throws ApiException { /** * Remove Label from File - * Remove a label from a File. Example CURL: ``` curl --X --request DELETE 'https://lilt.com/2/files/labels?key=API_KEY&id=1&name=label_name' ``` + * Remove a label from a File. Example CURL: ``` curl --X --request DELETE 'https://api.lilt.com/v2/files/labels?key=API_KEY&id=1&name=label_name' ``` * @param id A File id. (required) * @param name A label name. (required) * @return ApiResponse<Void> @@ -648,7 +648,7 @@ public ApiResponse removeLabelWithHttpInfo(String id, String name) throws /** * Remove Label from File (asynchronously) - * Remove a label from a File. Example CURL: ``` curl --X --request DELETE 'https://lilt.com/2/files/labels?key=API_KEY&id=1&name=label_name' ``` + * Remove a label from a File. Example CURL: ``` curl --X --request DELETE 'https://api.lilt.com/v2/files/labels?key=API_KEY&id=1&name=label_name' ``` * @param id A File id. (required) * @param name A label name. (required) * @param _callback The callback to be executed when the API call finishes @@ -689,7 +689,7 @@ public okhttp3.Call uploadFileCall(String name, File body, String fileHash, Bool Object localVarPostBody = body; // create path and map variables - String localVarPath = "/files"; + String localVarPath = "/v2/files"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -760,7 +760,7 @@ private okhttp3.Call uploadFileValidateBeforeCall(String name, File body, String /** * Upload a File - * Upload a File in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed in as query string parameters. Example CURL command: ``` curl -X POST https://lilt.com/2/files?key=API_KEY&name=en_US.json \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @en_US.json ``` Calls to GET /files are used to monitor the language detection results. The API response will be augmented to include detected language and confidence score. The language detection will complete asynchronously. Prior to completion, the `detected_lang` value will be `zxx`, the reserved ISO 639-2 code for \"No linguistic content/not applicable\". If the language can not be determined, or the detection process fails, the `detected_lang` field will return `und`, the reserved ISO 639-2 code for undetermined language, and the `detected_lang_confidence` score will be `0`. + * Upload a File in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed in as query string parameters. Example CURL command: ``` curl -X POST https://api.lilt.com/v2/files?key=API_KEY&name=en_US.json \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @en_US.json ``` Calls to GET /files are used to monitor the language detection results. The API response will be augmented to include detected language and confidence score. The language detection will complete asynchronously. Prior to completion, the `detected_lang` value will be `zxx`, the reserved ISO 639-2 code for \"No linguistic content/not applicable\". If the language can not be determined, or the detection process fails, the `detected_lang` field will return `und`, the reserved ISO 639-2 code for undetermined language, and the `detected_lang_confidence` score will be `0`. * @param name A file name. (required) * @param body The file contents to be uploaded. The entire POST body will be treated as the file. (required) * @param fileHash A hash value to associate with the file. The MD5 hash of the body contents will be used by default if a value isn't provided. (optional) @@ -784,7 +784,7 @@ public SourceFile uploadFile(String name, File body, String fileHash, Boolean la /** * Upload a File - * Upload a File in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed in as query string parameters. Example CURL command: ``` curl -X POST https://lilt.com/2/files?key=API_KEY&name=en_US.json \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @en_US.json ``` Calls to GET /files are used to monitor the language detection results. The API response will be augmented to include detected language and confidence score. The language detection will complete asynchronously. Prior to completion, the `detected_lang` value will be `zxx`, the reserved ISO 639-2 code for \"No linguistic content/not applicable\". If the language can not be determined, or the detection process fails, the `detected_lang` field will return `und`, the reserved ISO 639-2 code for undetermined language, and the `detected_lang_confidence` score will be `0`. + * Upload a File in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed in as query string parameters. Example CURL command: ``` curl -X POST https://api.lilt.com/v2/files?key=API_KEY&name=en_US.json \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @en_US.json ``` Calls to GET /files are used to monitor the language detection results. The API response will be augmented to include detected language and confidence score. The language detection will complete asynchronously. Prior to completion, the `detected_lang` value will be `zxx`, the reserved ISO 639-2 code for \"No linguistic content/not applicable\". If the language can not be determined, or the detection process fails, the `detected_lang` field will return `und`, the reserved ISO 639-2 code for undetermined language, and the `detected_lang_confidence` score will be `0`. * @param name A file name. (required) * @param body The file contents to be uploaded. The entire POST body will be treated as the file. (required) * @param fileHash A hash value to associate with the file. The MD5 hash of the body contents will be used by default if a value isn't provided. (optional) @@ -809,7 +809,7 @@ public ApiResponse uploadFileWithHttpInfo(String name, File body, St /** * Upload a File (asynchronously) - * Upload a File in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed in as query string parameters. Example CURL command: ``` curl -X POST https://lilt.com/2/files?key=API_KEY&name=en_US.json \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @en_US.json ``` Calls to GET /files are used to monitor the language detection results. The API response will be augmented to include detected language and confidence score. The language detection will complete asynchronously. Prior to completion, the `detected_lang` value will be `zxx`, the reserved ISO 639-2 code for \"No linguistic content/not applicable\". If the language can not be determined, or the detection process fails, the `detected_lang` field will return `und`, the reserved ISO 639-2 code for undetermined language, and the `detected_lang_confidence` score will be `0`. + * Upload a File in any of the formats [documented in our knowledge base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed in as query string parameters. Example CURL command: ``` curl -X POST https://api.lilt.com/v2/files?key=API_KEY&name=en_US.json \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @en_US.json ``` Calls to GET /files are used to monitor the language detection results. The API response will be augmented to include detected language and confidence score. The language detection will complete asynchronously. Prior to completion, the `detected_lang` value will be `zxx`, the reserved ISO 639-2 code for \"No linguistic content/not applicable\". If the language can not be determined, or the detection process fails, the `detected_lang` field will return `und`, the reserved ISO 639-2 code for undetermined language, and the `detected_lang_confidence` score will be `0`. * @param name A file name. (required) * @param body The file contents to be uploaded. The entire POST body will be treated as the file. (required) * @param fileHash A hash value to associate with the file. The MD5 hash of the body contents will be used by default if a value isn't provided. (optional) diff --git a/src/main/java/com/lilt/client/api/JobsApi.java b/src/main/java/com/lilt/client/api/JobsApi.java index 05cdfd966..50aaee4e9 100644 --- a/src/main/java/com/lilt/client/api/JobsApi.java +++ b/src/main/java/com/lilt/client/api/JobsApi.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -76,7 +76,7 @@ public okhttp3.Call archiveJobCall(Integer jobId, final ApiCallback _callback) t Object localVarPostBody = null; // create path and map variables - String localVarPath = "/jobs/{jobId}/archive" + String localVarPath = "/v2/jobs/{jobId}/archive" .replaceAll("\\{" + "jobId" + "\\}", localVarApiClient.escapeString(jobId.toString())); List localVarQueryParams = new ArrayList(); @@ -119,7 +119,7 @@ private okhttp3.Call archiveJobValidateBeforeCall(Integer jobId, final ApiCallba /** * Archive a Job - * Set job to archived, unassign all linguists and archive all projects and documents inside the job. It will return the archived job. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/archive?key=API_KEY' ``` + * Set job to archived, unassign all linguists and archive all projects and documents inside the job. It will return the archived job. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/archive?key=API_KEY' ``` * @param jobId A job id. (required) * @return Job * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -137,7 +137,7 @@ public Job archiveJob(Integer jobId) throws ApiException { /** * Archive a Job - * Set job to archived, unassign all linguists and archive all projects and documents inside the job. It will return the archived job. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/archive?key=API_KEY' ``` + * Set job to archived, unassign all linguists and archive all projects and documents inside the job. It will return the archived job. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/archive?key=API_KEY' ``` * @param jobId A job id. (required) * @return ApiResponse<Job> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -156,7 +156,7 @@ public ApiResponse archiveJobWithHttpInfo(Integer jobId) throws ApiExceptio /** * Archive a Job (asynchronously) - * Set job to archived, unassign all linguists and archive all projects and documents inside the job. It will return the archived job. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/archive?key=API_KEY' ``` + * Set job to archived, unassign all linguists and archive all projects and documents inside the job. It will return the archived job. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/archive?key=API_KEY' ``` * @param jobId A job id. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -192,7 +192,7 @@ public okhttp3.Call createJobCall(JobCreateParameters body, final ApiCallback _c Object localVarPostBody = body; // create path and map variables - String localVarPath = "/jobs"; + String localVarPath = "/v2/jobs"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -234,7 +234,7 @@ private okhttp3.Call createJobValidateBeforeCall(JobCreateParameters body, final /** * Create a Job - * Create a Job. A Job is a collection of Projects. A Job will contain multiple projects, based on the language pair. A Project is associated with exactly one Memory. Jobs appear in the Jobs dashboard of the web app. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"fileIds\": [5009, 5010, 5011], \"due\": \"2022-05-05T10:56:44.985Z\", \"srcLang\": \"en\", \"srcLocale\": \"US\", \"languagePairs\": [ { \"memoryId\": 3121, \"trgLang\": \"de\" }, { \"memoryId\": 2508, \"trgLang\": \"fr\" }, { \"memoryId\": 3037, \"trgLang\": \"zh\" } ] }' ``` + * Create a Job. A Job is a collection of Projects. A Job will contain multiple projects, based on the language pair. A Project is associated with exactly one Memory. Jobs appear in the Jobs dashboard of the web app. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"fileIds\": [5009, 5010, 5011], \"due\": \"2022-05-05T10:56:44.985Z\", \"srcLang\": \"en\", \"srcLocale\": \"US\", \"languagePairs\": [ { \"memoryId\": 3121, \"trgLang\": \"de\" }, { \"memoryId\": 2508, \"trgLang\": \"fr\" }, { \"memoryId\": 3037, \"trgLang\": \"zh\" } ] }' ``` * @param body (required) * @return Job * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -252,7 +252,7 @@ public Job createJob(JobCreateParameters body) throws ApiException { /** * Create a Job - * Create a Job. A Job is a collection of Projects. A Job will contain multiple projects, based on the language pair. A Project is associated with exactly one Memory. Jobs appear in the Jobs dashboard of the web app. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"fileIds\": [5009, 5010, 5011], \"due\": \"2022-05-05T10:56:44.985Z\", \"srcLang\": \"en\", \"srcLocale\": \"US\", \"languagePairs\": [ { \"memoryId\": 3121, \"trgLang\": \"de\" }, { \"memoryId\": 2508, \"trgLang\": \"fr\" }, { \"memoryId\": 3037, \"trgLang\": \"zh\" } ] }' ``` + * Create a Job. A Job is a collection of Projects. A Job will contain multiple projects, based on the language pair. A Project is associated with exactly one Memory. Jobs appear in the Jobs dashboard of the web app. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"fileIds\": [5009, 5010, 5011], \"due\": \"2022-05-05T10:56:44.985Z\", \"srcLang\": \"en\", \"srcLocale\": \"US\", \"languagePairs\": [ { \"memoryId\": 3121, \"trgLang\": \"de\" }, { \"memoryId\": 2508, \"trgLang\": \"fr\" }, { \"memoryId\": 3037, \"trgLang\": \"zh\" } ] }' ``` * @param body (required) * @return ApiResponse<Job> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -271,7 +271,7 @@ public ApiResponse createJobWithHttpInfo(JobCreateParameters body) throws A /** * Create a Job (asynchronously) - * Create a Job. A Job is a collection of Projects. A Job will contain multiple projects, based on the language pair. A Project is associated with exactly one Memory. Jobs appear in the Jobs dashboard of the web app. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"fileIds\": [5009, 5010, 5011], \"due\": \"2022-05-05T10:56:44.985Z\", \"srcLang\": \"en\", \"srcLocale\": \"US\", \"languagePairs\": [ { \"memoryId\": 3121, \"trgLang\": \"de\" }, { \"memoryId\": 2508, \"trgLang\": \"fr\" }, { \"memoryId\": 3037, \"trgLang\": \"zh\" } ] }' ``` + * Create a Job. A Job is a collection of Projects. A Job will contain multiple projects, based on the language pair. A Project is associated with exactly one Memory. Jobs appear in the Jobs dashboard of the web app. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"fileIds\": [5009, 5010, 5011], \"due\": \"2022-05-05T10:56:44.985Z\", \"srcLang\": \"en\", \"srcLocale\": \"US\", \"languagePairs\": [ { \"memoryId\": 3121, \"trgLang\": \"de\" }, { \"memoryId\": 2508, \"trgLang\": \"fr\" }, { \"memoryId\": 3037, \"trgLang\": \"zh\" } ] }' ``` * @param body (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -307,7 +307,7 @@ public okhttp3.Call deleteJobCall(Integer jobId, final ApiCallback _callback) th Object localVarPostBody = null; // create path and map variables - String localVarPath = "/jobs/{jobId}" + String localVarPath = "/v2/jobs/{jobId}" .replaceAll("\\{" + "jobId" + "\\}", localVarApiClient.escapeString(jobId.toString())); List localVarQueryParams = new ArrayList(); @@ -350,7 +350,7 @@ private okhttp3.Call deleteJobValidateBeforeCall(Integer jobId, final ApiCallbac /** * Delete a Job - * Delete a job, deletes all projects and documents in the job, deletes all the segments from all the job's translation memories. Example CURL command: ``` curl -X DELETE 'https://lilt.com/2/jobs/{id}?key=API_KEY' ``` + * Delete a job, deletes all projects and documents in the job, deletes all the segments from all the job's translation memories. Example CURL command: ``` curl -X DELETE 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' ``` * @param jobId A job id. (required) * @return JobDeleteResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -368,7 +368,7 @@ public JobDeleteResponse deleteJob(Integer jobId) throws ApiException { /** * Delete a Job - * Delete a job, deletes all projects and documents in the job, deletes all the segments from all the job's translation memories. Example CURL command: ``` curl -X DELETE 'https://lilt.com/2/jobs/{id}?key=API_KEY' ``` + * Delete a job, deletes all projects and documents in the job, deletes all the segments from all the job's translation memories. Example CURL command: ``` curl -X DELETE 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' ``` * @param jobId A job id. (required) * @return ApiResponse<JobDeleteResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -387,7 +387,7 @@ public ApiResponse deleteJobWithHttpInfo(Integer jobId) throw /** * Delete a Job (asynchronously) - * Delete a job, deletes all projects and documents in the job, deletes all the segments from all the job's translation memories. Example CURL command: ``` curl -X DELETE 'https://lilt.com/2/jobs/{id}?key=API_KEY' ``` + * Delete a job, deletes all projects and documents in the job, deletes all the segments from all the job's translation memories. Example CURL command: ``` curl -X DELETE 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' ``` * @param jobId A job id. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -423,7 +423,7 @@ public okhttp3.Call deliverJobCall(Integer jobId, final ApiCallback _callback) t Object localVarPostBody = null; // create path and map variables - String localVarPath = "/jobs/{jobId}/deliver" + String localVarPath = "/v2/jobs/{jobId}/deliver" .replaceAll("\\{" + "jobId" + "\\}", localVarApiClient.escapeString(jobId.toString())); List localVarQueryParams = new ArrayList(); @@ -466,7 +466,7 @@ private okhttp3.Call deliverJobValidateBeforeCall(Integer jobId, final ApiCallba /** * Deliver a Job - * Set the job state to delivered and set all the projects in the job to done It will return the delivered job. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/deliver?key=API_KEY' ``` + * Set the job state to delivered and set all the projects in the job to done It will return the delivered job. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/deliver?key=API_KEY' ``` * @param jobId A job id. (required) * @return Job * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -484,7 +484,7 @@ public Job deliverJob(Integer jobId) throws ApiException { /** * Deliver a Job - * Set the job state to delivered and set all the projects in the job to done It will return the delivered job. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/deliver?key=API_KEY' ``` + * Set the job state to delivered and set all the projects in the job to done It will return the delivered job. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/deliver?key=API_KEY' ``` * @param jobId A job id. (required) * @return ApiResponse<Job> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -503,7 +503,7 @@ public ApiResponse deliverJobWithHttpInfo(Integer jobId) throws ApiExceptio /** * Deliver a Job (asynchronously) - * Set the job state to delivered and set all the projects in the job to done It will return the delivered job. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/deliver?key=API_KEY' ``` + * Set the job state to delivered and set all the projects in the job to done It will return the delivered job. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/deliver?key=API_KEY' ``` * @param jobId A job id. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -539,7 +539,7 @@ public okhttp3.Call downloadJobCall(Integer jobId, final ApiCallback _callback) Object localVarPostBody = null; // create path and map variables - String localVarPath = "/jobs/{jobId}/downlod" + String localVarPath = "/v2/jobs/{jobId}/downlod" .replaceAll("\\{" + "jobId" + "\\}", localVarApiClient.escapeString(jobId.toString())); List localVarQueryParams = new ArrayList(); @@ -582,7 +582,7 @@ private okhttp3.Call downloadJobValidateBeforeCall(Integer jobId, final ApiCallb /** * Download a Job - * Make sure you have exported a job with the same id before using this api. Downloading files requires the exported job `id` in the param. Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs/{id}/download?key=API_KEY' ``` + * Make sure you have exported a job with the same id before using this api. Downloading files requires the exported job `id` in the param. Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs/{id}/download?key=API_KEY' ``` * @param jobId A job id. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -598,7 +598,7 @@ public void downloadJob(Integer jobId) throws ApiException { /** * Download a Job - * Make sure you have exported a job with the same id before using this api. Downloading files requires the exported job `id` in the param. Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs/{id}/download?key=API_KEY' ``` + * Make sure you have exported a job with the same id before using this api. Downloading files requires the exported job `id` in the param. Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs/{id}/download?key=API_KEY' ``` * @param jobId A job id. (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -616,7 +616,7 @@ public ApiResponse downloadJobWithHttpInfo(Integer jobId) throws ApiExcept /** * Download a Job (asynchronously) - * Make sure you have exported a job with the same id before using this api. Downloading files requires the exported job `id` in the param. Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs/{id}/download?key=API_KEY' ``` + * Make sure you have exported a job with the same id before using this api. Downloading files requires the exported job `id` in the param. Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs/{id}/download?key=API_KEY' ``` * @param jobId A job id. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -652,7 +652,7 @@ public okhttp3.Call exportJobCall(Integer jobId, String type, final ApiCallback Object localVarPostBody = null; // create path and map variables - String localVarPath = "/jobs/{jobId}/export" + String localVarPath = "/v2/jobs/{jobId}/export" .replaceAll("\\{" + "jobId" + "\\}", localVarApiClient.escapeString(jobId.toString())); List localVarQueryParams = new ArrayList(); @@ -704,7 +704,7 @@ private okhttp3.Call exportJobValidateBeforeCall(Integer jobId, String type, fin /** * Export a Job - * Prepare job files for download. To export translated documents from the job use the query parameter `type=files`: Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs/{id}/export?key=API_KEY&type=files' ``` To export job memories use the query parameter `type=memory`. The status of the export can be checked by requesting the job `GET /jobs/:jobId`, `job.isProcessing` will be `1` while in progress, `0` when idle and `-2` when the export failed. + * Prepare job files for download. To export translated documents from the job use the query parameter `type=files`: Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs/{id}/export?key=API_KEY&type=files' ``` To export job memories use the query parameter `type=memory`. The status of the export can be checked by requesting the job `GET /jobs/:jobId`, `job.isProcessing` will be `1` while in progress, `0` when idle and `-2` when the export failed. * @param jobId A job id. (required) * @param type category for files and memory. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -721,7 +721,7 @@ public void exportJob(Integer jobId, String type) throws ApiException { /** * Export a Job - * Prepare job files for download. To export translated documents from the job use the query parameter `type=files`: Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs/{id}/export?key=API_KEY&type=files' ``` To export job memories use the query parameter `type=memory`. The status of the export can be checked by requesting the job `GET /jobs/:jobId`, `job.isProcessing` will be `1` while in progress, `0` when idle and `-2` when the export failed. + * Prepare job files for download. To export translated documents from the job use the query parameter `type=files`: Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs/{id}/export?key=API_KEY&type=files' ``` To export job memories use the query parameter `type=memory`. The status of the export can be checked by requesting the job `GET /jobs/:jobId`, `job.isProcessing` will be `1` while in progress, `0` when idle and `-2` when the export failed. * @param jobId A job id. (required) * @param type category for files and memory. (required) * @return ApiResponse<Void> @@ -740,7 +740,7 @@ public ApiResponse exportJobWithHttpInfo(Integer jobId, String type) throw /** * Export a Job (asynchronously) - * Prepare job files for download. To export translated documents from the job use the query parameter `type=files`: Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs/{id}/export?key=API_KEY&type=files' ``` To export job memories use the query parameter `type=memory`. The status of the export can be checked by requesting the job `GET /jobs/:jobId`, `job.isProcessing` will be `1` while in progress, `0` when idle and `-2` when the export failed. + * Prepare job files for download. To export translated documents from the job use the query parameter `type=files`: Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs/{id}/export?key=API_KEY&type=files' ``` To export job memories use the query parameter `type=memory`. The status of the export can be checked by requesting the job `GET /jobs/:jobId`, `job.isProcessing` will be `1` while in progress, `0` when idle and `-2` when the export failed. * @param jobId A job id. (required) * @param type category for files and memory. (required) * @param _callback The callback to be executed when the API call finishes @@ -776,7 +776,7 @@ public okhttp3.Call getJobCall(Integer jobId, final ApiCallback _callback) throw Object localVarPostBody = null; // create path and map variables - String localVarPath = "/jobs/{jobId}" + String localVarPath = "/v2/jobs/{jobId}" .replaceAll("\\{" + "jobId" + "\\}", localVarApiClient.escapeString(jobId.toString())); List localVarQueryParams = new ArrayList(); @@ -819,7 +819,7 @@ private okhttp3.Call getJobValidateBeforeCall(Integer jobId, final ApiCallback _ /** * Retrieve a Job - * Retrieves a job data along with stats. To retrieve a specific job, you will need the job `id` in the url path. Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs/{id}?key=API_KEY' ``` + * Retrieves a job data along with stats. To retrieve a specific job, you will need the job `id` in the url path. Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' ``` * @param jobId A job id. (required) * @return Job * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -837,7 +837,7 @@ public Job getJob(Integer jobId) throws ApiException { /** * Retrieve a Job - * Retrieves a job data along with stats. To retrieve a specific job, you will need the job `id` in the url path. Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs/{id}?key=API_KEY' ``` + * Retrieves a job data along with stats. To retrieve a specific job, you will need the job `id` in the url path. Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' ``` * @param jobId A job id. (required) * @return ApiResponse<Job> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -856,7 +856,7 @@ public ApiResponse getJobWithHttpInfo(Integer jobId) throws ApiException { /** * Retrieve a Job (asynchronously) - * Retrieves a job data along with stats. To retrieve a specific job, you will need the job `id` in the url path. Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs/{id}?key=API_KEY' ``` + * Retrieves a job data along with stats. To retrieve a specific job, you will need the job `id` in the url path. Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' ``` * @param jobId A job id. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -892,7 +892,7 @@ public okhttp3.Call getJobLeverageStatsCall(Integer jobId, final ApiCallback _ca Object localVarPostBody = null; // create path and map variables - String localVarPath = "/jobs/{jobId}/stats" + String localVarPath = "/v2/jobs/{jobId}/stats" .replaceAll("\\{" + "jobId" + "\\}", localVarApiClient.escapeString(jobId.toString())); List localVarQueryParams = new ArrayList(); @@ -935,7 +935,7 @@ private okhttp3.Call getJobLeverageStatsValidateBeforeCall(Integer jobId, final /** * Retrieve Job Leverage Stats - * Get the TM leverage stats for the job (new/exact/fuzzy matches). Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/stats?key=API_KEY' ``` + * Get the TM leverage stats for the job (new/exact/fuzzy matches). Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/stats?key=API_KEY' ``` * @param jobId A job id. (required) * @return JobLeverageStats * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -953,7 +953,7 @@ public JobLeverageStats getJobLeverageStats(Integer jobId) throws ApiException { /** * Retrieve Job Leverage Stats - * Get the TM leverage stats for the job (new/exact/fuzzy matches). Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/stats?key=API_KEY' ``` + * Get the TM leverage stats for the job (new/exact/fuzzy matches). Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/stats?key=API_KEY' ``` * @param jobId A job id. (required) * @return ApiResponse<JobLeverageStats> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -972,7 +972,7 @@ public ApiResponse getJobLeverageStatsWithHttpInfo(Integer job /** * Retrieve Job Leverage Stats (asynchronously) - * Get the TM leverage stats for the job (new/exact/fuzzy matches). Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/stats?key=API_KEY' ``` + * Get the TM leverage stats for the job (new/exact/fuzzy matches). Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/stats?key=API_KEY' ``` * @param jobId A job id. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -1008,7 +1008,7 @@ public okhttp3.Call reactivateJobCall(Integer jobId, final ApiCallback _callback Object localVarPostBody = null; // create path and map variables - String localVarPath = "/jobs/{jobId}/reactivate" + String localVarPath = "/v2/jobs/{jobId}/reactivate" .replaceAll("\\{" + "jobId" + "\\}", localVarApiClient.escapeString(jobId.toString())); List localVarQueryParams = new ArrayList(); @@ -1051,7 +1051,7 @@ private okhttp3.Call reactivateJobValidateBeforeCall(Integer jobId, final ApiCal /** * Reactivate a Job - * Set the job state to active. Does not change the state of projects associated with the given job. It will return the reactivated job. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/reactivate?key=API_KEY' ``` + * Set the job state to active. Does not change the state of projects associated with the given job. It will return the reactivated job. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/reactivate?key=API_KEY' ``` * @param jobId A job id. (required) * @return Job * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -1069,7 +1069,7 @@ public Job reactivateJob(Integer jobId) throws ApiException { /** * Reactivate a Job - * Set the job state to active. Does not change the state of projects associated with the given job. It will return the reactivated job. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/reactivate?key=API_KEY' ``` + * Set the job state to active. Does not change the state of projects associated with the given job. It will return the reactivated job. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/reactivate?key=API_KEY' ``` * @param jobId A job id. (required) * @return ApiResponse<Job> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -1088,7 +1088,7 @@ public ApiResponse reactivateJobWithHttpInfo(Integer jobId) throws ApiExcep /** * Reactivate a Job (asynchronously) - * Set the job state to active. Does not change the state of projects associated with the given job. It will return the reactivated job. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/reactivate?key=API_KEY' ``` + * Set the job state to active. Does not change the state of projects associated with the given job. It will return the reactivated job. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/reactivate?key=API_KEY' ``` * @param jobId A job id. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -1110,6 +1110,9 @@ public okhttp3.Call reactivateJobAsync(Integer jobId, final ApiCallback _ca /** * Build call for retrieveAllJobs * @param isArchived Retrieves all jobs that are archived. (optional) + * @param isDelivered Retrieves all jobs that are delivered. (optional) + * @param offset Return jobs starting at the offset row. If not given the default offset will be 0. (optional) + * @param limit The maximum number of jobs to be returned. If not given the default limit will be 25. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1120,11 +1123,11 @@ public okhttp3.Call reactivateJobAsync(Integer jobId, final ApiCallback _ca 0 Unexpected error - */ - public okhttp3.Call retrieveAllJobsCall(Boolean isArchived, final ApiCallback _callback) throws ApiException { + public okhttp3.Call retrieveAllJobsCall(Boolean isArchived, Boolean isDelivered, Integer offset, Integer limit, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/jobs"; + String localVarPath = "/v2/jobs"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1136,6 +1139,18 @@ public okhttp3.Call retrieveAllJobsCall(Boolean isArchived, final ApiCallback _c localVarQueryParams.addAll(localVarApiClient.parameterToPair("isArchived", isArchived)); } + if (isDelivered != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("isDelivered", isDelivered)); + } + + if (offset != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); + } + + if (limit != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); + } + final String[] localVarAccepts = { "application/json" }; @@ -1155,18 +1170,21 @@ public okhttp3.Call retrieveAllJobsCall(Boolean isArchived, final ApiCallback _c } @SuppressWarnings("rawtypes") - private okhttp3.Call retrieveAllJobsValidateBeforeCall(Boolean isArchived, final ApiCallback _callback) throws ApiException { + private okhttp3.Call retrieveAllJobsValidateBeforeCall(Boolean isArchived, Boolean isDelivered, Integer offset, Integer limit, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = retrieveAllJobsCall(isArchived, _callback); + okhttp3.Call localVarCall = retrieveAllJobsCall(isArchived, isDelivered, offset, limit, _callback); return localVarCall; } /** * Retrieve all Jobs - * Get all Jobs. You can retrieve all jobs from your account using the above API. Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs?key=API_KEY&isArchived=false' ``` + * Get all Jobs within a given offset and limit. You can retrieve jobs from your account using the above API. Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs?key=API_KEY&isArchived=false' ``` * @param isArchived Retrieves all jobs that are archived. (optional) + * @param isDelivered Retrieves all jobs that are delivered. (optional) + * @param offset Return jobs starting at the offset row. If not given the default offset will be 0. (optional) + * @param limit The maximum number of jobs to be returned. If not given the default limit will be 25. (optional) * @return List<Job> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1176,15 +1194,18 @@ private okhttp3.Call retrieveAllJobsValidateBeforeCall(Boolean isArchived, final 0 Unexpected error - */ - public List retrieveAllJobs(Boolean isArchived) throws ApiException { - ApiResponse> localVarResp = retrieveAllJobsWithHttpInfo(isArchived); + public List retrieveAllJobs(Boolean isArchived, Boolean isDelivered, Integer offset, Integer limit) throws ApiException { + ApiResponse> localVarResp = retrieveAllJobsWithHttpInfo(isArchived, isDelivered, offset, limit); return localVarResp.getData(); } /** * Retrieve all Jobs - * Get all Jobs. You can retrieve all jobs from your account using the above API. Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs?key=API_KEY&isArchived=false' ``` + * Get all Jobs within a given offset and limit. You can retrieve jobs from your account using the above API. Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs?key=API_KEY&isArchived=false' ``` * @param isArchived Retrieves all jobs that are archived. (optional) + * @param isDelivered Retrieves all jobs that are delivered. (optional) + * @param offset Return jobs starting at the offset row. If not given the default offset will be 0. (optional) + * @param limit The maximum number of jobs to be returned. If not given the default limit will be 25. (optional) * @return ApiResponse<List<Job>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1194,16 +1215,19 @@ public List retrieveAllJobs(Boolean isArchived) throws ApiException { 0 Unexpected error - */ - public ApiResponse> retrieveAllJobsWithHttpInfo(Boolean isArchived) throws ApiException { - okhttp3.Call localVarCall = retrieveAllJobsValidateBeforeCall(isArchived, null); + public ApiResponse> retrieveAllJobsWithHttpInfo(Boolean isArchived, Boolean isDelivered, Integer offset, Integer limit) throws ApiException { + okhttp3.Call localVarCall = retrieveAllJobsValidateBeforeCall(isArchived, isDelivered, offset, limit, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Retrieve all Jobs (asynchronously) - * Get all Jobs. You can retrieve all jobs from your account using the above API. Example CURL command: ``` curl -X GET 'https://lilt.com/2/jobs?key=API_KEY&isArchived=false' ``` + * Get all Jobs within a given offset and limit. You can retrieve jobs from your account using the above API. Example CURL command: ``` curl -X GET 'https://api.lilt.com/v2/jobs?key=API_KEY&isArchived=false' ``` * @param isArchived Retrieves all jobs that are archived. (optional) + * @param isDelivered Retrieves all jobs that are delivered. (optional) + * @param offset Return jobs starting at the offset row. If not given the default offset will be 0. (optional) + * @param limit The maximum number of jobs to be returned. If not given the default limit will be 25. (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 @@ -1214,9 +1238,9 @@ public ApiResponse> retrieveAllJobsWithHttpInfo(Boolean isArchived) th 0 Unexpected error - */ - public okhttp3.Call retrieveAllJobsAsync(Boolean isArchived, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call retrieveAllJobsAsync(Boolean isArchived, Boolean isDelivered, Integer offset, Integer limit, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = retrieveAllJobsValidateBeforeCall(isArchived, _callback); + okhttp3.Call localVarCall = retrieveAllJobsValidateBeforeCall(isArchived, isDelivered, offset, limit, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -1238,7 +1262,7 @@ public okhttp3.Call unarchiveJobCall(Integer jobId, final ApiCallback _callback) Object localVarPostBody = null; // create path and map variables - String localVarPath = "/jobs/{jobId}/unarchive" + String localVarPath = "/v2/jobs/{jobId}/unarchive" .replaceAll("\\{" + "jobId" + "\\}", localVarApiClient.escapeString(jobId.toString())); List localVarQueryParams = new ArrayList(); @@ -1281,7 +1305,7 @@ private okhttp3.Call unarchiveJobValidateBeforeCall(Integer jobId, final ApiCall /** * Unarchive a Job - * Set job to unarchived, the job will move to active status. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/unarchive?key=API_KEY' ``` + * Set job to unarchived, the job will move to active status. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/unarchive?key=API_KEY' ``` * @param jobId A job id. (required) * @return Job * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -1299,7 +1323,7 @@ public Job unarchiveJob(Integer jobId) throws ApiException { /** * Unarchive a Job - * Set job to unarchived, the job will move to active status. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/unarchive?key=API_KEY' ``` + * Set job to unarchived, the job will move to active status. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/unarchive?key=API_KEY' ``` * @param jobId A job id. (required) * @return ApiResponse<Job> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -1318,7 +1342,7 @@ public ApiResponse unarchiveJobWithHttpInfo(Integer jobId) throws ApiExcept /** * Unarchive a Job (asynchronously) - * Set job to unarchived, the job will move to active status. Example CURL command: ``` curl -X POST 'https://lilt.com/2/jobs/{id}/unarchive?key=API_KEY' ``` + * Set job to unarchived, the job will move to active status. Example CURL command: ``` curl -X POST 'https://api.lilt.com/v2/jobs/{id}/unarchive?key=API_KEY' ``` * @param jobId A job id. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -1355,7 +1379,7 @@ public okhttp3.Call updateJobCall(Integer jobId, JobUpdateParameters body, final Object localVarPostBody = body; // create path and map variables - String localVarPath = "/jobs/{jobId}" + String localVarPath = "/v2/jobs/{jobId}" .replaceAll("\\{" + "jobId" + "\\}", localVarApiClient.escapeString(jobId.toString())); List localVarQueryParams = new ArrayList(); @@ -1398,7 +1422,7 @@ private okhttp3.Call updateJobValidateBeforeCall(Integer jobId, JobUpdateParamet /** * Update a Job - * Updates a job with the new job properties. To update a specific job, you will need the job `id` in the url path. You can update job's name and due date by passing the property and new value in the body. Example CURL command: ``` curl -X PUT 'https://lilt.com/2/jobs/{id}?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"due\": \"2022-05-05T10:56:44.985Z\" }' ``` + * Updates a job with the new job properties. To update a specific job, you will need the job `id` in the url path. You can update job's name and due date by passing the property and new value in the body. Example CURL command: ``` curl -X PUT 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"due\": \"2022-05-05T10:56:44.985Z\" }' ``` * @param jobId A job id. (required) * @param body (optional) * @return Job @@ -1417,7 +1441,7 @@ public Job updateJob(Integer jobId, JobUpdateParameters body) throws ApiExceptio /** * Update a Job - * Updates a job with the new job properties. To update a specific job, you will need the job `id` in the url path. You can update job's name and due date by passing the property and new value in the body. Example CURL command: ``` curl -X PUT 'https://lilt.com/2/jobs/{id}?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"due\": \"2022-05-05T10:56:44.985Z\" }' ``` + * Updates a job with the new job properties. To update a specific job, you will need the job `id` in the url path. You can update job's name and due date by passing the property and new value in the body. Example CURL command: ``` curl -X PUT 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"due\": \"2022-05-05T10:56:44.985Z\" }' ``` * @param jobId A job id. (required) * @param body (optional) * @return ApiResponse<Job> @@ -1437,7 +1461,7 @@ public ApiResponse updateJobWithHttpInfo(Integer jobId, JobUpdateParameters /** * Update a Job (asynchronously) - * Updates a job with the new job properties. To update a specific job, you will need the job `id` in the url path. You can update job's name and due date by passing the property and new value in the body. Example CURL command: ``` curl -X PUT 'https://lilt.com/2/jobs/{id}?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"due\": \"2022-05-05T10:56:44.985Z\" }' ``` + * Updates a job with the new job properties. To update a specific job, you will need the job `id` in the url path. You can update job's name and due date by passing the property and new value in the body. Example CURL command: ``` curl -X PUT 'https://api.lilt.com/v2/jobs/{id}?key=API_KEY' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"name\": \"test job\", \"due\": \"2022-05-05T10:56:44.985Z\" }' ``` * @param jobId A job id. (required) * @param body (optional) * @param _callback The callback to be executed when the API call finishes diff --git a/src/main/java/com/lilt/client/api/LanguagesApi.java b/src/main/java/com/lilt/client/api/LanguagesApi.java index 4a431bba3..b52e383bb 100644 --- a/src/main/java/com/lilt/client/api/LanguagesApi.java +++ b/src/main/java/com/lilt/client/api/LanguagesApi.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -71,7 +71,7 @@ public okhttp3.Call getLanguagesCall(final ApiCallback _callback) throws ApiExce Object localVarPostBody = null; // create path and map variables - String localVarPath = "/languages"; + String localVarPath = "/v2/languages"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); diff --git a/src/main/java/com/lilt/client/api/MemoriesApi.java b/src/main/java/com/lilt/client/api/MemoriesApi.java index 648ff1393..176ed8d3f 100644 --- a/src/main/java/com/lilt/client/api/MemoriesApi.java +++ b/src/main/java/com/lilt/client/api/MemoriesApi.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,16 +27,16 @@ import java.io.IOException; +import com.lilt.client.model.DeleteSegmentFromMemoryResponse; import com.lilt.client.model.Error; import java.io.File; import com.lilt.client.model.Memory; import com.lilt.client.model.MemoryCreateParameters; import com.lilt.client.model.MemoryDeleteResponse; import com.lilt.client.model.MemoryImportResponse; -import com.lilt.client.model.MemoryInsertResponse; -import com.lilt.client.model.MemorySyncDeleteResponse; import com.lilt.client.model.MemoryUpdateParameters; -import com.lilt.client.model.MemoryUpdateResponse; +import com.lilt.client.model.SDLXLIFFFilter; +import com.lilt.client.model.TermbaseExportResponse; import com.lilt.client.model.TranslationMemoryEntry; import java.lang.reflect.Type; @@ -81,7 +81,7 @@ public okhttp3.Call createMemoryCall(MemoryCreateParameters body, final ApiCallb Object localVarPostBody = body; // create path and map variables - String localVarPath = "/memories"; + String localVarPath = "/v2/memories"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -196,7 +196,7 @@ public okhttp3.Call deleteMemoryCall(Integer id, final ApiCallback _callback) th Object localVarPostBody = null; // create path and map variables - String localVarPath = "/memories"; + String localVarPath = "/v2/memories"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -299,23 +299,24 @@ public okhttp3.Call deleteMemoryAsync(Integer id, final ApiCallback Status Code Description Response Headers - 200 A list of Memory objects. - + 200 A success resposne. - 0 Unexpected error - */ - public okhttp3.Call getMemoryCall(Integer id, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteSegmentFromMemoryCall(Integer id, Integer segmentId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/memories"; + String localVarPath = "/v2/memories/segment"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -327,129 +328,8 @@ public okhttp3.Call getMemoryCall(Integer id, final ApiCallback _callback) throw localVarQueryParams.addAll(localVarApiClient.parameterToPair("id", id)); } - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getMemoryValidateBeforeCall(Integer id, final ApiCallback _callback) throws ApiException { - - - okhttp3.Call localVarCall = getMemoryCall(id, _callback); - return localVarCall; - - } - - /** - * Retrieve a Memory - * Retrieve a Memory. If you cannot access the Memory (401 error) please check permissions (e.g. in case you created the Memory via the web app with a different account you may have to explicitly share that Memory). - * @param id An optional Memory identifier. (optional) - * @return List<Memory> - * @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 A list of Memory objects. -
0 Unexpected error -
- */ - public List getMemory(Integer id) throws ApiException { - ApiResponse> localVarResp = getMemoryWithHttpInfo(id); - return localVarResp.getData(); - } - - /** - * Retrieve a Memory - * Retrieve a Memory. If you cannot access the Memory (401 error) please check permissions (e.g. in case you created the Memory via the web app with a different account you may have to explicitly share that Memory). - * @param id An optional Memory identifier. (optional) - * @return ApiResponse<List<Memory>> - * @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 A list of Memory objects. -
0 Unexpected error -
- */ - public ApiResponse> getMemoryWithHttpInfo(Integer id) throws ApiException { - okhttp3.Call localVarCall = getMemoryValidateBeforeCall(id, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve a Memory (asynchronously) - * Retrieve a Memory. If you cannot access the Memory (401 error) please check permissions (e.g. in case you created the Memory via the web app with a different account you may have to explicitly share that Memory). - * @param id An optional Memory identifier. (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 A list of Memory objects. -
0 Unexpected error -
- */ - public okhttp3.Call getMemoryAsync(Integer id, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = getMemoryValidateBeforeCall(id, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for importMemoryFile - * @param memoryId A unique Memory identifier. (required) - * @param name Name of the TM or termbase file. (required) - * @param body The file contents to be uploaded. The entire POST body will be treated as the file. (required) - * @param hasHeaderRow A flag indicating whether an imported Termbase CSV has a header row or not (the default value is `false`). (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 A status object. -
0 Unexpected error -
- */ - public okhttp3.Call importMemoryFileCall(Integer memoryId, String name, File body, Boolean hasHeaderRow, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/memories/import"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (memoryId != null) { - localVarHeaderParams.put("memory_id", localVarApiClient.parameterToString(memoryId)); - } - - if (name != null) { - localVarHeaderParams.put("name", localVarApiClient.parameterToString(name)); - } - - if (hasHeaderRow != null) { - localVarHeaderParams.put("has_header_row", localVarApiClient.parameterToString(hasHeaderRow)); + if (segmentId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("segment_id", segmentId)); } final String[] localVarAccepts = { @@ -461,126 +341,113 @@ public okhttp3.Call importMemoryFileCall(Integer memoryId, String name, File bod } final String[] localVarContentTypes = { - "application/octet-stream" + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; - return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call importMemoryFileValidateBeforeCall(Integer memoryId, String name, File body, Boolean hasHeaderRow, final ApiCallback _callback) throws ApiException { + private okhttp3.Call deleteSegmentFromMemoryValidateBeforeCall(Integer id, Integer segmentId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'memoryId' is set - if (memoryId == null) { - throw new ApiException("Missing the required parameter 'memoryId' when calling importMemoryFile(Async)"); + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling deleteSegmentFromMemory(Async)"); } - // verify the required parameter 'name' is set - if (name == null) { - throw new ApiException("Missing the required parameter 'name' when calling importMemoryFile(Async)"); - } - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling importMemoryFile(Async)"); + // verify the required parameter 'segmentId' is set + if (segmentId == null) { + throw new ApiException("Missing the required parameter 'segmentId' when calling deleteSegmentFromMemory(Async)"); } - okhttp3.Call localVarCall = importMemoryFileCall(memoryId, name, body, hasHeaderRow, _callback); + okhttp3.Call localVarCall = deleteSegmentFromMemoryCall(id, segmentId, _callback); return localVarCall; } /** - * File import for a Memory - * Imports common translation memory or termbase file formats to a specific Lilt memory. Currently supported file formats are `*.tmx`, `*.sdltm` and `*.tmq` for TM data; `*.csv` and `*.tbx` for termbase data. Request parameters should be passed as JSON object with the header field `LILT-API`. Example CURL command to upload a translation memory file named `my_memory.sdltm` in the current working directory: ``` curl -X POST https://lilt.com/2/memories/import?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.sdltm\\\",\\\"memory_id\\\": 42}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.sdltm ``` - * @param memoryId A unique Memory identifier. (required) - * @param name Name of the TM or termbase file. (required) - * @param body The file contents to be uploaded. The entire POST body will be treated as the file. (required) - * @param hasHeaderRow A flag indicating whether an imported Termbase CSV has a header row or not (the default value is `false`). (optional) - * @return MemoryImportResponse + * Delete a segment from a memory. + * Delete a segment from a memory. ``` curl -X DELETE https://api.lilt.com/v2/memories/segment?key=API_KEY&id=ID&segment_id=$SEGMENT_ID ``` + * @param id A unique Memory identifier. (required) + * @param segmentId A unique Segment identifier. (required) + * @return DeleteSegmentFromMemoryResponse * @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 A status object. -
200 A success resposne. -
0 Unexpected error -
*/ - public MemoryImportResponse importMemoryFile(Integer memoryId, String name, File body, Boolean hasHeaderRow) throws ApiException { - ApiResponse localVarResp = importMemoryFileWithHttpInfo(memoryId, name, body, hasHeaderRow); + public DeleteSegmentFromMemoryResponse deleteSegmentFromMemory(Integer id, Integer segmentId) throws ApiException { + ApiResponse localVarResp = deleteSegmentFromMemoryWithHttpInfo(id, segmentId); return localVarResp.getData(); } /** - * File import for a Memory - * Imports common translation memory or termbase file formats to a specific Lilt memory. Currently supported file formats are `*.tmx`, `*.sdltm` and `*.tmq` for TM data; `*.csv` and `*.tbx` for termbase data. Request parameters should be passed as JSON object with the header field `LILT-API`. Example CURL command to upload a translation memory file named `my_memory.sdltm` in the current working directory: ``` curl -X POST https://lilt.com/2/memories/import?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.sdltm\\\",\\\"memory_id\\\": 42}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.sdltm ``` - * @param memoryId A unique Memory identifier. (required) - * @param name Name of the TM or termbase file. (required) - * @param body The file contents to be uploaded. The entire POST body will be treated as the file. (required) - * @param hasHeaderRow A flag indicating whether an imported Termbase CSV has a header row or not (the default value is `false`). (optional) - * @return ApiResponse<MemoryImportResponse> + * Delete a segment from a memory. + * Delete a segment from a memory. ``` curl -X DELETE https://api.lilt.com/v2/memories/segment?key=API_KEY&id=ID&segment_id=$SEGMENT_ID ``` + * @param id A unique Memory identifier. (required) + * @param segmentId A unique Segment identifier. (required) + * @return ApiResponse<DeleteSegmentFromMemoryResponse> * @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 A status object. -
200 A success resposne. -
0 Unexpected error -
*/ - public ApiResponse importMemoryFileWithHttpInfo(Integer memoryId, String name, File body, Boolean hasHeaderRow) throws ApiException { - okhttp3.Call localVarCall = importMemoryFileValidateBeforeCall(memoryId, name, body, hasHeaderRow, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse deleteSegmentFromMemoryWithHttpInfo(Integer id, Integer segmentId) throws ApiException { + okhttp3.Call localVarCall = deleteSegmentFromMemoryValidateBeforeCall(id, segmentId, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * File import for a Memory (asynchronously) - * Imports common translation memory or termbase file formats to a specific Lilt memory. Currently supported file formats are `*.tmx`, `*.sdltm` and `*.tmq` for TM data; `*.csv` and `*.tbx` for termbase data. Request parameters should be passed as JSON object with the header field `LILT-API`. Example CURL command to upload a translation memory file named `my_memory.sdltm` in the current working directory: ``` curl -X POST https://lilt.com/2/memories/import?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.sdltm\\\",\\\"memory_id\\\": 42}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.sdltm ``` - * @param memoryId A unique Memory identifier. (required) - * @param name Name of the TM or termbase file. (required) - * @param body The file contents to be uploaded. The entire POST body will be treated as the file. (required) - * @param hasHeaderRow A flag indicating whether an imported Termbase CSV has a header row or not (the default value is `false`). (optional) + * Delete a segment from a memory. (asynchronously) + * Delete a segment from a memory. ``` curl -X DELETE https://api.lilt.com/v2/memories/segment?key=API_KEY&id=ID&segment_id=$SEGMENT_ID ``` + * @param id A unique Memory identifier. (required) + * @param segmentId A unique Segment identifier. (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 A status object. -
200 A success resposne. -
0 Unexpected error -
*/ - public okhttp3.Call importMemoryFileAsync(Integer memoryId, String name, File body, Boolean hasHeaderRow, final ApiCallback _callback) throws ApiException { + public okhttp3.Call deleteSegmentFromMemoryAsync(Integer id, Integer segmentId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = importMemoryFileValidateBeforeCall(memoryId, name, body, hasHeaderRow, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = deleteSegmentFromMemoryValidateBeforeCall(id, segmentId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for queryMemory + * Build call for downloadTermbase * @param id A unique Memory identifier. (required) - * @param query A source query. (required) - * @param n Maximum number of results to return. (optional, default to 10) * @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 A list of TranslationMemoryEntry objects. -
200 A file. -
0 Unexpected error -
*/ - public okhttp3.Call queryMemoryCall(Integer id, String query, Integer n, final ApiCallback _callback) throws ApiException { + public okhttp3.Call downloadTermbaseCall(Integer id, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/memories/query"; + String localVarPath = "/v2/memories/termbase/download"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -592,14 +459,6 @@ public okhttp3.Call queryMemoryCall(Integer id, String query, Integer n, final A localVarQueryParams.addAll(localVarApiClient.parameterToPair("id", id)); } - if (query != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("query", query)); - } - - if (n != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); - } - final String[] localVarAccepts = { "application/json" }; @@ -619,94 +478,80 @@ public okhttp3.Call queryMemoryCall(Integer id, String query, Integer n, final A } @SuppressWarnings("rawtypes") - private okhttp3.Call queryMemoryValidateBeforeCall(Integer id, String query, Integer n, final ApiCallback _callback) throws ApiException { + private okhttp3.Call downloadTermbaseValidateBeforeCall(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 queryMemory(Async)"); - } - - // verify the required parameter 'query' is set - if (query == null) { - throw new ApiException("Missing the required parameter 'query' when calling queryMemory(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling downloadTermbase(Async)"); } - okhttp3.Call localVarCall = queryMemoryCall(id, query, n, _callback); + okhttp3.Call localVarCall = downloadTermbaseCall(id, _callback); return localVarCall; } /** - * Query a Memory - * Perform a translation memory query. + * Termbase download for a Memory + * Downloads the termbase export for the given memory as a CSV file. Ensure you first call the `/2/memories/termbase/export` endpoint to start the export process before you try to download it. ``` curl -X GET https://api.lilt.com/v2/memories/termbase/download?key=API_KEY&id=ID ``` * @param id A unique Memory identifier. (required) - * @param query A source query. (required) - * @param n Maximum number of results to return. (optional, default to 10) - * @return List<TranslationMemoryEntry> + * @return byte[] * @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 A list of TranslationMemoryEntry objects. -
200 A file. -
0 Unexpected error -
*/ - public List queryMemory(Integer id, String query, Integer n) throws ApiException { - ApiResponse> localVarResp = queryMemoryWithHttpInfo(id, query, n); + public byte[] downloadTermbase(Integer id) throws ApiException { + ApiResponse localVarResp = downloadTermbaseWithHttpInfo(id); return localVarResp.getData(); } /** - * Query a Memory - * Perform a translation memory query. + * Termbase download for a Memory + * Downloads the termbase export for the given memory as a CSV file. Ensure you first call the `/2/memories/termbase/export` endpoint to start the export process before you try to download it. ``` curl -X GET https://api.lilt.com/v2/memories/termbase/download?key=API_KEY&id=ID ``` * @param id A unique Memory identifier. (required) - * @param query A source query. (required) - * @param n Maximum number of results to return. (optional, default to 10) - * @return ApiResponse<List<TranslationMemoryEntry>> + * @return ApiResponse<byte[]> * @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 A list of TranslationMemoryEntry objects. -
200 A file. -
0 Unexpected error -
*/ - public ApiResponse> queryMemoryWithHttpInfo(Integer id, String query, Integer n) throws ApiException { - okhttp3.Call localVarCall = queryMemoryValidateBeforeCall(id, query, n, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse downloadTermbaseWithHttpInfo(Integer id) throws ApiException { + okhttp3.Call localVarCall = downloadTermbaseValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Query a Memory (asynchronously) - * Perform a translation memory query. + * Termbase download for a Memory (asynchronously) + * Downloads the termbase export for the given memory as a CSV file. Ensure you first call the `/2/memories/termbase/export` endpoint to start the export process before you try to download it. ``` curl -X GET https://api.lilt.com/v2/memories/termbase/download?key=API_KEY&id=ID ``` * @param id A unique Memory identifier. (required) - * @param query A source query. (required) - * @param n Maximum number of results to return. (optional, default to 10) * @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 A list of TranslationMemoryEntry objects. -
200 A file. -
0 Unexpected error -
*/ - public okhttp3.Call queryMemoryAsync(Integer id, String query, Integer n, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call downloadTermbaseAsync(Integer id, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = queryMemoryValidateBeforeCall(id, query, n, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = downloadTermbaseValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for syncDeleteMemory + * Build call for exportTermbase * @param id A unique Memory identifier. (required) - * @param fromTime Unix time stamp (epoch, in seconds) of the start of the Memory section. (optional) - * @param toTime Unix time stamp (epoch, in seconds) of the end of the Memory section. (optional) - * @param when The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -717,11 +562,11 @@ public okhttp3.Call queryMemoryAsync(Integer id, String query, Integer n, final 0 Unexpected error - */ - public okhttp3.Call syncDeleteMemoryCall(Integer id, Integer fromTime, Integer toTime, String when, final ApiCallback _callback) throws ApiException { + public okhttp3.Call exportTermbaseCall(Integer id, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/memories/sync"; + String localVarPath = "/v2/memories/termbase/export"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -733,18 +578,6 @@ public okhttp3.Call syncDeleteMemoryCall(Integer id, Integer fromTime, Integer t localVarQueryParams.addAll(localVarApiClient.parameterToPair("id", id)); } - if (fromTime != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("from_time", fromTime)); - } - - if (toTime != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("to_time", toTime)); - } - - if (when != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("when", when)); - } - final String[] localVarAccepts = { "application/json" }; @@ -760,31 +593,28 @@ public okhttp3.Call syncDeleteMemoryCall(Integer id, Integer fromTime, Integer t localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; - return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call syncDeleteMemoryValidateBeforeCall(Integer id, Integer fromTime, Integer toTime, String when, final ApiCallback _callback) throws ApiException { + private okhttp3.Call exportTermbaseValidateBeforeCall(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 syncDeleteMemory(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling exportTermbase(Async)"); } - okhttp3.Call localVarCall = syncDeleteMemoryCall(id, fromTime, toTime, when, _callback); + okhttp3.Call localVarCall = exportTermbaseCall(id, _callback); return localVarCall; } /** - * Delete-sync for a Memory - * Deletes segments in the Memory matching the `from_time`, `to_time` and `when` parameters. Example CURL command: ``` curl -X DELETE https://lilt.com/2/memories/sync?key=API_KEY&id=42&from_time=1491048000&to_time=1491049800&when=created ``` + * Termbase export for a Memory + * Exports the termbase entries for the given memory into a CSV file. Calling this endpoint will begin the export process in the background. Check that the processing is complete by polling the `GET /2/memories` endpoint. When the `is_processing` value is 0 then call the `POST /2/memories/termbase/download` endpoint. ``` curl -X POST https://api.lilt.com/v2/memories/termbase/export?key=API_KEY&id=ID ``` * @param id A unique Memory identifier. (required) - * @param fromTime Unix time stamp (epoch, in seconds) of the start of the Memory section. (optional) - * @param toTime Unix time stamp (epoch, in seconds) of the end of the Memory section. (optional) - * @param when The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. (optional) - * @return MemorySyncDeleteResponse + * @return TermbaseExportResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -793,19 +623,16 @@ private okhttp3.Call syncDeleteMemoryValidateBeforeCall(Integer id, Integer from
0 Unexpected error -
*/ - public MemorySyncDeleteResponse syncDeleteMemory(Integer id, Integer fromTime, Integer toTime, String when) throws ApiException { - ApiResponse localVarResp = syncDeleteMemoryWithHttpInfo(id, fromTime, toTime, when); + public TermbaseExportResponse exportTermbase(Integer id) throws ApiException { + ApiResponse localVarResp = exportTermbaseWithHttpInfo(id); return localVarResp.getData(); } /** - * Delete-sync for a Memory - * Deletes segments in the Memory matching the `from_time`, `to_time` and `when` parameters. Example CURL command: ``` curl -X DELETE https://lilt.com/2/memories/sync?key=API_KEY&id=42&from_time=1491048000&to_time=1491049800&when=created ``` + * Termbase export for a Memory + * Exports the termbase entries for the given memory into a CSV file. Calling this endpoint will begin the export process in the background. Check that the processing is complete by polling the `GET /2/memories` endpoint. When the `is_processing` value is 0 then call the `POST /2/memories/termbase/download` endpoint. ``` curl -X POST https://api.lilt.com/v2/memories/termbase/export?key=API_KEY&id=ID ``` * @param id A unique Memory identifier. (required) - * @param fromTime Unix time stamp (epoch, in seconds) of the start of the Memory section. (optional) - * @param toTime Unix time stamp (epoch, in seconds) of the end of the Memory section. (optional) - * @param when The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. (optional) - * @return ApiResponse<MemorySyncDeleteResponse> + * @return ApiResponse<TermbaseExportResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -814,19 +641,16 @@ public MemorySyncDeleteResponse syncDeleteMemory(Integer id, Integer fromTime, I
0 Unexpected error -
*/ - public ApiResponse syncDeleteMemoryWithHttpInfo(Integer id, Integer fromTime, Integer toTime, String when) throws ApiException { - okhttp3.Call localVarCall = syncDeleteMemoryValidateBeforeCall(id, fromTime, toTime, when, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse exportTermbaseWithHttpInfo(Integer id) throws ApiException { + okhttp3.Call localVarCall = exportTermbaseValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Delete-sync for a Memory (asynchronously) - * Deletes segments in the Memory matching the `from_time`, `to_time` and `when` parameters. Example CURL command: ``` curl -X DELETE https://lilt.com/2/memories/sync?key=API_KEY&id=42&from_time=1491048000&to_time=1491049800&when=created ``` + * Termbase export for a Memory (asynchronously) + * Exports the termbase entries for the given memory into a CSV file. Calling this endpoint will begin the export process in the background. Check that the processing is complete by polling the `GET /2/memories` endpoint. When the `is_processing` value is 0 then call the `POST /2/memories/termbase/download` endpoint. ``` curl -X POST https://api.lilt.com/v2/memories/termbase/export?key=API_KEY&id=ID ``` * @param id A unique Memory identifier. (required) - * @param fromTime Unix time stamp (epoch, in seconds) of the start of the Memory section. (optional) - * @param toTime Unix time stamp (epoch, in seconds) of the end of the Memory section. (optional) - * @param when The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. (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 @@ -837,34 +661,31 @@ public ApiResponse syncDeleteMemoryWithHttpInfo(Intege 0 Unexpected error - */ - public okhttp3.Call syncDeleteMemoryAsync(Integer id, Integer fromTime, Integer toTime, String when, final ApiCallback _callback) throws ApiException { + public okhttp3.Call exportTermbaseAsync(Integer id, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = syncDeleteMemoryValidateBeforeCall(id, fromTime, toTime, when, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = exportTermbaseValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for syncDownMemory - * @param id A unique Memory identifier. (required) - * @param fromTime Unix time stamp (epoch, in seconds) of the start of the Memory section. (optional) - * @param toTime Unix time stamp (epoch, in seconds) of the end of the Memory section. (optional) - * @param when The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. If this parameter is omitted, then the whole Memory is returned. (optional) + * Build call for getMemory + * @param id An optional Memory identifier. (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 A TMX 1.4b file. -
200 A list of Memory objects. -
0 Unexpected error -
*/ - public okhttp3.Call syncDownMemoryCall(Integer id, Integer fromTime, Integer toTime, String when, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getMemoryCall(Integer id, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/memories/sync"; + String localVarPath = "/v2/memories"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -876,20 +697,8 @@ public okhttp3.Call syncDownMemoryCall(Integer id, Integer fromTime, Integer toT localVarQueryParams.addAll(localVarApiClient.parameterToPair("id", id)); } - if (fromTime != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("from_time", fromTime)); - } - - if (toTime != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("to_time", toTime)); - } - - if (when != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("when", when)); - } - final String[] localVarAccepts = { - "application/x-tmx" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -907,91 +716,80 @@ public okhttp3.Call syncDownMemoryCall(Integer id, Integer fromTime, Integer toT } @SuppressWarnings("rawtypes") - private okhttp3.Call syncDownMemoryValidateBeforeCall(Integer id, Integer fromTime, Integer toTime, String when, 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 syncDownMemory(Async)"); - } + private okhttp3.Call getMemoryValidateBeforeCall(Integer id, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = syncDownMemoryCall(id, fromTime, toTime, when, _callback); + okhttp3.Call localVarCall = getMemoryCall(id, _callback); return localVarCall; } /** - * Get-sync for a Memory - * Get all or part of a memory in TMX 1.4b format. If the `from_time` and/or `to_time` are omitted, then all segments are returned. The parameter `when` specifies on which date field `from_time` and `to_time` are matched. Possible values are `created` (when the segment was originally created in the memory), `updated` (when the segment was lastly updated), and `deleted` (when the segment was deleted). Example CURL command: ``` curl -X GET https://lilt.com/2/memories/sync?key=API_KEY&id=42 -o from_lilt.tmx ``` - * @param id A unique Memory identifier. (required) - * @param fromTime Unix time stamp (epoch, in seconds) of the start of the Memory section. (optional) - * @param toTime Unix time stamp (epoch, in seconds) of the end of the Memory section. (optional) - * @param when The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. If this parameter is omitted, then the whole Memory is returned. (optional) - * @return byte[] + * Retrieve a Memory + * Retrieve a Memory. If you cannot access the Memory (401 error) please check permissions (e.g. in case you created the Memory via the web app with a different account you may have to explicitly share that Memory). + * @param id An optional Memory identifier. (optional) + * @return List<Memory> * @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 A TMX 1.4b file. -
200 A list of Memory objects. -
0 Unexpected error -
*/ - public byte[] syncDownMemory(Integer id, Integer fromTime, Integer toTime, String when) throws ApiException { - ApiResponse localVarResp = syncDownMemoryWithHttpInfo(id, fromTime, toTime, when); + public List getMemory(Integer id) throws ApiException { + ApiResponse> localVarResp = getMemoryWithHttpInfo(id); return localVarResp.getData(); } /** - * Get-sync for a Memory - * Get all or part of a memory in TMX 1.4b format. If the `from_time` and/or `to_time` are omitted, then all segments are returned. The parameter `when` specifies on which date field `from_time` and `to_time` are matched. Possible values are `created` (when the segment was originally created in the memory), `updated` (when the segment was lastly updated), and `deleted` (when the segment was deleted). Example CURL command: ``` curl -X GET https://lilt.com/2/memories/sync?key=API_KEY&id=42 -o from_lilt.tmx ``` - * @param id A unique Memory identifier. (required) - * @param fromTime Unix time stamp (epoch, in seconds) of the start of the Memory section. (optional) - * @param toTime Unix time stamp (epoch, in seconds) of the end of the Memory section. (optional) - * @param when The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. If this parameter is omitted, then the whole Memory is returned. (optional) - * @return ApiResponse<byte[]> + * Retrieve a Memory + * Retrieve a Memory. If you cannot access the Memory (401 error) please check permissions (e.g. in case you created the Memory via the web app with a different account you may have to explicitly share that Memory). + * @param id An optional Memory identifier. (optional) + * @return ApiResponse<List<Memory>> * @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 A TMX 1.4b file. -
200 A list of Memory objects. -
0 Unexpected error -
*/ - public ApiResponse syncDownMemoryWithHttpInfo(Integer id, Integer fromTime, Integer toTime, String when) throws ApiException { - okhttp3.Call localVarCall = syncDownMemoryValidateBeforeCall(id, fromTime, toTime, when, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse> getMemoryWithHttpInfo(Integer id) throws ApiException { + okhttp3.Call localVarCall = getMemoryValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Get-sync for a Memory (asynchronously) - * Get all or part of a memory in TMX 1.4b format. If the `from_time` and/or `to_time` are omitted, then all segments are returned. The parameter `when` specifies on which date field `from_time` and `to_time` are matched. Possible values are `created` (when the segment was originally created in the memory), `updated` (when the segment was lastly updated), and `deleted` (when the segment was deleted). Example CURL command: ``` curl -X GET https://lilt.com/2/memories/sync?key=API_KEY&id=42 -o from_lilt.tmx ``` - * @param id A unique Memory identifier. (required) - * @param fromTime Unix time stamp (epoch, in seconds) of the start of the Memory section. (optional) - * @param toTime Unix time stamp (epoch, in seconds) of the end of the Memory section. (optional) - * @param when The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. If this parameter is omitted, then the whole Memory is returned. (optional) + * Retrieve a Memory (asynchronously) + * Retrieve a Memory. If you cannot access the Memory (401 error) please check permissions (e.g. in case you created the Memory via the web app with a different account you may have to explicitly share that Memory). + * @param id An optional Memory identifier. (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 A TMX 1.4b file. -
200 A list of Memory objects. -
0 Unexpected error -
*/ - public okhttp3.Call syncDownMemoryAsync(Integer id, Integer fromTime, Integer toTime, String when, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getMemoryAsync(Integer id, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = syncDownMemoryValidateBeforeCall(id, fromTime, toTime, when, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = getMemoryValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for syncInsertMemory - * @param id A unique Memory identifier. (required) + * Build call for importMemoryFile + * @param memoryId A unique Memory identifier. (required) + * @param name Name of the TM or termbase file. (required) * @param body The file contents to be uploaded. The entire POST body will be treated as the file. (required) - * @param name Name of the TMX file. (optional) + * @param sdlxliffFilters Contains Filter information Unique to SDLXLIFF (optional) + * @param hasHeaderRow A flag indicating whether an imported Termbase CSV has a header row or not (the default value is `false`). (optional) + * @param skipDuplicates A flag indicating whether or not to skip the import of segments which already exist in the memory. (the default value is `false`). (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1002,11 +800,11 @@ public okhttp3.Call syncDownMemoryAsync(Integer id, Integer fromTime, Integer to 0 Unexpected error - */ - public okhttp3.Call syncInsertMemoryCall(Integer id, String body, String name, final ApiCallback _callback) throws ApiException { + public okhttp3.Call importMemoryFileCall(Integer memoryId, String name, File body, List sdlxliffFilters, Boolean hasHeaderRow, Boolean skipDuplicates, final ApiCallback _callback) throws ApiException { Object localVarPostBody = body; // create path and map variables - String localVarPath = "/memories/sync"; + String localVarPath = "/v2/memories/import"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1014,14 +812,26 @@ public okhttp3.Call syncInsertMemoryCall(Integer id, String body, String name, f Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (id != null) { - localVarHeaderParams.put("id", localVarApiClient.parameterToString(id)); + if (memoryId != null) { + localVarHeaderParams.put("memory_id", localVarApiClient.parameterToString(memoryId)); } if (name != null) { localVarHeaderParams.put("name", localVarApiClient.parameterToString(name)); } + if (sdlxliffFilters != null) { + localVarHeaderParams.put("sdlxliff_filters", localVarApiClient.parameterToString(sdlxliffFilters)); + } + + if (hasHeaderRow != null) { + localVarHeaderParams.put("has_header_row", localVarApiClient.parameterToString(hasHeaderRow)); + } + + if (skipDuplicates != null) { + localVarHeaderParams.put("skip_duplicates", localVarApiClient.parameterToString(skipDuplicates)); + } + final String[] localVarAccepts = { "application/json" }; @@ -1041,31 +851,39 @@ public okhttp3.Call syncInsertMemoryCall(Integer id, String body, String name, f } @SuppressWarnings("rawtypes") - private okhttp3.Call syncInsertMemoryValidateBeforeCall(Integer id, String body, String name, final ApiCallback _callback) throws ApiException { + private okhttp3.Call importMemoryFileValidateBeforeCall(Integer memoryId, String name, File body, List sdlxliffFilters, Boolean hasHeaderRow, Boolean skipDuplicates, 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 syncInsertMemory(Async)"); + // verify the required parameter 'memoryId' is set + if (memoryId == null) { + throw new ApiException("Missing the required parameter 'memoryId' when calling importMemoryFile(Async)"); + } + + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling importMemoryFile(Async)"); } // verify the required parameter 'body' is set if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling syncInsertMemory(Async)"); + throw new ApiException("Missing the required parameter 'body' when calling importMemoryFile(Async)"); } - okhttp3.Call localVarCall = syncInsertMemoryCall(id, body, name, _callback); + okhttp3.Call localVarCall = importMemoryFileCall(memoryId, name, body, sdlxliffFilters, hasHeaderRow, skipDuplicates, _callback); return localVarCall; } /** - * Insert-sync for a Memory - * Inserts a TM in TMX 1.4b format into the Memory. Request parameters should be passed as JSON object with the header field `LILT-API`. Example CURL command: ``` curl -X POST https://lilt.com/2/memories/sync?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.tmx\\\",\\\"id\\\": 42}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.tmx ``` - * @param id A unique Memory identifier. (required) + * File import for a Memory + * Imports common translation memory or termbase file formats to a specific Lilt memory. Currently supported file formats are `*.tmx`, `*.sdltm`, `*.sdlxliff`(With custom Filters), '*.xliff', and `*.tmq` for TM data; `*.csv` and `*.tbx` for termbase data. Request parameters should be passed as JSON object with the header field `LILT-API`. Example CURL command to upload a translation memory file named `my_memory.sdltm` in the current working directory: ``` curl -X POST https://api.lilt.com/v2/memories/import?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.sdltm\\\",\\\"memory_id\\\": 42}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.sdltm ``` Example CURL command to upload a translation memory file named `my_memory.sdlxliff` in the current working directory, with Custom Filters based on SDLXLIFF fields, conf_name which maps to, percentage, and whether we should ignore unlocked segments. ``` curl -X POST https://api.lilt.com/v2/memories/import?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.sdlxliff\\\",\\\"memory_id\\\": 12,\\\"sdlxliff_filters\\\":[{\\\"conf_name\\\": \\\"Translated\\\", \\\"percentage\\\": 100, \\\"allow_unlocked\\\": false}]\"}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.sdlxliff + * @param memoryId A unique Memory identifier. (required) + * @param name Name of the TM or termbase file. (required) * @param body The file contents to be uploaded. The entire POST body will be treated as the file. (required) - * @param name Name of the TMX file. (optional) - * @return MemoryInsertResponse + * @param sdlxliffFilters Contains Filter information Unique to SDLXLIFF (optional) + * @param hasHeaderRow A flag indicating whether an imported Termbase CSV has a header row or not (the default value is `false`). (optional) + * @param skipDuplicates A flag indicating whether or not to skip the import of segments which already exist in the memory. (the default value is `false`). (optional) + * @return MemoryImportResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1074,18 +892,21 @@ private okhttp3.Call syncInsertMemoryValidateBeforeCall(Integer id, String body,
0 Unexpected error -
*/ - public MemoryInsertResponse syncInsertMemory(Integer id, String body, String name) throws ApiException { - ApiResponse localVarResp = syncInsertMemoryWithHttpInfo(id, body, name); + public MemoryImportResponse importMemoryFile(Integer memoryId, String name, File body, List sdlxliffFilters, Boolean hasHeaderRow, Boolean skipDuplicates) throws ApiException { + ApiResponse localVarResp = importMemoryFileWithHttpInfo(memoryId, name, body, sdlxliffFilters, hasHeaderRow, skipDuplicates); return localVarResp.getData(); } /** - * Insert-sync for a Memory - * Inserts a TM in TMX 1.4b format into the Memory. Request parameters should be passed as JSON object with the header field `LILT-API`. Example CURL command: ``` curl -X POST https://lilt.com/2/memories/sync?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.tmx\\\",\\\"id\\\": 42}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.tmx ``` - * @param id A unique Memory identifier. (required) + * File import for a Memory + * Imports common translation memory or termbase file formats to a specific Lilt memory. Currently supported file formats are `*.tmx`, `*.sdltm`, `*.sdlxliff`(With custom Filters), '*.xliff', and `*.tmq` for TM data; `*.csv` and `*.tbx` for termbase data. Request parameters should be passed as JSON object with the header field `LILT-API`. Example CURL command to upload a translation memory file named `my_memory.sdltm` in the current working directory: ``` curl -X POST https://api.lilt.com/v2/memories/import?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.sdltm\\\",\\\"memory_id\\\": 42}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.sdltm ``` Example CURL command to upload a translation memory file named `my_memory.sdlxliff` in the current working directory, with Custom Filters based on SDLXLIFF fields, conf_name which maps to, percentage, and whether we should ignore unlocked segments. ``` curl -X POST https://api.lilt.com/v2/memories/import?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.sdlxliff\\\",\\\"memory_id\\\": 12,\\\"sdlxliff_filters\\\":[{\\\"conf_name\\\": \\\"Translated\\\", \\\"percentage\\\": 100, \\\"allow_unlocked\\\": false}]\"}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.sdlxliff + * @param memoryId A unique Memory identifier. (required) + * @param name Name of the TM or termbase file. (required) * @param body The file contents to be uploaded. The entire POST body will be treated as the file. (required) - * @param name Name of the TMX file. (optional) - * @return ApiResponse<MemoryInsertResponse> + * @param sdlxliffFilters Contains Filter information Unique to SDLXLIFF (optional) + * @param hasHeaderRow A flag indicating whether an imported Termbase CSV has a header row or not (the default value is `false`). (optional) + * @param skipDuplicates A flag indicating whether or not to skip the import of segments which already exist in the memory. (the default value is `false`). (optional) + * @return ApiResponse<MemoryImportResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1094,18 +915,21 @@ public MemoryInsertResponse syncInsertMemory(Integer id, String body, String nam
0 Unexpected error -
*/ - public ApiResponse syncInsertMemoryWithHttpInfo(Integer id, String body, String name) throws ApiException { - okhttp3.Call localVarCall = syncInsertMemoryValidateBeforeCall(id, body, name, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse importMemoryFileWithHttpInfo(Integer memoryId, String name, File body, List sdlxliffFilters, Boolean hasHeaderRow, Boolean skipDuplicates) throws ApiException { + okhttp3.Call localVarCall = importMemoryFileValidateBeforeCall(memoryId, name, body, sdlxliffFilters, hasHeaderRow, skipDuplicates, null); + Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Insert-sync for a Memory (asynchronously) - * Inserts a TM in TMX 1.4b format into the Memory. Request parameters should be passed as JSON object with the header field `LILT-API`. Example CURL command: ``` curl -X POST https://lilt.com/2/memories/sync?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.tmx\\\",\\\"id\\\": 42}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.tmx ``` - * @param id A unique Memory identifier. (required) + * File import for a Memory (asynchronously) + * Imports common translation memory or termbase file formats to a specific Lilt memory. Currently supported file formats are `*.tmx`, `*.sdltm`, `*.sdlxliff`(With custom Filters), '*.xliff', and `*.tmq` for TM data; `*.csv` and `*.tbx` for termbase data. Request parameters should be passed as JSON object with the header field `LILT-API`. Example CURL command to upload a translation memory file named `my_memory.sdltm` in the current working directory: ``` curl -X POST https://api.lilt.com/v2/memories/import?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.sdltm\\\",\\\"memory_id\\\": 42}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.sdltm ``` Example CURL command to upload a translation memory file named `my_memory.sdlxliff` in the current working directory, with Custom Filters based on SDLXLIFF fields, conf_name which maps to, percentage, and whether we should ignore unlocked segments. ``` curl -X POST https://api.lilt.com/v2/memories/import?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.sdlxliff\\\",\\\"memory_id\\\": 12,\\\"sdlxliff_filters\\\":[{\\\"conf_name\\\": \\\"Translated\\\", \\\"percentage\\\": 100, \\\"allow_unlocked\\\": false}]\"}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.sdlxliff + * @param memoryId A unique Memory identifier. (required) + * @param name Name of the TM or termbase file. (required) * @param body The file contents to be uploaded. The entire POST body will be treated as the file. (required) - * @param name Name of the TMX file. (optional) + * @param sdlxliffFilters Contains Filter information Unique to SDLXLIFF (optional) + * @param hasHeaderRow A flag indicating whether an imported Termbase CSV has a header row or not (the default value is `false`). (optional) + * @param skipDuplicates A flag indicating whether or not to skip the import of segments which already exist in the memory. (the default value is `false`). (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 @@ -1116,35 +940,33 @@ public ApiResponse syncInsertMemoryWithHttpInfo(Integer id 0 Unexpected error - */ - public okhttp3.Call syncInsertMemoryAsync(Integer id, String body, String name, final ApiCallback _callback) throws ApiException { + public okhttp3.Call importMemoryFileAsync(Integer memoryId, String name, File body, List sdlxliffFilters, Boolean hasHeaderRow, Boolean skipDuplicates, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = syncInsertMemoryValidateBeforeCall(id, body, name, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = importMemoryFileValidateBeforeCall(memoryId, name, body, sdlxliffFilters, hasHeaderRow, skipDuplicates, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for syncUpdateMemory + * Build call for queryMemory * @param id A unique Memory identifier. (required) - * @param body The file contents to be uploaded. The entire PUT body will be treated as the file. (required) - * @param fromTime Unix time stamp (epoch, in seconds) of the start of the Memory section. (optional) - * @param toTime Unix time stamp (epoch, in seconds) of the end of the Memory section. (optional) - * @param when The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. (optional) + * @param query A source query. (required) + * @param n Maximum number of results to return. (optional, default to 10) * @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 A status object. -
200 A list of TranslationMemoryEntry objects. -
0 Unexpected error -
*/ - public okhttp3.Call syncUpdateMemoryCall(Integer id, String body, Integer fromTime, Integer toTime, String when, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = body; + public okhttp3.Call queryMemoryCall(Integer id, String query, Integer n, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/memories/sync"; + String localVarPath = "/v2/memories/query"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1153,19 +975,15 @@ public okhttp3.Call syncUpdateMemoryCall(Integer id, String body, Integer fromTi Map localVarFormParams = new HashMap(); if (id != null) { - localVarHeaderParams.put("id", localVarApiClient.parameterToString(id)); - } - - if (fromTime != null) { - localVarHeaderParams.put("from_time", localVarApiClient.parameterToString(fromTime)); + localVarQueryParams.addAll(localVarApiClient.parameterToPair("id", id)); } - if (toTime != null) { - localVarHeaderParams.put("to_time", localVarApiClient.parameterToString(toTime)); + if (query != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("query", query)); } - if (when != null) { - localVarHeaderParams.put("when", localVarApiClient.parameterToString(when)); + if (n != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); } final String[] localVarAccepts = { @@ -1177,101 +995,95 @@ public okhttp3.Call syncUpdateMemoryCall(Integer id, String body, Integer fromTi } final String[] localVarContentTypes = { - "application/json" + }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call syncUpdateMemoryValidateBeforeCall(Integer id, String body, Integer fromTime, Integer toTime, String when, final ApiCallback _callback) throws ApiException { + private okhttp3.Call queryMemoryValidateBeforeCall(Integer id, String query, Integer n, 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 syncUpdateMemory(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling queryMemory(Async)"); } - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling syncUpdateMemory(Async)"); + // verify the required parameter 'query' is set + if (query == null) { + throw new ApiException("Missing the required parameter 'query' when calling queryMemory(Async)"); } - okhttp3.Call localVarCall = syncUpdateMemoryCall(id, body, fromTime, toTime, when, _callback); + okhttp3.Call localVarCall = queryMemoryCall(id, query, n, _callback); return localVarCall; } /** - * Update-sync for a Memory - * Updates the Memory with given TMX file. Request parameters should be passed as JSON object with the header field `LILT-API`. The number of segments returned by the `from_time`, `to_time`, `when` parameters and the number of segments in the TMX file need to be identical. Example CURL command: ``` curl -X PUT https://lilt.com/2/memories/sync?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.tmx\\\", \\\"id\\\": 42, \\\"from_time\\\": 1491048000, \\\"to_time\\\": 1491049800, \"when\": \"Updated\"}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.tmx ``` + * Query a Memory + * Perform a translation memory query. * @param id A unique Memory identifier. (required) - * @param body The file contents to be uploaded. The entire PUT body will be treated as the file. (required) - * @param fromTime Unix time stamp (epoch, in seconds) of the start of the Memory section. (optional) - * @param toTime Unix time stamp (epoch, in seconds) of the end of the Memory section. (optional) - * @param when The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. (optional) - * @return MemoryUpdateResponse + * @param query A source query. (required) + * @param n Maximum number of results to return. (optional, default to 10) + * @return List<TranslationMemoryEntry> * @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 A status object. -
200 A list of TranslationMemoryEntry objects. -
0 Unexpected error -
*/ - public MemoryUpdateResponse syncUpdateMemory(Integer id, String body, Integer fromTime, Integer toTime, String when) throws ApiException { - ApiResponse localVarResp = syncUpdateMemoryWithHttpInfo(id, body, fromTime, toTime, when); + public List queryMemory(Integer id, String query, Integer n) throws ApiException { + ApiResponse> localVarResp = queryMemoryWithHttpInfo(id, query, n); return localVarResp.getData(); } /** - * Update-sync for a Memory - * Updates the Memory with given TMX file. Request parameters should be passed as JSON object with the header field `LILT-API`. The number of segments returned by the `from_time`, `to_time`, `when` parameters and the number of segments in the TMX file need to be identical. Example CURL command: ``` curl -X PUT https://lilt.com/2/memories/sync?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.tmx\\\", \\\"id\\\": 42, \\\"from_time\\\": 1491048000, \\\"to_time\\\": 1491049800, \"when\": \"Updated\"}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.tmx ``` + * Query a Memory + * Perform a translation memory query. * @param id A unique Memory identifier. (required) - * @param body The file contents to be uploaded. The entire PUT body will be treated as the file. (required) - * @param fromTime Unix time stamp (epoch, in seconds) of the start of the Memory section. (optional) - * @param toTime Unix time stamp (epoch, in seconds) of the end of the Memory section. (optional) - * @param when The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. (optional) - * @return ApiResponse<MemoryUpdateResponse> + * @param query A source query. (required) + * @param n Maximum number of results to return. (optional, default to 10) + * @return ApiResponse<List<TranslationMemoryEntry>> * @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 A status object. -
200 A list of TranslationMemoryEntry objects. -
0 Unexpected error -
*/ - public ApiResponse syncUpdateMemoryWithHttpInfo(Integer id, String body, Integer fromTime, Integer toTime, String when) throws ApiException { - okhttp3.Call localVarCall = syncUpdateMemoryValidateBeforeCall(id, body, fromTime, toTime, when, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse> queryMemoryWithHttpInfo(Integer id, String query, Integer n) throws ApiException { + okhttp3.Call localVarCall = queryMemoryValidateBeforeCall(id, query, n, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Update-sync for a Memory (asynchronously) - * Updates the Memory with given TMX file. Request parameters should be passed as JSON object with the header field `LILT-API`. The number of segments returned by the `from_time`, `to_time`, `when` parameters and the number of segments in the TMX file need to be identical. Example CURL command: ``` curl -X PUT https://lilt.com/2/memories/sync?key=API_KEY \\ --header \"LILT-API: {\\\"name\\\": \\\"my_memory.tmx\\\", \\\"id\\\": 42, \\\"from_time\\\": 1491048000, \\\"to_time\\\": 1491049800, \"when\": \"Updated\"}\" \\ --header \"Content-Type: application/octet-stream\" \\ --data-binary @my_memory.tmx ``` + * Query a Memory (asynchronously) + * Perform a translation memory query. * @param id A unique Memory identifier. (required) - * @param body The file contents to be uploaded. The entire PUT body will be treated as the file. (required) - * @param fromTime Unix time stamp (epoch, in seconds) of the start of the Memory section. (optional) - * @param toTime Unix time stamp (epoch, in seconds) of the end of the Memory section. (optional) - * @param when The date field on which retrieved segments match from/to time stamps: `created`, `updated`, `deleted`. (optional) + * @param query A source query. (required) + * @param n Maximum number of results to return. (optional, default to 10) * @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 A status object. -
200 A list of TranslationMemoryEntry objects. -
0 Unexpected error -
*/ - public okhttp3.Call syncUpdateMemoryAsync(Integer id, String body, Integer fromTime, Integer toTime, String when, final ApiCallback _callback) throws ApiException { + public okhttp3.Call queryMemoryAsync(Integer id, String query, Integer n, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = syncUpdateMemoryValidateBeforeCall(id, body, fromTime, toTime, when, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = queryMemoryValidateBeforeCall(id, query, n, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -1292,7 +1104,7 @@ public okhttp3.Call updateMemoryCall(MemoryUpdateParameters body, final ApiCallb Object localVarPostBody = body; // create path and map variables - String localVarPath = "/memories"; + String localVarPath = "/v2/memories"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); diff --git a/src/main/java/com/lilt/client/api/ProjectsApi.java b/src/main/java/com/lilt/client/api/ProjectsApi.java index 686b63c81..0a1cd20f4 100644 --- a/src/main/java/com/lilt/client/api/ProjectsApi.java +++ b/src/main/java/com/lilt/client/api/ProjectsApi.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -31,9 +31,6 @@ import com.lilt.client.model.Project; import com.lilt.client.model.ProjectCreateParameters; import com.lilt.client.model.ProjectDeleteResponse; -import com.lilt.client.model.ProjectQuote; -import com.lilt.client.model.ProjectStatus; -import com.lilt.client.model.ProjectUpdateResponse; import java.lang.reflect.Type; import java.util.ArrayList; @@ -77,7 +74,7 @@ public okhttp3.Call createProjectCall(ProjectCreateParameters body, final ApiCal Object localVarPostBody = body; // create path and map variables - String localVarPath = "/projects"; + String localVarPath = "/v2/projects"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -192,7 +189,7 @@ public okhttp3.Call deleteProjectCall(Integer id, final ApiCallback _callback) t Object localVarPostBody = null; // create path and map variables - String localVarPath = "/projects"; + String localVarPath = "/v2/projects"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -289,359 +286,9 @@ public okhttp3.Call deleteProjectAsync(Integer id, final ApiCallback - Status Code Description Response Headers - 200 An object that represents a Project quote. - - 0 Unexpected error - - - */ - public okhttp3.Call getProjectReportCall(Integer id, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/quote"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (id != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("id", id)); - } - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getProjectReportValidateBeforeCall(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 getProjectReport(Async)"); - } - - - okhttp3.Call localVarCall = getProjectReportCall(id, _callback); - return localVarCall; - - } - - /** - * Retrieve Project report - * Get information about a project that can be used for quoting. This includes: * A translation memory leverage report * Word count * Segment count - * @param id A unique Project identifier. (required) - * @return ProjectQuote - * @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 An object that represents a Project quote. -
0 Unexpected error -
- */ - public ProjectQuote getProjectReport(Integer id) throws ApiException { - ApiResponse localVarResp = getProjectReportWithHttpInfo(id); - return localVarResp.getData(); - } - - /** - * Retrieve Project report - * Get information about a project that can be used for quoting. This includes: * A translation memory leverage report * Word count * Segment count - * @param id A unique Project identifier. (required) - * @return ApiResponse<ProjectQuote> - * @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 An object that represents a Project quote. -
0 Unexpected error -
- */ - public ApiResponse getProjectReportWithHttpInfo(Integer id) throws ApiException { - okhttp3.Call localVarCall = getProjectReportValidateBeforeCall(id, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve Project report (asynchronously) - * Get information about a project that can be used for quoting. This includes: * A translation memory leverage report * Word count * Segment count - * @param id A unique Project identifier. (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 An object that represents a Project quote. -
0 Unexpected error -
- */ - public okhttp3.Call getProjectReportAsync(Integer id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getProjectReportValidateBeforeCall(id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getProjectRevisionReport - * @param id A unique Project identifier. (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 A csv file containing revision report. -
0 Unexpected error -
- */ - public okhttp3.Call getProjectRevisionReportCall(Integer id, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/{id}/revision" - .replaceAll("\\{" + "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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getProjectRevisionReportValidateBeforeCall(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 getProjectRevisionReport(Async)"); - } - - - okhttp3.Call localVarCall = getProjectRevisionReportCall(id, _callback); - return localVarCall; - - } - - /** - * Retrieve Project revision report - * Get information about a project's revision report. This includes: * Stats on accepted segments * reviewer details * Error rate - * @param id A unique Project identifier. (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
200 A csv file containing revision report. -
0 Unexpected error -
- */ - public void getProjectRevisionReport(Integer id) throws ApiException { - getProjectRevisionReportWithHttpInfo(id); - } - - /** - * Retrieve Project revision report - * Get information about a project's revision report. This includes: * Stats on accepted segments * reviewer details * Error rate - * @param id A unique Project identifier. (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
200 A csv file containing revision report. -
0 Unexpected error -
- */ - public ApiResponse getProjectRevisionReportWithHttpInfo(Integer id) throws ApiException { - okhttp3.Call localVarCall = getProjectRevisionReportValidateBeforeCall(id, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * Retrieve Project revision report (asynchronously) - * Get information about a project's revision report. This includes: * Stats on accepted segments * reviewer details * Error rate - * @param id A unique Project identifier. (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 A csv file containing revision report. -
0 Unexpected error -
- */ - public okhttp3.Call getProjectRevisionReportAsync(Integer id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getProjectRevisionReportValidateBeforeCall(id, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for getProjectStatus - * @param id A unique Project identifier. (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 An object that represents a Project status report. -
0 Unexpected error -
- */ - public okhttp3.Call getProjectStatusCall(Integer id, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/projects/status"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (id != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("id", id)); - } - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getProjectStatusValidateBeforeCall(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 getProjectStatus(Async)"); - } - - - okhttp3.Call localVarCall = getProjectStatusCall(id, _callback); - return localVarCall; - - } - - /** - * Retrieve Project status - * Retrieve the status of a Project. - * @param id A unique Project identifier. (required) - * @return ProjectStatus - * @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 An object that represents a Project status report. -
0 Unexpected error -
- */ - public ProjectStatus getProjectStatus(Integer id) throws ApiException { - ApiResponse localVarResp = getProjectStatusWithHttpInfo(id); - return localVarResp.getData(); - } - - /** - * Retrieve Project status - * Retrieve the status of a Project. - * @param id A unique Project identifier. (required) - * @return ApiResponse<ProjectStatus> - * @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 An object that represents a Project status report. -
0 Unexpected error -
- */ - public ApiResponse getProjectStatusWithHttpInfo(Integer id) throws ApiException { - okhttp3.Call localVarCall = getProjectStatusValidateBeforeCall(id, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Retrieve Project status (asynchronously) - * Retrieve the status of a Project. - * @param id A unique Project identifier. (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 An object that represents a Project status report. -
0 Unexpected error -
- */ - public okhttp3.Call getProjectStatusAsync(Integer id, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getProjectStatusValidateBeforeCall(id, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for getProjects - * @param id A unique Project identifier. (optional) + * @param id A unique Project identifier. It can be a single id or multiple ids separated by a comma (optional) * @param srclang An ISO 639-1 language code. (optional) * @param trglang An ISO 639-1 language code. (optional) * @param fromTime Unix time stamp (epoch, in seconds) of Projects with `created_at` greater than or equal to the value. (optional) @@ -663,7 +310,7 @@ public okhttp3.Call getProjectsCall(Integer id, String srclang, String trglang, Object localVarPostBody = null; // create path and map variables - String localVarPath = "/projects"; + String localVarPath = "/v2/projects"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -732,8 +379,8 @@ private okhttp3.Call getProjectsValidateBeforeCall(Integer id, String srclang, S /** * Retrieve a Project - * Retrieves one or more projects, including the documents associated with each project. Retrieving a project is the most efficient way to retrieve a single project or a list of all available projects. To retrieve a specific project, specify the `id` request parameter. To retrieve all projects, omit the `id` request parameter. To limit the retrieved projects to those with a particular source language or target language, specify the corresponding ISO 639-1 language codes in the `srclang` and `trglang` request parameters, respectively. - * @param id A unique Project identifier. (optional) + * Retrieves one or more projects, including the documents associated with each project. Retrieving a project is the most efficient way to retrieve a single project, multiple projects or a list of all available projects. To retrieve a specific project, specify the `id` request parameter or you can retrieve multiple projects by adding comma (,) between ids eg. `?id=1234,5678`. To retrieve all projects, omit the `id` request parameter. To limit the retrieved projects to those with a particular source language or target language, specify the corresponding ISO 639-1 language codes in the `srclang` and `trglang` request parameters, respectively. + * @param id A unique Project identifier. It can be a single id or multiple ids separated by a comma (optional) * @param srclang An ISO 639-1 language code. (optional) * @param trglang An ISO 639-1 language code. (optional) * @param fromTime Unix time stamp (epoch, in seconds) of Projects with `created_at` greater than or equal to the value. (optional) @@ -757,8 +404,8 @@ public List getProjects(Integer id, String srclang, String trglang, Int /** * Retrieve a Project - * Retrieves one or more projects, including the documents associated with each project. Retrieving a project is the most efficient way to retrieve a single project or a list of all available projects. To retrieve a specific project, specify the `id` request parameter. To retrieve all projects, omit the `id` request parameter. To limit the retrieved projects to those with a particular source language or target language, specify the corresponding ISO 639-1 language codes in the `srclang` and `trglang` request parameters, respectively. - * @param id A unique Project identifier. (optional) + * Retrieves one or more projects, including the documents associated with each project. Retrieving a project is the most efficient way to retrieve a single project, multiple projects or a list of all available projects. To retrieve a specific project, specify the `id` request parameter or you can retrieve multiple projects by adding comma (,) between ids eg. `?id=1234,5678`. To retrieve all projects, omit the `id` request parameter. To limit the retrieved projects to those with a particular source language or target language, specify the corresponding ISO 639-1 language codes in the `srclang` and `trglang` request parameters, respectively. + * @param id A unique Project identifier. It can be a single id or multiple ids separated by a comma (optional) * @param srclang An ISO 639-1 language code. (optional) * @param trglang An ISO 639-1 language code. (optional) * @param fromTime Unix time stamp (epoch, in seconds) of Projects with `created_at` greater than or equal to the value. (optional) @@ -783,8 +430,8 @@ public ApiResponse> getProjectsWithHttpInfo(Integer id, String src /** * Retrieve a Project (asynchronously) - * Retrieves one or more projects, including the documents associated with each project. Retrieving a project is the most efficient way to retrieve a single project or a list of all available projects. To retrieve a specific project, specify the `id` request parameter. To retrieve all projects, omit the `id` request parameter. To limit the retrieved projects to those with a particular source language or target language, specify the corresponding ISO 639-1 language codes in the `srclang` and `trglang` request parameters, respectively. - * @param id A unique Project identifier. (optional) + * Retrieves one or more projects, including the documents associated with each project. Retrieving a project is the most efficient way to retrieve a single project, multiple projects or a list of all available projects. To retrieve a specific project, specify the `id` request parameter or you can retrieve multiple projects by adding comma (,) between ids eg. `?id=1234,5678`. To retrieve all projects, omit the `id` request parameter. To limit the retrieved projects to those with a particular source language or target language, specify the corresponding ISO 639-1 language codes in the `srclang` and `trglang` request parameters, respectively. + * @param id A unique Project identifier. It can be a single id or multiple ids separated by a comma (optional) * @param srclang An ISO 639-1 language code. (optional) * @param trglang An ISO 639-1 language code. (optional) * @param fromTime Unix time stamp (epoch, in seconds) of Projects with `created_at` greater than or equal to the value. (optional) @@ -809,119 +456,4 @@ public okhttp3.Call getProjectsAsync(Integer id, String srclang, String trglang, localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } - /** - * Build call for updateProject - * @param body (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 A Project object. -
0 Unexpected error -
- */ - public okhttp3.Call updateProjectCall(ProjectUpdateResponse body, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/projects"; - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; - return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateProjectValidateBeforeCall(ProjectUpdateResponse body, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling updateProject(Async)"); - } - - - okhttp3.Call localVarCall = updateProjectCall(body, _callback); - return localVarCall; - - } - - /** - * Update a Project - * Update a Project. - * @param body (required) - * @return Project - * @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 A Project object. -
0 Unexpected error -
- */ - public Project updateProject(ProjectUpdateResponse body) throws ApiException { - ApiResponse localVarResp = updateProjectWithHttpInfo(body); - return localVarResp.getData(); - } - - /** - * Update a Project - * Update a Project. - * @param body (required) - * @return ApiResponse<Project> - * @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 A Project object. -
0 Unexpected error -
- */ - public ApiResponse updateProjectWithHttpInfo(ProjectUpdateResponse body) throws ApiException { - okhttp3.Call localVarCall = updateProjectValidateBeforeCall(body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Update a Project (asynchronously) - * Update a Project. - * @param body (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 A Project object. -
0 Unexpected error -
- */ - public okhttp3.Call updateProjectAsync(ProjectUpdateResponse body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateProjectValidateBeforeCall(body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } } diff --git a/src/main/java/com/lilt/client/api/TranslateApi.java b/src/main/java/com/lilt/client/api/TranslateApi.java index 4a823f36b..a8088eede 100644 --- a/src/main/java/com/lilt/client/api/TranslateApi.java +++ b/src/main/java/com/lilt/client/api/TranslateApi.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -29,7 +29,6 @@ import java.math.BigDecimal; import com.lilt.client.model.Error; -import com.lilt.client.model.TranslateRegisterResponse; import com.lilt.client.model.TranslateSegmentBody; import com.lilt.client.model.TranslationInfo; import com.lilt.client.model.TranslationList; @@ -79,7 +78,7 @@ public okhttp3.Call batchTranslateFileCall(String fileId, String memoryId, BigDe Object localVarPostBody = null; // create path and map variables - String localVarPath = "/translate/file"; + String localVarPath = "/v2/translate/file"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -142,7 +141,7 @@ private okhttp3.Call batchTranslateFileValidateBeforeCall(String fileId, String /** * Translate a File - * Start machine translation of one or more Files that have previously been uploaded. The response will include an `id` parameter that can be used to monitor and download the translations in subsequent calls. Example CURL: ``` curl --X --request POST 'https://lilt.com/2/translate/file?key=API_KEY&fileId=583&memoryId=2495&configId=123&withTM=true' ``` + * Start machine translation of one or more Files that have previously been uploaded. The response will include an `id` parameter that can be used to monitor and download the translations in subsequent calls. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/translate/file?key=API_KEY&fileId=583&memoryId=2495&configId=123&withTM=true' ``` * @param fileId List of File ids to be translated, comma separated. (required) * @param memoryId Id of Memory to use in translation. (required) * @param configId An optional pararameter to specify an import configuration to be applied when extracting translatable content from this file. (optional) @@ -163,7 +162,7 @@ public TranslationInfo batchTranslateFile(String fileId, String memoryId, BigDec /** * Translate a File - * Start machine translation of one or more Files that have previously been uploaded. The response will include an `id` parameter that can be used to monitor and download the translations in subsequent calls. Example CURL: ``` curl --X --request POST 'https://lilt.com/2/translate/file?key=API_KEY&fileId=583&memoryId=2495&configId=123&withTM=true' ``` + * Start machine translation of one or more Files that have previously been uploaded. The response will include an `id` parameter that can be used to monitor and download the translations in subsequent calls. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/translate/file?key=API_KEY&fileId=583&memoryId=2495&configId=123&withTM=true' ``` * @param fileId List of File ids to be translated, comma separated. (required) * @param memoryId Id of Memory to use in translation. (required) * @param configId An optional pararameter to specify an import configuration to be applied when extracting translatable content from this file. (optional) @@ -185,7 +184,7 @@ public ApiResponse batchTranslateFileWithHttpInfo(String fileId /** * Translate a File (asynchronously) - * Start machine translation of one or more Files that have previously been uploaded. The response will include an `id` parameter that can be used to monitor and download the translations in subsequent calls. Example CURL: ``` curl --X --request POST 'https://lilt.com/2/translate/file?key=API_KEY&fileId=583&memoryId=2495&configId=123&withTM=true' ``` + * Start machine translation of one or more Files that have previously been uploaded. The response will include an `id` parameter that can be used to monitor and download the translations in subsequent calls. Example CURL: ``` curl --X --request POST 'https://api.lilt.com/v2/translate/file?key=API_KEY&fileId=583&memoryId=2495&configId=123&withTM=true' ``` * @param fileId List of File ids to be translated, comma separated. (required) * @param memoryId Id of Memory to use in translation. (required) * @param configId An optional pararameter to specify an import configuration to be applied when extracting translatable content from this file. (optional) @@ -223,7 +222,7 @@ public okhttp3.Call downloadFileCall(String id, final ApiCallback _callback) thr Object localVarPostBody = null; // create path and map variables - String localVarPath = "/translate/files"; + String localVarPath = "/v2/translate/files"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -269,7 +268,7 @@ private okhttp3.Call downloadFileValidateBeforeCall(String id, final ApiCallback /** * Download translated file - * Download a translated File. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/translate/files?key=API_KEY&id=1' ``` + * Download a translated File. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/translate/files?key=API_KEY&id=1' ``` * @param id A translation id. (required) * @return byte[] * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -286,7 +285,7 @@ public byte[] downloadFile(String id) throws ApiException { /** * Download translated file - * Download a translated File. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/translate/files?key=API_KEY&id=1' ``` + * Download a translated File. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/translate/files?key=API_KEY&id=1' ``` * @param id A translation id. (required) * @return ApiResponse<byte[]> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -304,7 +303,7 @@ public ApiResponse downloadFileWithHttpInfo(String id) throws ApiExcepti /** * Download translated file (asynchronously) - * Download a translated File. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/translate/files?key=API_KEY&id=1' ``` + * Download a translated File. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/translate/files?key=API_KEY&id=1' ``` * @param id A translation id. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -342,7 +341,7 @@ public okhttp3.Call monitorFileTranslationCall(String translationIds, String sta Object localVarPostBody = null; // create path and map variables - String localVarPath = "/translate/file"; + String localVarPath = "/v2/translate/file"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -395,7 +394,7 @@ private okhttp3.Call monitorFileTranslationValidateBeforeCall(String translation /** * Monitor file translation - * Get information about the one or more Files that are being translated with machine translation. Query filters are optional but at least one must be provided. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/translate/file?key=API_KEY&translationIds=1,2&fromTime=1607966744&toTime=1707966744&status=InProgress' ``` + * Get information about the one or more Files that are being translated with machine translation. Query filters are optional but at least one must be provided. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/translate/file?key=API_KEY&translationIds=1,2&fromTime=1607966744&toTime=1707966744&status=InProgress' ``` * @param translationIds List of translation ids, comma separated (optional) * @param status One of the translation statuses - `InProgress`, `Completed`, `Failed`, `ReadyForDownload` (optional) * @param fromTime Results after this time (inclusive) will be returned, specified as seconds since the Unix epoch. (optional) @@ -416,7 +415,7 @@ public TranslationInfo monitorFileTranslation(String translationIds, String stat /** * Monitor file translation - * Get information about the one or more Files that are being translated with machine translation. Query filters are optional but at least one must be provided. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/translate/file?key=API_KEY&translationIds=1,2&fromTime=1607966744&toTime=1707966744&status=InProgress' ``` + * Get information about the one or more Files that are being translated with machine translation. Query filters are optional but at least one must be provided. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/translate/file?key=API_KEY&translationIds=1,2&fromTime=1607966744&toTime=1707966744&status=InProgress' ``` * @param translationIds List of translation ids, comma separated (optional) * @param status One of the translation statuses - `InProgress`, `Completed`, `Failed`, `ReadyForDownload` (optional) * @param fromTime Results after this time (inclusive) will be returned, specified as seconds since the Unix epoch. (optional) @@ -438,7 +437,7 @@ public ApiResponse monitorFileTranslationWithHttpInfo(String tr /** * Monitor file translation (asynchronously) - * Get information about the one or more Files that are being translated with machine translation. Query filters are optional but at least one must be provided. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/translate/file?key=API_KEY&translationIds=1,2&fromTime=1607966744&toTime=1707966744&status=InProgress' ``` + * Get information about the one or more Files that are being translated with machine translation. Query filters are optional but at least one must be provided. Example CURL: ``` curl --X --request GET 'https://api.lilt.com/v2/translate/file?key=API_KEY&translationIds=1,2&fromTime=1607966744&toTime=1707966744&status=InProgress' ``` * @param translationIds List of translation ids, comma separated (optional) * @param status One of the translation statuses - `InProgress`, `Completed`, `Failed`, `ReadyForDownload` (optional) * @param fromTime Results after this time (inclusive) will be returned, specified as seconds since the Unix epoch. (optional) @@ -461,160 +460,7 @@ public okhttp3.Call monitorFileTranslationAsync(String translationIds, String st return localVarCall; } /** - * Build call for registerSegment - * @param source A source string to be registered. (required) - * @param srclang An ISO 639-1 language code. (required) - * @param trglang An ISO 639-1 language code. (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 A status object. -
0 Unexpected error -
- */ - public okhttp3.Call registerSegmentCall(String source, String srclang, String trglang, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/translate/register"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (source != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("source", source)); - } - - if (srclang != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("srclang", srclang)); - } - - if (trglang != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("trglang", trglang)); - } - - 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); - localVarHeaderParams.put("Content-Type", localVarContentType); - - String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call registerSegmentValidateBeforeCall(String source, String srclang, String trglang, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'source' is set - if (source == null) { - throw new ApiException("Missing the required parameter 'source' when calling registerSegment(Async)"); - } - - // verify the required parameter 'srclang' is set - if (srclang == null) { - throw new ApiException("Missing the required parameter 'srclang' when calling registerSegment(Async)"); - } - - // verify the required parameter 'trglang' is set - if (trglang == null) { - throw new ApiException("Missing the required parameter 'trglang' when calling registerSegment(Async)"); - } - - - okhttp3.Call localVarCall = registerSegmentCall(source, srclang, trglang, _callback); - return localVarCall; - - } - - /** - * Register a segment - * Register a source string for interactive translation. The `source_hash` value that is returned by this request is required by the `prefix` parameter for the translation endpoint. The maximum source length is 5,000 characters. Usage charges apply to this endpoint for production REST API keys. - * @param source A source string to be registered. (required) - * @param srclang An ISO 639-1 language code. (required) - * @param trglang An ISO 639-1 language code. (required) - * @return TranslateRegisterResponse - * @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 A status object. -
0 Unexpected error -
- */ - public TranslateRegisterResponse registerSegment(String source, String srclang, String trglang) throws ApiException { - ApiResponse localVarResp = registerSegmentWithHttpInfo(source, srclang, trglang); - return localVarResp.getData(); - } - - /** - * Register a segment - * Register a source string for interactive translation. The `source_hash` value that is returned by this request is required by the `prefix` parameter for the translation endpoint. The maximum source length is 5,000 characters. Usage charges apply to this endpoint for production REST API keys. - * @param source A source string to be registered. (required) - * @param srclang An ISO 639-1 language code. (required) - * @param trglang An ISO 639-1 language code. (required) - * @return ApiResponse<TranslateRegisterResponse> - * @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 A status object. -
0 Unexpected error -
- */ - public ApiResponse registerSegmentWithHttpInfo(String source, String srclang, String trglang) throws ApiException { - okhttp3.Call localVarCall = registerSegmentValidateBeforeCall(source, srclang, trglang, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Register a segment (asynchronously) - * Register a source string for interactive translation. The `source_hash` value that is returned by this request is required by the `prefix` parameter for the translation endpoint. The maximum source length is 5,000 characters. Usage charges apply to this endpoint for production REST API keys. - * @param source A source string to be registered. (required) - * @param srclang An ISO 639-1 language code. (required) - * @param trglang An ISO 639-1 language code. (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 A status object. -
0 Unexpected error -
- */ - public okhttp3.Call registerSegmentAsync(String source, String srclang, String trglang, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = registerSegmentValidateBeforeCall(source, srclang, trglang, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for translateSegment - * @param memoryId A unique Memory identifier. (required) - * @param source The source text to be translated. (optional) - * @param sourceHash A source hash code. (optional) - * @param prefix A target prefix. (optional) - * @param n Return top n translations (deprecated). (optional, default to 1) - * @param rich Returns rich translation information (e.g., with word alignments). (optional, default to false) - * @param tmMatches Include translation memory fuzzy matches. (optional, default to true) - * @param projectTags Project tags. Projects tags in source to target if set to true. (optional, default to false) + * Build call for translateSegmentPost * @param body (optional) * @param _callback Callback for upload/download progress * @return Call to execute @@ -626,11 +472,11 @@ public okhttp3.Call registerSegmentAsync(String source, String srclang, String t 0 Unexpected error - */ - public okhttp3.Call translateSegmentCall(Integer memoryId, String source, Integer sourceHash, String prefix, Integer n, Boolean rich, Boolean tmMatches, Boolean projectTags, TranslateSegmentBody body, final ApiCallback _callback) throws ApiException { + public okhttp3.Call translateSegmentPostCall(TranslateSegmentBody body, final ApiCallback _callback) throws ApiException { Object localVarPostBody = body; // create path and map variables - String localVarPath = "/translate"; + String localVarPath = "/v2/translate"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -638,38 +484,6 @@ public okhttp3.Call translateSegmentCall(Integer memoryId, String source, Intege Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (memoryId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("memory_id", memoryId)); - } - - if (source != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("source", source)); - } - - if (sourceHash != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("source_hash", sourceHash)); - } - - if (prefix != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("prefix", prefix)); - } - - if (n != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("n", n)); - } - - if (rich != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("rich", rich)); - } - - if (tmMatches != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("tm_matches", tmMatches)); - } - - if (projectTags != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("project_tags", projectTags)); - } - final String[] localVarAccepts = { "application/json" }; @@ -685,34 +499,21 @@ public okhttp3.Call translateSegmentCall(Integer memoryId, String source, Intege localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" }; - return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call translateSegmentValidateBeforeCall(Integer memoryId, String source, Integer sourceHash, String prefix, Integer n, Boolean rich, Boolean tmMatches, Boolean projectTags, TranslateSegmentBody body, final ApiCallback _callback) throws ApiException { - - // verify the required parameter 'memoryId' is set - if (memoryId == null) { - throw new ApiException("Missing the required parameter 'memoryId' when calling translateSegment(Async)"); - } + private okhttp3.Call translateSegmentPostValidateBeforeCall(TranslateSegmentBody body, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = translateSegmentCall(memoryId, source, sourceHash, prefix, n, rich, tmMatches, projectTags, body, _callback); + okhttp3.Call localVarCall = translateSegmentPostCall(body, _callback); return localVarCall; } /** * Translate a segment - * Translate a source string. Setting the `rich` parameter to `true` will change the response format to include additional information about each translation including a model score, word alignments, and formatting information. The rich format can be seen in the example response on this page. By default, this endpoint also returns translation memory (TM) fuzzy matches, along with associated scores. Fuzzy matches always appear ahead of machine translation output in the response. The `source` parameter may be supplied in the query or in the request body. The maximum source length is 5,000 characters. Usage charges apply to this endpoint for production REST API keys. - * @param memoryId A unique Memory identifier. (required) - * @param source The source text to be translated. (optional) - * @param sourceHash A source hash code. (optional) - * @param prefix A target prefix. (optional) - * @param n Return top n translations (deprecated). (optional, default to 1) - * @param rich Returns rich translation information (e.g., with word alignments). (optional, default to false) - * @param tmMatches Include translation memory fuzzy matches. (optional, default to true) - * @param projectTags Project tags. Projects tags in source to target if set to true. (optional, default to false) + * Translate a source string. Setting the `rich` parameter to `true` will change the response format to include additional information about each translation including a model score, word alignments, and formatting information. The rich format can be seen in the example response on this page. By default, this endpoint also returns translation memory (TM) fuzzy matches, along with associated scores. Fuzzy matches always appear ahead of machine translation output in the response. The maximum source length is 5,000 characters. Usage charges apply to this endpoint for production REST API keys. * @param body (optional) * @return TranslationList * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -723,22 +524,14 @@ private okhttp3.Call translateSegmentValidateBeforeCall(Integer memoryId, String 0 Unexpected error - */ - public TranslationList translateSegment(Integer memoryId, String source, Integer sourceHash, String prefix, Integer n, Boolean rich, Boolean tmMatches, Boolean projectTags, TranslateSegmentBody body) throws ApiException { - ApiResponse localVarResp = translateSegmentWithHttpInfo(memoryId, source, sourceHash, prefix, n, rich, tmMatches, projectTags, body); + public TranslationList translateSegmentPost(TranslateSegmentBody body) throws ApiException { + ApiResponse localVarResp = translateSegmentPostWithHttpInfo(body); return localVarResp.getData(); } /** * Translate a segment - * Translate a source string. Setting the `rich` parameter to `true` will change the response format to include additional information about each translation including a model score, word alignments, and formatting information. The rich format can be seen in the example response on this page. By default, this endpoint also returns translation memory (TM) fuzzy matches, along with associated scores. Fuzzy matches always appear ahead of machine translation output in the response. The `source` parameter may be supplied in the query or in the request body. The maximum source length is 5,000 characters. Usage charges apply to this endpoint for production REST API keys. - * @param memoryId A unique Memory identifier. (required) - * @param source The source text to be translated. (optional) - * @param sourceHash A source hash code. (optional) - * @param prefix A target prefix. (optional) - * @param n Return top n translations (deprecated). (optional, default to 1) - * @param rich Returns rich translation information (e.g., with word alignments). (optional, default to false) - * @param tmMatches Include translation memory fuzzy matches. (optional, default to true) - * @param projectTags Project tags. Projects tags in source to target if set to true. (optional, default to false) + * Translate a source string. Setting the `rich` parameter to `true` will change the response format to include additional information about each translation including a model score, word alignments, and formatting information. The rich format can be seen in the example response on this page. By default, this endpoint also returns translation memory (TM) fuzzy matches, along with associated scores. Fuzzy matches always appear ahead of machine translation output in the response. The maximum source length is 5,000 characters. Usage charges apply to this endpoint for production REST API keys. * @param body (optional) * @return ApiResponse<TranslationList> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -749,23 +542,15 @@ public TranslationList translateSegment(Integer memoryId, String source, Integer 0 Unexpected error - */ - public ApiResponse translateSegmentWithHttpInfo(Integer memoryId, String source, Integer sourceHash, String prefix, Integer n, Boolean rich, Boolean tmMatches, Boolean projectTags, TranslateSegmentBody body) throws ApiException { - okhttp3.Call localVarCall = translateSegmentValidateBeforeCall(memoryId, source, sourceHash, prefix, n, rich, tmMatches, projectTags, body, null); + public ApiResponse translateSegmentPostWithHttpInfo(TranslateSegmentBody body) throws ApiException { + okhttp3.Call localVarCall = translateSegmentPostValidateBeforeCall(body, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Translate a segment (asynchronously) - * Translate a source string. Setting the `rich` parameter to `true` will change the response format to include additional information about each translation including a model score, word alignments, and formatting information. The rich format can be seen in the example response on this page. By default, this endpoint also returns translation memory (TM) fuzzy matches, along with associated scores. Fuzzy matches always appear ahead of machine translation output in the response. The `source` parameter may be supplied in the query or in the request body. The maximum source length is 5,000 characters. Usage charges apply to this endpoint for production REST API keys. - * @param memoryId A unique Memory identifier. (required) - * @param source The source text to be translated. (optional) - * @param sourceHash A source hash code. (optional) - * @param prefix A target prefix. (optional) - * @param n Return top n translations (deprecated). (optional, default to 1) - * @param rich Returns rich translation information (e.g., with word alignments). (optional, default to false) - * @param tmMatches Include translation memory fuzzy matches. (optional, default to true) - * @param projectTags Project tags. Projects tags in source to target if set to true. (optional, default to false) + * Translate a source string. Setting the `rich` parameter to `true` will change the response format to include additional information about each translation including a model score, word alignments, and formatting information. The rich format can be seen in the example response on this page. By default, this endpoint also returns translation memory (TM) fuzzy matches, along with associated scores. Fuzzy matches always appear ahead of machine translation output in the response. The maximum source length is 5,000 characters. Usage charges apply to this endpoint for production REST API keys. * @param body (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -777,9 +562,9 @@ public ApiResponse translateSegmentWithHttpInfo(Integer memoryI 0 Unexpected error - */ - public okhttp3.Call translateSegmentAsync(Integer memoryId, String source, Integer sourceHash, String prefix, Integer n, Boolean rich, Boolean tmMatches, Boolean projectTags, TranslateSegmentBody body, final ApiCallback _callback) throws ApiException { + public okhttp3.Call translateSegmentPostAsync(TranslateSegmentBody body, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = translateSegmentValidateBeforeCall(memoryId, source, sourceHash, prefix, n, rich, tmMatches, projectTags, body, _callback); + okhttp3.Call localVarCall = translateSegmentPostValidateBeforeCall(body, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/com/lilt/client/auth/ApiKeyAuth.java b/src/main/java/com/lilt/client/auth/ApiKeyAuth.java index 2faa4839f..d06741ad4 100644 --- a/src/main/java/com/lilt/client/auth/ApiKeyAuth.java +++ b/src/main/java/com/lilt/client/auth/ApiKeyAuth.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,7 +18,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/com/lilt/client/auth/Authentication.java b/src/main/java/com/lilt/client/auth/Authentication.java index 42606452b..3843a6524 100644 --- a/src/main/java/com/lilt/client/auth/Authentication.java +++ b/src/main/java/com/lilt/client/auth/Authentication.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/lilt/client/auth/HttpBasicAuth.java b/src/main/java/com/lilt/client/auth/HttpBasicAuth.java index 48b2ac54e..57126a477 100644 --- a/src/main/java/com/lilt/client/auth/HttpBasicAuth.java +++ b/src/main/java/com/lilt/client/auth/HttpBasicAuth.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/src/main/java/com/lilt/client/auth/HttpBearerAuth.java b/src/main/java/com/lilt/client/auth/HttpBearerAuth.java index 80ab1ac64..c9a40f388 100644 --- a/src/main/java/com/lilt/client/auth/HttpBearerAuth.java +++ b/src/main/java/com/lilt/client/auth/HttpBearerAuth.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -18,7 +18,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class HttpBearerAuth implements Authentication { private final String scheme; private String bearerToken; diff --git a/src/main/java/com/lilt/client/model/AddFileLabelRequest.java b/src/main/java/com/lilt/client/model/AddFileLabelRequest.java index 0785a1706..f0821da0a 100644 --- a/src/main/java/com/lilt/client/model/AddFileLabelRequest.java +++ b/src/main/java/com/lilt/client/model/AddFileLabelRequest.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ /** * AddFileLabelRequest */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class AddFileLabelRequest { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/lilt/client/model/CreateConverterConfigParameters.java b/src/main/java/com/lilt/client/model/CreateConverterConfigParameters.java index 124a6ff0a..e7c7054fd 100644 --- a/src/main/java/com/lilt/client/model/CreateConverterConfigParameters.java +++ b/src/main/java/com/lilt/client/model/CreateConverterConfigParameters.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,84 +27,32 @@ /** * CreateConverterConfigParameters */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class CreateConverterConfigParameters { - public static final String SERIALIZED_NAME_CONFIG_JSON = "configJson"; - @SerializedName(SERIALIZED_NAME_CONFIG_JSON) - private String configJson; + public static final String SERIALIZED_NAME_SIGNED_AGREEMENT = "signedAgreement"; + @SerializedName(SERIALIZED_NAME_SIGNED_AGREEMENT) + private Boolean signedAgreement; - public static final String SERIALIZED_NAME_CONFIG_NAME = "configName"; - @SerializedName(SERIALIZED_NAME_CONFIG_NAME) - private String configName; - public static final String SERIALIZED_NAME_CONFIG_DESCRIPTION = "configDescription"; - @SerializedName(SERIALIZED_NAME_CONFIG_DESCRIPTION) - private String configDescription; - - - public CreateConverterConfigParameters configJson(String configJson) { - - this.configJson = configJson; - return this; - } - - /** - * The configuration json blob, string escaped. - * @return configJson - **/ - @ApiModelProperty(example = "{\"registry\": {\".md\": {\"type\": \"OkapiFprm\", \"version\": 1, \"filterName\": \"okf_markdown\", \"filterConfig\": \"#v1\\nuseCodeFinder.b=false\\ntranslateUrls.b=true\\nurlToTranslatePattern=.+\\ntranslateCodeBlocks.b=false\\ntranslateInlineCodeBlocks.b=true\\ntranslateHeaderMetadata.b=true\\ntranslateImageAltText.b=true\\nuseLinkSubflow.b=true\\ncodeFinderRules.count.i=1\\ncodeFinderRules.rule0=\\\\{\\\\{[^}]+\\\\}\\\\}\\ncodeFinderRules.sample={{#test}} handle bar test {{/test}}$0a${{stand-alone handle bar}}$0a$\\ncodeFinderRules.useAllRulesWhenTesting.b=true\\n\", \"extractAllTags\": true, \"exportReplacements\": {\"patterns\": [], \"replacements\": []}, \"importReplacements\": {\"patterns\": [], \"replacements\": []}}}", required = true, value = "The configuration json blob, string escaped.") - - public String getConfigJson() { - return configJson; - } - - - public void setConfigJson(String configJson) { - this.configJson = configJson; - } - - - public CreateConverterConfigParameters configName(String configName) { - - this.configName = configName; - return this; - } - - /** - * The user defined name of your configuration. - * @return configName - **/ - @ApiModelProperty(example = "my_config", required = true, value = "The user defined name of your configuration.") - - public String getConfigName() { - return configName; - } - - - public void setConfigName(String configName) { - this.configName = configName; - } - - - public CreateConverterConfigParameters configDescription(String configDescription) { + public CreateConverterConfigParameters signedAgreement(Boolean signedAgreement) { - this.configDescription = configDescription; + this.signedAgreement = signedAgreement; return this; } /** - * A description for the configuration. - * @return configDescription + * Signifies that the Organization has signed the agreement or not. + * @return signedAgreement **/ - @ApiModelProperty(example = "config for custom markdown escaping", required = true, value = "A description for the configuration.") + @ApiModelProperty(required = true, value = "Signifies that the Organization has signed the agreement or not.") - public String getConfigDescription() { - return configDescription; + public Boolean getSignedAgreement() { + return signedAgreement; } - public void setConfigDescription(String configDescription) { - this.configDescription = configDescription; + public void setSignedAgreement(Boolean signedAgreement) { + this.signedAgreement = signedAgreement; } @@ -117,23 +65,19 @@ public boolean equals(Object o) { return false; } CreateConverterConfigParameters createConverterConfigParameters = (CreateConverterConfigParameters) o; - return Objects.equals(this.configJson, createConverterConfigParameters.configJson) && - Objects.equals(this.configName, createConverterConfigParameters.configName) && - Objects.equals(this.configDescription, createConverterConfigParameters.configDescription); + return Objects.equals(this.signedAgreement, createConverterConfigParameters.signedAgreement); } @Override public int hashCode() { - return Objects.hash(configJson, configName, configDescription); + return Objects.hash(signedAgreement); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateConverterConfigParameters {\n"); - sb.append(" configJson: ").append(toIndentedString(configJson)).append("\n"); - sb.append(" configName: ").append(toIndentedString(configName)).append("\n"); - sb.append(" configDescription: ").append(toIndentedString(configDescription)).append("\n"); + sb.append(" signedAgreement: ").append(toIndentedString(signedAgreement)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/lilt/client/model/DeleteSegmentFromMemoryResponse.java b/src/main/java/com/lilt/client/model/DeleteSegmentFromMemoryResponse.java new file mode 100644 index 000000000..56ddd9836 --- /dev/null +++ b/src/main/java/com/lilt/client/model/DeleteSegmentFromMemoryResponse.java @@ -0,0 +1,98 @@ +/* + * Lilt REST API + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * + * The version of the OpenAPI document: v3.0 + * Contact: support@lilt.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.lilt.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * DeleteSegmentFromMemoryResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") +public class DeleteSegmentFromMemoryResponse { + public static final String SERIALIZED_NAME_SUCCESS = "success"; + @SerializedName(SERIALIZED_NAME_SUCCESS) + private Boolean success; + + + public DeleteSegmentFromMemoryResponse success(Boolean success) { + + this.success = success; + return this; + } + + /** + * Get success + * @return success + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Boolean getSuccess() { + return success; + } + + + public void setSuccess(Boolean success) { + this.success = success; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DeleteSegmentFromMemoryResponse deleteSegmentFromMemoryResponse = (DeleteSegmentFromMemoryResponse) o; + return Objects.equals(this.success, deleteSegmentFromMemoryResponse.success); + } + + @Override + public int hashCode() { + return Objects.hash(success); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteSegmentFromMemoryResponse {\n"); + sb.append(" success: ").append(toIndentedString(success)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/lilt/client/model/DocumentWithSegments.java b/src/main/java/com/lilt/client/model/DocumentWithSegments.java index d700a7f43..dd9f93687 100644 --- a/src/main/java/com/lilt/client/model/DocumentWithSegments.java +++ b/src/main/java/com/lilt/client/model/DocumentWithSegments.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -32,7 +32,7 @@ * A Document is a collection of zero or more Segments. */ @ApiModel(description = "A Document is a collection of zero or more Segments. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class DocumentWithSegments { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -102,6 +102,10 @@ public class DocumentWithSegments { @SerializedName(SERIALIZED_NAME_UPDATED_AT) private Integer updatedAt; + public static final String SERIALIZED_NAME_IS_REVIEW_COMPLETE = "is_review_complete"; + @SerializedName(SERIALIZED_NAME_IS_REVIEW_COMPLETE) + private Boolean isReviewComplete; + public static final String SERIALIZED_NAME_SEGMENTS = "segments"; @SerializedName(SERIALIZED_NAME_SEGMENTS) private List segments = null; @@ -498,6 +502,29 @@ public void setUpdatedAt(Integer updatedAt) { } + public DocumentWithSegments isReviewComplete(Boolean isReviewComplete) { + + this.isReviewComplete = isReviewComplete; + return this; + } + + /** + * Document review status. + * @return isReviewComplete + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "Document review status.") + + public Boolean getIsReviewComplete() { + return isReviewComplete; + } + + + public void setIsReviewComplete(Boolean isReviewComplete) { + this.isReviewComplete = isReviewComplete; + } + + public DocumentWithSegments segments(List segments) { this.segments = segments; @@ -555,12 +582,13 @@ public boolean equals(Object o) { Objects.equals(this.reviewerEmail, documentWithSegments.reviewerEmail) && Objects.equals(this.createdAt, documentWithSegments.createdAt) && Objects.equals(this.updatedAt, documentWithSegments.updatedAt) && + Objects.equals(this.isReviewComplete, documentWithSegments.isReviewComplete) && Objects.equals(this.segments, documentWithSegments.segments); } @Override public int hashCode() { - return Objects.hash(id, projectId, srclang, trglang, name, importInProgress, importSucceeded, importErrorMessage, exportInProgress, exportSucceeded, exportErrorMessage, isPretranslating, status, translatorEmail, reviewerEmail, createdAt, updatedAt, segments); + return Objects.hash(id, projectId, srclang, trglang, name, importInProgress, importSucceeded, importErrorMessage, exportInProgress, exportSucceeded, exportErrorMessage, isPretranslating, status, translatorEmail, reviewerEmail, createdAt, updatedAt, isReviewComplete, segments); } @Override @@ -584,6 +612,7 @@ public String toString() { sb.append(" reviewerEmail: ").append(toIndentedString(reviewerEmail)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" isReviewComplete: ").append(toIndentedString(isReviewComplete)).append("\n"); sb.append(" segments: ").append(toIndentedString(segments)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/lilt/client/model/DocumentWithoutSegments.java b/src/main/java/com/lilt/client/model/DocumentWithoutSegments.java index 995821ec6..53edb0ea3 100644 --- a/src/main/java/com/lilt/client/model/DocumentWithoutSegments.java +++ b/src/main/java/com/lilt/client/model/DocumentWithoutSegments.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -29,7 +29,7 @@ * A Document is a collection of zero or more Segments. */ @ApiModel(description = "A Document is a collection of zero or more Segments. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class DocumentWithoutSegments { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -91,6 +91,10 @@ public class DocumentWithoutSegments { @SerializedName(SERIALIZED_NAME_REVIEWER_EMAIL) private String reviewerEmail; + public static final String SERIALIZED_NAME_CUSTOMER_REVIEWER_EMAIL = "customer_reviewer_email"; + @SerializedName(SERIALIZED_NAME_CUSTOMER_REVIEWER_EMAIL) + private String customerReviewerEmail; + public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) private Integer createdAt; @@ -99,6 +103,10 @@ public class DocumentWithoutSegments { @SerializedName(SERIALIZED_NAME_UPDATED_AT) private Integer updatedAt; + public static final String SERIALIZED_NAME_IS_REVIEW_COMPLETE = "is_review_complete"; + @SerializedName(SERIALIZED_NAME_IS_REVIEW_COMPLETE) + private Boolean isReviewComplete; + public DocumentWithoutSegments id(Integer id) { @@ -445,6 +453,29 @@ public void setReviewerEmail(String reviewerEmail) { } + public DocumentWithoutSegments customerReviewerEmail(String customerReviewerEmail) { + + this.customerReviewerEmail = customerReviewerEmail; + return this; + } + + /** + * The email of the assigned customer reviewer. Only present if the project was request by id. + * @return customerReviewerEmail + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "reviewer@example.com", value = "The email of the assigned customer reviewer. Only present if the project was request by id.") + + public String getCustomerReviewerEmail() { + return customerReviewerEmail; + } + + + public void setCustomerReviewerEmail(String customerReviewerEmail) { + this.customerReviewerEmail = customerReviewerEmail; + } + + public DocumentWithoutSegments createdAt(Integer createdAt) { this.createdAt = createdAt; @@ -491,6 +522,29 @@ public void setUpdatedAt(Integer updatedAt) { } + public DocumentWithoutSegments isReviewComplete(Boolean isReviewComplete) { + + this.isReviewComplete = isReviewComplete; + return this; + } + + /** + * Document review status. + * @return isReviewComplete + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "Document review status.") + + public Boolean getIsReviewComplete() { + return isReviewComplete; + } + + + public void setIsReviewComplete(Boolean isReviewComplete) { + this.isReviewComplete = isReviewComplete; + } + + @Override public boolean equals(Object o) { if (this == o) { @@ -515,13 +569,15 @@ public boolean equals(Object o) { Objects.equals(this.status, documentWithoutSegments.status) && Objects.equals(this.translatorEmail, documentWithoutSegments.translatorEmail) && Objects.equals(this.reviewerEmail, documentWithoutSegments.reviewerEmail) && + Objects.equals(this.customerReviewerEmail, documentWithoutSegments.customerReviewerEmail) && Objects.equals(this.createdAt, documentWithoutSegments.createdAt) && - Objects.equals(this.updatedAt, documentWithoutSegments.updatedAt); + Objects.equals(this.updatedAt, documentWithoutSegments.updatedAt) && + Objects.equals(this.isReviewComplete, documentWithoutSegments.isReviewComplete); } @Override public int hashCode() { - return Objects.hash(id, projectId, srclang, trglang, name, importInProgress, importSucceeded, importErrorMessage, exportInProgress, exportSucceeded, exportErrorMessage, isPretranslating, status, translatorEmail, reviewerEmail, createdAt, updatedAt); + return Objects.hash(id, projectId, srclang, trglang, name, importInProgress, importSucceeded, importErrorMessage, exportInProgress, exportSucceeded, exportErrorMessage, isPretranslating, status, translatorEmail, reviewerEmail, customerReviewerEmail, createdAt, updatedAt, isReviewComplete); } @Override @@ -543,8 +599,10 @@ public String toString() { sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" translatorEmail: ").append(toIndentedString(translatorEmail)).append("\n"); sb.append(" reviewerEmail: ").append(toIndentedString(reviewerEmail)).append("\n"); + sb.append(" customerReviewerEmail: ").append(toIndentedString(customerReviewerEmail)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" isReviewComplete: ").append(toIndentedString(isReviewComplete)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/lilt/client/model/DocumentWithoutSegmentsStatus.java b/src/main/java/com/lilt/client/model/DocumentWithoutSegmentsStatus.java index d029c05c7..e0c8d9b7d 100644 --- a/src/main/java/com/lilt/client/model/DocumentWithoutSegmentsStatus.java +++ b/src/main/java/com/lilt/client/model/DocumentWithoutSegmentsStatus.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,10 +28,10 @@ * A list of translations for the query term. */ @ApiModel(description = "A list of translations for the query term.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class DocumentWithoutSegmentsStatus { /** - * + * Gets or Sets pretranslation */ @JsonAdapter(PretranslationEnum.Adapter.class) public enum PretranslationEnum { @@ -91,7 +91,7 @@ public DocumentWithoutSegmentsStatus pretranslation(PretranslationEnum pretransl } /** - * + * Get pretranslation * @return pretranslation **/ @javax.annotation.Nullable diff --git a/src/main/java/com/lilt/client/model/Error.java b/src/main/java/com/lilt/client/model/Error.java index 0ad2230c4..66445a7d4 100644 --- a/src/main/java/com/lilt/client/model/Error.java +++ b/src/main/java/com/lilt/client/model/Error.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,7 +28,7 @@ * Response in the event of an unexpected error. */ @ApiModel(description = "Response in the event of an unexpected error. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class Error { public static final String SERIALIZED_NAME_MESSAGE = "message"; @SerializedName(SERIALIZED_NAME_MESSAGE) diff --git a/src/main/java/com/lilt/client/model/FileDeleteResponse.java b/src/main/java/com/lilt/client/model/FileDeleteResponse.java index aa9b1e105..f51327ee9 100644 --- a/src/main/java/com/lilt/client/model/FileDeleteResponse.java +++ b/src/main/java/com/lilt/client/model/FileDeleteResponse.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ /** * FileDeleteResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class FileDeleteResponse { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/InlineResponse200.java b/src/main/java/com/lilt/client/model/InlineResponse200.java index 1f07ed2e4..0e76cde80 100644 --- a/src/main/java/com/lilt/client/model/InlineResponse200.java +++ b/src/main/java/com/lilt/client/model/InlineResponse200.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,33 +27,33 @@ /** * InlineResponse200 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class InlineResponse200 { - public static final String SERIALIZED_NAME_CONFIG_ID = "configId"; - @SerializedName(SERIALIZED_NAME_CONFIG_ID) - private Integer configId; + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private Integer id; - public InlineResponse200 configId(Integer configId) { + public InlineResponse200 id(Integer id) { - this.configId = configId; + this.id = id; return this; } /** - * Get configId - * @return configId + * The ID of the deleted Lilt Create content. + * @return id **/ @javax.annotation.Nullable - @ApiModelProperty(value = "") + @ApiModelProperty(value = "The ID of the deleted Lilt Create content.") - public Integer getConfigId() { - return configId; + public Integer getId() { + return id; } - public void setConfigId(Integer configId) { - this.configId = configId; + public void setId(Integer id) { + this.id = id; } @@ -66,19 +66,19 @@ public boolean equals(Object o) { return false; } InlineResponse200 inlineResponse200 = (InlineResponse200) o; - return Objects.equals(this.configId, inlineResponse200.configId); + return Objects.equals(this.id, inlineResponse200.id); } @Override public int hashCode() { - return Objects.hash(configId); + return Objects.hash(id); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class InlineResponse200 {\n"); - sb.append(" configId: ").append(toIndentedString(configId)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/lilt/client/model/Job.java b/src/main/java/com/lilt/client/model/Job.java index 58d632499..0eb9f0353 100644 --- a/src/main/java/com/lilt/client/model/Job.java +++ b/src/main/java/com/lilt/client/model/Job.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -30,7 +30,7 @@ * A Job is a collection of multiple Projects. Each project is specific to a language pair, and is associated with exactly one Memory for that language pair. The Memory association cannot be changed after the Project is created. */ @ApiModel(description = "A Job is a collection of multiple Projects. Each project is specific to a language pair, and is associated with exactly one Memory for that language pair. The Memory association cannot be changed after the Project is created. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class Job { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/lilt/client/model/JobCreateParameters.java b/src/main/java/com/lilt/client/model/JobCreateParameters.java index 7ac2bf6d1..d037c3c6d 100644 --- a/src/main/java/com/lilt/client/model/JobCreateParameters.java +++ b/src/main/java/com/lilt/client/model/JobCreateParameters.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -30,16 +30,12 @@ /** * JobCreateParameters */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class JobCreateParameters { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; - public static final String SERIALIZED_NAME_DUE = "due"; - @SerializedName(SERIALIZED_NAME_DUE) - private String due; - public static final String SERIALIZED_NAME_LANGUAGE_PAIRS = "languagePairs"; @SerializedName(SERIALIZED_NAME_LANGUAGE_PAIRS) private List languagePairs = new ArrayList(); @@ -48,6 +44,30 @@ public class JobCreateParameters { @SerializedName(SERIALIZED_NAME_FILE_IDS) private List fileIds = new ArrayList(); + public static final String SERIALIZED_NAME_DUE = "due"; + @SerializedName(SERIALIZED_NAME_DUE) + private String due; + + 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_IS_PLURAL = "isPlural"; + @SerializedName(SERIALIZED_NAME_IS_PLURAL) + private Boolean isPlural; + + public static final String SERIALIZED_NAME_WORKFLOW_TEMPLATE_ID = "workflowTemplateId"; + @SerializedName(SERIALIZED_NAME_WORKFLOW_TEMPLATE_ID) + private Integer workflowTemplateId; + + public static final String SERIALIZED_NAME_WORKFLOW_TEMPLATE_NAME = "workflowTemplateName"; + @SerializedName(SERIALIZED_NAME_WORKFLOW_TEMPLATE_NAME) + private Integer workflowTemplateName; + public JobCreateParameters name(String name) { @@ -71,29 +91,6 @@ public void setName(String name) { } - public JobCreateParameters due(String due) { - - this.due = due; - return this; - } - - /** - * An ISO string date. - * @return due - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "2021-10-05T14:48:00.000Z", value = "An ISO string date.") - - public String getDue() { - return due; - } - - - public void setDue(String due) { - this.due = due; - } - - public JobCreateParameters languagePairs(List languagePairs) { this.languagePairs = languagePairs; @@ -136,7 +133,7 @@ public JobCreateParameters addFileIdsItem(Integer fileIdsItem) { * A list of file ids to upload to job creation. * @return fileIds **/ - @ApiModelProperty(example = "[298, 299]", required = true, value = "A list of file ids to upload to job creation.") + @ApiModelProperty(example = "[298,299]", required = true, value = "A list of file ids to upload to job creation.") public List getFileIds() { return fileIds; @@ -148,6 +145,142 @@ public void setFileIds(List fileIds) { } + public JobCreateParameters due(String due) { + + this.due = due; + return this; + } + + /** + * An ISO string date representing job due date. + * @return due + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2021-10-05T14:48:00.000Z", value = "An ISO string date representing job due date.") + + public String getDue() { + return due; + } + + + public void setDue(String due) { + this.due = due; + } + + + public JobCreateParameters srcLang(String srcLang) { + + this.srcLang = srcLang; + return this; + } + + /** + * 2-letter ISO source language code + * @return srcLang + **/ + @ApiModelProperty(example = "en", required = true, value = "2-letter ISO source language code") + + public String getSrcLang() { + return srcLang; + } + + + public void setSrcLang(String srcLang) { + this.srcLang = srcLang; + } + + + public JobCreateParameters srcLocale(String srcLocale) { + + this.srcLocale = srcLocale; + return this; + } + + /** + * 2-letter source language code + * @return srcLocale + **/ + @ApiModelProperty(example = "US", required = true, value = "2-letter source language code") + + public String getSrcLocale() { + return srcLocale; + } + + + public void setSrcLocale(String srcLocale) { + this.srcLocale = srcLocale; + } + + + public JobCreateParameters isPlural(Boolean isPlural) { + + this.isPlural = isPlural; + return this; + } + + /** + * A boolean value representing if the files have plurals. + * @return isPlural + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "A boolean value representing if the files have plurals.") + + public Boolean getIsPlural() { + return isPlural; + } + + + public void setIsPlural(Boolean isPlural) { + this.isPlural = isPlural; + } + + + public JobCreateParameters workflowTemplateId(Integer workflowTemplateId) { + + this.workflowTemplateId = workflowTemplateId; + return this; + } + + /** + * Identifier of the workflow template to be used when creating a job. If not passed the organization default will be used. + * @return workflowTemplateId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "123", value = "Identifier of the workflow template to be used when creating a job. If not passed the organization default will be used.") + + public Integer getWorkflowTemplateId() { + return workflowTemplateId; + } + + + public void setWorkflowTemplateId(Integer workflowTemplateId) { + this.workflowTemplateId = workflowTemplateId; + } + + + public JobCreateParameters workflowTemplateName(Integer workflowTemplateName) { + + this.workflowTemplateName = workflowTemplateName; + return this; + } + + /** + * Name of the workflow template to be used, must be passed with teamId or look up will fail. If workflowTemplateId is passed it supercedes any other look up. + * @return workflowTemplateName + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Name of the workflow template to be used, must be passed with teamId or look up will fail. If workflowTemplateId is passed it supercedes any other look up.") + + public Integer getWorkflowTemplateName() { + return workflowTemplateName; + } + + + public void setWorkflowTemplateName(Integer workflowTemplateName) { + this.workflowTemplateName = workflowTemplateName; + } + + @Override public boolean equals(Object o) { if (this == o) { @@ -158,14 +291,19 @@ public boolean equals(Object o) { } JobCreateParameters jobCreateParameters = (JobCreateParameters) o; return Objects.equals(this.name, jobCreateParameters.name) && - Objects.equals(this.due, jobCreateParameters.due) && Objects.equals(this.languagePairs, jobCreateParameters.languagePairs) && - Objects.equals(this.fileIds, jobCreateParameters.fileIds); + Objects.equals(this.fileIds, jobCreateParameters.fileIds) && + Objects.equals(this.due, jobCreateParameters.due) && + Objects.equals(this.srcLang, jobCreateParameters.srcLang) && + Objects.equals(this.srcLocale, jobCreateParameters.srcLocale) && + Objects.equals(this.isPlural, jobCreateParameters.isPlural) && + Objects.equals(this.workflowTemplateId, jobCreateParameters.workflowTemplateId) && + Objects.equals(this.workflowTemplateName, jobCreateParameters.workflowTemplateName); } @Override public int hashCode() { - return Objects.hash(name, due, languagePairs, fileIds); + return Objects.hash(name, languagePairs, fileIds, due, srcLang, srcLocale, isPlural, workflowTemplateId, workflowTemplateName); } @Override @@ -173,9 +311,14 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class JobCreateParameters {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" due: ").append(toIndentedString(due)).append("\n"); sb.append(" languagePairs: ").append(toIndentedString(languagePairs)).append("\n"); sb.append(" fileIds: ").append(toIndentedString(fileIds)).append("\n"); + sb.append(" due: ").append(toIndentedString(due)).append("\n"); + sb.append(" srcLang: ").append(toIndentedString(srcLang)).append("\n"); + sb.append(" srcLocale: ").append(toIndentedString(srcLocale)).append("\n"); + sb.append(" isPlural: ").append(toIndentedString(isPlural)).append("\n"); + sb.append(" workflowTemplateId: ").append(toIndentedString(workflowTemplateId)).append("\n"); + sb.append(" workflowTemplateName: ").append(toIndentedString(workflowTemplateName)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/lilt/client/model/JobDeleteResponse.java b/src/main/java/com/lilt/client/model/JobDeleteResponse.java index afc2cfe10..22ef32343 100644 --- a/src/main/java/com/lilt/client/model/JobDeleteResponse.java +++ b/src/main/java/com/lilt/client/model/JobDeleteResponse.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ /** * JobDeleteResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class JobDeleteResponse { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/JobLeverageStats.java b/src/main/java/com/lilt/client/model/JobLeverageStats.java index b28c64023..2f6c6581c 100644 --- a/src/main/java/com/lilt/client/model/JobLeverageStats.java +++ b/src/main/java/com/lilt/client/model/JobLeverageStats.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -20,7 +20,7 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.lilt.client.model.JobLeverageStatsProjects; +import com.lilt.client.model.ProjectStats; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; @@ -31,7 +31,7 @@ * A job leverage stats object shows an overview of job's statistical data including total number of exact words, fuzzy words, and exact words for the job in total and for each project. */ @ApiModel(description = "A job leverage stats object shows an overview of job's statistical data including total number of exact words, fuzzy words, and exact words for the job in total and for each project. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class JobLeverageStats { public static final String SERIALIZED_NAME_SOURCE_WORDS = "sourceWords"; @SerializedName(SERIALIZED_NAME_SOURCE_WORDS) @@ -51,7 +51,7 @@ public class JobLeverageStats { public static final String SERIALIZED_NAME_PROJECTS = "projects"; @SerializedName(SERIALIZED_NAME_PROJECTS) - private List projects = null; + private List projects = null; public JobLeverageStats sourceWords(Integer sourceWords) { @@ -146,15 +146,15 @@ public void setNewWords(Integer newWords) { } - public JobLeverageStats projects(List projects) { + public JobLeverageStats projects(List projects) { this.projects = projects; return this; } - public JobLeverageStats addProjectsItem(JobLeverageStatsProjects projectsItem) { + public JobLeverageStats addProjectsItem(ProjectStats projectsItem) { if (this.projects == null) { - this.projects = new ArrayList(); + this.projects = new ArrayList(); } this.projects.add(projectsItem); return this; @@ -167,12 +167,12 @@ public JobLeverageStats addProjectsItem(JobLeverageStatsProjects projectsItem) { @javax.annotation.Nullable @ApiModelProperty(value = "") - public List getProjects() { + public List getProjects() { return projects; } - public void setProjects(List projects) { + public void setProjects(List projects) { this.projects = projects; } diff --git a/src/main/java/com/lilt/client/model/JobProject.java b/src/main/java/com/lilt/client/model/JobProject.java index 8a51f0caa..56138a1a0 100644 --- a/src/main/java/com/lilt/client/model/JobProject.java +++ b/src/main/java/com/lilt/client/model/JobProject.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -25,10 +25,10 @@ import java.io.IOException; /** - * A job project contains project statistcal data that belongs to a specific job. + * A job project contains project statistical data that belongs to a specific job. */ -@ApiModel(description = "A job project contains project statistcal data that belongs to a specific job. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@ApiModel(description = "A job project contains project statistical data that belongs to a specific job. ") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class JobProject { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -90,6 +90,63 @@ public class JobProject { @SerializedName(SERIALIZED_NAME_MEMORY_ID) private Integer memoryId; + /** + * The status of the Workflow for the current project. + */ + @JsonAdapter(WorkflowStatusEnum.Adapter.class) + public enum WorkflowStatusEnum { + READY_TO_START("READY_TO_START"), + + IN_PROGRESS("IN_PROGRESS"), + + DONE("DONE"); + + private String value; + + WorkflowStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static WorkflowStatusEnum fromValue(String value) { + for (WorkflowStatusEnum b : WorkflowStatusEnum.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 WorkflowStatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public WorkflowStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return WorkflowStatusEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_WORKFLOW_STATUS = "workflowStatus"; + @SerializedName(SERIALIZED_NAME_WORKFLOW_STATUS) + private WorkflowStatusEnum workflowStatus; + + public static final String SERIALIZED_NAME_WORKFLOW_NAME = "workflowName"; + @SerializedName(SERIALIZED_NAME_WORKFLOW_NAME) + private String workflowName; + public JobProject id(Integer id) { @@ -121,11 +178,11 @@ public JobProject srcLang(String srcLang) { } /** - * Source langauge, an ISO 639-1 language identifier. + * Source language, an ISO 639-1 language identifier. * @return srcLang **/ @javax.annotation.Nullable - @ApiModelProperty(example = "en", value = "Source langauge, an ISO 639-1 language identifier.") + @ApiModelProperty(example = "en", value = "Source language, an ISO 639-1 language identifier.") public String getSrcLang() { return srcLang; @@ -144,11 +201,11 @@ public JobProject srcLocale(String srcLocale) { } /** - * A locale identifier, supported for source langauge. + * A locale identifier, supported for source language. * @return srcLocale **/ @javax.annotation.Nullable - @ApiModelProperty(example = "US", value = "A locale identifier, supported for source langauge.") + @ApiModelProperty(example = "US", value = "A locale identifier, supported for source language.") public String getSrcLocale() { return srcLocale; @@ -167,11 +224,11 @@ public JobProject trgLang(String trgLang) { } /** - * Target langauge, an ISO 639-1 language identifier. + * Target language, an ISO 639-1 language identifier. * @return trgLang **/ @javax.annotation.Nullable - @ApiModelProperty(example = "fr", value = "Target langauge, an ISO 639-1 language identifier.") + @ApiModelProperty(example = "fr", value = "Target language, an ISO 639-1 language identifier.") public String getTrgLang() { return trgLang; @@ -190,11 +247,11 @@ public JobProject trgLocale(String trgLocale) { } /** - * A locale identifier, supported for target langauge. + * A locale identifier, supported for target language. * @return trgLocale **/ @javax.annotation.Nullable - @ApiModelProperty(example = "CA", value = "A locale identifier, supported for target langauge.") + @ApiModelProperty(example = "CA", value = "A locale identifier, supported for target language.") public String getTrgLocale() { return trgLocale; @@ -436,6 +493,52 @@ public void setMemoryId(Integer memoryId) { } + public JobProject workflowStatus(WorkflowStatusEnum workflowStatus) { + + this.workflowStatus = workflowStatus; + return this; + } + + /** + * The status of the Workflow for the current project. + * @return workflowStatus + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "READY_TO_START", value = "The status of the Workflow for the current project.") + + public WorkflowStatusEnum getWorkflowStatus() { + return workflowStatus; + } + + + public void setWorkflowStatus(WorkflowStatusEnum workflowStatus) { + this.workflowStatus = workflowStatus; + } + + + public JobProject workflowName(String workflowName) { + + this.workflowName = workflowName; + return this; + } + + /** + * Human readable name of the workflow associated with the current project. + * @return workflowName + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "Translate > Review > Analyst Review", value = "Human readable name of the workflow associated with the current project.") + + public String getWorkflowName() { + return workflowName; + } + + + public void setWorkflowName(String workflowName) { + this.workflowName = workflowName; + } + + @Override public boolean equals(Object o) { if (this == o) { @@ -459,12 +562,14 @@ public boolean equals(Object o) { Objects.equals(this.createdAt, jobProject.createdAt) && Objects.equals(this.updatedAt, jobProject.updatedAt) && Objects.equals(this.isDeleted, jobProject.isDeleted) && - Objects.equals(this.memoryId, jobProject.memoryId); + Objects.equals(this.memoryId, jobProject.memoryId) && + Objects.equals(this.workflowStatus, jobProject.workflowStatus) && + Objects.equals(this.workflowName, jobProject.workflowName); } @Override public int hashCode() { - return Objects.hash(id, srcLang, srcLocale, trgLang, trgLocale, name, due, isComplete, isArchived, state, numSourceTokens, createdAt, updatedAt, isDeleted, memoryId); + return Objects.hash(id, srcLang, srcLocale, trgLang, trgLocale, name, due, isComplete, isArchived, state, numSourceTokens, createdAt, updatedAt, isDeleted, memoryId, workflowStatus, workflowName); } @Override @@ -486,6 +591,8 @@ public String toString() { sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); sb.append(" memoryId: ").append(toIndentedString(memoryId)).append("\n"); + sb.append(" workflowStatus: ").append(toIndentedString(workflowStatus)).append("\n"); + sb.append(" workflowName: ").append(toIndentedString(workflowName)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/lilt/client/model/JobStats.java b/src/main/java/com/lilt/client/model/JobStats.java index 36c97853d..d7f46c5ff 100644 --- a/src/main/java/com/lilt/client/model/JobStats.java +++ b/src/main/java/com/lilt/client/model/JobStats.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -31,7 +31,7 @@ * A job stats shows an overview of job's statistical data including total number of exact words, fuzzy words, language pairs, projects, etc. */ @ApiModel(description = "A job stats shows an overview of job's statistical data including total number of exact words, fuzzy words, language pairs, projects, etc. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class JobStats { public static final String SERIALIZED_NAME_EXACT_WORDS = "exactWords"; @SerializedName(SERIALIZED_NAME_EXACT_WORDS) @@ -81,6 +81,59 @@ public class JobStats { @SerializedName(SERIALIZED_NAME_UNIQUE_LINGUISTS) private Integer uniqueLinguists; + /** + * The status of the Workflow for the current job. + */ + @JsonAdapter(WorkflowStatusEnum.Adapter.class) + public enum WorkflowStatusEnum { + READY_TO_START("READY_TO_START"), + + IN_PROGRESS("IN_PROGRESS"), + + DONE("DONE"); + + private String value; + + WorkflowStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static WorkflowStatusEnum fromValue(String value) { + for (WorkflowStatusEnum b : WorkflowStatusEnum.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 WorkflowStatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public WorkflowStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return WorkflowStatusEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_WORKFLOW_STATUS = "workflowStatus"; + @SerializedName(SERIALIZED_NAME_WORKFLOW_STATUS) + private WorkflowStatusEnum workflowStatus; + public JobStats exactWords(Integer exactWords) { @@ -250,11 +303,11 @@ public JobStats percentTranslated(Integer percentTranslated) { } /** - * Get percentTranslated + * Overall percentage of documents translated. * @return percentTranslated **/ @javax.annotation.Nullable - @ApiModelProperty(example = "0", value = "") + @ApiModelProperty(example = "0", value = "Overall percentage of documents translated.") public Integer getPercentTranslated() { return percentTranslated; @@ -366,6 +419,29 @@ public void setUniqueLinguists(Integer uniqueLinguists) { } + public JobStats workflowStatus(WorkflowStatusEnum workflowStatus) { + + this.workflowStatus = workflowStatus; + return this; + } + + /** + * The status of the Workflow for the current job. + * @return workflowStatus + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "READY_TO_START", value = "The status of the Workflow for the current job.") + + public WorkflowStatusEnum getWorkflowStatus() { + return workflowStatus; + } + + + public void setWorkflowStatus(WorkflowStatusEnum workflowStatus) { + this.workflowStatus = workflowStatus; + } + + @Override public boolean equals(Object o) { if (this == o) { @@ -386,12 +462,13 @@ public boolean equals(Object o) { Objects.equals(this.projects, jobStats.projects) && Objects.equals(this.sourceWords, jobStats.sourceWords) && Objects.equals(this.uniqueLanguagePairs, jobStats.uniqueLanguagePairs) && - Objects.equals(this.uniqueLinguists, jobStats.uniqueLinguists); + Objects.equals(this.uniqueLinguists, jobStats.uniqueLinguists) && + Objects.equals(this.workflowStatus, jobStats.workflowStatus); } @Override public int hashCode() { - return Objects.hash(exactWords, fuzzyWords, newWords, numDeliveredProjects, numLanguagePairs, numProjects, percentReviewed, percentTranslated, projects, sourceWords, uniqueLanguagePairs, uniqueLinguists); + return Objects.hash(exactWords, fuzzyWords, newWords, numDeliveredProjects, numLanguagePairs, numProjects, percentReviewed, percentTranslated, projects, sourceWords, uniqueLanguagePairs, uniqueLinguists, workflowStatus); } @Override @@ -410,6 +487,7 @@ public String toString() { sb.append(" sourceWords: ").append(toIndentedString(sourceWords)).append("\n"); sb.append(" uniqueLanguagePairs: ").append(toIndentedString(uniqueLanguagePairs)).append("\n"); sb.append(" uniqueLinguists: ").append(toIndentedString(uniqueLinguists)).append("\n"); + sb.append(" workflowStatus: ").append(toIndentedString(workflowStatus)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/lilt/client/model/JobUpdateParameters.java b/src/main/java/com/lilt/client/model/JobUpdateParameters.java index 68d661167..352defd95 100644 --- a/src/main/java/com/lilt/client/model/JobUpdateParameters.java +++ b/src/main/java/com/lilt/client/model/JobUpdateParameters.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ /** * JobUpdateParameters */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class JobUpdateParameters { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -37,6 +37,63 @@ public class JobUpdateParameters { @SerializedName(SERIALIZED_NAME_DUE_DATE) private Integer dueDate; + /** + * The processing status of the job. Provide one of the following integers to indicate the status. Ok = 0 Started = 1 ExportError = -2 + */ + @JsonAdapter(IsProcessingEnum.Adapter.class) + public enum IsProcessingEnum { + _0("0"), + + _1("1"), + + _2("-2"); + + private String value; + + IsProcessingEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static IsProcessingEnum fromValue(String value) { + for (IsProcessingEnum b : IsProcessingEnum.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 IsProcessingEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public IsProcessingEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return IsProcessingEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_IS_PROCESSING = "isProcessing"; + @SerializedName(SERIALIZED_NAME_IS_PROCESSING) + private IsProcessingEnum isProcessing; + + public static final String SERIALIZED_NAME_PROCESSING_ERROR_MSG = "processingErrorMsg"; + @SerializedName(SERIALIZED_NAME_PROCESSING_ERROR_MSG) + private String processingErrorMsg; + public JobUpdateParameters name(String name) { @@ -84,6 +141,52 @@ public void setDueDate(Integer dueDate) { } + public JobUpdateParameters isProcessing(IsProcessingEnum isProcessing) { + + this.isProcessing = isProcessing; + return this; + } + + /** + * The processing status of the job. Provide one of the following integers to indicate the status. Ok = 0 Started = 1 ExportError = -2 + * @return isProcessing + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "ExportError", value = "The processing status of the job. Provide one of the following integers to indicate the status. Ok = 0 Started = 1 ExportError = -2 ") + + public IsProcessingEnum getIsProcessing() { + return isProcessing; + } + + + public void setIsProcessing(IsProcessingEnum isProcessing) { + this.isProcessing = isProcessing; + } + + + public JobUpdateParameters processingErrorMsg(String processingErrorMsg) { + + this.processingErrorMsg = processingErrorMsg; + return this; + } + + /** + * The processing error message. + * @return processingErrorMsg + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "Authentication failed. Check your Contentful API Key.", value = "The processing error message.") + + public String getProcessingErrorMsg() { + return processingErrorMsg; + } + + + public void setProcessingErrorMsg(String processingErrorMsg) { + this.processingErrorMsg = processingErrorMsg; + } + + @Override public boolean equals(Object o) { if (this == o) { @@ -94,12 +197,14 @@ public boolean equals(Object o) { } JobUpdateParameters jobUpdateParameters = (JobUpdateParameters) o; return Objects.equals(this.name, jobUpdateParameters.name) && - Objects.equals(this.dueDate, jobUpdateParameters.dueDate); + Objects.equals(this.dueDate, jobUpdateParameters.dueDate) && + Objects.equals(this.isProcessing, jobUpdateParameters.isProcessing) && + Objects.equals(this.processingErrorMsg, jobUpdateParameters.processingErrorMsg); } @Override public int hashCode() { - return Objects.hash(name, dueDate); + return Objects.hash(name, dueDate, isProcessing, processingErrorMsg); } @Override @@ -108,6 +213,8 @@ public String toString() { sb.append("class JobUpdateParameters {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" dueDate: ").append(toIndentedString(dueDate)).append("\n"); + sb.append(" isProcessing: ").append(toIndentedString(isProcessing)).append("\n"); + sb.append(" processingErrorMsg: ").append(toIndentedString(processingErrorMsg)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/lilt/client/model/LanguagePair.java b/src/main/java/com/lilt/client/model/LanguagePair.java index 7164c0d4e..1a798e6b1 100644 --- a/src/main/java/com/lilt/client/model/LanguagePair.java +++ b/src/main/java/com/lilt/client/model/LanguagePair.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -20,15 +20,18 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import com.lilt.client.model.WorkflowStageAssignment; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; /** * A language pair couples the source and target language along with memory and pre-translations settings associated to a project. */ @ApiModel(description = "A language pair couples the source and target language along with memory and pre-translations settings associated to a project. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class LanguagePair { public static final String SERIALIZED_NAME_SRC_LANG = "srcLang"; @SerializedName(SERIALIZED_NAME_SRC_LANG) @@ -54,6 +57,10 @@ public class LanguagePair { @SerializedName(SERIALIZED_NAME_MEMORY_ID) private Integer memoryId; + public static final String SERIALIZED_NAME_EXTERNAL_MODEL_ID = "externalModelId"; + @SerializedName(SERIALIZED_NAME_EXTERNAL_MODEL_ID) + private Integer externalModelId; + public static final String SERIALIZED_NAME_PRETRANSLATE = "pretranslate"; @SerializedName(SERIALIZED_NAME_PRETRANSLATE) private Boolean pretranslate; @@ -74,6 +81,18 @@ public class LanguagePair { @SerializedName(SERIALIZED_NAME_CONFIG_ID) private Integer configId; + public static final String SERIALIZED_NAME_WORKFLOW_TEMPLATE_ID = "workflowTemplateId"; + @SerializedName(SERIALIZED_NAME_WORKFLOW_TEMPLATE_ID) + private Integer workflowTemplateId; + + public static final String SERIALIZED_NAME_WORKFLOW_TEMPLATE_NAME = "workflowTemplateName"; + @SerializedName(SERIALIZED_NAME_WORKFLOW_TEMPLATE_NAME) + private Integer workflowTemplateName; + + public static final String SERIALIZED_NAME_WORKFLOW_STAGE_ASSIGNMENTS = "workflowStageAssignments"; + @SerializedName(SERIALIZED_NAME_WORKFLOW_STAGE_ASSIGNMENTS) + private List workflowStageAssignments = null; + public LanguagePair srcLang(String srcLang) { @@ -82,11 +101,11 @@ public LanguagePair srcLang(String srcLang) { } /** - * Source langauge, an ISO 639-1 language identifier. + * Source language, an ISO 639-1 language identifier. * @return srcLang **/ @javax.annotation.Nullable - @ApiModelProperty(example = "en", value = "Source langauge, an ISO 639-1 language identifier.") + @ApiModelProperty(example = "en", value = "Source language, an ISO 639-1 language identifier.") public String getSrcLang() { return srcLang; @@ -105,11 +124,11 @@ public LanguagePair srcLocale(String srcLocale) { } /** - * A locale identifier, supported for source langauge. + * A locale identifier, supported for source language. * @return srcLocale **/ @javax.annotation.Nullable - @ApiModelProperty(example = "US", value = "A locale identifier, supported for source langauge.") + @ApiModelProperty(example = "US", value = "A locale identifier, supported for source language.") public String getSrcLocale() { return srcLocale; @@ -128,10 +147,10 @@ public LanguagePair trgLang(String trgLang) { } /** - * Target langauge, an ISO 639-1 language identifier. + * Target language, an ISO 639-1 language identifier. * @return trgLang **/ - @ApiModelProperty(example = "de", required = true, value = "Target langauge, an ISO 639-1 language identifier.") + @ApiModelProperty(example = "de", required = true, value = "Target language, an ISO 639-1 language identifier.") public String getTrgLang() { return trgLang; @@ -211,6 +230,29 @@ public void setMemoryId(Integer memoryId) { } + public LanguagePair externalModelId(Integer externalModelId) { + + this.externalModelId = externalModelId; + return this; + } + + /** + * A unique identifier for working with a third party model in the Lilt Platform + * @return externalModelId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "44", value = "A unique identifier for working with a third party model in the Lilt Platform") + + public Integer getExternalModelId() { + return externalModelId; + } + + + public void setExternalModelId(Integer externalModelId) { + this.externalModelId = externalModelId; + } + + public LanguagePair pretranslate(Boolean pretranslate) { this.pretranslate = pretranslate; @@ -326,6 +368,83 @@ public void setConfigId(Integer configId) { } + public LanguagePair workflowTemplateId(Integer workflowTemplateId) { + + this.workflowTemplateId = workflowTemplateId; + return this; + } + + /** + * Workflow Template id, to assign a specific Workflow to the project created out of this Language Pair. WorkflowTemplateIds can be retrieved via the /workflows/templates endpoint. If not specified then the Job level workflowTemplateId will be used. + * @return workflowTemplateId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "14", value = "Workflow Template id, to assign a specific Workflow to the project created out of this Language Pair. WorkflowTemplateIds can be retrieved via the /workflows/templates endpoint. If not specified then the Job level workflowTemplateId will be used.") + + public Integer getWorkflowTemplateId() { + return workflowTemplateId; + } + + + public void setWorkflowTemplateId(Integer workflowTemplateId) { + this.workflowTemplateId = workflowTemplateId; + } + + + public LanguagePair workflowTemplateName(Integer workflowTemplateName) { + + this.workflowTemplateName = workflowTemplateName; + return this; + } + + /** + * Workflow Template Name, when passed with TeamId it allows for an on the fly look up of the correct WorkflowTemplate to use. If workflowTemplateId is passed the workflowTemplateId supercedes other lookups. + * @return workflowTemplateName + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Workflow Template Name, when passed with TeamId it allows for an on the fly look up of the correct WorkflowTemplate to use. If workflowTemplateId is passed the workflowTemplateId supercedes other lookups.") + + public Integer getWorkflowTemplateName() { + return workflowTemplateName; + } + + + public void setWorkflowTemplateName(Integer workflowTemplateName) { + this.workflowTemplateName = workflowTemplateName; + } + + + public LanguagePair workflowStageAssignments(List workflowStageAssignments) { + + this.workflowStageAssignments = workflowStageAssignments; + return this; + } + + public LanguagePair addWorkflowStageAssignmentsItem(WorkflowStageAssignment workflowStageAssignmentsItem) { + if (this.workflowStageAssignments == null) { + this.workflowStageAssignments = new ArrayList(); + } + this.workflowStageAssignments.add(workflowStageAssignmentsItem); + return this; + } + + /** + * Get workflowStageAssignments + * @return workflowStageAssignments + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public List getWorkflowStageAssignments() { + return workflowStageAssignments; + } + + + public void setWorkflowStageAssignments(List workflowStageAssignments) { + this.workflowStageAssignments = workflowStageAssignments; + } + + @Override public boolean equals(Object o) { if (this == o) { @@ -341,16 +460,20 @@ public boolean equals(Object o) { Objects.equals(this.trgLocale, languagePair.trgLocale) && Objects.equals(this.dueDate, languagePair.dueDate) && Objects.equals(this.memoryId, languagePair.memoryId) && + Objects.equals(this.externalModelId, languagePair.externalModelId) && Objects.equals(this.pretranslate, languagePair.pretranslate) && Objects.equals(this.autoAccept, languagePair.autoAccept) && Objects.equals(this.caseSensitive, languagePair.caseSensitive) && Objects.equals(this.takeMatchAttribution, languagePair.takeMatchAttribution) && - Objects.equals(this.configId, languagePair.configId); + Objects.equals(this.configId, languagePair.configId) && + Objects.equals(this.workflowTemplateId, languagePair.workflowTemplateId) && + Objects.equals(this.workflowTemplateName, languagePair.workflowTemplateName) && + Objects.equals(this.workflowStageAssignments, languagePair.workflowStageAssignments); } @Override public int hashCode() { - return Objects.hash(srcLang, srcLocale, trgLang, trgLocale, dueDate, memoryId, pretranslate, autoAccept, caseSensitive, takeMatchAttribution, configId); + return Objects.hash(srcLang, srcLocale, trgLang, trgLocale, dueDate, memoryId, externalModelId, pretranslate, autoAccept, caseSensitive, takeMatchAttribution, configId, workflowTemplateId, workflowTemplateName, workflowStageAssignments); } @Override @@ -363,11 +486,15 @@ public String toString() { sb.append(" trgLocale: ").append(toIndentedString(trgLocale)).append("\n"); sb.append(" dueDate: ").append(toIndentedString(dueDate)).append("\n"); sb.append(" memoryId: ").append(toIndentedString(memoryId)).append("\n"); + sb.append(" externalModelId: ").append(toIndentedString(externalModelId)).append("\n"); sb.append(" pretranslate: ").append(toIndentedString(pretranslate)).append("\n"); sb.append(" autoAccept: ").append(toIndentedString(autoAccept)).append("\n"); sb.append(" caseSensitive: ").append(toIndentedString(caseSensitive)).append("\n"); sb.append(" takeMatchAttribution: ").append(toIndentedString(takeMatchAttribution)).append("\n"); sb.append(" configId: ").append(toIndentedString(configId)).append("\n"); + sb.append(" workflowTemplateId: ").append(toIndentedString(workflowTemplateId)).append("\n"); + sb.append(" workflowTemplateName: ").append(toIndentedString(workflowTemplateName)).append("\n"); + sb.append(" workflowStageAssignments: ").append(toIndentedString(workflowStageAssignments)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/lilt/client/model/LanguagesResponse.java b/src/main/java/com/lilt/client/model/LanguagesResponse.java index 69dfa5fe4..6ab7a9c4b 100644 --- a/src/main/java/com/lilt/client/model/LanguagesResponse.java +++ b/src/main/java/com/lilt/client/model/LanguagesResponse.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ /** * LanguagesResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class LanguagesResponse { public static final String SERIALIZED_NAME_SOURCE_TO_TARGET = "source_to_target"; @SerializedName(SERIALIZED_NAME_SOURCE_TO_TARGET) diff --git a/src/main/java/com/lilt/client/model/LiltCreateContent.java b/src/main/java/com/lilt/client/model/LiltCreateContent.java new file mode 100644 index 000000000..2c63a2001 --- /dev/null +++ b/src/main/java/com/lilt/client/model/LiltCreateContent.java @@ -0,0 +1,254 @@ +/* + * Lilt REST API + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * + * The version of the OpenAPI document: v3.0 + * Contact: support@lilt.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.lilt.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * Content Parameters for LiltCreate. + */ +@ApiModel(description = "Content Parameters for LiltCreate. ") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") +public class LiltCreateContent { + public static final String SERIALIZED_NAME_TONE = "tone"; + @SerializedName(SERIALIZED_NAME_TONE) + private String tone; + + public static final String SERIALIZED_NAME_TERMS = "terms"; + @SerializedName(SERIALIZED_NAME_TERMS) + private String terms; + + public static final String SERIALIZED_NAME_SUMMARY = "summary"; + @SerializedName(SERIALIZED_NAME_SUMMARY) + private String summary; + + public static final String SERIALIZED_NAME_LANGUAGE = "language"; + @SerializedName(SERIALIZED_NAME_LANGUAGE) + private String language; + + public static final String SERIALIZED_NAME_MEMORY_ID = "memoryId"; + @SerializedName(SERIALIZED_NAME_MEMORY_ID) + private String memoryId; + + public static final String SERIALIZED_NAME_SECTIONS = "sections"; + @SerializedName(SERIALIZED_NAME_SECTIONS) + private List sections = null; + + + public LiltCreateContent tone(String tone) { + + this.tone = tone; + return this; + } + + /** + * The tone of the content. + * @return tone + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The tone of the content.") + + public String getTone() { + return tone; + } + + + public void setTone(String tone) { + this.tone = tone; + } + + + public LiltCreateContent terms(String terms) { + + this.terms = terms; + return this; + } + + /** + * The terms of the content. + * @return terms + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The terms of the content.") + + public String getTerms() { + return terms; + } + + + public void setTerms(String terms) { + this.terms = terms; + } + + + public LiltCreateContent summary(String summary) { + + this.summary = summary; + return this; + } + + /** + * The summary of the content. + * @return summary + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The summary of the content.") + + public String getSummary() { + return summary; + } + + + public void setSummary(String summary) { + this.summary = summary; + } + + + public LiltCreateContent language(String language) { + + this.language = language; + return this; + } + + /** + * The language of the content. + * @return language + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The language of the content.") + + public String getLanguage() { + return language; + } + + + public void setLanguage(String language) { + this.language = language; + } + + + public LiltCreateContent memoryId(String memoryId) { + + this.memoryId = memoryId; + return this; + } + + /** + * The memory ID of the content. + * @return memoryId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The memory ID of the content.") + + public String getMemoryId() { + return memoryId; + } + + + public void setMemoryId(String memoryId) { + this.memoryId = memoryId; + } + + + public LiltCreateContent sections(List sections) { + + this.sections = sections; + return this; + } + + public LiltCreateContent addSectionsItem(String sectionsItem) { + if (this.sections == null) { + this.sections = new ArrayList(); + } + this.sections.add(sectionsItem); + return this; + } + + /** + * The sections of the content. + * @return sections + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The sections of the content.") + + public List getSections() { + return sections; + } + + + public void setSections(List sections) { + this.sections = sections; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LiltCreateContent liltCreateContent = (LiltCreateContent) o; + return Objects.equals(this.tone, liltCreateContent.tone) && + Objects.equals(this.terms, liltCreateContent.terms) && + Objects.equals(this.summary, liltCreateContent.summary) && + Objects.equals(this.language, liltCreateContent.language) && + Objects.equals(this.memoryId, liltCreateContent.memoryId) && + Objects.equals(this.sections, liltCreateContent.sections); + } + + @Override + public int hashCode() { + return Objects.hash(tone, terms, summary, language, memoryId, sections); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LiltCreateContent {\n"); + sb.append(" tone: ").append(toIndentedString(tone)).append("\n"); + sb.append(" terms: ").append(toIndentedString(terms)).append("\n"); + sb.append(" summary: ").append(toIndentedString(summary)).append("\n"); + sb.append(" language: ").append(toIndentedString(language)).append("\n"); + sb.append(" memoryId: ").append(toIndentedString(memoryId)).append("\n"); + sb.append(" sections: ").append(toIndentedString(sections)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/lilt/client/model/Memory.java b/src/main/java/com/lilt/client/model/Memory.java index f085db185..066419b90 100644 --- a/src/main/java/com/lilt/client/model/Memory.java +++ b/src/main/java/com/lilt/client/model/Memory.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -30,7 +30,7 @@ * A Memory is a collection of parallel (source/target) segments from which a MT/TM model is trained. When a translator confirms a segment in the Interface, a parallel segment is added to the Memory. Parallel segments from existing translation memories and bitexts can also be added to the Memory via the REST API. */ @ApiModel(description = "A Memory is a collection of parallel (source/target) segments from which a MT/TM model is trained. When a translator confirms a segment in the Interface, a parallel segment is added to the Memory. Parallel segments from existing translation memories and bitexts can also be added to the Memory via the REST API. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class Memory { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -56,6 +56,10 @@ public class Memory { @SerializedName(SERIALIZED_NAME_NAME) private String name; + public static final String SERIALIZED_NAME_IS_PROCESSING = "is_processing"; + @SerializedName(SERIALIZED_NAME_IS_PROCESSING) + private Boolean isProcessing; + public static final String SERIALIZED_NAME_VERSION = "version"; @SerializedName(SERIALIZED_NAME_VERSION) private Integer version; @@ -68,10 +72,6 @@ public class Memory { @SerializedName(SERIALIZED_NAME_UPDATED_AT) private Integer updatedAt; - public static final String SERIALIZED_NAME_NUM_SEGMENTS = "num_segments"; - @SerializedName(SERIALIZED_NAME_NUM_SEGMENTS) - private Integer numSegments; - public static final String SERIALIZED_NAME_RESOURCES = "resources"; @SerializedName(SERIALIZED_NAME_RESOURCES) private List resources = null; @@ -215,6 +215,29 @@ public void setName(String name) { } + public Memory isProcessing(Boolean isProcessing) { + + this.isProcessing = isProcessing; + return this; + } + + /** + * Indicates the memory is being processed. + * @return isProcessing + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "false", value = "Indicates the memory is being processed.") + + public Boolean getIsProcessing() { + return isProcessing; + } + + + public void setIsProcessing(Boolean isProcessing) { + this.isProcessing = isProcessing; + } + + public Memory version(Integer version) { this.version = version; @@ -284,29 +307,6 @@ public void setUpdatedAt(Integer updatedAt) { } - public Memory numSegments(Integer numSegments) { - - this.numSegments = numSegments; - return this; - } - - /** - * The number of confirmed Segments incorporated into this Memory. - * @return numSegments - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "1028", value = "The number of confirmed Segments incorporated into this Memory.") - - public Integer getNumSegments() { - return numSegments; - } - - - public void setNumSegments(Integer numSegments) { - this.numSegments = numSegments; - } - - public Memory resources(List resources) { this.resources = resources; @@ -353,16 +353,16 @@ public boolean equals(Object o) { Objects.equals(this.srclocale, memory.srclocale) && Objects.equals(this.trglocale, memory.trglocale) && Objects.equals(this.name, memory.name) && + Objects.equals(this.isProcessing, memory.isProcessing) && Objects.equals(this.version, memory.version) && Objects.equals(this.createdAt, memory.createdAt) && Objects.equals(this.updatedAt, memory.updatedAt) && - Objects.equals(this.numSegments, memory.numSegments) && Objects.equals(this.resources, memory.resources); } @Override public int hashCode() { - return Objects.hash(id, srclang, trglang, srclocale, trglocale, name, version, createdAt, updatedAt, numSegments, resources); + return Objects.hash(id, srclang, trglang, srclocale, trglocale, name, isProcessing, version, createdAt, updatedAt, resources); } @Override @@ -375,10 +375,10 @@ public String toString() { sb.append(" srclocale: ").append(toIndentedString(srclocale)).append("\n"); sb.append(" trglocale: ").append(toIndentedString(trglocale)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" isProcessing: ").append(toIndentedString(isProcessing)).append("\n"); sb.append(" version: ").append(toIndentedString(version)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); - sb.append(" numSegments: ").append(toIndentedString(numSegments)).append("\n"); sb.append(" resources: ").append(toIndentedString(resources)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/lilt/client/model/MemoryCreateParameters.java b/src/main/java/com/lilt/client/model/MemoryCreateParameters.java index 8c946a0fe..4d2f34e82 100644 --- a/src/main/java/com/lilt/client/model/MemoryCreateParameters.java +++ b/src/main/java/com/lilt/client/model/MemoryCreateParameters.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ /** * MemoryCreateParameters */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class MemoryCreateParameters { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/lilt/client/model/MemoryDeleteResponse.java b/src/main/java/com/lilt/client/model/MemoryDeleteResponse.java index 3744be6c5..3923b04ad 100644 --- a/src/main/java/com/lilt/client/model/MemoryDeleteResponse.java +++ b/src/main/java/com/lilt/client/model/MemoryDeleteResponse.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ /** * MemoryDeleteResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class MemoryDeleteResponse { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/MemoryImportResponse.java b/src/main/java/com/lilt/client/model/MemoryImportResponse.java index 1861cf32c..d2924aae9 100644 --- a/src/main/java/com/lilt/client/model/MemoryImportResponse.java +++ b/src/main/java/com/lilt/client/model/MemoryImportResponse.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ /** * MemoryImportResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class MemoryImportResponse { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/MemoryUpdateParameters.java b/src/main/java/com/lilt/client/model/MemoryUpdateParameters.java index 5c4d76fff..6cc2df577 100644 --- a/src/main/java/com/lilt/client/model/MemoryUpdateParameters.java +++ b/src/main/java/com/lilt/client/model/MemoryUpdateParameters.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ /** * MemoryUpdateParameters */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class MemoryUpdateParameters { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/Project.java b/src/main/java/com/lilt/client/model/Project.java index a695e4b07..c01b2cfe1 100644 --- a/src/main/java/com/lilt/client/model/Project.java +++ b/src/main/java/com/lilt/client/model/Project.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -31,7 +31,7 @@ * A Project is a collection of zero or more Documents. It is specific to a language pair, and is associated with exactly one Memory for that language pair. The Memory association cannot be changed after the Project is created. */ @ApiModel(description = "A Project is a collection of zero or more Documents. It is specific to a language pair, and is associated with exactly one Memory for that language pair. The Memory association cannot be changed after the Project is created. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class Project { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -93,6 +93,59 @@ public class Project { @SerializedName(SERIALIZED_NAME_UPDATED_AT) private Integer updatedAt; + /** + * The status of the Workflow for the current project. This may not be present for all project endpoints even with workflows enabled. + */ + @JsonAdapter(WorkflowStatusEnum.Adapter.class) + public enum WorkflowStatusEnum { + READY_TO_START("READY_TO_START"), + + IN_PROGRESS("IN_PROGRESS"), + + DONE("DONE"); + + private String value; + + WorkflowStatusEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static WorkflowStatusEnum fromValue(String value) { + for (WorkflowStatusEnum b : WorkflowStatusEnum.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 WorkflowStatusEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public WorkflowStatusEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return WorkflowStatusEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_WORKFLOW_STATUS = "workflowStatus"; + @SerializedName(SERIALIZED_NAME_WORKFLOW_STATUS) + private WorkflowStatusEnum workflowStatus; + public static final String SERIALIZED_NAME_DOCUMENT = "document"; @SerializedName(SERIALIZED_NAME_DOCUMENT) private List document = null; @@ -443,6 +496,29 @@ public void setUpdatedAt(Integer updatedAt) { } + public Project workflowStatus(WorkflowStatusEnum workflowStatus) { + + this.workflowStatus = workflowStatus; + return this; + } + + /** + * The status of the Workflow for the current project. This may not be present for all project endpoints even with workflows enabled. + * @return workflowStatus + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "READY_TO_START", value = "The status of the Workflow for the current project. This may not be present for all project endpoints even with workflows enabled.") + + public WorkflowStatusEnum getWorkflowStatus() { + return workflowStatus; + } + + + public void setWorkflowStatus(WorkflowStatusEnum workflowStatus) { + this.workflowStatus = workflowStatus; + } + + public Project document(List document) { this.document = document; @@ -498,12 +574,13 @@ public boolean equals(Object o) { Objects.equals(this.sampleReviewPercentage, project.sampleReviewPercentage) && Objects.equals(this.createdAt, project.createdAt) && Objects.equals(this.updatedAt, project.updatedAt) && + Objects.equals(this.workflowStatus, project.workflowStatus) && Objects.equals(this.document, project.document); } @Override public int hashCode() { - return Objects.hash(id, memoryId, jobId, srclang, trglang, srclocale, trglocale, name, state, dueDate, archived, metadata, sampleReviewPercentage, createdAt, updatedAt, document); + return Objects.hash(id, memoryId, jobId, srclang, trglang, srclocale, trglocale, name, state, dueDate, archived, metadata, sampleReviewPercentage, createdAt, updatedAt, workflowStatus, document); } @Override @@ -525,6 +602,7 @@ public String toString() { sb.append(" sampleReviewPercentage: ").append(toIndentedString(sampleReviewPercentage)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" workflowStatus: ").append(toIndentedString(workflowStatus)).append("\n"); sb.append(" document: ").append(toIndentedString(document)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/lilt/client/model/ProjectCreateParameters.java b/src/main/java/com/lilt/client/model/ProjectCreateParameters.java index 0c2e8455f..92a1f8745 100644 --- a/src/main/java/com/lilt/client/model/ProjectCreateParameters.java +++ b/src/main/java/com/lilt/client/model/ProjectCreateParameters.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ /** * ProjectCreateParameters */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class ProjectCreateParameters { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -49,6 +49,10 @@ public class ProjectCreateParameters { @SerializedName(SERIALIZED_NAME_METADATA) private Object metadata; + public static final String SERIALIZED_NAME_WORKFLOW_TEMPLATE_ID = "workflowTemplateId"; + @SerializedName(SERIALIZED_NAME_WORKFLOW_TEMPLATE_ID) + private Integer workflowTemplateId; + public ProjectCreateParameters name(String name) { @@ -163,6 +167,29 @@ public void setMetadata(Object metadata) { } + public ProjectCreateParameters workflowTemplateId(Integer workflowTemplateId) { + + this.workflowTemplateId = workflowTemplateId; + return this; + } + + /** + * The workflow template used to create this project. WorkflowTemplateIds can be retrieved via the /workflows/templates endpoint. If not specified then the organization default workflowTemplateId will be used. + * @return workflowTemplateId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "14", value = "The workflow template used to create this project. WorkflowTemplateIds can be retrieved via the /workflows/templates endpoint. If not specified then the organization default workflowTemplateId will be used.") + + public Integer getWorkflowTemplateId() { + return workflowTemplateId; + } + + + public void setWorkflowTemplateId(Integer workflowTemplateId) { + this.workflowTemplateId = workflowTemplateId; + } + + @Override public boolean equals(Object o) { if (this == o) { @@ -176,12 +203,13 @@ public boolean equals(Object o) { Objects.equals(this.memoryId, projectCreateParameters.memoryId) && Objects.equals(this.jobId, projectCreateParameters.jobId) && Objects.equals(this.dueDate, projectCreateParameters.dueDate) && - Objects.equals(this.metadata, projectCreateParameters.metadata); + Objects.equals(this.metadata, projectCreateParameters.metadata) && + Objects.equals(this.workflowTemplateId, projectCreateParameters.workflowTemplateId); } @Override public int hashCode() { - return Objects.hash(name, memoryId, jobId, dueDate, metadata); + return Objects.hash(name, memoryId, jobId, dueDate, metadata, workflowTemplateId); } @Override @@ -193,6 +221,7 @@ public String toString() { sb.append(" jobId: ").append(toIndentedString(jobId)).append("\n"); sb.append(" dueDate: ").append(toIndentedString(dueDate)).append("\n"); sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n"); + sb.append(" workflowTemplateId: ").append(toIndentedString(workflowTemplateId)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/lilt/client/model/ProjectDeleteResponse.java b/src/main/java/com/lilt/client/model/ProjectDeleteResponse.java index ba861d5f9..396dc2eea 100644 --- a/src/main/java/com/lilt/client/model/ProjectDeleteResponse.java +++ b/src/main/java/com/lilt/client/model/ProjectDeleteResponse.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,7 +27,7 @@ /** * ProjectDeleteResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class ProjectDeleteResponse { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/ProjectStats.java b/src/main/java/com/lilt/client/model/ProjectStats.java new file mode 100644 index 000000000..25ffa6396 --- /dev/null +++ b/src/main/java/com/lilt/client/model/ProjectStats.java @@ -0,0 +1,209 @@ +/* + * Lilt REST API + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * + * The version of the OpenAPI document: v3.0 + * Contact: support@lilt.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.lilt.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * ProjectStats + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") +public class ProjectStats { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private Integer id; + + public static final String SERIALIZED_NAME_SOURCE_WORDS = "sourceWords"; + @SerializedName(SERIALIZED_NAME_SOURCE_WORDS) + private Integer sourceWords; + + public static final String SERIALIZED_NAME_EXACT_WORDS = "exactWords"; + @SerializedName(SERIALIZED_NAME_EXACT_WORDS) + private Integer exactWords; + + public static final String SERIALIZED_NAME_FUZZY_WORDS = "fuzzyWords"; + @SerializedName(SERIALIZED_NAME_FUZZY_WORDS) + private Integer fuzzyWords; + + public static final String SERIALIZED_NAME_NEW_WORDS = "newWords"; + @SerializedName(SERIALIZED_NAME_NEW_WORDS) + private Integer newWords; + + + public ProjectStats id(Integer id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @ApiModelProperty(example = "1", required = true, value = "") + + public Integer getId() { + return id; + } + + + public void setId(Integer id) { + this.id = id; + } + + + public ProjectStats sourceWords(Integer sourceWords) { + + this.sourceWords = sourceWords; + return this; + } + + /** + * Get sourceWords + * @return sourceWords + **/ + @ApiModelProperty(example = "1000", required = true, value = "") + + public Integer getSourceWords() { + return sourceWords; + } + + + public void setSourceWords(Integer sourceWords) { + this.sourceWords = sourceWords; + } + + + public ProjectStats exactWords(Integer exactWords) { + + this.exactWords = exactWords; + return this; + } + + /** + * Get exactWords + * @return exactWords + **/ + @ApiModelProperty(example = "800", required = true, value = "") + + public Integer getExactWords() { + return exactWords; + } + + + public void setExactWords(Integer exactWords) { + this.exactWords = exactWords; + } + + + public ProjectStats fuzzyWords(Integer fuzzyWords) { + + this.fuzzyWords = fuzzyWords; + return this; + } + + /** + * Get fuzzyWords + * @return fuzzyWords + **/ + @ApiModelProperty(example = "150", required = true, value = "") + + public Integer getFuzzyWords() { + return fuzzyWords; + } + + + public void setFuzzyWords(Integer fuzzyWords) { + this.fuzzyWords = fuzzyWords; + } + + + public ProjectStats newWords(Integer newWords) { + + this.newWords = newWords; + return this; + } + + /** + * Get newWords + * @return newWords + **/ + @ApiModelProperty(example = "50", required = true, value = "") + + public Integer getNewWords() { + return newWords; + } + + + public void setNewWords(Integer newWords) { + this.newWords = newWords; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ProjectStats projectStats = (ProjectStats) o; + return Objects.equals(this.id, projectStats.id) && + Objects.equals(this.sourceWords, projectStats.sourceWords) && + Objects.equals(this.exactWords, projectStats.exactWords) && + Objects.equals(this.fuzzyWords, projectStats.fuzzyWords) && + Objects.equals(this.newWords, projectStats.newWords); + } + + @Override + public int hashCode() { + return Objects.hash(id, sourceWords, exactWords, fuzzyWords, newWords); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ProjectStats {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" sourceWords: ").append(toIndentedString(sourceWords)).append("\n"); + sb.append(" exactWords: ").append(toIndentedString(exactWords)).append("\n"); + sb.append(" fuzzyWords: ").append(toIndentedString(fuzzyWords)).append("\n"); + sb.append(" newWords: ").append(toIndentedString(newWords)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/lilt/client/model/SDLXLIFFFilter.java b/src/main/java/com/lilt/client/model/SDLXLIFFFilter.java new file mode 100644 index 000000000..903337a98 --- /dev/null +++ b/src/main/java/com/lilt/client/model/SDLXLIFFFilter.java @@ -0,0 +1,208 @@ +/* + * Lilt REST API + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * + * The version of the OpenAPI document: v3.0 + * Contact: support@lilt.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.lilt.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * SDLXLIFFFilter + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") +public class SDLXLIFFFilter { + /** + * the current state of the SDLXLIFF Trans Unit. + */ + @JsonAdapter(ConfNameEnum.Adapter.class) + public enum ConfNameEnum { + TRANSLATED("Translated"), + + DRAFT("Draft"), + + APPROVEDTRANSLATION("ApprovedTranslation"), + + LOCKED("Locked"), + + SIGNEDOFF("SignedOff"); + + private String value; + + ConfNameEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static ConfNameEnum fromValue(String value) { + for (ConfNameEnum b : ConfNameEnum.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 ConfNameEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public ConfNameEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return ConfNameEnum.fromValue(value); + } + } + } + + public static final String SERIALIZED_NAME_CONF_NAME = "confName"; + @SerializedName(SERIALIZED_NAME_CONF_NAME) + private ConfNameEnum confName; + + public static final String SERIALIZED_NAME_ALLOWABLE_PERCENTAGE = "allowablePercentage"; + @SerializedName(SERIALIZED_NAME_ALLOWABLE_PERCENTAGE) + private Integer allowablePercentage; + + public static final String SERIALIZED_NAME_ALLOW_UNLOCKED_SEGMENTS = "allowUnlockedSegments"; + @SerializedName(SERIALIZED_NAME_ALLOW_UNLOCKED_SEGMENTS) + private Boolean allowUnlockedSegments; + + + public SDLXLIFFFilter confName(ConfNameEnum confName) { + + this.confName = confName; + return this; + } + + /** + * the current state of the SDLXLIFF Trans Unit. + * @return confName + **/ + @ApiModelProperty(required = true, value = "the current state of the SDLXLIFF Trans Unit.") + + public ConfNameEnum getConfName() { + return confName; + } + + + public void setConfName(ConfNameEnum confName) { + this.confName = confName; + } + + + public SDLXLIFFFilter allowablePercentage(Integer allowablePercentage) { + + this.allowablePercentage = allowablePercentage; + return this; + } + + /** + * This represents for the current conf_name what percentage the filter applies to. If you pass -1 it will take any value for this field and won't ignore blank values. If you pass 50, Lilt will only import Segments that have a 50 percent match or better. + * @return allowablePercentage + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "This represents for the current conf_name what percentage the filter applies to. If you pass -1 it will take any value for this field and won't ignore blank values. If you pass 50, Lilt will only import Segments that have a 50 percent match or better.") + + public Integer getAllowablePercentage() { + return allowablePercentage; + } + + + public void setAllowablePercentage(Integer allowablePercentage) { + this.allowablePercentage = allowablePercentage; + } + + + public SDLXLIFFFilter allowUnlockedSegments(Boolean allowUnlockedSegments) { + + this.allowUnlockedSegments = allowUnlockedSegments; + return this; + } + + /** + * Boolean that tells Lilt whether we should allow unlocked Segments for this conf_name. + * @return allowUnlockedSegments + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Boolean that tells Lilt whether we should allow unlocked Segments for this conf_name.") + + public Boolean getAllowUnlockedSegments() { + return allowUnlockedSegments; + } + + + public void setAllowUnlockedSegments(Boolean allowUnlockedSegments) { + this.allowUnlockedSegments = allowUnlockedSegments; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SDLXLIFFFilter sdLXLIFFFilter = (SDLXLIFFFilter) o; + return Objects.equals(this.confName, sdLXLIFFFilter.confName) && + Objects.equals(this.allowablePercentage, sdLXLIFFFilter.allowablePercentage) && + Objects.equals(this.allowUnlockedSegments, sdLXLIFFFilter.allowUnlockedSegments); + } + + @Override + public int hashCode() { + return Objects.hash(confName, allowablePercentage, allowUnlockedSegments); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SDLXLIFFFilter {\n"); + sb.append(" confName: ").append(toIndentedString(confName)).append("\n"); + sb.append(" allowablePercentage: ").append(toIndentedString(allowablePercentage)).append("\n"); + sb.append(" allowUnlockedSegments: ").append(toIndentedString(allowUnlockedSegments)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/lilt/client/model/Segment.java b/src/main/java/com/lilt/client/model/Segment.java index 2d818b0bb..226f6b499 100644 --- a/src/main/java/com/lilt/client/model/Segment.java +++ b/src/main/java/com/lilt/client/model/Segment.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,7 +28,7 @@ * A Segment is a source string and, optionally, its translation. A Segment can be associated with both a Memory and a Document. The Segment object contains additional metadata about the source and target strings. */ @ApiModel(description = "A Segment is a source string and, optionally, its translation. A Segment can be associated with both a Memory and a Document. The Segment object contains additional metadata about the source and target strings. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class Segment { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/SignLiltCreateTermsResponse.java b/src/main/java/com/lilt/client/model/SignLiltCreateTermsResponse.java new file mode 100644 index 000000000..c61178627 --- /dev/null +++ b/src/main/java/com/lilt/client/model/SignLiltCreateTermsResponse.java @@ -0,0 +1,98 @@ +/* + * Lilt REST API + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * + * The version of the OpenAPI document: v3.0 + * Contact: support@lilt.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.lilt.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * SignLiltCreateTermsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") +public class SignLiltCreateTermsResponse { + public static final String SERIALIZED_NAME_SIGNED_AGREEMENT = "signedAgreement"; + @SerializedName(SERIALIZED_NAME_SIGNED_AGREEMENT) + private Boolean signedAgreement; + + + public SignLiltCreateTermsResponse signedAgreement(Boolean signedAgreement) { + + this.signedAgreement = signedAgreement; + return this; + } + + /** + * Whether or not the agreement has been signed. + * @return signedAgreement + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "Whether or not the agreement has been signed.") + + public Boolean getSignedAgreement() { + return signedAgreement; + } + + + public void setSignedAgreement(Boolean signedAgreement) { + this.signedAgreement = signedAgreement; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SignLiltCreateTermsResponse signLiltCreateTermsResponse = (SignLiltCreateTermsResponse) o; + return Objects.equals(this.signedAgreement, signLiltCreateTermsResponse.signedAgreement); + } + + @Override + public int hashCode() { + return Objects.hash(signedAgreement); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SignLiltCreateTermsResponse {\n"); + sb.append(" signedAgreement: ").append(toIndentedString(signedAgreement)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/lilt/client/model/SourceFile.java b/src/main/java/com/lilt/client/model/SourceFile.java index 1ca061fc6..82f05944b 100644 --- a/src/main/java/com/lilt/client/model/SourceFile.java +++ b/src/main/java/com/lilt/client/model/SourceFile.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -32,7 +32,7 @@ * A SourceFile is an unprocessed source file that can later be added to a project. */ @ApiModel(description = "A SourceFile is an unprocessed source file that can later be added to a project.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class SourceFile { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -251,7 +251,7 @@ public SourceFile createdAt(OffsetDateTime createdAt) { * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Time at which the object was created.") + @ApiModelProperty(example = "2019-10-16T22:12:34Z", value = "Time at which the object was created.") public OffsetDateTime getCreatedAt() { return createdAt; @@ -274,7 +274,7 @@ public SourceFile updatedAt(OffsetDateTime updatedAt) { * @return updatedAt **/ @javax.annotation.Nullable - @ApiModelProperty(value = "Time at which the object was created.") + @ApiModelProperty(example = "2019-10-16T22:12:34Z", value = "Time at which the object was created.") public OffsetDateTime getUpdatedAt() { return updatedAt; diff --git a/src/main/java/com/lilt/client/model/TermbaseExportResponse.java b/src/main/java/com/lilt/client/model/TermbaseExportResponse.java new file mode 100644 index 000000000..3ef7a602b --- /dev/null +++ b/src/main/java/com/lilt/client/model/TermbaseExportResponse.java @@ -0,0 +1,127 @@ +/* + * Lilt REST API + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * + * The version of the OpenAPI document: v3.0 + * Contact: support@lilt.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.lilt.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * TermbaseExportResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") +public class TermbaseExportResponse { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private Integer id; + + public static final String SERIALIZED_NAME_IS_PROCESSING = "is_processing"; + @SerializedName(SERIALIZED_NAME_IS_PROCESSING) + private Integer isProcessing; + + + public TermbaseExportResponse id(Integer id) { + + this.id = id; + return this; + } + + /** + * A unique Memory identifier. + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "123", value = "A unique Memory identifier.") + + public Integer getId() { + return id; + } + + + public void setId(Integer id) { + this.id = id; + } + + + public TermbaseExportResponse isProcessing(Integer isProcessing) { + + this.isProcessing = isProcessing; + return this; + } + + /** + * The current state of the import. + * @return isProcessing + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1", value = "The current state of the import.") + + public Integer getIsProcessing() { + return isProcessing; + } + + + public void setIsProcessing(Integer isProcessing) { + this.isProcessing = isProcessing; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TermbaseExportResponse termbaseExportResponse = (TermbaseExportResponse) o; + return Objects.equals(this.id, termbaseExportResponse.id) && + Objects.equals(this.isProcessing, termbaseExportResponse.isProcessing); + } + + @Override + public int hashCode() { + return Objects.hash(id, isProcessing); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TermbaseExportResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" isProcessing: ").append(toIndentedString(isProcessing)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/com/lilt/client/model/TranslateSegmentBody.java b/src/main/java/com/lilt/client/model/TranslateSegmentBody.java index bfff9e187..5e8597ec7 100644 --- a/src/main/java/com/lilt/client/model/TranslateSegmentBody.java +++ b/src/main/java/com/lilt/client/model/TranslateSegmentBody.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -27,12 +27,44 @@ /** * TranslateSegmentBody */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class TranslateSegmentBody { public static final String SERIALIZED_NAME_SOURCE = "source"; @SerializedName(SERIALIZED_NAME_SOURCE) private String source; + public static final String SERIALIZED_NAME_MEMORY_ID = "memory_id"; + @SerializedName(SERIALIZED_NAME_MEMORY_ID) + private Integer memoryId; + + public static final String SERIALIZED_NAME_SOURCE_HASH = "source_hash"; + @SerializedName(SERIALIZED_NAME_SOURCE_HASH) + private Integer sourceHash; + + public static final String SERIALIZED_NAME_N = "n"; + @SerializedName(SERIALIZED_NAME_N) + private Integer n; + + public static final String SERIALIZED_NAME_PREFIX = "prefix"; + @SerializedName(SERIALIZED_NAME_PREFIX) + private String prefix; + + public static final String SERIALIZED_NAME_RICH = "rich"; + @SerializedName(SERIALIZED_NAME_RICH) + private Boolean rich = false; + + public static final String SERIALIZED_NAME_TM_MATCHES = "tm_matches"; + @SerializedName(SERIALIZED_NAME_TM_MATCHES) + private Boolean tmMatches = true; + + public static final String SERIALIZED_NAME_PROJECT_TAGS = "project_tags"; + @SerializedName(SERIALIZED_NAME_PROJECT_TAGS) + private Boolean projectTags = false; + + public static final String SERIALIZED_NAME_CONTAINS_I_C_U_DATA = "containsICUData"; + @SerializedName(SERIALIZED_NAME_CONTAINS_I_C_U_DATA) + private Boolean containsICUData = false; + public TranslateSegmentBody source(String source) { @@ -57,6 +89,189 @@ public void setSource(String source) { } + public TranslateSegmentBody memoryId(Integer memoryId) { + + this.memoryId = memoryId; + return this; + } + + /** + * A unique Memory identifier. + * @return memoryId + **/ + @ApiModelProperty(required = true, value = "A unique Memory identifier.") + + public Integer getMemoryId() { + return memoryId; + } + + + public void setMemoryId(Integer memoryId) { + this.memoryId = memoryId; + } + + + public TranslateSegmentBody sourceHash(Integer sourceHash) { + + this.sourceHash = sourceHash; + return this; + } + + /** + * A source hash code. + * @return sourceHash + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "A source hash code.") + + public Integer getSourceHash() { + return sourceHash; + } + + + public void setSourceHash(Integer sourceHash) { + this.sourceHash = sourceHash; + } + + + public TranslateSegmentBody n(Integer n) { + + this.n = n; + return this; + } + + /** + * Return top n translations (deprecated). + * @return n + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Return top n translations (deprecated).") + + public Integer getN() { + return n; + } + + + public void setN(Integer n) { + this.n = n; + } + + + public TranslateSegmentBody prefix(String prefix) { + + this.prefix = prefix; + return this; + } + + /** + * A target prefix + * @return prefix + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "A target prefix") + + public String getPrefix() { + return prefix; + } + + + public void setPrefix(String prefix) { + this.prefix = prefix; + } + + + public TranslateSegmentBody rich(Boolean rich) { + + this.rich = rich; + return this; + } + + /** + * Returns rich translation information (e.g., with word alignments). + * @return rich + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Returns rich translation information (e.g., with word alignments).") + + public Boolean getRich() { + return rich; + } + + + public void setRich(Boolean rich) { + this.rich = rich; + } + + + public TranslateSegmentBody tmMatches(Boolean tmMatches) { + + this.tmMatches = tmMatches; + return this; + } + + /** + * Include translation memory fuzzy matches. + * @return tmMatches + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Include translation memory fuzzy matches.") + + public Boolean getTmMatches() { + return tmMatches; + } + + + public void setTmMatches(Boolean tmMatches) { + this.tmMatches = tmMatches; + } + + + public TranslateSegmentBody projectTags(Boolean projectTags) { + + this.projectTags = projectTags; + return this; + } + + /** + * Project tags. Projects tags in source to target if set to true. + * @return projectTags + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Project tags. Projects tags in source to target if set to true.") + + public Boolean getProjectTags() { + return projectTags; + } + + + public void setProjectTags(Boolean projectTags) { + this.projectTags = projectTags; + } + + + public TranslateSegmentBody containsICUData(Boolean containsICUData) { + + this.containsICUData = containsICUData; + return this; + } + + /** + * Contains ICU data. If true then tags in the source following the ICU standard will be parsed and retained. + * @return containsICUData + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Contains ICU data. If true then tags in the source following the ICU standard will be parsed and retained.") + + public Boolean getContainsICUData() { + return containsICUData; + } + + + public void setContainsICUData(Boolean containsICUData) { + this.containsICUData = containsICUData; + } + + @Override public boolean equals(Object o) { if (this == o) { @@ -66,12 +281,20 @@ public boolean equals(Object o) { return false; } TranslateSegmentBody translateSegmentBody = (TranslateSegmentBody) o; - return Objects.equals(this.source, translateSegmentBody.source); + return Objects.equals(this.source, translateSegmentBody.source) && + Objects.equals(this.memoryId, translateSegmentBody.memoryId) && + Objects.equals(this.sourceHash, translateSegmentBody.sourceHash) && + Objects.equals(this.n, translateSegmentBody.n) && + Objects.equals(this.prefix, translateSegmentBody.prefix) && + Objects.equals(this.rich, translateSegmentBody.rich) && + Objects.equals(this.tmMatches, translateSegmentBody.tmMatches) && + Objects.equals(this.projectTags, translateSegmentBody.projectTags) && + Objects.equals(this.containsICUData, translateSegmentBody.containsICUData); } @Override public int hashCode() { - return Objects.hash(source); + return Objects.hash(source, memoryId, sourceHash, n, prefix, rich, tmMatches, projectTags, containsICUData); } @Override @@ -79,6 +302,14 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TranslateSegmentBody {\n"); sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" memoryId: ").append(toIndentedString(memoryId)).append("\n"); + sb.append(" sourceHash: ").append(toIndentedString(sourceHash)).append("\n"); + sb.append(" n: ").append(toIndentedString(n)).append("\n"); + sb.append(" prefix: ").append(toIndentedString(prefix)).append("\n"); + sb.append(" rich: ").append(toIndentedString(rich)).append("\n"); + sb.append(" tmMatches: ").append(toIndentedString(tmMatches)).append("\n"); + sb.append(" projectTags: ").append(toIndentedString(projectTags)).append("\n"); + sb.append(" containsICUData: ").append(toIndentedString(containsICUData)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/lilt/client/model/Translation.java b/src/main/java/com/lilt/client/model/Translation.java index 7bc16e866..9268a401b 100644 --- a/src/main/java/com/lilt/client/model/Translation.java +++ b/src/main/java/com/lilt/client/model/Translation.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -31,7 +31,7 @@ * A machine translation (MT) or a translation memory (TM) match of a source segment. */ @ApiModel(description = "A machine translation (MT) or a translation memory (TM) match of a source segment.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class Translation { public static final String SERIALIZED_NAME_TARGET = "target"; @SerializedName(SERIALIZED_NAME_TARGET) diff --git a/src/main/java/com/lilt/client/model/TranslationInfo.java b/src/main/java/com/lilt/client/model/TranslationInfo.java index 421e6a6ce..47e72fac8 100644 --- a/src/main/java/com/lilt/client/model/TranslationInfo.java +++ b/src/main/java/com/lilt/client/model/TranslationInfo.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,7 +28,7 @@ * Information describing a batch translation process. */ @ApiModel(description = "Information describing a batch translation process. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class TranslationInfo { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/TranslationList.java b/src/main/java/com/lilt/client/model/TranslationList.java index e27f3f507..b63e3408e 100644 --- a/src/main/java/com/lilt/client/model/TranslationList.java +++ b/src/main/java/com/lilt/client/model/TranslationList.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -31,7 +31,7 @@ * An ranked list of translations and associated metadata. */ @ApiModel(description = "An ranked list of translations and associated metadata.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class TranslationList { public static final String SERIALIZED_NAME_UNTOKENIZED_SOURCE = "untokenizedSource"; @SerializedName(SERIALIZED_NAME_UNTOKENIZED_SOURCE) @@ -115,7 +115,7 @@ public TranslationList addSourceDelimitersItem(String sourceDelimitersItem) { * @return sourceDelimiters **/ @javax.annotation.Nullable - @ApiModelProperty(example = "[, , , , ]", value = "A format string that indicates, for each word, if the word should be preceded by a space.") + @ApiModelProperty(example = "[\"\",\" \",\" \",\"\",\"\"]", value = "A format string that indicates, for each word, if the word should be preceded by a space.") public List getSourceDelimiters() { return sourceDelimiters; diff --git a/src/main/java/com/lilt/client/model/TranslationMemoryEntry.java b/src/main/java/com/lilt/client/model/TranslationMemoryEntry.java index 3c83afd9b..7e561ee0c 100644 --- a/src/main/java/com/lilt/client/model/TranslationMemoryEntry.java +++ b/src/main/java/com/lilt/client/model/TranslationMemoryEntry.java @@ -1,8 +1,8 @@ /* * Lilt REST API - * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. * - * The version of the OpenAPI document: v2.0 + * The version of the OpenAPI document: v3.0 * Contact: support@lilt.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -28,7 +28,7 @@ * A translation memory entry. */ @ApiModel(description = "A translation memory entry.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") public class TranslationMemoryEntry { public static final String SERIALIZED_NAME_SOURCE = "source"; @SerializedName(SERIALIZED_NAME_SOURCE) diff --git a/src/main/java/com/lilt/client/model/WorkflowStageAssignment.java b/src/main/java/com/lilt/client/model/WorkflowStageAssignment.java new file mode 100644 index 000000000..0de82bff9 --- /dev/null +++ b/src/main/java/com/lilt/client/model/WorkflowStageAssignment.java @@ -0,0 +1,156 @@ +/* + * Lilt REST API + * The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. + * + * The version of the OpenAPI document: v3.0 + * Contact: support@lilt.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.lilt.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * An assignment object that associates a user to a workflow stage template. + */ +@ApiModel(description = "An assignment object that associates a user to a workflow stage template.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-07-22T00:19:36.591Z[GMT]") +public class WorkflowStageAssignment { + public static final String SERIALIZED_NAME_WORKFLOW_STAGE_TEMPLATE_ID = "workflowStageTemplateId"; + @SerializedName(SERIALIZED_NAME_WORKFLOW_STAGE_TEMPLATE_ID) + private Integer workflowStageTemplateId; + + public static final String SERIALIZED_NAME_USER_ID = "userId"; + @SerializedName(SERIALIZED_NAME_USER_ID) + private Integer userId; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + + public WorkflowStageAssignment workflowStageTemplateId(Integer workflowStageTemplateId) { + + this.workflowStageTemplateId = workflowStageTemplateId; + return this; + } + + /** + * Get workflowStageTemplateId + * @return workflowStageTemplateId + **/ + @ApiModelProperty(example = "12345", required = true, value = "") + + public Integer getWorkflowStageTemplateId() { + return workflowStageTemplateId; + } + + + public void setWorkflowStageTemplateId(Integer workflowStageTemplateId) { + this.workflowStageTemplateId = workflowStageTemplateId; + } + + + public WorkflowStageAssignment userId(Integer userId) { + + this.userId = userId; + return this; + } + + /** + * Get userId + * @return userId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "123", value = "") + + public Integer getUserId() { + return userId; + } + + + public void setUserId(Integer userId) { + this.userId = userId; + } + + + public WorkflowStageAssignment email(String email) { + + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "username@domain.com", value = "") + + public String getEmail() { + return email; + } + + + public void setEmail(String email) { + this.email = email; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WorkflowStageAssignment workflowStageAssignment = (WorkflowStageAssignment) o; + return Objects.equals(this.workflowStageTemplateId, workflowStageAssignment.workflowStageTemplateId) && + Objects.equals(this.userId, workflowStageAssignment.userId) && + Objects.equals(this.email, workflowStageAssignment.email); + } + + @Override + public int hashCode() { + return Objects.hash(workflowStageTemplateId, userId, email); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class WorkflowStageAssignment {\n"); + sb.append(" workflowStageTemplateId: ").append(toIndentedString(workflowStageTemplateId)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} +