Debian Codegraph @

docs/dyn/translate_v3.projects.locations.datasets.html

raw
1 <html><body>
2 <style>
3
4 body, 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
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, 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.datasets.html">datasets</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="translate_v3.projects.locations.datasets.examples.html">examples()</a></code>
79 </p>
80 <p class="firstline">Returns the examples Resource.</p>
81
82 <p class="toc_element">
83 <code><a href="#close">close()</a></code></p>
84 <p class="firstline">Close httplib2 connections.</p>
85 <p class="toc_element">
86 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
87 <p class="firstline">Creates a Dataset.</p>
88 <p class="toc_element">
89 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
90 <p class="firstline">Deletes a dataset and all of its contents.</p>
91 <p class="toc_element">
92 <code><a href="#exportData">exportData(dataset, body=None, x__xgafv=None)</a></code></p>
93 <p class="firstline">Exports dataset's data to the provided output location.</p>
94 <p class="toc_element">
95 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
96 <p class="firstline">Gets a Dataset.</p>
97 <p class="toc_element">
98 <code><a href="#importData">importData(dataset, body=None, x__xgafv=None)</a></code></p>
99 <p class="firstline">Import sentence pairs into translation Dataset.</p>
100 <p class="toc_element">
101 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
102 <p class="firstline">Lists datasets.</p>
103 <p class="toc_element">
104 <code><a href="#list_next">list_next()</a></code></p>
105 <p class="firstline">Retrieves the next page of results.</p>
106 <h3>Method Details</h3>
107 <div class="method">
108 <code class="details" id="close">close()</code>
109 <pre>Close httplib2 connections.</pre>
110 </div>
111
112 <div class="method">
113 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
114 <pre>Creates a Dataset.
115
116 Args:
117 parent: string, Required. The project name. (required)
118 body: object, The request body.
119 The object takes the form of:
120
121 { # A dataset that hosts the examples (sentence pairs) used for translation models.
122 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this dataset was created.
123 &quot;displayName&quot;: &quot;A String&quot;, # The name of the dataset to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9.
124 &quot;exampleCount&quot;: 42, # Output only. The number of examples in the dataset.
125 &quot;name&quot;: &quot;A String&quot;, # The resource name of the dataset, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}`
126 &quot;sourceLanguageCode&quot;: &quot;A String&quot;, # The BCP-47 language code of the source language.
127 &quot;targetLanguageCode&quot;: &quot;A String&quot;, # The BCP-47 language code of the target language.
128 &quot;testExampleCount&quot;: 42, # Output only. Number of test examples (sentence pairs).
129 &quot;trainExampleCount&quot;: 42, # Output only. Number of training examples (sentence pairs).
130 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this dataset was last updated.
131 &quot;validateExampleCount&quot;: 42, # Output only. Number of validation examples (sentence pairs).
132 }
133
134 x__xgafv: string, V1 error format.
135 Allowed values
136 1 - v1 error format
137 2 - v2 error format
138
139 Returns:
140 An object of the form:
141
142 { # This resource represents a long-running operation that is the result of a network API call.
143 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
144 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
145 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
146 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
147 {
148 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
149 },
150 ],
151 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
152 },
153 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
154 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
155 },
156 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
157 &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
158 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
159 },
160 }</pre>
161 </div>
162
163 <div class="method">
164 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
165 <pre>Deletes a dataset and all of its contents.
166
167 Args:
168 name: string, Required. The name of the dataset to delete. (required)
169 x__xgafv: string, V1 error format.
170 Allowed values
171 1 - v1 error format
172 2 - v2 error format
173
174 Returns:
175 An object of the form:
176
177 { # This resource represents a long-running operation that is the result of a network API call.
178 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
179 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
180 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
181 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
182 {
183 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
184 },
185 ],
186 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
187 },
188 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
189 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
190 },
191 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
192 &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
193 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
194 },
195 }</pre>
196 </div>
197
198 <div class="method">
199 <code class="details" id="exportData">exportData(dataset, body=None, x__xgafv=None)</code>
200 <pre>Exports dataset&#x27;s data to the provided output location.
201
202 Args:
203 dataset: string, Required. Name of the dataset. In form of `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` (required)
204 body: object, The request body.
205 The object takes the form of:
206
207 { # Request message for ExportData.
208 &quot;outputConfig&quot;: { # Output configuration for datasets. # Required. The config for the output content.
209 &quot;gcsDestination&quot;: { # The Google Cloud Storage location for the output content. # Google Cloud Storage destination to write the output.
210 &quot;outputUriPrefix&quot;: &quot;A String&quot;, # Required. Google Cloud Storage URI to output directory. For example, `gs://bucket/directory`. The requesting user must have write permission to the bucket. The directory will be created if it doesn&#x27;t exist.
211 },
212 },
213 }
214
215 x__xgafv: string, V1 error format.
216 Allowed values
217 1 - v1 error format
218 2 - v2 error format
219
220 Returns:
221 An object of the form:
222
223 { # This resource represents a long-running operation that is the result of a network API call.
224 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
225 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
226 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
227 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
228 {
229 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
230 },
231 ],
232 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
233 },
234 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
235 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
236 },
237 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
238 &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
239 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
240 },
241 }</pre>
242 </div>
243
244 <div class="method">
245 <code class="details" id="get">get(name, x__xgafv=None)</code>
246 <pre>Gets a Dataset.
247
248 Args:
249 name: string, Required. The resource name of the dataset to retrieve. (required)
250 x__xgafv: string, V1 error format.
251 Allowed values
252 1 - v1 error format
253 2 - v2 error format
254
255 Returns:
256 An object of the form:
257
258 { # A dataset that hosts the examples (sentence pairs) used for translation models.
259 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this dataset was created.
260 &quot;displayName&quot;: &quot;A String&quot;, # The name of the dataset to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9.
261 &quot;exampleCount&quot;: 42, # Output only. The number of examples in the dataset.
262 &quot;name&quot;: &quot;A String&quot;, # The resource name of the dataset, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}`
263 &quot;sourceLanguageCode&quot;: &quot;A String&quot;, # The BCP-47 language code of the source language.
264 &quot;targetLanguageCode&quot;: &quot;A String&quot;, # The BCP-47 language code of the target language.
265 &quot;testExampleCount&quot;: 42, # Output only. Number of test examples (sentence pairs).
266 &quot;trainExampleCount&quot;: 42, # Output only. Number of training examples (sentence pairs).
267 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this dataset was last updated.
268 &quot;validateExampleCount&quot;: 42, # Output only. Number of validation examples (sentence pairs).
269 }</pre>
270 </div>
271
272 <div class="method">
273 <code class="details" id="importData">importData(dataset, body=None, x__xgafv=None)</code>
274 <pre>Import sentence pairs into translation Dataset.
275
276 Args:
277 dataset: string, Required. Name of the dataset. In form of `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}` (required)
278 body: object, The request body.
279 The object takes the form of:
280
281 { # Request message for ImportData.
282 &quot;inputConfig&quot;: { # Input configuration for datasets. # Required. The config for the input content.
283 &quot;inputFiles&quot;: [ # Files containing the sentence pairs to be imported to the dataset.
284 { # An input file.
285 &quot;gcsSource&quot;: { # The Google Cloud Storage location for the input content. # Google Cloud Storage file source.
286 &quot;inputUri&quot;: &quot;A String&quot;, # Required. Source data URI. For example, `gs://my_bucket/my_object`.
287 },
288 &quot;usage&quot;: &quot;A String&quot;, # Optional. Usage of the file contents. Options are TRAIN|VALIDATION|TEST, or UNASSIGNED (by default) for auto split.
289 },
290 ],
291 },
292 }
293
294 x__xgafv: string, V1 error format.
295 Allowed values
296 1 - v1 error format
297 2 - v2 error format
298
299 Returns:
300 An object of the form:
301
302 { # This resource represents a long-running operation that is the result of a network API call.
303 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
304 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
305 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
306 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
307 {
308 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
309 },
310 ],
311 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
312 },
313 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
314 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
315 },
316 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
317 &quot;response&quot;: { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
318 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
319 },
320 }</pre>
321 </div>
322
323 <div class="method">
324 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
325 <pre>Lists datasets.
326
327 Args:
328 parent: string, Required. Name of the parent project. In form of `projects/{project-number-or-id}/locations/{location-id}` (required)
329 pageSize: integer, Optional. Requested page size. The server can return fewer results than requested.
330 pageToken: string, Optional. A token identifying a page of results for the server to return. Typically obtained from next_page_token field in the response of a ListDatasets call.
331 x__xgafv: string, V1 error format.
332 Allowed values
333 1 - v1 error format
334 2 - v2 error format
335
336 Returns:
337 An object of the form:
338
339 { # Response message for ListDatasets.
340 &quot;datasets&quot;: [ # The datasets read.
341 { # A dataset that hosts the examples (sentence pairs) used for translation models.
342 &quot;createTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this dataset was created.
343 &quot;displayName&quot;: &quot;A String&quot;, # The name of the dataset to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9.
344 &quot;exampleCount&quot;: 42, # Output only. The number of examples in the dataset.
345 &quot;name&quot;: &quot;A String&quot;, # The resource name of the dataset, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}`
346 &quot;sourceLanguageCode&quot;: &quot;A String&quot;, # The BCP-47 language code of the source language.
347 &quot;targetLanguageCode&quot;: &quot;A String&quot;, # The BCP-47 language code of the target language.
348 &quot;testExampleCount&quot;: 42, # Output only. Number of test examples (sentence pairs).
349 &quot;trainExampleCount&quot;: 42, # Output only. Number of training examples (sentence pairs).
350 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Timestamp when this dataset was last updated.
351 &quot;validateExampleCount&quot;: 42, # Output only. Number of validation examples (sentence pairs).
352 },
353 ],
354 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve next page of results. Pass this token to the page_token field in the ListDatasetsRequest to obtain the corresponding page.
355 }</pre>
356 </div>
357
358 <div class="method">
359 <code class="details" id="list_next">list_next()</code>
360 <pre>Retrieves the next page of results.
361
362 Args:
363 previous_request: The request for the previous page. (required)
364 previous_response: The response from the request for the previous page. (required)
365
366 Returns:
367 A request object that you can call &#x27;execute()&#x27; on to request the next
368 page. Returns None if there are no more items in the collection.
369 </pre>
370 </div>
371
372 </body></html>