Skip to content

Commit b1f9213

Browse files
feat: [translate] Add Adaptive MT API (#10157)
* feat: Add Adaptive MT API docs: Fixes a typo in docs PiperOrigin-RevId: 591019768 Source-Link: googleapis/googleapis@cf5b5fc Source-Link: https://github.com/googleapis/googleapis-gen/commit/53c2d236a1b6aaae40a414efcea119d925518335 Copy-Tag: eyJwIjoiamF2YS10cmFuc2xhdGUvLk93bEJvdC55YW1sIiwiaCI6IjUzYzJkMjM2YTFiNmFhYWU0MGE0MTRlZmNlYTExOWQ5MjU1MTgzMzUifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 2e1425f commit b1f9213

File tree

110 files changed

+35718
-361
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+35718
-361
lines changed

java-translate/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
272272
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
273273
[stability-image]: https://img.shields.io/badge/stability-stable-green
274274
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-translate.svg
275-
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-translate/2.30.0
275+
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-translate/2.32.0
276276
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
277277
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
278278
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles

java-translate/google-cloud-translate/src/main/java/com/google/cloud/translate/v3/TranslationServiceClient.java

Lines changed: 1646 additions & 0 deletions
Large diffs are not rendered by default.

java-translate/google-cloud-translate/src/main/java/com/google/cloud/translate/v3/TranslationServiceSettings.java

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616

1717
package com.google.cloud.translate.v3;
1818

19+
import static com.google.cloud.translate.v3.TranslationServiceClient.ListAdaptiveMtDatasetsPagedResponse;
20+
import static com.google.cloud.translate.v3.TranslationServiceClient.ListAdaptiveMtFilesPagedResponse;
21+
import static com.google.cloud.translate.v3.TranslationServiceClient.ListAdaptiveMtSentencesPagedResponse;
1922
import static com.google.cloud.translate.v3.TranslationServiceClient.ListGlossariesPagedResponse;
2023

2124
import com.google.api.core.ApiFunction;
@@ -33,6 +36,7 @@
3336
import com.google.api.gax.rpc.UnaryCallSettings;
3437
import com.google.cloud.translate.v3.stub.TranslationServiceStubSettings;
3538
import com.google.longrunning.Operation;
39+
import com.google.protobuf.Empty;
3640
import java.io.IOException;
3741
import java.util.List;
3842
import javax.annotation.Generated;
@@ -164,6 +168,71 @@ public UnaryCallSettings<DeleteGlossaryRequest, Operation> deleteGlossarySetting
164168
return ((TranslationServiceStubSettings) getStubSettings()).deleteGlossaryOperationSettings();
165169
}
166170

