diff --git a/Translate/metadata/V3/AdaptiveMt.php b/Translate/metadata/V3/AdaptiveMt.php index 3b461863ad49..3519bbd86b75 100644 Binary files a/Translate/metadata/V3/AdaptiveMt.php and b/Translate/metadata/V3/AdaptiveMt.php differ diff --git a/Translate/metadata/V3/TranslationService.php b/Translate/metadata/V3/TranslationService.php index f27050df40fe..434980c0b702 100644 Binary files a/Translate/metadata/V3/TranslationService.php and b/Translate/metadata/V3/TranslationService.php differ diff --git a/Translate/src/V3/AdaptiveMtTranslateRequest/GlossaryConfig.php b/Translate/src/V3/AdaptiveMtTranslateRequest/GlossaryConfig.php index 1857ea6f63e3..3776f46bf9f3 100644 --- a/Translate/src/V3/AdaptiveMtTranslateRequest/GlossaryConfig.php +++ b/Translate/src/V3/AdaptiveMtTranslateRequest/GlossaryConfig.php @@ -33,6 +33,13 @@ class GlossaryConfig extends \Google\Protobuf\Internal\Message * Generated from protobuf field bool ignore_case = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $ignore_case = false; + /** + * Optional. If set to true, the glossary will be used for contextual + * translation. + * + * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $contextual_translation_enabled = false; /** * Constructor. @@ -48,6 +55,9 @@ class GlossaryConfig extends \Google\Protobuf\Internal\Message * @type bool $ignore_case * Optional. Indicates match is case insensitive. The default value is * `false` if missing. + * @type bool $contextual_translation_enabled + * Optional. If set to true, the glossary will be used for contextual + * translation. * } */ public function __construct($data = NULL) { @@ -115,6 +125,34 @@ public function setIgnoreCase($var) return $this; } + /** + * Optional. If set to true, the glossary will be used for contextual + * translation. + * + * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getContextualTranslationEnabled() + { + return $this->contextual_translation_enabled; + } + + /** + * Optional. If set to true, the glossary will be used for contextual + * translation. + * + * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setContextualTranslationEnabled($var) + { + GPBUtil::checkBool($var); + $this->contextual_translation_enabled = $var; + + return $this; + } + } // Adding a class alias for backwards compatibility with the previous class name. diff --git a/Translate/src/V3/Client/TranslationServiceClient.php b/Translate/src/V3/Client/TranslationServiceClient.php index 07a9091209c8..42c3d39832d8 100644 --- a/Translate/src/V3/Client/TranslationServiceClient.php +++ b/Translate/src/V3/Client/TranslationServiceClient.php @@ -100,44 +100,44 @@ * name, and additionally a parseName method to extract the individual identifiers * contained within formatted names that are returned by the API. * - * @method PromiseInterface adaptiveMtTranslateAsync(AdaptiveMtTranslateRequest $request, array $optionalArgs = []) - * @method PromiseInterface batchTranslateDocumentAsync(BatchTranslateDocumentRequest $request, array $optionalArgs = []) - * @method PromiseInterface batchTranslateTextAsync(BatchTranslateTextRequest $request, array $optionalArgs = []) - * @method PromiseInterface createAdaptiveMtDatasetAsync(CreateAdaptiveMtDatasetRequest $request, array $optionalArgs = []) - * @method PromiseInterface createDatasetAsync(CreateDatasetRequest $request, array $optionalArgs = []) - * @method PromiseInterface createGlossaryAsync(CreateGlossaryRequest $request, array $optionalArgs = []) - * @method PromiseInterface createGlossaryEntryAsync(CreateGlossaryEntryRequest $request, array $optionalArgs = []) - * @method PromiseInterface createModelAsync(CreateModelRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAdaptiveMtDatasetAsync(DeleteAdaptiveMtDatasetRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAdaptiveMtFileAsync(DeleteAdaptiveMtFileRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDatasetAsync(DeleteDatasetRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteGlossaryAsync(DeleteGlossaryRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteGlossaryEntryAsync(DeleteGlossaryEntryRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteModelAsync(DeleteModelRequest $request, array $optionalArgs = []) - * @method PromiseInterface detectLanguageAsync(DetectLanguageRequest $request, array $optionalArgs = []) - * @method PromiseInterface exportDataAsync(ExportDataRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAdaptiveMtDatasetAsync(GetAdaptiveMtDatasetRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAdaptiveMtFileAsync(GetAdaptiveMtFileRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDatasetAsync(GetDatasetRequest $request, array $optionalArgs = []) - * @method PromiseInterface getGlossaryAsync(GetGlossaryRequest $request, array $optionalArgs = []) - * @method PromiseInterface getGlossaryEntryAsync(GetGlossaryEntryRequest $request, array $optionalArgs = []) - * @method PromiseInterface getModelAsync(GetModelRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSupportedLanguagesAsync(GetSupportedLanguagesRequest $request, array $optionalArgs = []) - * @method PromiseInterface importAdaptiveMtFileAsync(ImportAdaptiveMtFileRequest $request, array $optionalArgs = []) - * @method PromiseInterface importDataAsync(ImportDataRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAdaptiveMtDatasetsAsync(ListAdaptiveMtDatasetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAdaptiveMtFilesAsync(ListAdaptiveMtFilesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAdaptiveMtSentencesAsync(ListAdaptiveMtSentencesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDatasetsAsync(ListDatasetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listExamplesAsync(ListExamplesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listGlossariesAsync(ListGlossariesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listGlossaryEntriesAsync(ListGlossaryEntriesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listModelsAsync(ListModelsRequest $request, array $optionalArgs = []) - * @method PromiseInterface romanizeTextAsync(RomanizeTextRequest $request, array $optionalArgs = []) - * @method PromiseInterface translateDocumentAsync(TranslateDocumentRequest $request, array $optionalArgs = []) - * @method PromiseInterface translateTextAsync(TranslateTextRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateGlossaryAsync(UpdateGlossaryRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateGlossaryEntryAsync(UpdateGlossaryEntryRequest $request, array $optionalArgs = []) + * @method PromiseInterface adaptiveMtTranslateAsync(AdaptiveMtTranslateRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchTranslateDocumentAsync(BatchTranslateDocumentRequest $request, array $optionalArgs = []) + * @method PromiseInterface batchTranslateTextAsync(BatchTranslateTextRequest $request, array $optionalArgs = []) + * @method PromiseInterface createAdaptiveMtDatasetAsync(CreateAdaptiveMtDatasetRequest $request, array $optionalArgs = []) + * @method PromiseInterface createDatasetAsync(CreateDatasetRequest $request, array $optionalArgs = []) + * @method PromiseInterface createGlossaryAsync(CreateGlossaryRequest $request, array $optionalArgs = []) + * @method PromiseInterface createGlossaryEntryAsync(CreateGlossaryEntryRequest $request, array $optionalArgs = []) + * @method PromiseInterface createModelAsync(CreateModelRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAdaptiveMtDatasetAsync(DeleteAdaptiveMtDatasetRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAdaptiveMtFileAsync(DeleteAdaptiveMtFileRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDatasetAsync(DeleteDatasetRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteGlossaryAsync(DeleteGlossaryRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteGlossaryEntryAsync(DeleteGlossaryEntryRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteModelAsync(DeleteModelRequest $request, array $optionalArgs = []) + * @method PromiseInterface detectLanguageAsync(DetectLanguageRequest $request, array $optionalArgs = []) + * @method PromiseInterface exportDataAsync(ExportDataRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAdaptiveMtDatasetAsync(GetAdaptiveMtDatasetRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAdaptiveMtFileAsync(GetAdaptiveMtFileRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDatasetAsync(GetDatasetRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGlossaryAsync(GetGlossaryRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGlossaryEntryAsync(GetGlossaryEntryRequest $request, array $optionalArgs = []) + * @method PromiseInterface getModelAsync(GetModelRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSupportedLanguagesAsync(GetSupportedLanguagesRequest $request, array $optionalArgs = []) + * @method PromiseInterface importAdaptiveMtFileAsync(ImportAdaptiveMtFileRequest $request, array $optionalArgs = []) + * @method PromiseInterface importDataAsync(ImportDataRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAdaptiveMtDatasetsAsync(ListAdaptiveMtDatasetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAdaptiveMtFilesAsync(ListAdaptiveMtFilesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAdaptiveMtSentencesAsync(ListAdaptiveMtSentencesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDatasetsAsync(ListDatasetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listExamplesAsync(ListExamplesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listGlossariesAsync(ListGlossariesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listGlossaryEntriesAsync(ListGlossaryEntriesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listModelsAsync(ListModelsRequest $request, array $optionalArgs = []) + * @method PromiseInterface romanizeTextAsync(RomanizeTextRequest $request, array $optionalArgs = []) + * @method PromiseInterface translateDocumentAsync(TranslateDocumentRequest $request, array $optionalArgs = []) + * @method PromiseInterface translateTextAsync(TranslateTextRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateGlossaryAsync(UpdateGlossaryRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateGlossaryEntryAsync(UpdateGlossaryEntryRequest $request, array $optionalArgs = []) */ final class TranslationServiceClient { diff --git a/Translate/src/V3/TranslateTextGlossaryConfig.php b/Translate/src/V3/TranslateTextGlossaryConfig.php index f99bf2b04950..2edd102cf343 100644 --- a/Translate/src/V3/TranslateTextGlossaryConfig.php +++ b/Translate/src/V3/TranslateTextGlossaryConfig.php @@ -32,6 +32,13 @@ class TranslateTextGlossaryConfig extends \Google\Protobuf\Internal\Message * Generated from protobuf field bool ignore_case = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private $ignore_case = false; + /** + * Optional. If set to true, the glossary will be used for contextual + * translation. + * + * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $contextual_translation_enabled = false; /** * Constructor. @@ -47,6 +54,9 @@ class TranslateTextGlossaryConfig extends \Google\Protobuf\Internal\Message * @type bool $ignore_case * Optional. Indicates match is case insensitive. The default value is `false` * if missing. + * @type bool $contextual_translation_enabled + * Optional. If set to true, the glossary will be used for contextual + * translation. * } */ public function __construct($data = NULL) { @@ -114,5 +124,33 @@ public function setIgnoreCase($var) return $this; } + /** + * Optional. If set to true, the glossary will be used for contextual + * translation. + * + * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getContextualTranslationEnabled() + { + return $this->contextual_translation_enabled; + } + + /** + * Optional. If set to true, the glossary will be used for contextual + * translation. + * + * Generated from protobuf field bool contextual_translation_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setContextualTranslationEnabled($var) + { + GPBUtil::checkBool($var); + $this->contextual_translation_enabled = $var; + + return $this; + } + }