blob: 8134552de9f6151c9132b42f8b2b2db2103eaf14 [file] [log] [blame]
Bu Sun Kim65020912020-05-20 12:08:20 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="translate_v3beta1.html">Cloud Translation API</a> . <a href="translate_v3beta1.projects.html">projects</a> . <a href="translate_v3beta1.projects.locations.html">locations</a> . <a href="translate_v3beta1.projects.locations.glossaries.html">glossaries</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Creates a glossary and returns the long-running operation. Returns</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
82<p class="firstline">Deletes a glossary, or cancels glossary construction</p>
83<p class="toc_element">
84 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
85<p class="firstline">Gets a glossary. Returns NOT_FOUND, if the glossary doesn't</p>
86<p class="toc_element">
87 <code><a href="#list">list(parent, filter=None, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p>
88<p class="firstline">Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<h3>Method Details</h3>
93<div class="method">
94 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
95 <pre>Creates a glossary and returns the long-running operation. Returns
96NOT_FOUND, if the project doesn&#x27;t exist.
97
98Args:
99 parent: string, Required. The project name. (required)
100 body: object, The request body.
101 The object takes the form of:
102
103{ # Represents a glossary built from user provided data.
104 &quot;endTime&quot;: &quot;A String&quot;, # Output only. When the glossary creation was finished.
105 &quot;entryCount&quot;: 42, # Output only. The number of entries defined in the glossary.
106 &quot;inputConfig&quot;: { # Input configuration for glossaries. # Required. Provides examples to build the glossary from.
107 # Total glossary must not exceed 10M Unicode codepoints.
108 &quot;gcsSource&quot;: { # The Google Cloud Storage location for the input content. # Required. Google Cloud Storage location of glossary data.
109 # File format is determined based on the filename extension. API returns
110 # [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file
111 # formats. Wildcards are not allowed. This must be a single file in one of
112 # the following formats:
113 #
114 # For unidirectional glossaries:
115 #
116 # - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated.
117 # The first column is source text. The second column is target text.
118 # The file must not contain headers. That is, the first row is data, not
119 # column names.
120 #
121 # - TMX (`.tmx`): TMX file with parallel data defining source/target term
122 # pairs.
123 #
124 # For equivalent term sets glossaries:
125 #
126 # - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms
127 # in multiple languages. The format is defined for Google Translation
128 # Toolkit and documented in [Use a
129 # glossary](https://support.google.com/translatortoolkit/answer/6306379?hl=en).
130 &quot;inputUri&quot;: &quot;A String&quot;, # Required. Source data URI. For example, `gs://my_bucket/my_object`.
131 },
132 },
133 &quot;submitTime&quot;: &quot;A String&quot;, # Output only. When CreateGlossary was called.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700134 &quot;name&quot;: &quot;A String&quot;, # Required. The resource name of the glossary. Glossary names have the form
135 # `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700136 &quot;languagePair&quot;: { # Used with unidirectional glossaries. # Used with unidirectional glossaries.
137 &quot;targetLanguageCode&quot;: &quot;A String&quot;, # Required. The BCP-47 language code for translation output, for example,
138 # &quot;zh-CN&quot;. Expected to be an exact match for GlossaryTerm.language_code.
139 &quot;sourceLanguageCode&quot;: &quot;A String&quot;, # Required. The BCP-47 language code of the input text, for example,
140 # &quot;en-US&quot;. Expected to be an exact match for GlossaryTerm.language_code.
141 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700142 &quot;languageCodesSet&quot;: { # Used with equivalent term set glossaries. # Used with equivalent term set glossaries.
143 &quot;languageCodes&quot;: [ # The BCP-47 language code(s) for terms defined in the glossary.
144 # All entries are unique. The list contains at least two entries.
145 # Expected to be an exact match for GlossaryTerm.language_code.
146 &quot;A String&quot;,
147 ],
148 },
149}
150
151 x__xgafv: string, V1 error format.
152 Allowed values
153 1 - v1 error format
154 2 - v2 error format
155
156Returns:
157 An object of the form:
158
159 { # This resource represents a long-running operation that is the result of a
160 # network API call.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700161 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
162 # If `true`, the operation is completed, and either `error` or `response` is
163 # available.
164 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
165 # method returns no data on success, such as `Delete`, the response is
166 # `google.protobuf.Empty`. If the original method is standard
167 # `Get`/`Create`/`Update`, the response should be the resource. For other
168 # methods, the response should have the type `XxxResponse`, where `Xxx`
169 # is the original method name. For example, if the original method name
170 # is `TakeSnapshot()`, the inferred response type is
171 # `TakeSnapshotResponse`.
172 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
173 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700174 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
175 # originally returns it. If you use the default HTTP mapping, the
176 # `name` should be a resource name ending with `operations/{unique_id}`.
177 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
178 # different programming environments, including REST APIs and RPC APIs. It is
179 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
180 # three pieces of data: error code, error message, and error details.
181 #
182 # You can find out more about this error model and how to work with it in the
183 # [API Design Guide](https://cloud.google.com/apis/design/errors).
184 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
185 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
186 # user-facing error message should be localized and sent in the
187 # google.rpc.Status.details field, or localized by the client.
188 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
189 # message types for APIs to use.
190 {
191 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
192 },
193 ],
194 },
195 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
196 # contains progress information and common metadata such as create time.
197 # Some services might not provide such metadata. Any method that returns a
198 # long-running operation should document the metadata type, if any.
199 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
200 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700201 }</pre>
202</div>
203
204<div class="method">
205 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
206 <pre>Deletes a glossary, or cancels glossary construction
207if the glossary isn&#x27;t created yet.
208Returns NOT_FOUND, if the glossary doesn&#x27;t exist.
209
210Args:
211 name: string, Required. The name of the glossary to delete. (required)
212 x__xgafv: string, V1 error format.
213 Allowed values
214 1 - v1 error format
215 2 - v2 error format
216
217Returns:
218 An object of the form:
219
220 { # This resource represents a long-running operation that is the result of a
221 # network API call.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700222 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
223 # If `true`, the operation is completed, and either `error` or `response` is
224 # available.
225 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
226 # method returns no data on success, such as `Delete`, the response is
227 # `google.protobuf.Empty`. If the original method is standard
228 # `Get`/`Create`/`Update`, the response should be the resource. For other
229 # methods, the response should have the type `XxxResponse`, where `Xxx`
230 # is the original method name. For example, if the original method name
231 # is `TakeSnapshot()`, the inferred response type is
232 # `TakeSnapshotResponse`.
233 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
234 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700235 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
236 # originally returns it. If you use the default HTTP mapping, the
237 # `name` should be a resource name ending with `operations/{unique_id}`.
238 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
239 # different programming environments, including REST APIs and RPC APIs. It is
240 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
241 # three pieces of data: error code, error message, and error details.
242 #
243 # You can find out more about this error model and how to work with it in the
244 # [API Design Guide](https://cloud.google.com/apis/design/errors).
245 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
246 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
247 # user-facing error message should be localized and sent in the
248 # google.rpc.Status.details field, or localized by the client.
249 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
250 # message types for APIs to use.
251 {
252 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
253 },
254 ],
255 },
256 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
257 # contains progress information and common metadata such as create time.
258 # Some services might not provide such metadata. Any method that returns a
259 # long-running operation should document the metadata type, if any.
260 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
261 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700262 }</pre>
263</div>
264
265<div class="method">
266 <code class="details" id="get">get(name, x__xgafv=None)</code>
267 <pre>Gets a glossary. Returns NOT_FOUND, if the glossary doesn&#x27;t
268exist.
269
270Args:
271 name: string, Required. The name of the glossary to retrieve. (required)
272 x__xgafv: string, V1 error format.
273 Allowed values
274 1 - v1 error format
275 2 - v2 error format
276
277Returns:
278 An object of the form:
279
280 { # Represents a glossary built from user provided data.
281 &quot;endTime&quot;: &quot;A String&quot;, # Output only. When the glossary creation was finished.
282 &quot;entryCount&quot;: 42, # Output only. The number of entries defined in the glossary.
283 &quot;inputConfig&quot;: { # Input configuration for glossaries. # Required. Provides examples to build the glossary from.
284 # Total glossary must not exceed 10M Unicode codepoints.
285 &quot;gcsSource&quot;: { # The Google Cloud Storage location for the input content. # Required. Google Cloud Storage location of glossary data.
286 # File format is determined based on the filename extension. API returns
287 # [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file
288 # formats. Wildcards are not allowed. This must be a single file in one of
289 # the following formats:
290 #
291 # For unidirectional glossaries:
292 #
293 # - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated.
294 # The first column is source text. The second column is target text.
295 # The file must not contain headers. That is, the first row is data, not
296 # column names.
297 #
298 # - TMX (`.tmx`): TMX file with parallel data defining source/target term
299 # pairs.
300 #
301 # For equivalent term sets glossaries:
302 #
303 # - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms
304 # in multiple languages. The format is defined for Google Translation
305 # Toolkit and documented in [Use a
306 # glossary](https://support.google.com/translatortoolkit/answer/6306379?hl=en).
307 &quot;inputUri&quot;: &quot;A String&quot;, # Required. Source data URI. For example, `gs://my_bucket/my_object`.
308 },
309 },
310 &quot;submitTime&quot;: &quot;A String&quot;, # Output only. When CreateGlossary was called.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700311 &quot;name&quot;: &quot;A String&quot;, # Required. The resource name of the glossary. Glossary names have the form
312 # `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700313 &quot;languagePair&quot;: { # Used with unidirectional glossaries. # Used with unidirectional glossaries.
314 &quot;targetLanguageCode&quot;: &quot;A String&quot;, # Required. The BCP-47 language code for translation output, for example,
315 # &quot;zh-CN&quot;. Expected to be an exact match for GlossaryTerm.language_code.
316 &quot;sourceLanguageCode&quot;: &quot;A String&quot;, # Required. The BCP-47 language code of the input text, for example,
317 # &quot;en-US&quot;. Expected to be an exact match for GlossaryTerm.language_code.
318 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700319 &quot;languageCodesSet&quot;: { # Used with equivalent term set glossaries. # Used with equivalent term set glossaries.
320 &quot;languageCodes&quot;: [ # The BCP-47 language code(s) for terms defined in the glossary.
321 # All entries are unique. The list contains at least two entries.
322 # Expected to be an exact match for GlossaryTerm.language_code.
323 &quot;A String&quot;,
324 ],
325 },
326 }</pre>
327</div>
328
329<div class="method">
330 <code class="details" id="list">list(parent, filter=None, pageToken=None, pageSize=None, x__xgafv=None)</code>
331 <pre>Lists glossaries in a project. Returns NOT_FOUND, if the project doesn&#x27;t
332exist.
333
334Args:
335 parent: string, Required. The name of the project from which to list all of the glossaries. (required)
336 filter: string, Optional. Filter specifying constraints of a list operation.
337Filtering is not supported yet, and the parameter currently has no effect.
338If missing, no filtering is performed.
339 pageToken: string, Optional. A token identifying a page of results the server should return.
340Typically, this is the value of [ListGlossariesResponse.next_page_token]
341returned from the previous call to `ListGlossaries` method.
342The first page is returned if `page_token`is empty or missing.
343 pageSize: integer, Optional. Requested page size. The server may return fewer glossaries than
344requested. If unspecified, the server picks an appropriate default.
345 x__xgafv: string, V1 error format.
346 Allowed values
347 1 - v1 error format
348 2 - v2 error format
349
350Returns:
351 An object of the form:
352
353 { # Response message for ListGlossaries.
354 &quot;glossaries&quot;: [ # The list of glossaries for a project.
355 { # Represents a glossary built from user provided data.
356 &quot;endTime&quot;: &quot;A String&quot;, # Output only. When the glossary creation was finished.
357 &quot;entryCount&quot;: 42, # Output only. The number of entries defined in the glossary.
358 &quot;inputConfig&quot;: { # Input configuration for glossaries. # Required. Provides examples to build the glossary from.
359 # Total glossary must not exceed 10M Unicode codepoints.
360 &quot;gcsSource&quot;: { # The Google Cloud Storage location for the input content. # Required. Google Cloud Storage location of glossary data.
361 # File format is determined based on the filename extension. API returns
362 # [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file
363 # formats. Wildcards are not allowed. This must be a single file in one of
364 # the following formats:
365 #
366 # For unidirectional glossaries:
367 #
368 # - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated.
369 # The first column is source text. The second column is target text.
370 # The file must not contain headers. That is, the first row is data, not
371 # column names.
372 #
373 # - TMX (`.tmx`): TMX file with parallel data defining source/target term
374 # pairs.
375 #
376 # For equivalent term sets glossaries:
377 #
378 # - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms
379 # in multiple languages. The format is defined for Google Translation
380 # Toolkit and documented in [Use a
381 # glossary](https://support.google.com/translatortoolkit/answer/6306379?hl=en).
382 &quot;inputUri&quot;: &quot;A String&quot;, # Required. Source data URI. For example, `gs://my_bucket/my_object`.
383 },
384 },
385 &quot;submitTime&quot;: &quot;A String&quot;, # Output only. When CreateGlossary was called.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700386 &quot;name&quot;: &quot;A String&quot;, # Required. The resource name of the glossary. Glossary names have the form
387 # `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700388 &quot;languagePair&quot;: { # Used with unidirectional glossaries. # Used with unidirectional glossaries.
389 &quot;targetLanguageCode&quot;: &quot;A String&quot;, # Required. The BCP-47 language code for translation output, for example,
390 # &quot;zh-CN&quot;. Expected to be an exact match for GlossaryTerm.language_code.
391 &quot;sourceLanguageCode&quot;: &quot;A String&quot;, # Required. The BCP-47 language code of the input text, for example,
392 # &quot;en-US&quot;. Expected to be an exact match for GlossaryTerm.language_code.
393 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700394 &quot;languageCodesSet&quot;: { # Used with equivalent term set glossaries. # Used with equivalent term set glossaries.
395 &quot;languageCodes&quot;: [ # The BCP-47 language code(s) for terms defined in the glossary.
396 # All entries are unique. The list contains at least two entries.
397 # Expected to be an exact match for GlossaryTerm.language_code.
398 &quot;A String&quot;,
399 ],
400 },
401 },
402 ],
403 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve a page of results. Pass this value in the
404 # [ListGlossariesRequest.page_token] field in the subsequent call to
405 # `ListGlossaries` method to retrieve the next page of results.
406 }</pre>
407</div>
408
409<div class="method">
410 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
411 <pre>Retrieves the next page of results.
412
413Args:
414 previous_request: The request for the previous page. (required)
415 previous_response: The response from the request for the previous page. (required)
416
417Returns:
418 A request object that you can call &#x27;execute()&#x27; on to request the next
419 page. Returns None if there are no more items in the collection.
420 </pre>
421</div>
422
423</body></html>