Skip to content

Commit

Permalink
feat: [translate] Add Adaptive MT API (#10157)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Jan 2, 2024
1 parent 2e1425f commit b1f9213
Show file tree
Hide file tree
Showing 110 changed files with 35,718 additions and 361 deletions.
2 changes: 1 addition & 1 deletion java-translate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-translate.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-translate/2.30.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-translate/2.32.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

package com.google.cloud.translate.v3;

import static com.google.cloud.translate.v3.TranslationServiceClient.ListAdaptiveMtDatasetsPagedResponse;
import static com.google.cloud.translate.v3.TranslationServiceClient.ListAdaptiveMtFilesPagedResponse;
import static com.google.cloud.translate.v3.TranslationServiceClient.ListAdaptiveMtSentencesPagedResponse;
import static com.google.cloud.translate.v3.TranslationServiceClient.ListGlossariesPagedResponse;

import com.google.api.core.ApiFunction;
Expand All @@ -33,6 +36,7 @@
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.cloud.translate.v3.stub.TranslationServiceStubSettings;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import java.io.IOException;
import java.util.List;
import javax.annotation.Generated;
Expand Down Expand Up @@ -164,6 +168,71 @@ public UnaryCallSettings<DeleteGlossaryRequest, Operation> deleteGlossarySetting
return ((TranslationServiceStubSettings) getStubSettings()).deleteGlossaryOperationSettings();
}

/** Returns the object with the settings used for calls to createAdaptiveMtDataset. */
public UnaryCallSettings<CreateAdaptiveMtDatasetRequest, AdaptiveMtDataset>
createAdaptiveMtDatasetSettings() {
return ((TranslationServiceStubSettings) getStubSettings()).createAdaptiveMtDatasetSettings();
}

/** Returns the object with the settings used for calls to deleteAdaptiveMtDataset. */
public UnaryCallSettings<DeleteAdaptiveMtDatasetRequest, Empty>
deleteAdaptiveMtDatasetSettings() {
return ((TranslationServiceStubSettings) getStubSettings()).deleteAdaptiveMtDatasetSettings();
}

/** Returns the object with the settings used for calls to getAdaptiveMtDataset. */
public UnaryCallSettings<GetAdaptiveMtDatasetRequest, AdaptiveMtDataset>
getAdaptiveMtDatasetSettings() {
return ((TranslationServiceStubSettings) getStubSettings()).getAdaptiveMtDatasetSettings();
}

/** Returns the object with the settings used for calls to listAdaptiveMtDatasets. */
public PagedCallSettings<
ListAdaptiveMtDatasetsRequest,
ListAdaptiveMtDatasetsResponse,
ListAdaptiveMtDatasetsPagedResponse>
listAdaptiveMtDatasetsSettings() {
return ((TranslationServiceStubSettings) getStubSettings()).listAdaptiveMtDatasetsSettings();
}

/** Returns the object with the settings used for calls to adaptiveMtTranslate. */
public UnaryCallSettings<AdaptiveMtTranslateRequest, AdaptiveMtTranslateResponse>
adaptiveMtTranslateSettings() {
return ((TranslationServiceStubSettings) getStubSettings()).adaptiveMtTranslateSettings();
}

/** Returns the object with the settings used for calls to getAdaptiveMtFile. */
public UnaryCallSettings<GetAdaptiveMtFileRequest, AdaptiveMtFile> getAdaptiveMtFileSettings() {
return ((TranslationServiceStubSettings) getStubSettings()).getAdaptiveMtFileSettings();
}

/** Returns the object with the settings used for calls to deleteAdaptiveMtFile. */
public UnaryCallSettings<DeleteAdaptiveMtFileRequest, Empty> deleteAdaptiveMtFileSettings() {
return ((TranslationServiceStubSettings) getStubSettings()).deleteAdaptiveMtFileSettings();
}

/** Returns the object with the settings used for calls to importAdaptiveMtFile. */
public UnaryCallSettings<ImportAdaptiveMtFileRequest, ImportAdaptiveMtFileResponse>
importAdaptiveMtFileSettings() {
return ((TranslationServiceStubSettings) getStubSettings()).importAdaptiveMtFileSettings();
}

