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