Skip to content

Commit cf384b9

Browse files
1 parent b31b940 commit cf384b9

20 files changed

Lines changed: 406 additions & 57 deletions

src/Translate.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,16 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
231231
'type' => 'string',
232232
],
233233
],
234+
],'refineText' => [
235+
'path' => 'v3/{+parent}:refineText',
236+
'httpMethod' => 'POST',
237+
'parameters' => [
238+
'parent' => [
239+
'location' => 'path',
240+
'type' => 'string',
241+
'required' => true,
242+
],
243+
],
234244
],'romanizeText' => [
235245
'path' => 'v3/{+parent}:romanizeText',
236246
'httpMethod' => 'POST',
@@ -814,6 +824,10 @@ public function __construct($clientOrConfig = [], $rootUrl = null)
814824
'location' => 'query',
815825
'type' => 'string',
816826
],
827+
'returnPartialSuccess' => [
828+
'location' => 'query',
829+
'type' => 'boolean',
830+
],
817831
],
818832
],'wait' => [
819833
'path' => 'v3/{+name}:wait',

src/Translate/AdaptiveMtDataset.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ class AdaptiveMtDataset extends \Google\Model
4040
*/
4141
public $exampleCount;
4242
/**
43-
* Required. The resource name of the dataset, in form of `projects/{project-
44-
* number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_id}`
43+
* Identifier. The resource name of the dataset, in form of
44+
* `projects/{project-number-or-
45+
* id}/locations/{location_id}/adaptiveMtDatasets/{dataset_id}`
4546
*
4647
* @var string
4748
*/
@@ -116,8 +117,9 @@ public function getExampleCount()
116117
return $this->exampleCount;
117118
}
118119
/**
119-
* Required. The resource name of the dataset, in form of `projects/{project-
120-
* number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_id}`
120+
* Identifier. The resource name of the dataset, in form of
121+
* `projects/{project-number-or-
122+
* id}/locations/{location_id}/adaptiveMtDatasets/{dataset_id}`
121123
*
122124
* @param string $name
123125
*/

src/Translate/AdaptiveMtFile.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class AdaptiveMtFile extends \Google\Model
3838
*/
3939
public $entryCount;
4040
/**
41-
* Required. The resource name of the file, in form of `projects/{project-
41+
* Identifier. The resource name of the file, in form of `projects/{project-
4242
* number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptive
4343
* MtFiles/{file}`
4444
*
@@ -101,7 +101,7 @@ public function getEntryCount()
101101
return $this->entryCount;
102102
}
103103
/**
104-
* Required. The resource name of the file, in form of `projects/{project-
104+
* Identifier. The resource name of the file, in form of `projects/{project-
105105
* number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptive
106106
* MtFiles/{file}`
107107
*

src/Translate/AdaptiveMtSentence.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class AdaptiveMtSentence extends \Google\Model
2626
*/
2727
public $createTime;
2828
/**
29-
* Required. The resource name of the file, in form of `projects/{project-
29+
* Identifier. The resource name of the file, in form of `projects/{project-
3030
* number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptive
3131
* MtFiles/{file}/adaptiveMtSentences/{sentence}`
3232
*
@@ -69,7 +69,7 @@ public function getCreateTime()
6969
return $this->createTime;
7070
}
7171
/**
72-
* Required. The resource name of the file, in form of `projects/{project-
72+
* Identifier. The resource name of the file, in form of `projects/{project-
7373
* number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptive
7474
* MtFiles/{file}/adaptiveMtSentences/{sentence}`
7575
*

src/Translate/BatchTranslateDocumentRequest.php

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ class BatchTranslateDocumentRequest extends \Google\Collection
7474
public $models;
7575
protected $outputConfigType = BatchDocumentOutputConfig::class;
7676
protected $outputConfigDataType = '';
77+
/**
78+
* Optional. If true, only native pdf pages will be translated.
79+
*
80+
* @var bool
81+
*/
82+
public $pdfNativeOnly;
7783
/**
7884
* Required. The ISO-639 language code of the input document if known, for
7985
* example, "en-US" or "sr-Latn". Supported language codes are listed in
@@ -84,7 +90,9 @@ class BatchTranslateDocumentRequest extends \Google\Collection
8490
public $sourceLanguageCode;
8591
/**
8692
* Required. The ISO-639 language code to use for translation of the input
87-
* document. Specify up to 10 language codes here.
93+
* document. Specify up to 10 language codes here. Supported language codes
94+
* are listed in [Language
95+
* Support](https://cloud.google.com/translate/docs/languages).
8896
*
8997
* @var string[]
9098
*/
@@ -239,6 +247,22 @@ public function getOutputConfig()
239247
{
240248
return $this->outputConfig;
241249
}
250+
/**
251+
* Optional. If true, only native pdf pages will be translated.
252+
*
253+
* @param bool $pdfNativeOnly
254+
*/
255+
public function setPdfNativeOnly($pdfNativeOnly)
256+
{
257+
$this->pdfNativeOnly = $pdfNativeOnly;
258+
}
259+
/**
260+
* @return bool
261+
*/
262+
public function getPdfNativeOnly()
263+
{
264+
return $this->pdfNativeOnly;
265+
}
242266
/**
243267
* Required. The ISO-639 language code of the input document if known, for
244268
* example, "en-US" or "sr-Latn". Supported language codes are listed in
@@ -259,7 +283,9 @@ public function getSourceLanguageCode()
259283
}
260284
/**
261285
* Required. The ISO-639 language code to use for translation of the input
262-
* document. Specify up to 10 language codes here.
286+
* document. Specify up to 10 language codes here. Supported language codes
287+
* are listed in [Language
288+
* Support](https://cloud.google.com/translate/docs/languages).
263289
*
264290
* @param string[] $targetLanguageCodes
265291
*/

