blob: 8810b0003aac5fd71d7edf88efabb7d277dfb62b [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 Kim4ed7d3f2020-05-27 12:20:54 -070087 <code><a href="#list">list(parent, filter=None, pageToken=None, pageSize=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 Kim4ed7d3f2020-05-27 12:20:54 -0700104 &quot;entryCount&quot;: 42, # Output only. The number of entries defined in the glossary.
105 &quot;inputConfig&quot;: { # Input configuration for glossaries. # Required. Provides examples to build the glossary from.
106 # Total glossary must not exceed 10M Unicode codepoints.
107 &quot;gcsSource&quot;: { # The Google Cloud Storage location for the input content. # Required. Google Cloud Storage location of glossary data.
108 # File format is determined based on the filename extension. API returns
109 # [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file
110 # formats. Wildcards are not allowed. This must be a single file in one of
111 # the following formats:
112 #
113 # For unidirectional glossaries:
114 #
115 # - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated.
116 # The first column is source text. The second column is target text.
117 # The file must not contain headers. That is, the first row is data, not
118 # column names.
119 #
120 # - TMX (`.tmx`): TMX file with parallel data defining source/target term
121 # pairs.
122 #
123 # For equivalent term sets glossaries:
124 #
125 # - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms
126 # in multiple languages. See documentation for more information -
127 # [glossaries](https://cloud.google.com/translate/docs/advanced/glossary).
128 &quot;inputUri&quot;: &quot;A String&quot;, # Required. Source data URI. For example, `gs://my_bucket/my_object`.
129 },
130 },
131 &quot;submitTime&quot;: &quot;A String&quot;, # Output only. When CreateGlossary was called.
132 &quot;name&quot;: &quot;A String&quot;, # Required. The resource name of the glossary. Glossary names have the form
133 # `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`.
134 &quot;languagePair&quot;: { # Used with unidirectional glossaries. # Used with unidirectional glossaries.
135 &quot;targetLanguageCode&quot;: &quot;A String&quot;, # Required. The BCP-47 language code for translation output, for example,
136 # &quot;zh-CN&quot;. Expected to be an exact match for GlossaryTerm.language_code.
137 &quot;sourceLanguageCode&quot;: &quot;A String&quot;, # Required. The BCP-47 language code of the input text, for example,
138 # &quot;en-US&quot;. Expected to be an exact match for GlossaryTerm.language_code.
139 },
140 &quot;languageCodesSet&quot;: { # Used with equivalent term set glossaries. # Used with equivalent term set glossaries.
141 &quot;languageCodes&quot;: [ # The BCP-47 language code(s) for terms defined in the glossary.
142 # All entries are unique. The list contains at least two entries.
143 # Expected to be an exact match for GlossaryTerm.language_code.
144 &quot;A String&quot;,
145 ],
146 },
147 &quot;endTime&quot;: &quot;A String&quot;, # Output only. When the glossary creation was finished.
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;response&quot;: { # The normal response of the operation in case of success. If the original
161 # method returns no data on success, such as `Delete`, the response is
162 # `google.protobuf.Empty`. If the original method is standard
163 # `Get`/`Create`/`Update`, the response should be the resource. For other
164 # methods, the response should have the type `XxxResponse`, where `Xxx`
165 # is the original method name. For example, if the original method name
166 # is `TakeSnapshot()`, the inferred response type is
167 # `TakeSnapshotResponse`.
168 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
169 },
170 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
171 # originally returns it. If you use the default HTTP mapping, the
172 # `name` should be a resource name ending with `operations/{unique_id}`.
173 &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.
174 # different programming environments, including REST APIs and RPC APIs. It is
175 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
176 # three pieces of data: error code, error message, and error details.
177 #
178 # You can find out more about this error model and how to work with it in the
179 # [API Design Guide](https://cloud.google.com/apis/design/errors).
180 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
181 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
182 # user-facing error message should be localized and sent in the
183 # google.rpc.Status.details field, or localized by the client.
184 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
185 # message types for APIs to use.
186 {
187 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
188 },
189 ],
190 },
191 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
192 # contains progress information and common metadata such as create time.
193 # Some services might not provide such metadata. Any method that returns a
194 # long-running operation should document the metadata type, if any.
195 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
196 },
197 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
198 # If `true`, the operation is completed, and either `error` or `response` is
199 # available.
200 }</pre>
201</div>
202
203<div class="method">
204 <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;response&quot;: { # The normal response of the operation in case of success. If the original
222 # method returns no data on success, such as `Delete`, the response is
223 # `google.protobuf.Empty`. If the original method is standard
224 # `Get`/`Create`/`Update`, the response should be the resource. For other
225 # methods, the response should have the type `XxxResponse`, where `Xxx`
226 # is the original method name. For example, if the original method name
227 # is `TakeSnapshot()`, the inferred response type is
228 # `TakeSnapshotResponse`.
229 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
230 },
231 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that
232 # originally returns it. If you use the default HTTP mapping, the
233 # `name` should be a resource name ending with `operations/{unique_id}`.
234 &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.
235 # different programming environments, including REST APIs and RPC APIs. It is
236 # used by [gRPC](https://github.com/grpc). Each `Status` message contains
237 # three pieces of data: error code, error message, and error details.
238 #
239 # You can find out more about this error model and how to work with it in the
240 # [API Design Guide](https://cloud.google.com/apis/design/errors).
241 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
242 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any
243 # user-facing error message should be localized and sent in the
244 # google.rpc.Status.details field, or localized by the client.
245 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of
246 # message types for APIs to use.
247 {
248 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
249 },
250 ],
251 },
252 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically
253 # contains progress information and common metadata such as create time.
254 # Some services might not provide such metadata. Any method that returns a
255 # long-running operation should document the metadata type, if any.
256 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
257 },
258 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress.
259 # If `true`, the operation is completed, and either `error` or `response` is
260 # available.
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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700280 &quot;entryCount&quot;: 42, # Output only. The number of entries defined in the glossary.
281 &quot;inputConfig&quot;: { # Input configuration for glossaries. # Required. Provides examples to build the glossary from.
282 # Total glossary must not exceed 10M Unicode codepoints.
283 &quot;gcsSource&quot;: { # The Google Cloud Storage location for the input content. # Required. Google Cloud Storage location of glossary data.
284 # File format is determined based on the filename extension. API returns
285 # [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file
286 # formats. Wildcards are not allowed. This must be a single file in one of
287 # the following formats:
288 #
289 # For unidirectional glossaries:
290 #
291 # - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated.
292 # The first column is source text. The second column is target text.
293 # The file must not contain headers. That is, the first row is data, not
294 # column names.
295 #
296 # - TMX (`.tmx`): TMX file with parallel data defining source/target term
297 # pairs.
298 #
299 # For equivalent term sets glossaries:
300 #
301 # - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700302 # in multiple languages. See documentation for more information -
303 # [glossaries](https://cloud.google.com/translate/docs/advanced/glossary).
Bu Sun Kim65020912020-05-20 12:08:20 -0700304 &quot;inputUri&quot;: &quot;A String&quot;, # Required. Source data URI. For example, `gs://my_bucket/my_object`.
305 },
306 },
307 &quot;submitTime&quot;: &quot;A String&quot;, # Output only. When CreateGlossary was called.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700308 &quot;name&quot;: &quot;A String&quot;, # Required. The resource name of the glossary. Glossary names have the form
309 # `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700310 &quot;languagePair&quot;: { # Used with unidirectional glossaries. # Used with unidirectional glossaries.
311 &quot;targetLanguageCode&quot;: &quot;A String&quot;, # Required. The BCP-47 language code for translation output, for example,
312 # &quot;zh-CN&quot;. Expected to be an exact match for GlossaryTerm.language_code.
313 &quot;sourceLanguageCode&quot;: &quot;A String&quot;, # Required. The BCP-47 language code of the input text, for example,
314 # &quot;en-US&quot;. Expected to be an exact match for GlossaryTerm.language_code.
315 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700316 &quot;languageCodesSet&quot;: { # Used with equivalent term set glossaries. # Used with equivalent term set glossaries.
317 &quot;languageCodes&quot;: [ # The BCP-47 language code(s) for terms defined in the glossary.
318 # All entries are unique. The list contains at least two entries.
319 # Expected to be an exact match for GlossaryTerm.language_code.
320 &quot;A String&quot;,
321 ],
322 },
323 &quot;endTime&quot;: &quot;A String&quot;, # Output only. When the glossary creation was finished.
Bu Sun Kim65020912020-05-20 12:08:20 -0700324 }</pre>
325</div>
326
327<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700328 <code class="details" id="list">list(parent, filter=None, pageToken=None, pageSize=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 Kim4ed7d3f2020-05-27 12:20:54 -0700334 filter: string, Optional. Filter specifying constraints of a list operation.
335Filtering is not supported yet, and the parameter currently has no effect.
336If missing, no filtering is performed.
Bu Sun Kim65020912020-05-20 12:08:20 -0700337 pageToken: string, Optional. A token identifying a page of results the server should return.
338Typically, this is the value of [ListGlossariesResponse.next_page_token]
339returned from the previous call to `ListGlossaries` method.
340The first page is returned if `page_token`is empty or missing.
341 pageSize: integer, Optional. Requested page size. The server may return fewer glossaries than
342requested. If unspecified, the server picks an appropriate default.
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.
352 &quot;glossaries&quot;: [ # The list of glossaries for a project.
353 { # Represents a glossary built from user provided data.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700354 &quot;entryCount&quot;: 42, # Output only. The number of entries defined in the glossary.
355 &quot;inputConfig&quot;: { # Input configuration for glossaries. # Required. Provides examples to build the glossary from.
356 # Total glossary must not exceed 10M Unicode codepoints.
357 &quot;gcsSource&quot;: { # The Google Cloud Storage location for the input content. # Required. Google Cloud Storage location of glossary data.
358 # File format is determined based on the filename extension. API returns
359 # [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file
360 # formats. Wildcards are not allowed. This must be a single file in one of
361 # the following formats:
362 #
363 # For unidirectional glossaries:
364 #
365 # - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated.
366 # The first column is source text. The second column is target text.
367 # The file must not contain headers. That is, the first row is data, not
368 # column names.
369 #
370 # - TMX (`.tmx`): TMX file with parallel data defining source/target term
371 # pairs.
372 #
373 # For equivalent term sets glossaries:
374 #
375 # - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms
376 # in multiple languages. See documentation for more information -
377 # [glossaries](https://cloud.google.com/translate/docs/advanced/glossary).
378 &quot;inputUri&quot;: &quot;A String&quot;, # Required. Source data URI. For example, `gs://my_bucket/my_object`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700379 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700380 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700381 &quot;submitTime&quot;: &quot;A String&quot;, # Output only. When CreateGlossary was called.
382 &quot;name&quot;: &quot;A String&quot;, # Required. The resource name of the glossary. Glossary names have the form
383 # `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`.
384 &quot;languagePair&quot;: { # Used with unidirectional glossaries. # Used with unidirectional glossaries.
385 &quot;targetLanguageCode&quot;: &quot;A String&quot;, # Required. The BCP-47 language code for translation output, for example,
386 # &quot;zh-CN&quot;. Expected to be an exact match for GlossaryTerm.language_code.
387 &quot;sourceLanguageCode&quot;: &quot;A String&quot;, # Required. The BCP-47 language code of the input text, for example,
388 # &quot;en-US&quot;. Expected to be an exact match for GlossaryTerm.language_code.
389 },
390 &quot;languageCodesSet&quot;: { # Used with equivalent term set glossaries. # Used with equivalent term set glossaries.
391 &quot;languageCodes&quot;: [ # The BCP-47 language code(s) for terms defined in the glossary.
392 # All entries are unique. The list contains at least two entries.
393 # Expected to be an exact match for GlossaryTerm.language_code.
394 &quot;A String&quot;,
395 ],
396 },
397 &quot;endTime&quot;: &quot;A String&quot;, # Output only. When the glossary creation was finished.
398 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700399 ],
400 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve a page of results. Pass this value in the
401 # [ListGlossariesRequest.page_token] field in the subsequent call to
402 # `ListGlossaries` method to retrieve the next page of results.
403 }</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>