/** Returns the object with the settings used for calls to listAdaptiveMtFiles. */
public PagedCallSettings<
ListAdaptiveMtFilesRequest, ListAdaptiveMtFilesResponse, ListAdaptiveMtFilesPagedResponse>
listAdaptiveMtFilesSettings() {
return ((TranslationServiceStubSettings) getStubSettings()).listAdaptiveMtFilesSettings();
}

/** Returns the object with the settings used for calls to listAdaptiveMtSentences. */
public PagedCallSettings<
ListAdaptiveMtSentencesRequest,
ListAdaptiveMtSentencesResponse,
ListAdaptiveMtSentencesPagedResponse>
listAdaptiveMtSentencesSettings() {
return ((TranslationServiceStubSettings) getStubSettings()).listAdaptiveMtSentencesSettings();
}

public static final TranslationServiceSettings create(TranslationServiceStubSettings stub)
throws IOException {
return new TranslationServiceSettings.Builder(stub.toBuilder()).build();
Expand Down Expand Up @@ -366,6 +435,75 @@ public UnaryCallSettings.Builder<DeleteGlossaryRequest, Operation> deleteGlossar
return getStubSettingsBuilder().deleteGlossaryOperationSettings();
}

/** Returns the builder for the settings used for calls to createAdaptiveMtDataset. */
public UnaryCallSettings.Builder<CreateAdaptiveMtDatasetRequest, AdaptiveMtDataset>
createAdaptiveMtDatasetSettings() {
return getStubSettingsBuilder().createAdaptiveMtDatasetSettings();
}

/** Returns the builder for the settings used for calls to deleteAdaptiveMtDataset. */
public UnaryCallSettings.Builder<DeleteAdaptiveMtDatasetRequest, Empty>
deleteAdaptiveMtDatasetSettings() {
return getStubSettingsBuilder().deleteAdaptiveMtDatasetSettings();
}

/** Returns the builder for the settings used for calls to getAdaptiveMtDataset. */
public UnaryCallSettings.Builder<GetAdaptiveMtDatasetRequest, AdaptiveMtDataset>
getAdaptiveMtDatasetSettings() {
return getStubSettingsBuilder().getAdaptiveMtDatasetSettings();
}

/** Returns the builder for the settings used for calls to listAdaptiveMtDatasets. */
public PagedCallSettings.Builder<
ListAdaptiveMtDatasetsRequest,
ListAdaptiveMtDatasetsResponse,
ListAdaptiveMtDatasetsPagedResponse>
listAdaptiveMtDatasetsSettings() {
return getStubSettingsBuilder().listAdaptiveMtDatasetsSettings();
}

/** Returns the builder for the settings used for calls to adaptiveMtTranslate. */
public UnaryCallSettings.Builder<AdaptiveMtTranslateRequest, AdaptiveMtTranslateResponse>
adaptiveMtTranslateSettings() {
return getStubSettingsBuilder().adaptiveMtTranslateSettings();
}

/** Returns the builder for the settings used for calls to getAdaptiveMtFile. */
public UnaryCallSettings.Builder<GetAdaptiveMtFileRequest, AdaptiveMtFile>
getAdaptiveMtFileSettings() {
return getStubSettingsBuilder().getAdaptiveMtFileSettings();
}

/** Returns the builder for the settings used for calls to deleteAdaptiveMtFile. */
public UnaryCallSettings.Builder<DeleteAdaptiveMtFileRequest, Empty>
deleteAdaptiveMtFileSettings() {
return getStubSettingsBuilder().deleteAdaptiveMtFileSettings();
}

/** Returns the builder for the settings used for calls to importAdaptiveMtFile. */
public UnaryCallSettings.Builder<ImportAdaptiveMtFileRequest, ImportAdaptiveMtFileResponse>
importAdaptiveMtFileSettings() {
return getStubSettingsBuilder().importAdaptiveMtFileSettings();
}

/** Returns the builder for the settings used for calls to listAdaptiveMtFiles. */
public PagedCallSettings.Builder<
ListAdaptiveMtFilesRequest,
ListAdaptiveMtFilesResponse,
ListAdaptiveMtFilesPagedResponse>
listAdaptiveMtFilesSettings() {
return getStubSettingsBuilder().listAdaptiveMtFilesSettings();
}