src/Translate/BatchTranslateTextRequest.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,16 @@ class BatchTranslateTextRequest extends \Google\Collection
5252
protected $outputConfigType = OutputConfig::class;
5353
protected $outputConfigDataType = '';
5454
/**
55-
* Required. Source language code.
55+
* Required. Source language code. Supported language codes are listed in
56+
* [Language Support](https://cloud.google.com/translate/docs/languages).
5657
*
5758
* @var string
5859
*/
5960
public $sourceLanguageCode;
6061
/**
61-
* Required. Specify up to 10 language codes here.
62+
* Required. Specify up to 10 language codes here. Supported language codes
63+
* are listed in [Language
64+
* Support](https://cloud.google.com/translate/docs/languages).
6265
*
6366
* @var string[]
6467
*/
@@ -162,7 +165,8 @@ public function getOutputConfig()
162165
return $this->outputConfig;
163166
}
164167
/**
165-
* Required. Source language code.
168+
* Required. Source language code. Supported language codes are listed in
169+
* [Language Support](https://cloud.google.com/translate/docs/languages).
166170
*
167171
* @param string $sourceLanguageCode
168172
*/
@@ -178,7 +182,9 @@ public function getSourceLanguageCode()
178182
return $this->sourceLanguageCode;
179183
}
180184
/**
181-
* Required. Specify up to 10 language codes here.
185+
* Required. Specify up to 10 language codes here. Supported language codes
186+
* are listed in [Language
187+
* Support](https://cloud.google.com/translate/docs/languages).
182188
*
183189
* @param string[] $targetLanguageCodes
184190
*/

