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