Skip to content

Commit 4e5752b

Browse files
feat: [translate] A new field mime_type is added to message .google.cloud.translation.v3.AdaptiveMtTranslateRequest (#7968)
* feat: A new field `mime_type` is added to message `.google.cloud.translation.v3.AdaptiveMtTranslateRequest` PiperOrigin-RevId: 895422613 Source-Link: googleapis/googleapis@d6837a5 Source-Link: googleapis/googleapis-gen@cd509ea Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRyYW5zbGF0ZS8uT3dsQm90LnlhbWwiLCJoIjoiY2Q1MDllYWIyYTZiYTY0MzY1ODkyNTMzYjQ5ZWYyYTkzOWI4OWVmMiJ9 * 🦉 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> Co-authored-by: Gabe Pearhill <86282859+pearigee@users.noreply.github.com>
1 parent 3b3d64b commit 4e5752b

File tree

7 files changed

+48
-2
lines changed

7 files changed

+48
-2
lines changed

packages/google-cloud-translate/protos/google/cloud/translate/v3/adaptive_mt.proto

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -229,6 +229,9 @@ message AdaptiveMtTranslateRequest {
229229
// Required. The content of the input in string format.
230230
repeated string content = 3 [(google.api.field_behavior) = REQUIRED];
231231

232+
// The format of the source text.
233+
string mime_type = 4;
234+
232235
// Configuration for caller provided reference sentences.
233236
optional ReferenceSentenceConfig reference_sentence_config = 6;
234237

packages/google-cloud-translate/protos/protos.d.ts

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-translate/protos/protos.js

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-translate/protos/protos.json

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-translate/samples/generated/v3/snippet_metadata_google.cloud.translation.v3.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1258,7 +1258,7 @@
12581258
"segments": [
12591259
{
12601260
"start": 25,
1261-
"end": 75,
1261+
"end": 79,
12621262
"type": "FULL"
12631263
}
12641264
],
@@ -1279,6 +1279,10 @@
12791279
"name": "content",
12801280
"type": "TYPE_STRING[]"
12811281
},
1282+
{
1283+
"name": "mime_type",
1284+
"type": "TYPE_STRING"
1285+
},
12821286
{
12831287
"name": "reference_sentence_config",
12841288
"type": ".google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig"

packages/google-cloud-translate/samples/generated/v3/translation_service.adaptive_mt_translate.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ function main(parent, dataset, content) {
4242
* Required. The content of the input in string format.
4343
*/
4444
// const content = ['abc','def']
45+
/**
46+
* The format of the source text.
47+
*/
48+
// const mimeType = 'abc123'
4549
/**
4650
* Configuration for caller provided reference sentences.
4751
*/

packages/google-cloud-translate/src/v3/translation_service_client.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2053,6 +2053,8 @@ export class TranslationServiceClient {
20532053
* `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}`
20542054
* @param {string[]} request.content
20552055
* Required. The content of the input in string format.
2056+
* @param {string} request.mimeType
2057+
* The format of the source text.
20562058
* @param {google.cloud.translation.v3.AdaptiveMtTranslateRequest.ReferenceSentenceConfig} request.referenceSentenceConfig
20572059
* Configuration for caller provided reference sentences.
20582060
* @param {google.cloud.translation.v3.AdaptiveMtTranslateRequest.GlossaryConfig} [request.glossaryConfig]

0 commit comments

Comments
 (0)