From 4d9d86fef8d76be746bd9d35ef31d83f5f516f89 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 20 Dec 2021 11:46:41 -0800 Subject: [PATCH] OpenAPI: Regenerates API Bindings (#19) * Regenerates API Bindings * 2.2.0 Co-authored-by: tgallant Co-authored-by: Tim Gallant --- .openapi-generator/FILES | 234 ++ README.md | 79 +- api/openapi.yaml | 2873 +++++++++++++++-- docs/AddFileLabelRequest.md | 12 + docs/Comment.md | 7 +- docs/CommentBody.md | 15 + docs/CommentDeleteResponse.md | 12 + docs/CommentsApi.md | 322 ++ docs/ConnectorsApi.md | 4 +- docs/ConverterConfigApi.md | 472 +++ docs/ConverterConfigUpdateResponse.md | 12 + docs/CreateConverterConfigParameters.md | 14 + docs/DocumentComments.md | 13 + docs/DocumentDoneUpdateParameters.md | 2 +- docs/DocumentDoneUpdateParameters1.md | 1 + docs/DocumentDoneUpdateParameters2.md | 13 + docs/DocumentsApi.md | 190 +- docs/EditFilterMappingParameters.md | 14 + docs/FilesApi.md | 241 +- docs/InlineResponse200.md | 4 +- docs/Job.md | 20 + docs/JobCreateParameters.md | 15 + docs/JobDeleteResponse.md | 12 + docs/JobLeverageStats.md | 17 + docs/JobLeverageStatsProjects.md | 16 + docs/JobProject.md | 27 + docs/JobStats.md | 24 + docs/JobUpdateParameters.md | 13 + docs/JobsApi.md | 922 ++++++ docs/LanguagePair.md | 23 + docs/MemoriesApi.md | 8 +- docs/Project.md | 1 + docs/ProjectCreateParameters.md | 2 +- docs/ProjectsApi.md | 75 + docs/QARuleMatches.md | 1 + docs/QARuleMatchesCustomRules.md | 12 + docs/QaApi.md | 6 +- docs/SegmentDoneResponse.md | 12 + docs/SegmentsApi.md | 75 + docs/Setting.md | 17 + docs/SettingUpsertBody.md | 17 + docs/SettingUpsertResponse.md | 14 + docs/SettingsApi.md | 304 ++ docs/SourceFile.md | 5 +- docs/TranslateApi.md | 18 +- docs/TranslateSegmentBody.md | 12 + pom.xml | 73 +- src/main/java/com/lilt/client/ApiClient.java | 2 +- .../java/com/lilt/client/ApiException.java | 2 +- .../java/com/lilt/client/Configuration.java | 2 +- src/main/java/com/lilt/client/Pair.java | 2 +- src/main/java/com/lilt/client/StringUtil.java | 2 +- .../java/com/lilt/client/api/CommentsApi.java | 589 ++++ .../com/lilt/client/api/ConnectorsApi.java | 6 +- .../lilt/client/api/ConverterConfigApi.java | 791 +++++ .../com/lilt/client/api/DocumentsApi.java | 560 ++-- .../java/com/lilt/client/api/FilesApi.java | 418 ++- .../java/com/lilt/client/api/JobsApi.java | 1460 +++++++++ .../java/com/lilt/client/api/MemoriesApi.java | 32 +- .../java/com/lilt/client/api/ProjectsApi.java | 112 + src/main/java/com/lilt/client/api/QaApi.java | 26 +- .../java/com/lilt/client/api/SegmentsApi.java | 113 + .../java/com/lilt/client/api/SettingsApi.java | 498 +++ .../com/lilt/client/api/TranslateApi.java | 65 +- .../java/com/lilt/client/auth/ApiKeyAuth.java | 2 +- .../com/lilt/client/auth/HttpBearerAuth.java | 2 +- .../client/model/AddFileLabelRequest.java | 98 + .../com/lilt/client/model/Annotation.java | 2 +- .../java/com/lilt/client/model/ApiRoot.java | 2 +- .../java/com/lilt/client/model/Comment.java | 157 +- .../com/lilt/client/model/CommentBody.java | 168 + .../client/model/CommentDeleteResponse.java | 98 + .../java/com/lilt/client/model/Connector.java | 2 +- .../lilt/client/model/ConnectorArguments.java | 2 +- .../client/model/ConnectorDeleteResponse.java | 2 +- .../com/lilt/client/model/ConnectorJob.java | 2 +- .../model/ConverterConfigUpdateResponse.java | 98 + .../CreateConverterConfigParameters.java | 153 + .../model/DocumentAssignmentParameters.java | 2 +- .../model/DocumentAssignmentResponse.java | 2 +- .../lilt/client/model/DocumentComments.java | 110 + .../client/model/DocumentDeleteResponse.java | 2 +- .../model/DocumentDoneUpdateParameters.java | 40 +- .../model/DocumentDoneUpdateParameters1.java | 42 +- .../model/DocumentDoneUpdateParameters2.java | 133 + .../lilt/client/model/DocumentParameters.java | 2 +- .../model/DocumentPretranslateParameters.java | 2 +- .../model/DocumentPretranslateResponse.java | 2 +- .../client/model/DocumentPretranslating.java | 2 +- .../model/DocumentPretranslatingStatus.java | 2 +- .../com/lilt/client/model/DocumentQuote.java | 2 +- .../model/DocumentUpdateParameters.java | 2 +- .../client/model/DocumentWithSegments.java | 2 +- .../client/model/DocumentWithoutSegments.java | 2 +- .../model/DocumentWithoutSegmentsStatus.java | 2 +- .../model/EditFilterMappingParameters.java | 154 + .../java/com/lilt/client/model/Error.java | 2 +- .../lilt/client/model/FileDeleteResponse.java | 2 +- .../lilt/client/model/InlineResponse200.java | 94 +- src/main/java/com/lilt/client/model/Job.java | 304 ++ .../client/model/JobCreateParameters.java | 195 ++ .../lilt/client/model/JobDeleteResponse.java | 98 + .../lilt/client/model/JobLeverageStats.java | 226 ++ .../model/JobLeverageStatsProjects.java | 214 ++ .../com/lilt/client/model/JobProject.java | 505 +++ .../java/com/lilt/client/model/JobStats.java | 429 +++ .../client/model/JobUpdateParameters.java | 127 + .../com/lilt/client/model/LanguagePair.java | 387 +++ .../lilt/client/model/LanguagesResponse.java | 2 +- .../com/lilt/client/model/LexiconEntry.java | 2 +- .../client/model/LexiconEntryExamples.java | 2 +- .../client/model/LexiconEntrySourceSpan.java | 2 +- .../client/model/LexiconEntryTargetSpan.java | 2 +- .../model/LexiconEntryTranslations.java | 2 +- .../client/model/LexiconUpdateParameters.java | 2 +- .../client/model/LexiconUpdateResponse.java | 2 +- .../java/com/lilt/client/model/MatchBand.java | 2 +- .../java/com/lilt/client/model/Memory.java | 2 +- .../client/model/MemoryCreateParameters.java | 2 +- .../client/model/MemoryDeleteResponse.java | 2 +- .../client/model/MemoryImportResponse.java | 2 +- .../client/model/MemoryInsertResponse.java | 2 +- .../model/MemorySyncDeleteResponse.java | 2 +- .../client/model/MemoryUpdateParameters.java | 2 +- .../client/model/MemoryUpdateResponse.java | 2 +- .../java/com/lilt/client/model/Project.java | 33 +- .../client/model/ProjectCreateParameters.java | 42 +- .../client/model/ProjectDeleteResponse.java | 2 +- .../com/lilt/client/model/ProjectQuote.java | 2 +- .../com/lilt/client/model/ProjectStatus.java | 2 +- .../client/model/ProjectUpdateResponse.java | 2 +- .../com/lilt/client/model/QARuleMatches.java | 44 +- .../client/model/QARuleMatchesContext.java | 2 +- .../model/QARuleMatchesCustomRules.java | 98 + .../client/model/QARuleMatchesMatches.java | 2 +- .../model/QARuleMatchesReplacements.java | 2 +- .../lilt/client/model/QARuleMatchesRule.java | 2 +- .../model/QARuleMatchesRuleCategory.java | 2 +- .../client/model/QARuleMatchesRuleUrls.java | 2 +- .../com/lilt/client/model/ResourceStatus.java | 2 +- .../java/com/lilt/client/model/Segment.java | 2 +- .../client/model/SegmentCreateParameters.java | 2 +- .../client/model/SegmentDeleteResponse.java | 2 +- .../client/model/SegmentDoneResponse.java | 105 + .../client/model/SegmentUpdateParameters.java | 2 +- .../client/model/SegmentWithComments.java | 2 +- .../java/com/lilt/client/model/Setting.java | 215 ++ .../lilt/client/model/SettingUpsertBody.java | 216 ++ .../client/model/SettingUpsertResponse.java | 140 + .../com/lilt/client/model/SourceFile.java | 58 +- .../com/lilt/client/model/TaggedSegment.java | 2 +- .../model/TranslateRegisterResponse.java | 2 +- .../client/model/TranslateSegmentBody.java | 98 + .../com/lilt/client/model/Translation.java | 2 +- .../lilt/client/model/TranslationInfo.java | 2 +- .../lilt/client/model/TranslationList.java | 2 +- .../client/model/TranslationMemoryEntry.java | 2 +- 157 files changed, 14864 insertions(+), 1094 deletions(-) create mode 100644 .openapi-generator/FILES create mode 100644 docs/AddFileLabelRequest.md create mode 100644 docs/CommentBody.md create mode 100644 docs/CommentDeleteResponse.md create mode 100644 docs/CommentsApi.md create mode 100644 docs/ConverterConfigApi.md create mode 100644 docs/ConverterConfigUpdateResponse.md create mode 100644 docs/CreateConverterConfigParameters.md create mode 100644 docs/DocumentComments.md create mode 100644 docs/DocumentDoneUpdateParameters2.md create mode 100644 docs/EditFilterMappingParameters.md create mode 100644 docs/Job.md create mode 100644 docs/JobCreateParameters.md create mode 100644 docs/JobDeleteResponse.md create mode 100644 docs/JobLeverageStats.md create mode 100644 docs/JobLeverageStatsProjects.md create mode 100644 docs/JobProject.md create mode 100644 docs/JobStats.md create mode 100644 docs/JobUpdateParameters.md create mode 100644 docs/JobsApi.md create mode 100644 docs/LanguagePair.md create mode 100644 docs/QARuleMatchesCustomRules.md create mode 100644 docs/SegmentDoneResponse.md create mode 100644 docs/Setting.md create mode 100644 docs/SettingUpsertBody.md create mode 100644 docs/SettingUpsertResponse.md create mode 100644 docs/SettingsApi.md create mode 100644 docs/TranslateSegmentBody.md create mode 100644 src/main/java/com/lilt/client/api/CommentsApi.java create mode 100644 src/main/java/com/lilt/client/api/ConverterConfigApi.java create mode 100644 src/main/java/com/lilt/client/api/JobsApi.java create mode 100644 src/main/java/com/lilt/client/api/SettingsApi.java create mode 100644 src/main/java/com/lilt/client/model/AddFileLabelRequest.java create mode 100644 src/main/java/com/lilt/client/model/CommentBody.java create mode 100644 src/main/java/com/lilt/client/model/CommentDeleteResponse.java create mode 100644 src/main/java/com/lilt/client/model/ConverterConfigUpdateResponse.java create mode 100644 src/main/java/com/lilt/client/model/CreateConverterConfigParameters.java create mode 100644 src/main/java/com/lilt/client/model/DocumentComments.java create mode 100644 src/main/java/com/lilt/client/model/DocumentDoneUpdateParameters2.java create mode 100644 src/main/java/com/lilt/client/model/EditFilterMappingParameters.java create mode 100644 src/main/java/com/lilt/client/model/Job.java create mode 100644 src/main/java/com/lilt/client/model/JobCreateParameters.java create mode 100644 src/main/java/com/lilt/client/model/JobDeleteResponse.java create mode 100644 src/main/java/com/lilt/client/model/JobLeverageStats.java create mode 100644 src/main/java/com/lilt/client/model/JobLeverageStatsProjects.java create mode 100644 src/main/java/com/lilt/client/model/JobProject.java create mode 100644 src/main/java/com/lilt/client/model/JobStats.java create mode 100644 src/main/java/com/lilt/client/model/JobUpdateParameters.java create mode 100644 src/main/java/com/lilt/client/model/LanguagePair.java create mode 100644 src/main/java/com/lilt/client/model/QARuleMatchesCustomRules.java create mode 100644 src/main/java/com/lilt/client/model/SegmentDoneResponse.java create mode 100644 src/main/java/com/lilt/client/model/Setting.java create mode 100644 src/main/java/com/lilt/client/model/SettingUpsertBody.java create mode 100644 src/main/java/com/lilt/client/model/SettingUpsertResponse.java create mode 100644 src/main/java/com/lilt/client/model/TranslateSegmentBody.java diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES new file mode 100644 index 000000000..ea5e6e83e --- /dev/null +++ b/.openapi-generator/FILES @@ -0,0 +1,234 @@ +.travis.yml +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/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/DocumentWithSegments.md +docs/DocumentWithoutSegments.md +docs/DocumentWithoutSegmentsStatus.md +docs/DocumentsApi.md +docs/EditFilterMappingParameters.md +docs/Error.md +docs/FileDeleteResponse.md +docs/FilesApi.md +docs/InlineResponse200.md +docs/Job.md +docs/JobCreateParameters.md +docs/JobDeleteResponse.md +docs/JobLeverageStats.md +docs/JobLeverageStatsProjects.md +docs/JobProject.md +docs/JobStats.md +docs/JobUpdateParameters.md +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/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/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/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/SourceFile.md +docs/TaggedSegment.md +docs/TranslateApi.md +docs/TranslateRegisterResponse.md +docs/TranslateSegmentBody.md +docs/Translation.md +docs/TranslationInfo.md +docs/TranslationList.md +docs/TranslationMemoryEntry.md +pom.xml +src/main/AndroidManifest.xml +src/main/java/com/lilt/client/ApiCallback.java +src/main/java/com/lilt/client/ApiClient.java +src/main/java/com/lilt/client/ApiException.java +src/main/java/com/lilt/client/ApiResponse.java +src/main/java/com/lilt/client/Configuration.java +src/main/java/com/lilt/client/GzipRequestInterceptor.java +src/main/java/com/lilt/client/JSON.java +src/main/java/com/lilt/client/Pair.java +src/main/java/com/lilt/client/ProgressRequestBody.java +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/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/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 +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/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/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/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/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 diff --git a/README.md b/README.md index f663399de..2dae66b41 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Add this dependency to your project's POM: com.lilt.client lilt-java-client - 2.1.0 + 2.2.0 compile ``` @@ -86,7 +86,7 @@ mvn clean package Then manually install the following JARs: -* `target/lilt-java-client-2.1.0.jar` +* `target/lilt-java-client-2.2.0.jar` * `target/lib/*.jar` ## Getting Started @@ -101,7 +101,7 @@ 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.ConnectorsApi; +import com.lilt.client.api.CommentsApi; public class Example { public static void main(String[] args) { @@ -119,13 +119,15 @@ public class Example { BasicAuth.setUsername("YOUR USERNAME"); BasicAuth.setPassword("YOUR PASSWORD"); - ConnectorsApi apiInstance = new ConnectorsApi(defaultClient); - Connector body = new Connector(); // Connector | + 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 try { - Connector result = apiInstance.createConnector(body); + Comment result = apiInstance.createComment(documentId, segmentId, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling ConnectorsApi#createConnector"); + System.err.println("Exception when calling CommentsApi#createComment"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -142,27 +144,52 @@ All URIs are relative to *https://lilt.com/2* 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 | Retreive 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* | [**documentsDoneReviewPost**](docs/DocumentsApi.md#documentsDoneReviewPost) | **POST** /documents/done/review | Mark review done -*DocumentsApi* | [**documentsDoneTranslationPost**](docs/DocumentsApi.md#documentsDoneTranslationPost) | **POST** /documents/done/translation | Mark translation done -*DocumentsApi* | [**documentsDoneUnlockPost**](docs/DocumentsApi.md#documentsDoneUnlockPost) | **POST** /documents/done/unlock | Unlock documents *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 @@ -179,6 +206,7 @@ Class | Method | HTTP request | Description *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 @@ -188,7 +216,12 @@ Class | Method | HTTP request | Description *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 @@ -198,18 +231,25 @@ Class | Method | HTTP request | Description ## 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) @@ -220,8 +260,19 @@ Class | Method | HTTP request | Description - [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) + - [Job](docs/Job.md) + - [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) @@ -247,6 +298,7 @@ Class | Method | HTTP request | Description - [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) @@ -256,11 +308,16 @@ Class | Method | HTTP request | Description - [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) - [SourceFile](docs/SourceFile.md) - [TaggedSegment](docs/TaggedSegment.md) - [TranslateRegisterResponse](docs/TranslateRegisterResponse.md) + - [TranslateSegmentBody](docs/TranslateSegmentBody.md) - [Translation](docs/Translation.md) - [TranslationInfo](docs/TranslationInfo.md) - [TranslationList](docs/TranslationList.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index ebb46134c..55059895f 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -104,6 +104,17 @@ paths: name: id 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": content: @@ -136,18 +147,9 @@ paths: base](https://support.lilt.com/hc/en-us/articles/360020816253-File-Formats). Request parameters should be passed in as query string parameters. - When uploading a file, any parameters needed to issue a request to the - specified export_uri can be encoded in the export_uri itself as query - parameters. Typical examples of parameters that may be required are an - access token to authorize requests to a third-party HTTP API and the - unique identifier of a resource available via the third-party HTTP API - that corresponds to the file. An example export_uri that encodes a - target resource identifier (i.e., source_id) of an associated resource - behind a third party HTTP API is given in the CURL command below. - Example CURL command: ``` - curl -X POST https://lilt.com/2/files?key=API_KEY&name=en_US.json&export_uri=https://example.com/export?source_id=12345 \ + 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 ``` @@ -165,12 +167,6 @@ paths: required: true schema: type: string - - description: A webhook endpoint that will export the translated document back - to the source repository. - in: query - name: export_uri - 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 @@ -234,6 +230,273 @@ paths: x-codegen-request-body-name: body x-contentType: application/octet-stream x-accepts: application/json + /files/download: + get: + description: | + Download a File. + + Example CURL: + ``` + curl --X --request GET 'https://lilt.com/2/files/download?key=API_KEY&id=1' + ``` + operationId: download + parameters: + - description: A File 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 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. + in: query + name: name + required: true + schema: + type: string + responses: + "204": + content: {} + description: A success response. + summary: Remove Label from File + tags: + - Files + x-accepts: application/json + post: + description: | + 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" + }' + ``` + operationId: addLabel + parameters: + - description: A File id. + in: query + name: id + required: true + schema: + type: string + requestBody: + $ref: '#/components/requestBodies/AddFileLabelRequest' + content: + application/json: + schema: + example: + name: label_name + properties: + name: + description: The Label name. + example: label_name + type: string + title: AddFileLabelRequest + type: object + description: A label name. + required: true + responses: + "204": + content: {} + description: A success response. + summary: Add Label to File + tags: + - Files + x-codegen-request-body-name: name + x-contentType: application/json + x-accepts: application/json + /comments: + delete: + description: | + Delete a Comment. + + Example CURL command: + ``` + curl -X DELETE https://lilt.com/2/comments?key=API_KEY&comment_id=123 + ``` + operationId: deleteComment + parameters: + - description: A unique Comment identifier. + in: query + name: comment_id + required: true + schema: + type: integer + responses: + "204": + content: + application/json: + schema: + $ref: '#/components/schemas/CommentDeleteResponse' + description: A status object. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete a Comment + tags: + - Comments + x-accepts: application/json + get: + description: | + Retrieves all comments associated with a specified document, grouped by their Segment's ID. + + To retrieve a document's comments, specify the document_id request parameter. + + Example CURL command: + ``` + curl -X GET https://lilt.com/2/comments?key=API_KEY&document_id=123 + ``` + operationId: getDocumentComments + parameters: + - description: A unique document identifier. + in: query + name: document_id + required: true + schema: + type: integer + 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. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error. + summary: Retrieve a document's comments by segment + tags: + - Comments + x-accepts: application/json + post: + description: Create a new comment for the specified Segment ID. + operationId: createComment + parameters: + - description: A unique document identifier. + in: query + name: document_id + required: true + schema: + type: integer + - description: A unique segment identifier. + 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 + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Comment' + description: A Comment object. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Create a new comment + tags: + - Comments + x-codegen-request-body-name: body + x-contentType: application/json + 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 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CommentBody' + description: The comment being updated. + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Comment' + description: A Comment object. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update an existing comment + tags: + - Comments + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json /connectors: delete: description: |+ @@ -478,7 +741,7 @@ paths: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Retreive a Connector Job + summary: Retrieve a Connector Job tags: - Connectors x-accepts: application/json @@ -515,15 +778,15 @@ paths: tags: - Connectors x-accepts: application/json - /documents: - delete: + /configs/converter: + get: description: | - Delete a Document. - operationId: deleteDocument + List all file filter configurations for your Organization. + operationId: getConverterConfigs parameters: - - description: A unique Document identifier. + - description: A unique Organization identifier. in: query - name: id + name: organizationId required: true schema: type: integer @@ -532,63 +795,327 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/DocumentDeleteResponse' - description: A status object. + $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 a Document + summary: List Converter Configs tags: - - Documents + - ConverterConfig x-accepts: application/json - get: - description: |- - 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`. - operationId: getDocument + put: + description: | + Add a file filter configuration for your Organization. + operationId: addConverterConfig parameters: - - description: A unique Document identifier. + - description: A unique Organization identifier. in: query - name: id + name: organizationId required: true schema: type: integer - - description: Flag indicating whether full segment information should be returned. - in: query - name: with_segments - schema: - type: boolean + 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. + required: false responses: "200": content: application/json: schema: - $ref: '#/components/schemas/DocumentWithSegments' - description: A Document object. + $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: Retrieve a Document + summary: Add Converter Config tags: - - Documents + - ConverterConfig + x-codegen-request-body-name: body + x-contentType: application/json x-accepts: application/json - post: + /configs/converter/{configId}: + delete: 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 - requestBody: - $ref: '#/components/requestBodies/DocumentParameters' - content: - application/json: + Delete a file filter configuration by id. + operationId: deleteConverterConfig + parameters: + - description: A unique configuration identifier. + in: path + name: configId + required: true + schema: + type: integer + 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 + tags: + - ConverterConfig + 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 + parameters: + - description: A unique configuration identifier. + in: path + name: configId + required: true + schema: + type: integer + - description: A file extension to delete. + in: path + name: fileExtension + required: true + schema: + type: string + 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 + tags: + - ConverterConfig + x-accepts: application/json + put: + description: | + Add a specific filter mapping to your file filter configuration + operationId: editFilterMapping + parameters: + - description: A unique configuration identifier. + in: path + name: configId + required: true + schema: + type: integer + - description: A file extension for the filter mapping. + in: path + name: fileExtension + required: true + schema: + type: string + 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. + 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 + tags: + - ConverterConfig + x-codegen-request-body-name: body + x-contentType: application/json + x-accepts: application/json + /documents: + delete: + description: | + Delete a Document. + operationId: deleteDocument + parameters: + - description: A unique Document identifier. + in: query + name: id + required: true + schema: + type: integer + 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 + tags: + - Documents + x-accepts: application/json + get: + description: |- + 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`. + operationId: getDocument + parameters: + - description: A unique Document identifier. + in: query + name: id + required: true + schema: + type: integer + - description: Flag indicating whether full segment information should be returned. + in: query + name: with_segments + schema: + type: boolean + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/DocumentWithSegments' + description: A Document object. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Retrieve a Document + tags: + - Documents + 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 + requestBody: + $ref: '#/components/requestBodies/DocumentParameters' + content: + application/json: schema: example: project_id: 23618 @@ -940,8 +1467,7 @@ paths: - description: | An optional parameter indicating if and how the document will be pretranslated upon being uploaded. - - The accepted values are `null`, `tm`, or `tm+mt` + The accepted values are `TM`, or `TM+MT` in: header name: pretranslate schema: @@ -956,6 +1482,21 @@ paths: 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. @@ -1012,10 +1553,27 @@ paths: "documentIds": [23921, 23922] }' ``` + 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 @@ -1026,8 +1584,7 @@ paths: application/json: schema: items: - description: TODO default missing array inner type to string - type: string + type: number title: DocumentDoneResponse type: array description: array of updated documents @@ -1059,18 +1616,26 @@ paths: "isDone": true }' ``` + operationId: markTranslationDone requestBody: - $ref: '#/components/requestBodies/DocumentDoneUpdateParameters' + $ref: '#/components/requestBodies/DocumentDoneUpdateParameters_1' content: application/json: schema: - example: - isDone: true 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 @@ -1082,8 +1647,7 @@ paths: application/json: schema: items: - description: TODO default missing array inner type to string - type: string + type: number title: DocumentDoneResponse type: array description: array of updated documents @@ -1113,16 +1677,26 @@ paths: "isDone": true }' ``` + operationId: markReviewDone requestBody: - $ref: '#/components/requestBodies/DocumentDoneUpdateParameters_1' + $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 @@ -1134,8 +1708,7 @@ paths: application/json: schema: items: - description: TODO default missing array inner type to string - type: string + type: number title: DocumentDoneResponse type: array description: array of updated documents @@ -1350,7 +1923,7 @@ paths: not shared across users - unless you explicitly share a Memory with your team (via web app only). - Refer + Refer to our KB for a more detailed description. operationId: createMemory @@ -1540,253 +2113,800 @@ paths: in: query name: when schema: - type: string + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MemorySyncDeleteResponse' + description: A status object. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Delete-sync for a Memory + tags: + - Memories + 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). + + Example CURL command: + ``` + curl -X GET https://lilt.com/2/memories/sync?key=API_KEY&id=42 -o from_lilt.tmx + ``` + + operationId: syncDownMemory + parameters: + - description: A unique Memory identifier. + 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`. If this parameter is omitted, then + the whole Memory is returned.' + in: query + name: when + schema: + type: string + responses: + "200": + content: + application/x-tmx: + schema: + format: byte + title: MemorySyncResponse + type: string + description: A TMX 1.4b file. + default: + content: + application/x-tmx: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Get-sync for a Memory + tags: + - Memories + x-accepts: application/x-tmx + 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`. + + 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 + ``` + + operationId: syncInsertMemory + parameters: + - description: A unique Memory identifier. + in: header + name: id + required: true + schema: + type: integer + - description: Name of the TMX file. + in: header + name: name + 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 + schema: + type: integer + - description: Unix time stamp (epoch, in seconds) of the start of the Memory + section. + in: header + name: from_time + schema: + type: integer + - description: Unix time stamp (epoch, in seconds) of the end of the Memory + section. + in: header + name: to_time + schema: + type: integer + - description: 'The date field on which retrieved segments match from/to time + stamps: `created`, `updated`, `deleted`.' + in: header + name: when + schema: + type: string + requestBody: + content: + application/json: + schema: + title: MemoryUpdateBody + type: string + description: The file contents to be uploaded. The entire PUT body will be + treated as the file. + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/MemoryUpdateResponse' + description: A status object. + default: + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error + summary: Update-sync for a Memory + tags: + - Memories + x-codegen-request-body-name: body + x-contentType: application/json + 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`. + + 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 + ``` + + operationId: importMemoryFile + 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 + 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 + responses: + "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: + - 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: + + ``` + curl -X GET 'https://lilt.com/2/jobs?key=API_KEY&isArchived=false' + ``` + operationId: retrieveAllJobs + parameters: + - description: Retrieves all jobs that are archived. + in: query + name: isArchived + schema: + type: boolean + 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 + tags: + - Jobs + 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: + + ``` + 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" } + ] + }' + ``` + + operationId: createJob + requestBody: + $ref: '#/components/requestBodies/JobCreateParameters' + 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 + 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), 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 + 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 + 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 + tags: + - Jobs + x-codegen-request-body-name: body + 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/MemorySyncDeleteResponse' - 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: Delete-sync for a Memory + summary: Unarchive a Job tags: - - Memories + - Jobs 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). + /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 GET https://lilt.com/2/memories/sync?key=API_KEY&id=42 -o from_lilt.tmx + curl -X POST 'https://lilt.com/2/jobs/{id}/deliver?key=API_KEY' ``` - - operationId: syncDownMemory + operationId: deliverJob parameters: - - description: A unique Memory identifier. - in: query - name: id + - description: A job id. + in: path + name: jobId 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`. If this parameter is omitted, then - the whole Memory is returned.' - in: query - name: when - schema: - type: string responses: "200": content: - application/x-tmx: + application/json: schema: - format: byte - title: MemorySyncResponse - type: string - description: A TMX 1.4b file. + $ref: '#/components/schemas/Job' + description: A job object. default: content: - application/x-tmx: + application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Get-sync for a Memory + summary: Deliver a Job tags: - - Memories - x-accepts: application/x-tmx + - Jobs + x-accepts: application/json + /jobs/{jobId}/reactivate: 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`. + 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/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://lilt.com/2/jobs/{id}/reactivate?key=API_KEY' ``` - - operationId: syncInsertMemory + operationId: reactivateJob parameters: - - description: A unique Memory identifier. - in: header - name: id + - description: A job id. + in: path + name: jobId required: true schema: type: integer - - description: Name of the TMX file. - in: header - name: name - 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. + $ref: '#/components/schemas/Job' + description: A job object. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Insert-sync for a Memory + summary: Reactivate a Job tags: - - Memories - x-codegen-request-body-name: body - x-contentType: application/octet-stream + - Jobs 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. + /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 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 + curl -X GET 'https://lilt.com/2/jobs/{id}/export?key=API_KEY&type=files' ``` - operationId: syncUpdateMemory + 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: header - name: id + - description: A job id. + in: path + name: jobId required: true schema: type: integer - - description: Unix time stamp (epoch, in seconds) of the start of the Memory - section. - in: header - name: from_time - schema: - type: integer - - description: Unix time stamp (epoch, in seconds) of the end of the Memory - section. - in: header - name: to_time - schema: - type: integer - - description: 'The date field on which retrieved segments match from/to time - stamps: `created`, `updated`, `deleted`.' - in: header - name: when + - description: category for files and memory. + in: query + name: type + required: true schema: type: string - requestBody: - content: - application/json: - schema: - title: MemoryUpdateBody - type: string - description: The file contents to be uploaded. The entire PUT body will be - treated as the file. - required: true responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/MemoryUpdateResponse' - description: A status object. + content: {} + description: 200 status. default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: Update-sync for a Memory + summary: Export a Job tags: - - Memories - x-codegen-request-body-name: body - x-contentType: application/json + - Jobs 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`. + /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: - 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 + curl -X GET 'https://lilt.com/2/jobs/{id}/download?key=API_KEY' ``` - - operationId: importMemoryFile + operationId: downloadJob parameters: - - description: A unique Memory identifier. - in: header - name: memory_id + - description: A job id. + in: path + name: jobId required: true schema: type: integer - - description: Name of the TM or termbase file. - in: header - name: name - required: true - schema: - type: string - 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 responses: "200": - content: - application/json: - schema: - $ref: '#/components/schemas/MemoryImportResponse' - description: A status object. + content: {} + description: zipped file default: content: application/json: schema: $ref: '#/components/schemas/Error' description: Unexpected error - summary: File import for a Memory + summary: Download a Job tags: - - Memories - x-codegen-request-body-name: body - x-contentType: application/octet-stream + - Jobs x-accepts: application/json /projects: delete: @@ -1905,11 +3025,8 @@ paths: connectorType: github notes: example metadata memory_id: 1234 + job_id: 1234 name: My new project - file_ids: - - 123 - - 124 - - 125 due_date: 1489147692 properties: name: @@ -1920,15 +3037,13 @@ paths: description: The Memory to associate with this new Project. example: 1234 type: integer - file_ids: - description: A list of Files to add to this new Project. - example: - - 123 - - 124 - - 125 - items: - type: integer - type: array + 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 @@ -2080,6 +3195,36 @@ paths: 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: |+ @@ -2138,6 +3283,13 @@ paths: 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: @@ -2309,26 +3461,81 @@ paths: example: Enable debug code type: string required: - - id - - target - title: SegmentUpdateParameters + - 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: The Segment resource to update. + description: segment ids 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 + 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 @@ -2380,6 +3587,145 @@ paths: 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: |+ @@ -2394,6 +3740,8 @@ paths: 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. @@ -2445,6 +3793,21 @@ paths: 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: @@ -2461,6 +3824,8 @@ paths: summary: Translate a segment tags: - Translate + x-codegen-request-body-name: body + x-contentType: application/json x-accepts: application/json /translate/register: get: @@ -2564,7 +3929,7 @@ paths: Example CURL: ``` - curl --X --request POST 'https://lilt.com/2/translate/file?key=API_KEY&fileId=583&memoryId=2495&configId=123' + curl --X --request POST 'https://lilt.com/2/translate/file?key=API_KEY&fileId=583&memoryId=2495&configId=123&withTM=true' ``` operationId: batchTranslateFile @@ -2587,6 +3952,12 @@ paths: 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: @@ -2649,12 +4020,24 @@ components: 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: @@ -2673,6 +4056,12 @@ components: 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: @@ -2685,6 +4074,18 @@ components: 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: @@ -2697,6 +4098,18 @@ components: 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: @@ -2727,6 +4140,12 @@ components: schema: $ref: '#/components/schemas/ProjectUpdateResponse' required: true + AddFileLabelRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/AddFileLabelRequest' + required: true schemas: TranslationInfo: description: | @@ -2793,30 +4212,402 @@ components: type: object created_at: type: string - updated_at: + 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 - ConnectorJob: + LanguagePair: description: | - A ConnectorJob tracks the status of an import or export action. + A language pair couples the source and target language along with memory and pre-translations settings associated to a project. example: - args: '{}' - updated_at: updated_at - created_at: created_at - id: 0 - status: status + 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: - id: - type: integer - status: + srcLang: + description: Source langauge, an ISO 639-1 language identifier. + example: en type: string - args: - properties: {} - type: object - created_at: + srcLocale: + description: A locale identifier, supported for source langauge. + example: US type: string - updated_at: + 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: | @@ -2871,6 +4662,7 @@ components: memory_id: 1234 updated_at: 1489147692 sample_review_percentage: 20 + job_id: 1234 name: My New Project id: 448 state: backlog @@ -2884,6 +4676,10 @@ components: 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 @@ -3271,11 +5067,10 @@ components: example: detected_lang_confidence: 0.7 file_hash: 3858f62230ac3c915f300c664312c63f - updated_at: 1489147692 + updated_at: 2000-01-23T04:56:07.000+00:00 name: en_US.json - created_at: 1489147692 + created_at: 2000-01-23T04:56:07.000+00:00 id: 46530 - export_uri: https://example.com/export category: REFERENCE detected_lang: de labels: [] @@ -3293,11 +5088,6 @@ components: the file content will be used by default. example: 3858f62230ac3c915f300c664312c63f type: string - export_uri: - description: A webhook endpoint that will export the translated document - back to the source repository. - example: https://example.com/export - type: string detected_lang: description: Language associated with the file. example: de @@ -3319,15 +5109,13 @@ components: type: string type: array created_at: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - example: 1489147692 - type: integer + description: Time at which the object was created. + format: date-time + type: string updated_at: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - example: 1489147692 - type: integer + description: Time at which the object was created. + format: date-time + type: string type: object DocumentWithoutSegments: description: | @@ -3541,6 +5329,22 @@ components: $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. @@ -3914,22 +5718,28 @@ components: is_reviewed: true memory_id: 5678 comments: - - user_id: 5678 - is_resolved: true + - is_resolved: true + user_id: 5678 + segment_revision_id: 5678 annotations: - text: mistranslation - text: mistranslation created_at: 1489147692 id: 84480010 text: This is incorrect. - - user_id: 5678 - is_resolved: true + 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 @@ -3996,14 +5806,17 @@ components: description: | A Comment is a translator's or a reviewer's comment on a segment. example: - user_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 properties: id: description: A unique number identifying the Comment. @@ -4013,25 +5826,94 @@ components: description: The comment text. example: This is incorrect. type: string - user_id: - description: The User who created this Comment. - example: 5678 - type: integer - is_resolved: - description: Whether the Comment is resolved. - example: true - type: boolean 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 + type: integer created_at: description: Time at which the object was created. Measured in seconds since the Unix epoch. example: 1489147692 type: integer type: object + CommentBody: + description: | + The body of a comment being created or updated. + example: + annotations: + - text: mistranslation + - text: mistranslation + text: Please update this segment + isResolved: "false" + 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" + type: string + type: object + DocumentComments: + description: | + A set of comments for a given document, grouped with Segment ID as the key. + 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 + properties: + "1234567": + items: + $ref: '#/components/schemas/Comment' + type: array + type: object Annotation: description: | A Comment's annotation. @@ -4088,6 +5970,9 @@ components: QARuleMatches: description: QA rules describing the errors in the text. example: + custom_rules: + - description: Mistake detected by a custom rule. + - description: Mistake detected by a custom rule. matches: - offset: 19 context: @@ -4136,6 +6021,98 @@ components: items: $ref: '#/components/schemas/QARuleMatches_matches' type: array + custom_rules: + items: + $ref: '#/components/schemas/QARuleMatches_custom_rules' + 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. + example: + isUserFacing: true + isDefault: true + valueType: valueType + name: name + id: 0 + properties: + id: + description: The identifier of the setting. + format: int32 + type: integer + name: + description: The name of the setting. + type: string + valueType: + description: the type of value the setting may have - Boolean, Json, Number, + String. + type: string + isUserFacing: + description: Whether the setting is editable by the user. + type: boolean + isDefault: + description: True when the setting value is inherited from the default setting. + 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 + type: string + scope: + description: The entity scope the setting should be applied to. + example: Organization + type: string + isEnforced: + description: | + Whether this value should override others set for the same setting key. + 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: @@ -4165,6 +6142,26 @@ components: 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: + example: + id: 12345 + properties: + id: + description: A unique Comment identifier. + example: 12345 + type: integer + title: CommentDeleteResponse + type: object ConnectorArguments: example: args: '{}' @@ -4220,6 +6217,84 @@ components: 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: + type: integer + title: ConverterConfigUpdateResponse + type: object + inline_response_200: + example: + configId: 0 + properties: + configId: + 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": []}' + 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 DocumentUpdateParameters: example: name: Introduction to our App @@ -4402,21 +6477,55 @@ components: type: object DocumentDoneUpdateParameters: example: - isDone: true + 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_1: + DocumentDoneUpdateParameters_2: 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 @@ -4625,6 +6734,90 @@ components: type: integer title: MemoryImportResponse type: object + JobCreateParameters: + 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 + 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), + 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 + type: object + JobUpdateParameters: + 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 + JobDeleteResponse: + example: + id: 241 + properties: + id: + description: A unique Project identifier. + example: 241 + type: integer + title: JobDeleteResponse + type: object ProjectUpdateResponse: example: archived: false @@ -4682,11 +6875,8 @@ components: connectorType: github notes: example metadata memory_id: 1234 + job_id: 1234 name: My new project - file_ids: - - 123 - - 124 - - 125 due_date: 1489147692 properties: name: @@ -4697,15 +6887,13 @@ components: description: The Memory to associate with this new Project. example: 1234 type: integer - file_ids: - description: A list of Files to add to this new Project. - example: - - 123 - - 124 - - 125 - items: - type: integer - type: array + 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 @@ -4798,6 +6986,33 @@ components: 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 + type: object + TranslateSegmentBody: + example: + source: source + properties: + source: + description: A unique Segment identifier. + type: string + title: TranslateSegmentBody + type: object TranslateRegisterResponse: example: num_words: 88 @@ -4814,6 +7029,35 @@ components: 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 + type: object DocumentWithoutSegments_status: description: A list of translations for the query term. example: @@ -5089,6 +7333,15 @@ components: - 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/AddFileLabelRequest.md b/docs/AddFileLabelRequest.md new file mode 100644 index 000000000..e39100106 --- /dev/null +++ b/docs/AddFileLabelRequest.md @@ -0,0 +1,12 @@ + + +# AddFileLabelRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | The Label name. | [optional] + + + diff --git a/docs/Comment.md b/docs/Comment.md index b60b3d037..0285dd2c2 100644 --- a/docs/Comment.md +++ b/docs/Comment.md @@ -9,9 +9,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **Integer** | A unique number identifying the Comment. | [optional] **text** | **String** | The comment text. | [optional] -**userId** | **Integer** | The User who created this Comment. | [optional] -**isResolved** | **Boolean** | Whether the Comment is resolved. | [optional] **annotations** | [**List<Annotation>**](Annotation.md) | A list of optional Annotations. | [optional] +**isResolved** | **Boolean** | Whether the Comment is resolved. | [optional] +**documentId** | **Integer** | The document to which the comment belongs. | [optional] +**segmentId** | **Integer** | The individual segment to which the comment applies. | [optional] +**segmentRevisionId** | **Integer** | The revision of the individual segment to which the comment applies. | [optional] +**userId** | **Integer** | The user who created this comment. | [optional] **createdAt** | **Integer** | Time at which the object was created. Measured in seconds since the Unix epoch. | [optional] diff --git a/docs/CommentBody.md b/docs/CommentBody.md new file mode 100644 index 000000000..98167d6db --- /dev/null +++ b/docs/CommentBody.md @@ -0,0 +1,15 @@ + + +# CommentBody + +The body of a comment being created or updated. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | **String** | The main comment value. | [optional] +**annotations** | [**List<Annotation>**](Annotation.md) | A list of optional Annotations. | [optional] +**isResolved** | **String** | | [optional] + + + diff --git a/docs/CommentDeleteResponse.md b/docs/CommentDeleteResponse.md new file mode 100644 index 000000000..1e8dd864b --- /dev/null +++ b/docs/CommentDeleteResponse.md @@ -0,0 +1,12 @@ + + +# CommentDeleteResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Integer** | A unique Comment identifier. | [optional] + + + diff --git a/docs/CommentsApi.md b/docs/CommentsApi.md new file mode 100644 index 000000000..7a34df1f2 --- /dev/null +++ b/docs/CommentsApi.md @@ -0,0 +1,322 @@ +# CommentsApi + +All URIs are relative to *https://lilt.com/2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createComment**](CommentsApi.md#createComment) | **POST** /comments | Create a new comment +[**deleteComment**](CommentsApi.md#deleteComment) | **DELETE** /comments | Delete a Comment +[**getDocumentComments**](CommentsApi.md#getDocumentComments) | **GET** /comments | Retrieve a document's comments by segment +[**updateComment**](CommentsApi.md#updateComment) | **PUT** /comments | Update an existing comment + + + +# **createComment** +> Comment createComment(documentId, segmentId, body) + +Create a new comment + +Create a new comment for the specified Segment ID. + +### 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.CommentsApi; + +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"); + + 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 + try { + Comment result = apiInstance.createComment(documentId, segmentId, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CommentsApi#createComment"); + 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 +------------- | ------------- | ------------- | ------------- + **documentId** | **Integer**| A unique document identifier. | + **segmentId** | **Integer**| A unique segment identifier. | + **body** | [**CommentBody**](CommentBody.md)| The comment being created | + +### Return type + +[**Comment**](Comment.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 | +|-------------|-------------|------------------| +**201** | A Comment object. | - | +**0** | Unexpected error | - | + + +# **deleteComment** +> CommentDeleteResponse deleteComment(commentId) + +Delete a Comment + +Delete a Comment. Example CURL command: ``` curl -X DELETE https://lilt.com/2/comments?key=API_KEY&comment_id=123 ``` + +### 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.CommentsApi; + +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"); + + CommentsApi apiInstance = new CommentsApi(defaultClient); + Integer commentId = 56; // Integer | A unique Comment identifier. + try { + CommentDeleteResponse result = apiInstance.deleteComment(commentId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CommentsApi#deleteComment"); + 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 +------------- | ------------- | ------------- | ------------- + **commentId** | **Integer**| A unique Comment identifier. | + +### Return type + +[**CommentDeleteResponse**](CommentDeleteResponse.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 | +|-------------|-------------|------------------| +**204** | A status object. | - | +**0** | Unexpected error | - | + + +# **getDocumentComments** +> DocumentComments getDocumentComments(documentId) + +Retrieve a document's comments by segment + +Retrieves all comments associated with a specified document, grouped by their Segment's ID. To retrieve a document's comments, specify the <strong>document_id</strong> request parameter. Example CURL command: ``` curl -X GET https://lilt.com/2/comments?key=API_KEY&document_id=123 ``` + +### 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.CommentsApi; + +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"); + + CommentsApi apiInstance = new CommentsApi(defaultClient); + Integer documentId = 56; // Integer | A unique document identifier. + try { + DocumentComments result = apiInstance.getDocumentComments(documentId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CommentsApi#getDocumentComments"); + 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 +------------- | ------------- | ------------- | ------------- + **documentId** | **Integer**| A unique document identifier. | + +### Return type + +[**DocumentComments**](DocumentComments.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 containing lists of comments identified by the id of the segment to which they belong. | - | +**403** | Unauthorized. | - | +**410** | Comment deleted. | - | +**0** | Unexpected error. | - | + + +# **updateComment** +> Comment updateComment(commentId, documentId, body) + +Update an existing comment + +Update an existing comment. + +### 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.CommentsApi; + +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"); + + CommentsApi apiInstance = new CommentsApi(defaultClient); + Integer commentId = 56; // Integer | A unique comment identifier. + Integer documentId = 56; // Integer | A unique document identifier. + CommentBody body = new CommentBody(); // CommentBody | The comment being updated. + try { + Comment result = apiInstance.updateComment(commentId, documentId, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CommentsApi#updateComment"); + 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 +------------- | ------------- | ------------- | ------------- + **commentId** | **Integer**| A unique comment identifier. | + **documentId** | **Integer**| A unique document identifier. | + **body** | [**CommentBody**](CommentBody.md)| The comment being updated. | + +### Return type + +[**Comment**](Comment.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 | +|-------------|-------------|------------------| +**201** | A Comment object. | - | +**0** | Unexpected error | - | + diff --git a/docs/ConnectorsApi.md b/docs/ConnectorsApi.md index 8953395f4..b36c3898c 100644 --- a/docs/ConnectorsApi.md +++ b/docs/ConnectorsApi.md @@ -7,7 +7,7 @@ Method | HTTP request | Description [**createConnector**](ConnectorsApi.md#createConnector) | **POST** /connectors | Upload a Connector [**deleteConnector**](ConnectorsApi.md#deleteConnector) | **DELETE** /connectors | Delete a Connector [**exportConnectorJob**](ConnectorsApi.md#exportConnectorJob) | **POST** /connectors/jobs/deliver | Deliver a Connector Job -[**getConnectorJobs**](ConnectorsApi.md#getConnectorJobs) | **GET** /connectors/jobs | Retreive a Connector Job +[**getConnectorJobs**](ConnectorsApi.md#getConnectorJobs) | **GET** /connectors/jobs | Retrieve a Connector Job [**getConnectors**](ConnectorsApi.md#getConnectors) | **GET** /connectors | Retrieve a Connector [**syncConnector**](ConnectorsApi.md#syncConnector) | **POST** /connectors/sync | Sync a Connector [**updateConnector**](ConnectorsApi.md#updateConnector) | **PUT** /connectors | Upload a Connector @@ -241,7 +241,7 @@ null (empty response body) # **getConnectorJobs** > List<ConnectorJob> getConnectorJobs(id) -Retreive a Connector Job +Retrieve a Connector Job 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. Example CURL command: ``` curl -X GET https://lilt.com/2/connectors/jobs?key=API_KEY&id=9274 ``` diff --git a/docs/ConverterConfigApi.md b/docs/ConverterConfigApi.md new file mode 100644 index 000000000..a01508c50 --- /dev/null +++ b/docs/ConverterConfigApi.md @@ -0,0 +1,472 @@ +# ConverterConfigApi + +All URIs are relative to *https://lilt.com/2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addConverterConfig**](ConverterConfigApi.md#addConverterConfig) | **PUT** /configs/converter | Add Converter Config +[**deleteConverterConfig**](ConverterConfigApi.md#deleteConverterConfig) | **DELETE** /configs/converter/{configId} | Delete Converter Config +[**deleteFilterMapping**](ConverterConfigApi.md#deleteFilterMapping) | **DELETE** /configs/converter/{configId}/{fileExtension} | Delete Filter Mapping +[**editFilterMapping**](ConverterConfigApi.md#editFilterMapping) | **PUT** /configs/converter/{configId}/{fileExtension} | Add Filter Mapping +[**getConverterConfigById**](ConverterConfigApi.md#getConverterConfigById) | **GET** /configs/converter/{configId} | Fetch Converter Config by Id +[**getConverterConfigs**](ConverterConfigApi.md#getConverterConfigs) | **GET** /configs/converter | List Converter Configs + + + +# **addConverterConfig** +> ConverterConfigUpdateResponse addConverterConfig(organizationId, body) + +Add Converter Config + +Add a file filter configuration for your Organization. + +### 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.ConverterConfigApi; + +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"); + + ConverterConfigApi apiInstance = new ConverterConfigApi(defaultClient); + Integer organizationId = 56; // Integer | A unique Organization identifier. + CreateConverterConfigParameters body = new CreateConverterConfigParameters(); // CreateConverterConfigParameters | + try { + ConverterConfigUpdateResponse result = apiInstance.addConverterConfig(organizationId, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ConverterConfigApi#addConverterConfig"); + 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 +------------- | ------------- | ------------- | ------------- + **organizationId** | **Integer**| A unique Organization identifier. | + **body** | [**CreateConverterConfigParameters**](CreateConverterConfigParameters.md)| | [optional] + +### Return type + +[**ConverterConfigUpdateResponse**](ConverterConfigUpdateResponse.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 config id of the configuration created. | - | +**0** | Unexpected error | - | + + +# **deleteConverterConfig** +> InlineResponse200 deleteConverterConfig(configId) + +Delete Converter Config + +Delete a file filter configuration by id. + +### 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.ConverterConfigApi; + +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"); + + ConverterConfigApi apiInstance = new ConverterConfigApi(defaultClient); + Integer configId = 56; // Integer | A unique configuration identifier. + try { + InlineResponse200 result = apiInstance.deleteConverterConfig(configId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ConverterConfigApi#deleteConverterConfig"); + 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 +------------- | ------------- | ------------- | ------------- + **configId** | **Integer**| A unique configuration identifier. | + +### 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 config id of the configuration deleted. | - | +**0** | Unexpected error | - | + + +# **deleteFilterMapping** +> Map<String, String> deleteFilterMapping(configId, fileExtension) + +Delete Filter Mapping + +Delete a file filter mapping by id and file extension. + +### 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.ConverterConfigApi; + +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"); + + ConverterConfigApi apiInstance = new ConverterConfigApi(defaultClient); + Integer configId = 56; // Integer | A unique configuration identifier. + String fileExtension = "fileExtension_example"; // String | A file extension to delete. + try { + Map result = apiInstance.deleteFilterMapping(configId, fileExtension); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ConverterConfigApi#deleteFilterMapping"); + 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 +------------- | ------------- | ------------- | ------------- + **configId** | **Integer**| A unique configuration identifier. | + **fileExtension** | **String**| A file extension to delete. | + +### Return type + +**Map<String, String>** + +### 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 map of config id to string escaped config json. | - | +**0** | Unexpected error | - | + + +# **editFilterMapping** +> Map<String, String> editFilterMapping(configId, fileExtension, body) + +Add Filter Mapping + +Add a specific filter mapping to your file filter configuration + +### 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.ConverterConfigApi; + +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"); + + ConverterConfigApi apiInstance = new ConverterConfigApi(defaultClient); + Integer configId = 56; // Integer | A unique configuration identifier. + String fileExtension = "fileExtension_example"; // String | A file extension for the filter mapping. + EditFilterMappingParameters body = new EditFilterMappingParameters(); // EditFilterMappingParameters | + try { + Map result = apiInstance.editFilterMapping(configId, fileExtension, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ConverterConfigApi#editFilterMapping"); + 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 +------------- | ------------- | ------------- | ------------- + **configId** | **Integer**| A unique configuration identifier. | + **fileExtension** | **String**| A file extension for the filter mapping. | + **body** | [**EditFilterMappingParameters**](EditFilterMappingParameters.md)| | [optional] + +### Return type + +**Map<String, String>** + +### 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 map of config id to string escaped config json. | - | +**0** | Unexpected error | - | + + +# **getConverterConfigById** +> Map<String, String> getConverterConfigById(configId) + +Fetch Converter Config by Id + +Fetch a file filter configuration by id. + +### 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.ConverterConfigApi; + +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"); + + ConverterConfigApi apiInstance = new ConverterConfigApi(defaultClient); + Integer configId = 56; // Integer | A unique configuration identifier. + try { + Map result = apiInstance.getConverterConfigById(configId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ConverterConfigApi#getConverterConfigById"); + 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 +------------- | ------------- | ------------- | ------------- + **configId** | **Integer**| A unique configuration identifier. | + +### Return type + +**Map<String, String>** + +### 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 map of config id to string escaped config json. | - | +**0** | Unexpected error | - | + + +# **getConverterConfigs** +> Map<String, String> getConverterConfigs(organizationId) + +List Converter Configs + +List all file filter configurations for your Organization. + +### 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.ConverterConfigApi; + +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"); + + ConverterConfigApi apiInstance = new ConverterConfigApi(defaultClient); + Integer organizationId = 56; // Integer | A unique Organization identifier. + try { + Map result = apiInstance.getConverterConfigs(organizationId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling ConverterConfigApi#getConverterConfigs"); + 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 +------------- | ------------- | ------------- | ------------- + **organizationId** | **Integer**| A unique Organization identifier. | + +### Return type + +**Map<String, String>** + +### 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 map of config id to string escaped config json. | - | +**0** | Unexpected error | - | + diff --git a/docs/ConverterConfigUpdateResponse.md b/docs/ConverterConfigUpdateResponse.md new file mode 100644 index 000000000..aa98340b1 --- /dev/null +++ b/docs/ConverterConfigUpdateResponse.md @@ -0,0 +1,12 @@ + + +# ConverterConfigUpdateResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**configId** | **Integer** | | [optional] + + + diff --git a/docs/CreateConverterConfigParameters.md b/docs/CreateConverterConfigParameters.md new file mode 100644 index 000000000..a51fa6794 --- /dev/null +++ b/docs/CreateConverterConfigParameters.md @@ -0,0 +1,14 @@ + + +# CreateConverterConfigParameters + +## Properties + +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. | + + + diff --git a/docs/DocumentComments.md b/docs/DocumentComments.md new file mode 100644 index 000000000..2cbbce190 --- /dev/null +++ b/docs/DocumentComments.md @@ -0,0 +1,13 @@ + + +# DocumentComments + +A set of comments for a given document, grouped with Segment ID as the key. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_1234567** | [**List<Comment>**](Comment.md) | | [optional] + + + diff --git a/docs/DocumentDoneUpdateParameters.md b/docs/DocumentDoneUpdateParameters.md index abc03bcf8..a8562acbf 100644 --- a/docs/DocumentDoneUpdateParameters.md +++ b/docs/DocumentDoneUpdateParameters.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**isDone** | **Boolean** | | +**documentIds** | **List<BigDecimal>** | array of document ids | diff --git a/docs/DocumentDoneUpdateParameters1.md b/docs/DocumentDoneUpdateParameters1.md index 089e28d0e..8543be990 100644 --- a/docs/DocumentDoneUpdateParameters1.md +++ b/docs/DocumentDoneUpdateParameters1.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**documentIds** | **List<BigDecimal>** | array of document ids | **isDone** | **Boolean** | | diff --git a/docs/DocumentDoneUpdateParameters2.md b/docs/DocumentDoneUpdateParameters2.md new file mode 100644 index 000000000..a2e57d982 --- /dev/null +++ b/docs/DocumentDoneUpdateParameters2.md @@ -0,0 +1,13 @@ + + +# DocumentDoneUpdateParameters2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**documentIds** | **List<BigDecimal>** | array of document ids | +**isDone** | **Boolean** | | + + + diff --git a/docs/DocumentsApi.md b/docs/DocumentsApi.md index 352702daa..69aef08df 100644 --- a/docs/DocumentsApi.md +++ b/docs/DocumentsApi.md @@ -7,12 +7,12 @@ 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 -[**documentsDoneReviewPost**](DocumentsApi.md#documentsDoneReviewPost) | **POST** /documents/done/review | Mark review done -[**documentsDoneTranslationPost**](DocumentsApi.md#documentsDoneTranslationPost) | **POST** /documents/done/translation | Mark translation done -[**documentsDoneUnlockPost**](DocumentsApi.md#documentsDoneUnlockPost) | **POST** /documents/done/unlock | Unlock documents [**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 @@ -242,13 +242,13 @@ Name | Type | Description | Notes **200** | A status object. | - | **0** | Unexpected error | - | - -# **documentsDoneReviewPost** -> List<String> documentsDoneReviewPost(body) + +# **downloadDocument** +> byte[] downloadDocument(id, isXliff) -Mark review done +Download a Document -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 }' ``` +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 ``` ### Example ```java @@ -277,12 +277,13 @@ public class Example { BasicAuth.setPassword("YOUR PASSWORD"); DocumentsApi apiInstance = new DocumentsApi(defaultClient); - DocumentDoneUpdateParameters1 body = new DocumentDoneUpdateParameters1(); // DocumentDoneUpdateParameters1 | + Integer id = 56; // Integer | An unique Document identifier. + Boolean isXliff = true; // Boolean | Download the document in XLIFF 1.2 format. try { - List result = apiInstance.documentsDoneReviewPost(body); + byte[] result = apiInstance.downloadDocument(id, isXliff); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DocumentsApi#documentsDoneReviewPost"); + System.err.println("Exception when calling DocumentsApi#downloadDocument"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -296,11 +297,12 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**DocumentDoneUpdateParameters1**](DocumentDoneUpdateParameters1.md)| | + **id** | **Integer**| An unique Document identifier. | + **isXliff** | **Boolean**| Download the document in XLIFF 1.2 format. | [optional] [default to true] ### Return type -**List<String>** +**byte[]** ### Authorization @@ -308,21 +310,23 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json + - **Content-Type**: Not defined + - **Accept**: application/octet-stream ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | array of updated documents | - | +**200** | A file. | - | +**502** | File in pretranslation. | - | +**0** | Unexpected error | - | - -# **documentsDoneTranslationPost** -> List<String> documentsDoneTranslationPost(body) + +# **getDocument** +> DocumentWithSegments getDocument(id, withSegments) -Mark translation done +Retrieve a Document -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 }' ``` +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 @@ -351,12 +355,13 @@ public class Example { BasicAuth.setPassword("YOUR PASSWORD"); DocumentsApi apiInstance = new DocumentsApi(defaultClient); - DocumentDoneUpdateParameters body = new DocumentDoneUpdateParameters(); // DocumentDoneUpdateParameters | + Integer id = 56; // Integer | A unique Document identifier. + Boolean withSegments = true; // Boolean | Flag indicating whether full segment information should be returned. try { - List result = apiInstance.documentsDoneTranslationPost(body); + DocumentWithSegments result = apiInstance.getDocument(id, withSegments); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DocumentsApi#documentsDoneTranslationPost"); + 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()); @@ -370,11 +375,12 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**DocumentDoneUpdateParameters**](DocumentDoneUpdateParameters.md)| | + **id** | **Integer**| A unique Document identifier. | + **withSegments** | **Boolean**| Flag indicating whether full segment information should be returned. | [optional] ### Return type -**List<String>** +[**DocumentWithSegments**](DocumentWithSegments.md) ### Authorization @@ -382,21 +388,22 @@ 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** | array of updated documents | - | +**200** | A Document object. | - | +**0** | Unexpected error | - | - -# **documentsDoneUnlockPost** -> List<String> documentsDoneUnlockPost(body) + +# **markReviewDone** +> List<BigDecimal> markReviewDone(body) -Unlock documents +Mark review done -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] }' ``` +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 @@ -425,12 +432,12 @@ public class Example { BasicAuth.setPassword("YOUR PASSWORD"); DocumentsApi apiInstance = new DocumentsApi(defaultClient); - Object body = null; // Object | document ids to update + DocumentDoneUpdateParameters2 body = new DocumentDoneUpdateParameters2(); // DocumentDoneUpdateParameters2 | try { - List result = apiInstance.documentsDoneUnlockPost(body); + List result = apiInstance.markReviewDone(body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DocumentsApi#documentsDoneUnlockPost"); + 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()); @@ -444,11 +451,11 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | **Object**| document ids to update | + **body** | [**DocumentDoneUpdateParameters2**](DocumentDoneUpdateParameters2.md)| | ### Return type -**List<String>** +[**List<BigDecimal>**](BigDecimal.md) ### Authorization @@ -464,13 +471,13 @@ Name | Type | Description | Notes |-------------|-------------|------------------| **200** | array of updated documents | - | - -# **downloadDocument** -> byte[] downloadDocument(id, isXliff) + +# **markTranslationDone** +> List<BigDecimal> markTranslationDone(body) -Download a Document +Mark translation done -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 ``` +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 @@ -499,13 +506,12 @@ public class Example { BasicAuth.setPassword("YOUR PASSWORD"); DocumentsApi apiInstance = new DocumentsApi(defaultClient); - Integer id = 56; // Integer | An unique Document identifier. - Boolean isXliff = true; // Boolean | Download the document in XLIFF 1.2 format. + DocumentDoneUpdateParameters1 body = new DocumentDoneUpdateParameters1(); // DocumentDoneUpdateParameters1 | try { - byte[] result = apiInstance.downloadDocument(id, isXliff); + List result = apiInstance.markTranslationDone(body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DocumentsApi#downloadDocument"); + 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()); @@ -519,12 +525,11 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **Integer**| An unique Document identifier. | - **isXliff** | **Boolean**| Download the document in XLIFF 1.2 format. | [optional] [default to true] + **body** | [**DocumentDoneUpdateParameters1**](DocumentDoneUpdateParameters1.md)| | ### Return type -**byte[]** +[**List<BigDecimal>**](BigDecimal.md) ### Authorization @@ -532,23 +537,21 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/octet-stream + - **Content-Type**: application/json + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | A file. | - | -**502** | File in pretranslation. | - | -**0** | Unexpected error | - | +**200** | array of updated documents | - | - -# **getDocument** -> DocumentWithSegments getDocument(id, withSegments) + +# **pretranslateDocuments** +> DocumentPretranslateResponse pretranslateDocuments(body, autoAccept, caseSensitive, attributeToCreator, mode) -Retrieve a Document +Pretranslate 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`. +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 @@ -577,13 +580,16 @@ public class Example { 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. + 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 { - DocumentWithSegments result = apiInstance.getDocument(id, withSegments); + DocumentPretranslateResponse result = apiInstance.pretranslateDocuments(body, autoAccept, caseSensitive, attributeToCreator, mode); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DocumentsApi#getDocument"); + 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()); @@ -597,12 +603,15 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **Integer**| A unique Document identifier. | - **withSegments** | **Boolean**| Flag indicating whether full segment information should be returned. | [optional] + **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 -[**DocumentWithSegments**](DocumentWithSegments.md) +[**DocumentPretranslateResponse**](DocumentPretranslateResponse.md) ### Authorization @@ -610,22 +619,22 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | A Document object. | - | +**202** | A status object. | - | **0** | Unexpected error | - | - -# **pretranslateDocuments** -> DocumentPretranslateResponse pretranslateDocuments(body, autoAccept, caseSensitive, attributeToCreator, mode) + +# **unlockDocuments** +> List<BigDecimal> unlockDocuments(body) -Pretranslate a Document +Unlock documents -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`. +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 @@ -654,16 +663,12 @@ public class Example { 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`. + DocumentDoneUpdateParameters body = new DocumentDoneUpdateParameters(); // DocumentDoneUpdateParameters | try { - DocumentPretranslateResponse result = apiInstance.pretranslateDocuments(body, autoAccept, caseSensitive, attributeToCreator, mode); + List result = apiInstance.unlockDocuments(body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling DocumentsApi#pretranslateDocuments"); + 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()); @@ -677,15 +682,11 @@ public class Example { 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] + **body** | [**DocumentDoneUpdateParameters**](DocumentDoneUpdateParameters.md)| | ### Return type -[**DocumentPretranslateResponse**](DocumentPretranslateResponse.md) +[**List<BigDecimal>**](BigDecimal.md) ### Authorization @@ -699,8 +700,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**202** | A status object. | - | -**0** | Unexpected error | - | +**200** | array of updated documents | - | # **updateDocument** @@ -779,7 +779,7 @@ Name | Type | Description | Notes # **uploadDocument** -> DocumentWithSegments uploadDocument(name, projectId, body, pretranslate, autoAccept, configId) +> DocumentWithSegments uploadDocument(name, projectId, body, pretranslate, autoAccept, caseSensitive, matchAttribution, configId) Upload a File @@ -815,11 +815,13 @@ public class Example { String name = "name_example"; // String | A file name. 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 `null`, `tm`, or `tm+mt` + 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` 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, configId); + DocumentWithSegments result = apiInstance.uploadDocument(name, projectId, body, pretranslate, autoAccept, caseSensitive, matchAttribution, configId); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling DocumentsApi#uploadDocument"); @@ -839,8 +841,10 @@ Name | Type | Description | Notes **name** | **String**| A file name. | **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 `null`, `tm`, or `tm+mt` | [optional] + **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] **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/EditFilterMappingParameters.md b/docs/EditFilterMappingParameters.md new file mode 100644 index 000000000..d3dc86d25 --- /dev/null +++ b/docs/EditFilterMappingParameters.md @@ -0,0 +1,14 @@ + + +# EditFilterMappingParameters + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**registryEntryJson** | **String** | The filter mapping json blob, string escaped. | [optional] +**configName** | **String** | The user defined name of your configuration. | +**configDescription** | **String** | A description for the configuration. | + + + diff --git a/docs/FilesApi.md b/docs/FilesApi.md index 34dad1af8..4494fc74c 100644 --- a/docs/FilesApi.md +++ b/docs/FilesApi.md @@ -4,11 +4,89 @@ All URIs are relative to *https://lilt.com/2* 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** +> addLabel(id, name) + +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\" }' ``` + +### 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.FilesApi; + +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"); + + FilesApi apiInstance = new FilesApi(defaultClient); + String id = "id_example"; // String | A File id. + AddFileLabelRequest name = new AddFileLabelRequest(); // AddFileLabelRequest | + try { + apiInstance.addLabel(id, name); + } catch (ApiException e) { + System.err.println("Exception when calling FilesApi#addLabel"); + 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** | **String**| A File id. | + **name** | [**AddFileLabelRequest**](AddFileLabelRequest.md)| | + +### 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 | +|-------------|-------------|------------------| +**204** | A success response. | - | + # **deleteFile** > FileDeleteResponse deleteFile(id) @@ -84,9 +162,83 @@ Name | Type | Description | Notes **204** | A status object. | - | **0** | Unexpected error | - | + +# **download** +> byte[] download(id) + +Download file + +Download a File. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/files/download?key=API_KEY&id=1' ``` + +### 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.FilesApi; + +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"); + + FilesApi apiInstance = new FilesApi(defaultClient); + String id = "id_example"; // String | A File id. + try { + byte[] result = apiInstance.download(id); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FilesApi#download"); + 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** | **String**| A File id. | + +### Return type + +**byte[]** + +### Authorization + +[ApiKeyAuth](../README.md#ApiKeyAuth), [BasicAuth](../README.md#BasicAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/octet-stream + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A file. | - | + # **getFiles** -> List<SourceFile> getFiles(id) +> List<SourceFile> getFiles(id, labels) Retrieve a File @@ -120,8 +272,9 @@ public class Example { FilesApi apiInstance = new FilesApi(defaultClient); Integer id = 56; // Integer | A unique File identifier. + List labels = Arrays.asList(); // List | One or more labels. This will return the files which contain all of the given labels. try { - List result = apiInstance.getFiles(id); + List result = apiInstance.getFiles(id, labels); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FilesApi#getFiles"); @@ -139,6 +292,7 @@ public class Example { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **Integer**| A unique File identifier. | [optional] + **labels** | [**List<String>**](String.md)| One or more labels. This will return the files which contain all of the given labels. | [optional] ### Return type @@ -161,13 +315,88 @@ Name | Type | Description | Notes **410** | File deleted. | - | **0** | Unexpected error. | - | + +# **removeLabel** +> removeLabel(id, name) + +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' ``` + +### 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.FilesApi; + +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"); + + FilesApi apiInstance = new FilesApi(defaultClient); + String id = "id_example"; // String | A File id. + String name = "name_example"; // String | A label name. + try { + apiInstance.removeLabel(id, name); + } catch (ApiException e) { + System.err.println("Exception when calling FilesApi#removeLabel"); + 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** | **String**| A File id. | + **name** | **String**| A label name. | + +### 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 | +|-------------|-------------|------------------| +**204** | A success response. | - | + # **uploadFile** -> SourceFile uploadFile(name, body, exportUri, fileHash, langId, projectId, category, labels) +> SourceFile uploadFile(name, body, fileHash, langId, projectId, category, labels) 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. When uploading a file, any parameters needed to issue a request to the specified export_uri can be encoded in the export_uri itself as query parameters. Typical examples of parameters that may be required are an access token to authorize requests to a third-party HTTP API and the unique identifier of a resource available via the third-party HTTP API that corresponds to the file. An example export_uri that encodes a target resource identifier (i.e., source_id) of an associated resource behind a third party HTTP API is given in the CURL command below. Example CURL command: ``` curl -X POST https://lilt.com/2/files?key=API_KEY&name=en_US.json&export_uri=https://example.com/export?source_id=12345 \\ --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://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`. ### Example ```java @@ -198,14 +427,13 @@ public class Example { FilesApi apiInstance = new FilesApi(defaultClient); String name = "name_example"; // String | A file name. 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 exportUri = "exportUri_example"; // String | A webhook endpoint that will export the translated document back to the source repository. String fileHash = "fileHash_example"; // String | 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. Boolean langId = true; // Boolean | Flag indicating whether to perform language detection on the uploaded file. Default is false. Integer projectId = 56; // Integer | The project to associate the uploaded file with. String category = "category_example"; // String | 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. String labels = "labels_example"; // String | Comma-separated list of labels to add to the uploaded document. try { - SourceFile result = apiInstance.uploadFile(name, body, exportUri, fileHash, langId, projectId, category, labels); + SourceFile result = apiInstance.uploadFile(name, body, fileHash, langId, projectId, category, labels); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FilesApi#uploadFile"); @@ -224,7 +452,6 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **name** | **String**| A file name. | **body** | **File**| The file contents to be uploaded. The entire POST body will be treated as the file. | - **exportUri** | **String**| A webhook endpoint that will export the translated document back to the source repository. | [optional] **fileHash** | **String**| 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] **langId** | **Boolean**| Flag indicating whether to perform language detection on the uploaded file. Default is false. | [optional] **projectId** | **Integer**| The project to associate the uploaded file with. | [optional] diff --git a/docs/InlineResponse200.md b/docs/InlineResponse200.md index 137fadc13..6180d3614 100644 --- a/docs/InlineResponse200.md +++ b/docs/InlineResponse200.md @@ -6,9 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**file** | [**java.io.File**](java.io.File.md) | | [optional] -**detectedLang** | **String** | Language associated with the file. | [optional] -**detectedLangConfidence** | [**BigDecimal**](BigDecimal.md) | Confidence score for the language associated with the file. | [optional] +**configId** | **Integer** | | [optional] diff --git a/docs/Job.md b/docs/Job.md new file mode 100644 index 000000000..47148519b --- /dev/null +++ b/docs/Job.md @@ -0,0 +1,20 @@ + + +# Job + +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. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | A name for the job. | [optional] +**creationStatus** | **String** | Status of job creation process that includes PENDING, COMPLETE, and FAILED. | [optional] +**deliveredAt** | **OffsetDateTime** | | [optional] +**status** | **String** | Current status of job that includes archived, delivered, and active. | [optional] +**due** | **OffsetDateTime** | An ISO string date. | [optional] +**id** | **Integer** | An id for the job. | [optional] +**isProcessing** | **Integer** | Values include `1` while in progress, `0` when idle and `-2` when processing failed. | [optional] +**stats** | [**JobStats**](JobStats.md) | | [optional] + + + diff --git a/docs/JobCreateParameters.md b/docs/JobCreateParameters.md new file mode 100644 index 000000000..a7abf81a3 --- /dev/null +++ b/docs/JobCreateParameters.md @@ -0,0 +1,15 @@ + + +# JobCreateParameters + +## Properties + +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. | + + + diff --git a/docs/JobDeleteResponse.md b/docs/JobDeleteResponse.md new file mode 100644 index 000000000..b27027dfa --- /dev/null +++ b/docs/JobDeleteResponse.md @@ -0,0 +1,12 @@ + + +# JobDeleteResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Integer** | A unique Project identifier. | [optional] + + + diff --git a/docs/JobLeverageStats.md b/docs/JobLeverageStats.md new file mode 100644 index 000000000..043608fd1 --- /dev/null +++ b/docs/JobLeverageStats.md @@ -0,0 +1,17 @@ + + +# JobLeverageStats + +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. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sourceWords** | **Integer** | Total number of source words. | [optional] +**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] + + + diff --git a/docs/JobLeverageStatsProjects.md b/docs/JobLeverageStatsProjects.md new file mode 100644 index 000000000..848e6b6e4 --- /dev/null +++ b/docs/JobLeverageStatsProjects.md @@ -0,0 +1,16 @@ + + +# JobLeverageStatsProjects + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Integer** | The Project ID. | [optional] +**sourceWords** | **Integer** | Total number of source words. | [optional] +**exactWords** | **Integer** | Total number of exact words. | [optional] +**fuzzyWords** | **Integer** | Total number of fuzzy words. | [optional] +**newWords** | **Integer** | Total number of fuzzy words. | [optional] + + + diff --git a/docs/JobProject.md b/docs/JobProject.md new file mode 100644 index 000000000..242a9ecd0 --- /dev/null +++ b/docs/JobProject.md @@ -0,0 +1,27 @@ + + +# JobProject + +A job project contains project statistcal 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] +**name** | **String** | A name for the project. | [optional] +**due** | **String** | An ISO date. | [optional] +**isComplete** | **Boolean** | A state that checks project was completed. | [optional] +**isArchived** | **Boolean** | The archived state of the project. | [optional] +**state** | **String** | Current state of the project. Example, backlog, inProgress, inReview, done. | [optional] +**numSourceTokens** | **Integer** | Total number of source tokens. | [optional] +**createdAt** | **String** | Time at which the object was created. | [optional] +**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] + + + diff --git a/docs/JobStats.md b/docs/JobStats.md new file mode 100644 index 000000000..aa4acd38d --- /dev/null +++ b/docs/JobStats.md @@ -0,0 +1,24 @@ + + +# JobStats + +A job stats shows an overview of job's statistical data including total number of exact words, fuzzy words, language pairs, projects, etc. +## Properties + +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 fuzzy words. | [optional] +**numDeliveredProjects** | **Integer** | Total number of delivered projects. | [optional] +**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] +**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] + + + diff --git a/docs/JobUpdateParameters.md b/docs/JobUpdateParameters.md new file mode 100644 index 000000000..d55cdee40 --- /dev/null +++ b/docs/JobUpdateParameters.md @@ -0,0 +1,13 @@ + + +# JobUpdateParameters + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | A name for the Job. | [optional] +**dueDate** | **Integer** | An ISO string date. | [optional] + + + diff --git a/docs/JobsApi.md b/docs/JobsApi.md new file mode 100644 index 000000000..1a9f21c16 --- /dev/null +++ b/docs/JobsApi.md @@ -0,0 +1,922 @@ +# JobsApi + +All URIs are relative to *https://lilt.com/2* + +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** +> Job archiveJob(jobId) + +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' ``` + +### 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.JobsApi; + +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"); + + JobsApi apiInstance = new JobsApi(defaultClient); + Integer jobId = 56; // Integer | A job id. + try { + Job result = apiInstance.archiveJob(jobId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JobsApi#archiveJob"); + 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 +------------- | ------------- | ------------- | ------------- + **jobId** | **Integer**| A job id. | + +### Return type + +[**Job**](Job.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 job object. | - | +**0** | Unexpected error | - | + + +# **createJob** +> Job createJob(body) + +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\" } ] }' ``` + +### 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.JobsApi; + +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"); + + JobsApi apiInstance = new JobsApi(defaultClient); + JobCreateParameters body = new JobCreateParameters(); // JobCreateParameters | + try { + Job result = apiInstance.createJob(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JobsApi#createJob"); + 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** | [**JobCreateParameters**](JobCreateParameters.md)| | + +### Return type + +[**Job**](Job.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 Job object. | - | +**0** | Unexpected error | - | + + +# **deleteJob** +> JobDeleteResponse deleteJob(jobId) + +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' ``` + +### 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.JobsApi; + +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"); + + JobsApi apiInstance = new JobsApi(defaultClient); + Integer jobId = 56; // Integer | A job id. + try { + JobDeleteResponse result = apiInstance.deleteJob(jobId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JobsApi#deleteJob"); + 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 +------------- | ------------- | ------------- | ------------- + **jobId** | **Integer**| A job id. | + +### Return type + +[**JobDeleteResponse**](JobDeleteResponse.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 | - | + + +# **deliverJob** +> Job deliverJob(jobId) + +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' ``` + +### 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.JobsApi; + +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"); + + JobsApi apiInstance = new JobsApi(defaultClient); + Integer jobId = 56; // Integer | A job id. + try { + Job result = apiInstance.deliverJob(jobId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JobsApi#deliverJob"); + 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 +------------- | ------------- | ------------- | ------------- + **jobId** | **Integer**| A job id. | + +### Return type + +[**Job**](Job.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 job object. | - | +**0** | Unexpected error | - | + + +# **downloadJob** +> downloadJob(jobId) + +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' ``` + +### 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.JobsApi; + +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"); + + JobsApi apiInstance = new JobsApi(defaultClient); + Integer jobId = 56; // Integer | A job id. + try { + apiInstance.downloadJob(jobId); + } catch (ApiException e) { + System.err.println("Exception when calling JobsApi#downloadJob"); + 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 +------------- | ------------- | ------------- | ------------- + **jobId** | **Integer**| A job id. | + +### 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** | zipped file | - | +**0** | Unexpected error | - | + + +# **exportJob** +> exportJob(jobId, type) + +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. + +### 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.JobsApi; + +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"); + + JobsApi apiInstance = new JobsApi(defaultClient); + Integer jobId = 56; // Integer | A job id. + String type = "type_example"; // String | category for files and memory. + try { + apiInstance.exportJob(jobId, type); + } catch (ApiException e) { + System.err.println("Exception when calling JobsApi#exportJob"); + 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 +------------- | ------------- | ------------- | ------------- + **jobId** | **Integer**| A job id. | + **type** | **String**| category for files and memory. | + +### 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** | 200 status. | - | +**0** | Unexpected error | - | + + +# **getJob** +> Job getJob(jobId) + +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' ``` + +### 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.JobsApi; + +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"); + + JobsApi apiInstance = new JobsApi(defaultClient); + Integer jobId = 56; // Integer | A job id. + try { + Job result = apiInstance.getJob(jobId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JobsApi#getJob"); + 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 +------------- | ------------- | ------------- | ------------- + **jobId** | **Integer**| A job id. | + +### Return type + +[**Job**](Job.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 job object. | - | +**0** | Unexpected error | - | + + +# **getJobLeverageStats** +> JobLeverageStats getJobLeverageStats(jobId) + +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' ``` + +### 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.JobsApi; + +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"); + + JobsApi apiInstance = new JobsApi(defaultClient); + Integer jobId = 56; // Integer | A job id. + try { + JobLeverageStats result = apiInstance.getJobLeverageStats(jobId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JobsApi#getJobLeverageStats"); + 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 +------------- | ------------- | ------------- | ------------- + **jobId** | **Integer**| A job id. | + +### Return type + +[**JobLeverageStats**](JobLeverageStats.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 job leverage stats object. | - | +**0** | Unexpected error | - | + + +# **reactivateJob** +> Job reactivateJob(jobId) + +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' ``` + +### 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.JobsApi; + +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"); + + JobsApi apiInstance = new JobsApi(defaultClient); + Integer jobId = 56; // Integer | A job id. + try { + Job result = apiInstance.reactivateJob(jobId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JobsApi#reactivateJob"); + 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 +------------- | ------------- | ------------- | ------------- + **jobId** | **Integer**| A job id. | + +### Return type + +[**Job**](Job.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 job object. | - | +**0** | Unexpected error | - | + + +# **retrieveAllJobs** +> List<Job> retrieveAllJobs(isArchived) + +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' ``` + +### 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.JobsApi; + +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"); + + JobsApi apiInstance = new JobsApi(defaultClient); + Boolean isArchived = true; // Boolean | Retrieves all jobs that are archived. + try { + List result = apiInstance.retrieveAllJobs(isArchived); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JobsApi#retrieveAllJobs"); + 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 +------------- | ------------- | ------------- | ------------- + **isArchived** | **Boolean**| Retrieves all jobs that are archived. | [optional] + +### Return type + +[**List<Job>**](Job.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 list of Job objects. | - | +**0** | Unexpected error | - | + + +# **unarchiveJob** +> Job unarchiveJob(jobId) + +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' ``` + +### 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.JobsApi; + +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"); + + JobsApi apiInstance = new JobsApi(defaultClient); + Integer jobId = 56; // Integer | A job id. + try { + Job result = apiInstance.unarchiveJob(jobId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JobsApi#unarchiveJob"); + 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 +------------- | ------------- | ------------- | ------------- + **jobId** | **Integer**| A job id. | + +### Return type + +[**Job**](Job.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 job object. | - | +**0** | Unexpected error | - | + + +# **updateJob** +> Job updateJob(jobId, body) + +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\" }' ``` + +### 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.JobsApi; + +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"); + + JobsApi apiInstance = new JobsApi(defaultClient); + Integer jobId = 56; // Integer | A job id. + JobUpdateParameters body = new JobUpdateParameters(); // JobUpdateParameters | + try { + Job result = apiInstance.updateJob(jobId, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling JobsApi#updateJob"); + 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 +------------- | ------------- | ------------- | ------------- + **jobId** | **Integer**| A job id. | + **body** | [**JobUpdateParameters**](JobUpdateParameters.md)| | [optional] + +### Return type + +[**Job**](Job.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 job object. | - | +**0** | Unexpected error | - | + diff --git a/docs/LanguagePair.md b/docs/LanguagePair.md new file mode 100644 index 000000000..a04b0cd23 --- /dev/null +++ b/docs/LanguagePair.md @@ -0,0 +1,23 @@ + + +# LanguagePair + +A language pair couples the source and target language along with memory and pre-translations settings associated to a project. +## Properties + +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. | +**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. | +**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] + + + diff --git a/docs/MemoriesApi.md b/docs/MemoriesApi.md index da94218d5..c84df126c 100644 --- a/docs/MemoriesApi.md +++ b/docs/MemoriesApi.md @@ -22,7 +22,7 @@ Method | HTTP request | Description Create a Memory -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). <a href=\"https://lilt.com/kb/memory/memories\" target=_blank>Refer to our KB</a> for a more detailed 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). <a href=\"https://support.lilt.com/hc/en-us/sections/360012579193-Lilt-Translate-Engine\" target=_blank>Refer to our KB</a> for a more detailed description. ### Example ```java @@ -243,7 +243,7 @@ Name | Type | Description | Notes # **importMemoryFile** -> MemoryImportResponse importMemoryFile(memoryId, name, body) +> MemoryImportResponse importMemoryFile(memoryId, name, body, hasHeaderRow) File import for a Memory @@ -279,8 +279,9 @@ public class Example { 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); + MemoryImportResponse result = apiInstance.importMemoryFile(memoryId, name, body, hasHeaderRow); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling MemoriesApi#importMemoryFile"); @@ -300,6 +301,7 @@ 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 diff --git a/docs/Project.md b/docs/Project.md index 845e50b0f..f8ca2c1f3 100644 --- a/docs/Project.md +++ b/docs/Project.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **Integer** | A unique number identifying the Project. | [optional] **memoryId** | **Integer** | A unique number identifying the associated Memory. | [optional] +**jobId** | **Integer** | A unique number identifying the associated Job. | [optional] **srclang** | **String** | An ISO 639-1 language identifier. | [optional] **trglang** | **String** | An ISO 639-1 language identifier. | [optional] **srclocale** | **String** | A locale identifier, supported for srclang. | [optional] diff --git a/docs/ProjectCreateParameters.md b/docs/ProjectCreateParameters.md index 711c69577..bd7672ec7 100644 --- a/docs/ProjectCreateParameters.md +++ b/docs/ProjectCreateParameters.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **String** | A name for the Project. | **memoryId** | **Integer** | The Memory to associate with this new Project. | -**fileIds** | **List<Integer>** | A list of Files to add to this new Project. | [optional] +**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] diff --git a/docs/ProjectsApi.md b/docs/ProjectsApi.md index 289a2ecab..06887f69f 100644 --- a/docs/ProjectsApi.md +++ b/docs/ProjectsApi.md @@ -7,6 +7,7 @@ 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 @@ -237,6 +238,80 @@ Name | Type | Description | Notes **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) diff --git a/docs/QARuleMatches.md b/docs/QARuleMatches.md index 6bf3c165b..f39df06f5 100644 --- a/docs/QARuleMatches.md +++ b/docs/QARuleMatches.md @@ -8,6 +8,7 @@ QA rules describing the errors in the text. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **matches** | [**List<QARuleMatchesMatches>**](QARuleMatchesMatches.md) | | [optional] +**customRules** | [**List<QARuleMatchesCustomRules>**](QARuleMatchesCustomRules.md) | | [optional] diff --git a/docs/QARuleMatchesCustomRules.md b/docs/QARuleMatchesCustomRules.md new file mode 100644 index 000000000..d9239e4d0 --- /dev/null +++ b/docs/QARuleMatchesCustomRules.md @@ -0,0 +1,12 @@ + + +# QARuleMatchesCustomRules + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **String** | A QA warning defined by a custom rule. | [optional] + + + diff --git a/docs/QaApi.md b/docs/QaApi.md index 4f8c01981..5aa606ae7 100644 --- a/docs/QaApi.md +++ b/docs/QaApi.md @@ -9,7 +9,7 @@ Method | HTTP request | Description # **qaCheck** -> QARuleMatches qaCheck(target, trglang, source, srclang) +> QARuleMatches qaCheck(target, trglang, source, srclang, memoryId) Perform QA check @@ -46,8 +46,9 @@ public class Example { String trglang = "trglang_example"; // String | An ISO 639-1 language code. String source = "source_example"; // String | An optional source string. String srclang = "srclang_example"; // String | An ISO 639-1 language code. + Integer memoryId = 56; // Integer | Any custom rules defined for this Memory will also be applied as part of the QA check. try { - QARuleMatches result = apiInstance.qaCheck(target, trglang, source, srclang); + QARuleMatches result = apiInstance.qaCheck(target, trglang, source, srclang, memoryId); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling QaApi#qaCheck"); @@ -68,6 +69,7 @@ Name | Type | Description | Notes **trglang** | **String**| An ISO 639-1 language code. | **source** | **String**| An optional source string. | [optional] **srclang** | **String**| An ISO 639-1 language code. | [optional] + **memoryId** | **Integer**| Any custom rules defined for this Memory will also be applied as part of the QA check. | [optional] ### Return type diff --git a/docs/SegmentDoneResponse.md b/docs/SegmentDoneResponse.md new file mode 100644 index 000000000..aded61e20 --- /dev/null +++ b/docs/SegmentDoneResponse.md @@ -0,0 +1,12 @@ + + +# SegmentDoneResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**documentIds** | **List<BigDecimal>** | array of segment ids | + + + diff --git a/docs/SegmentsApi.md b/docs/SegmentsApi.md index d39d3a7a5..9cc4c0661 100644 --- a/docs/SegmentsApi.md +++ b/docs/SegmentsApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**deleteSegment**](SegmentsApi.md#deleteSegment) | **DELETE** /segments | Delete a Segment [**getSegment**](SegmentsApi.md#getSegment) | **GET** /segments | Retrieve a Segment [**tagSegment**](SegmentsApi.md#tagSegment) | **GET** /segments/tag | Tag a Segment +[**unlockSegments**](SegmentsApi.md#unlockSegments) | **POST** /segments/review/unlock | Unaccept and unlock segments [**updateSegment**](SegmentsApi.md#updateSegment) | **PUT** /segments | Update a Segment @@ -317,6 +318,80 @@ Name | Type | Description | Notes **200** | A TaggedSegment object. | - | **0** | Unexpected error | - | + +# **unlockSegments** +> List<BigDecimal> unlockSegments(body) + +Unaccept and unlock segments + +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] }' ``` + +### 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.SegmentsApi; + +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"); + + SegmentsApi apiInstance = new SegmentsApi(defaultClient); + SegmentDoneResponse body = new SegmentDoneResponse(); // SegmentDoneResponse | + try { + List result = apiInstance.unlockSegments(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SegmentsApi#unlockSegments"); + 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** | [**SegmentDoneResponse**](SegmentDoneResponse.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 segments | - | + # **updateSegment** > Segment updateSegment(body) diff --git a/docs/Setting.md b/docs/Setting.md new file mode 100644 index 000000000..cfab70c43 --- /dev/null +++ b/docs/Setting.md @@ -0,0 +1,17 @@ + + +# Setting + +A configuration setting. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Integer** | The identifier of the setting. | [optional] +**name** | **String** | The name of the setting. | [optional] +**valueType** | **String** | the type of value the setting may have - Boolean, Json, Number, String. | [optional] +**isUserFacing** | **Boolean** | Whether the setting is editable by the user. | [optional] +**isDefault** | **Boolean** | True when the setting value is inherited from the default setting. | [optional] + + + diff --git a/docs/SettingUpsertBody.md b/docs/SettingUpsertBody.md new file mode 100644 index 000000000..e17d24722 --- /dev/null +++ b/docs/SettingUpsertBody.md @@ -0,0 +1,17 @@ + + +# SettingUpsertBody + +Body to create or update a setting. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**settingName** | **String** | The name of the setting. | [optional] +**scope** | **String** | The entity scope the setting should be applied to. | [optional] +**isEnforced** | **Boolean** | Whether this value should override others set for the same setting key. | [optional] +**projectId** | **BigDecimal** | Id of the the project the setting will be applied to. Required when scope is `Project`. | [optional] +**organizationId** | **BigDecimal** | Id of the the project the setting will be applied to. Required when scope is `Organization`. | [optional] + + + diff --git a/docs/SettingUpsertResponse.md b/docs/SettingUpsertResponse.md new file mode 100644 index 000000000..6e94e6245 --- /dev/null +++ b/docs/SettingUpsertResponse.md @@ -0,0 +1,14 @@ + + +# SettingUpsertResponse + +Response from upserting a setting +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**scopedSetting** | [**Setting**](Setting.md) | | [optional] +**activeSettings** | [**Map<String, Setting>**](Setting.md) | A dictionary of configuration settings, keyed by setting name | [optional] + + + diff --git a/docs/SettingsApi.md b/docs/SettingsApi.md new file mode 100644 index 000000000..88d7577c9 --- /dev/null +++ b/docs/SettingsApi.md @@ -0,0 +1,304 @@ +# SettingsApi + +All URIs are relative to *https://lilt.com/2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getOrganizationSettings**](SettingsApi.md#getOrganizationSettings) | **GET** /settings/organization | Get organization-level settings +[**getProjectSettings**](SettingsApi.md#getProjectSettings) | **GET** /settings/project/{projectId} | Get settings for a project +[**getUserSettings**](SettingsApi.md#getUserSettings) | **GET** /settings/user | Get settings for the authenticated user +[**upsertSetting**](SettingsApi.md#upsertSetting) | **POST** /settings | Update or create a setting + + + +# **getOrganizationSettings** +> Map<String, Setting> getOrganizationSettings() + +Get organization-level settings + +Get the organization-level settings for the active users organization Example CURL: ``` curl --location --request GET 'https://lilt.com/2/settings/organization?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.SettingsApi; + +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"); + + SettingsApi apiInstance = new SettingsApi(defaultClient); + try { + Map result = apiInstance.getOrganizationSettings(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SettingsApi#getOrganizationSettings"); + 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 + +[**Map<String, Setting>**](Setting.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** | Organization settings dictionary. | - | +**0** | Unexpected error | - | + + +# **getProjectSettings** +> Map<String, Setting> getProjectSettings(projectId) + +Get settings for a project + +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=<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.SettingsApi; + +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"); + + SettingsApi apiInstance = new SettingsApi(defaultClient); + Integer projectId = 56; // Integer | A project id. + try { + Map result = apiInstance.getProjectSettings(projectId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SettingsApi#getProjectSettings"); + 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 +------------- | ------------- | ------------- | ------------- + **projectId** | **Integer**| A project id. | + +### Return type + +[**Map<String, Setting>**](Setting.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** | Project settings dictionary. | - | +**0** | Unexpected error | - | + + +# **getUserSettings** +> Map<String, Setting> getUserSettings() + +Get settings for the authenticated user + +Get the active settings applied to the authenticated user. Example CURL: ``` curl --location --request GET 'https://lilt.com/2/settings/user?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.SettingsApi; + +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"); + + SettingsApi apiInstance = new SettingsApi(defaultClient); + try { + Map result = apiInstance.getUserSettings(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SettingsApi#getUserSettings"); + 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 + +[**Map<String, Setting>**](Setting.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** | Settings dictionary. | - | +**0** | Unexpected error | - | + + +# **upsertSetting** +> SettingUpsertResponse upsertSetting(body) + +Update or create a setting + +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=<API_KEY>' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"settingName\": \"requireBatchQaTranslator\", \"value\": false, \"organizationId\": 285, \"scope\": \"Organization\" }' ``` + +### 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.SettingsApi; + +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"); + + SettingsApi apiInstance = new SettingsApi(defaultClient); + SettingUpsertBody body = new SettingUpsertBody(); // SettingUpsertBody | + try { + SettingUpsertResponse result = apiInstance.upsertSetting(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SettingsApi#upsertSetting"); + 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** | [**SettingUpsertBody**](SettingUpsertBody.md)| | [optional] + +### Return type + +[**SettingUpsertResponse**](SettingUpsertResponse.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** | Updated settings object and updated active settings. | - | +**0** | Unexpected error | - | + diff --git a/docs/SourceFile.md b/docs/SourceFile.md index ed12a61d0..32105599b 100644 --- a/docs/SourceFile.md +++ b/docs/SourceFile.md @@ -10,13 +10,12 @@ Name | Type | Description | Notes **id** | **Integer** | A unique number identifying the SourceFile. | [optional] **name** | **String** | The file name. | [optional] **fileHash** | **String** | A unique hash value associated with the file. An MD5 hash of the file content will be used by default. | [optional] -**exportUri** | **String** | A webhook endpoint that will export the translated document back to the source repository. | [optional] **detectedLang** | **String** | Language associated with the file. | [optional] **detectedLangConfidence** | **BigDecimal** | Confidence score for the language associated with the file. | [optional] **category** | **String** | 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. | [optional] **labels** | **List<String>** | The list of labels associated with the file. | [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] +**createdAt** | **OffsetDateTime** | Time at which the object was created. | [optional] +**updatedAt** | **OffsetDateTime** | Time at which the object was created. | [optional] diff --git a/docs/TranslateApi.md b/docs/TranslateApi.md index 69c127356..a6b61761d 100644 --- a/docs/TranslateApi.md +++ b/docs/TranslateApi.md @@ -13,11 +13,11 @@ Method | HTTP request | Description # **batchTranslateFile** -> TranslationInfo batchTranslateFile(fileId, memoryId, configId) +> TranslationInfo batchTranslateFile(fileId, memoryId, configId, withTM) 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' ``` +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' ``` ### Example ```java @@ -49,8 +49,9 @@ public class Example { String fileId = "fileId_example"; // String | List of File ids to be translated, comma separated. String memoryId = "memoryId_example"; // String | Id of Memory to use in translation. BigDecimal configId = new BigDecimal(78); // BigDecimal | An optional pararameter to specify an import configuration to be applied when extracting translatable content from this file. + Boolean withTM = true; // Boolean | An optional boolean parameter to toggle the use of Translation Memory in the translation of the file. try { - TranslationInfo result = apiInstance.batchTranslateFile(fileId, memoryId, configId); + TranslationInfo result = apiInstance.batchTranslateFile(fileId, memoryId, configId, withTM); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling TranslateApi#batchTranslateFile"); @@ -70,6 +71,7 @@ Name | Type | Description | Notes **fileId** | **String**| List of File ids to be translated, comma separated. | **memoryId** | **String**| Id of Memory to use in translation. | **configId** | **BigDecimal**| An optional pararameter to specify an import configuration to be applied when extracting translatable content from this file. | [optional] + **withTM** | **Boolean**| An optional boolean parameter to toggle the use of Translation Memory in the translation of the file. | [optional] ### Return type @@ -326,11 +328,11 @@ Name | Type | Description | Notes # **translateSegment** -> TranslationList translateSegment(memoryId, source, sourceHash, prefix, n, rich, tmMatches, projectTags) +> TranslationList translateSegment(memoryId, source, sourceHash, prefix, n, rich, tmMatches, projectTags, 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 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 `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. ### Example ```java @@ -367,8 +369,9 @@ public class Example { 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); + TranslationList result = apiInstance.translateSegment(memoryId, source, sourceHash, prefix, n, rich, tmMatches, projectTags, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling TranslateApi#translateSegment"); @@ -393,6 +396,7 @@ Name | Type | Description | Notes **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 @@ -404,7 +408,7 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **Accept**: application/json ### HTTP response details diff --git a/docs/TranslateSegmentBody.md b/docs/TranslateSegmentBody.md new file mode 100644 index 000000000..fc0e25e71 --- /dev/null +++ b/docs/TranslateSegmentBody.md @@ -0,0 +1,12 @@ + + +# TranslateSegmentBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**source** | **String** | A unique Segment identifier. | [optional] + + + diff --git a/pom.xml b/pom.xml index 39f8777e7..1f92e2b55 100644 --- a/pom.xml +++ b/pom.xml @@ -1,33 +1,52 @@ 4.0.0 - com.lilt.client - lilt-java-client + org.openapitools + openapi-java-client jar - Lilt Java Client - 2.1.0 - https://github.com/lilt/lilt-java - Java bindings for the Lilt REST API: https://lilt.com/docs/api + openapi-java-client + 2.2.0 + https://github.com/openapitools/openapi-generator + OpenAPI Java + + scm:git:git@github.com:openapitools/openapi-generator.git + scm:git:git@github.com:openapitools/openapi-generator.git + https://github.com/openapitools/openapi-generator + + + + + Unlicense + http://unlicense.org + repo + + - Lilt Engineering - support@lilt.com - Lilt - https://lilt.com + OpenAPI-Generator Contributors + team@openapitools.org + OpenAPITools.org + http://openapitools.org - - - github - Lilt packages on GitHub - https://maven.pkg.github.com/lilt/lilt-java - - - + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + true + 128m + 512m + + -Xlint:all + -J-Xss4m + + + org.apache.maven.plugins maven-enforcer-plugin @@ -234,8 +253,9 @@ javax.annotation - jsr250-api + javax.annotation-api ${javax-annotation-version} + provided @@ -249,14 +269,13 @@ 1.7 ${java.version} ${java.version} - 1.8.3 - 1.5.22 - 3.14.2 - 2.8.5 - 3.9 - 1.4.0 - 1.0.0 - 1.0 + 1.8.5 + 1.6.2 + 4.9.1 + 2.8.6 + 3.11 + 1.5.0 + 1.3.2 4.13.1 UTF-8 diff --git a/src/main/java/com/lilt/client/ApiClient.java b/src/main/java/com/lilt/client/ApiClient.java index b211a97cc..0d1a07e11 100644 --- a/src/main/java/com/lilt/client/ApiClient.java +++ b/src/main/java/com/lilt/client/ApiClient.java @@ -125,7 +125,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/v2.0/java"); + setUserAgent("OpenAPI-Generator/2.2.0/java"); authentications = new HashMap(); } diff --git a/src/main/java/com/lilt/client/ApiException.java b/src/main/java/com/lilt/client/ApiException.java index 789f06695..bfcea5676 100644 --- a/src/main/java/com/lilt/client/ApiException.java +++ b/src/main/java/com/lilt/client/ApiException.java @@ -16,7 +16,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/com/lilt/client/Configuration.java b/src/main/java/com/lilt/client/Configuration.java index 99ed16857..51e74262f 100644 --- a/src/main/java/com/lilt/client/Configuration.java +++ b/src/main/java/com/lilt/client/Configuration.java @@ -13,7 +13,7 @@ package com.lilt.client; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class Configuration { private static ApiClient defaultApiClient = new ApiClient(); diff --git a/src/main/java/com/lilt/client/Pair.java b/src/main/java/com/lilt/client/Pair.java index c41aae487..75cd690b6 100644 --- a/src/main/java/com/lilt/client/Pair.java +++ b/src/main/java/com/lilt/client/Pair.java @@ -13,7 +13,7 @@ package com.lilt.client; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/com/lilt/client/StringUtil.java b/src/main/java/com/lilt/client/StringUtil.java index 66d2055ba..b35548021 100644 --- a/src/main/java/com/lilt/client/StringUtil.java +++ b/src/main/java/com/lilt/client/StringUtil.java @@ -16,7 +16,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[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/CommentsApi.java b/src/main/java/com/lilt/client/api/CommentsApi.java new file mode 100644 index 000000000..2115c862f --- /dev/null +++ b/src/main/java/com/lilt/client/api/CommentsApi.java @@ -0,0 +1,589 @@ +/* + * 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 version of the OpenAPI document: v2.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.Comment; +import com.lilt.client.model.CommentBody; +import com.lilt.client.model.CommentDeleteResponse; +import com.lilt.client.model.DocumentComments; +import com.lilt.client.model.Error; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class CommentsApi { + private ApiClient localVarApiClient; + + public CommentsApi() { + this(Configuration.getDefaultApiClient()); + } + + public CommentsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + /** + * Build call for createComment + * @param documentId A unique document identifier. (required) + * @param segmentId A unique segment identifier. (required) + * @param body The comment being created (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
201 A Comment object. -
0 Unexpected error -
+ */ + public okhttp3.Call createCommentCall(Integer documentId, Integer segmentId, CommentBody body, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/comments"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (documentId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("document_id", documentId)); + } + + if (segmentId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("segment_id", segmentId)); + } + + 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 createCommentValidateBeforeCall(Integer documentId, Integer segmentId, CommentBody body, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'documentId' is set + if (documentId == null) { + throw new ApiException("Missing the required parameter 'documentId' when calling createComment(Async)"); + } + + // verify the required parameter 'segmentId' is set + if (segmentId == null) { + throw new ApiException("Missing the required parameter 'segmentId' when calling createComment(Async)"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling createComment(Async)"); + } + + + okhttp3.Call localVarCall = createCommentCall(documentId, segmentId, body, _callback); + return localVarCall; + + } + + /** + * Create a new comment + * Create a new comment for the specified Segment ID. + * @param documentId A unique document identifier. (required) + * @param segmentId A unique segment identifier. (required) + * @param body The comment being created (required) + * @return Comment + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
201 A Comment object. -
0 Unexpected error -
+ */ + public Comment createComment(Integer documentId, Integer segmentId, CommentBody body) throws ApiException { + ApiResponse localVarResp = createCommentWithHttpInfo(documentId, segmentId, body); + return localVarResp.getData(); + } + + /** + * Create a new comment + * Create a new comment for the specified Segment ID. + * @param documentId A unique document identifier. (required) + * @param segmentId A unique segment identifier. (required) + * @param body The comment being created (required) + * @return ApiResponse<Comment> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
201 A Comment object. -
0 Unexpected error -
+ */ + public ApiResponse createCommentWithHttpInfo(Integer documentId, Integer segmentId, CommentBody body) throws ApiException { + okhttp3.Call localVarCall = createCommentValidateBeforeCall(documentId, segmentId, body, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Create a new comment (asynchronously) + * Create a new comment for the specified Segment ID. + * @param documentId A unique document identifier. (required) + * @param segmentId A unique segment identifier. (required) + * @param body The comment being created (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
201 A Comment object. -
0 Unexpected error -
+ */ + public okhttp3.Call createCommentAsync(Integer documentId, Integer segmentId, CommentBody body, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createCommentValidateBeforeCall(documentId, segmentId, body, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteComment + * @param commentId A unique Comment 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
204 A status object. -
0 Unexpected error -
+ */ + public okhttp3.Call deleteCommentCall(Integer commentId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/comments"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (commentId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("comment_id", commentId)); + } + + 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 deleteCommentValidateBeforeCall(Integer commentId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'commentId' is set + if (commentId == null) { + throw new ApiException("Missing the required parameter 'commentId' when calling deleteComment(Async)"); + } + + + okhttp3.Call localVarCall = deleteCommentCall(commentId, _callback); + return localVarCall; + + } + + /** + * Delete a Comment + * Delete a Comment. Example CURL command: ``` curl -X DELETE https://lilt.com/2/comments?key=API_KEY&comment_id=123 ``` + * @param commentId A unique Comment identifier. (required) + * @return CommentDeleteResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
204 A status object. -
0 Unexpected error -
+ */ + public CommentDeleteResponse deleteComment(Integer commentId) throws ApiException { + ApiResponse localVarResp = deleteCommentWithHttpInfo(commentId); + return localVarResp.getData(); + } + + /** + * Delete a Comment + * Delete a Comment. Example CURL command: ``` curl -X DELETE https://lilt.com/2/comments?key=API_KEY&comment_id=123 ``` + * @param commentId A unique Comment identifier. (required) + * @return ApiResponse<CommentDeleteResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
204 A status object. -
0 Unexpected error -
+ */ + public ApiResponse deleteCommentWithHttpInfo(Integer commentId) throws ApiException { + okhttp3.Call localVarCall = deleteCommentValidateBeforeCall(commentId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Delete a Comment (asynchronously) + * Delete a Comment. Example CURL command: ``` curl -X DELETE https://lilt.com/2/comments?key=API_KEY&comment_id=123 ``` + * @param commentId A unique Comment 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
204 A status object. -
0 Unexpected error -
+ */ + public okhttp3.Call deleteCommentAsync(Integer commentId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteCommentValidateBeforeCall(commentId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getDocumentComments + * @param documentId A unique document 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 containing lists of comments identified by the id of the segment to which they belong. -
403 Unauthorized. -
410 Comment deleted. -
0 Unexpected error. -
+ */ + public okhttp3.Call getDocumentCommentsCall(Integer documentId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/comments"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (documentId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("document_id", documentId)); + } + + 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 getDocumentCommentsValidateBeforeCall(Integer documentId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'documentId' is set + if (documentId == null) { + throw new ApiException("Missing the required parameter 'documentId' when calling getDocumentComments(Async)"); + } + + + okhttp3.Call localVarCall = getDocumentCommentsCall(documentId, _callback); + return localVarCall; + + } + + /** + * Retrieve a document's comments by segment + * Retrieves all comments associated with a specified document, grouped by their Segment's ID. To retrieve a document's comments, specify the <strong>document_id</strong> request parameter. Example CURL command: ``` curl -X GET https://lilt.com/2/comments?key=API_KEY&document_id=123 ``` + * @param documentId A unique document identifier. (required) + * @return DocumentComments + * @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 containing lists of comments identified by the id of the segment to which they belong. -
403 Unauthorized. -
410 Comment deleted. -
0 Unexpected error. -
+ */ + public DocumentComments getDocumentComments(Integer documentId) throws ApiException { + ApiResponse localVarResp = getDocumentCommentsWithHttpInfo(documentId); + return localVarResp.getData(); + } + + /** + * Retrieve a document's comments by segment + * Retrieves all comments associated with a specified document, grouped by their Segment's ID. To retrieve a document's comments, specify the <strong>document_id</strong> request parameter. Example CURL command: ``` curl -X GET https://lilt.com/2/comments?key=API_KEY&document_id=123 ``` + * @param documentId A unique document identifier. (required) + * @return ApiResponse<DocumentComments> + * @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 containing lists of comments identified by the id of the segment to which they belong. -
403 Unauthorized. -
410 Comment deleted. -
0 Unexpected error. -
+ */ + public ApiResponse getDocumentCommentsWithHttpInfo(Integer documentId) throws ApiException { + okhttp3.Call localVarCall = getDocumentCommentsValidateBeforeCall(documentId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Retrieve a document's comments by segment (asynchronously) + * Retrieves all comments associated with a specified document, grouped by their Segment's ID. To retrieve a document's comments, specify the <strong>document_id</strong> request parameter. Example CURL command: ``` curl -X GET https://lilt.com/2/comments?key=API_KEY&document_id=123 ``` + * @param documentId A unique document 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 containing lists of comments identified by the id of the segment to which they belong. -
403 Unauthorized. -
410 Comment deleted. -
0 Unexpected error. -
+ */ + public okhttp3.Call getDocumentCommentsAsync(Integer documentId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getDocumentCommentsValidateBeforeCall(documentId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateComment + * @param commentId A unique comment identifier. (required) + * @param documentId A unique document identifier. (required) + * @param body The comment being updated. (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
201 A Comment object. -
0 Unexpected error -
+ */ + public okhttp3.Call updateCommentCall(Integer commentId, Integer documentId, CommentBody body, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/comments"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (commentId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("comment_id", commentId)); + } + + if (documentId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("document_id", documentId)); + } + + 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 updateCommentValidateBeforeCall(Integer commentId, Integer documentId, CommentBody body, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'commentId' is set + if (commentId == null) { + throw new ApiException("Missing the required parameter 'commentId' when calling updateComment(Async)"); + } + + // verify the required parameter 'documentId' is set + if (documentId == null) { + throw new ApiException("Missing the required parameter 'documentId' when calling updateComment(Async)"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling updateComment(Async)"); + } + + + okhttp3.Call localVarCall = updateCommentCall(commentId, documentId, body, _callback); + return localVarCall; + + } + + /** + * Update an existing comment + * Update an existing comment. + * @param commentId A unique comment identifier. (required) + * @param documentId A unique document identifier. (required) + * @param body The comment being updated. (required) + * @return Comment + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
201 A Comment object. -
0 Unexpected error -
+ */ + public Comment updateComment(Integer commentId, Integer documentId, CommentBody body) throws ApiException { + ApiResponse localVarResp = updateCommentWithHttpInfo(commentId, documentId, body); + return localVarResp.getData(); + } + + /** + * Update an existing comment + * Update an existing comment. + * @param commentId A unique comment identifier. (required) + * @param documentId A unique document identifier. (required) + * @param body The comment being updated. (required) + * @return ApiResponse<Comment> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
201 A Comment object. -
0 Unexpected error -
+ */ + public ApiResponse updateCommentWithHttpInfo(Integer commentId, Integer documentId, CommentBody body) throws ApiException { + okhttp3.Call localVarCall = updateCommentValidateBeforeCall(commentId, documentId, body, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update an existing comment (asynchronously) + * Update an existing comment. + * @param commentId A unique comment identifier. (required) + * @param documentId A unique document identifier. (required) + * @param body The comment being updated. (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
201 A Comment object. -
0 Unexpected error -
+ */ + public okhttp3.Call updateCommentAsync(Integer commentId, Integer documentId, CommentBody body, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateCommentValidateBeforeCall(commentId, documentId, body, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/com/lilt/client/api/ConnectorsApi.java b/src/main/java/com/lilt/client/api/ConnectorsApi.java index a686aff7e..1355d4fbe 100644 --- a/src/main/java/com/lilt/client/api/ConnectorsApi.java +++ b/src/main/java/com/lilt/client/api/ConnectorsApi.java @@ -469,7 +469,7 @@ private okhttp3.Call getConnectorJobsValidateBeforeCall(Integer id, final ApiCal } /** - * Retreive a Connector Job + * Retrieve a Connector Job * 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. Example CURL command: ``` curl -X GET https://lilt.com/2/connectors/jobs?key=API_KEY&id=9274 ``` * @param id A unique Connector Job identifier. (required) * @return List<ConnectorJob> @@ -487,7 +487,7 @@ public List getConnectorJobs(Integer id) throws ApiException { } /** - * Retreive a Connector Job + * Retrieve a Connector Job * 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. Example CURL command: ``` curl -X GET https://lilt.com/2/connectors/jobs?key=API_KEY&id=9274 ``` * @param id A unique Connector Job identifier. (required) * @return ApiResponse<List<ConnectorJob>> @@ -506,7 +506,7 @@ public ApiResponse> getConnectorJobsWithHttpInfo(Integer id) } /** - * Retreive a Connector Job (asynchronously) + * Retrieve a Connector Job (asynchronously) * 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. Example CURL command: ``` curl -X GET https://lilt.com/2/connectors/jobs?key=API_KEY&id=9274 ``` * @param id A unique Connector Job identifier. (required) * @param _callback The callback to be executed when the API call finishes diff --git a/src/main/java/com/lilt/client/api/ConverterConfigApi.java b/src/main/java/com/lilt/client/api/ConverterConfigApi.java new file mode 100644 index 000000000..5fdfe13da --- /dev/null +++ b/src/main/java/com/lilt/client/api/ConverterConfigApi.java @@ -0,0 +1,791 @@ +/* + * 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 version of the OpenAPI document: v2.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.ConverterConfigUpdateResponse; +import com.lilt.client.model.CreateConverterConfigParameters; +import com.lilt.client.model.EditFilterMappingParameters; +import com.lilt.client.model.Error; +import com.lilt.client.model.InlineResponse200; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class ConverterConfigApi { + private ApiClient localVarApiClient; + + public ConverterConfigApi() { + this(Configuration.getDefaultApiClient()); + } + + public ConverterConfigApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + /** + * Build call for addConverterConfig + * @param organizationId A unique Organization identifier. (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 config id of the configuration created. -
0 Unexpected error -
+ */ + public okhttp3.Call addConverterConfigCall(Integer organizationId, CreateConverterConfigParameters body, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/configs/converter"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (organizationId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("organizationId", organizationId)); + } + + 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 addConverterConfigValidateBeforeCall(Integer organizationId, CreateConverterConfigParameters body, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'organizationId' is set + if (organizationId == null) { + throw new ApiException("Missing the required parameter 'organizationId' when calling addConverterConfig(Async)"); + } + + + okhttp3.Call localVarCall = addConverterConfigCall(organizationId, body, _callback); + return localVarCall; + + } + + /** + * Add Converter Config + * Add a file filter configuration for your Organization. + * @param organizationId A unique Organization identifier. (required) + * @param body (optional) + * @return ConverterConfigUpdateResponse + * @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 config id of the configuration created. -
0 Unexpected error -
+ */ + public ConverterConfigUpdateResponse addConverterConfig(Integer organizationId, CreateConverterConfigParameters body) throws ApiException { + ApiResponse localVarResp = addConverterConfigWithHttpInfo(organizationId, body); + return localVarResp.getData(); + } + + /** + * Add Converter Config + * Add a file filter configuration for your Organization. + * @param organizationId A unique Organization identifier. (required) + * @param body (optional) + * @return ApiResponse<ConverterConfigUpdateResponse> + * @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 config id of the configuration created. -
0 Unexpected error -
+ */ + public ApiResponse addConverterConfigWithHttpInfo(Integer organizationId, CreateConverterConfigParameters body) throws ApiException { + okhttp3.Call localVarCall = addConverterConfigValidateBeforeCall(organizationId, body, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Add Converter Config (asynchronously) + * Add a file filter configuration for your Organization. + * @param organizationId A unique Organization identifier. (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 config id of the configuration created. -
0 Unexpected error -
+ */ + public okhttp3.Call addConverterConfigAsync(Integer organizationId, CreateConverterConfigParameters body, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = addConverterConfigValidateBeforeCall(organizationId, body, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteConverterConfig + * @param configId A unique configuration 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 The config id of the configuration deleted. -
0 Unexpected error -
+ */ + public okhttp3.Call deleteConverterConfigCall(Integer configId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/configs/converter/{configId}" + .replaceAll("\\{" + "configId" + "\\}", localVarApiClient.escapeString(configId.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 deleteConverterConfigValidateBeforeCall(Integer configId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'configId' is set + if (configId == null) { + throw new ApiException("Missing the required parameter 'configId' when calling deleteConverterConfig(Async)"); + } + + + okhttp3.Call localVarCall = deleteConverterConfigCall(configId, _callback); + return localVarCall; + + } + + /** + * Delete Converter Config + * Delete a file filter configuration by id. + * @param configId A unique configuration identifier. (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 config id of the configuration deleted. -
0 Unexpected error -
+ */ + public InlineResponse200 deleteConverterConfig(Integer configId) throws ApiException { + ApiResponse localVarResp = deleteConverterConfigWithHttpInfo(configId); + return localVarResp.getData(); + } + + /** + * Delete Converter Config + * Delete a file filter configuration by id. + * @param configId A unique configuration identifier. (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 config id of the configuration deleted. -
0 Unexpected error -
+ */ + public ApiResponse deleteConverterConfigWithHttpInfo(Integer configId) throws ApiException { + okhttp3.Call localVarCall = deleteConverterConfigValidateBeforeCall(configId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Delete Converter Config (asynchronously) + * Delete a file filter configuration by id. + * @param configId A unique configuration 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 The config id of the configuration deleted. -
0 Unexpected error -
+ */ + public okhttp3.Call deleteConverterConfigAsync(Integer configId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteConverterConfigValidateBeforeCall(configId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteFilterMapping + * @param configId A unique configuration identifier. (required) + * @param fileExtension A file extension to delete. (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 map of config id to string escaped config json. -
0 Unexpected error -
+ */ + public okhttp3.Call deleteFilterMappingCall(Integer configId, String fileExtension, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/configs/converter/{configId}/{fileExtension}" + .replaceAll("\\{" + "configId" + "\\}", localVarApiClient.escapeString(configId.toString())) + .replaceAll("\\{" + "fileExtension" + "\\}", localVarApiClient.escapeString(fileExtension.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 deleteFilterMappingValidateBeforeCall(Integer configId, String fileExtension, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'configId' is set + if (configId == null) { + throw new ApiException("Missing the required parameter 'configId' when calling deleteFilterMapping(Async)"); + } + + // verify the required parameter 'fileExtension' is set + if (fileExtension == null) { + throw new ApiException("Missing the required parameter 'fileExtension' when calling deleteFilterMapping(Async)"); + } + + + okhttp3.Call localVarCall = deleteFilterMappingCall(configId, fileExtension, _callback); + return localVarCall; + + } + + /** + * Delete Filter Mapping + * Delete a file filter mapping by id and file extension. + * @param configId A unique configuration identifier. (required) + * @param fileExtension A file extension to delete. (required) + * @return Map<String, String> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 A map of config id to string escaped config json. -
0 Unexpected error -
+ */ + public Map deleteFilterMapping(Integer configId, String fileExtension) throws ApiException { + ApiResponse> localVarResp = deleteFilterMappingWithHttpInfo(configId, fileExtension); + return localVarResp.getData(); + } + + /** + * Delete Filter Mapping + * Delete a file filter mapping by id and file extension. + * @param configId A unique configuration identifier. (required) + * @param fileExtension A file extension to delete. (required) + * @return ApiResponse<Map<String, String>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 A map of config id to string escaped config json. -
0 Unexpected error -
+ */ + public ApiResponse> deleteFilterMappingWithHttpInfo(Integer configId, String fileExtension) throws ApiException { + okhttp3.Call localVarCall = deleteFilterMappingValidateBeforeCall(configId, fileExtension, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Delete Filter Mapping (asynchronously) + * Delete a file filter mapping by id and file extension. + * @param configId A unique configuration identifier. (required) + * @param fileExtension A file extension to delete. (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 map of config id to string escaped config json. -
0 Unexpected error -
+ */ + public okhttp3.Call deleteFilterMappingAsync(Integer configId, String fileExtension, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteFilterMappingValidateBeforeCall(configId, fileExtension, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for editFilterMapping + * @param configId A unique configuration identifier. (required) + * @param fileExtension A file extension for the filter mapping. (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 A map of config id to string escaped config json. -
0 Unexpected error -
+ */ + public okhttp3.Call editFilterMappingCall(Integer configId, String fileExtension, EditFilterMappingParameters body, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/configs/converter/{configId}/{fileExtension}" + .replaceAll("\\{" + "configId" + "\\}", localVarApiClient.escapeString(configId.toString())) + .replaceAll("\\{" + "fileExtension" + "\\}", localVarApiClient.escapeString(fileExtension.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 editFilterMappingValidateBeforeCall(Integer configId, String fileExtension, EditFilterMappingParameters body, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'configId' is set + if (configId == null) { + throw new ApiException("Missing the required parameter 'configId' when calling editFilterMapping(Async)"); + } + + // verify the required parameter 'fileExtension' is set + if (fileExtension == null) { + throw new ApiException("Missing the required parameter 'fileExtension' when calling editFilterMapping(Async)"); + } + + + okhttp3.Call localVarCall = editFilterMappingCall(configId, fileExtension, body, _callback); + return localVarCall; + + } + + /** + * Add Filter Mapping + * Add a specific filter mapping to your file filter configuration + * @param configId A unique configuration identifier. (required) + * @param fileExtension A file extension for the filter mapping. (required) + * @param body (optional) + * @return Map<String, String> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 A map of config id to string escaped config json. -
0 Unexpected error -
+ */ + public Map editFilterMapping(Integer configId, String fileExtension, EditFilterMappingParameters body) throws ApiException { + ApiResponse> localVarResp = editFilterMappingWithHttpInfo(configId, fileExtension, body); + return localVarResp.getData(); + } + + /** + * Add Filter Mapping + * Add a specific filter mapping to your file filter configuration + * @param configId A unique configuration identifier. (required) + * @param fileExtension A file extension for the filter mapping. (required) + * @param body (optional) + * @return ApiResponse<Map<String, String>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 A map of config id to string escaped config json. -
0 Unexpected error -
+ */ + public ApiResponse> editFilterMappingWithHttpInfo(Integer configId, String fileExtension, EditFilterMappingParameters body) throws ApiException { + okhttp3.Call localVarCall = editFilterMappingValidateBeforeCall(configId, fileExtension, body, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Add Filter Mapping (asynchronously) + * Add a specific filter mapping to your file filter configuration + * @param configId A unique configuration identifier. (required) + * @param fileExtension A file extension for the filter mapping. (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 A map of config id to string escaped config json. -
0 Unexpected error -
+ */ + public okhttp3.Call editFilterMappingAsync(Integer configId, String fileExtension, EditFilterMappingParameters body, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = editFilterMappingValidateBeforeCall(configId, fileExtension, body, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getConverterConfigById + * @param configId A unique configuration 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 map of config id to string escaped config json. -
0 Unexpected error -
+ */ + public okhttp3.Call getConverterConfigByIdCall(Integer configId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/configs/converter/{configId}" + .replaceAll("\\{" + "configId" + "\\}", localVarApiClient.escapeString(configId.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 getConverterConfigByIdValidateBeforeCall(Integer configId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'configId' is set + if (configId == null) { + throw new ApiException("Missing the required parameter 'configId' when calling getConverterConfigById(Async)"); + } + + + okhttp3.Call localVarCall = getConverterConfigByIdCall(configId, _callback); + return localVarCall; + + } + + /** + * Fetch Converter Config by Id + * Fetch a file filter configuration by id. + * @param configId A unique configuration identifier. (required) + * @return Map<String, String> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 A map of config id to string escaped config json. -
0 Unexpected error -
+ */ + public Map getConverterConfigById(Integer configId) throws ApiException { + ApiResponse> localVarResp = getConverterConfigByIdWithHttpInfo(configId); + return localVarResp.getData(); + } + + /** + * Fetch Converter Config by Id + * Fetch a file filter configuration by id. + * @param configId A unique configuration identifier. (required) + * @return ApiResponse<Map<String, String>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 A map of config id to string escaped config json. -
0 Unexpected error -
+ */ + public ApiResponse> getConverterConfigByIdWithHttpInfo(Integer configId) throws ApiException { + okhttp3.Call localVarCall = getConverterConfigByIdValidateBeforeCall(configId, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Fetch Converter Config by Id (asynchronously) + * Fetch a file filter configuration by id. + * @param configId A unique configuration 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 map of config id to string escaped config json. -
0 Unexpected error -
+ */ + public okhttp3.Call getConverterConfigByIdAsync(Integer configId, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getConverterConfigByIdValidateBeforeCall(configId, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getConverterConfigs + * @param organizationId A unique Organization 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 map of config id to string escaped config json. -
0 Unexpected error -
+ */ + public okhttp3.Call getConverterConfigsCall(Integer organizationId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/configs/converter"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (organizationId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("organizationId", organizationId)); + } + + 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 getConverterConfigsValidateBeforeCall(Integer organizationId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'organizationId' is set + if (organizationId == null) { + throw new ApiException("Missing the required parameter 'organizationId' when calling getConverterConfigs(Async)"); + } + + + okhttp3.Call localVarCall = getConverterConfigsCall(organizationId, _callback); + return localVarCall; + + } + + /** + * List Converter Configs + * List all file filter configurations for your Organization. + * @param organizationId A unique Organization identifier. (required) + * @return Map<String, String> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 A map of config id to string escaped config json. -
0 Unexpected error -
+ */ + public Map getConverterConfigs(Integer organizationId) throws ApiException { + ApiResponse> localVarResp = getConverterConfigsWithHttpInfo(organizationId); + return localVarResp.getData(); + } + + /** + * List Converter Configs + * List all file filter configurations for your Organization. + * @param organizationId A unique Organization identifier. (required) + * @return ApiResponse<Map<String, String>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + +
Status Code Description Response Headers
200 A map of config id to string escaped config json. -
0 Unexpected error -
+ */ + public ApiResponse> getConverterConfigsWithHttpInfo(Integer organizationId) throws ApiException { + okhttp3.Call localVarCall = getConverterConfigsValidateBeforeCall(organizationId, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List Converter Configs (asynchronously) + * List all file filter configurations for your Organization. + * @param organizationId A unique Organization 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 map of config id to string escaped config json. -
0 Unexpected error -
+ */ + public okhttp3.Call getConverterConfigsAsync(Integer organizationId, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getConverterConfigsValidateBeforeCall(organizationId, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _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 14607344e..9a269e398 100644 --- a/src/main/java/com/lilt/client/api/DocumentsApi.java +++ b/src/main/java/com/lilt/client/api/DocumentsApi.java @@ -27,11 +27,13 @@ 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; @@ -410,22 +412,25 @@ public okhttp3.Call deleteDocumentAsync(Integer id, final ApiCallback Status Code Description Response Headers - 200 array of updated documents - + 200 A file. - + 502 File in pretranslation. - + 0 Unexpected error - */ - public okhttp3.Call documentsDoneReviewPostCall(DocumentDoneUpdateParameters1 body, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = body; + public okhttp3.Call downloadDocumentCall(Integer id, Boolean isXliff, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/documents/done/review"; + String localVarPath = "/documents/files"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -433,8 +438,16 @@ public okhttp3.Call documentsDoneReviewPostCall(DocumentDoneUpdateParameters1 bo 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/json" + "application/octet-stream" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -442,101 +455,112 @@ public okhttp3.Call documentsDoneReviewPostCall(DocumentDoneUpdateParameters1 bo } 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); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call documentsDoneReviewPostValidateBeforeCall(DocumentDoneUpdateParameters1 body, final ApiCallback _callback) throws ApiException { + private okhttp3.Call downloadDocumentValidateBeforeCall(Integer id, Boolean isXliff, 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 documentsDoneReviewPost(Async)"); + // 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 = documentsDoneReviewPostCall(body, _callback); + okhttp3.Call localVarCall = downloadDocumentCall(id, isXliff, _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<String> + * 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 array of updated documents -
200 A file. -
502 File in pretranslation. -
0 Unexpected error -
*/ - public List documentsDoneReviewPost(DocumentDoneUpdateParameters1 body) throws ApiException { - ApiResponse> localVarResp = documentsDoneReviewPostWithHttpInfo(body); + public byte[] downloadDocument(Integer id, Boolean isXliff) throws ApiException { + ApiResponse localVarResp = downloadDocumentWithHttpInfo(id, isXliff); 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<String>> + * 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 array of updated documents -
200 A file. -
502 File in pretranslation. -
0 Unexpected error -
*/ - public ApiResponse> documentsDoneReviewPostWithHttpInfo(DocumentDoneUpdateParameters1 body) throws ApiException { - okhttp3.Call localVarCall = documentsDoneReviewPostValidateBeforeCall(body, 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); } /** - * 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) + * 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 array of updated documents -
200 A file. -
502 File in pretranslation. -
0 Unexpected error -
*/ - public okhttp3.Call documentsDoneReviewPostAsync(DocumentDoneUpdateParameters1 body, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call downloadDocumentAsync(Integer id, Boolean isXliff, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = documentsDoneReviewPostValidateBeforeCall(body, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = downloadDocumentValidateBeforeCall(id, isXliff, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for documentsDoneTranslationPost - * @param body (required) + * 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 array of updated documents -
200 A Document object. -
0 Unexpected error -
*/ - public okhttp3.Call documentsDoneTranslationPostCall(DocumentDoneUpdateParameters body, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = body; + public okhttp3.Call getDocumentCall(Integer id, Boolean withSegments, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/documents/done/translation"; + String localVarPath = "/documents"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -544,6 +568,14 @@ public okhttp3.Call documentsDoneTranslationPostCall(DocumentDoneUpdateParameter 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" }; @@ -553,87 +585,93 @@ public okhttp3.Call documentsDoneTranslationPostCall(DocumentDoneUpdateParameter } 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); + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") - private okhttp3.Call documentsDoneTranslationPostValidateBeforeCall(DocumentDoneUpdateParameters body, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getDocumentValidateBeforeCall(Integer id, Boolean withSegments, 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 documentsDoneTranslationPost(Async)"); + // 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 = documentsDoneTranslationPostCall(body, _callback); + okhttp3.Call localVarCall = getDocumentCall(id, withSegments, _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<String> + * 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 array of updated documents -
200 A Document object. -
0 Unexpected error -
*/ - public List documentsDoneTranslationPost(DocumentDoneUpdateParameters body) throws ApiException { - ApiResponse> localVarResp = documentsDoneTranslationPostWithHttpInfo(body); + public DocumentWithSegments getDocument(Integer id, Boolean withSegments) throws ApiException { + ApiResponse localVarResp = getDocumentWithHttpInfo(id, withSegments); 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<String>> + * 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 array of updated documents -
200 A Document object. -
0 Unexpected error -
*/ - public ApiResponse> documentsDoneTranslationPostWithHttpInfo(DocumentDoneUpdateParameters body) throws ApiException { - okhttp3.Call localVarCall = documentsDoneTranslationPostValidateBeforeCall(body, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + 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); } /** - * 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) + * 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 array of updated documents -
200 A Document object. -
0 Unexpected error -
*/ - public okhttp3.Call documentsDoneTranslationPostAsync(DocumentDoneUpdateParameters body, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getDocumentAsync(Integer id, Boolean withSegments, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = documentsDoneTranslationPostValidateBeforeCall(body, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = getDocumentValidateBeforeCall(id, withSegments, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for documentsDoneUnlockPost - * @param body document ids to update (required) + * 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 @@ -643,11 +681,11 @@ public okhttp3.Call documentsDoneTranslationPostAsync(DocumentDoneUpdateParamete 200 array of updated documents - */ - public okhttp3.Call documentsDoneUnlockPostCall(Object body, final ApiCallback _callback) throws ApiException { + public okhttp3.Call markReviewDoneCall(DocumentDoneUpdateParameters2 body, final ApiCallback _callback) throws ApiException { Object localVarPostBody = body; // create path and map variables - String localVarPath = "/documents/done/unlock"; + String localVarPath = "/documents/done/review"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -674,24 +712,24 @@ public okhttp3.Call documentsDoneUnlockPostCall(Object body, final ApiCallback _ } @SuppressWarnings("rawtypes") - private okhttp3.Call documentsDoneUnlockPostValidateBeforeCall(Object body, final ApiCallback _callback) throws ApiException { + 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 documentsDoneUnlockPost(Async)"); + throw new ApiException("Missing the required parameter 'body' when calling markReviewDone(Async)"); } - okhttp3.Call localVarCall = documentsDoneUnlockPostCall(body, _callback); + okhttp3.Call localVarCall = markReviewDoneCall(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 document ids to update (required) - * @return List<String> + * 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 @@ -699,16 +737,16 @@ private okhttp3.Call documentsDoneUnlockPostValidateBeforeCall(Object body, fina
200 array of updated documents -
*/ - public List documentsDoneUnlockPost(Object body) throws ApiException { - ApiResponse> localVarResp = documentsDoneUnlockPostWithHttpInfo(body); + public List markReviewDone(DocumentDoneUpdateParameters2 body) throws ApiException { + ApiResponse> localVarResp = markReviewDoneWithHttpInfo(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 document ids to update (required) - * @return ApiResponse<List<String>> + * 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 @@ -716,16 +754,16 @@ public List documentsDoneUnlockPost(Object body) throws ApiException {
200 array of updated documents -
*/ - public ApiResponse> documentsDoneUnlockPostWithHttpInfo(Object body) throws ApiException { - okhttp3.Call localVarCall = documentsDoneUnlockPostValidateBeforeCall(body, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse> markReviewDoneWithHttpInfo(DocumentDoneUpdateParameters2 body) throws ApiException { + okhttp3.Call localVarCall = markReviewDoneValidateBeforeCall(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 document ids to update (required) + * 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 @@ -735,33 +773,30 @@ public ApiResponse> documentsDoneUnlockPostWithHttpInfo(Object body 200 array of updated documents - */ - public okhttp3.Call documentsDoneUnlockPostAsync(Object body, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call markReviewDoneAsync(DocumentDoneUpdateParameters2 body, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = documentsDoneUnlockPostValidateBeforeCall(body, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); + okhttp3.Call localVarCall = markReviewDoneValidateBeforeCall(body, _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) + * 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 A file. -
502 File in pretranslation. -
0 Unexpected error -
200 array of updated documents -
*/ - public okhttp3.Call downloadDocumentCall(Integer id, Boolean isXliff, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; + public okhttp3.Call markTranslationDoneCall(DocumentDoneUpdateParameters1 body, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = body; // create path and map variables - String localVarPath = "/documents/files"; + String localVarPath = "/documents/done/translation"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -769,16 +804,8 @@ public okhttp3.Call downloadDocumentCall(Integer id, Boolean isXliff, final ApiC 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" + "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { @@ -786,112 +813,106 @@ public okhttp3.Call downloadDocumentCall(Integer id, Boolean isXliff, final ApiC } 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, "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 downloadDocumentValidateBeforeCall(Integer id, Boolean isXliff, final ApiCallback _callback) throws ApiException { + private okhttp3.Call markTranslationDoneValidateBeforeCall(DocumentDoneUpdateParameters1 body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling downloadDocument(Async)"); + // 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 = downloadDocumentCall(id, isXliff, _callback); + okhttp3.Call localVarCall = markTranslationDoneCall(body, _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[] + * 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 A file. -
502 File in pretranslation. -
0 Unexpected error -
200 array of updated documents -
*/ - public byte[] downloadDocument(Integer id, Boolean isXliff) throws ApiException { - ApiResponse localVarResp = downloadDocumentWithHttpInfo(id, isXliff); + public List markTranslationDone(DocumentDoneUpdateParameters1 body) throws ApiException { + ApiResponse> localVarResp = markTranslationDoneWithHttpInfo(body); 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[]> + * 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 A file. -
502 File in pretranslation. -
0 Unexpected error -
200 array of updated documents -
*/ - public ApiResponse downloadDocumentWithHttpInfo(Integer id, Boolean isXliff) throws ApiException { - okhttp3.Call localVarCall = downloadDocumentValidateBeforeCall(id, isXliff, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse> markTranslationDoneWithHttpInfo(DocumentDoneUpdateParameters1 body) throws ApiException { + okhttp3.Call localVarCall = markTranslationDoneValidateBeforeCall(body, 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) + * 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 A file. -
502 File in pretranslation. -
0 Unexpected error -
200 array of updated documents -
*/ - public okhttp3.Call downloadDocumentAsync(Integer id, Boolean isXliff, final ApiCallback _callback) throws ApiException { + public okhttp3.Call markTranslationDoneAsync(DocumentDoneUpdateParameters1 body, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = downloadDocumentValidateBeforeCall(id, isXliff, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = markTranslationDoneValidateBeforeCall(body, _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) + * 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
200 A Document object. -
202 A status object. -
0 Unexpected error -
*/ - public okhttp3.Call getDocumentCall(Integer id, Boolean withSegments, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; + 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"; + String localVarPath = "/documents/pretranslate"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -899,12 +920,20 @@ public okhttp3.Call getDocumentCall(Integer id, Boolean withSegments, final ApiC Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (id != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("id", id)); + if (autoAccept != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("auto_accept", autoAccept)); } - if (withSegments != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("with_segments", withSegments)); + 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 = { @@ -916,112 +945,116 @@ public okhttp3.Call getDocumentCall(Integer id, Boolean withSegments, final ApiC } 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, "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 getDocumentValidateBeforeCall(Integer id, Boolean withSegments, final ApiCallback _callback) throws ApiException { + private okhttp3.Call pretranslateDocumentsValidateBeforeCall(DocumentPretranslateParameters body, Boolean autoAccept, Boolean caseSensitive, Boolean attributeToCreator, String mode, 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)"); + // 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 = getDocumentCall(id, withSegments, _callback); + okhttp3.Call localVarCall = pretranslateDocumentsCall(body, autoAccept, caseSensitive, attributeToCreator, mode, _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 + * 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
200 A Document object. -
202 A status object. -
0 Unexpected error -
*/ - public DocumentWithSegments getDocument(Integer id, Boolean withSegments) throws ApiException { - ApiResponse localVarResp = getDocumentWithHttpInfo(id, withSegments); + 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(); } /** - * 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> + * 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
200 A Document object. -
202 A status 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(); + 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); } /** - * 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) + * 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
200 A Document object. -
202 A status object. -
0 Unexpected error -
*/ - public okhttp3.Call getDocumentAsync(Integer id, Boolean withSegments, final ApiCallback _callback) throws ApiException { + public okhttp3.Call pretranslateDocumentsAsync(DocumentPretranslateParameters body, Boolean autoAccept, Boolean caseSensitive, Boolean attributeToCreator, String mode, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getDocumentValidateBeforeCall(id, withSegments, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + 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 pretranslateDocuments + * Build call for unlockDocuments * @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 -
200 array of updated documents -
*/ - public okhttp3.Call pretranslateDocumentsCall(DocumentPretranslateParameters body, Boolean autoAccept, Boolean caseSensitive, Boolean attributeToCreator, String mode, final ApiCallback _callback) throws ApiException { + public okhttp3.Call unlockDocumentsCall(DocumentDoneUpdateParameters body, final ApiCallback _callback) throws ApiException { Object localVarPostBody = body; // create path and map variables - String localVarPath = "/documents/pretranslate"; + String localVarPath = "/documents/done/unlock"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1029,22 +1062,6 @@ public okhttp3.Call pretranslateDocumentsCall(DocumentPretranslateParameters bod 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" }; @@ -1064,86 +1081,71 @@ public okhttp3.Call pretranslateDocumentsCall(DocumentPretranslateParameters bod } @SuppressWarnings("rawtypes") - private okhttp3.Call pretranslateDocumentsValidateBeforeCall(DocumentPretranslateParameters body, Boolean autoAccept, Boolean caseSensitive, Boolean attributeToCreator, String mode, final ApiCallback _callback) throws ApiException { + 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 pretranslateDocuments(Async)"); + throw new ApiException("Missing the required parameter 'body' when calling unlockDocuments(Async)"); } - okhttp3.Call localVarCall = pretranslateDocumentsCall(body, autoAccept, caseSensitive, attributeToCreator, mode, _callback); + okhttp3.Call localVarCall = unlockDocumentsCall(body, _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`. + * 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) - * @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 + * @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
202 A status object. -
0 Unexpected error -
200 array of updated documents -
*/ - public DocumentPretranslateResponse pretranslateDocuments(DocumentPretranslateParameters body, Boolean autoAccept, Boolean caseSensitive, Boolean attributeToCreator, String mode) throws ApiException { - ApiResponse localVarResp = pretranslateDocumentsWithHttpInfo(body, autoAccept, caseSensitive, attributeToCreator, mode); + public List unlockDocuments(DocumentDoneUpdateParameters body) throws ApiException { + ApiResponse> localVarResp = unlockDocumentsWithHttpInfo(body); 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`. + * 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) - * @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> + * @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
202 A status object. -
0 Unexpected error -
200 array of updated documents -
*/ - 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(); + public ApiResponse> unlockDocumentsWithHttpInfo(DocumentDoneUpdateParameters body) throws ApiException { + okhttp3.Call localVarCall = unlockDocumentsValidateBeforeCall(body, 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`. + * 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 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 -
200 array of updated documents -
*/ - public okhttp3.Call pretranslateDocumentsAsync(DocumentPretranslateParameters body, Boolean autoAccept, Boolean caseSensitive, Boolean attributeToCreator, String mode, final ApiCallback _callback) throws ApiException { + public okhttp3.Call unlockDocumentsAsync(DocumentDoneUpdateParameters body, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = pretranslateDocumentsValidateBeforeCall(body, autoAccept, caseSensitive, attributeToCreator, mode, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); + okhttp3.Call localVarCall = unlockDocumentsValidateBeforeCall(body, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } @@ -1267,8 +1269,10 @@ public okhttp3.Call updateDocumentAsync(DocumentUpdateParameters body, final Api * @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 `null`, `tm`, or `tm+mt` (optional) + * @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 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 @@ -1280,7 +1284,7 @@ public okhttp3.Call updateDocumentAsync(DocumentUpdateParameters body, final Api 0 Unexpected error - */ - public okhttp3.Call uploadDocumentCall(String name, Integer projectId, File body, String pretranslate, Boolean autoAccept, Integer configId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call uploadDocumentCall(String name, Integer projectId, File body, String pretranslate, Boolean autoAccept, Boolean caseSensitive, Boolean matchAttribution, Integer configId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -1308,6 +1312,14 @@ public okhttp3.Call uploadDocumentCall(String name, Integer projectId, File body localVarHeaderParams.put("auto_accept", localVarApiClient.parameterToString(autoAccept)); } + if (caseSensitive != null) { + localVarHeaderParams.put("case_sensitive", localVarApiClient.parameterToString(caseSensitive)); + } + + if (matchAttribution != null) { + localVarHeaderParams.put("match_attribution", localVarApiClient.parameterToString(matchAttribution)); + } + if (configId != null) { localVarHeaderParams.put("config_id", localVarApiClient.parameterToString(configId)); } @@ -1331,7 +1343,7 @@ public okhttp3.Call uploadDocumentCall(String name, Integer projectId, File body } @SuppressWarnings("rawtypes") - private okhttp3.Call uploadDocumentValidateBeforeCall(String name, Integer projectId, File body, String pretranslate, Boolean autoAccept, Integer configId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call uploadDocumentValidateBeforeCall(String name, Integer projectId, File body, String pretranslate, Boolean autoAccept, Boolean caseSensitive, Boolean matchAttribution, Integer configId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { @@ -1349,7 +1361,7 @@ private okhttp3.Call uploadDocumentValidateBeforeCall(String name, Integer proje } - okhttp3.Call localVarCall = uploadDocumentCall(name, projectId, body, pretranslate, autoAccept, configId, _callback); + okhttp3.Call localVarCall = uploadDocumentCall(name, projectId, body, pretranslate, autoAccept, caseSensitive, matchAttribution, configId, _callback); return localVarCall; } @@ -1360,8 +1372,10 @@ private okhttp3.Call uploadDocumentValidateBeforeCall(String name, Integer proje * @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 `null`, `tm`, or `tm+mt` (optional) + * @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 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 @@ -1372,8 +1386,8 @@ private okhttp3.Call uploadDocumentValidateBeforeCall(String name, Integer proje 0 Unexpected error - */ - public DocumentWithSegments uploadDocument(String name, Integer projectId, File body, String pretranslate, Boolean autoAccept, Integer configId) throws ApiException { - ApiResponse localVarResp = uploadDocumentWithHttpInfo(name, projectId, body, pretranslate, autoAccept, configId); + public DocumentWithSegments uploadDocument(String name, Integer projectId, File body, String pretranslate, Boolean autoAccept, Boolean caseSensitive, Boolean matchAttribution, Integer configId) throws ApiException { + ApiResponse localVarResp = uploadDocumentWithHttpInfo(name, projectId, body, pretranslate, autoAccept, caseSensitive, matchAttribution, configId); return localVarResp.getData(); } @@ -1383,8 +1397,10 @@ public DocumentWithSegments uploadDocument(String name, Integer projectId, File * @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 `null`, `tm`, or `tm+mt` (optional) + * @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 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 @@ -1395,8 +1411,8 @@ public DocumentWithSegments uploadDocument(String name, Integer projectId, File 0 Unexpected error - */ - public ApiResponse uploadDocumentWithHttpInfo(String name, Integer projectId, File body, String pretranslate, Boolean autoAccept, Integer configId) throws ApiException { - okhttp3.Call localVarCall = uploadDocumentValidateBeforeCall(name, projectId, body, pretranslate, autoAccept, configId, null); + public ApiResponse uploadDocumentWithHttpInfo(String name, Integer projectId, File body, String pretranslate, Boolean autoAccept, Boolean caseSensitive, Boolean matchAttribution, Integer configId) throws ApiException { + okhttp3.Call localVarCall = uploadDocumentValidateBeforeCall(name, projectId, body, pretranslate, autoAccept, caseSensitive, matchAttribution, configId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -1407,8 +1423,10 @@ public ApiResponse uploadDocumentWithHttpInfo(String name, * @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 `null`, `tm`, or `tm+mt` (optional) + * @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 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 @@ -1420,9 +1438,9 @@ public ApiResponse uploadDocumentWithHttpInfo(String name, 0 Unexpected error - */ - public okhttp3.Call uploadDocumentAsync(String name, Integer projectId, File body, String pretranslate, Boolean autoAccept, Integer configId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call uploadDocumentAsync(String name, Integer projectId, File body, String pretranslate, Boolean autoAccept, Boolean caseSensitive, Boolean matchAttribution, Integer configId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = uploadDocumentValidateBeforeCall(name, projectId, body, pretranslate, autoAccept, configId, _callback); + okhttp3.Call localVarCall = uploadDocumentValidateBeforeCall(name, projectId, body, pretranslate, autoAccept, caseSensitive, matchAttribution, configId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/com/lilt/client/api/FilesApi.java b/src/main/java/com/lilt/client/api/FilesApi.java index 4255b7beb..a05069f87 100644 --- a/src/main/java/com/lilt/client/api/FilesApi.java +++ b/src/main/java/com/lilt/client/api/FilesApi.java @@ -27,6 +27,7 @@ import java.io.IOException; +import com.lilt.client.model.AddFileLabelRequest; import com.lilt.client.model.Error; import java.io.File; import com.lilt.client.model.FileDeleteResponse; @@ -57,6 +58,126 @@ public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } + /** + * Build call for addLabel + * @param id A File id. (required) + * @param name (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
204 A success response. -
+ */ + public okhttp3.Call addLabelCall(String id, AddFileLabelRequest name, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = name; + + // create path and map variables + String localVarPath = "/files/labels"; + + 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 = { + + }; + 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 addLabelValidateBeforeCall(String id, AddFileLabelRequest name, 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 addLabel(Async)"); + } + + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling addLabel(Async)"); + } + + + okhttp3.Call localVarCall = addLabelCall(id, name, _callback); + return localVarCall; + + } + + /** + * 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\" }' ``` + * @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 + * @http.response.details + + + +
Status Code Description Response Headers
204 A success response. -
+ */ + public void addLabel(String id, AddFileLabelRequest name) throws ApiException { + addLabelWithHttpInfo(id, name); + } + + /** + * 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\" }' ``` + * @param id A File id. (required) + * @param name (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
204 A success response. -
+ */ + public ApiResponse addLabelWithHttpInfo(String id, AddFileLabelRequest name) throws ApiException { + okhttp3.Call localVarCall = addLabelValidateBeforeCall(id, name, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * 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\" }' ``` + * @param id A File id. (required) + * @param name (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
204 A success response. -
+ */ + public okhttp3.Call addLabelAsync(String id, AddFileLabelRequest name, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = addLabelValidateBeforeCall(id, name, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } /** * Build call for deleteFile * @param id A unique File identifier. (required) @@ -176,9 +297,125 @@ public okhttp3.Call deleteFileAsync(Integer id, final ApiCallback + Status Code Description Response Headers + 200 A file. - + + */ + public okhttp3.Call downloadCall(String id, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/files/download"; + + 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/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 downloadValidateBeforeCall(String 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 download(Async)"); + } + + + okhttp3.Call localVarCall = downloadCall(id, _callback); + return localVarCall; + + } + + /** + * Download file + * Download a File. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/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 + * @http.response.details + + + +
Status Code Description Response Headers
200 A file. -
+ */ + public byte[] download(String id) throws ApiException { + ApiResponse localVarResp = downloadWithHttpInfo(id); + return localVarResp.getData(); + } + + /** + * Download file + * Download a File. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/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 + * @http.response.details + + + +
Status Code Description Response Headers
200 A file. -
+ */ + public ApiResponse downloadWithHttpInfo(String id) throws ApiException { + okhttp3.Call localVarCall = downloadValidateBeforeCall(id, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Download file (asynchronously) + * Download a File. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/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 + * @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. -
+ */ + public okhttp3.Call downloadAsync(String id, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = downloadValidateBeforeCall(id, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getFiles * @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) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -191,7 +428,7 @@ public okhttp3.Call deleteFileAsync(Integer id, final ApiCallback 0 Unexpected error. - */ - public okhttp3.Call getFilesCall(Integer id, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFilesCall(Integer id, List labels, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -207,6 +444,10 @@ public okhttp3.Call getFilesCall(Integer id, final ApiCallback _callback) throws localVarQueryParams.addAll(localVarApiClient.parameterToPair("id", id)); } + if (labels != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("csv", "labels", labels)); + } + final String[] localVarAccepts = { "application/json" }; @@ -226,10 +467,10 @@ public okhttp3.Call getFilesCall(Integer id, final ApiCallback _callback) throws } @SuppressWarnings("rawtypes") - private okhttp3.Call getFilesValidateBeforeCall(Integer id, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getFilesValidateBeforeCall(Integer id, List labels, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getFilesCall(id, _callback); + okhttp3.Call localVarCall = getFilesCall(id, labels, _callback); return localVarCall; } @@ -238,6 +479,7 @@ private okhttp3.Call getFilesValidateBeforeCall(Integer id, final ApiCallback _c * 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``` * @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> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -249,8 +491,8 @@ private okhttp3.Call getFilesValidateBeforeCall(Integer id, final ApiCallback _c 0 Unexpected error. - */ - public List getFiles(Integer id) throws ApiException { - ApiResponse> localVarResp = getFilesWithHttpInfo(id); + public List getFiles(Integer id, List labels) throws ApiException { + ApiResponse> localVarResp = getFilesWithHttpInfo(id, labels); return localVarResp.getData(); } @@ -258,6 +500,7 @@ public List getFiles(Integer id) throws ApiException { * 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``` * @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>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -269,8 +512,8 @@ public List getFiles(Integer id) throws ApiException { 0 Unexpected error. - */ - public ApiResponse> getFilesWithHttpInfo(Integer id) throws ApiException { - okhttp3.Call localVarCall = getFilesValidateBeforeCall(id, null); + public ApiResponse> getFilesWithHttpInfo(Integer id, List labels) throws ApiException { + okhttp3.Call localVarCall = getFilesValidateBeforeCall(id, labels, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -279,6 +522,7 @@ public ApiResponse> getFilesWithHttpInfo(Integer id) throws Api * Retrieve a File (asynchronously) * 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``` * @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) * @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 @@ -291,18 +535,141 @@ public ApiResponse> getFilesWithHttpInfo(Integer id) throws Api 0 Unexpected error. - */ - public okhttp3.Call getFilesAsync(Integer id, final ApiCallback> _callback) throws ApiException { + public okhttp3.Call getFilesAsync(Integer id, List labels, final ApiCallback> _callback) throws ApiException { - okhttp3.Call localVarCall = getFilesValidateBeforeCall(id, _callback); + okhttp3.Call localVarCall = getFilesValidateBeforeCall(id, labels, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for removeLabel + * @param id A File id. (required) + * @param name A label name. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
204 A success response. -
+ */ + public okhttp3.Call removeLabelCall(String id, String name, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/files/labels"; + + 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 (name != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("name", name)); + } + + 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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call removeLabelValidateBeforeCall(String id, String name, 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 removeLabel(Async)"); + } + + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling removeLabel(Async)"); + } + + + okhttp3.Call localVarCall = removeLabelCall(id, name, _callback); + return localVarCall; + + } + + /** + * 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' ``` + * @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 + * @http.response.details + + + +
Status Code Description Response Headers
204 A success response. -
+ */ + public void removeLabel(String id, String name) throws ApiException { + removeLabelWithHttpInfo(id, name); + } + + /** + * 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' ``` + * @param id A File id. (required) + * @param name A label name. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
204 A success response. -
+ */ + public ApiResponse removeLabelWithHttpInfo(String id, String name) throws ApiException { + okhttp3.Call localVarCall = removeLabelValidateBeforeCall(id, name, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * 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' ``` + * @param id A File id. (required) + * @param name A label name. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
204 A success response. -
+ */ + public okhttp3.Call removeLabelAsync(String id, String name, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = removeLabelValidateBeforeCall(id, name, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } /** * Build call for uploadFile * @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 exportUri A webhook endpoint that will export the translated document back to the source repository. (optional) * @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) * @param langId Flag indicating whether to perform language detection on the uploaded file. Default is false. (optional) * @param projectId The project to associate the uploaded file with. (optional) @@ -318,7 +685,7 @@ public okhttp3.Call getFilesAsync(Integer id, final ApiCallback 0 Unexpected error - */ - public okhttp3.Call uploadFileCall(String name, File body, String exportUri, String fileHash, Boolean langId, Integer projectId, String category, String labels, final ApiCallback _callback) throws ApiException { + public okhttp3.Call uploadFileCall(String name, File body, String fileHash, Boolean langId, Integer projectId, String category, String labels, final ApiCallback _callback) throws ApiException { Object localVarPostBody = body; // create path and map variables @@ -334,10 +701,6 @@ public okhttp3.Call uploadFileCall(String name, File body, String exportUri, Str localVarQueryParams.addAll(localVarApiClient.parameterToPair("name", name)); } - if (exportUri != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("export_uri", exportUri)); - } - if (fileHash != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("file_hash", fileHash)); } @@ -377,7 +740,7 @@ public okhttp3.Call uploadFileCall(String name, File body, String exportUri, Str } @SuppressWarnings("rawtypes") - private okhttp3.Call uploadFileValidateBeforeCall(String name, File body, String exportUri, String fileHash, Boolean langId, Integer projectId, String category, String labels, final ApiCallback _callback) throws ApiException { + private okhttp3.Call uploadFileValidateBeforeCall(String name, File body, String fileHash, Boolean langId, Integer projectId, String category, String labels, final ApiCallback _callback) throws ApiException { // verify the required parameter 'name' is set if (name == null) { @@ -390,17 +753,16 @@ private okhttp3.Call uploadFileValidateBeforeCall(String name, File body, String } - okhttp3.Call localVarCall = uploadFileCall(name, body, exportUri, fileHash, langId, projectId, category, labels, _callback); + okhttp3.Call localVarCall = uploadFileCall(name, body, fileHash, langId, projectId, category, labels, _callback); return localVarCall; } /** * 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. When uploading a file, any parameters needed to issue a request to the specified export_uri can be encoded in the export_uri itself as query parameters. Typical examples of parameters that may be required are an access token to authorize requests to a third-party HTTP API and the unique identifier of a resource available via the third-party HTTP API that corresponds to the file. An example export_uri that encodes a target resource identifier (i.e., source_id) of an associated resource behind a third party HTTP API is given in the CURL command below. Example CURL command: ``` curl -X POST https://lilt.com/2/files?key=API_KEY&name=en_US.json&export_uri=https://example.com/export?source_id=12345 \\ --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://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`. * @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 exportUri A webhook endpoint that will export the translated document back to the source repository. (optional) * @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) * @param langId Flag indicating whether to perform language detection on the uploaded file. Default is false. (optional) * @param projectId The project to associate the uploaded file with. (optional) @@ -415,17 +777,16 @@ private okhttp3.Call uploadFileValidateBeforeCall(String name, File body, String 0 Unexpected error - */ - public SourceFile uploadFile(String name, File body, String exportUri, String fileHash, Boolean langId, Integer projectId, String category, String labels) throws ApiException { - ApiResponse localVarResp = uploadFileWithHttpInfo(name, body, exportUri, fileHash, langId, projectId, category, labels); + public SourceFile uploadFile(String name, File body, String fileHash, Boolean langId, Integer projectId, String category, String labels) throws ApiException { + ApiResponse localVarResp = uploadFileWithHttpInfo(name, body, fileHash, langId, projectId, category, labels); return localVarResp.getData(); } /** * 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. When uploading a file, any parameters needed to issue a request to the specified export_uri can be encoded in the export_uri itself as query parameters. Typical examples of parameters that may be required are an access token to authorize requests to a third-party HTTP API and the unique identifier of a resource available via the third-party HTTP API that corresponds to the file. An example export_uri that encodes a target resource identifier (i.e., source_id) of an associated resource behind a third party HTTP API is given in the CURL command below. Example CURL command: ``` curl -X POST https://lilt.com/2/files?key=API_KEY&name=en_US.json&export_uri=https://example.com/export?source_id=12345 \\ --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://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`. * @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 exportUri A webhook endpoint that will export the translated document back to the source repository. (optional) * @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) * @param langId Flag indicating whether to perform language detection on the uploaded file. Default is false. (optional) * @param projectId The project to associate the uploaded file with. (optional) @@ -440,18 +801,17 @@ public SourceFile uploadFile(String name, File body, String exportUri, String fi 0 Unexpected error - */ - public ApiResponse uploadFileWithHttpInfo(String name, File body, String exportUri, String fileHash, Boolean langId, Integer projectId, String category, String labels) throws ApiException { - okhttp3.Call localVarCall = uploadFileValidateBeforeCall(name, body, exportUri, fileHash, langId, projectId, category, labels, null); + public ApiResponse uploadFileWithHttpInfo(String name, File body, String fileHash, Boolean langId, Integer projectId, String category, String labels) throws ApiException { + okhttp3.Call localVarCall = uploadFileValidateBeforeCall(name, body, fileHash, langId, projectId, category, labels, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * 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. When uploading a file, any parameters needed to issue a request to the specified export_uri can be encoded in the export_uri itself as query parameters. Typical examples of parameters that may be required are an access token to authorize requests to a third-party HTTP API and the unique identifier of a resource available via the third-party HTTP API that corresponds to the file. An example export_uri that encodes a target resource identifier (i.e., source_id) of an associated resource behind a third party HTTP API is given in the CURL command below. Example CURL command: ``` curl -X POST https://lilt.com/2/files?key=API_KEY&name=en_US.json&export_uri=https://example.com/export?source_id=12345 \\ --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://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`. * @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 exportUri A webhook endpoint that will export the translated document back to the source repository. (optional) * @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) * @param langId Flag indicating whether to perform language detection on the uploaded file. Default is false. (optional) * @param projectId The project to associate the uploaded file with. (optional) @@ -467,9 +827,9 @@ public ApiResponse uploadFileWithHttpInfo(String name, File body, St 0 Unexpected error - */ - public okhttp3.Call uploadFileAsync(String name, File body, String exportUri, String fileHash, Boolean langId, Integer projectId, String category, String labels, final ApiCallback _callback) throws ApiException { + public okhttp3.Call uploadFileAsync(String name, File body, String fileHash, Boolean langId, Integer projectId, String category, String labels, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = uploadFileValidateBeforeCall(name, body, exportUri, fileHash, langId, projectId, category, labels, _callback); + okhttp3.Call localVarCall = uploadFileValidateBeforeCall(name, body, fileHash, langId, projectId, category, labels, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/com/lilt/client/api/JobsApi.java b/src/main/java/com/lilt/client/api/JobsApi.java new file mode 100644 index 000000000..05cdfd966 --- /dev/null +++ b/src/main/java/com/lilt/client/api/JobsApi.java @@ -0,0 +1,1460 @@ +/* + * 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 version of the OpenAPI document: v2.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.Error; +import com.lilt.client.model.Job; +import com.lilt.client.model.JobCreateParameters; +import com.lilt.client.model.JobDeleteResponse; +import com.lilt.client.model.JobLeverageStats; +import com.lilt.client.model.JobUpdateParameters; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class JobsApi { + private ApiClient localVarApiClient; + + public JobsApi() { + this(Configuration.getDefaultApiClient()); + } + + public JobsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + /** + * Build call for archiveJob + * @param jobId A job id. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 A job object. -
0 Unexpected error -
+ */ + public okhttp3.Call archiveJobCall(Integer jobId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/jobs/{jobId}/archive" + .replaceAll("\\{" + "jobId" + "\\}", localVarApiClient.escapeString(jobId.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call archiveJobValidateBeforeCall(Integer jobId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException("Missing the required parameter 'jobId' when calling archiveJob(Async)"); + } + + + okhttp3.Call localVarCall = archiveJobCall(jobId, _callback); + return localVarCall; + + } + + /** + * 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' ``` + * @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 + * @http.response.details + + + + +
Status Code Description Response Headers
200 A job object. -
0 Unexpected error -
+ */ + public Job archiveJob(Integer jobId) throws ApiException { + ApiResponse localVarResp = archiveJobWithHttpInfo(jobId); + return localVarResp.getData(); + } + + /** + * 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' ``` + * @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 + * @http.response.details + + + + +
Status Code Description Response Headers
200 A job object. -
0 Unexpected error -
+ */ + public ApiResponse archiveJobWithHttpInfo(Integer jobId) throws ApiException { + okhttp3.Call localVarCall = archiveJobValidateBeforeCall(jobId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * 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' ``` + * @param jobId A job id. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 A job object. -
0 Unexpected error -
+ */ + public okhttp3.Call archiveJobAsync(Integer jobId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = archiveJobValidateBeforeCall(jobId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for createJob + * @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 Job object. -
0 Unexpected error -
+ */ + public okhttp3.Call createJobCall(JobCreateParameters body, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/jobs"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + 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 createJobValidateBeforeCall(JobCreateParameters 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 createJob(Async)"); + } + + + okhttp3.Call localVarCall = createJobCall(body, _callback); + return localVarCall; + + } + + /** + * 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\" } ] }' ``` + * @param body (required) + * @return Job + * @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 Job object. -
0 Unexpected error -
+ */ + public Job createJob(JobCreateParameters body) throws ApiException { + ApiResponse localVarResp = createJobWithHttpInfo(body); + return localVarResp.getData(); + } + + /** + * 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\" } ] }' ``` + * @param body (required) + * @return ApiResponse<Job> + * @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 Job object. -
0 Unexpected error -
+ */ + public ApiResponse createJobWithHttpInfo(JobCreateParameters body) throws ApiException { + okhttp3.Call localVarCall = createJobValidateBeforeCall(body, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * 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\" } ] }' ``` + * @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 Job object. -
0 Unexpected error -
+ */ + public okhttp3.Call createJobAsync(JobCreateParameters body, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = createJobValidateBeforeCall(body, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteJob + * @param jobId A job id. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 A status object. -
0 Unexpected error -
+ */ + public okhttp3.Call deleteJobCall(Integer jobId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/jobs/{jobId}" + .replaceAll("\\{" + "jobId" + "\\}", localVarApiClient.escapeString(jobId.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 deleteJobValidateBeforeCall(Integer jobId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException("Missing the required parameter 'jobId' when calling deleteJob(Async)"); + } + + + okhttp3.Call localVarCall = deleteJobCall(jobId, _callback); + return localVarCall; + + } + + /** + * 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' ``` + * @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 + * @http.response.details + + + + +
Status Code Description Response Headers
200 A status object. -
0 Unexpected error -
+ */ + public JobDeleteResponse deleteJob(Integer jobId) throws ApiException { + ApiResponse localVarResp = deleteJobWithHttpInfo(jobId); + return localVarResp.getData(); + } + + /** + * 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' ``` + * @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 + * @http.response.details + + + + +
Status Code Description Response Headers
200 A status object. -
0 Unexpected error -
+ */ + public ApiResponse deleteJobWithHttpInfo(Integer jobId) throws ApiException { + okhttp3.Call localVarCall = deleteJobValidateBeforeCall(jobId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * 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' ``` + * @param jobId A job id. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 A status object. -
0 Unexpected error -
+ */ + public okhttp3.Call deleteJobAsync(Integer jobId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteJobValidateBeforeCall(jobId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deliverJob + * @param jobId A job id. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 A job object. -
0 Unexpected error -
+ */ + public okhttp3.Call deliverJobCall(Integer jobId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/jobs/{jobId}/deliver" + .replaceAll("\\{" + "jobId" + "\\}", localVarApiClient.escapeString(jobId.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deliverJobValidateBeforeCall(Integer jobId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException("Missing the required parameter 'jobId' when calling deliverJob(Async)"); + } + + + okhttp3.Call localVarCall = deliverJobCall(jobId, _callback); + return localVarCall; + + } + + /** + * 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' ``` + * @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 + * @http.response.details + + + + +
Status Code Description Response Headers
200 A job object. -
0 Unexpected error -
+ */ + public Job deliverJob(Integer jobId) throws ApiException { + ApiResponse localVarResp = deliverJobWithHttpInfo(jobId); + return localVarResp.getData(); + } + + /** + * 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' ``` + * @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 + * @http.response.details + + + + +
Status Code Description Response Headers
200 A job object. -
0 Unexpected error -
+ */ + public ApiResponse deliverJobWithHttpInfo(Integer jobId) throws ApiException { + okhttp3.Call localVarCall = deliverJobValidateBeforeCall(jobId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * 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' ``` + * @param jobId A job id. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 A job object. -
0 Unexpected error -
+ */ + public okhttp3.Call deliverJobAsync(Integer jobId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deliverJobValidateBeforeCall(jobId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for downloadJob + * @param jobId A job id. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 zipped file -
0 Unexpected error -
+ */ + public okhttp3.Call downloadJobCall(Integer jobId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/jobs/{jobId}/downlod" + .replaceAll("\\{" + "jobId" + "\\}", localVarApiClient.escapeString(jobId.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 downloadJobValidateBeforeCall(Integer jobId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException("Missing the required parameter 'jobId' when calling downloadJob(Async)"); + } + + + okhttp3.Call localVarCall = downloadJobCall(jobId, _callback); + return localVarCall; + + } + + /** + * 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' ``` + * @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 + + + + +
Status Code Description Response Headers
200 zipped file -
0 Unexpected error -
+ */ + public void downloadJob(Integer jobId) throws ApiException { + downloadJobWithHttpInfo(jobId); + } + + /** + * 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' ``` + * @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 + * @http.response.details + + + + +
Status Code Description Response Headers
200 zipped file -
0 Unexpected error -
+ */ + public ApiResponse downloadJobWithHttpInfo(Integer jobId) throws ApiException { + okhttp3.Call localVarCall = downloadJobValidateBeforeCall(jobId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * 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' ``` + * @param jobId A job id. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 zipped file -
0 Unexpected error -
+ */ + public okhttp3.Call downloadJobAsync(Integer jobId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = downloadJobValidateBeforeCall(jobId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for exportJob + * @param jobId A job id. (required) + * @param type category for files and memory. (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 200 status. -
0 Unexpected error -
+ */ + public okhttp3.Call exportJobCall(Integer jobId, String type, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/jobs/{jobId}/export" + .replaceAll("\\{" + "jobId" + "\\}", localVarApiClient.escapeString(jobId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (type != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type)); + } + + 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 exportJobValidateBeforeCall(Integer jobId, String type, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException("Missing the required parameter 'jobId' when calling exportJob(Async)"); + } + + // verify the required parameter 'type' is set + if (type == null) { + throw new ApiException("Missing the required parameter 'type' when calling exportJob(Async)"); + } + + + okhttp3.Call localVarCall = exportJobCall(jobId, type, _callback); + return localVarCall; + + } + + /** + * 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. + * @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 + * @http.response.details + + + + +
Status Code Description Response Headers
200 200 status. -
0 Unexpected error -
+ */ + public void exportJob(Integer jobId, String type) throws ApiException { + exportJobWithHttpInfo(jobId, type); + } + + /** + * 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. + * @param jobId A job id. (required) + * @param type category for files and memory. (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 200 status. -
0 Unexpected error -
+ */ + public ApiResponse exportJobWithHttpInfo(Integer jobId, String type) throws ApiException { + okhttp3.Call localVarCall = exportJobValidateBeforeCall(jobId, type, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * 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. + * @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 + * @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 200 status. -
0 Unexpected error -
+ */ + public okhttp3.Call exportJobAsync(Integer jobId, String type, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = exportJobValidateBeforeCall(jobId, type, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for getJob + * @param jobId A job id. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 A job object. -
0 Unexpected error -
+ */ + public okhttp3.Call getJobCall(Integer jobId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/jobs/{jobId}" + .replaceAll("\\{" + "jobId" + "\\}", localVarApiClient.escapeString(jobId.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 getJobValidateBeforeCall(Integer jobId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException("Missing the required parameter 'jobId' when calling getJob(Async)"); + } + + + okhttp3.Call localVarCall = getJobCall(jobId, _callback); + return localVarCall; + + } + + /** + * 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' ``` + * @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 + * @http.response.details + + + + +
Status Code Description Response Headers
200 A job object. -
0 Unexpected error -
+ */ + public Job getJob(Integer jobId) throws ApiException { + ApiResponse localVarResp = getJobWithHttpInfo(jobId); + return localVarResp.getData(); + } + + /** + * 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' ``` + * @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 + * @http.response.details + + + + +
Status Code Description Response Headers
200 A job object. -
0 Unexpected error -
+ */ + public ApiResponse getJobWithHttpInfo(Integer jobId) throws ApiException { + okhttp3.Call localVarCall = getJobValidateBeforeCall(jobId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * 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' ``` + * @param jobId A job id. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 A job object. -
0 Unexpected error -
+ */ + public okhttp3.Call getJobAsync(Integer jobId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getJobValidateBeforeCall(jobId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getJobLeverageStats + * @param jobId A job id. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 A job leverage stats object. -
0 Unexpected error -
+ */ + public okhttp3.Call getJobLeverageStatsCall(Integer jobId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/jobs/{jobId}/stats" + .replaceAll("\\{" + "jobId" + "\\}", localVarApiClient.escapeString(jobId.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getJobLeverageStatsValidateBeforeCall(Integer jobId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException("Missing the required parameter 'jobId' when calling getJobLeverageStats(Async)"); + } + + + okhttp3.Call localVarCall = getJobLeverageStatsCall(jobId, _callback); + return localVarCall; + + } + + /** + * 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' ``` + * @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 + * @http.response.details + + + + +
Status Code Description Response Headers
200 A job leverage stats object. -
0 Unexpected error -
+ */ + public JobLeverageStats getJobLeverageStats(Integer jobId) throws ApiException { + ApiResponse localVarResp = getJobLeverageStatsWithHttpInfo(jobId); + return localVarResp.getData(); + } + + /** + * 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' ``` + * @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 + * @http.response.details + + + + +
Status Code Description Response Headers
200 A job leverage stats object. -
0 Unexpected error -
+ */ + public ApiResponse getJobLeverageStatsWithHttpInfo(Integer jobId) throws ApiException { + okhttp3.Call localVarCall = getJobLeverageStatsValidateBeforeCall(jobId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * 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' ``` + * @param jobId A job id. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 A job leverage stats object. -
0 Unexpected error -
+ */ + public okhttp3.Call getJobLeverageStatsAsync(Integer jobId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getJobLeverageStatsValidateBeforeCall(jobId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for reactivateJob + * @param jobId A job id. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 A job object. -
0 Unexpected error -
+ */ + public okhttp3.Call reactivateJobCall(Integer jobId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/jobs/{jobId}/reactivate" + .replaceAll("\\{" + "jobId" + "\\}", localVarApiClient.escapeString(jobId.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call reactivateJobValidateBeforeCall(Integer jobId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException("Missing the required parameter 'jobId' when calling reactivateJob(Async)"); + } + + + okhttp3.Call localVarCall = reactivateJobCall(jobId, _callback); + return localVarCall; + + } + + /** + * 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' ``` + * @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 + * @http.response.details + + + + +
Status Code Description Response Headers
200 A job object. -
0 Unexpected error -
+ */ + public Job reactivateJob(Integer jobId) throws ApiException { + ApiResponse localVarResp = reactivateJobWithHttpInfo(jobId); + return localVarResp.getData(); + } + + /** + * 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' ``` + * @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 + * @http.response.details + + + + +
Status Code Description Response Headers
200 A job object. -
0 Unexpected error -
+ */ + public ApiResponse reactivateJobWithHttpInfo(Integer jobId) throws ApiException { + okhttp3.Call localVarCall = reactivateJobValidateBeforeCall(jobId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * 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' ``` + * @param jobId A job id. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 A job object. -
0 Unexpected error -
+ */ + public okhttp3.Call reactivateJobAsync(Integer jobId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = reactivateJobValidateBeforeCall(jobId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for retrieveAllJobs + * @param isArchived Retrieves all jobs that are archived. (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 list of Job objects. -
0 Unexpected error -
+ */ + public okhttp3.Call retrieveAllJobsCall(Boolean isArchived, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/jobs"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (isArchived != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("isArchived", isArchived)); + } + + 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 retrieveAllJobsValidateBeforeCall(Boolean isArchived, final ApiCallback _callback) throws ApiException { + + + okhttp3.Call localVarCall = retrieveAllJobsCall(isArchived, _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' ``` + * @param isArchived Retrieves all jobs that are archived. (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 + + + + +
Status Code Description Response Headers
200 A list of Job objects. -
0 Unexpected error -
+ */ + public List retrieveAllJobs(Boolean isArchived) throws ApiException { + ApiResponse> localVarResp = retrieveAllJobsWithHttpInfo(isArchived); + 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' ``` + * @param isArchived Retrieves all jobs that are archived. (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 + + + + +
Status Code Description Response Headers
200 A list of Job objects. -
0 Unexpected error -
+ */ + public ApiResponse> retrieveAllJobsWithHttpInfo(Boolean isArchived) throws ApiException { + okhttp3.Call localVarCall = retrieveAllJobsValidateBeforeCall(isArchived, 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' ``` + * @param isArchived Retrieves all jobs that are archived. (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 Job objects. -
0 Unexpected error -
+ */ + public okhttp3.Call retrieveAllJobsAsync(Boolean isArchived, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = retrieveAllJobsValidateBeforeCall(isArchived, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for unarchiveJob + * @param jobId A job id. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 A job object. -
0 Unexpected error -
+ */ + public okhttp3.Call unarchiveJobCall(Integer jobId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/jobs/{jobId}/unarchive" + .replaceAll("\\{" + "jobId" + "\\}", localVarApiClient.escapeString(jobId.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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call unarchiveJobValidateBeforeCall(Integer jobId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException("Missing the required parameter 'jobId' when calling unarchiveJob(Async)"); + } + + + okhttp3.Call localVarCall = unarchiveJobCall(jobId, _callback); + return localVarCall; + + } + + /** + * 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' ``` + * @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 + * @http.response.details + + + + +
Status Code Description Response Headers
200 A job object. -
0 Unexpected error -
+ */ + public Job unarchiveJob(Integer jobId) throws ApiException { + ApiResponse localVarResp = unarchiveJobWithHttpInfo(jobId); + return localVarResp.getData(); + } + + /** + * 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' ``` + * @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 + * @http.response.details + + + + +
Status Code Description Response Headers
200 A job object. -
0 Unexpected error -
+ */ + public ApiResponse unarchiveJobWithHttpInfo(Integer jobId) throws ApiException { + okhttp3.Call localVarCall = unarchiveJobValidateBeforeCall(jobId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * 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' ``` + * @param jobId A job id. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + +
Status Code Description Response Headers
200 A job object. -
0 Unexpected error -
+ */ + public okhttp3.Call unarchiveJobAsync(Integer jobId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = unarchiveJobValidateBeforeCall(jobId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateJob + * @param jobId A job 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 A job object. -
0 Unexpected error -
+ */ + public okhttp3.Call updateJobCall(Integer jobId, JobUpdateParameters body, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/jobs/{jobId}" + .replaceAll("\\{" + "jobId" + "\\}", localVarApiClient.escapeString(jobId.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 updateJobValidateBeforeCall(Integer jobId, JobUpdateParameters body, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'jobId' is set + if (jobId == null) { + throw new ApiException("Missing the required parameter 'jobId' when calling updateJob(Async)"); + } + + + okhttp3.Call localVarCall = updateJobCall(jobId, body, _callback); + return localVarCall; + + } + + /** + * 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\" }' ``` + * @param jobId A job id. (required) + * @param body (optional) + * @return Job + * @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 job object. -
0 Unexpected error -
+ */ + public Job updateJob(Integer jobId, JobUpdateParameters body) throws ApiException { + ApiResponse localVarResp = updateJobWithHttpInfo(jobId, body); + return localVarResp.getData(); + } + + /** + * 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\" }' ``` + * @param jobId A job id. (required) + * @param body (optional) + * @return ApiResponse<Job> + * @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 job object. -
0 Unexpected error -
+ */ + public ApiResponse updateJobWithHttpInfo(Integer jobId, JobUpdateParameters body) throws ApiException { + okhttp3.Call localVarCall = updateJobValidateBeforeCall(jobId, body, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * 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\" }' ``` + * @param jobId A job 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 A job object. -
0 Unexpected error -
+ */ + public okhttp3.Call updateJobAsync(Integer jobId, JobUpdateParameters body, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateJobValidateBeforeCall(jobId, body, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/src/main/java/com/lilt/client/api/MemoriesApi.java b/src/main/java/com/lilt/client/api/MemoriesApi.java index 01d46e9c4..648ff1393 100644 --- a/src/main/java/com/lilt/client/api/MemoriesApi.java +++ b/src/main/java/com/lilt/client/api/MemoriesApi.java @@ -123,7 +123,7 @@ private okhttp3.Call createMemoryValidateBeforeCall(MemoryCreateParameters body, /** * Create a Memory - * 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). <a href=\"https://lilt.com/kb/memory/memories\" target=_blank>Refer to our KB</a> for a more detailed 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). <a href=\"https://support.lilt.com/hc/en-us/sections/360012579193-Lilt-Translate-Engine\" target=_blank>Refer to our KB</a> for a more detailed description. * @param body (required) * @return Memory * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -141,7 +141,7 @@ public Memory createMemory(MemoryCreateParameters body) throws ApiException { /** * Create a Memory - * 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). <a href=\"https://lilt.com/kb/memory/memories\" target=_blank>Refer to our KB</a> for a more detailed 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). <a href=\"https://support.lilt.com/hc/en-us/sections/360012579193-Lilt-Translate-Engine\" target=_blank>Refer to our KB</a> for a more detailed description. * @param body (required) * @return ApiResponse<Memory> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -160,7 +160,7 @@ public ApiResponse createMemoryWithHttpInfo(MemoryCreateParameters body) /** * Create a Memory (asynchronously) - * 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). <a href=\"https://lilt.com/kb/memory/memories\" target=_blank>Refer to our KB</a> for a more detailed 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). <a href=\"https://support.lilt.com/hc/en-us/sections/360012579193-Lilt-Translate-Engine\" target=_blank>Refer to our KB</a> for a more detailed description. * @param body (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -417,6 +417,7 @@ public okhttp3.Call getMemoryAsync(Integer id, final ApiCallback> _ * @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 @@ -427,7 +428,7 @@ public okhttp3.Call getMemoryAsync(Integer id, final ApiCallback> _ 0 Unexpected error - */ - public okhttp3.Call importMemoryFileCall(Integer memoryId, String name, File body, final ApiCallback _callback) throws ApiException { + 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 @@ -447,6 +448,10 @@ public okhttp3.Call importMemoryFileCall(Integer memoryId, String name, File bod localVarHeaderParams.put("name", localVarApiClient.parameterToString(name)); } + if (hasHeaderRow != null) { + localVarHeaderParams.put("has_header_row", localVarApiClient.parameterToString(hasHeaderRow)); + } + final String[] localVarAccepts = { "application/json" }; @@ -466,7 +471,7 @@ public okhttp3.Call importMemoryFileCall(Integer memoryId, String name, File bod } @SuppressWarnings("rawtypes") - private okhttp3.Call importMemoryFileValidateBeforeCall(Integer memoryId, String name, File body, final ApiCallback _callback) throws ApiException { + private okhttp3.Call importMemoryFileValidateBeforeCall(Integer memoryId, String name, File body, Boolean hasHeaderRow, final ApiCallback _callback) throws ApiException { // verify the required parameter 'memoryId' is set if (memoryId == null) { @@ -484,7 +489,7 @@ private okhttp3.Call importMemoryFileValidateBeforeCall(Integer memoryId, String } - okhttp3.Call localVarCall = importMemoryFileCall(memoryId, name, body, _callback); + okhttp3.Call localVarCall = importMemoryFileCall(memoryId, name, body, hasHeaderRow, _callback); return localVarCall; } @@ -495,6 +500,7 @@ private okhttp3.Call importMemoryFileValidateBeforeCall(Integer memoryId, String * @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 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -504,8 +510,8 @@ private okhttp3.Call importMemoryFileValidateBeforeCall(Integer memoryId, String 0 Unexpected error - */ - public MemoryImportResponse importMemoryFile(Integer memoryId, String name, File body) throws ApiException { - ApiResponse localVarResp = importMemoryFileWithHttpInfo(memoryId, name, body); + public MemoryImportResponse importMemoryFile(Integer memoryId, String name, File body, Boolean hasHeaderRow) throws ApiException { + ApiResponse localVarResp = importMemoryFileWithHttpInfo(memoryId, name, body, hasHeaderRow); return localVarResp.getData(); } @@ -515,6 +521,7 @@ public MemoryImportResponse importMemoryFile(Integer memoryId, String name, File * @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> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -524,8 +531,8 @@ public MemoryImportResponse importMemoryFile(Integer memoryId, String name, File 0 Unexpected error - */ - public ApiResponse importMemoryFileWithHttpInfo(Integer memoryId, String name, File body) throws ApiException { - okhttp3.Call localVarCall = importMemoryFileValidateBeforeCall(memoryId, name, body, null); + 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(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -536,6 +543,7 @@ public ApiResponse importMemoryFileWithHttpInfo(Integer me * @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 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 @@ -546,9 +554,9 @@ public ApiResponse importMemoryFileWithHttpInfo(Integer me 0 Unexpected error - */ - public okhttp3.Call importMemoryFileAsync(Integer memoryId, String name, File body, final ApiCallback _callback) throws ApiException { + public okhttp3.Call importMemoryFileAsync(Integer memoryId, String name, File body, Boolean hasHeaderRow, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = importMemoryFileValidateBeforeCall(memoryId, name, body, _callback); + okhttp3.Call localVarCall = importMemoryFileValidateBeforeCall(memoryId, name, body, hasHeaderRow, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/com/lilt/client/api/ProjectsApi.java b/src/main/java/com/lilt/client/api/ProjectsApi.java index 8ff33229e..686b63c81 100644 --- a/src/main/java/com/lilt/client/api/ProjectsApi.java +++ b/src/main/java/com/lilt/client/api/ProjectsApi.java @@ -408,6 +408,118 @@ public okhttp3.Call getProjectReportAsync(Integer id, final ApiCallback + 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) diff --git a/src/main/java/com/lilt/client/api/QaApi.java b/src/main/java/com/lilt/client/api/QaApi.java index bfc45835d..dd4b4366b 100644 --- a/src/main/java/com/lilt/client/api/QaApi.java +++ b/src/main/java/com/lilt/client/api/QaApi.java @@ -61,6 +61,7 @@ public void setApiClient(ApiClient apiClient) { * @param trglang An ISO 639-1 language code. (required) * @param source An optional source string. (optional) * @param srclang An ISO 639-1 language code. (optional) + * @param memoryId Any custom rules defined for this Memory will also be applied as part of the QA check. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -71,7 +72,7 @@ public void setApiClient(ApiClient apiClient) { 0 Unexpected error - */ - public okhttp3.Call qaCheckCall(String target, String trglang, String source, String srclang, final ApiCallback _callback) throws ApiException { + public okhttp3.Call qaCheckCall(String target, String trglang, String source, String srclang, Integer memoryId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -99,6 +100,10 @@ public okhttp3.Call qaCheckCall(String target, String trglang, String source, St localVarQueryParams.addAll(localVarApiClient.parameterToPair("srclang", srclang)); } + if (memoryId != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("memory_id", memoryId)); + } + final String[] localVarAccepts = { "application/json" }; @@ -118,7 +123,7 @@ public okhttp3.Call qaCheckCall(String target, String trglang, String source, St } @SuppressWarnings("rawtypes") - private okhttp3.Call qaCheckValidateBeforeCall(String target, String trglang, String source, String srclang, final ApiCallback _callback) throws ApiException { + private okhttp3.Call qaCheckValidateBeforeCall(String target, String trglang, String source, String srclang, Integer memoryId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'target' is set if (target == null) { @@ -131,7 +136,7 @@ private okhttp3.Call qaCheckValidateBeforeCall(String target, String trglang, St } - okhttp3.Call localVarCall = qaCheckCall(target, trglang, source, srclang, _callback); + okhttp3.Call localVarCall = qaCheckCall(target, trglang, source, srclang, memoryId, _callback); return localVarCall; } @@ -143,6 +148,7 @@ private okhttp3.Call qaCheckValidateBeforeCall(String target, String trglang, St * @param trglang An ISO 639-1 language code. (required) * @param source An optional source string. (optional) * @param srclang An ISO 639-1 language code. (optional) + * @param memoryId Any custom rules defined for this Memory will also be applied as part of the QA check. (optional) * @return QARuleMatches * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -152,8 +158,8 @@ private okhttp3.Call qaCheckValidateBeforeCall(String target, String trglang, St 0 Unexpected error - */ - public QARuleMatches qaCheck(String target, String trglang, String source, String srclang) throws ApiException { - ApiResponse localVarResp = qaCheckWithHttpInfo(target, trglang, source, srclang); + public QARuleMatches qaCheck(String target, String trglang, String source, String srclang, Integer memoryId) throws ApiException { + ApiResponse localVarResp = qaCheckWithHttpInfo(target, trglang, source, srclang, memoryId); return localVarResp.getData(); } @@ -164,6 +170,7 @@ public QARuleMatches qaCheck(String target, String trglang, String source, Strin * @param trglang An ISO 639-1 language code. (required) * @param source An optional source string. (optional) * @param srclang An ISO 639-1 language code. (optional) + * @param memoryId Any custom rules defined for this Memory will also be applied as part of the QA check. (optional) * @return ApiResponse<QARuleMatches> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -173,8 +180,8 @@ public QARuleMatches qaCheck(String target, String trglang, String source, Strin 0 Unexpected error - */ - public ApiResponse qaCheckWithHttpInfo(String target, String trglang, String source, String srclang) throws ApiException { - okhttp3.Call localVarCall = qaCheckValidateBeforeCall(target, trglang, source, srclang, null); + public ApiResponse qaCheckWithHttpInfo(String target, String trglang, String source, String srclang, Integer memoryId) throws ApiException { + okhttp3.Call localVarCall = qaCheckValidateBeforeCall(target, trglang, source, srclang, memoryId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -186,6 +193,7 @@ public ApiResponse qaCheckWithHttpInfo(String target, String trgl * @param trglang An ISO 639-1 language code. (required) * @param source An optional source string. (optional) * @param srclang An ISO 639-1 language code. (optional) + * @param memoryId Any custom rules defined for this Memory will also be applied as part of the QA check. (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 @@ -196,9 +204,9 @@ public ApiResponse qaCheckWithHttpInfo(String target, String trgl 0 Unexpected error - */ - public okhttp3.Call qaCheckAsync(String target, String trglang, String source, String srclang, final ApiCallback _callback) throws ApiException { + public okhttp3.Call qaCheckAsync(String target, String trglang, String source, String srclang, Integer memoryId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = qaCheckValidateBeforeCall(target, trglang, source, srclang, _callback); + okhttp3.Call localVarCall = qaCheckValidateBeforeCall(target, trglang, source, srclang, memoryId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/com/lilt/client/api/SegmentsApi.java b/src/main/java/com/lilt/client/api/SegmentsApi.java index a0a195850..7b3d4a0c6 100644 --- a/src/main/java/com/lilt/client/api/SegmentsApi.java +++ b/src/main/java/com/lilt/client/api/SegmentsApi.java @@ -27,10 +27,12 @@ import java.io.IOException; +import java.math.BigDecimal; import com.lilt.client.model.Error; import com.lilt.client.model.Segment; import com.lilt.client.model.SegmentCreateParameters; import com.lilt.client.model.SegmentDeleteResponse; +import com.lilt.client.model.SegmentDoneResponse; import com.lilt.client.model.SegmentUpdateParameters; import com.lilt.client.model.SegmentWithComments; import com.lilt.client.model.TaggedSegment; @@ -566,6 +568,117 @@ public okhttp3.Call tagSegmentAsync(String sourceTagged, String target, Integer localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for unlockSegments + * @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 segments -
+ */ + public okhttp3.Call unlockSegmentsCall(SegmentDoneResponse body, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/segments/review/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 unlockSegmentsValidateBeforeCall(SegmentDoneResponse 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 unlockSegments(Async)"); + } + + + okhttp3.Call localVarCall = unlockSegmentsCall(body, _callback); + return localVarCall; + + } + + /** + * Unaccept and unlock segments + * 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] }' ``` + * @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 segments -
+ */ + public List unlockSegments(SegmentDoneResponse body) throws ApiException { + ApiResponse> localVarResp = unlockSegmentsWithHttpInfo(body); + return localVarResp.getData(); + } + + /** + * Unaccept and unlock segments + * 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] }' ``` + * @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 segments -
+ */ + public ApiResponse> unlockSegmentsWithHttpInfo(SegmentDoneResponse body) throws ApiException { + okhttp3.Call localVarCall = unlockSegmentsValidateBeforeCall(body, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Unaccept and unlock segments (asynchronously) + * 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] }' ``` + * @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 segments -
+ */ + public okhttp3.Call unlockSegmentsAsync(SegmentDoneResponse body, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = unlockSegmentsValidateBeforeCall(body, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for updateSegment * @param body (required) diff --git a/src/main/java/com/lilt/client/api/SettingsApi.java b/src/main/java/com/lilt/client/api/SettingsApi.java new file mode 100644 index 000000000..778282166 --- /dev/null +++ b/src/main/java/com/lilt/client/api/SettingsApi.java @@ -0,0 +1,498 @@ +/* + * 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 version of the OpenAPI document: v2.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.Error; +import com.lilt.client.model.Setting; +import com.lilt.client.model.SettingUpsertBody; +import com.lilt.client.model.SettingUpsertResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class SettingsApi { + private ApiClient localVarApiClient; + + public SettingsApi() { + this(Configuration.getDefaultApiClient()); + } + + public SettingsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + /** + * Build call for getOrganizationSettings + * @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 Organization settings dictionary. -
0 Unexpected error -
+ */ + public okhttp3.Call getOrganizationSettingsCall(final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/settings/organization"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + 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 getOrganizationSettingsValidateBeforeCall(final ApiCallback _callback) throws ApiException { + + + okhttp3.Call localVarCall = getOrganizationSettingsCall(_callback); + return localVarCall; + + } + + /** + * Get organization-level settings + * Get the organization-level settings for the active users organization Example CURL: ``` curl --location --request GET 'https://lilt.com/2/settings/organization?key=<API_KEY>' \\ ``` + * @return Map<String, Setting> + * @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 Organization settings dictionary. -
0 Unexpected error -
+ */ + public Map getOrganizationSettings() throws ApiException { + ApiResponse> localVarResp = getOrganizationSettingsWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Get organization-level settings + * Get the organization-level settings for the active users organization Example CURL: ``` curl --location --request GET 'https://lilt.com/2/settings/organization?key=<API_KEY>' \\ ``` + * @return ApiResponse<Map<String, Setting>> + * @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 Organization settings dictionary. -
0 Unexpected error -
+ */ + public ApiResponse> getOrganizationSettingsWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getOrganizationSettingsValidateBeforeCall(null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get organization-level settings (asynchronously) + * Get the organization-level settings for the active users organization Example CURL: ``` curl --location --request GET 'https://lilt.com/2/settings/organization?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 Organization settings dictionary. -
0 Unexpected error -
+ */ + public okhttp3.Call getOrganizationSettingsAsync(final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getOrganizationSettingsValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getProjectSettings + * @param projectId A project 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 Project settings dictionary. -
0 Unexpected error -
+ */ + public okhttp3.Call getProjectSettingsCall(Integer projectId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/settings/project/{projectId}" + .replaceAll("\\{" + "projectId" + "\\}", localVarApiClient.escapeString(projectId.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 getProjectSettingsValidateBeforeCall(Integer projectId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException("Missing the required parameter 'projectId' when calling getProjectSettings(Async)"); + } + + + okhttp3.Call localVarCall = getProjectSettingsCall(projectId, _callback); + return localVarCall; + + } + + /** + * Get settings for a project + * 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=<API_KEY>' \\ ``` + * @param projectId A project id. (required) + * @return Map<String, Setting> + * @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 Project settings dictionary. -
0 Unexpected error -
+ */ + public Map getProjectSettings(Integer projectId) throws ApiException { + ApiResponse> localVarResp = getProjectSettingsWithHttpInfo(projectId); + return localVarResp.getData(); + } + + /** + * Get settings for a project + * 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=<API_KEY>' \\ ``` + * @param projectId A project id. (required) + * @return ApiResponse<Map<String, Setting>> + * @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 Project settings dictionary. -
0 Unexpected error -
+ */ + public ApiResponse> getProjectSettingsWithHttpInfo(Integer projectId) throws ApiException { + okhttp3.Call localVarCall = getProjectSettingsValidateBeforeCall(projectId, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get settings for a project (asynchronously) + * 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=<API_KEY>' \\ ``` + * @param projectId A project 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 Project settings dictionary. -
0 Unexpected error -
+ */ + public okhttp3.Call getProjectSettingsAsync(Integer projectId, final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getProjectSettingsValidateBeforeCall(projectId, _callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for getUserSettings + * @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 Settings dictionary. -
0 Unexpected error -
+ */ + public okhttp3.Call getUserSettingsCall(final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/settings/user"; + + 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 getUserSettingsValidateBeforeCall(final ApiCallback _callback) throws ApiException { + + + okhttp3.Call localVarCall = getUserSettingsCall(_callback); + return localVarCall; + + } + + /** + * Get settings for the authenticated user + * Get the active settings applied to the authenticated user. Example CURL: ``` curl --location --request GET 'https://lilt.com/2/settings/user?key=<API_KEY>' \\ ``` + * @return Map<String, Setting> + * @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 Settings dictionary. -
0 Unexpected error -
+ */ + public Map getUserSettings() throws ApiException { + ApiResponse> localVarResp = getUserSettingsWithHttpInfo(); + return localVarResp.getData(); + } + + /** + * Get settings for the authenticated user + * Get the active settings applied to the authenticated user. Example CURL: ``` curl --location --request GET 'https://lilt.com/2/settings/user?key=<API_KEY>' \\ ``` + * @return ApiResponse<Map<String, Setting>> + * @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 Settings dictionary. -
0 Unexpected error -
+ */ + public ApiResponse> getUserSettingsWithHttpInfo() throws ApiException { + okhttp3.Call localVarCall = getUserSettingsValidateBeforeCall(null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get settings for the authenticated user (asynchronously) + * Get the active settings applied to the authenticated user. Example CURL: ``` curl --location --request GET 'https://lilt.com/2/settings/user?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 Settings dictionary. -
0 Unexpected error -
+ */ + public okhttp3.Call getUserSettingsAsync(final ApiCallback> _callback) throws ApiException { + + okhttp3.Call localVarCall = getUserSettingsValidateBeforeCall(_callback); + Type localVarReturnType = new TypeToken>(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for upsertSetting + * @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 Updated settings object and updated active settings. -
0 Unexpected error -
+ */ + public okhttp3.Call upsertSettingCall(SettingUpsertBody body, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/settings"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + 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 upsertSettingValidateBeforeCall(SettingUpsertBody body, final ApiCallback _callback) throws ApiException { + + + okhttp3.Call localVarCall = upsertSettingCall(body, _callback); + return localVarCall; + + } + + /** + * Update or create a setting + * 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=<API_KEY>' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"settingName\": \"requireBatchQaTranslator\", \"value\": false, \"organizationId\": 285, \"scope\": \"Organization\" }' ``` + * @param body (optional) + * @return SettingUpsertResponse + * @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 Updated settings object and updated active settings. -
0 Unexpected error -
+ */ + public SettingUpsertResponse upsertSetting(SettingUpsertBody body) throws ApiException { + ApiResponse localVarResp = upsertSettingWithHttpInfo(body); + return localVarResp.getData(); + } + + /** + * Update or create a setting + * 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=<API_KEY>' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"settingName\": \"requireBatchQaTranslator\", \"value\": false, \"organizationId\": 285, \"scope\": \"Organization\" }' ``` + * @param body (optional) + * @return ApiResponse<SettingUpsertResponse> + * @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 Updated settings object and updated active settings. -
0 Unexpected error -
+ */ + public ApiResponse upsertSettingWithHttpInfo(SettingUpsertBody body) throws ApiException { + okhttp3.Call localVarCall = upsertSettingValidateBeforeCall(body, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update or create a setting (asynchronously) + * 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=<API_KEY>' \\ --header 'Content-Type: application/json' \\ --data-raw '{ \"settingName\": \"requireBatchQaTranslator\", \"value\": false, \"organizationId\": 285, \"scope\": \"Organization\" }' ``` + * @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 Updated settings object and updated active settings. -
0 Unexpected error -
+ */ + public okhttp3.Call upsertSettingAsync(SettingUpsertBody body, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = upsertSettingValidateBeforeCall(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 a63ace4e6..4a823f36b 100644 --- a/src/main/java/com/lilt/client/api/TranslateApi.java +++ b/src/main/java/com/lilt/client/api/TranslateApi.java @@ -30,6 +30,7 @@ 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; @@ -63,6 +64,7 @@ public void setApiClient(ApiClient apiClient) { * @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) + * @param withTM An optional boolean parameter to toggle the use of Translation Memory in the translation of the file. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -73,7 +75,7 @@ public void setApiClient(ApiClient apiClient) { 0 Unexpected error - */ - public okhttp3.Call batchTranslateFileCall(String fileId, String memoryId, BigDecimal configId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call batchTranslateFileCall(String fileId, String memoryId, BigDecimal configId, Boolean withTM, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -97,6 +99,10 @@ public okhttp3.Call batchTranslateFileCall(String fileId, String memoryId, BigDe localVarQueryParams.addAll(localVarApiClient.parameterToPair("configId", configId)); } + if (withTM != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("withTM", withTM)); + } + final String[] localVarAccepts = { "application/json" }; @@ -116,7 +122,7 @@ public okhttp3.Call batchTranslateFileCall(String fileId, String memoryId, BigDe } @SuppressWarnings("rawtypes") - private okhttp3.Call batchTranslateFileValidateBeforeCall(String fileId, String memoryId, BigDecimal configId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call batchTranslateFileValidateBeforeCall(String fileId, String memoryId, BigDecimal configId, Boolean withTM, final ApiCallback _callback) throws ApiException { // verify the required parameter 'fileId' is set if (fileId == null) { @@ -129,17 +135,18 @@ private okhttp3.Call batchTranslateFileValidateBeforeCall(String fileId, String } - okhttp3.Call localVarCall = batchTranslateFileCall(fileId, memoryId, configId, _callback); + okhttp3.Call localVarCall = batchTranslateFileCall(fileId, memoryId, configId, withTM, _callback); return localVarCall; } /** * 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' ``` + * 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' ``` * @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) + * @param withTM An optional boolean parameter to toggle the use of Translation Memory in the translation of the file. (optional) * @return TranslationInfo * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -149,17 +156,18 @@ private okhttp3.Call batchTranslateFileValidateBeforeCall(String fileId, String 0 Unexpected error - */ - public TranslationInfo batchTranslateFile(String fileId, String memoryId, BigDecimal configId) throws ApiException { - ApiResponse localVarResp = batchTranslateFileWithHttpInfo(fileId, memoryId, configId); + public TranslationInfo batchTranslateFile(String fileId, String memoryId, BigDecimal configId, Boolean withTM) throws ApiException { + ApiResponse localVarResp = batchTranslateFileWithHttpInfo(fileId, memoryId, configId, withTM); return localVarResp.getData(); } /** * 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' ``` + * 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' ``` * @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) + * @param withTM An optional boolean parameter to toggle the use of Translation Memory in the translation of the file. (optional) * @return ApiResponse<TranslationInfo> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -169,18 +177,19 @@ public TranslationInfo batchTranslateFile(String fileId, String memoryId, BigDec 0 Unexpected error - */ - public ApiResponse batchTranslateFileWithHttpInfo(String fileId, String memoryId, BigDecimal configId) throws ApiException { - okhttp3.Call localVarCall = batchTranslateFileValidateBeforeCall(fileId, memoryId, configId, null); + public ApiResponse batchTranslateFileWithHttpInfo(String fileId, String memoryId, BigDecimal configId, Boolean withTM) throws ApiException { + okhttp3.Call localVarCall = batchTranslateFileValidateBeforeCall(fileId, memoryId, configId, withTM, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * 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' ``` + * 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' ``` * @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) + * @param withTM An optional boolean parameter to toggle the use of Translation Memory in the translation of the file. (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 @@ -191,9 +200,9 @@ public ApiResponse batchTranslateFileWithHttpInfo(String fileId 0 Unexpected error - */ - public okhttp3.Call batchTranslateFileAsync(String fileId, String memoryId, BigDecimal configId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call batchTranslateFileAsync(String fileId, String memoryId, BigDecimal configId, Boolean withTM, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = batchTranslateFileValidateBeforeCall(fileId, memoryId, configId, _callback); + okhttp3.Call localVarCall = batchTranslateFileValidateBeforeCall(fileId, memoryId, configId, withTM, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -606,6 +615,7 @@ public okhttp3.Call registerSegmentAsync(String source, String srclang, String t * @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) + * @param body (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -616,8 +626,8 @@ 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, final ApiCallback _callback) throws ApiException { - Object localVarPostBody = null; + 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 { + Object localVarPostBody = body; // create path and map variables String localVarPath = "/translate"; @@ -669,7 +679,7 @@ public okhttp3.Call translateSegmentCall(Integer memoryId, String source, Intege } final String[] localVarContentTypes = { - + "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -679,7 +689,7 @@ public okhttp3.Call translateSegmentCall(Integer memoryId, String source, Intege } @SuppressWarnings("rawtypes") - private okhttp3.Call translateSegmentValidateBeforeCall(Integer memoryId, String source, Integer sourceHash, String prefix, Integer n, Boolean rich, Boolean tmMatches, Boolean projectTags, final ApiCallback _callback) throws ApiException { + 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) { @@ -687,14 +697,14 @@ private okhttp3.Call translateSegmentValidateBeforeCall(Integer memoryId, String } - okhttp3.Call localVarCall = translateSegmentCall(memoryId, source, sourceHash, prefix, n, rich, tmMatches, projectTags, _callback); + okhttp3.Call localVarCall = translateSegmentCall(memoryId, source, sourceHash, prefix, n, rich, tmMatches, projectTags, 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 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 `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) @@ -703,6 +713,7 @@ private okhttp3.Call translateSegmentValidateBeforeCall(Integer memoryId, String * @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) + * @param body (optional) * @return TranslationList * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -712,14 +723,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) throws ApiException { - ApiResponse localVarResp = translateSegmentWithHttpInfo(memoryId, source, sourceHash, prefix, n, rich, tmMatches, projectTags); + 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); 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 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 `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) @@ -728,6 +739,7 @@ public TranslationList translateSegment(Integer memoryId, String source, Integer * @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) + * @param body (optional) * @return ApiResponse<TranslationList> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -737,15 +749,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) throws ApiException { - okhttp3.Call localVarCall = translateSegmentValidateBeforeCall(memoryId, source, sourceHash, prefix, n, rich, tmMatches, projectTags, null); + 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); 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 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 `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) @@ -754,6 +766,7 @@ public ApiResponse translateSegmentWithHttpInfo(Integer memoryI * @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) + * @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 @@ -764,9 +777,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, final ApiCallback _callback) throws ApiException { + 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 { - okhttp3.Call localVarCall = translateSegmentValidateBeforeCall(memoryId, source, sourceHash, prefix, n, rich, tmMatches, projectTags, _callback); + okhttp3.Call localVarCall = translateSegmentValidateBeforeCall(memoryId, source, sourceHash, prefix, n, rich, tmMatches, projectTags, 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 b3caf8b60..2faa4839f 100644 --- a/src/main/java/com/lilt/client/auth/ApiKeyAuth.java +++ b/src/main/java/com/lilt/client/auth/ApiKeyAuth.java @@ -18,7 +18,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/com/lilt/client/auth/HttpBearerAuth.java b/src/main/java/com/lilt/client/auth/HttpBearerAuth.java index 08c28f454..80ab1ac64 100644 --- a/src/main/java/com/lilt/client/auth/HttpBearerAuth.java +++ b/src/main/java/com/lilt/client/auth/HttpBearerAuth.java @@ -18,7 +18,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[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 new file mode 100644 index 000000000..0785a1706 --- /dev/null +++ b/src/main/java/com/lilt/client/model/AddFileLabelRequest.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. + * + * The version of the OpenAPI document: v2.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; + +/** + * AddFileLabelRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +public class AddFileLabelRequest { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + + public AddFileLabelRequest name(String name) { + + this.name = name; + return this; + } + + /** + * The Label name. + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "label_name", value = "The Label name.") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddFileLabelRequest addFileLabelRequest = (AddFileLabelRequest) o; + return Objects.equals(this.name, addFileLabelRequest.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddFileLabelRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).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/Annotation.java b/src/main/java/com/lilt/client/model/Annotation.java index 92cd092b9..7e14a9b02 100644 --- a/src/main/java/com/lilt/client/model/Annotation.java +++ b/src/main/java/com/lilt/client/model/Annotation.java @@ -28,7 +28,7 @@ * A Comment's annotation. */ @ApiModel(description = "A Comment's annotation. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class Annotation { public static final String SERIALIZED_NAME_TEXT = "text"; @SerializedName(SERIALIZED_NAME_TEXT) diff --git a/src/main/java/com/lilt/client/model/ApiRoot.java b/src/main/java/com/lilt/client/model/ApiRoot.java index 3035afa72..2bd4c8b54 100644 --- a/src/main/java/com/lilt/client/model/ApiRoot.java +++ b/src/main/java/com/lilt/client/model/ApiRoot.java @@ -27,7 +27,7 @@ /** * ApiRoot */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class ApiRoot { public static final String SERIALIZED_NAME_API_NAME = "api_name"; @SerializedName(SERIALIZED_NAME_API_NAME) diff --git a/src/main/java/com/lilt/client/model/Comment.java b/src/main/java/com/lilt/client/model/Comment.java index ec7d5903c..90e6e3e71 100644 --- a/src/main/java/com/lilt/client/model/Comment.java +++ b/src/main/java/com/lilt/client/model/Comment.java @@ -31,7 +31,7 @@ * A Comment is a translator's or a reviewer's comment on a segment. */ @ApiModel(description = "A Comment is a translator's or a reviewer's comment on a segment. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class Comment { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -41,17 +41,29 @@ public class Comment { @SerializedName(SERIALIZED_NAME_TEXT) private String text; - public static final String SERIALIZED_NAME_USER_ID = "user_id"; - @SerializedName(SERIALIZED_NAME_USER_ID) - private Integer userId; + public static final String SERIALIZED_NAME_ANNOTATIONS = "annotations"; + @SerializedName(SERIALIZED_NAME_ANNOTATIONS) + private List annotations = null; public static final String SERIALIZED_NAME_IS_RESOLVED = "is_resolved"; @SerializedName(SERIALIZED_NAME_IS_RESOLVED) private Boolean isResolved; - public static final String SERIALIZED_NAME_ANNOTATIONS = "annotations"; - @SerializedName(SERIALIZED_NAME_ANNOTATIONS) - private List annotations = null; + public static final String SERIALIZED_NAME_DOCUMENT_ID = "document_id"; + @SerializedName(SERIALIZED_NAME_DOCUMENT_ID) + private Integer documentId; + + public static final String SERIALIZED_NAME_SEGMENT_ID = "segment_id"; + @SerializedName(SERIALIZED_NAME_SEGMENT_ID) + private Integer segmentId; + + public static final String SERIALIZED_NAME_SEGMENT_REVISION_ID = "segment_revision_id"; + @SerializedName(SERIALIZED_NAME_SEGMENT_REVISION_ID) + private Integer segmentRevisionId; + + public static final String SERIALIZED_NAME_USER_ID = "user_id"; + @SerializedName(SERIALIZED_NAME_USER_ID) + private Integer userId; public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) @@ -104,26 +116,34 @@ public void setText(String text) { } - public Comment userId(Integer userId) { + public Comment annotations(List annotations) { - this.userId = userId; + this.annotations = annotations; + return this; + } + + public Comment addAnnotationsItem(Annotation annotationsItem) { + if (this.annotations == null) { + this.annotations = new ArrayList(); + } + this.annotations.add(annotationsItem); return this; } /** - * The User who created this Comment. - * @return userId + * A list of optional Annotations. + * @return annotations **/ @javax.annotation.Nullable - @ApiModelProperty(example = "5678", value = "The User who created this Comment.") + @ApiModelProperty(value = "A list of optional Annotations.") - public Integer getUserId() { - return userId; + public List getAnnotations() { + return annotations; } - public void setUserId(Integer userId) { - this.userId = userId; + public void setAnnotations(List annotations) { + this.annotations = annotations; } @@ -150,34 +170,95 @@ public void setIsResolved(Boolean isResolved) { } - public Comment annotations(List annotations) { + public Comment documentId(Integer documentId) { - this.annotations = annotations; + this.documentId = documentId; return this; } - public Comment addAnnotationsItem(Annotation annotationsItem) { - if (this.annotations == null) { - this.annotations = new ArrayList(); - } - this.annotations.add(annotationsItem); + /** + * The document to which the comment belongs. + * @return documentId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "5678", value = "The document to which the comment belongs.") + + public Integer getDocumentId() { + return documentId; + } + + + public void setDocumentId(Integer documentId) { + this.documentId = documentId; + } + + + public Comment segmentId(Integer segmentId) { + + this.segmentId = segmentId; return this; } /** - * A list of optional Annotations. - * @return annotations + * The individual segment to which the comment applies. + * @return segmentId **/ @javax.annotation.Nullable - @ApiModelProperty(value = "A list of optional Annotations.") + @ApiModelProperty(example = "5678", value = "The individual segment to which the comment applies.") - public List getAnnotations() { - return annotations; + public Integer getSegmentId() { + return segmentId; } - public void setAnnotations(List annotations) { - this.annotations = annotations; + public void setSegmentId(Integer segmentId) { + this.segmentId = segmentId; + } + + + public Comment segmentRevisionId(Integer segmentRevisionId) { + + this.segmentRevisionId = segmentRevisionId; + return this; + } + + /** + * The revision of the individual segment to which the comment applies. + * @return segmentRevisionId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "5678", value = "The revision of the individual segment to which the comment applies.") + + public Integer getSegmentRevisionId() { + return segmentRevisionId; + } + + + public void setSegmentRevisionId(Integer segmentRevisionId) { + this.segmentRevisionId = segmentRevisionId; + } + + + public Comment userId(Integer userId) { + + this.userId = userId; + return this; + } + + /** + * The user who created this comment. + * @return userId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "5678", value = "The user who created this comment.") + + public Integer getUserId() { + return userId; + } + + + public void setUserId(Integer userId) { + this.userId = userId; } @@ -215,15 +296,18 @@ public boolean equals(Object o) { Comment comment = (Comment) o; return Objects.equals(this.id, comment.id) && Objects.equals(this.text, comment.text) && - Objects.equals(this.userId, comment.userId) && - Objects.equals(this.isResolved, comment.isResolved) && Objects.equals(this.annotations, comment.annotations) && + Objects.equals(this.isResolved, comment.isResolved) && + Objects.equals(this.documentId, comment.documentId) && + Objects.equals(this.segmentId, comment.segmentId) && + Objects.equals(this.segmentRevisionId, comment.segmentRevisionId) && + Objects.equals(this.userId, comment.userId) && Objects.equals(this.createdAt, comment.createdAt); } @Override public int hashCode() { - return Objects.hash(id, text, userId, isResolved, annotations, createdAt); + return Objects.hash(id, text, annotations, isResolved, documentId, segmentId, segmentRevisionId, userId, createdAt); } @Override @@ -232,9 +316,12 @@ public String toString() { sb.append("class Comment {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" text: ").append(toIndentedString(text)).append("\n"); - sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); - sb.append(" isResolved: ").append(toIndentedString(isResolved)).append("\n"); sb.append(" annotations: ").append(toIndentedString(annotations)).append("\n"); + sb.append(" isResolved: ").append(toIndentedString(isResolved)).append("\n"); + sb.append(" documentId: ").append(toIndentedString(documentId)).append("\n"); + sb.append(" segmentId: ").append(toIndentedString(segmentId)).append("\n"); + sb.append(" segmentRevisionId: ").append(toIndentedString(segmentRevisionId)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/lilt/client/model/CommentBody.java b/src/main/java/com/lilt/client/model/CommentBody.java new file mode 100644 index 000000000..b437ea35c --- /dev/null +++ b/src/main/java/com/lilt/client/model/CommentBody.java @@ -0,0 +1,168 @@ +/* + * 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 version of the OpenAPI document: v2.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 com.lilt.client.model.Annotation; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * The body of a comment being created or updated. + */ +@ApiModel(description = "The body of a comment being created or updated. ") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +public class CommentBody { + public static final String SERIALIZED_NAME_TEXT = "text"; + @SerializedName(SERIALIZED_NAME_TEXT) + private String text; + + public static final String SERIALIZED_NAME_ANNOTATIONS = "annotations"; + @SerializedName(SERIALIZED_NAME_ANNOTATIONS) + private List annotations = null; + + public static final String SERIALIZED_NAME_IS_RESOLVED = "isResolved"; + @SerializedName(SERIALIZED_NAME_IS_RESOLVED) + private String isResolved; + + + public CommentBody text(String text) { + + this.text = text; + return this; + } + + /** + * The main comment value. + * @return text + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "Please update this segment", value = "The main comment value.") + + public String getText() { + return text; + } + + + public void setText(String text) { + this.text = text; + } + + + public CommentBody annotations(List annotations) { + + this.annotations = annotations; + return this; + } + + public CommentBody addAnnotationsItem(Annotation annotationsItem) { + if (this.annotations == null) { + this.annotations = new ArrayList(); + } + this.annotations.add(annotationsItem); + return this; + } + + /** + * A list of optional Annotations. + * @return annotations + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "A list of optional Annotations.") + + public List getAnnotations() { + return annotations; + } + + + public void setAnnotations(List annotations) { + this.annotations = annotations; + } + + + public CommentBody isResolved(String isResolved) { + + this.isResolved = isResolved; + return this; + } + + /** + * Get isResolved + * @return isResolved + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "false", value = "") + + public String getIsResolved() { + return isResolved; + } + + + public void setIsResolved(String isResolved) { + this.isResolved = isResolved; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommentBody commentBody = (CommentBody) o; + return Objects.equals(this.text, commentBody.text) && + Objects.equals(this.annotations, commentBody.annotations) && + Objects.equals(this.isResolved, commentBody.isResolved); + } + + @Override + public int hashCode() { + return Objects.hash(text, annotations, isResolved); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommentBody {\n"); + sb.append(" text: ").append(toIndentedString(text)).append("\n"); + sb.append(" annotations: ").append(toIndentedString(annotations)).append("\n"); + sb.append(" isResolved: ").append(toIndentedString(isResolved)).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/CommentDeleteResponse.java b/src/main/java/com/lilt/client/model/CommentDeleteResponse.java new file mode 100644 index 000000000..0c1dd0e6b --- /dev/null +++ b/src/main/java/com/lilt/client/model/CommentDeleteResponse.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. + * + * The version of the OpenAPI document: v2.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; + +/** + * CommentDeleteResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +public class CommentDeleteResponse { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private Integer id; + + + public CommentDeleteResponse id(Integer id) { + + this.id = id; + return this; + } + + /** + * A unique Comment identifier. + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "12345", value = "A unique Comment identifier.") + + public Integer getId() { + return id; + } + + + public void setId(Integer id) { + this.id = id; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommentDeleteResponse commentDeleteResponse = (CommentDeleteResponse) o; + return Objects.equals(this.id, commentDeleteResponse.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommentDeleteResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).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/Connector.java b/src/main/java/com/lilt/client/model/Connector.java index 3c27581ec..6e6f9d123 100644 --- a/src/main/java/com/lilt/client/model/Connector.java +++ b/src/main/java/com/lilt/client/model/Connector.java @@ -27,7 +27,7 @@ /** * Connector */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class Connector { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/lilt/client/model/ConnectorArguments.java b/src/main/java/com/lilt/client/model/ConnectorArguments.java index 639104a96..9e5bfa4f5 100644 --- a/src/main/java/com/lilt/client/model/ConnectorArguments.java +++ b/src/main/java/com/lilt/client/model/ConnectorArguments.java @@ -27,7 +27,7 @@ /** * ConnectorArguments */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class ConnectorArguments { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/ConnectorDeleteResponse.java b/src/main/java/com/lilt/client/model/ConnectorDeleteResponse.java index e831b53cb..7c9a9f84a 100644 --- a/src/main/java/com/lilt/client/model/ConnectorDeleteResponse.java +++ b/src/main/java/com/lilt/client/model/ConnectorDeleteResponse.java @@ -27,7 +27,7 @@ /** * ConnectorDeleteResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class ConnectorDeleteResponse { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/ConnectorJob.java b/src/main/java/com/lilt/client/model/ConnectorJob.java index 9016e3eff..70da9b5ba 100644 --- a/src/main/java/com/lilt/client/model/ConnectorJob.java +++ b/src/main/java/com/lilt/client/model/ConnectorJob.java @@ -28,7 +28,7 @@ * A ConnectorJob tracks the status of an import or export action. */ @ApiModel(description = "A ConnectorJob tracks the status of an import or export action. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class ConnectorJob { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/ConverterConfigUpdateResponse.java b/src/main/java/com/lilt/client/model/ConverterConfigUpdateResponse.java new file mode 100644 index 000000000..3d4a0619d --- /dev/null +++ b/src/main/java/com/lilt/client/model/ConverterConfigUpdateResponse.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. + * + * The version of the OpenAPI document: v2.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; + +/** + * ConverterConfigUpdateResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +public class ConverterConfigUpdateResponse { + public static final String SERIALIZED_NAME_CONFIG_ID = "configId"; + @SerializedName(SERIALIZED_NAME_CONFIG_ID) + private Integer configId; + + + public ConverterConfigUpdateResponse configId(Integer configId) { + + this.configId = configId; + return this; + } + + /** + * Get configId + * @return configId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Integer getConfigId() { + return configId; + } + + + public void setConfigId(Integer configId) { + this.configId = configId; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConverterConfigUpdateResponse converterConfigUpdateResponse = (ConverterConfigUpdateResponse) o; + return Objects.equals(this.configId, converterConfigUpdateResponse.configId); + } + + @Override + public int hashCode() { + return Objects.hash(configId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConverterConfigUpdateResponse {\n"); + sb.append(" configId: ").append(toIndentedString(configId)).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/CreateConverterConfigParameters.java b/src/main/java/com/lilt/client/model/CreateConverterConfigParameters.java new file mode 100644 index 000000000..124a6ff0a --- /dev/null +++ b/src/main/java/com/lilt/client/model/CreateConverterConfigParameters.java @@ -0,0 +1,153 @@ +/* + * 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 version of the OpenAPI document: v2.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; + +/** + * CreateConverterConfigParameters + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[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_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) { + + this.configDescription = configDescription; + return this; + } + + /** + * A description for the configuration. + * @return configDescription + **/ + @ApiModelProperty(example = "config for custom markdown escaping", required = true, value = "A description for the configuration.") + + public String getConfigDescription() { + return configDescription; + } + + + public void setConfigDescription(String configDescription) { + this.configDescription = configDescription; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + 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); + } + + @Override + public int hashCode() { + return Objects.hash(configJson, configName, configDescription); + } + + @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("}"); + 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/DocumentAssignmentParameters.java b/src/main/java/com/lilt/client/model/DocumentAssignmentParameters.java index 751ea79e5..e58ac6df0 100644 --- a/src/main/java/com/lilt/client/model/DocumentAssignmentParameters.java +++ b/src/main/java/com/lilt/client/model/DocumentAssignmentParameters.java @@ -28,7 +28,7 @@ /** * DocumentAssignmentParameters */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class DocumentAssignmentParameters { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/DocumentAssignmentResponse.java b/src/main/java/com/lilt/client/model/DocumentAssignmentResponse.java index d239887b3..ea82ed443 100644 --- a/src/main/java/com/lilt/client/model/DocumentAssignmentResponse.java +++ b/src/main/java/com/lilt/client/model/DocumentAssignmentResponse.java @@ -27,7 +27,7 @@ /** * DocumentAssignmentResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class DocumentAssignmentResponse { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/DocumentComments.java b/src/main/java/com/lilt/client/model/DocumentComments.java new file mode 100644 index 000000000..bb76b2378 --- /dev/null +++ b/src/main/java/com/lilt/client/model/DocumentComments.java @@ -0,0 +1,110 @@ +/* + * 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 version of the OpenAPI document: v2.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 com.lilt.client.model.Comment; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * A set of comments for a given document, grouped with Segment ID as the key. + */ +@ApiModel(description = "A set of comments for a given document, grouped with Segment ID as the key. ") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +public class DocumentComments { + public static final String SERIALIZED_NAME_1234567 = "1234567"; + @SerializedName(SERIALIZED_NAME_1234567) + private List _1234567 = null; + + + public DocumentComments _1234567(List _1234567) { + + this._1234567 = _1234567; + return this; + } + + public DocumentComments add1234567Item(Comment _1234567Item) { + if (this._1234567 == null) { + this._1234567 = new ArrayList(); + } + this._1234567.add(_1234567Item); + return this; + } + + /** + * Get _1234567 + * @return _1234567 + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public List get1234567() { + return _1234567; + } + + + public void set1234567(List _1234567) { + this._1234567 = _1234567; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DocumentComments documentComments = (DocumentComments) o; + return Objects.equals(this._1234567, documentComments._1234567); + } + + @Override + public int hashCode() { + return Objects.hash(_1234567); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DocumentComments {\n"); + sb.append(" _1234567: ").append(toIndentedString(_1234567)).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/DocumentDeleteResponse.java b/src/main/java/com/lilt/client/model/DocumentDeleteResponse.java index 219bcc3f2..5064fb2dc 100644 --- a/src/main/java/com/lilt/client/model/DocumentDeleteResponse.java +++ b/src/main/java/com/lilt/client/model/DocumentDeleteResponse.java @@ -27,7 +27,7 @@ /** * DocumentDeleteResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class DocumentDeleteResponse { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/DocumentDoneUpdateParameters.java b/src/main/java/com/lilt/client/model/DocumentDoneUpdateParameters.java index 45c9ad398..9a57ac36e 100644 --- a/src/main/java/com/lilt/client/model/DocumentDoneUpdateParameters.java +++ b/src/main/java/com/lilt/client/model/DocumentDoneUpdateParameters.java @@ -23,36 +23,44 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; /** * DocumentDoneUpdateParameters */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class DocumentDoneUpdateParameters { - public static final String SERIALIZED_NAME_IS_DONE = "isDone"; - @SerializedName(SERIALIZED_NAME_IS_DONE) - private Boolean isDone; + public static final String SERIALIZED_NAME_DOCUMENT_IDS = "documentIds"; + @SerializedName(SERIALIZED_NAME_DOCUMENT_IDS) + private List documentIds = new ArrayList(); - public DocumentDoneUpdateParameters isDone(Boolean isDone) { + public DocumentDoneUpdateParameters documentIds(List documentIds) { - this.isDone = isDone; + this.documentIds = documentIds; + return this; + } + + public DocumentDoneUpdateParameters addDocumentIdsItem(BigDecimal documentIdsItem) { + this.documentIds.add(documentIdsItem); return this; } /** - * Get isDone - * @return isDone + * array of document ids + * @return documentIds **/ - @ApiModelProperty(example = "true", required = true, value = "") + @ApiModelProperty(example = "[10641, 10642]", required = true, value = "array of document ids") - public Boolean getIsDone() { - return isDone; + public List getDocumentIds() { + return documentIds; } - public void setIsDone(Boolean isDone) { - this.isDone = isDone; + public void setDocumentIds(List documentIds) { + this.documentIds = documentIds; } @@ -65,19 +73,19 @@ public boolean equals(Object o) { return false; } DocumentDoneUpdateParameters documentDoneUpdateParameters = (DocumentDoneUpdateParameters) o; - return Objects.equals(this.isDone, documentDoneUpdateParameters.isDone); + return Objects.equals(this.documentIds, documentDoneUpdateParameters.documentIds); } @Override public int hashCode() { - return Objects.hash(isDone); + return Objects.hash(documentIds); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DocumentDoneUpdateParameters {\n"); - sb.append(" isDone: ").append(toIndentedString(isDone)).append("\n"); + sb.append(" documentIds: ").append(toIndentedString(documentIds)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/lilt/client/model/DocumentDoneUpdateParameters1.java b/src/main/java/com/lilt/client/model/DocumentDoneUpdateParameters1.java index 2f2cfc584..76a1e7bb1 100644 --- a/src/main/java/com/lilt/client/model/DocumentDoneUpdateParameters1.java +++ b/src/main/java/com/lilt/client/model/DocumentDoneUpdateParameters1.java @@ -23,17 +23,51 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; /** * DocumentDoneUpdateParameters1 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class DocumentDoneUpdateParameters1 { + public static final String SERIALIZED_NAME_DOCUMENT_IDS = "documentIds"; + @SerializedName(SERIALIZED_NAME_DOCUMENT_IDS) + private List documentIds = new ArrayList(); + public static final String SERIALIZED_NAME_IS_DONE = "isDone"; @SerializedName(SERIALIZED_NAME_IS_DONE) private Boolean isDone; + public DocumentDoneUpdateParameters1 documentIds(List documentIds) { + + this.documentIds = documentIds; + return this; + } + + public DocumentDoneUpdateParameters1 addDocumentIdsItem(BigDecimal documentIdsItem) { + this.documentIds.add(documentIdsItem); + return this; + } + + /** + * array of document ids + * @return documentIds + **/ + @ApiModelProperty(example = "[10641, 10642]", required = true, value = "array of document ids") + + public List getDocumentIds() { + return documentIds; + } + + + public void setDocumentIds(List documentIds) { + this.documentIds = documentIds; + } + + public DocumentDoneUpdateParameters1 isDone(Boolean isDone) { this.isDone = isDone; @@ -65,18 +99,20 @@ public boolean equals(Object o) { return false; } DocumentDoneUpdateParameters1 documentDoneUpdateParameters1 = (DocumentDoneUpdateParameters1) o; - return Objects.equals(this.isDone, documentDoneUpdateParameters1.isDone); + return Objects.equals(this.documentIds, documentDoneUpdateParameters1.documentIds) && + Objects.equals(this.isDone, documentDoneUpdateParameters1.isDone); } @Override public int hashCode() { - return Objects.hash(isDone); + return Objects.hash(documentIds, isDone); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DocumentDoneUpdateParameters1 {\n"); + sb.append(" documentIds: ").append(toIndentedString(documentIds)).append("\n"); sb.append(" isDone: ").append(toIndentedString(isDone)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/com/lilt/client/model/DocumentDoneUpdateParameters2.java b/src/main/java/com/lilt/client/model/DocumentDoneUpdateParameters2.java new file mode 100644 index 000000000..c36e6224e --- /dev/null +++ b/src/main/java/com/lilt/client/model/DocumentDoneUpdateParameters2.java @@ -0,0 +1,133 @@ +/* + * 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 version of the OpenAPI document: v2.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.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +/** + * DocumentDoneUpdateParameters2 + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +public class DocumentDoneUpdateParameters2 { + public static final String SERIALIZED_NAME_DOCUMENT_IDS = "documentIds"; + @SerializedName(SERIALIZED_NAME_DOCUMENT_IDS) + private List documentIds = new ArrayList(); + + public static final String SERIALIZED_NAME_IS_DONE = "isDone"; + @SerializedName(SERIALIZED_NAME_IS_DONE) + private Boolean isDone; + + + public DocumentDoneUpdateParameters2 documentIds(List documentIds) { + + this.documentIds = documentIds; + return this; + } + + public DocumentDoneUpdateParameters2 addDocumentIdsItem(BigDecimal documentIdsItem) { + this.documentIds.add(documentIdsItem); + return this; + } + + /** + * array of document ids + * @return documentIds + **/ + @ApiModelProperty(example = "[10641, 10642]", required = true, value = "array of document ids") + + public List getDocumentIds() { + return documentIds; + } + + + public void setDocumentIds(List documentIds) { + this.documentIds = documentIds; + } + + + public DocumentDoneUpdateParameters2 isDone(Boolean isDone) { + + this.isDone = isDone; + return this; + } + + /** + * Get isDone + * @return isDone + **/ + @ApiModelProperty(example = "true", required = true, value = "") + + public Boolean getIsDone() { + return isDone; + } + + + public void setIsDone(Boolean isDone) { + this.isDone = isDone; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DocumentDoneUpdateParameters2 documentDoneUpdateParameters2 = (DocumentDoneUpdateParameters2) o; + return Objects.equals(this.documentIds, documentDoneUpdateParameters2.documentIds) && + Objects.equals(this.isDone, documentDoneUpdateParameters2.isDone); + } + + @Override + public int hashCode() { + return Objects.hash(documentIds, isDone); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DocumentDoneUpdateParameters2 {\n"); + sb.append(" documentIds: ").append(toIndentedString(documentIds)).append("\n"); + sb.append(" isDone: ").append(toIndentedString(isDone)).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/DocumentParameters.java b/src/main/java/com/lilt/client/model/DocumentParameters.java index 3f0494815..a9a24d431 100644 --- a/src/main/java/com/lilt/client/model/DocumentParameters.java +++ b/src/main/java/com/lilt/client/model/DocumentParameters.java @@ -27,7 +27,7 @@ /** * DocumentParameters */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class DocumentParameters { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) diff --git a/src/main/java/com/lilt/client/model/DocumentPretranslateParameters.java b/src/main/java/com/lilt/client/model/DocumentPretranslateParameters.java index 86ed9839d..c83ad465d 100644 --- a/src/main/java/com/lilt/client/model/DocumentPretranslateParameters.java +++ b/src/main/java/com/lilt/client/model/DocumentPretranslateParameters.java @@ -29,7 +29,7 @@ /** * DocumentPretranslateParameters */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class DocumentPretranslateParameters { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/DocumentPretranslateResponse.java b/src/main/java/com/lilt/client/model/DocumentPretranslateResponse.java index 1eff439dc..bae538e76 100644 --- a/src/main/java/com/lilt/client/model/DocumentPretranslateResponse.java +++ b/src/main/java/com/lilt/client/model/DocumentPretranslateResponse.java @@ -30,7 +30,7 @@ /** * DocumentPretranslateResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class DocumentPretranslateResponse { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/DocumentPretranslating.java b/src/main/java/com/lilt/client/model/DocumentPretranslating.java index f315ada0b..a481d2632 100644 --- a/src/main/java/com/lilt/client/model/DocumentPretranslating.java +++ b/src/main/java/com/lilt/client/model/DocumentPretranslating.java @@ -30,7 +30,7 @@ * Document object for which pretranslation was requested. */ @ApiModel(description = "Document object for which pretranslation was requested. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class DocumentPretranslating { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/DocumentPretranslatingStatus.java b/src/main/java/com/lilt/client/model/DocumentPretranslatingStatus.java index dd65831e7..1097bcee7 100644 --- a/src/main/java/com/lilt/client/model/DocumentPretranslatingStatus.java +++ b/src/main/java/com/lilt/client/model/DocumentPretranslatingStatus.java @@ -28,7 +28,7 @@ * A status object indicating the pretranslation status. */ @ApiModel(description = "A status object indicating the pretranslation status.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class DocumentPretranslatingStatus { public static final String SERIALIZED_NAME_PRETRANSLATION = "pretranslation"; @SerializedName(SERIALIZED_NAME_PRETRANSLATION) diff --git a/src/main/java/com/lilt/client/model/DocumentQuote.java b/src/main/java/com/lilt/client/model/DocumentQuote.java index c66b164a0..6fc0c8307 100644 --- a/src/main/java/com/lilt/client/model/DocumentQuote.java +++ b/src/main/java/com/lilt/client/model/DocumentQuote.java @@ -31,7 +31,7 @@ * Quoting information for a Document. */ @ApiModel(description = "Quoting information for a Document. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class DocumentQuote { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/DocumentUpdateParameters.java b/src/main/java/com/lilt/client/model/DocumentUpdateParameters.java index 261e56207..8d0e7a907 100644 --- a/src/main/java/com/lilt/client/model/DocumentUpdateParameters.java +++ b/src/main/java/com/lilt/client/model/DocumentUpdateParameters.java @@ -27,7 +27,7 @@ /** * DocumentUpdateParameters */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class DocumentUpdateParameters { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/DocumentWithSegments.java b/src/main/java/com/lilt/client/model/DocumentWithSegments.java index cceb4006a..d700a7f43 100644 --- a/src/main/java/com/lilt/client/model/DocumentWithSegments.java +++ b/src/main/java/com/lilt/client/model/DocumentWithSegments.java @@ -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-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class DocumentWithSegments { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/DocumentWithoutSegments.java b/src/main/java/com/lilt/client/model/DocumentWithoutSegments.java index 47db16814..995821ec6 100644 --- a/src/main/java/com/lilt/client/model/DocumentWithoutSegments.java +++ b/src/main/java/com/lilt/client/model/DocumentWithoutSegments.java @@ -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-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class DocumentWithoutSegments { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/DocumentWithoutSegmentsStatus.java b/src/main/java/com/lilt/client/model/DocumentWithoutSegmentsStatus.java index e931bff5d..d029c05c7 100644 --- a/src/main/java/com/lilt/client/model/DocumentWithoutSegmentsStatus.java +++ b/src/main/java/com/lilt/client/model/DocumentWithoutSegmentsStatus.java @@ -28,7 +28,7 @@ * 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-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class DocumentWithoutSegmentsStatus { /** * diff --git a/src/main/java/com/lilt/client/model/EditFilterMappingParameters.java b/src/main/java/com/lilt/client/model/EditFilterMappingParameters.java new file mode 100644 index 000000000..468d5a6df --- /dev/null +++ b/src/main/java/com/lilt/client/model/EditFilterMappingParameters.java @@ -0,0 +1,154 @@ +/* + * 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 version of the OpenAPI document: v2.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; + +/** + * EditFilterMappingParameters + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +public class EditFilterMappingParameters { + public static final String SERIALIZED_NAME_REGISTRY_ENTRY_JSON = "registryEntryJson"; + @SerializedName(SERIALIZED_NAME_REGISTRY_ENTRY_JSON) + private String registryEntryJson; + + 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 EditFilterMappingParameters registryEntryJson(String registryEntryJson) { + + this.registryEntryJson = registryEntryJson; + return this; + } + + /** + * The filter mapping json blob, string escaped. + * @return registryEntryJson + **/ + @javax.annotation.Nullable + @ApiModelProperty(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\": []}", value = "The filter mapping json blob, string escaped.") + + public String getRegistryEntryJson() { + return registryEntryJson; + } + + + public void setRegistryEntryJson(String registryEntryJson) { + this.registryEntryJson = registryEntryJson; + } + + + public EditFilterMappingParameters 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 EditFilterMappingParameters configDescription(String configDescription) { + + this.configDescription = configDescription; + return this; + } + + /** + * A description for the configuration. + * @return configDescription + **/ + @ApiModelProperty(example = "config for custom markdown escaping", required = true, value = "A description for the configuration.") + + public String getConfigDescription() { + return configDescription; + } + + + public void setConfigDescription(String configDescription) { + this.configDescription = configDescription; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EditFilterMappingParameters editFilterMappingParameters = (EditFilterMappingParameters) o; + return Objects.equals(this.registryEntryJson, editFilterMappingParameters.registryEntryJson) && + Objects.equals(this.configName, editFilterMappingParameters.configName) && + Objects.equals(this.configDescription, editFilterMappingParameters.configDescription); + } + + @Override + public int hashCode() { + return Objects.hash(registryEntryJson, configName, configDescription); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EditFilterMappingParameters {\n"); + sb.append(" registryEntryJson: ").append(toIndentedString(registryEntryJson)).append("\n"); + sb.append(" configName: ").append(toIndentedString(configName)).append("\n"); + sb.append(" configDescription: ").append(toIndentedString(configDescription)).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/Error.java b/src/main/java/com/lilt/client/model/Error.java index 51c0bd8df..0ad2230c4 100644 --- a/src/main/java/com/lilt/client/model/Error.java +++ b/src/main/java/com/lilt/client/model/Error.java @@ -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-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[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 0dcdb0e13..aa9b1e105 100644 --- a/src/main/java/com/lilt/client/model/FileDeleteResponse.java +++ b/src/main/java/com/lilt/client/model/FileDeleteResponse.java @@ -27,7 +27,7 @@ /** * FileDeleteResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[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 6b06a24d5..1f07ed2e4 100644 --- a/src/main/java/com/lilt/client/model/InlineResponse200.java +++ b/src/main/java/com/lilt/client/model/InlineResponse200.java @@ -23,97 +23,42 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import java.math.BigDecimal; /** * InlineResponse200 */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-09-09T11:54:15.439-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class InlineResponse200 { - public static final String SERIALIZED_NAME_FILE = "File"; - @SerializedName(SERIALIZED_NAME_FILE) - private java.io.File file; + public static final String SERIALIZED_NAME_CONFIG_ID = "configId"; + @SerializedName(SERIALIZED_NAME_CONFIG_ID) + private Integer configId; - public static final String SERIALIZED_NAME_DETECTED_LANG = "detected_lang"; - @SerializedName(SERIALIZED_NAME_DETECTED_LANG) - private String detectedLang; - public static final String SERIALIZED_NAME_DETECTED_LANG_CONFIDENCE = "detected_lang_confidence"; - @SerializedName(SERIALIZED_NAME_DETECTED_LANG_CONFIDENCE) - private BigDecimal detectedLangConfidence; - - - public InlineResponse200 file(java.io.File file) { + public InlineResponse200 configId(Integer configId) { - this.file = file; + this.configId = configId; return this; } /** - * Get file - * @return file + * Get configId + * @return configId **/ @javax.annotation.Nullable @ApiModelProperty(value = "") - public java.io.File getFile() { - return file; - } - - - public void setFile(java.io.File file) { - this.file = file; - } - - - public InlineResponse200 detectedLang(String detectedLang) { - - this.detectedLang = detectedLang; - return this; - } - - /** - * Language associated with the file. - * @return detectedLang - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "de", value = "Language associated with the file.") - - public String getDetectedLang() { - return detectedLang; + public Integer getConfigId() { + return configId; } - public void setDetectedLang(String detectedLang) { - this.detectedLang = detectedLang; - } - - - public InlineResponse200 detectedLangConfidence(BigDecimal detectedLangConfidence) { - - this.detectedLangConfidence = detectedLangConfidence; - return this; - } - - /** - * Confidence score for the language associated with the file. - * @return detectedLangConfidence - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "0.7", value = "Confidence score for the language associated with the file.") - - public BigDecimal getDetectedLangConfidence() { - return detectedLangConfidence; - } - - - public void setDetectedLangConfidence(BigDecimal detectedLangConfidence) { - this.detectedLangConfidence = detectedLangConfidence; + public void setConfigId(Integer configId) { + this.configId = configId; } @Override - public boolean equals(java.lang.Object o) { + public boolean equals(Object o) { if (this == o) { return true; } @@ -121,24 +66,19 @@ public boolean equals(java.lang.Object o) { return false; } InlineResponse200 inlineResponse200 = (InlineResponse200) o; - return Objects.equals(this.file, inlineResponse200.file) && - Objects.equals(this.detectedLang, inlineResponse200.detectedLang) && - Objects.equals(this.detectedLangConfidence, inlineResponse200.detectedLangConfidence); + return Objects.equals(this.configId, inlineResponse200.configId); } @Override public int hashCode() { - return Objects.hash(file, detectedLang, detectedLangConfidence); + return Objects.hash(configId); } - @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class InlineResponse200 {\n"); - sb.append(" file: ").append(toIndentedString(file)).append("\n"); - sb.append(" detectedLang: ").append(toIndentedString(detectedLang)).append("\n"); - sb.append(" detectedLangConfidence: ").append(toIndentedString(detectedLangConfidence)).append("\n"); + sb.append(" configId: ").append(toIndentedString(configId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -147,7 +87,7 @@ public String toString() { * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ - private String toIndentedString(java.lang.Object o) { + private String toIndentedString(Object o) { if (o == null) { return "null"; } diff --git a/src/main/java/com/lilt/client/model/Job.java b/src/main/java/com/lilt/client/model/Job.java new file mode 100644 index 000000000..58d632499 --- /dev/null +++ b/src/main/java/com/lilt/client/model/Job.java @@ -0,0 +1,304 @@ +/* + * 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 version of the OpenAPI document: v2.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 com.lilt.client.model.JobStats; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.OffsetDateTime; + +/** + * 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]") +public class Job { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_CREATION_STATUS = "creationStatus"; + @SerializedName(SERIALIZED_NAME_CREATION_STATUS) + private String creationStatus; + + public static final String SERIALIZED_NAME_DELIVERED_AT = "deliveredAt"; + @SerializedName(SERIALIZED_NAME_DELIVERED_AT) + private OffsetDateTime deliveredAt; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + private String status; + + public static final String SERIALIZED_NAME_DUE = "due"; + @SerializedName(SERIALIZED_NAME_DUE) + private OffsetDateTime due; + + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private Integer id; + + public static final String SERIALIZED_NAME_IS_PROCESSING = "isProcessing"; + @SerializedName(SERIALIZED_NAME_IS_PROCESSING) + private Integer isProcessing; + + public static final String SERIALIZED_NAME_STATS = "stats"; + @SerializedName(SERIALIZED_NAME_STATS) + private JobStats stats; + + + public Job name(String name) { + + this.name = name; + return this; + } + + /** + * A name for the job. + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "My New Job", value = "A name for the job.") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public Job creationStatus(String creationStatus) { + + this.creationStatus = creationStatus; + return this; + } + + /** + * Status of job creation process that includes PENDING, COMPLETE, and FAILED. + * @return creationStatus + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "COMPLETE", value = "Status of job creation process that includes PENDING, COMPLETE, and FAILED.") + + public String getCreationStatus() { + return creationStatus; + } + + + public void setCreationStatus(String creationStatus) { + this.creationStatus = creationStatus; + } + + + public Job deliveredAt(OffsetDateTime deliveredAt) { + + this.deliveredAt = deliveredAt; + return this; + } + + /** + * Get deliveredAt + * @return deliveredAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2021-06-03T13:43Z", value = "") + + public OffsetDateTime getDeliveredAt() { + return deliveredAt; + } + + + public void setDeliveredAt(OffsetDateTime deliveredAt) { + this.deliveredAt = deliveredAt; + } + + + public Job status(String status) { + + this.status = status; + return this; + } + + /** + * Current status of job that includes archived, delivered, and active. + * @return status + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "active", value = "Current status of job that includes archived, delivered, and active.") + + public String getStatus() { + return status; + } + + + public void setStatus(String status) { + this.status = status; + } + + + public Job due(OffsetDateTime due) { + + this.due = due; + return this; + } + + /** + * An ISO string date. + * @return due + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2021-06-03T13:43Z", value = "An ISO string date.") + + public OffsetDateTime getDue() { + return due; + } + + + public void setDue(OffsetDateTime due) { + this.due = due; + } + + + public Job id(Integer id) { + + this.id = id; + return this; + } + + /** + * An id for the job. + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "241", value = "An id for the job.") + + public Integer getId() { + return id; + } + + + public void setId(Integer id) { + this.id = id; + } + + + public Job isProcessing(Integer isProcessing) { + + this.isProcessing = isProcessing; + return this; + } + + /** + * Values include `1` while in progress, `0` when idle and `-2` when processing failed. + * @return isProcessing + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "0", value = "Values include `1` while in progress, `0` when idle and `-2` when processing failed.") + + public Integer getIsProcessing() { + return isProcessing; + } + + + public void setIsProcessing(Integer isProcessing) { + this.isProcessing = isProcessing; + } + + + public Job stats(JobStats stats) { + + this.stats = stats; + return this; + } + + /** + * Get stats + * @return stats + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public JobStats getStats() { + return stats; + } + + + public void setStats(JobStats stats) { + this.stats = stats; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Job job = (Job) o; + return Objects.equals(this.name, job.name) && + Objects.equals(this.creationStatus, job.creationStatus) && + Objects.equals(this.deliveredAt, job.deliveredAt) && + Objects.equals(this.status, job.status) && + Objects.equals(this.due, job.due) && + Objects.equals(this.id, job.id) && + Objects.equals(this.isProcessing, job.isProcessing) && + Objects.equals(this.stats, job.stats); + } + + @Override + public int hashCode() { + return Objects.hash(name, creationStatus, deliveredAt, status, due, id, isProcessing, stats); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Job {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" creationStatus: ").append(toIndentedString(creationStatus)).append("\n"); + sb.append(" deliveredAt: ").append(toIndentedString(deliveredAt)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" due: ").append(toIndentedString(due)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" isProcessing: ").append(toIndentedString(isProcessing)).append("\n"); + sb.append(" stats: ").append(toIndentedString(stats)).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/JobCreateParameters.java b/src/main/java/com/lilt/client/model/JobCreateParameters.java new file mode 100644 index 000000000..7ac2bf6d1 --- /dev/null +++ b/src/main/java/com/lilt/client/model/JobCreateParameters.java @@ -0,0 +1,195 @@ +/* + * 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 version of the OpenAPI document: v2.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 com.lilt.client.model.LanguagePair; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * JobCreateParameters + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[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(); + + public static final String SERIALIZED_NAME_FILE_IDS = "fileIds"; + @SerializedName(SERIALIZED_NAME_FILE_IDS) + private List fileIds = new ArrayList(); + + + public JobCreateParameters name(String name) { + + this.name = name; + return this; + } + + /** + * A name for the Job. + * @return name + **/ + @ApiModelProperty(example = "My new Job", required = true, value = "A name for the Job.") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = 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; + return this; + } + + public JobCreateParameters addLanguagePairsItem(LanguagePair languagePairsItem) { + this.languagePairs.add(languagePairsItem); + return this; + } + + /** + * Language pairs is a set of one or more pairs that includes source language, source locale(optional), target language, target locale(optional), and memoryId. + * @return languagePairs + **/ + @ApiModelProperty(required = true, value = "Language pairs is a set of one or more pairs that includes source language, source locale(optional), target language, target locale(optional), and memoryId.") + + public List getLanguagePairs() { + return languagePairs; + } + + + public void setLanguagePairs(List languagePairs) { + this.languagePairs = languagePairs; + } + + + public JobCreateParameters fileIds(List fileIds) { + + this.fileIds = fileIds; + return this; + } + + public JobCreateParameters addFileIdsItem(Integer fileIdsItem) { + this.fileIds.add(fileIdsItem); + return this; + } + + /** + * 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.") + + public List getFileIds() { + return fileIds; + } + + + public void setFileIds(List fileIds) { + this.fileIds = fileIds; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + 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); + } + + @Override + public int hashCode() { + return Objects.hash(name, due, languagePairs, fileIds); + } + + @Override + 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("}"); + 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/JobDeleteResponse.java b/src/main/java/com/lilt/client/model/JobDeleteResponse.java new file mode 100644 index 000000000..afc2cfe10 --- /dev/null +++ b/src/main/java/com/lilt/client/model/JobDeleteResponse.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. + * + * The version of the OpenAPI document: v2.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; + +/** + * JobDeleteResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +public class JobDeleteResponse { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private Integer id; + + + public JobDeleteResponse id(Integer id) { + + this.id = id; + return this; + } + + /** + * A unique Project identifier. + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "241", value = "A unique Project identifier.") + + public Integer getId() { + return id; + } + + + public void setId(Integer id) { + this.id = id; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JobDeleteResponse jobDeleteResponse = (JobDeleteResponse) o; + return Objects.equals(this.id, jobDeleteResponse.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JobDeleteResponse {\n"); + sb.append(" id: ").append(toIndentedString(id)).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/JobLeverageStats.java b/src/main/java/com/lilt/client/model/JobLeverageStats.java new file mode 100644 index 000000000..b28c64023 --- /dev/null +++ b/src/main/java/com/lilt/client/model/JobLeverageStats.java @@ -0,0 +1,226 @@ +/* + * 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 version of the OpenAPI document: v2.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 com.lilt.client.model.JobLeverageStatsProjects; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * 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]") +public class JobLeverageStats { + 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 static final String SERIALIZED_NAME_PROJECTS = "projects"; + @SerializedName(SERIALIZED_NAME_PROJECTS) + private List projects = null; + + + public JobLeverageStats sourceWords(Integer sourceWords) { + + this.sourceWords = sourceWords; + return this; + } + + /** + * Total number of source words. + * @return sourceWords + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "0", value = "Total number of source words.") + + public Integer getSourceWords() { + return sourceWords; + } + + + public void setSourceWords(Integer sourceWords) { + this.sourceWords = sourceWords; + } + + + public JobLeverageStats exactWords(Integer exactWords) { + + this.exactWords = exactWords; + return this; + } + + /** + * Total number of exact words. + * @return exactWords + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "0", value = "Total number of exact words.") + + public Integer getExactWords() { + return exactWords; + } + + + public void setExactWords(Integer exactWords) { + this.exactWords = exactWords; + } + + + public JobLeverageStats fuzzyWords(Integer fuzzyWords) { + + this.fuzzyWords = fuzzyWords; + return this; + } + + /** + * Total number of fuzzy words. + * @return fuzzyWords + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "0", value = "Total number of fuzzy words.") + + public Integer getFuzzyWords() { + return fuzzyWords; + } + + + public void setFuzzyWords(Integer fuzzyWords) { + this.fuzzyWords = fuzzyWords; + } + + + public JobLeverageStats newWords(Integer newWords) { + + this.newWords = newWords; + return this; + } + + /** + * Total number of new words. + * @return newWords + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "0", value = "Total number of new words.") + + public Integer getNewWords() { + return newWords; + } + + + public void setNewWords(Integer newWords) { + this.newWords = newWords; + } + + + public JobLeverageStats projects(List projects) { + + this.projects = projects; + return this; + } + + public JobLeverageStats addProjectsItem(JobLeverageStatsProjects projectsItem) { + if (this.projects == null) { + this.projects = new ArrayList(); + } + this.projects.add(projectsItem); + return this; + } + + /** + * Get projects + * @return projects + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public List getProjects() { + return projects; + } + + + public void setProjects(List projects) { + this.projects = projects; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JobLeverageStats jobLeverageStats = (JobLeverageStats) o; + return Objects.equals(this.sourceWords, jobLeverageStats.sourceWords) && + Objects.equals(this.exactWords, jobLeverageStats.exactWords) && + Objects.equals(this.fuzzyWords, jobLeverageStats.fuzzyWords) && + Objects.equals(this.newWords, jobLeverageStats.newWords) && + Objects.equals(this.projects, jobLeverageStats.projects); + } + + @Override + public int hashCode() { + return Objects.hash(sourceWords, exactWords, fuzzyWords, newWords, projects); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JobLeverageStats {\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(" projects: ").append(toIndentedString(projects)).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/JobLeverageStatsProjects.java b/src/main/java/com/lilt/client/model/JobLeverageStatsProjects.java new file mode 100644 index 000000000..ee3b63ca4 --- /dev/null +++ b/src/main/java/com/lilt/client/model/JobLeverageStatsProjects.java @@ -0,0 +1,214 @@ +/* + * 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 version of the OpenAPI document: v2.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; + +/** + * JobLeverageStatsProjects + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +public class JobLeverageStatsProjects { + 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 JobLeverageStatsProjects id(Integer id) { + + this.id = id; + return this; + } + + /** + * The Project ID. + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "0", value = "The Project ID.") + + public Integer getId() { + return id; + } + + + public void setId(Integer id) { + this.id = id; + } + + + public JobLeverageStatsProjects sourceWords(Integer sourceWords) { + + this.sourceWords = sourceWords; + return this; + } + + /** + * Total number of source words. + * @return sourceWords + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "0", value = "Total number of source words.") + + public Integer getSourceWords() { + return sourceWords; + } + + + public void setSourceWords(Integer sourceWords) { + this.sourceWords = sourceWords; + } + + + public JobLeverageStatsProjects exactWords(Integer exactWords) { + + this.exactWords = exactWords; + return this; + } + + /** + * Total number of exact words. + * @return exactWords + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "0", value = "Total number of exact words.") + + public Integer getExactWords() { + return exactWords; + } + + + public void setExactWords(Integer exactWords) { + this.exactWords = exactWords; + } + + + public JobLeverageStatsProjects fuzzyWords(Integer fuzzyWords) { + + this.fuzzyWords = fuzzyWords; + return this; + } + + /** + * Total number of fuzzy words. + * @return fuzzyWords + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "0", value = "Total number of fuzzy words.") + + public Integer getFuzzyWords() { + return fuzzyWords; + } + + + public void setFuzzyWords(Integer fuzzyWords) { + this.fuzzyWords = fuzzyWords; + } + + + public JobLeverageStatsProjects newWords(Integer newWords) { + + this.newWords = newWords; + return this; + } + + /** + * Total number of fuzzy words. + * @return newWords + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "0", value = "Total number of fuzzy words.") + + 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; + } + JobLeverageStatsProjects jobLeverageStatsProjects = (JobLeverageStatsProjects) o; + return Objects.equals(this.id, jobLeverageStatsProjects.id) && + Objects.equals(this.sourceWords, jobLeverageStatsProjects.sourceWords) && + Objects.equals(this.exactWords, jobLeverageStatsProjects.exactWords) && + Objects.equals(this.fuzzyWords, jobLeverageStatsProjects.fuzzyWords) && + Objects.equals(this.newWords, jobLeverageStatsProjects.newWords); + } + + @Override + public int hashCode() { + return Objects.hash(id, sourceWords, exactWords, fuzzyWords, newWords); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JobLeverageStatsProjects {\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/JobProject.java b/src/main/java/com/lilt/client/model/JobProject.java new file mode 100644 index 000000000..8a51f0caa --- /dev/null +++ b/src/main/java/com/lilt/client/model/JobProject.java @@ -0,0 +1,505 @@ +/* + * 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 version of the OpenAPI document: v2.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; + +/** + * A job project contains project statistcal 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]") +public class JobProject { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private Integer id; + + public static final String SERIALIZED_NAME_SRC_LANG = "srcLang"; + @SerializedName(SERIALIZED_NAME_SRC_LANG) + private String srcLang; + + public static final String SERIALIZED_NAME_SRC_LOCALE = "srcLocale"; + @SerializedName(SERIALIZED_NAME_SRC_LOCALE) + private String srcLocale; + + public static final String SERIALIZED_NAME_TRG_LANG = "trgLang"; + @SerializedName(SERIALIZED_NAME_TRG_LANG) + private String trgLang; + + public static final String SERIALIZED_NAME_TRG_LOCALE = "trgLocale"; + @SerializedName(SERIALIZED_NAME_TRG_LOCALE) + private String trgLocale; + + public static final String SERIALIZED_NAME_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_IS_COMPLETE = "isComplete"; + @SerializedName(SERIALIZED_NAME_IS_COMPLETE) + private Boolean isComplete; + + public static final String SERIALIZED_NAME_IS_ARCHIVED = "isArchived"; + @SerializedName(SERIALIZED_NAME_IS_ARCHIVED) + private Boolean isArchived; + + public static final String SERIALIZED_NAME_STATE = "state"; + @SerializedName(SERIALIZED_NAME_STATE) + private String state; + + public static final String SERIALIZED_NAME_NUM_SOURCE_TOKENS = "numSourceTokens"; + @SerializedName(SERIALIZED_NAME_NUM_SOURCE_TOKENS) + private Integer numSourceTokens; + + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + @SerializedName(SERIALIZED_NAME_CREATED_AT) + private String createdAt; + + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + private String updatedAt; + + public static final String SERIALIZED_NAME_IS_DELETED = "isDeleted"; + @SerializedName(SERIALIZED_NAME_IS_DELETED) + private Boolean isDeleted; + + public static final String SERIALIZED_NAME_MEMORY_ID = "memoryId"; + @SerializedName(SERIALIZED_NAME_MEMORY_ID) + private Integer memoryId; + + + public JobProject id(Integer id) { + + this.id = id; + return this; + } + + /** + * An id for the project. + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "An id for the project.") + + public Integer getId() { + return id; + } + + + public void setId(Integer id) { + this.id = id; + } + + + public JobProject srcLang(String srcLang) { + + this.srcLang = srcLang; + return this; + } + + /** + * Source langauge, an ISO 639-1 language identifier. + * @return srcLang + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "en", value = "Source langauge, an ISO 639-1 language identifier.") + + public String getSrcLang() { + return srcLang; + } + + + public void setSrcLang(String srcLang) { + this.srcLang = srcLang; + } + + + public JobProject srcLocale(String srcLocale) { + + this.srcLocale = srcLocale; + return this; + } + + /** + * A locale identifier, supported for source langauge. + * @return srcLocale + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "US", value = "A locale identifier, supported for source langauge.") + + public String getSrcLocale() { + return srcLocale; + } + + + public void setSrcLocale(String srcLocale) { + this.srcLocale = srcLocale; + } + + + public JobProject trgLang(String trgLang) { + + this.trgLang = trgLang; + return this; + } + + /** + * Target langauge, an ISO 639-1 language identifier. + * @return trgLang + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "fr", value = "Target langauge, an ISO 639-1 language identifier.") + + public String getTrgLang() { + return trgLang; + } + + + public void setTrgLang(String trgLang) { + this.trgLang = trgLang; + } + + + public JobProject trgLocale(String trgLocale) { + + this.trgLocale = trgLocale; + return this; + } + + /** + * A locale identifier, supported for target langauge. + * @return trgLocale + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "CA", value = "A locale identifier, supported for target langauge.") + + public String getTrgLocale() { + return trgLocale; + } + + + public void setTrgLocale(String trgLocale) { + this.trgLocale = trgLocale; + } + + + public JobProject name(String name) { + + this.name = name; + return this; + } + + /** + * A name for the project. + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "My new project", value = "A name for the project.") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public JobProject due(String due) { + + this.due = due; + return this; + } + + /** + * An ISO date. + * @return due + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2021-10-03T13:43:00.000Z", value = "An ISO date.") + + public String getDue() { + return due; + } + + + public void setDue(String due) { + this.due = due; + } + + + public JobProject isComplete(Boolean isComplete) { + + this.isComplete = isComplete; + return this; + } + + /** + * A state that checks project was completed. + * @return isComplete + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "false", value = "A state that checks project was completed.") + + public Boolean getIsComplete() { + return isComplete; + } + + + public void setIsComplete(Boolean isComplete) { + this.isComplete = isComplete; + } + + + public JobProject isArchived(Boolean isArchived) { + + this.isArchived = isArchived; + return this; + } + + /** + * The archived state of the project. + * @return isArchived + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "false", value = "The archived state of the project.") + + public Boolean getIsArchived() { + return isArchived; + } + + + public void setIsArchived(Boolean isArchived) { + this.isArchived = isArchived; + } + + + public JobProject state(String state) { + + this.state = state; + return this; + } + + /** + * Current state of the project. Example, backlog, inProgress, inReview, done. + * @return state + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "inProgress", value = "Current state of the project. Example, backlog, inProgress, inReview, done.") + + public String getState() { + return state; + } + + + public void setState(String state) { + this.state = state; + } + + + public JobProject numSourceTokens(Integer numSourceTokens) { + + this.numSourceTokens = numSourceTokens; + return this; + } + + /** + * Total number of source tokens. + * @return numSourceTokens + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2134", value = "Total number of source tokens.") + + public Integer getNumSourceTokens() { + return numSourceTokens; + } + + + public void setNumSourceTokens(Integer numSourceTokens) { + this.numSourceTokens = numSourceTokens; + } + + + public JobProject createdAt(String createdAt) { + + this.createdAt = createdAt; + return this; + } + + /** + * Time at which the object was created. + * @return createdAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2021-04-01T13:43:00.000Z", value = "Time at which the object was created.") + + public String getCreatedAt() { + return createdAt; + } + + + public void setCreatedAt(String createdAt) { + this.createdAt = createdAt; + } + + + public JobProject updatedAt(String updatedAt) { + + this.updatedAt = updatedAt; + return this; + } + + /** + * Time at which the object was updated. + * @return updatedAt + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2021-06-03T13:43:00.000Z", value = "Time at which the object was updated.") + + public String getUpdatedAt() { + return updatedAt; + } + + + public void setUpdatedAt(String updatedAt) { + this.updatedAt = updatedAt; + } + + + public JobProject isDeleted(Boolean isDeleted) { + + this.isDeleted = isDeleted; + return this; + } + + /** + * A state that checks project was deleted. + * @return isDeleted + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "false", value = "A state that checks project was deleted.") + + public Boolean getIsDeleted() { + return isDeleted; + } + + + public void setIsDeleted(Boolean isDeleted) { + this.isDeleted = isDeleted; + } + + + public JobProject memoryId(Integer memoryId) { + + this.memoryId = memoryId; + return this; + } + + /** + * A unique number identifying the associated Memory. + * @return memoryId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2134", value = "A unique number identifying the associated Memory.") + + public Integer getMemoryId() { + return memoryId; + } + + + public void setMemoryId(Integer memoryId) { + this.memoryId = memoryId; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JobProject jobProject = (JobProject) o; + return Objects.equals(this.id, jobProject.id) && + Objects.equals(this.srcLang, jobProject.srcLang) && + Objects.equals(this.srcLocale, jobProject.srcLocale) && + Objects.equals(this.trgLang, jobProject.trgLang) && + Objects.equals(this.trgLocale, jobProject.trgLocale) && + Objects.equals(this.name, jobProject.name) && + Objects.equals(this.due, jobProject.due) && + Objects.equals(this.isComplete, jobProject.isComplete) && + Objects.equals(this.isArchived, jobProject.isArchived) && + Objects.equals(this.state, jobProject.state) && + Objects.equals(this.numSourceTokens, jobProject.numSourceTokens) && + Objects.equals(this.createdAt, jobProject.createdAt) && + Objects.equals(this.updatedAt, jobProject.updatedAt) && + Objects.equals(this.isDeleted, jobProject.isDeleted) && + Objects.equals(this.memoryId, jobProject.memoryId); + } + + @Override + public int hashCode() { + return Objects.hash(id, srcLang, srcLocale, trgLang, trgLocale, name, due, isComplete, isArchived, state, numSourceTokens, createdAt, updatedAt, isDeleted, memoryId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JobProject {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" srcLang: ").append(toIndentedString(srcLang)).append("\n"); + sb.append(" srcLocale: ").append(toIndentedString(srcLocale)).append("\n"); + sb.append(" trgLang: ").append(toIndentedString(trgLang)).append("\n"); + sb.append(" trgLocale: ").append(toIndentedString(trgLocale)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" due: ").append(toIndentedString(due)).append("\n"); + sb.append(" isComplete: ").append(toIndentedString(isComplete)).append("\n"); + sb.append(" isArchived: ").append(toIndentedString(isArchived)).append("\n"); + sb.append(" state: ").append(toIndentedString(state)).append("\n"); + sb.append(" numSourceTokens: ").append(toIndentedString(numSourceTokens)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + 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("}"); + 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/JobStats.java b/src/main/java/com/lilt/client/model/JobStats.java new file mode 100644 index 000000000..36c97853d --- /dev/null +++ b/src/main/java/com/lilt/client/model/JobStats.java @@ -0,0 +1,429 @@ +/* + * 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 version of the OpenAPI document: v2.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 com.lilt.client.model.JobProject; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * 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]") +public class JobStats { + 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 static final String SERIALIZED_NAME_NUM_DELIVERED_PROJECTS = "numDeliveredProjects"; + @SerializedName(SERIALIZED_NAME_NUM_DELIVERED_PROJECTS) + private Integer numDeliveredProjects; + + public static final String SERIALIZED_NAME_NUM_LANGUAGE_PAIRS = "numLanguagePairs"; + @SerializedName(SERIALIZED_NAME_NUM_LANGUAGE_PAIRS) + private Integer numLanguagePairs; + + public static final String SERIALIZED_NAME_NUM_PROJECTS = "numProjects"; + @SerializedName(SERIALIZED_NAME_NUM_PROJECTS) + private Integer numProjects; + + public static final String SERIALIZED_NAME_PERCENT_REVIEWED = "percentReviewed"; + @SerializedName(SERIALIZED_NAME_PERCENT_REVIEWED) + private Integer percentReviewed; + + public static final String SERIALIZED_NAME_PERCENT_TRANSLATED = "percentTranslated"; + @SerializedName(SERIALIZED_NAME_PERCENT_TRANSLATED) + private Integer percentTranslated; + + public static final String SERIALIZED_NAME_PROJECTS = "projects"; + @SerializedName(SERIALIZED_NAME_PROJECTS) + private List projects = null; + + public static final String SERIALIZED_NAME_SOURCE_WORDS = "sourceWords"; + @SerializedName(SERIALIZED_NAME_SOURCE_WORDS) + private Integer sourceWords; + + public static final String SERIALIZED_NAME_UNIQUE_LANGUAGE_PAIRS = "uniqueLanguagePairs"; + @SerializedName(SERIALIZED_NAME_UNIQUE_LANGUAGE_PAIRS) + private Integer uniqueLanguagePairs; + + public static final String SERIALIZED_NAME_UNIQUE_LINGUISTS = "uniqueLinguists"; + @SerializedName(SERIALIZED_NAME_UNIQUE_LINGUISTS) + private Integer uniqueLinguists; + + + public JobStats exactWords(Integer exactWords) { + + this.exactWords = exactWords; + return this; + } + + /** + * Total number of exact words. + * @return exactWords + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "0", value = "Total number of exact words.") + + public Integer getExactWords() { + return exactWords; + } + + + public void setExactWords(Integer exactWords) { + this.exactWords = exactWords; + } + + + public JobStats fuzzyWords(Integer fuzzyWords) { + + this.fuzzyWords = fuzzyWords; + return this; + } + + /** + * Total number of fuzzy words. + * @return fuzzyWords + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "0", value = "Total number of fuzzy words.") + + public Integer getFuzzyWords() { + return fuzzyWords; + } + + + public void setFuzzyWords(Integer fuzzyWords) { + this.fuzzyWords = fuzzyWords; + } + + + public JobStats newWords(Integer newWords) { + + this.newWords = newWords; + return this; + } + + /** + * Total number of fuzzy words. + * @return newWords + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "0", value = "Total number of fuzzy words.") + + public Integer getNewWords() { + return newWords; + } + + + public void setNewWords(Integer newWords) { + this.newWords = newWords; + } + + + public JobStats numDeliveredProjects(Integer numDeliveredProjects) { + + this.numDeliveredProjects = numDeliveredProjects; + return this; + } + + /** + * Total number of delivered projects. + * @return numDeliveredProjects + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "0", value = "Total number of delivered projects.") + + public Integer getNumDeliveredProjects() { + return numDeliveredProjects; + } + + + public void setNumDeliveredProjects(Integer numDeliveredProjects) { + this.numDeliveredProjects = numDeliveredProjects; + } + + + public JobStats numLanguagePairs(Integer numLanguagePairs) { + + this.numLanguagePairs = numLanguagePairs; + return this; + } + + /** + * Total number of delivered projects. + * @return numLanguagePairs + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "0", value = "Total number of delivered projects.") + + public Integer getNumLanguagePairs() { + return numLanguagePairs; + } + + + public void setNumLanguagePairs(Integer numLanguagePairs) { + this.numLanguagePairs = numLanguagePairs; + } + + + public JobStats numProjects(Integer numProjects) { + + this.numProjects = numProjects; + return this; + } + + /** + * Total number of projects. + * @return numProjects + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "0", value = "Total number of projects.") + + public Integer getNumProjects() { + return numProjects; + } + + + public void setNumProjects(Integer numProjects) { + this.numProjects = numProjects; + } + + + public JobStats percentReviewed(Integer percentReviewed) { + + this.percentReviewed = percentReviewed; + return this; + } + + /** + * Overall percentage of documents reviewed. + * @return percentReviewed + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "0", value = "Overall percentage of documents reviewed.") + + public Integer getPercentReviewed() { + return percentReviewed; + } + + + public void setPercentReviewed(Integer percentReviewed) { + this.percentReviewed = percentReviewed; + } + + + public JobStats percentTranslated(Integer percentTranslated) { + + this.percentTranslated = percentTranslated; + return this; + } + + /** + * Get percentTranslated + * @return percentTranslated + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "0", value = "") + + public Integer getPercentTranslated() { + return percentTranslated; + } + + + public void setPercentTranslated(Integer percentTranslated) { + this.percentTranslated = percentTranslated; + } + + + public JobStats projects(List projects) { + + this.projects = projects; + return this; + } + + public JobStats addProjectsItem(JobProject projectsItem) { + if (this.projects == null) { + this.projects = new ArrayList(); + } + this.projects.add(projectsItem); + return this; + } + + /** + * Get projects + * @return projects + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public List getProjects() { + return projects; + } + + + public void setProjects(List projects) { + this.projects = projects; + } + + + public JobStats sourceWords(Integer sourceWords) { + + this.sourceWords = sourceWords; + return this; + } + + /** + * Total number of source words. + * @return sourceWords + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "0", value = "Total number of source words.") + + public Integer getSourceWords() { + return sourceWords; + } + + + public void setSourceWords(Integer sourceWords) { + this.sourceWords = sourceWords; + } + + + public JobStats uniqueLanguagePairs(Integer uniqueLanguagePairs) { + + this.uniqueLanguagePairs = uniqueLanguagePairs; + return this; + } + + /** + * Number of unique language pairs. + * @return uniqueLanguagePairs + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1", value = "Number of unique language pairs.") + + public Integer getUniqueLanguagePairs() { + return uniqueLanguagePairs; + } + + + public void setUniqueLanguagePairs(Integer uniqueLanguagePairs) { + this.uniqueLanguagePairs = uniqueLanguagePairs; + } + + + public JobStats uniqueLinguists(Integer uniqueLinguists) { + + this.uniqueLinguists = uniqueLinguists; + return this; + } + + /** + * Number of unique linguists. + * @return uniqueLinguists + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1", value = "Number of unique linguists.") + + public Integer getUniqueLinguists() { + return uniqueLinguists; + } + + + public void setUniqueLinguists(Integer uniqueLinguists) { + this.uniqueLinguists = uniqueLinguists; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JobStats jobStats = (JobStats) o; + return Objects.equals(this.exactWords, jobStats.exactWords) && + Objects.equals(this.fuzzyWords, jobStats.fuzzyWords) && + Objects.equals(this.newWords, jobStats.newWords) && + Objects.equals(this.numDeliveredProjects, jobStats.numDeliveredProjects) && + Objects.equals(this.numLanguagePairs, jobStats.numLanguagePairs) && + Objects.equals(this.numProjects, jobStats.numProjects) && + Objects.equals(this.percentReviewed, jobStats.percentReviewed) && + Objects.equals(this.percentTranslated, jobStats.percentTranslated) && + Objects.equals(this.projects, jobStats.projects) && + Objects.equals(this.sourceWords, jobStats.sourceWords) && + Objects.equals(this.uniqueLanguagePairs, jobStats.uniqueLanguagePairs) && + Objects.equals(this.uniqueLinguists, jobStats.uniqueLinguists); + } + + @Override + public int hashCode() { + return Objects.hash(exactWords, fuzzyWords, newWords, numDeliveredProjects, numLanguagePairs, numProjects, percentReviewed, percentTranslated, projects, sourceWords, uniqueLanguagePairs, uniqueLinguists); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JobStats {\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(" numDeliveredProjects: ").append(toIndentedString(numDeliveredProjects)).append("\n"); + sb.append(" numLanguagePairs: ").append(toIndentedString(numLanguagePairs)).append("\n"); + sb.append(" numProjects: ").append(toIndentedString(numProjects)).append("\n"); + sb.append(" percentReviewed: ").append(toIndentedString(percentReviewed)).append("\n"); + sb.append(" percentTranslated: ").append(toIndentedString(percentTranslated)).append("\n"); + sb.append(" projects: ").append(toIndentedString(projects)).append("\n"); + 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("}"); + 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/JobUpdateParameters.java b/src/main/java/com/lilt/client/model/JobUpdateParameters.java new file mode 100644 index 000000000..68d661167 --- /dev/null +++ b/src/main/java/com/lilt/client/model/JobUpdateParameters.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. + * + * The version of the OpenAPI document: v2.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; + +/** + * JobUpdateParameters + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +public class JobUpdateParameters { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DUE_DATE = "dueDate"; + @SerializedName(SERIALIZED_NAME_DUE_DATE) + private Integer dueDate; + + + public JobUpdateParameters name(String name) { + + this.name = name; + return this; + } + + /** + * A name for the Job. + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "My new Job", value = "A name for the Job.") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public JobUpdateParameters dueDate(Integer dueDate) { + + this.dueDate = dueDate; + return this; + } + + /** + * An ISO string date. + * @return dueDate + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "An ISO string date.") + + public Integer getDueDate() { + return dueDate; + } + + + public void setDueDate(Integer dueDate) { + this.dueDate = dueDate; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + JobUpdateParameters jobUpdateParameters = (JobUpdateParameters) o; + return Objects.equals(this.name, jobUpdateParameters.name) && + Objects.equals(this.dueDate, jobUpdateParameters.dueDate); + } + + @Override + public int hashCode() { + return Objects.hash(name, dueDate); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class JobUpdateParameters {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" dueDate: ").append(toIndentedString(dueDate)).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/LanguagePair.java b/src/main/java/com/lilt/client/model/LanguagePair.java new file mode 100644 index 000000000..7164c0d4e --- /dev/null +++ b/src/main/java/com/lilt/client/model/LanguagePair.java @@ -0,0 +1,387 @@ +/* + * 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 version of the OpenAPI document: v2.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; + +/** + * 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]") +public class LanguagePair { + public static final String SERIALIZED_NAME_SRC_LANG = "srcLang"; + @SerializedName(SERIALIZED_NAME_SRC_LANG) + private String srcLang; + + public static final String SERIALIZED_NAME_SRC_LOCALE = "srcLocale"; + @SerializedName(SERIALIZED_NAME_SRC_LOCALE) + private String srcLocale; + + public static final String SERIALIZED_NAME_TRG_LANG = "trgLang"; + @SerializedName(SERIALIZED_NAME_TRG_LANG) + private String trgLang; + + public static final String SERIALIZED_NAME_TRG_LOCALE = "trgLocale"; + @SerializedName(SERIALIZED_NAME_TRG_LOCALE) + private String trgLocale; + + public static final String SERIALIZED_NAME_DUE_DATE = "dueDate"; + @SerializedName(SERIALIZED_NAME_DUE_DATE) + private String dueDate; + + public static final String SERIALIZED_NAME_MEMORY_ID = "memoryId"; + @SerializedName(SERIALIZED_NAME_MEMORY_ID) + private Integer memoryId; + + public static final String SERIALIZED_NAME_PRETRANSLATE = "pretranslate"; + @SerializedName(SERIALIZED_NAME_PRETRANSLATE) + private Boolean pretranslate; + + public static final String SERIALIZED_NAME_AUTO_ACCEPT = "autoAccept"; + @SerializedName(SERIALIZED_NAME_AUTO_ACCEPT) + private Boolean autoAccept; + + public static final String SERIALIZED_NAME_CASE_SENSITIVE = "caseSensitive"; + @SerializedName(SERIALIZED_NAME_CASE_SENSITIVE) + private Boolean caseSensitive; + + public static final String SERIALIZED_NAME_TAKE_MATCH_ATTRIBUTION = "takeMatchAttribution"; + @SerializedName(SERIALIZED_NAME_TAKE_MATCH_ATTRIBUTION) + private Boolean takeMatchAttribution; + + public static final String SERIALIZED_NAME_CONFIG_ID = "configId"; + @SerializedName(SERIALIZED_NAME_CONFIG_ID) + private Integer configId; + + + public LanguagePair srcLang(String srcLang) { + + this.srcLang = srcLang; + return this; + } + + /** + * Source langauge, an ISO 639-1 language identifier. + * @return srcLang + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "en", value = "Source langauge, an ISO 639-1 language identifier.") + + public String getSrcLang() { + return srcLang; + } + + + public void setSrcLang(String srcLang) { + this.srcLang = srcLang; + } + + + public LanguagePair srcLocale(String srcLocale) { + + this.srcLocale = srcLocale; + return this; + } + + /** + * A locale identifier, supported for source langauge. + * @return srcLocale + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "US", value = "A locale identifier, supported for source langauge.") + + public String getSrcLocale() { + return srcLocale; + } + + + public void setSrcLocale(String srcLocale) { + this.srcLocale = srcLocale; + } + + + public LanguagePair trgLang(String trgLang) { + + this.trgLang = trgLang; + return this; + } + + /** + * Target langauge, an ISO 639-1 language identifier. + * @return trgLang + **/ + @ApiModelProperty(example = "de", required = true, value = "Target langauge, an ISO 639-1 language identifier.") + + public String getTrgLang() { + return trgLang; + } + + + public void setTrgLang(String trgLang) { + this.trgLang = trgLang; + } + + + public LanguagePair trgLocale(String trgLocale) { + + this.trgLocale = trgLocale; + return this; + } + + /** + * A locale identifier, supported for target language. + * @return trgLocale + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "DE", value = "A locale identifier, supported for target language.") + + public String getTrgLocale() { + return trgLocale; + } + + + public void setTrgLocale(String trgLocale) { + this.trgLocale = trgLocale; + } + + + public LanguagePair dueDate(String dueDate) { + + this.dueDate = dueDate; + return this; + } + + /** + * An ISO date. + * @return dueDate + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2021-10-03T13:43:00.000Z", value = "An ISO date.") + + public String getDueDate() { + return dueDate; + } + + + public void setDueDate(String dueDate) { + this.dueDate = dueDate; + } + + + public LanguagePair memoryId(Integer memoryId) { + + this.memoryId = memoryId; + return this; + } + + /** + * A unique number identifying the associated Memory. + * @return memoryId + **/ + @ApiModelProperty(example = "1241", required = true, value = "A unique number identifying the associated Memory.") + + public Integer getMemoryId() { + return memoryId; + } + + + public void setMemoryId(Integer memoryId) { + this.memoryId = memoryId; + } + + + public LanguagePair pretranslate(Boolean pretranslate) { + + this.pretranslate = pretranslate; + return this; + } + + /** + * Attribute translation authorship of exact matches to the creator of the document being pretranslated. + * @return pretranslate + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Attribute translation authorship of exact matches to the creator of the document being pretranslated.") + + public Boolean getPretranslate() { + return pretranslate; + } + + + public void setPretranslate(Boolean pretranslate) { + this.pretranslate = pretranslate; + } + + + public LanguagePair autoAccept(Boolean autoAccept) { + + this.autoAccept = autoAccept; + return this; + } + + /** + * Accept and lock exact matches. + * @return autoAccept + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "Accept and lock exact matches.") + + public Boolean getAutoAccept() { + return autoAccept; + } + + + public void setAutoAccept(Boolean autoAccept) { + this.autoAccept = autoAccept; + } + + + public LanguagePair caseSensitive(Boolean caseSensitive) { + + this.caseSensitive = caseSensitive; + return this; + } + + /** + * Use case sensitive translation memory matching. + * @return caseSensitive + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Use case sensitive translation memory matching.") + + public Boolean getCaseSensitive() { + return caseSensitive; + } + + + public void setCaseSensitive(Boolean caseSensitive) { + this.caseSensitive = caseSensitive; + } + + + public LanguagePair takeMatchAttribution(Boolean takeMatchAttribution) { + + this.takeMatchAttribution = takeMatchAttribution; + return this; + } + + /** + * Use MT for unmatched segments. + * @return takeMatchAttribution + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "true", value = "Use MT for unmatched segments.") + + public Boolean getTakeMatchAttribution() { + return takeMatchAttribution; + } + + + public void setTakeMatchAttribution(Boolean takeMatchAttribution) { + this.takeMatchAttribution = takeMatchAttribution; + } + + + public LanguagePair configId(Integer configId) { + + this.configId = configId; + return this; + } + + /** + * Configuration id + * @return configId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "2332", value = "Configuration id") + + public Integer getConfigId() { + return configId; + } + + + public void setConfigId(Integer configId) { + this.configId = configId; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LanguagePair languagePair = (LanguagePair) o; + return Objects.equals(this.srcLang, languagePair.srcLang) && + Objects.equals(this.srcLocale, languagePair.srcLocale) && + Objects.equals(this.trgLang, languagePair.trgLang) && + Objects.equals(this.trgLocale, languagePair.trgLocale) && + Objects.equals(this.dueDate, languagePair.dueDate) && + Objects.equals(this.memoryId, languagePair.memoryId) && + 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); + } + + @Override + public int hashCode() { + return Objects.hash(srcLang, srcLocale, trgLang, trgLocale, dueDate, memoryId, pretranslate, autoAccept, caseSensitive, takeMatchAttribution, configId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LanguagePair {\n"); + sb.append(" srcLang: ").append(toIndentedString(srcLang)).append("\n"); + sb.append(" srcLocale: ").append(toIndentedString(srcLocale)).append("\n"); + sb.append(" trgLang: ").append(toIndentedString(trgLang)).append("\n"); + sb.append(" trgLocale: ").append(toIndentedString(trgLocale)).append("\n"); + sb.append(" dueDate: ").append(toIndentedString(dueDate)).append("\n"); + sb.append(" memoryId: ").append(toIndentedString(memoryId)).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("}"); + 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/LanguagesResponse.java b/src/main/java/com/lilt/client/model/LanguagesResponse.java index 382374e43..69dfa5fe4 100644 --- a/src/main/java/com/lilt/client/model/LanguagesResponse.java +++ b/src/main/java/com/lilt/client/model/LanguagesResponse.java @@ -27,7 +27,7 @@ /** * LanguagesResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[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/LexiconEntry.java b/src/main/java/com/lilt/client/model/LexiconEntry.java index 7fb07886a..ac2ba1477 100644 --- a/src/main/java/com/lilt/client/model/LexiconEntry.java +++ b/src/main/java/com/lilt/client/model/LexiconEntry.java @@ -32,7 +32,7 @@ * An Lexicon entry for a source term or phrase. */ @ApiModel(description = "An Lexicon entry for a source term or phrase. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class LexiconEntry { public static final String SERIALIZED_NAME_TRANSLATIONS = "translations"; @SerializedName(SERIALIZED_NAME_TRANSLATIONS) diff --git a/src/main/java/com/lilt/client/model/LexiconEntryExamples.java b/src/main/java/com/lilt/client/model/LexiconEntryExamples.java index eab1d87ce..ad709aa08 100644 --- a/src/main/java/com/lilt/client/model/LexiconEntryExamples.java +++ b/src/main/java/com/lilt/client/model/LexiconEntryExamples.java @@ -32,7 +32,7 @@ /** * LexiconEntryExamples */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class LexiconEntryExamples { public static final String SERIALIZED_NAME_SOURCE = "source"; @SerializedName(SERIALIZED_NAME_SOURCE) diff --git a/src/main/java/com/lilt/client/model/LexiconEntrySourceSpan.java b/src/main/java/com/lilt/client/model/LexiconEntrySourceSpan.java index 8e4185c65..ce95f589d 100644 --- a/src/main/java/com/lilt/client/model/LexiconEntrySourceSpan.java +++ b/src/main/java/com/lilt/client/model/LexiconEntrySourceSpan.java @@ -29,7 +29,7 @@ * An object that indicates where the query term appears in the source. */ @ApiModel(description = "An object that indicates where the query term appears in the source.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class LexiconEntrySourceSpan { public static final String SERIALIZED_NAME_START = "start"; @SerializedName(SERIALIZED_NAME_START) diff --git a/src/main/java/com/lilt/client/model/LexiconEntryTargetSpan.java b/src/main/java/com/lilt/client/model/LexiconEntryTargetSpan.java index 088c6f58c..4f2d25dbe 100644 --- a/src/main/java/com/lilt/client/model/LexiconEntryTargetSpan.java +++ b/src/main/java/com/lilt/client/model/LexiconEntryTargetSpan.java @@ -29,7 +29,7 @@ * An object that indicates the location in the target of contiguous words that align with the source query. */ @ApiModel(description = "An object that indicates the location in the target of contiguous words that align with the source query. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class LexiconEntryTargetSpan { public static final String SERIALIZED_NAME_START = "start"; @SerializedName(SERIALIZED_NAME_START) diff --git a/src/main/java/com/lilt/client/model/LexiconEntryTranslations.java b/src/main/java/com/lilt/client/model/LexiconEntryTranslations.java index 4bfe983bc..74112fde0 100644 --- a/src/main/java/com/lilt/client/model/LexiconEntryTranslations.java +++ b/src/main/java/com/lilt/client/model/LexiconEntryTranslations.java @@ -28,7 +28,7 @@ /** * LexiconEntryTranslations */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class LexiconEntryTranslations { public static final String SERIALIZED_NAME_SOURCE = "source"; @SerializedName(SERIALIZED_NAME_SOURCE) diff --git a/src/main/java/com/lilt/client/model/LexiconUpdateParameters.java b/src/main/java/com/lilt/client/model/LexiconUpdateParameters.java index 2e1b70a1c..70cd06b6a 100644 --- a/src/main/java/com/lilt/client/model/LexiconUpdateParameters.java +++ b/src/main/java/com/lilt/client/model/LexiconUpdateParameters.java @@ -27,7 +27,7 @@ /** * LexiconUpdateParameters */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class LexiconUpdateParameters { public static final String SERIALIZED_NAME_MEMORY_ID = "memory_id"; @SerializedName(SERIALIZED_NAME_MEMORY_ID) diff --git a/src/main/java/com/lilt/client/model/LexiconUpdateResponse.java b/src/main/java/com/lilt/client/model/LexiconUpdateResponse.java index 5135362cd..118ab00c3 100644 --- a/src/main/java/com/lilt/client/model/LexiconUpdateResponse.java +++ b/src/main/java/com/lilt/client/model/LexiconUpdateResponse.java @@ -27,7 +27,7 @@ /** * LexiconUpdateResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class LexiconUpdateResponse { public static final String SERIALIZED_NAME_MEMORY_ID = "memory_id"; @SerializedName(SERIALIZED_NAME_MEMORY_ID) diff --git a/src/main/java/com/lilt/client/model/MatchBand.java b/src/main/java/com/lilt/client/model/MatchBand.java index 9568c6e4c..eac1d62f3 100644 --- a/src/main/java/com/lilt/client/model/MatchBand.java +++ b/src/main/java/com/lilt/client/model/MatchBand.java @@ -28,7 +28,7 @@ * A translation memory match band. */ @ApiModel(description = "A translation memory match band. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class MatchBand { public static final String SERIALIZED_NAME_MINIMUM_SCORE = "minimum_score"; @SerializedName(SERIALIZED_NAME_MINIMUM_SCORE) diff --git a/src/main/java/com/lilt/client/model/Memory.java b/src/main/java/com/lilt/client/model/Memory.java index 37b402d98..f085db185 100644 --- a/src/main/java/com/lilt/client/model/Memory.java +++ b/src/main/java/com/lilt/client/model/Memory.java @@ -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-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class Memory { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/MemoryCreateParameters.java b/src/main/java/com/lilt/client/model/MemoryCreateParameters.java index 745e80651..8c946a0fe 100644 --- a/src/main/java/com/lilt/client/model/MemoryCreateParameters.java +++ b/src/main/java/com/lilt/client/model/MemoryCreateParameters.java @@ -27,7 +27,7 @@ /** * MemoryCreateParameters */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[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 d027931d7..3744be6c5 100644 --- a/src/main/java/com/lilt/client/model/MemoryDeleteResponse.java +++ b/src/main/java/com/lilt/client/model/MemoryDeleteResponse.java @@ -27,7 +27,7 @@ /** * MemoryDeleteResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[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 6c6d32d93..1861cf32c 100644 --- a/src/main/java/com/lilt/client/model/MemoryImportResponse.java +++ b/src/main/java/com/lilt/client/model/MemoryImportResponse.java @@ -27,7 +27,7 @@ /** * MemoryImportResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[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/MemoryInsertResponse.java b/src/main/java/com/lilt/client/model/MemoryInsertResponse.java index a50624898..4633c5b5d 100644 --- a/src/main/java/com/lilt/client/model/MemoryInsertResponse.java +++ b/src/main/java/com/lilt/client/model/MemoryInsertResponse.java @@ -27,7 +27,7 @@ /** * MemoryInsertResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class MemoryInsertResponse { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/MemorySyncDeleteResponse.java b/src/main/java/com/lilt/client/model/MemorySyncDeleteResponse.java index 2a9124f9f..a91e935b8 100644 --- a/src/main/java/com/lilt/client/model/MemorySyncDeleteResponse.java +++ b/src/main/java/com/lilt/client/model/MemorySyncDeleteResponse.java @@ -27,7 +27,7 @@ /** * MemorySyncDeleteResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class MemorySyncDeleteResponse { 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 737ba45c4..5c4d76fff 100644 --- a/src/main/java/com/lilt/client/model/MemoryUpdateParameters.java +++ b/src/main/java/com/lilt/client/model/MemoryUpdateParameters.java @@ -27,7 +27,7 @@ /** * MemoryUpdateParameters */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[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/MemoryUpdateResponse.java b/src/main/java/com/lilt/client/model/MemoryUpdateResponse.java index 6724861ac..61b486e9b 100644 --- a/src/main/java/com/lilt/client/model/MemoryUpdateResponse.java +++ b/src/main/java/com/lilt/client/model/MemoryUpdateResponse.java @@ -27,7 +27,7 @@ /** * MemoryUpdateResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class MemoryUpdateResponse { 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 3241d1d72..a695e4b07 100644 --- a/src/main/java/com/lilt/client/model/Project.java +++ b/src/main/java/com/lilt/client/model/Project.java @@ -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-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class Project { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -41,6 +41,10 @@ public class Project { @SerializedName(SERIALIZED_NAME_MEMORY_ID) private Integer memoryId; + public static final String SERIALIZED_NAME_JOB_ID = "job_id"; + @SerializedName(SERIALIZED_NAME_JOB_ID) + private Integer jobId; + public static final String SERIALIZED_NAME_SRCLANG = "srclang"; @SerializedName(SERIALIZED_NAME_SRCLANG) private String srclang; @@ -140,6 +144,29 @@ public void setMemoryId(Integer memoryId) { } + public Project jobId(Integer jobId) { + + this.jobId = jobId; + return this; + } + + /** + * A unique number identifying the associated Job. + * @return jobId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "1234", value = "A unique number identifying the associated Job.") + + public Integer getJobId() { + return jobId; + } + + + public void setJobId(Integer jobId) { + this.jobId = jobId; + } + + public Project srclang(String srclang) { this.srclang = srclang; @@ -458,6 +485,7 @@ public boolean equals(Object o) { Project project = (Project) o; return Objects.equals(this.id, project.id) && Objects.equals(this.memoryId, project.memoryId) && + Objects.equals(this.jobId, project.jobId) && Objects.equals(this.srclang, project.srclang) && Objects.equals(this.trglang, project.trglang) && Objects.equals(this.srclocale, project.srclocale) && @@ -475,7 +503,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(id, memoryId, 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, document); } @Override @@ -484,6 +512,7 @@ public String toString() { sb.append("class Project {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" memoryId: ").append(toIndentedString(memoryId)).append("\n"); + sb.append(" jobId: ").append(toIndentedString(jobId)).append("\n"); sb.append(" srclang: ").append(toIndentedString(srclang)).append("\n"); sb.append(" trglang: ").append(toIndentedString(trglang)).append("\n"); sb.append(" srclocale: ").append(toIndentedString(srclocale)).append("\n"); diff --git a/src/main/java/com/lilt/client/model/ProjectCreateParameters.java b/src/main/java/com/lilt/client/model/ProjectCreateParameters.java index 15fd0decd..0c2e8455f 100644 --- a/src/main/java/com/lilt/client/model/ProjectCreateParameters.java +++ b/src/main/java/com/lilt/client/model/ProjectCreateParameters.java @@ -23,13 +23,11 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; -import java.util.ArrayList; -import java.util.List; /** * ProjectCreateParameters */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class ProjectCreateParameters { public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) @@ -39,9 +37,9 @@ public class ProjectCreateParameters { @SerializedName(SERIALIZED_NAME_MEMORY_ID) private Integer memoryId; - public static final String SERIALIZED_NAME_FILE_IDS = "file_ids"; - @SerializedName(SERIALIZED_NAME_FILE_IDS) - private List fileIds = null; + public static final String SERIALIZED_NAME_JOB_ID = "job_id"; + @SerializedName(SERIALIZED_NAME_JOB_ID) + private Integer jobId; public static final String SERIALIZED_NAME_DUE_DATE = "due_date"; @SerializedName(SERIALIZED_NAME_DUE_DATE) @@ -96,34 +94,26 @@ public void setMemoryId(Integer memoryId) { } - public ProjectCreateParameters fileIds(List fileIds) { + public ProjectCreateParameters jobId(Integer jobId) { - this.fileIds = fileIds; - return this; - } - - public ProjectCreateParameters addFileIdsItem(Integer fileIdsItem) { - if (this.fileIds == null) { - this.fileIds = new ArrayList(); - } - this.fileIds.add(fileIdsItem); + this.jobId = jobId; return this; } /** - * A list of Files to add to this new Project. - * @return fileIds + * 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. + * @return jobId **/ @javax.annotation.Nullable - @ApiModelProperty(example = "[123, 124, 125]", value = "A list of Files to add to this new Project.") + @ApiModelProperty(example = "1234", value = "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. ") - public List getFileIds() { - return fileIds; + public Integer getJobId() { + return jobId; } - public void setFileIds(List fileIds) { - this.fileIds = fileIds; + public void setJobId(Integer jobId) { + this.jobId = jobId; } @@ -184,14 +174,14 @@ public boolean equals(Object o) { ProjectCreateParameters projectCreateParameters = (ProjectCreateParameters) o; return Objects.equals(this.name, projectCreateParameters.name) && Objects.equals(this.memoryId, projectCreateParameters.memoryId) && - Objects.equals(this.fileIds, projectCreateParameters.fileIds) && + Objects.equals(this.jobId, projectCreateParameters.jobId) && Objects.equals(this.dueDate, projectCreateParameters.dueDate) && Objects.equals(this.metadata, projectCreateParameters.metadata); } @Override public int hashCode() { - return Objects.hash(name, memoryId, fileIds, dueDate, metadata); + return Objects.hash(name, memoryId, jobId, dueDate, metadata); } @Override @@ -200,7 +190,7 @@ public String toString() { sb.append("class ProjectCreateParameters {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" memoryId: ").append(toIndentedString(memoryId)).append("\n"); - sb.append(" fileIds: ").append(toIndentedString(fileIds)).append("\n"); + 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("}"); diff --git a/src/main/java/com/lilt/client/model/ProjectDeleteResponse.java b/src/main/java/com/lilt/client/model/ProjectDeleteResponse.java index 6dca637fd..ba861d5f9 100644 --- a/src/main/java/com/lilt/client/model/ProjectDeleteResponse.java +++ b/src/main/java/com/lilt/client/model/ProjectDeleteResponse.java @@ -27,7 +27,7 @@ /** * ProjectDeleteResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[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/ProjectQuote.java b/src/main/java/com/lilt/client/model/ProjectQuote.java index a4ad243d1..32f827a9f 100644 --- a/src/main/java/com/lilt/client/model/ProjectQuote.java +++ b/src/main/java/com/lilt/client/model/ProjectQuote.java @@ -32,7 +32,7 @@ * Quoting information for a Project. */ @ApiModel(description = "Quoting information for a Project. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class ProjectQuote { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/ProjectStatus.java b/src/main/java/com/lilt/client/model/ProjectStatus.java index 856095fa3..b2eafd3a4 100644 --- a/src/main/java/com/lilt/client/model/ProjectStatus.java +++ b/src/main/java/com/lilt/client/model/ProjectStatus.java @@ -31,7 +31,7 @@ * The status of a Project. */ @ApiModel(description = "The status of a Project. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class ProjectStatus { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/ProjectUpdateResponse.java b/src/main/java/com/lilt/client/model/ProjectUpdateResponse.java index fa727d342..7b3be33ec 100644 --- a/src/main/java/com/lilt/client/model/ProjectUpdateResponse.java +++ b/src/main/java/com/lilt/client/model/ProjectUpdateResponse.java @@ -27,7 +27,7 @@ /** * ProjectUpdateResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class ProjectUpdateResponse { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/QARuleMatches.java b/src/main/java/com/lilt/client/model/QARuleMatches.java index f0b8ae1b7..8f526e014 100644 --- a/src/main/java/com/lilt/client/model/QARuleMatches.java +++ b/src/main/java/com/lilt/client/model/QARuleMatches.java @@ -20,6 +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.QARuleMatchesCustomRules; import com.lilt.client.model.QARuleMatchesMatches; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -31,12 +32,16 @@ * QA rules describing the errors in the text. */ @ApiModel(description = "QA rules describing the errors in the text.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class QARuleMatches { public static final String SERIALIZED_NAME_MATCHES = "matches"; @SerializedName(SERIALIZED_NAME_MATCHES) private List matches = null; + public static final String SERIALIZED_NAME_CUSTOM_RULES = "custom_rules"; + @SerializedName(SERIALIZED_NAME_CUSTOM_RULES) + private List customRules = null; + public QARuleMatches matches(List matches) { @@ -69,6 +74,37 @@ public void setMatches(List matches) { } + public QARuleMatches customRules(List customRules) { + + this.customRules = customRules; + return this; + } + + public QARuleMatches addCustomRulesItem(QARuleMatchesCustomRules customRulesItem) { + if (this.customRules == null) { + this.customRules = new ArrayList(); + } + this.customRules.add(customRulesItem); + return this; + } + + /** + * Get customRules + * @return customRules + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public List getCustomRules() { + return customRules; + } + + + public void setCustomRules(List customRules) { + this.customRules = customRules; + } + + @Override public boolean equals(Object o) { if (this == o) { @@ -78,12 +114,13 @@ public boolean equals(Object o) { return false; } QARuleMatches qaRuleMatches = (QARuleMatches) o; - return Objects.equals(this.matches, qaRuleMatches.matches); + return Objects.equals(this.matches, qaRuleMatches.matches) && + Objects.equals(this.customRules, qaRuleMatches.customRules); } @Override public int hashCode() { - return Objects.hash(matches); + return Objects.hash(matches, customRules); } @Override @@ -91,6 +128,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class QARuleMatches {\n"); sb.append(" matches: ").append(toIndentedString(matches)).append("\n"); + sb.append(" customRules: ").append(toIndentedString(customRules)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/com/lilt/client/model/QARuleMatchesContext.java b/src/main/java/com/lilt/client/model/QARuleMatchesContext.java index 207c0ad8c..f7c19b8ad 100644 --- a/src/main/java/com/lilt/client/model/QARuleMatchesContext.java +++ b/src/main/java/com/lilt/client/model/QARuleMatchesContext.java @@ -27,7 +27,7 @@ /** * QARuleMatchesContext */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class QARuleMatchesContext { public static final String SERIALIZED_NAME_LENGTH = "length"; @SerializedName(SERIALIZED_NAME_LENGTH) diff --git a/src/main/java/com/lilt/client/model/QARuleMatchesCustomRules.java b/src/main/java/com/lilt/client/model/QARuleMatchesCustomRules.java new file mode 100644 index 000000000..c49c8e602 --- /dev/null +++ b/src/main/java/com/lilt/client/model/QARuleMatchesCustomRules.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. + * + * The version of the OpenAPI document: v2.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; + +/** + * QARuleMatchesCustomRules + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +public class QARuleMatchesCustomRules { + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + + public QARuleMatchesCustomRules description(String description) { + + this.description = description; + return this; + } + + /** + * A QA warning defined by a custom rule. + * @return description + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "Mistake detected by a custom rule.", value = "A QA warning defined by a custom rule.") + + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + QARuleMatchesCustomRules qaRuleMatchesCustomRules = (QARuleMatchesCustomRules) o; + return Objects.equals(this.description, qaRuleMatchesCustomRules.description); + } + + @Override + public int hashCode() { + return Objects.hash(description); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class QARuleMatchesCustomRules {\n"); + sb.append(" description: ").append(toIndentedString(description)).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/QARuleMatchesMatches.java b/src/main/java/com/lilt/client/model/QARuleMatchesMatches.java index 0300391e0..1602a9647 100644 --- a/src/main/java/com/lilt/client/model/QARuleMatchesMatches.java +++ b/src/main/java/com/lilt/client/model/QARuleMatchesMatches.java @@ -32,7 +32,7 @@ /** * QARuleMatchesMatches */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class QARuleMatchesMatches { public static final String SERIALIZED_NAME_CONTEXT = "context"; @SerializedName(SERIALIZED_NAME_CONTEXT) diff --git a/src/main/java/com/lilt/client/model/QARuleMatchesReplacements.java b/src/main/java/com/lilt/client/model/QARuleMatchesReplacements.java index bfa476298..91900e4e2 100644 --- a/src/main/java/com/lilt/client/model/QARuleMatchesReplacements.java +++ b/src/main/java/com/lilt/client/model/QARuleMatchesReplacements.java @@ -27,7 +27,7 @@ /** * QARuleMatchesReplacements */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class QARuleMatchesReplacements { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) diff --git a/src/main/java/com/lilt/client/model/QARuleMatchesRule.java b/src/main/java/com/lilt/client/model/QARuleMatchesRule.java index cbb82ab18..a57cd633c 100644 --- a/src/main/java/com/lilt/client/model/QARuleMatchesRule.java +++ b/src/main/java/com/lilt/client/model/QARuleMatchesRule.java @@ -31,7 +31,7 @@ /** * QARuleMatchesRule */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class QARuleMatchesRule { public static final String SERIALIZED_NAME_CATEGORY = "category"; @SerializedName(SERIALIZED_NAME_CATEGORY) diff --git a/src/main/java/com/lilt/client/model/QARuleMatchesRuleCategory.java b/src/main/java/com/lilt/client/model/QARuleMatchesRuleCategory.java index 1bec28b06..d5e181313 100644 --- a/src/main/java/com/lilt/client/model/QARuleMatchesRuleCategory.java +++ b/src/main/java/com/lilt/client/model/QARuleMatchesRuleCategory.java @@ -27,7 +27,7 @@ /** * QARuleMatchesRuleCategory */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class QARuleMatchesRuleCategory { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/QARuleMatchesRuleUrls.java b/src/main/java/com/lilt/client/model/QARuleMatchesRuleUrls.java index 7b6dffea6..9af869e20 100644 --- a/src/main/java/com/lilt/client/model/QARuleMatchesRuleUrls.java +++ b/src/main/java/com/lilt/client/model/QARuleMatchesRuleUrls.java @@ -27,7 +27,7 @@ /** * QARuleMatchesRuleUrls */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class QARuleMatchesRuleUrls { public static final String SERIALIZED_NAME_VALUE = "value"; @SerializedName(SERIALIZED_NAME_VALUE) diff --git a/src/main/java/com/lilt/client/model/ResourceStatus.java b/src/main/java/com/lilt/client/model/ResourceStatus.java index f8eed42a3..df2ff1fcf 100644 --- a/src/main/java/com/lilt/client/model/ResourceStatus.java +++ b/src/main/java/com/lilt/client/model/ResourceStatus.java @@ -28,7 +28,7 @@ * The status of a resource working on a Project. */ @ApiModel(description = "The status of a resource working on a Project. ") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class ResourceStatus { public static final String SERIALIZED_NAME_EMAIL = "email"; @SerializedName(SERIALIZED_NAME_EMAIL) diff --git a/src/main/java/com/lilt/client/model/Segment.java b/src/main/java/com/lilt/client/model/Segment.java index 2611a8d62..2d818b0bb 100644 --- a/src/main/java/com/lilt/client/model/Segment.java +++ b/src/main/java/com/lilt/client/model/Segment.java @@ -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-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[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/SegmentCreateParameters.java b/src/main/java/com/lilt/client/model/SegmentCreateParameters.java index 07c2bc06b..aaaffb325 100644 --- a/src/main/java/com/lilt/client/model/SegmentCreateParameters.java +++ b/src/main/java/com/lilt/client/model/SegmentCreateParameters.java @@ -27,7 +27,7 @@ /** * SegmentCreateParameters */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class SegmentCreateParameters { public static final String SERIALIZED_NAME_MEMORY_ID = "memory_id"; @SerializedName(SERIALIZED_NAME_MEMORY_ID) diff --git a/src/main/java/com/lilt/client/model/SegmentDeleteResponse.java b/src/main/java/com/lilt/client/model/SegmentDeleteResponse.java index 4045c6731..547fcae83 100644 --- a/src/main/java/com/lilt/client/model/SegmentDeleteResponse.java +++ b/src/main/java/com/lilt/client/model/SegmentDeleteResponse.java @@ -27,7 +27,7 @@ /** * SegmentDeleteResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class SegmentDeleteResponse { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/SegmentDoneResponse.java b/src/main/java/com/lilt/client/model/SegmentDoneResponse.java new file mode 100644 index 000000000..160fe4da5 --- /dev/null +++ b/src/main/java/com/lilt/client/model/SegmentDoneResponse.java @@ -0,0 +1,105 @@ +/* + * 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 version of the OpenAPI document: v2.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.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +/** + * SegmentDoneResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +public class SegmentDoneResponse { + public static final String SERIALIZED_NAME_DOCUMENT_IDS = "documentIds"; + @SerializedName(SERIALIZED_NAME_DOCUMENT_IDS) + private List documentIds = new ArrayList(); + + + public SegmentDoneResponse documentIds(List documentIds) { + + this.documentIds = documentIds; + return this; + } + + public SegmentDoneResponse addDocumentIdsItem(BigDecimal documentIdsItem) { + this.documentIds.add(documentIdsItem); + return this; + } + + /** + * array of segment ids + * @return documentIds + **/ + @ApiModelProperty(example = "[30032, 30125]", required = true, value = "array of segment ids") + + public List getDocumentIds() { + return documentIds; + } + + + public void setDocumentIds(List documentIds) { + this.documentIds = documentIds; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SegmentDoneResponse segmentDoneResponse = (SegmentDoneResponse) o; + return Objects.equals(this.documentIds, segmentDoneResponse.documentIds); + } + + @Override + public int hashCode() { + return Objects.hash(documentIds); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SegmentDoneResponse {\n"); + sb.append(" documentIds: ").append(toIndentedString(documentIds)).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/SegmentUpdateParameters.java b/src/main/java/com/lilt/client/model/SegmentUpdateParameters.java index 743b23082..b55b43650 100644 --- a/src/main/java/com/lilt/client/model/SegmentUpdateParameters.java +++ b/src/main/java/com/lilt/client/model/SegmentUpdateParameters.java @@ -27,7 +27,7 @@ /** * SegmentUpdateParameters */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class SegmentUpdateParameters { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/SegmentWithComments.java b/src/main/java/com/lilt/client/model/SegmentWithComments.java index 73bf796e7..65b727f1a 100644 --- a/src/main/java/com/lilt/client/model/SegmentWithComments.java +++ b/src/main/java/com/lilt/client/model/SegmentWithComments.java @@ -31,7 +31,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-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class SegmentWithComments { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/src/main/java/com/lilt/client/model/Setting.java b/src/main/java/com/lilt/client/model/Setting.java new file mode 100644 index 000000000..5643f55e2 --- /dev/null +++ b/src/main/java/com/lilt/client/model/Setting.java @@ -0,0 +1,215 @@ +/* + * 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 version of the OpenAPI document: v2.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; + +/** + * A configuration setting. + */ +@ApiModel(description = "A configuration setting.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +public class Setting { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private Integer id; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_VALUE_TYPE = "valueType"; + @SerializedName(SERIALIZED_NAME_VALUE_TYPE) + private String valueType; + + public static final String SERIALIZED_NAME_IS_USER_FACING = "isUserFacing"; + @SerializedName(SERIALIZED_NAME_IS_USER_FACING) + private Boolean isUserFacing; + + public static final String SERIALIZED_NAME_IS_DEFAULT = "isDefault"; + @SerializedName(SERIALIZED_NAME_IS_DEFAULT) + private Boolean isDefault; + + + public Setting id(Integer id) { + + this.id = id; + return this; + } + + /** + * The identifier of the setting. + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The identifier of the setting.") + + public Integer getId() { + return id; + } + + + public void setId(Integer id) { + this.id = id; + } + + + public Setting name(String name) { + + this.name = name; + return this; + } + + /** + * The name of the setting. + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "The name of the setting.") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public Setting valueType(String valueType) { + + this.valueType = valueType; + return this; + } + + /** + * the type of value the setting may have - Boolean, Json, Number, String. + * @return valueType + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "the type of value the setting may have - Boolean, Json, Number, String.") + + public String getValueType() { + return valueType; + } + + + public void setValueType(String valueType) { + this.valueType = valueType; + } + + + public Setting isUserFacing(Boolean isUserFacing) { + + this.isUserFacing = isUserFacing; + return this; + } + + /** + * Whether the setting is editable by the user. + * @return isUserFacing + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Whether the setting is editable by the user.") + + public Boolean getIsUserFacing() { + return isUserFacing; + } + + + public void setIsUserFacing(Boolean isUserFacing) { + this.isUserFacing = isUserFacing; + } + + + public Setting isDefault(Boolean isDefault) { + + this.isDefault = isDefault; + return this; + } + + /** + * True when the setting value is inherited from the default setting. + * @return isDefault + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "True when the setting value is inherited from the default setting.") + + public Boolean getIsDefault() { + return isDefault; + } + + + public void setIsDefault(Boolean isDefault) { + this.isDefault = isDefault; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Setting setting = (Setting) o; + return Objects.equals(this.id, setting.id) && + Objects.equals(this.name, setting.name) && + Objects.equals(this.valueType, setting.valueType) && + Objects.equals(this.isUserFacing, setting.isUserFacing) && + Objects.equals(this.isDefault, setting.isDefault); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, valueType, isUserFacing, isDefault); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Setting {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" valueType: ").append(toIndentedString(valueType)).append("\n"); + sb.append(" isUserFacing: ").append(toIndentedString(isUserFacing)).append("\n"); + sb.append(" isDefault: ").append(toIndentedString(isDefault)).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/SettingUpsertBody.java b/src/main/java/com/lilt/client/model/SettingUpsertBody.java new file mode 100644 index 000000000..f7c71c0b5 --- /dev/null +++ b/src/main/java/com/lilt/client/model/SettingUpsertBody.java @@ -0,0 +1,216 @@ +/* + * 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 version of the OpenAPI document: v2.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.math.BigDecimal; + +/** + * Body to create or update a setting. + */ +@ApiModel(description = "Body to create or update a setting.") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +public class SettingUpsertBody { + public static final String SERIALIZED_NAME_SETTING_NAME = "settingName"; + @SerializedName(SERIALIZED_NAME_SETTING_NAME) + private String settingName; + + public static final String SERIALIZED_NAME_SCOPE = "scope"; + @SerializedName(SERIALIZED_NAME_SCOPE) + private String scope; + + public static final String SERIALIZED_NAME_IS_ENFORCED = "isEnforced"; + @SerializedName(SERIALIZED_NAME_IS_ENFORCED) + private Boolean isEnforced; + + public static final String SERIALIZED_NAME_PROJECT_ID = "projectId"; + @SerializedName(SERIALIZED_NAME_PROJECT_ID) + private BigDecimal projectId; + + public static final String SERIALIZED_NAME_ORGANIZATION_ID = "organizationId"; + @SerializedName(SERIALIZED_NAME_ORGANIZATION_ID) + private BigDecimal organizationId; + + + public SettingUpsertBody settingName(String settingName) { + + this.settingName = settingName; + return this; + } + + /** + * The name of the setting. + * @return settingName + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "requireBatchQaTranslator", value = "The name of the setting.") + + public String getSettingName() { + return settingName; + } + + + public void setSettingName(String settingName) { + this.settingName = settingName; + } + + + public SettingUpsertBody scope(String scope) { + + this.scope = scope; + return this; + } + + /** + * The entity scope the setting should be applied to. + * @return scope + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "Organization", value = "The entity scope the setting should be applied to.") + + public String getScope() { + return scope; + } + + + public void setScope(String scope) { + this.scope = scope; + } + + + public SettingUpsertBody isEnforced(Boolean isEnforced) { + + this.isEnforced = isEnforced; + return this; + } + + /** + * Whether this value should override others set for the same setting key. + * @return isEnforced + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Whether this value should override others set for the same setting key. ") + + public Boolean getIsEnforced() { + return isEnforced; + } + + + public void setIsEnforced(Boolean isEnforced) { + this.isEnforced = isEnforced; + } + + + public SettingUpsertBody projectId(BigDecimal projectId) { + + this.projectId = projectId; + return this; + } + + /** + * Id of the the project the setting will be applied to. Required when scope is `Project`. + * @return projectId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "Id of the the project the setting will be applied to. Required when scope is `Project`. ") + + public BigDecimal getProjectId() { + return projectId; + } + + + public void setProjectId(BigDecimal projectId) { + this.projectId = projectId; + } + + + public SettingUpsertBody organizationId(BigDecimal organizationId) { + + this.organizationId = organizationId; + return this; + } + + /** + * Id of the the project the setting will be applied to. Required when scope is `Organization`. + * @return organizationId + **/ + @javax.annotation.Nullable + @ApiModelProperty(example = "123.0", value = "Id of the the project the setting will be applied to. Required when scope is `Organization`. ") + + public BigDecimal getOrganizationId() { + return organizationId; + } + + + public void setOrganizationId(BigDecimal organizationId) { + this.organizationId = organizationId; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SettingUpsertBody settingUpsertBody = (SettingUpsertBody) o; + return Objects.equals(this.settingName, settingUpsertBody.settingName) && + Objects.equals(this.scope, settingUpsertBody.scope) && + Objects.equals(this.isEnforced, settingUpsertBody.isEnforced) && + Objects.equals(this.projectId, settingUpsertBody.projectId) && + Objects.equals(this.organizationId, settingUpsertBody.organizationId); + } + + @Override + public int hashCode() { + return Objects.hash(settingName, scope, isEnforced, projectId, organizationId); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SettingUpsertBody {\n"); + sb.append(" settingName: ").append(toIndentedString(settingName)).append("\n"); + sb.append(" scope: ").append(toIndentedString(scope)).append("\n"); + sb.append(" isEnforced: ").append(toIndentedString(isEnforced)).append("\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" organizationId: ").append(toIndentedString(organizationId)).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/SettingUpsertResponse.java b/src/main/java/com/lilt/client/model/SettingUpsertResponse.java new file mode 100644 index 000000000..736e19dc2 --- /dev/null +++ b/src/main/java/com/lilt/client/model/SettingUpsertResponse.java @@ -0,0 +1,140 @@ +/* + * 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 version of the OpenAPI document: v2.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 com.lilt.client.model.Setting; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * Response from upserting a setting + */ +@ApiModel(description = "Response from upserting a setting") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +public class SettingUpsertResponse { + public static final String SERIALIZED_NAME_SCOPED_SETTING = "scopedSetting"; + @SerializedName(SERIALIZED_NAME_SCOPED_SETTING) + private Setting scopedSetting; + + public static final String SERIALIZED_NAME_ACTIVE_SETTINGS = "activeSettings"; + @SerializedName(SERIALIZED_NAME_ACTIVE_SETTINGS) + private Map activeSettings = null; + + + public SettingUpsertResponse scopedSetting(Setting scopedSetting) { + + this.scopedSetting = scopedSetting; + return this; + } + + /** + * Get scopedSetting + * @return scopedSetting + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Setting getScopedSetting() { + return scopedSetting; + } + + + public void setScopedSetting(Setting scopedSetting) { + this.scopedSetting = scopedSetting; + } + + + public SettingUpsertResponse activeSettings(Map activeSettings) { + + this.activeSettings = activeSettings; + return this; + } + + public SettingUpsertResponse putActiveSettingsItem(String key, Setting activeSettingsItem) { + if (this.activeSettings == null) { + this.activeSettings = new HashMap(); + } + this.activeSettings.put(key, activeSettingsItem); + return this; + } + + /** + * A dictionary of configuration settings, keyed by setting name + * @return activeSettings + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "A dictionary of configuration settings, keyed by setting name") + + public Map getActiveSettings() { + return activeSettings; + } + + + public void setActiveSettings(Map activeSettings) { + this.activeSettings = activeSettings; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SettingUpsertResponse settingUpsertResponse = (SettingUpsertResponse) o; + return Objects.equals(this.scopedSetting, settingUpsertResponse.scopedSetting) && + Objects.equals(this.activeSettings, settingUpsertResponse.activeSettings); + } + + @Override + public int hashCode() { + return Objects.hash(scopedSetting, activeSettings); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SettingUpsertResponse {\n"); + sb.append(" scopedSetting: ").append(toIndentedString(scopedSetting)).append("\n"); + sb.append(" activeSettings: ").append(toIndentedString(activeSettings)).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 9fadd7496..1ca061fc6 100644 --- a/src/main/java/com/lilt/client/model/SourceFile.java +++ b/src/main/java/com/lilt/client/model/SourceFile.java @@ -26,12 +26,13 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; +import org.threeten.bp.OffsetDateTime; /** * 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-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class SourceFile { public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -45,10 +46,6 @@ public class SourceFile { @SerializedName(SERIALIZED_NAME_FILE_HASH) private String fileHash; - public static final String SERIALIZED_NAME_EXPORT_URI = "export_uri"; - @SerializedName(SERIALIZED_NAME_EXPORT_URI) - private String exportUri; - public static final String SERIALIZED_NAME_DETECTED_LANG = "detected_lang"; @SerializedName(SERIALIZED_NAME_DETECTED_LANG) private String detectedLang; @@ -67,11 +64,11 @@ public class SourceFile { public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) - private Integer createdAt; + private OffsetDateTime createdAt; public static final String SERIALIZED_NAME_UPDATED_AT = "updated_at"; @SerializedName(SERIALIZED_NAME_UPDATED_AT) - private Integer updatedAt; + private OffsetDateTime updatedAt; public SourceFile id(Integer id) { @@ -143,29 +140,6 @@ public void setFileHash(String fileHash) { } - public SourceFile exportUri(String exportUri) { - - this.exportUri = exportUri; - return this; - } - - /** - * A webhook endpoint that will export the translated document back to the source repository. - * @return exportUri - **/ - @javax.annotation.Nullable - @ApiModelProperty(example = "https://example.com/export", value = "A webhook endpoint that will export the translated document back to the source repository.") - - public String getExportUri() { - return exportUri; - } - - - public void setExportUri(String exportUri) { - this.exportUri = exportUri; - } - - public SourceFile detectedLang(String detectedLang) { this.detectedLang = detectedLang; @@ -266,48 +240,48 @@ public void setLabels(List labels) { } - public SourceFile createdAt(Integer createdAt) { + public SourceFile createdAt(OffsetDateTime createdAt) { this.createdAt = createdAt; return this; } /** - * Time at which the object was created. Measured in seconds since the Unix epoch. + * Time at which the object was created. * @return createdAt **/ @javax.annotation.Nullable - @ApiModelProperty(example = "1489147692", value = "Time at which the object was created. Measured in seconds since the Unix epoch.") + @ApiModelProperty(value = "Time at which the object was created.") - public Integer getCreatedAt() { + public OffsetDateTime getCreatedAt() { return createdAt; } - public void setCreatedAt(Integer createdAt) { + public void setCreatedAt(OffsetDateTime createdAt) { this.createdAt = createdAt; } - public SourceFile updatedAt(Integer updatedAt) { + public SourceFile updatedAt(OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } /** - * Time at which the object was created. Measured in seconds since the Unix epoch. + * Time at which the object was created. * @return updatedAt **/ @javax.annotation.Nullable - @ApiModelProperty(example = "1489147692", value = "Time at which the object was created. Measured in seconds since the Unix epoch.") + @ApiModelProperty(value = "Time at which the object was created.") - public Integer getUpdatedAt() { + public OffsetDateTime getUpdatedAt() { return updatedAt; } - public void setUpdatedAt(Integer updatedAt) { + public void setUpdatedAt(OffsetDateTime updatedAt) { this.updatedAt = updatedAt; } @@ -324,7 +298,6 @@ public boolean equals(Object o) { return Objects.equals(this.id, sourceFile.id) && Objects.equals(this.name, sourceFile.name) && Objects.equals(this.fileHash, sourceFile.fileHash) && - Objects.equals(this.exportUri, sourceFile.exportUri) && Objects.equals(this.detectedLang, sourceFile.detectedLang) && Objects.equals(this.detectedLangConfidence, sourceFile.detectedLangConfidence) && Objects.equals(this.category, sourceFile.category) && @@ -335,7 +308,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(id, name, fileHash, exportUri, detectedLang, detectedLangConfidence, category, labels, createdAt, updatedAt); + return Objects.hash(id, name, fileHash, detectedLang, detectedLangConfidence, category, labels, createdAt, updatedAt); } @Override @@ -345,7 +318,6 @@ public String toString() { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" fileHash: ").append(toIndentedString(fileHash)).append("\n"); - sb.append(" exportUri: ").append(toIndentedString(exportUri)).append("\n"); sb.append(" detectedLang: ").append(toIndentedString(detectedLang)).append("\n"); sb.append(" detectedLangConfidence: ").append(toIndentedString(detectedLangConfidence)).append("\n"); sb.append(" category: ").append(toIndentedString(category)).append("\n"); diff --git a/src/main/java/com/lilt/client/model/TaggedSegment.java b/src/main/java/com/lilt/client/model/TaggedSegment.java index 60fa76a9a..24589c2ef 100644 --- a/src/main/java/com/lilt/client/model/TaggedSegment.java +++ b/src/main/java/com/lilt/client/model/TaggedSegment.java @@ -28,7 +28,7 @@ * A source string with tags automatically projected from source to target. */ @ApiModel(description = "A source string with tags automatically projected from source to target.") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class TaggedSegment { public static final String SERIALIZED_NAME_SOURCE_TAGGED = "source_tagged"; @SerializedName(SERIALIZED_NAME_SOURCE_TAGGED) diff --git a/src/main/java/com/lilt/client/model/TranslateRegisterResponse.java b/src/main/java/com/lilt/client/model/TranslateRegisterResponse.java index c76376df5..a5051ee54 100644 --- a/src/main/java/com/lilt/client/model/TranslateRegisterResponse.java +++ b/src/main/java/com/lilt/client/model/TranslateRegisterResponse.java @@ -27,7 +27,7 @@ /** * TranslateRegisterResponse */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class TranslateRegisterResponse { public static final String SERIALIZED_NAME_SOURCE_HASH = "source_hash"; @SerializedName(SERIALIZED_NAME_SOURCE_HASH) diff --git a/src/main/java/com/lilt/client/model/TranslateSegmentBody.java b/src/main/java/com/lilt/client/model/TranslateSegmentBody.java new file mode 100644 index 000000000..bfff9e187 --- /dev/null +++ b/src/main/java/com/lilt/client/model/TranslateSegmentBody.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. + * + * The version of the OpenAPI document: v2.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; + +/** + * TranslateSegmentBody + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") +public class TranslateSegmentBody { + public static final String SERIALIZED_NAME_SOURCE = "source"; + @SerializedName(SERIALIZED_NAME_SOURCE) + private String source; + + + public TranslateSegmentBody source(String source) { + + this.source = source; + return this; + } + + /** + * A unique Segment identifier. + * @return source + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "A unique Segment identifier.") + + public String getSource() { + return source; + } + + + public void setSource(String source) { + this.source = source; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TranslateSegmentBody translateSegmentBody = (TranslateSegmentBody) o; + return Objects.equals(this.source, translateSegmentBody.source); + } + + @Override + public int hashCode() { + return Objects.hash(source); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TranslateSegmentBody {\n"); + sb.append(" source: ").append(toIndentedString(source)).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/Translation.java b/src/main/java/com/lilt/client/model/Translation.java index 53138d5c9..7bc16e866 100644 --- a/src/main/java/com/lilt/client/model/Translation.java +++ b/src/main/java/com/lilt/client/model/Translation.java @@ -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-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[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 06035fce4..421e6a6ce 100644 --- a/src/main/java/com/lilt/client/model/TranslationInfo.java +++ b/src/main/java/com/lilt/client/model/TranslationInfo.java @@ -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-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[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 fb3ecdd1f..e27f3f507 100644 --- a/src/main/java/com/lilt/client/model/TranslationList.java +++ b/src/main/java/com/lilt/client/model/TranslationList.java @@ -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-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class TranslationList { public static final String SERIALIZED_NAME_UNTOKENIZED_SOURCE = "untokenizedSource"; @SerializedName(SERIALIZED_NAME_UNTOKENIZED_SOURCE) diff --git a/src/main/java/com/lilt/client/model/TranslationMemoryEntry.java b/src/main/java/com/lilt/client/model/TranslationMemoryEntry.java index 445b60f81..3c83afd9b 100644 --- a/src/main/java/com/lilt/client/model/TranslationMemoryEntry.java +++ b/src/main/java/com/lilt/client/model/TranslationMemoryEntry.java @@ -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-03-15T14:22:49.219647-07:00[America/Los_Angeles]") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2021-12-20T00:13:26.792Z[GMT]") public class TranslationMemoryEntry { public static final String SERIALIZED_NAME_SOURCE = "source"; @SerializedName(SERIALIZED_NAME_SOURCE)