diff --git a/protos/google/cloud/translate/v3beta1/translation_service.proto b/protos/google/cloud/translate/v3beta1/translation_service.proto index 6c10de0f..878af796 100644 --- a/protos/google/cloud/translate/v3beta1/translation_service.proto +++ b/protos/google/cloud/translate/v3beta1/translation_service.proto @@ -239,14 +239,13 @@ message TranslateTextRequest { // // - General (built-in) models: // `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - // `projects/{project-number-or-id}/locations/{location-id}/models/general/base` // // // For global (non-regionalized) requests, use `location-id` `global`. // For example, // `projects/{project-number-or-id}/locations/global/models/general/nmt`. // - // If missing, the system decides which google base model to use. + // If not provided, the default Google model (NMT) will be used string model = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. Glossary to be applied. The glossary must be @@ -283,6 +282,8 @@ message TranslateTextResponse { // A single translation response. message Translation { // Text translated into the target language. + // If an error occurs during translation, this field might be excluded from + // the response. string translated_text = 1; // Only present when `model` is present in the request. @@ -316,7 +317,7 @@ message DetectLanguageRequest { // For global calls, use `projects/{project-number-or-id}/locations/global` or // `projects/{project-number-or-id}`. // - // Only models within the same region, which have the same location-id, can be used. + // Only models within the same region (has same location-id) can be used. // Otherwise an INVALID_ARGUMENT (400) error is returned. string parent = 5 [ (google.api.field_behavior) = REQUIRED, @@ -410,11 +411,10 @@ message GetSupportedLanguagesRequest { // // - General (built-in) models: // `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - // `projects/{project-number-or-id}/locations/{location-id}/models/general/base` // // // Returns languages supported by the specified model. - // If missing, we get supported languages of Google general base (PBMT) model. + // If missing, we get supported languages of Google general NMT model. string model = 2 [(google.api.field_behavior) = OPTIONAL]; } @@ -523,13 +523,13 @@ message OutputConfig { // content to output. // // Once a row is present in index.csv, the input/output matching never - // changes. Callers should also expect the contents in the input_file are + // changes. Callers should also expect all the content in input_file are // processed and ready to be consumed (that is, no partial output file is // written). // - // Since index.csv will be updated during the process, please make + // Since index.csv will be keeping updated during the process, please make // sure there is no custom retention policy applied on the output bucket - // that may prevent file updating. + // that may avoid file updating. // (https://cloud.google.com/storage/docs/bucket-lock?hl=en#retention-policy) // // The format of translations_file (for target language code 'trg') is: @@ -674,8 +674,7 @@ message TranslateDocumentRequest { // // Format: `projects/{project-number-or-id}/locations/{location-id}`. // - // For global calls, use `projects/{project-number-or-id}/locations/global` or - // `projects/{project-number-or-id}`. + // For global calls, use `projects/{project-number-or-id}/locations/global`. // // Non-global location is required for requests using AutoML models or custom // glossaries. @@ -717,7 +716,6 @@ message TranslateDocumentRequest { // // - General (built-in) models: // `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - // `projects/{project-number-or-id}/locations/{location-id}/models/general/base` // // // If not provided, the default Google model (NMT) will be used for @@ -810,7 +808,7 @@ message BatchTranslateTextRequest { [(google.api.field_behavior) = REQUIRED]; // Optional. The models to use for translation. Map's key is target language - // code. Map's value is the model name. Value can be a built-in general model, + // code. Map's value is model name. Value can be a built-in general model, // or an AutoML Translation model. // // The value format depends on model type: @@ -820,7 +818,6 @@ message BatchTranslateTextRequest { // // - General (built-in) models: // `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - // `projects/{project-number-or-id}/locations/{location-id}/models/general/base` // // // If the map is empty or a specific model is @@ -1194,7 +1191,12 @@ message BatchTranslateDocumentRequest { // Only AutoML Translation models or glossaries within the same region (have // the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) // error is returned. - string parent = 1 [(google.api.field_behavior) = REQUIRED]; + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; // Required. The BCP-47 language code of the input document if known, for // example, "en-US" or "sr-Latn". Supported language codes are listed in @@ -1230,7 +1232,6 @@ message BatchTranslateDocumentRequest { // // - General (built-in) models: // `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - // `projects/{project-number-or-id}/locations/{location-id}/models/general/base` // // // If the map is empty or a specific model is not requested for a language @@ -1261,10 +1262,10 @@ message BatchDocumentInputConfig { // - `xlsx`, // application/vnd.openxmlformats-officedocument.spreadsheetml.sheet // - // The max file size supported for `.docx`, `.pptx` and `.xlsx` is 100MB. - // The max file size supported for `.pdf` is 1GB and the max page limit is + // The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB. + // The max file size to support for `.pdf` is 1GB and the max page limit is // 1000 pages. - // The max file size supported for all input documents is 1GB. + // The max file size to support for all input documents is 1GB. GcsSource gcs_source = 1; } } @@ -1328,16 +1329,16 @@ message BatchDocumentOutputConfig { // field returned by BatchTranslateDocument if at least one document is // translated successfully. message BatchTranslateDocumentResponse { - // Total number of pages to translate in all documents. Documents without a + // Total number of pages to translate in all documents. Documents without // clear page definition (such as XLSX) are not counted. int64 total_pages = 1; // Number of successfully translated pages in all documents. Documents without - // a clear page definition (such as XLSX) are not counted. + // clear page definition (such as XLSX) are not counted. int64 translated_pages = 2; // Number of pages that failed to process in all documents. Documents without - // a clear page definition (such as XLSX) are not counted. + // clear page definition (such as XLSX) are not counted. int64 failed_pages = 3; // Number of billable pages in documents with clear page definition (such as diff --git a/protos/protos.json b/protos/protos.json index e2200eb4..965ef085 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -1959,7 +1959,8 @@ "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" } }, "sourceLanguageCode": { diff --git a/src/v3beta1/translation_service_client.ts b/src/v3beta1/translation_service_client.ts index 1831f005..7fa706de 100644 --- a/src/v3beta1/translation_service_client.ts +++ b/src/v3beta1/translation_service_client.ts @@ -476,14 +476,13 @@ export class TranslationServiceClient { * * - General (built-in) models: * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * * * For global (non-regionalized) requests, use `location-id` `global`. * For example, * `projects/{project-number-or-id}/locations/global/models/general/nmt`. * - * If missing, the system decides which google base model to use. + * If not provided, the default Google model (NMT) will be used * @param {google.cloud.translation.v3beta1.TranslateTextGlossaryConfig} [request.glossaryConfig] * Optional. Glossary to be applied. The glossary must be * within the same region (have the same location-id) as the model, otherwise @@ -599,7 +598,7 @@ export class TranslationServiceClient { * For global calls, use `projects/{project-number-or-id}/locations/global` or * `projects/{project-number-or-id}`. * - * Only models within the same region, which have the same location-id, can be used. + * Only models within the same region (has same location-id) can be used. * Otherwise an INVALID_ARGUMENT (400) error is returned. * @param {string} [request.model] * Optional. The language detection model to be used. @@ -748,11 +747,10 @@ export class TranslationServiceClient { * * - General (built-in) models: * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * * * Returns languages supported by the specified model. - * If missing, we get supported languages of Google general base (PBMT) model. + * If missing, we get supported languages of Google general NMT model. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -853,8 +851,7 @@ export class TranslationServiceClient { * * Format: `projects/{project-number-or-id}/locations/{location-id}`. * - * For global calls, use `projects/{project-number-or-id}/locations/global` or - * `projects/{project-number-or-id}`. + * For global calls, use `projects/{project-number-or-id}/locations/global`. * * Non-global location is required for requests using AutoML models or custom * glossaries. @@ -889,7 +886,6 @@ export class TranslationServiceClient { * * - General (built-in) models: * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * * * If not provided, the default Google model (NMT) will be used for @@ -1120,7 +1116,7 @@ export class TranslationServiceClient { * Required. Specify up to 10 language codes here. * @param {number[]} [request.models] * Optional. The models to use for translation. Map's key is target language - * code. Map's value is the model name. Value can be a built-in general model, + * code. Map's value is model name. Value can be a built-in general model, * or an AutoML Translation model. * * The value format depends on model type: @@ -1130,7 +1126,6 @@ export class TranslationServiceClient { * * - General (built-in) models: * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * * * If the map is empty or a specific model is @@ -1339,7 +1334,6 @@ export class TranslationServiceClient { * * - General (built-in) models: * `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, - * `projects/{project-number-or-id}/locations/{location-id}/models/general/base` * * * If the map is empty or a specific model is not requested for a language