/** Returns the builder for the settings used for calls to listAdaptiveMtSentences. */
public PagedCallSettings.Builder<
ListAdaptiveMtSentencesRequest,
ListAdaptiveMtSentencesResponse,
ListAdaptiveMtSentencesPagedResponse>
listAdaptiveMtSentencesSettings() {
return getStubSettingsBuilder().listAdaptiveMtSentencesSettings();
}

@Override
public TranslationServiceSettings build() throws IOException {
return new TranslationServiceSettings(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,57 @@
"grpc": {
"libraryClient": "TranslationServiceClient",
"rpcs": {
"AdaptiveMtTranslate": {
"methods": ["adaptiveMtTranslate", "adaptiveMtTranslate", "adaptiveMtTranslate", "adaptiveMtTranslateCallable"]
},
"BatchTranslateDocument": {
"methods": ["batchTranslateDocumentAsync", "batchTranslateDocumentAsync", "batchTranslateDocumentAsync", "batchTranslateDocumentOperationCallable", "batchTranslateDocumentCallable"]
},
"BatchTranslateText": {
"methods": ["batchTranslateTextAsync", "batchTranslateTextOperationCallable", "batchTranslateTextCallable"]
},
"CreateAdaptiveMtDataset": {
"methods": ["createAdaptiveMtDataset", "createAdaptiveMtDataset", "createAdaptiveMtDataset", "createAdaptiveMtDatasetCallable"]
},
"CreateGlossary": {
"methods": ["createGlossaryAsync", "createGlossaryAsync", "createGlossaryAsync", "createGlossaryOperationCallable", "createGlossaryCallable"]
},
"DeleteAdaptiveMtDataset": {
"methods": ["deleteAdaptiveMtDataset", "deleteAdaptiveMtDataset", "deleteAdaptiveMtDataset", "deleteAdaptiveMtDatasetCallable"]
},
"DeleteAdaptiveMtFile": {
"methods": ["deleteAdaptiveMtFile", "deleteAdaptiveMtFile", "deleteAdaptiveMtFile", "deleteAdaptiveMtFileCallable"]
},
"DeleteGlossary": {
"methods": ["deleteGlossaryAsync", "deleteGlossaryAsync", "deleteGlossaryAsync", "deleteGlossaryOperationCallable", "deleteGlossaryCallable"]
},
"DetectLanguage": {
"methods": ["detectLanguage", "detectLanguage", "detectLanguage", "detectLanguageCallable"]
},
"GetAdaptiveMtDataset": {
"methods": ["getAdaptiveMtDataset", "getAdaptiveMtDataset", "getAdaptiveMtDataset", "getAdaptiveMtDatasetCallable"]
},
"GetAdaptiveMtFile": {
"methods": ["getAdaptiveMtFile", "getAdaptiveMtFile", "getAdaptiveMtFile", "getAdaptiveMtFileCallable"]
},
"GetGlossary": {
"methods": ["getGlossary", "getGlossary", "getGlossary", "getGlossaryCallable"]
},
"GetSupportedLanguages": {
"methods": ["getSupportedLanguages", "getSupportedLanguages", "getSupportedLanguages", "getSupportedLanguagesCallable"]
},
"ImportAdaptiveMtFile": {
"methods": ["importAdaptiveMtFile", "importAdaptiveMtFile", "importAdaptiveMtFile", "importAdaptiveMtFileCallable"]
},
"ListAdaptiveMtDatasets": {
"methods": ["listAdaptiveMtDatasets", "listAdaptiveMtDatasets", "listAdaptiveMtDatasets", "listAdaptiveMtDatasetsPagedCallable", "listAdaptiveMtDatasetsCallable"]
},
"ListAdaptiveMtFiles": {
"methods": ["listAdaptiveMtFiles", "listAdaptiveMtFiles", "listAdaptiveMtFiles", "listAdaptiveMtFilesPagedCallable", "listAdaptiveMtFilesCallable"]
},
"ListAdaptiveMtSentences": {
"methods": ["listAdaptiveMtSentences", "listAdaptiveMtSentences", "listAdaptiveMtSentences", "listAdaptiveMtSentencesPagedCallable", "listAdaptiveMtSentencesCallable"]
},
"ListGlossaries": {
"methods": ["listGlossaries", "listGlossaries", "listGlossaries", "listGlossariesPagedCallable", "listGlossariesCallable"]
},
Expand Down
Loading

0 comments on commit b1f9213

Please sign in to comment.