blob: 557384fc2f89b5971d1681761845c18e785ccc92 [file] [log] [blame]
Yoshi Automation Botb6971b02020-11-26 17:16:03 -08001{
2 "version": "v1beta2",
3 "schemas": {
4 "TfLiteModel": {
5 "description": "Information that is specific to TfLite models.",
6 "properties": {
7 "gcsTfliteUri": {
8 "type": "string",
9 "description": "The TfLite file containing the model. (Stored in Google Cloud). The gcs_tflite_uri should have form: gs://some-bucket/some-model.tflite Note: If you update the file in the original location, it is necessary to call UpdateModel for ML to pick up and validate the updated file."
10 },
11 "sizeBytes": {
12 "description": "Output only. The size of the TFLite model",
13 "readOnly": true,
14 "type": "string"
15 },
16 "automlModel": {
17 "type": "string",
18 "description": "The AutoML model id referencing a model you created with the AutoML API. The name should have format 'projects//locations//models/' (This is the model resource name returned from the AutoML API)"
19 }
20 },
21 "id": "TfLiteModel",
22 "type": "object"
23 },
24 "Empty": {
25 "properties": {},
26 "type": "object",
27 "description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.",
28 "id": "Empty"
29 },
30 "Model": {
31 "id": "Model",
32 "description": "An ML model hosted in Firebase ML",
33 "type": "object",
34 "properties": {
35 "etag": {
36 "readOnly": true,
37 "description": "Output only. See RFC7232 https://tools.ietf.org/html/rfc7232#section-2.3",
38 "type": "string"
39 },
40 "createTime": {
41 "readOnly": true,
42 "type": "string",
43 "format": "google-datetime",
44 "description": "Output only. Timestamp when this model was created in Firebase ML."
45 },
46 "tags": {
47 "items": {
48 "type": "string"
49 },
50 "description": "User defined tags which can be used to group/filter models during listing",
51 "type": "array"
52 },
53 "state": {
54 "$ref": "ModelState",
55 "description": "State common to all model types. Includes publishing and validation information."
56 },
57 "name": {
58 "description": "The resource name of the Model. Model names have the form `projects/{project_id}/models/{model_id}` The name is ignored when creating a model.",
59 "type": "string"
60 },
61 "updateTime": {
62 "type": "string",
63 "readOnly": true,
64 "format": "google-datetime",
65 "description": "Output only. Timestamp when this model was updated in Firebase ML."
66 },
67 "activeOperations": {
68 "readOnly": true,
69 "items": {
70 "$ref": "Operation"
71 },
72 "description": "Output only. Lists operation ids associated with this model whose status is NOT done.",
73 "type": "array"
74 },
75 "tfliteModel": {
76 "description": "A TFLite Model",
77 "$ref": "TfLiteModel"
78 },
79 "displayName": {
80 "type": "string",
81 "description": "Required. The name of the model to create. 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. It must start with a letter."
82 },
83 "modelHash": {
84 "type": "string",
85 "description": "Output only. The model_hash will change if a new file is available for download.",
86 "readOnly": true
87 }
88 }
89 },
90 "ModelOperationMetadata": {
91 "type": "object",
92 "properties": {
93 "name": {
94 "type": "string",
95 "description": "The name of the model we are creating/updating The name must have the form `projects/{project_id}/models/{model_id}`"
96 },
97 "basicOperationStatus": {
98 "enumDescriptions": [
99 "The status is unspecified",
100 "The model file is being uploaded",
101 "The model file is being verified"
102 ],
103 "enum": [
104 "BASIC_OPERATION_STATUS_UNSPECIFIED",
105 "BASIC_OPERATION_STATUS_UPLOADING",
106 "BASIC_OPERATION_STATUS_VERIFYING"
107 ],
108 "type": "string"
109 }
110 },
111 "id": "ModelOperationMetadata",
112 "description": "This is returned in the longrunning operations for create/update."
113 },
114 "Status": {
115 "description": "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).",
116 "properties": {
117 "code": {
118 "format": "int32",
119 "type": "integer",
120 "description": "The status code, which should be an enum value of google.rpc.Code."
121 },
122 "details": {
123 "type": "array",
124 "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.",
125 "items": {
126 "type": "object",
127 "additionalProperties": {
128 "type": "any",
129 "description": "Properties of the object. Contains field @type with type URL."
130 }
131 }
132 },
133 "message": {
134 "type": "string",
135 "description": "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."
136 }
137 },
138 "type": "object",
139 "id": "Status"
140 },
141 "ListModelsResponse": {
142 "description": "The response for list models",
143 "properties": {
144 "models": {
145 "type": "array",
146 "description": "The list of models",
147 "items": {
148 "$ref": "Model"
149 }
150 },
151 "nextPageToken": {
152 "description": "Token to retrieve the next page of results, or empty if there are no more results in the list.",
153 "type": "string"
154 }
155 },
156 "id": "ListModelsResponse",
157 "type": "object"
158 },
159 "Operation": {
160 "properties": {
161 "name": {
162 "type": "string",
163 "description": "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}`."
164 },
165 "metadata": {
166 "type": "object",
167 "additionalProperties": {
168 "description": "Properties of the object. Contains field @type with type URL.",
169 "type": "any"
170 },
171 "description": "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."
172 },
173 "response": {
174 "description": "The normal response of the operation in case of success. 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`.",
175 "type": "object",
176 "additionalProperties": {
177 "description": "Properties of the object. Contains field @type with type URL.",
178 "type": "any"
179 }
180 },
181 "error": {
182 "description": "The error result of the operation in case of failure or cancellation.",
183 "$ref": "Status"
184 },
185 "done": {
186 "type": "boolean",
187 "description": "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."
188 }
189 },
190 "description": "This resource represents a long-running operation that is the result of a network API call.",
191 "type": "object",
192 "id": "Operation"
193 },
194 "ModelState": {
195 "type": "object",
196 "id": "ModelState",
197 "properties": {
198 "published": {
199 "description": "Indicates if this model has been published.",
200 "type": "boolean"
201 },
202 "validationError": {
203 "readOnly": true,
204 "$ref": "Status",
205 "description": "Output only. Indicates the latest validation error on the model if any. A model may have validation errors if there were problems during the model creation/update. e.g. in the case of a TfLiteModel, if a tflite model file was missing or in the wrong format. This field will be empty for valid models."
206 }
207 },
208 "description": "State common to all model types. Includes publishing and validation information."
209 }
210 },
211 "revision": "20200905",
212 "title": "Firebase ML API",
213 "protocol": "rest",
214 "canonicalName": "Firebase ML",
215 "baseUrl": "https://firebaseml.googleapis.com/",
216 "version_module": true,
217 "resources": {
218 "projects": {
219 "resources": {
220 "models": {
221 "methods": {
222 "patch": {
223 "response": {
224 "$ref": "Operation"
225 },
226 "httpMethod": "PATCH",
227 "parameters": {
228 "name": {
229 "description": "The resource name of the Model. Model names have the form `projects/{project_id}/models/{model_id}` The name is ignored when creating a model.",
230 "location": "path",
231 "type": "string",
232 "required": true,
233 "pattern": "^projects/[^/]+/models/[^/]+$"
234 },
235 "updateMask": {
236 "type": "string",
237 "description": "The update mask",
238 "location": "query",
239 "format": "google-fieldmask"
240 }
241 },
242 "id": "firebaseml.projects.models.patch",
243 "scopes": [
244 "https://www.googleapis.com/auth/cloud-platform"
245 ],
246 "flatPath": "v1beta2/projects/{projectsId}/models/{modelsId}",
247 "request": {
248 "$ref": "Model"
249 },
250 "parameterOrder": [
251 "name"
252 ],
253 "description": "Updates a model. The longrunning operation will eventually return a Model.",
254 "path": "v1beta2/{+name}"
255 },
256 "list": {
257 "flatPath": "v1beta2/projects/{projectsId}/models",
258 "parameters": {
259 "parent": {
260 "required": true,
261 "description": "Required. The name of the parent to list models for. The parent must have the form `projects/{project_id}'",
262 "pattern": "^projects/[^/]+$",
263 "location": "path",
264 "type": "string"
265 },
266 "filter": {
267 "description": "A filter for the list e.g. 'tags: abc' to list models which are tagged with \"abc\"",
268 "type": "string",
269 "location": "query"
270 },
271 "pageToken": {
272 "type": "string",
273 "location": "query",
274 "description": "The next_page_token value returned from a previous List request, if any."
275 },
276 "pageSize": {
277 "description": "The maximum number of items to return",
278 "type": "integer",
279 "format": "int32",
280 "location": "query"
281 }
282 },
283 "response": {
284 "$ref": "ListModelsResponse"
285 },
286 "httpMethod": "GET",
287 "path": "v1beta2/{+parent}/models",
288 "description": "Lists the models",
289 "parameterOrder": [
290 "parent"
291 ],
292 "id": "firebaseml.projects.models.list",
293 "scopes": [
294 "https://www.googleapis.com/auth/cloud-platform"
295 ]
296 },
297 "create": {
298 "httpMethod": "POST",
299 "id": "firebaseml.projects.models.create",
300 "description": "Creates a model in Firebase ML. The longrunning operation will eventually return a Model",
301 "scopes": [
302 "https://www.googleapis.com/auth/cloud-platform"
303 ],
304 "flatPath": "v1beta2/projects/{projectsId}/models",
305 "response": {
306 "$ref": "Operation"
307 },
308 "parameterOrder": [
309 "parent"
310 ],
311 "parameters": {
312 "parent": {
313 "required": true,
314 "pattern": "^projects/[^/]+$",
315 "description": "Required. The parent project resource where the model is to be created. The parent must have the form `projects/{project_id}`",
316 "location": "path",
317 "type": "string"
318 }
319 },
320 "path": "v1beta2/{+parent}/models",
321 "request": {
322 "$ref": "Model"
323 }
324 },
325 "delete": {
326 "flatPath": "v1beta2/projects/{projectsId}/models/{modelsId}",
327 "httpMethod": "DELETE",
328 "parameterOrder": [
329 "name"
330 ],
331 "scopes": [
332 "https://www.googleapis.com/auth/cloud-platform"
333 ],
334 "description": "Deletes a model",
335 "path": "v1beta2/{+name}",
336 "id": "firebaseml.projects.models.delete",
337 "response": {
338 "$ref": "Empty"
339 },
340 "parameters": {
341 "name": {
342 "description": "Required. The name of the model to delete. The name must have the form `projects/{project_id}/models/{model_id}`",
343 "type": "string",
344 "required": true,
345 "location": "path",
346 "pattern": "^projects/[^/]+/models/[^/]+$"
347 }
348 }
349 },
350 "get": {
351 "httpMethod": "GET",
352 "flatPath": "v1beta2/projects/{projectsId}/models/{modelsId}",
353 "parameterOrder": [
354 "name"
355 ],
356 "scopes": [
357 "https://www.googleapis.com/auth/cloud-platform"
358 ],
359 "response": {
360 "$ref": "Model"
361 },
362 "parameters": {
363 "name": {
364 "pattern": "^projects/[^/]+/models/[^/]+$",
365 "location": "path",
366 "description": "Required. The name of the model to get. The name must have the form `projects/{project_id}/models/{model_id}`",
367 "required": true,
368 "type": "string"
369 }
370 },
371 "description": "Gets a model resource.",
372 "path": "v1beta2/{+name}",
373 "id": "firebaseml.projects.models.get"
374 }
375 }
376 },
377 "operations": {
378 "methods": {
379 "get": {
380 "flatPath": "v1beta2/projects/{projectsId}/operations/{operationsId}",
381 "response": {
382 "$ref": "Operation"
383 },
384 "httpMethod": "GET",
385 "path": "v1beta2/{+name}",
386 "id": "firebaseml.projects.operations.get",
387 "parameterOrder": [
388 "name"
389 ],
390 "parameters": {
391 "name": {
392 "pattern": "^projects/[^/]+/operations/[^/]+$",
393 "location": "path",
394 "required": true,
395 "description": "The name of the operation resource.",
396 "type": "string"
397 }
398 },
399 "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
400 "scopes": [
401 "https://www.googleapis.com/auth/cloud-platform"
402 ]
403 }
404 }
405 }
406 }
407 }
408 },
409 "name": "firebaseml",
410 "servicePath": "",
411 "ownerName": "Google",
412 "parameters": {
413 "uploadType": {
414 "type": "string",
415 "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
416 "location": "query"
417 },
418 "oauth_token": {
419 "type": "string",
420 "description": "OAuth 2.0 token for the current user.",
421 "location": "query"
422 },
423 "quotaUser": {
424 "type": "string",
425 "location": "query",
426 "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters."
427 },
428 "callback": {
429 "type": "string",
430 "location": "query",
431 "description": "JSONP"
432 },
433 "prettyPrint": {
434 "location": "query",
435 "default": "true",
436 "type": "boolean",
437 "description": "Returns response with indentations and line breaks."
438 },
439 "key": {
440 "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
441 "type": "string",
442 "location": "query"
443 },
444 "$.xgafv": {
445 "enumDescriptions": [
446 "v1 error format",
447 "v2 error format"
448 ],
449 "description": "V1 error format.",
450 "location": "query",
451 "type": "string",
452 "enum": [
453 "1",
454 "2"
455 ]
456 },
457 "upload_protocol": {
458 "type": "string",
459 "location": "query",
460 "description": "Upload protocol for media (e.g. \"raw\", \"multipart\")."
461 },
462 "access_token": {
463 "location": "query",
464 "description": "OAuth access token.",
465 "type": "string"
466 },
467 "alt": {
468 "location": "query",
469 "description": "Data format for response.",
470 "enum": [
471 "json",
472 "media",
473 "proto"
474 ],
475 "enumDescriptions": [
476 "Responses with Content-Type of application/json",
477 "Media download with context-dependent Content-Type",
478 "Responses with Content-Type of application/x-protobuf"
479 ],
480 "type": "string",
481 "default": "json"
482 },
483 "fields": {
484 "location": "query",
485 "description": "Selector specifying which fields to include in a partial response.",
486 "type": "string"
487 }
488 },
489 "kind": "discovery#restDescription",
490 "icons": {
491 "x32": "http://www.google.com/images/icons/product/search-32.gif",
492 "x16": "http://www.google.com/images/icons/product/search-16.gif"
493 },
494 "discoveryVersion": "v1",
495 "batchPath": "batch",
496 "auth": {
497 "oauth2": {
498 "scopes": {
499 "https://www.googleapis.com/auth/cloud-platform": {
500 "description": "View and manage your data across Google Cloud Platform services"
501 }
502 }
503 }
504 },
505 "basePath": "",
506 "id": "firebaseml:v1beta2",
507 "fullyEncodeReservedExpansion": true,
508 "documentationLink": "https://firebase.google.com",
509 "rootUrl": "https://firebaseml.googleapis.com/",
510 "ownerDomain": "google.com",
511 "description": "Access custom machine learning models hosted via Firebase ML.",
512 "mtlsRootUrl": "https://firebaseml.mtls.googleapis.com/"
513}