blob: 286ea06e9cbbd1177f6c66ae675d06f89edfe868 [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_v3.html">Cloud Translation API</a> . <a href="translate_v3.projects.html">projects</a> . <a href="translate_v3.projects.locations.html">locations</a> . <a href="translate_v3.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">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070087 <code><a href="#list">list(parent, pageSize=None, filter=None, pageToken=None, x__xgafv=None)</a></code></p>
Bu Sun Kim65020912020-05-20 12:08:20 -070088<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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700104 &quot;endTime&quot;: &quot;A String&quot;, # Output only. When the glossary creation was finished.
105 &quot;name&quot;: &quot;A String&quot;, # Required. The resource name of the glossary. Glossary names have the form
106 # `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`.
107 &quot;languageCodesSet&quot;: { # Used with equivalent term set glossaries. # Used with equivalent term set glossaries.
108 &quot;languageCodes&quot;: [ # The BCP-47 language code(s) for terms defined in the glossary.
109 # All entries are unique. The list contains at least two entries.
110 # Expected to be an exact match for GlossaryTerm.language_code.
111 &quot;A String&quot;,
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700112 ],
113 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700114 &quot;submitTime&quot;: &quot;A String&quot;, # Output only. When CreateGlossary was called.
115 &quot;languagePair&quot;: { # Used with unidirectional glossaries. # Used with unidirectional glossaries.
116 &quot;sourceLanguageCode&quot;: &quot;A String&quot;, # Required. The BCP-47 language code of the input text, for example,
117 # &quot;en-US&quot;. Expected to be an exact match for GlossaryTerm.language_code.
118 &quot;targetLanguageCode&quot;: &quot;A String&quot;, # Required. The BCP-47 language code for translation output, for example,
119 # &quot;zh-CN&quot;. Expected to be an exact match for GlossaryTerm.language_code.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700120 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700121 &quot;inputConfig&quot;: { # Input configuration for glossaries. # Required. Provides examples to build the glossary from.
122 # Total glossary must not exceed 10M Unicode codepoints.
123 &quot;gcsSource&quot;: { # The Google Cloud Storage location for the input content. # Required. Google Cloud Storage location of glossary data.
124 # File format is determined based on the filename extension. API returns
125 # [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file
126 # formats. Wildcards are not allowed. This must be a single file in one of
127 # the following formats:
128 #
129 # For unidirectional glossaries:
130 #
131 # - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated.
132 # The first column is source text. The second column is target text.
133 # The file must not contain headers. That is, the first row is data, not
134 # column names.
135 #
136 # - TMX (`.tmx`): TMX file with parallel data defining source/target term
137 # pairs.
138 #
139 # For equivalent term sets glossaries:
140 #
141 # - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700142 # in multiple languages. See documentation for more information -
143 # [glossaries](https://cloud.google.com/translate/docs/advanced/glossary).
Bu Sun Kim65020912020-05-20 12:08:20 -0700144 &quot;inputUri&quot;: &quot;A String&quot;, # Required. Source data URI. For example, `gs://my_bucket/my_object`.
145 },
146 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700147 &quot;entryCount&quot;: 42, # Output only. The number of entries defined in the glossary.
148 }
149
150 x__xgafv: string, V1 error format.
151 Allowed values
152 1 - v1 error format
153 2 - v2 error format
154
155Returns:
156 An object of the form:
157
158 { # This resource represents a long-running operation that is the result of a
159 # network API call.
160 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
161 # originally returns it. If you use the default HTTP mapping, the
162 # `name` should be a resource name ending with `operations/{unique_id}`.
163 &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.
164 # different programming environments, including REST APIs and RPC APIs. It is
165 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
166 # three pieces of data: error code, error message, and error details.
167 #
168 # You can find out more about this error model and how to work with it in the
169 # [API Design Guide](https://cloud.google.com/apis/design/errors).
170 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
171 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
172 # user-facing error message should be localized and sent in the
173 # google.rpc.Status.details field, or localized by the client.
174 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
175 # message types for APIs to use.
176 {
177 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
178 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700179 ],
180 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700181 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
182 # contains progress information and common metadata such as create time.
183 # Some services might not provide such metadata. Any method that returns a
184 # long-running operation should document the metadata type, if any.
185 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
186 },
187 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
188 # If `true`, the operation is completed, and either `error` or `response` is
189 # available.
190 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
191 # method returns no data on success, such as `Delete`, the response is
192 # `google.protobuf.Empty`. If the original method is standard
193 # `Get`/`Create`/`Update`, the response should be the resource. For other
194 # methods, the response should have the type `XxxResponse`, where `Xxx`
195 # is the original method name. For example, if the original method name
196 # is `TakeSnapshot()`, the inferred response type is
197 # `TakeSnapshotResponse`.
198 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
199 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700200 }</pre>
201</div>
202
203<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700204 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
205 <pre>Deletes a glossary, or cancels glossary construction
206if the glossary isn&#x27;t created yet.
207Returns NOT_FOUND, if the glossary doesn&#x27;t exist.
208
209Args:
210 name: string, Required. The name of the glossary to delete. (required)
211 x__xgafv: string, V1 error format.
212 Allowed values
213 1 - v1 error format
214 2 - v2 error format
215
216Returns:
217 An object of the form:
218
219 { # This resource represents a long-running operation that is the result of a
220 # network API call.
221 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
222 # originally returns it. If you use the default HTTP mapping, the
223 # `name` should be a resource name ending with `operations/{unique_id}`.
224 &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.
225 # different programming environments, including REST APIs and RPC APIs. It is
226 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
227 # three pieces of data: error code, error message, and error details.
228 #
229 # You can find out more about this error model and how to work with it in the
230 # [API Design Guide](https://cloud.google.com/apis/design/errors).
231 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
232 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
233 # user-facing error message should be localized and sent in the
234 # google.rpc.Status.details field, or localized by the client.
235 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
236 # message types for APIs to use.
237 {
238 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
239 },
240 ],
241 },
242 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
243 # contains progress information and common metadata such as create time.
244 # Some services might not provide such metadata. Any method that returns a
245 # long-running operation should document the metadata type, if any.
246 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
247 },
248 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
249 # If `true`, the operation is completed, and either `error` or `response` is
250 # available.
251 &quot;response&quot;: { # The normal response of the operation in case of success. If the original
252 # method returns no data on success, such as `Delete`, the response is
253 # `google.protobuf.Empty`. If the original method is standard
254 # `Get`/`Create`/`Update`, the response should be the resource. For other
255 # methods, the response should have the type `XxxResponse`, where `Xxx`
256 # is the original method name. For example, if the original method name
257 # is `TakeSnapshot()`, the inferred response type is
258 # `TakeSnapshotResponse`.
259 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
260 },
261 }</pre>
262</div>
263
264<div class="method">
265 <code class="details" id="get">get(name, x__xgafv=None)</code>
266 <pre>Gets a glossary. Returns NOT_FOUND, if the glossary doesn&#x27;t
267exist.
268
269Args:
270 name: string, Required. The name of the glossary to retrieve. (required)
271 x__xgafv: string, V1 error format.
272 Allowed values
273 1 - v1 error format
274 2 - v2 error format
275
276Returns:
277 An object of the form:
278
279 { # Represents a glossary built from user provided data.
280 &quot;endTime&quot;: &quot;A String&quot;, # Output only. When the glossary creation was finished.
281 &quot;name&quot;: &quot;A String&quot;, # Required. The resource name of the glossary. Glossary names have the form
282 # `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`.
283 &quot;languageCodesSet&quot;: { # Used with equivalent term set glossaries. # Used with equivalent term set glossaries.
284 &quot;languageCodes&quot;: [ # The BCP-47 language code(s) for terms defined in the glossary.
285 # All entries are unique. The list contains at least two entries.
286 # Expected to be an exact match for GlossaryTerm.language_code.
287 &quot;A String&quot;,
288 ],
289 },
290 &quot;submitTime&quot;: &quot;A String&quot;, # Output only. When CreateGlossary was called.
291 &quot;languagePair&quot;: { # Used with unidirectional glossaries. # Used with unidirectional glossaries.
292 &quot;sourceLanguageCode&quot;: &quot;A String&quot;, # Required. The BCP-47 language code of the input text, for example,
293 # &quot;en-US&quot;. Expected to be an exact match for GlossaryTerm.language_code.
294 &quot;targetLanguageCode&quot;: &quot;A String&quot;, # Required. The BCP-47 language code for translation output, for example,
295 # &quot;zh-CN&quot;. Expected to be an exact match for GlossaryTerm.language_code.
296 },
297 &quot;inputConfig&quot;: { # Input configuration for glossaries. # Required. Provides examples to build the glossary from.
298 # Total glossary must not exceed 10M Unicode codepoints.
299 &quot;gcsSource&quot;: { # The Google Cloud Storage location for the input content. # Required. Google Cloud Storage location of glossary data.
300 # File format is determined based on the filename extension. API returns
301 # [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file
302 # formats. Wildcards are not allowed. This must be a single file in one of
303 # the following formats:
304 #
305 # For unidirectional glossaries:
306 #
307 # - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated.
308 # The first column is source text. The second column is target text.
309 # The file must not contain headers. That is, the first row is data, not
310 # column names.
311 #
312 # - TMX (`.tmx`): TMX file with parallel data defining source/target term
313 # pairs.
314 #
315 # For equivalent term sets glossaries:
316 #
317 # - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms
318 # in multiple languages. See documentation for more information -
319 # [glossaries](https://cloud.google.com/translate/docs/advanced/glossary).
320 &quot;inputUri&quot;: &quot;A String&quot;, # Required. Source data URI. For example, `gs://my_bucket/my_object`.
321 },
322 },
323 &quot;entryCount&quot;: 42, # Output only. The number of entries defined in the glossary.
324 }</pre>
325</div>
326
327<div class="method">
328 <code class="details" id="list">list(parent, pageSize=None, filter=None, pageToken=None, x__xgafv=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700329 <pre>Lists glossaries in a project. Returns NOT_FOUND, if the project doesn&#x27;t
330exist.
331
332Args:
333 parent: string, Required. The name of the project from which to list all of the glossaries. (required)
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700334 pageSize: integer, Optional. Requested page size. The server may return fewer glossaries than
335requested. If unspecified, the server picks an appropriate default.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700336 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700339 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700343 x__xgafv: string, V1 error format.
344 Allowed values
345 1 - v1 error format
346 2 - v2 error format
347
348Returns:
349 An object of the form:
350
351 { # Response message for ListGlossaries.
Bu Sun Kim65020912020-05-20 12:08:20 -0700352 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve a page of results. Pass this value in the
353 # [ListGlossariesRequest.page_token] field in the subsequent call to
354 # `ListGlossaries` method to retrieve the next page of results.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700355 &quot;glossaries&quot;: [ # The list of glossaries for a project.
356 { # Represents a glossary built from user provided data.
357 &quot;endTime&quot;: &quot;A String&quot;, # Output only. When the glossary creation was finished.
358 &quot;name&quot;: &quot;A String&quot;, # Required. The resource name of the glossary. Glossary names have the form
359 # `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`.
360 &quot;languageCodesSet&quot;: { # Used with equivalent term set glossaries. # Used with equivalent term set glossaries.
361 &quot;languageCodes&quot;: [ # The BCP-47 language code(s) for terms defined in the glossary.
362 # All entries are unique. The list contains at least two entries.
363 # Expected to be an exact match for GlossaryTerm.language_code.
364 &quot;A String&quot;,
365 ],
366 },
367 &quot;submitTime&quot;: &quot;A String&quot;, # Output only. When CreateGlossary was called.
368 &quot;languagePair&quot;: { # Used with unidirectional glossaries. # Used with unidirectional glossaries.
369 &quot;sourceLanguageCode&quot;: &quot;A String&quot;, # Required. The BCP-47 language code of the input text, for example,
370 # &quot;en-US&quot;. Expected to be an exact match for GlossaryTerm.language_code.
371 &quot;targetLanguageCode&quot;: &quot;A String&quot;, # Required. The BCP-47 language code for translation output, for example,
372 # &quot;zh-CN&quot;. Expected to be an exact match for GlossaryTerm.language_code.
373 },
374 &quot;inputConfig&quot;: { # Input configuration for glossaries. # Required. Provides examples to build the glossary from.
375 # Total glossary must not exceed 10M Unicode codepoints.
376 &quot;gcsSource&quot;: { # The Google Cloud Storage location for the input content. # Required. Google Cloud Storage location of glossary data.
377 # File format is determined based on the filename extension. API returns
378 # [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file
379 # formats. Wildcards are not allowed. This must be a single file in one of
380 # the following formats:
381 #
382 # For unidirectional glossaries:
383 #
384 # - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated.
385 # The first column is source text. The second column is target text.
386 # The file must not contain headers. That is, the first row is data, not
387 # column names.
388 #
389 # - TMX (`.tmx`): TMX file with parallel data defining source/target term
390 # pairs.
391 #
392 # For equivalent term sets glossaries:
393 #
394 # - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms
395 # in multiple languages. See documentation for more information -
396 # [glossaries](https://cloud.google.com/translate/docs/advanced/glossary).
397 &quot;inputUri&quot;: &quot;A String&quot;, # Required. Source data URI. For example, `gs://my_bucket/my_object`.
398 },
399 },
400 &quot;entryCount&quot;: 42, # Output only. The number of entries defined in the glossary.
401 },
402 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700403 }</pre>
404</div>
405
406<div class="method">
407 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
408 <pre>Retrieves the next page of results.
409
410Args:
411 previous_request: The request for the previous page. (required)
412 previous_response: The response from the request for the previous page. (required)
413
414Returns:
415 A request object that you can call &#x27;execute()&#x27; on to request the next
416 page. Returns None if there are no more items in the collection.
417 </pre>
418</div>
419
420</body></html>