171+
/** Returns the object with the settings used for calls to createAdaptiveMtDataset. */
172+
public UnaryCallSettings<CreateAdaptiveMtDatasetRequest, AdaptiveMtDataset>
173+
createAdaptiveMtDatasetSettings() {
174+
return ((TranslationServiceStubSettings) getStubSettings()).createAdaptiveMtDatasetSettings();
175+
}
176+
177+
/** Returns the object with the settings used for calls to deleteAdaptiveMtDataset. */
178+
public UnaryCallSettings<DeleteAdaptiveMtDatasetRequest, Empty>
179+
deleteAdaptiveMtDatasetSettings() {
180+
return ((TranslationServiceStubSettings) getStubSettings()).deleteAdaptiveMtDatasetSettings();
181+
}
182+
183+
/** Returns the object with the settings used for calls to getAdaptiveMtDataset. */
184+
public UnaryCallSettings<GetAdaptiveMtDatasetRequest, AdaptiveMtDataset>
185+
getAdaptiveMtDatasetSettings() {
186+
return ((TranslationServiceStubSettings) getStubSettings()).getAdaptiveMtDatasetSettings();
187+
}
188+
189+
/** Returns the object with the settings used for calls to listAdaptiveMtDatasets. */
190+
public PagedCallSettings<
191+
ListAdaptiveMtDatasetsRequest,
192+
ListAdaptiveMtDatasetsResponse,
193+
ListAdaptiveMtDatasetsPagedResponse>
194+
listAdaptiveMtDatasetsSettings() {
195+
return ((TranslationServiceStubSettings) getStubSettings()).listAdaptiveMtDatasetsSettings();
196+
}
197+
198+
/** Returns the object with the settings used for calls to adaptiveMtTranslate. */
199+
public UnaryCallSettings<AdaptiveMtTranslateRequest, AdaptiveMtTranslateResponse>
200+
adaptiveMtTranslateSettings() {
201+
return ((TranslationServiceStubSettings) getStubSettings()).adaptiveMtTranslateSettings();
202+
}
203+
204+
/** Returns the object with the settings used for calls to getAdaptiveMtFile. */
205+
public UnaryCallSettings<GetAdaptiveMtFileRequest, AdaptiveMtFile> getAdaptiveMtFileSettings() {
206+
return ((TranslationServiceStubSettings) getStubSettings()).getAdaptiveMtFileSettings();
207+
}
208+
209+
/** Returns the object with the settings used for calls to deleteAdaptiveMtFile. */
210+
public UnaryCallSettings<DeleteAdaptiveMtFileRequest, Empty> deleteAdaptiveMtFileSettings() {
211+
return ((TranslationServiceStubSettings) getStubSettings()).deleteAdaptiveMtFileSettings();
212+
}
213+
214+
/** Returns the object with the settings used for calls to importAdaptiveMtFile. */
215+
public UnaryCallSettings<ImportAdaptiveMtFileRequest, ImportAdaptiveMtFileResponse>
216+
importAdaptiveMtFileSettings() {
217+
return ((TranslationServiceStubSettings) getStubSettings()).importAdaptiveMtFileSettings();
218+
}
219+
220+
/** Returns the object with the settings used for calls to listAdaptiveMtFiles. */
221+
public PagedCallSettings<
222+
ListAdaptiveMtFilesRequest, ListAdaptiveMtFilesResponse, ListAdaptiveMtFilesPagedResponse>
223+
listAdaptiveMtFilesSettings() {
224+
return ((TranslationServiceStubSettings) getStubSettings()).listAdaptiveMtFilesSettings();
225+
}
226+
227+
/** Returns the object with the settings used for calls to listAdaptiveMtSentences. */
228+
public PagedCallSettings<
229+
ListAdaptiveMtSentencesRequest,
230+
ListAdaptiveMtSentencesResponse,
231+
ListAdaptiveMtSentencesPagedResponse>
232+
listAdaptiveMtSentencesSettings() {
233+
return ((TranslationServiceStubSettings) getStubSettings()).listAdaptiveMtSentencesSettings();
234+
}
235+
167236
public static final TranslationServiceSettings create(TranslationServiceStubSettings stub)
168237
throws IOException {
169238
return new TranslationServiceSettings.Builder(stub.toBuilder()).build();
@@ -366,6 +435,75 @@ public UnaryCallSettings.Builder<DeleteGlossaryRequest, Operation> deleteGlossar
366435
return getStubSettingsBuilder().deleteGlossaryOperationSettings();
367436
}
368437