src/Translate/DetectLanguageRequest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class DetectLanguageRequest extends \Google\Model
2525
* @var string
2626
*/
2727
public $content;
28+
protected $documentInputConfigType = DocumentInputConfig::class;
29+
protected $documentInputConfigDataType = '';
2830
/**
2931
* Optional. The labels with user-defined metadata for the request. Label keys
3032
* and values can be no longer than 63 characters (Unicode codepoints), can
@@ -72,6 +74,22 @@ public function getContent()
7274
{
7375
return $this->content;
7476
}
77+
/**
78+
* Optional. The document configuration of the input.
79+
*
80+
* @param DocumentInputConfig $documentInputConfig
81+
*/
82+
public function setDocumentInputConfig(DocumentInputConfig $documentInputConfig)
83+
{
84+
$this->documentInputConfig = $documentInputConfig;
85+
}
86+
/**
87+
* @return DocumentInputConfig
88+
*/
89+
public function getDocumentInputConfig()
90+
{
91+
return $this->documentInputConfig;
92+
}
7593
/**
7694
* Optional. The labels with user-defined metadata for the request. Label keys
7795
* and values can be no longer than 63 characters (Unicode codepoints), can

src/Translate/Glossary.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class Glossary extends \Google\Model
4444
protected $languagePairType = LanguageCodePair::class;
4545
protected $languagePairDataType = '';
4646
/**
47-
* Required. The resource name of the glossary. Glossary names have the form
47+
* Identifier. The resource name of the glossary. Glossary names have the form
4848
* `projects/{project-number-or-id}/locations/{location-
4949
* id}/glossaries/{glossary-id}`.
5050
*
@@ -156,7 +156,7 @@ public function getLanguagePair()
156156
return $this->languagePair;
157157
}
158158
/**
159-
* Required. The resource name of the glossary. Glossary names have the form
159+
* Identifier. The resource name of the glossary. Glossary names have the form
160160
* `projects/{project-number-or-id}/locations/{location-
161161
* id}/glossaries/{glossary-id}`.
162162
*

src/Translate/LanguageCodesSet.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,18 @@ class LanguageCodesSet extends \Google\Collection
2121
{
2222
protected $collection_key = 'languageCodes';
2323
/**
24-
* The ISO-639 language code(s) for terms defined in the glossary. All entries
25-
* are unique. The list contains at least two entries. Expected to be an exact
26-
* match for GlossaryTerm.language_code.
24+
* Optional. The ISO-639 language code(s) for terms defined in the glossary.
25+
* All entries are unique. The list contains at least two entries. Expected to
26+
* be an exact match for GlossaryTerm.language_code.
2727
*
2828
* @var string[]
2929
*/
3030
public $languageCodes;
3131

3232
/**
33-
* The ISO-639 language code(s) for terms defined in the glossary. All entries
34-
* are unique. The list contains at least two entries. Expected to be an exact
35-
* match for GlossaryTerm.language_code.
33+
* Optional. The ISO-639 language code(s) for terms defined in the glossary.
34+
* All entries are unique. The list contains at least two entries. Expected to
35+
* be an exact match for GlossaryTerm.language_code.
3636
*
3737
* @param string[] $languageCodes
3838
*/

src/Translate/ListOperationsResponse.php

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
class ListOperationsResponse extends \Google\Collection
2121
{
22-
protected $collection_key = 'operations';
22+
protected $collection_key = 'unreachable';
2323
/**
2424
* The standard List next-page token.
2525
*
@@ -28,6 +28,15 @@ class ListOperationsResponse extends \Google\Collection
2828
public $nextPageToken;
2929
protected $operationsType = Operation::class;
3030
protected $operationsDataType = 'array';
31+
/**
32+
* Unordered list. Unreachable resources. Populated when the request sets
33+
* `ListOperationsRequest.return_partial_success` and reads across
34+
* collections. For example, when attempting to list all resources across all
35+
* supported locations.
36+
*
37+
* @var string[]
38+
*/
39+
public $unreachable;
3140

3241
/**
3342
* The standard List next-page token.
@@ -61,6 +70,25 @@ public function getOperations()
6170
{
6271
return $this->operations;
6372
}
73+
/**
74+
* Unordered list. Unreachable resources. Populated when the request sets
75+
* `ListOperationsRequest.return_partial_success` and reads across
76+
* collections. For example, when attempting to list all resources across all
77+
* supported locations.
78+
*
79+
* @param string[] $unreachable
80+
*/
81+
public function setUnreachable($unreachable)
82+
{
83+
$this->unreachable = $unreachable;
84+
}
85+
/**
86+
* @return string[]
87+
*/
88+
public function getUnreachable()
89+
{
90+
return $this->unreachable;
91+
}
6492
}
6593

6694
// Adding a class alias for backwards compatibility with the previous class name.

0 commit comments

Comments
 (0)