Skip to content

Commit 3c9d3e3

Browse files
1 parent a712550 commit 3c9d3e3

File tree

11 files changed

+389
-26
lines changed

11 files changed

+389
-26
lines changed

clients/google-api-services-translate/v3/2.0.0/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file:
2222
<dependency>
2323
<groupId>com.google.apis</groupId>
2424
<artifactId>google-api-services-translate</artifactId>
25-
<version>v3-rev20240126-2.0.0</version>
25+
<version>v3-rev20240718-2.0.0</version>
2626
</dependency>
2727
</dependencies>
2828
</project>
@@ -35,7 +35,7 @@ repositories {
3535
mavenCentral()
3636
}
3737
dependencies {
38-
implementation 'com.google.apis:google-api-services-translate:v3-rev20240126-2.0.0'
38+
implementation 'com.google.apis:google-api-services-translate:v3-rev20240718-2.0.0'
3939
}
4040
```
4141

clients/google-api-services-translate/v3/2.0.0/com/google/api/services/translate/v3/Translate.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6825,7 +6825,7 @@ public List set(String parameterName, Object value) {
68256825
* This request holds the parameters needed by the translate server. After setting any optional
68266826
* parameters, call the {@link Patch#execute()} method to invoke the remote operation.
68276827
*
6828-
* @param name Required. The resource name of the entry. Format: "projects/locations/glossaries/glossaryEntries"
6828+
* @param name Identifier. The resource name of the entry. Format: "projects/locations/glossaries/glossaryEntries"
68296829
* @param content the {@link com.google.api.services.translate.v3.model.GlossaryEntry}
68306830
* @return the request
68316831
*/
@@ -6853,7 +6853,7 @@ public class Patch extends TranslateRequest<com.google.api.services.translate.v3
68536853
* Patch#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
68546854
* be called to initialize this instance immediately after invoking the constructor. </p>
68556855
*
6856-
* @param name Required. The resource name of the entry. Format: "projects/locations/glossaries/glossaryEntries"
6856+
* @param name Identifier. The resource name of the entry. Format: "projects/locations/glossaries/glossaryEntries"
68576857
* @param content the {@link com.google.api.services.translate.v3.model.GlossaryEntry}
68586858
* @since 1.13
68596859
*/
@@ -6923,20 +6923,20 @@ public Patch setUploadProtocol(java.lang.String uploadProtocol) {
69236923
}
69246924

69256925
/**
6926-
* Required. The resource name of the entry. Format:
6926+
* Identifier. The resource name of the entry. Format:
69276927
* "projects/locations/glossaries/glossaryEntries"
69286928
*/
69296929
@com.google.api.client.util.Key
69306930
private java.lang.String name;
69316931

6932-
/** Required. The resource name of the entry. Format: "projects/locations/glossaries/glossaryEntries"
6932+
/** Identifier. The resource name of the entry. Format: "projects/locations/glossaries/glossaryEntries"
69336933
*/
69346934
public java.lang.String getName() {
69356935
return name;
69366936
}
69376937

69386938
/**
6939-
* Required. The resource name of the entry. Format:
6939+
* Identifier. The resource name of the entry. Format:
69406940
* "projects/locations/glossaries/glossaryEntries"
69416941
*/
69426942
public Patch setName(java.lang.String name) {

clients/google-api-services-translate/v3/2.0.0/com/google/api/services/translate/v3/model/AdaptiveMtTranslateRequest.java

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
public final class AdaptiveMtTranslateRequest extends com.google.api.client.json.GenericJson {
3232

3333
/**
34-
* Required. The content of the input in string format. For now only one sentence per request is
35-
* supported.
34+
* Required. The content of the input in string format.
3635
* The value may be {@code null}.
3736
*/
3837
@com.google.api.client.util.Key
@@ -47,17 +46,30 @@ public final class AdaptiveMtTranslateRequest extends com.google.api.client.json
4746
private java.lang.String dataset;
4847

4948
/**
50-
* Required. The content of the input in string format. For now only one sentence per request is
51-
* supported.
49+
* Optional. Glossary to be applied. The glossary must be within the same region (have the same
50+
* location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
51+
* The value may be {@code null}.
52+
*/
53+
@com.google.api.client.util.Key
54+
private TranslateTextGlossaryConfig glossaryConfig;
55+
56+
/**
57+
* Configuration for caller provided reference sentences.
58+
* The value may be {@code null}.
59+
*/
60+
@com.google.api.client.util.Key
61+
private ReferenceSentenceConfig referenceSentenceConfig;
62+
63+
/**
64+
* Required. The content of the input in string format.
5265
* @return value or {@code null} for none
5366
*/
5467
public java.util.List<java.lang.String> getContent() {
5568
return content;
5669
}
5770

5871
/**
59-
* Required. The content of the input in string format. For now only one sentence per request is
60-
* supported.
72+
* Required. The content of the input in string format.
6173
* @param content content or {@code null} for none
6274
*/
6375
public AdaptiveMtTranslateRequest setContent(java.util.List<java.lang.String> content) {
@@ -84,6 +96,42 @@ public AdaptiveMtTranslateRequest setDataset(java.lang.String dataset) {
8496
return this;
8597
}
8698

99+
/**
100+
* Optional. Glossary to be applied. The glossary must be within the same region (have the same
101+
* location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
102+
* @return value or {@code null} for none
103+
*/
104+
public TranslateTextGlossaryConfig getGlossaryConfig() {
105+
return glossaryConfig;
106+
}
107+
108+
/**
109+
* Optional. Glossary to be applied. The glossary must be within the same region (have the same
110+
* location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned.
111+
* @param glossaryConfig glossaryConfig or {@code null} for none
112+
*/
113+
public AdaptiveMtTranslateRequest setGlossaryConfig(TranslateTextGlossaryConfig glossaryConfig) {
114+
this.glossaryConfig = glossaryConfig;
115+
return this;
116+
}
117+
118+
/**
119+
* Configuration for caller provided reference sentences.
120+
* @return value or {@code null} for none
121+
*/
122+
public ReferenceSentenceConfig getReferenceSentenceConfig() {
123+
return referenceSentenceConfig;
124+
}
125+
126+
/**
127+
* Configuration for caller provided reference sentences.
128+
* @param referenceSentenceConfig referenceSentenceConfig or {@code null} for none
129+
*/
130+
public AdaptiveMtTranslateRequest setReferenceSentenceConfig(ReferenceSentenceConfig referenceSentenceConfig) {
131+
this.referenceSentenceConfig = referenceSentenceConfig;
132+
return this;
133+
}
134+
87135
@Override
88136
public AdaptiveMtTranslateRequest set(String fieldName, Object value) {
89137
return (AdaptiveMtTranslateRequest) super.set(fieldName, value);

clients/google-api-services-translate/v3/2.0.0/com/google/api/services/translate/v3/model/AdaptiveMtTranslateResponse.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@
3030
@SuppressWarnings("javadoc")
3131
public final class AdaptiveMtTranslateResponse extends com.google.api.client.json.GenericJson {
3232

33+
/**
34+
* Text translation response if a glossary is provided in the request. This could be the same as
35+
* 'translation' above if no terms apply.
36+
* The value may be {@code null}.
37+
*/
38+
@com.google.api.client.util.Key
39+
private java.util.List<AdaptiveMtTranslation> glossaryTranslations;
40+
3341
/**
3442
* Output only. The translation's language code.
3543
* The value may be {@code null}.
@@ -44,6 +52,25 @@ public final class AdaptiveMtTranslateResponse extends com.google.api.client.jso
4452
@com.google.api.client.util.Key
4553
private java.util.List<AdaptiveMtTranslation> translations;
4654

55+
/**
56+
* Text translation response if a glossary is provided in the request. This could be the same as
57+
* 'translation' above if no terms apply.
58+
* @return value or {@code null} for none
59+
*/
60+
public java.util.List<AdaptiveMtTranslation> getGlossaryTranslations() {
61+
return glossaryTranslations;
62+
}
63+
64+
/**
65+
* Text translation response if a glossary is provided in the request. This could be the same as
66+
* 'translation' above if no terms apply.
67+
* @param glossaryTranslations glossaryTranslations or {@code null} for none
68+
*/
69+
public AdaptiveMtTranslateResponse setGlossaryTranslations(java.util.List<AdaptiveMtTranslation> glossaryTranslations) {
70+
this.glossaryTranslations = glossaryTranslations;
71+
return this;
72+
}
73+
4774
/**
4875
* Output only. The translation's language code.
4976
* @return value or {@code null} for none

clients/google-api-services-translate/v3/2.0.0/com/google/api/services/translate/v3/model/GlossaryEntry.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public final class GlossaryEntry extends com.google.api.client.json.GenericJson
3838
private java.lang.String description;
3939

4040
/**
41-
* Required. The resource name of the entry. Format:
41+
* Identifier. The resource name of the entry. Format:
4242
* "projects/locations/glossaries/glossaryEntries"
4343
* The value may be {@code null}.
4444
*/
@@ -77,7 +77,7 @@ public GlossaryEntry setDescription(java.lang.String description) {
7777
}
7878

7979
/**
80-
* Required. The resource name of the entry. Format:
80+
* Identifier. The resource name of the entry. Format:
8181
* "projects/locations/glossaries/glossaryEntries"
8282
* @return value or {@code null} for none
8383
*/
@@ -86,7 +86,7 @@ public java.lang.String getName() {
8686
}
8787

8888
/**
89-
* Required. The resource name of the entry. Format:
89+
* Identifier. The resource name of the entry. Format:
9090
* "projects/locations/glossaries/glossaryEntries"
9191
* @param name name or {@code null} for none
9292
*/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
3+
* in compliance with the License. You may obtain a copy of the License at
4+
*
5+
* http://www.apache.org/licenses/LICENSE-2.0
6+
*
7+
* Unless required by applicable law or agreed to in writing, software distributed under the License
8+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
9+
* or implied. See the License for the specific language governing permissions and limitations under
10+
* the License.
11+
*/
12+
/*
13+
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
14+
* Modify at your own risk.
15+
*/
16+
17+
package com.google.api.services.translate.v3.model;
18+
19+
/**
20+
* Message of caller-provided reference configuration.
21+
*
22+
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
23+
* transmitted over HTTP when working with the Cloud Translation API. For a detailed explanation
24+
* see:
25+
* <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
26+
* </p>
27+
*
28+
* @author Google, Inc.
29+
*/
30+
@SuppressWarnings("javadoc")
31+
public final class ReferenceSentenceConfig extends com.google.api.client.json.GenericJson {
32+
33+
/**
34+
* Reference sentences pair lists. Each list will be used as the references to translate the
35+
* sentence under "content" field at the corresponding index. Length of the list is required to be
36+
* equal to the length of "content" field.
37+
* The value may be {@code null}.
38+
*/
39+
@com.google.api.client.util.Key
40+
private java.util.List<ReferenceSentencePairList> referenceSentencePairLists;
41+
42+
/**
43+
* Source language code.
44+
* The value may be {@code null}.
45+
*/
46+
@com.google.api.client.util.Key
47+
private java.lang.String sourceLanguageCode;
48+
49+
/**
50+
* Target language code.
51+
* The value may be {@code null}.
52+
*/
53+
@com.google.api.client.util.Key
54+
private java.lang.String targetLanguageCode;
55+
56+
/**
57+
* Reference sentences pair lists. Each list will be used as the references to translate the
58+
* sentence under "content" field at the corresponding index. Length of the list is required to be
59+
* equal to the length of "content" field.
60+
* @return value or {@code null} for none
61+
*/
62+
public java.util.List<ReferenceSentencePairList> getReferenceSentencePairLists() {
63+
return referenceSentencePairLists;
64+
}
65+
66+
/**
67+
* Reference sentences pair lists. Each list will be used as the references to translate the
68+
* sentence under "content" field at the corresponding index. Length of the list is required to be
69+
* equal to the length of "content" field.
70+
* @param referenceSentencePairLists referenceSentencePairLists or {@code null} for none
71+
*/
72+
public ReferenceSentenceConfig setReferenceSentencePairLists(java.util.List<ReferenceSentencePairList> referenceSentencePairLists) {
73+
this.referenceSentencePairLists = referenceSentencePairLists;
74+
return this;
75+
}
76+
77+
/**
78+
* Source language code.
79+
* @return value or {@code null} for none
80+
*/
81+
public java.lang.String getSourceLanguageCode() {
82+
return sourceLanguageCode;
83+
}
84+
85+
/**
86+
* Source language code.
87+
* @param sourceLanguageCode sourceLanguageCode or {@code null} for none
88+
*/
89+
public ReferenceSentenceConfig setSourceLanguageCode(java.lang.String sourceLanguageCode) {
90+
this.sourceLanguageCode = sourceLanguageCode;
91+
return this;
92+
}
93+
94+
/**
95+
* Target language code.
96+
* @return value or {@code null} for none
97+
*/
98+
public java.lang.String getTargetLanguageCode() {
99+
return targetLanguageCode;
100+
}
101+
102+
/**
103+
* Target language code.
104+
* @param targetLanguageCode targetLanguageCode or {@code null} for none
105+
*/
106+
public ReferenceSentenceConfig setTargetLanguageCode(java.lang.String targetLanguageCode) {
107+
this.targetLanguageCode = targetLanguageCode;
108+
return this;
109+
}
110+
111+
@Override
112+
public ReferenceSentenceConfig set(String fieldName, Object value) {
113+
return (ReferenceSentenceConfig) super.set(fieldName, value);
114+
}
115+
116+
@Override
117+
public ReferenceSentenceConfig clone() {
118+
return (ReferenceSentenceConfig) super.clone();
119+
}
120+
121+
}

0 commit comments

Comments
 (0)