438+
/** Returns the builder for the settings used for calls to createAdaptiveMtDataset. */
439+
public UnaryCallSettings.Builder<CreateAdaptiveMtDatasetRequest, AdaptiveMtDataset>
440+
createAdaptiveMtDatasetSettings() {
441+
return getStubSettingsBuilder().createAdaptiveMtDatasetSettings();
442+
}
443+
444+
/** Returns the builder for the settings used for calls to deleteAdaptiveMtDataset. */
445+
public UnaryCallSettings.Builder<DeleteAdaptiveMtDatasetRequest, Empty>
446+
deleteAdaptiveMtDatasetSettings() {
447+
return getStubSettingsBuilder().deleteAdaptiveMtDatasetSettings();
448+
}
449+
450+
/** Returns the builder for the settings used for calls to getAdaptiveMtDataset. */
451+
public UnaryCallSettings.Builder<GetAdaptiveMtDatasetRequest, AdaptiveMtDataset>
452+
getAdaptiveMtDatasetSettings() {
453+
return getStubSettingsBuilder().getAdaptiveMtDatasetSettings();
454+
}
455+
456+
/** Returns the builder for the settings used for calls to listAdaptiveMtDatasets. */
457+
public PagedCallSettings.Builder<
458+
ListAdaptiveMtDatasetsRequest,
459+
ListAdaptiveMtDatasetsResponse,
460+
ListAdaptiveMtDatasetsPagedResponse>
461+
listAdaptiveMtDatasetsSettings() {
462+
return getStubSettingsBuilder().listAdaptiveMtDatasetsSettings();
463+
}
464+
465+
/** Returns the builder for the settings used for calls to adaptiveMtTranslate. */
466+
public UnaryCallSettings.Builder<AdaptiveMtTranslateRequest, AdaptiveMtTranslateResponse>
467+
adaptiveMtTranslateSettings() {
468+
return getStubSettingsBuilder().adaptiveMtTranslateSettings();
469+
}
470+
471+
/** Returns the builder for the settings used for calls to getAdaptiveMtFile. */
472+
public UnaryCallSettings.Builder<GetAdaptiveMtFileRequest, AdaptiveMtFile>
473+
getAdaptiveMtFileSettings() {
474+
return getStubSettingsBuilder().getAdaptiveMtFileSettings();
475+
}
476+
477+
/** Returns the builder for the settings used for calls to deleteAdaptiveMtFile. */
478+
public UnaryCallSettings.Builder<DeleteAdaptiveMtFileRequest, Empty>
479+
deleteAdaptiveMtFileSettings() {
480+
return getStubSettingsBuilder().deleteAdaptiveMtFileSettings();
481+
}
482+
483+
/** Returns the builder for the settings used for calls to importAdaptiveMtFile. */
484+
public UnaryCallSettings.Builder<ImportAdaptiveMtFileRequest, ImportAdaptiveMtFileResponse>
485+
importAdaptiveMtFileSettings() {
486+
return getStubSettingsBuilder().importAdaptiveMtFileSettings();
487+
}
488+
489+
/** Returns the builder for the settings used for calls to listAdaptiveMtFiles. */
490+
public PagedCallSettings.Builder<
491+
ListAdaptiveMtFilesRequest,
492+
ListAdaptiveMtFilesResponse,
493+
ListAdaptiveMtFilesPagedResponse>
494+
listAdaptiveMtFilesSettings() {
495+
return getStubSettingsBuilder().listAdaptiveMtFilesSettings();
496+
}
497+
498+
/** Returns the builder for the settings used for calls to listAdaptiveMtSentences. */
499+
public PagedCallSettings.Builder<
500+
ListAdaptiveMtSentencesRequest,
501+
ListAdaptiveMtSentencesResponse,
502+
ListAdaptiveMtSentencesPagedResponse>
503+
listAdaptiveMtSentencesSettings() {
504+
return getStubSettingsBuilder().listAdaptiveMtSentencesSettings();
505+
}
506+
369507
@Override
370508
public TranslationServiceSettings build() throws IOException {
371509
return new TranslationServiceSettings(this);

java-translate/google-cloud-translate/src/main/java/com/google/cloud/translate/v3/gapic_metadata.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,57 @@
1010
"grpc": {
1111
"libraryClient": "TranslationServiceClient",
1212
"rpcs": {
13+
"AdaptiveMtTranslate": {
14+
"methods": ["adaptiveMtTranslate", "adaptiveMtTranslate", "adaptiveMtTranslate", "adaptiveMtTranslateCallable"]
15+
},
1316
"BatchTranslateDocument": {
1417
"methods": ["batchTranslateDocumentAsync", "batchTranslateDocumentAsync", "batchTranslateDocumentAsync", "batchTranslateDocumentOperationCallable", "batchTranslateDocumentCallable"]
1518
},
1619
"BatchTranslateText": {
1720
"methods": ["batchTranslateTextAsync", "batchTranslateTextOperationCallable", "batchTranslateTextCallable"]
1821
},
22+
"CreateAdaptiveMtDataset": {
23+
"methods": ["createAdaptiveMtDataset", "createAdaptiveMtDataset", "createAdaptiveMtDataset", "createAdaptiveMtDatasetCallable"]
24+
},
1925
"CreateGlossary": {
2026
"methods": ["createGlossaryAsync", "createGlossaryAsync", "createGlossaryAsync", "createGlossaryOperationCallable", "createGlossaryCallable"]
2127
},
28+
"DeleteAdaptiveMtDataset": {
29+
"methods": ["deleteAdaptiveMtDataset", "deleteAdaptiveMtDataset", "deleteAdaptiveMtDataset", "deleteAdaptiveMtDatasetCallable"]
30+
},
31+
"DeleteAdaptiveMtFile": {
32+
"methods": ["deleteAdaptiveMtFile", "deleteAdaptiveMtFile", "deleteAdaptiveMtFile", "deleteAdaptiveMtFileCallable"]
33+
},
2234
"DeleteGlossary": {
2335
"methods": ["deleteGlossaryAsync", "deleteGlossaryAsync", "deleteGlossaryAsync", "deleteGlossaryOperationCallable", "deleteGlossaryCallable"]
2436
},
2537
"DetectLanguage": {
2638
"methods": ["detectLanguage", "detectLanguage", "detectLanguage", "detectLanguageCallable"]
2739
},
40+
"GetAdaptiveMtDataset": {
41+
"methods": ["getAdaptiveMtDataset", "getAdaptiveMtDataset", "getAdaptiveMtDataset", "getAdaptiveMtDatasetCallable"]
42+
},
43+
"GetAdaptiveMtFile": {
44+
"methods": ["getAdaptiveMtFile", "getAdaptiveMtFile", "getAdaptiveMtFile", "getAdaptiveMtFileCallable"]
45+
},
2846
"GetGlossary": {
2947
"methods": ["getGlossary", "getGlossary", "getGlossary", "getGlossaryCallable"]
3048
},
3149
"GetSupportedLanguages": {
3250
"methods": ["getSupportedLanguages", "getSupportedLanguages", "getSupportedLanguages", "getSupportedLanguagesCallable"]
3351
},
52+
"ImportAdaptiveMtFile": {
53+
"methods": ["importAdaptiveMtFile", "importAdaptiveMtFile", "importAdaptiveMtFile", "importAdaptiveMtFileCallable"]
54+
},
55+
"ListAdaptiveMtDatasets": {
56+
"methods": ["listAdaptiveMtDatasets", "listAdaptiveMtDatasets", "listAdaptiveMtDatasets", "listAdaptiveMtDatasetsPagedCallable", "listAdaptiveMtDatasetsCallable"]
57+
},
58+
"ListAdaptiveMtFiles": {
59+
"methods": ["listAdaptiveMtFiles", "listAdaptiveMtFiles", "listAdaptiveMtFiles", "listAdaptiveMtFilesPagedCallable", "listAdaptiveMtFilesCallable"]
60+
},
61+
"ListAdaptiveMtSentences": {
62+
"methods": ["listAdaptiveMtSentences", "listAdaptiveMtSentences", "listAdaptiveMtSentences", "listAdaptiveMtSentencesPagedCallable", "listAdaptiveMtSentencesCallable"]
63+
},
3464
"ListGlossaries": {
3565
"methods": ["listGlossaries", "listGlossaries", "listGlossaries", "listGlossariesPagedCallable", "listGlossariesCallable"]
3666
},

0 commit comments

Comments
 (0)