blob: 088032f3108f63e6409847e6d6be626f5af3aa87 [file] [log] [blame]
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -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="ml_v1beta1.html">Google Cloud Machine Learning</a> . <a href="ml_v1beta1.projects.html">projects</a> . <a href="ml_v1beta1.projects.models.html">models</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="ml_v1beta1.projects.models.versions.html">versions()</a></code>
79</p>
80<p class="firstline">Returns the versions Resource.</p>
81
82<p class="toc_element">
83 <code><a href="#create">create(parent=None, body, x__xgafv=None)</a></code></p>
84<p class="firstline">Creates a model which will later contain one or more versions.</p>
85<p class="toc_element">
86 <code><a href="#delete">delete(name=None, x__xgafv=None)</a></code></p>
87<p class="firstline">Deletes a model.</p>
88<p class="toc_element">
89 <code><a href="#get">get(name=None, x__xgafv=None)</a></code></p>
90<p class="firstline">Gets information about a model, including its name, the description (if</p>
91<p class="toc_element">
92 <code><a href="#list">list(parent=None, pageToken=None, x__xgafv=None, pageSize=None)</a></code></p>
93<p class="firstline">Lists the models in a project.</p>
94<p class="toc_element">
95 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
96<p class="firstline">Retrieves the next page of results.</p>
97<h3>Method Details</h3>
98<div class="method">
99 <code class="details" id="create">create(parent=None, body, x__xgafv=None)</code>
100 <pre>Creates a model which will later contain one or more versions.
101
102You must add at least one version before you can request predictions from
103the model. Add versions by calling
104[projects.models.versions.create](/ml/reference/rest/v1beta1/projects.models.versions/create).
105
106Args:
107 parent: string, Required. The project name.
108
109Authorization: requires `Editor` role on the specified project. (required)
110 body: object, The request body. (required)
111 The object takes the form of:
112
113{ # Represents a machine learning solution.
114 #
115 # A model can have multiple versions, each of which is a deployed, trained
116 # model ready to receive prediction requests. The model itself is just a
117 # container.
118 "defaultVersion": { # Represents a version of the model. # Output only. The default version of the model. This version will be used to
119 # handle prediction requests that do not specify a version.
120 #
121 # You can change the default version by calling
122 # [projects.methods.versions.setDefault](/ml/reference/rest/v1beta1/projects.models.versions/setDefault).
123 #
124 # Each version is a trained model deployed in the cloud, ready to handle
125 # prediction requests. A model can have multiple versions. You can get
126 # information about all of the versions of a given model by calling
127 # [projects.models.versions.list](/ml/reference/rest/v1beta1/projects.models.versions/list).
128 "description": "A String", # Optional. The description specified for the version when it was created.
129 "lastUseTime": "A String", # Output only. The time the version was last used for prediction.
130 "deploymentUri": "A String", # Required. The Google Cloud Storage location of the trained model used to
131 # create the version. See the
132 # [overview of model deployment](/ml/docs/concepts/deployment-overview) for
133 # more informaiton.
134 #
135 # When passing Version to
136 # [projects.models.versions.create](/ml/reference/rest/v1beta1/projects.models.versions/create)
137 # the model service uses the specified location as the source of the model.
138 # Once deployed, the model version is hosted by the prediction service, so
139 # this location is useful only as a historical record.
140 "createTime": "A String", # Output only. The time the version was created.
141 "isDefault": True or False, # Output only. If true, this version will be used to handle prediction
142 # requests that do not specify a version.
143 #
144 # You can change the default version by calling
145 # [projects.methods.versions.setDefault](/ml/reference/rest/v1beta1/projects.models.versions/setDefault).
146 "name": "A String", # Required.The name specified for the version when it was created.
147 #
148 # The version name must be unique within the model it is created in.
149 },
150 "description": "A String", # Optional. The description specified for the model when it was created.
151 "name": "A String", # Required. The name specified for the model when it was created.
152 #
153 # The model name must be unique within the project it is created in.
154 }
155
156 x__xgafv: string, V1 error format.
157 Allowed values
158 1 - v1 error format
159 2 - v2 error format
160
161Returns:
162 An object of the form:
163
164 { # Represents a machine learning solution.
165 #
166 # A model can have multiple versions, each of which is a deployed, trained
167 # model ready to receive prediction requests. The model itself is just a
168 # container.
169 "defaultVersion": { # Represents a version of the model. # Output only. The default version of the model. This version will be used to
170 # handle prediction requests that do not specify a version.
171 #
172 # You can change the default version by calling
173 # [projects.methods.versions.setDefault](/ml/reference/rest/v1beta1/projects.models.versions/setDefault).
174 #
175 # Each version is a trained model deployed in the cloud, ready to handle
176 # prediction requests. A model can have multiple versions. You can get
177 # information about all of the versions of a given model by calling
178 # [projects.models.versions.list](/ml/reference/rest/v1beta1/projects.models.versions/list).
179 "description": "A String", # Optional. The description specified for the version when it was created.
180 "lastUseTime": "A String", # Output only. The time the version was last used for prediction.
181 "deploymentUri": "A String", # Required. The Google Cloud Storage location of the trained model used to
182 # create the version. See the
183 # [overview of model deployment](/ml/docs/concepts/deployment-overview) for
184 # more informaiton.
185 #
186 # When passing Version to
187 # [projects.models.versions.create](/ml/reference/rest/v1beta1/projects.models.versions/create)
188 # the model service uses the specified location as the source of the model.
189 # Once deployed, the model version is hosted by the prediction service, so
190 # this location is useful only as a historical record.
191 "createTime": "A String", # Output only. The time the version was created.
192 "isDefault": True or False, # Output only. If true, this version will be used to handle prediction
193 # requests that do not specify a version.
194 #
195 # You can change the default version by calling
196 # [projects.methods.versions.setDefault](/ml/reference/rest/v1beta1/projects.models.versions/setDefault).
197 "name": "A String", # Required.The name specified for the version when it was created.
198 #
199 # The version name must be unique within the model it is created in.
200 },
201 "description": "A String", # Optional. The description specified for the model when it was created.
202 "name": "A String", # Required. The name specified for the model when it was created.
203 #
204 # The model name must be unique within the project it is created in.
205 }</pre>
206</div>
207
208<div class="method">
209 <code class="details" id="delete">delete(name=None, x__xgafv=None)</code>
210 <pre>Deletes a model.
211
212You can only delete a model if there are no versions in it. You can delete
213versions by calling
214[projects.models.versions.delete](/ml/reference/rest/v1beta1/projects.models.versions/delete).
215
216Args:
217 name: string, Required. The name of the model.
218
219Authorization: requires `Editor` role on the parent project. (required)
220 x__xgafv: string, V1 error format.
221 Allowed values
222 1 - v1 error format
223 2 - v2 error format
224
225Returns:
226 An object of the form:
227
228 { # This resource represents a long-running operation that is the result of a
229 # network API call.
230 "metadata": { # Service-specific metadata associated with the operation. It typically
231 # contains progress information and common metadata such as create time.
232 # Some services might not provide such metadata. Any method that returns a
233 # long-running operation should document the metadata type, if any.
234 "a_key": "", # Properties of the object. Contains field @type with type URL.
235 },
236 "done": True or False, # If the value is `false`, it means the operation is still in progress.
237 # If true, the operation is completed, and either `error` or `response` is
238 # available.
239 "response": { # The normal response of the operation in case of success. If the original
240 # method returns no data on success, such as `Delete`, the response is
241 # `google.protobuf.Empty`. If the original method is standard
242 # `Get`/`Create`/`Update`, the response should be the resource. For other
243 # methods, the response should have the type `XxxResponse`, where `Xxx`
244 # is the original method name. For example, if the original method name
245 # is `TakeSnapshot()`, the inferred response type is
246 # `TakeSnapshotResponse`.
247 "a_key": "", # Properties of the object. Contains field @type with type URL.
248 },
249 "name": "A String", # The server-assigned name, which is only unique within the same service that
250 # originally returns it. If you use the default HTTP mapping, the
251 # `name` should have the format of `operations/some/unique/name`.
252 "error": { # The `Status` type defines a logical error model that is suitable for different # The error result of the operation in case of failure.
253 # programming environments, including REST APIs and RPC APIs. It is used by
254 # [gRPC](https://github.com/grpc). The error model is designed to be:
255 #
256 # - Simple to use and understand for most users
257 # - Flexible enough to meet unexpected needs
258 #
259 # # Overview
260 #
261 # The `Status` message contains three pieces of data: error code, error message,
262 # and error details. The error code should be an enum value of
263 # google.rpc.Code, but it may accept additional error codes if needed. The
264 # error message should be a developer-facing English message that helps
265 # developers *understand* and *resolve* the error. If a localized user-facing
266 # error message is needed, put the localized message in the error details or
267 # localize it in the client. The optional error details may contain arbitrary
268 # information about the error. There is a predefined set of error detail types
269 # in the package `google.rpc` which can be used for common error conditions.
270 #
271 # # Language mapping
272 #
273 # The `Status` message is the logical representation of the error model, but it
274 # is not necessarily the actual wire format. When the `Status` message is
275 # exposed in different client libraries and different wire protocols, it can be
276 # mapped differently. For example, it will likely be mapped to some exceptions
277 # in Java, but more likely mapped to some error codes in C.
278 #
279 # # Other uses
280 #
281 # The error model and the `Status` message can be used in a variety of
282 # environments, either with or without APIs, to provide a
283 # consistent developer experience across different environments.
284 #
285 # Example uses of this error model include:
286 #
287 # - Partial errors. If a service needs to return partial errors to the client,
288 # it may embed the `Status` in the normal response to indicate the partial
289 # errors.
290 #
291 # - Workflow errors. A typical workflow has multiple steps. Each step may
292 # have a `Status` message for error reporting purpose.
293 #
294 # - Batch operations. If a client uses batch request and batch response, the
295 # `Status` message should be used directly inside batch response, one for
296 # each error sub-response.
297 #
298 # - Asynchronous operations. If an API call embeds asynchronous operation
299 # results in its response, the status of those operations should be
300 # represented directly using the `Status` message.
301 #
302 # - Logging. If some API errors are stored in logs, the message `Status` could
303 # be used directly after any stripping needed for security/privacy reasons.
304 "message": "A String", # A developer-facing error message, which should be in English. Any
305 # user-facing error message should be localized and sent in the
306 # google.rpc.Status.details field, or localized by the client.
307 "code": 42, # The status code, which should be an enum value of google.rpc.Code.
308 "details": [ # A list of messages that carry the error details. There will be a
309 # common set of message types for APIs to use.
310 {
311 "a_key": "", # Properties of the object. Contains field @type with type URL.
312 },
313 ],
314 },
315 }</pre>
316</div>
317
318<div class="method">
319 <code class="details" id="get">get(name=None, x__xgafv=None)</code>
320 <pre>Gets information about a model, including its name, the description (if
321set), and the default version (if at least one version of the model has
322been deployed).
323
324Args:
325 name: string, Required. The name of the model.
326
327Authorization: requires `Viewer` role on the parent project. (required)
328 x__xgafv: string, V1 error format.
329 Allowed values
330 1 - v1 error format
331 2 - v2 error format
332
333Returns:
334 An object of the form:
335
336 { # Represents a machine learning solution.
337 #
338 # A model can have multiple versions, each of which is a deployed, trained
339 # model ready to receive prediction requests. The model itself is just a
340 # container.
341 "defaultVersion": { # Represents a version of the model. # Output only. The default version of the model. This version will be used to
342 # handle prediction requests that do not specify a version.
343 #
344 # You can change the default version by calling
345 # [projects.methods.versions.setDefault](/ml/reference/rest/v1beta1/projects.models.versions/setDefault).
346 #
347 # Each version is a trained model deployed in the cloud, ready to handle
348 # prediction requests. A model can have multiple versions. You can get
349 # information about all of the versions of a given model by calling
350 # [projects.models.versions.list](/ml/reference/rest/v1beta1/projects.models.versions/list).
351 "description": "A String", # Optional. The description specified for the version when it was created.
352 "lastUseTime": "A String", # Output only. The time the version was last used for prediction.
353 "deploymentUri": "A String", # Required. The Google Cloud Storage location of the trained model used to
354 # create the version. See the
355 # [overview of model deployment](/ml/docs/concepts/deployment-overview) for
356 # more informaiton.
357 #
358 # When passing Version to
359 # [projects.models.versions.create](/ml/reference/rest/v1beta1/projects.models.versions/create)
360 # the model service uses the specified location as the source of the model.
361 # Once deployed, the model version is hosted by the prediction service, so
362 # this location is useful only as a historical record.
363 "createTime": "A String", # Output only. The time the version was created.
364 "isDefault": True or False, # Output only. If true, this version will be used to handle prediction
365 # requests that do not specify a version.
366 #
367 # You can change the default version by calling
368 # [projects.methods.versions.setDefault](/ml/reference/rest/v1beta1/projects.models.versions/setDefault).
369 "name": "A String", # Required.The name specified for the version when it was created.
370 #
371 # The version name must be unique within the model it is created in.
372 },
373 "description": "A String", # Optional. The description specified for the model when it was created.
374 "name": "A String", # Required. The name specified for the model when it was created.
375 #
376 # The model name must be unique within the project it is created in.
377 }</pre>
378</div>
379
380<div class="method">
381 <code class="details" id="list">list(parent=None, pageToken=None, x__xgafv=None, pageSize=None)</code>
382 <pre>Lists the models in a project.
383
384Each project can contain multiple models, and each model can have multiple
385versions.
386
387Args:
388 parent: string, Required. The name of the project whose models are to be listed.
389
390Authorization: requires `Viewer` role on the specified project. (required)
391 pageToken: string, Optional. A page token to request the next page of results.
392
393You get the token from the `next_page_token` field of the response from
394the previous call.
395 x__xgafv: string, V1 error format.
396 Allowed values
397 1 - v1 error format
398 2 - v2 error format
399 pageSize: integer, Optional. The number of models to retrieve per "page" of results. If there
400are more remaining results than this number, the response message will
401contain a valid value in the `next_page_token` field.
402
403The default value is 20, and the maximum page size is 100.
404
405Returns:
406 An object of the form:
407
408 { # Response message for the ListModels method.
409 "models": [ # The list of models.
410 { # Represents a machine learning solution.
411 #
412 # A model can have multiple versions, each of which is a deployed, trained
413 # model ready to receive prediction requests. The model itself is just a
414 # container.
415 "defaultVersion": { # Represents a version of the model. # Output only. The default version of the model. This version will be used to
416 # handle prediction requests that do not specify a version.
417 #
418 # You can change the default version by calling
419 # [projects.methods.versions.setDefault](/ml/reference/rest/v1beta1/projects.models.versions/setDefault).
420 #
421 # Each version is a trained model deployed in the cloud, ready to handle
422 # prediction requests. A model can have multiple versions. You can get
423 # information about all of the versions of a given model by calling
424 # [projects.models.versions.list](/ml/reference/rest/v1beta1/projects.models.versions/list).
425 "description": "A String", # Optional. The description specified for the version when it was created.
426 "lastUseTime": "A String", # Output only. The time the version was last used for prediction.
427 "deploymentUri": "A String", # Required. The Google Cloud Storage location of the trained model used to
428 # create the version. See the
429 # [overview of model deployment](/ml/docs/concepts/deployment-overview) for
430 # more informaiton.
431 #
432 # When passing Version to
433 # [projects.models.versions.create](/ml/reference/rest/v1beta1/projects.models.versions/create)
434 # the model service uses the specified location as the source of the model.
435 # Once deployed, the model version is hosted by the prediction service, so
436 # this location is useful only as a historical record.
437 "createTime": "A String", # Output only. The time the version was created.
438 "isDefault": True or False, # Output only. If true, this version will be used to handle prediction
439 # requests that do not specify a version.
440 #
441 # You can change the default version by calling
442 # [projects.methods.versions.setDefault](/ml/reference/rest/v1beta1/projects.models.versions/setDefault).
443 "name": "A String", # Required.The name specified for the version when it was created.
444 #
445 # The version name must be unique within the model it is created in.
446 },
447 "description": "A String", # Optional. The description specified for the model when it was created.
448 "name": "A String", # Required. The name specified for the model when it was created.
449 #
450 # The model name must be unique within the project it is created in.
451 },
452 ],
453 "nextPageToken": "A String", # Optional. Pass this token as the `page_token` field of the request for a
454 # subsequent call.
455 }</pre>
456</div>
457
458<div class="method">
459 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
460 <pre>Retrieves the next page of results.
461
462Args:
463 previous_request: The request for the previous page. (required)
464 previous_response: The response from the request for the previous page. (required)
465
466Returns:
467 A request object that you can call 'execute()' on to request the next
468 page. Returns None if there are no more items in the collection.
469 </pre>
470</div>
471
472</body></html>