| 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="firebaseml_v1beta2.html">Firebase ML API</a> . <a href="firebaseml_v1beta2.projects.html">projects</a> . <a href="firebaseml_v1beta2.projects.models.html">models</a></h1> |
| 76 |
<h2>Instance Methods</h2> |
| 77 |
<p class="toc_element"> |
| 78 |
<code><a href="#close">close()</a></code></p> |
| 79 |
<p class="firstline">Close httplib2 connections.</p> |
| 80 |
<p class="toc_element"> |
| 81 |
<code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p> |
| 82 |
<p class="firstline">Creates a model in Firebase ML. The longrunning operation will eventually return a Model</p> |
| 83 |
<p class="toc_element"> |
| 84 |
<code><a href="#delete">delete(name, x__xgafv=None)</a></code></p> |
| 85 |
<p class="firstline">Deletes a model</p> |
| 86 |
<p class="toc_element"> |
| 87 |
<code><a href="#download">download(name, x__xgafv=None)</a></code></p> |
| 88 |
<p class="firstline">Gets Download information for a model. This is meant for downloading model resources onto devices. It gives very limited information about the model.</p> |
| 89 |
<p class="toc_element"> |
| 90 |
<code><a href="#get">get(name, x__xgafv=None)</a></code></p> |
| 91 |
<p class="firstline">Gets a model resource.</p> |
| 92 |
<p class="toc_element"> |
| 93 |
<code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p> |
| 94 |
<p class="firstline">Lists the models</p> |
| 95 |
<p class="toc_element"> |
| 96 |
<code><a href="#list_next">list_next()</a></code></p> |
| 97 |
<p class="firstline">Retrieves the next page of results.</p> |
| 98 |
<p class="toc_element"> |
| 99 |
<code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p> |
| 100 |
<p class="firstline">Updates a model. The longrunning operation will eventually return a Model.</p> |
| 101 |
<h3>Method Details</h3> |
| 102 |
<div class="method"> |
| 103 |
<code class="details" id="close">close()</code> |
| 104 |
<pre>Close httplib2 connections.</pre> |
| 105 |
</div> |
| 106 |
|
| 107 |
<div class="method"> |
| 108 |
<code class="details" id="create">create(parent, body=None, x__xgafv=None)</code> |
| 109 |
<pre>Creates a model in Firebase ML. The longrunning operation will eventually return a Model |
| 110 |
|
| 111 |
Args: |
| 112 |
parent: string, Required. The parent project resource where the model is to be created. The parent must have the form `projects/{project_id}` (required) |
| 113 |
body: object, The request body. |
| 114 |
The object takes the form of: |
| 115 |
|
| 116 |
{ # An ML model hosted in Firebase ML |
| 117 |
"activeOperations": [ # Output only. Lists operation ids associated with this model whose status is NOT done. |
| 118 |
{ # This resource represents a long-running operation that is the result of a network API call. |
| 119 |
"done": 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. |
| 120 |
"error": { # 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. |
| 121 |
"code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 122 |
"details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. |
| 123 |
{ |
| 124 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 125 |
}, |
| 126 |
], |
| 127 |
"message": "A String", # 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. |
| 128 |
}, |
| 129 |
"metadata": { # 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. |
| 130 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 131 |
}, |
| 132 |
"name": "A String", # 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}`. |
| 133 |
"response": { # 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`. |
| 134 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 135 |
}, |
| 136 |
}, |
| 137 |
], |
| 138 |
"createTime": "A String", # Output only. Timestamp when this model was created in Firebase ML. |
| 139 |
"displayName": "A String", # 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. |
| 140 |
"etag": "A String", # Output only. See RFC7232 https://tools.ietf.org/html/rfc7232#section-2.3 |
| 141 |
"modelHash": "A String", # Output only. The model_hash will change if a new file is available for download. |
| 142 |
"name": "A String", # 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. |
| 143 |
"state": { # State common to all model types. Includes publishing and validation information. # State common to all model types. Includes publishing and validation information. |
| 144 |
"published": True or False, # Indicates if this model has been published. |
| 145 |
"validationError": { # 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). # 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. |
| 146 |
"code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 147 |
"details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. |
| 148 |
{ |
| 149 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 150 |
}, |
| 151 |
], |
| 152 |
"message": "A String", # 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. |
| 153 |
}, |
| 154 |
}, |
| 155 |
"tags": [ # User defined tags which can be used to group/filter models during listing |
| 156 |
"A String", |
| 157 |
], |
| 158 |
"tfliteModel": { # Information that is specific to TfLite models. # A TFLite Model |
| 159 |
"automlModel": "A String", # 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) |
| 160 |
"gcsTfliteUri": "A String", # 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. |
| 161 |
"sizeBytes": "A String", # Output only. The size of the TFLite model |
| 162 |
}, |
| 163 |
"updateTime": "A String", # Output only. Timestamp when this model was updated in Firebase ML. |
| 164 |
} |
| 165 |
|
| 166 |
x__xgafv: string, V1 error format. |
| 167 |
Allowed values |
| 168 |
1 - v1 error format |
| 169 |
2 - v2 error format |
| 170 |
|
| 171 |
Returns: |
| 172 |
An object of the form: |
| 173 |
|
| 174 |
{ # This resource represents a long-running operation that is the result of a network API call. |
| 175 |
"done": 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. |
| 176 |
"error": { # 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. |
| 177 |
"code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 178 |
"details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. |
| 179 |
{ |
| 180 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 181 |
}, |
| 182 |
], |
| 183 |
"message": "A String", # 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. |
| 184 |
}, |
| 185 |
"metadata": { # 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. |
| 186 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 187 |
}, |
| 188 |
"name": "A String", # 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}`. |
| 189 |
"response": { # 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`. |
| 190 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 191 |
}, |
| 192 |
}</pre> |
| 193 |
</div> |
| 194 |
|
| 195 |
<div class="method"> |
| 196 |
<code class="details" id="delete">delete(name, x__xgafv=None)</code> |
| 197 |
<pre>Deletes a model |
| 198 |
|
| 199 |
Args: |
| 200 |
name: string, Required. The name of the model to delete. The name must have the form `projects/{project_id}/models/{model_id}` (required) |
| 201 |
x__xgafv: string, V1 error format. |
| 202 |
Allowed values |
| 203 |
1 - v1 error format |
| 204 |
2 - v2 error format |
| 205 |
|
| 206 |
Returns: |
| 207 |
An object of the form: |
| 208 |
|
| 209 |
{ # 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); } |
| 210 |
}</pre> |
| 211 |
</div> |
| 212 |
|
| 213 |
<div class="method"> |
| 214 |
<code class="details" id="download">download(name, x__xgafv=None)</code> |
| 215 |
<pre>Gets Download information for a model. This is meant for downloading model resources onto devices. It gives very limited information about the model. |
| 216 |
|
| 217 |
Args: |
| 218 |
name: string, Required. The name of the model to download. The name must have the form `projects/{project}/models/{model}` (required) |
| 219 |
x__xgafv: string, V1 error format. |
| 220 |
Allowed values |
| 221 |
1 - v1 error format |
| 222 |
2 - v2 error format |
| 223 |
|
| 224 |
Returns: |
| 225 |
An object of the form: |
| 226 |
|
| 227 |
{ # The response for downloading a model to device. |
| 228 |
"downloadUri": "A String", # Output only. A download URI for the model/zip file. |
| 229 |
"expireTime": "A String", # Output only. The time that the download URI link expires. If the link has expired, the REST call must be repeated. |
| 230 |
"modelFormat": "A String", # Output only. The format of the model being downloaded. |
| 231 |
"sizeBytes": "A String", # Output only. The size of the file(s), if this information is available. |
| 232 |
}</pre> |
| 233 |
</div> |
| 234 |
|
| 235 |
<div class="method"> |
| 236 |
<code class="details" id="get">get(name, x__xgafv=None)</code> |
| 237 |
<pre>Gets a model resource. |
| 238 |
|
| 239 |
Args: |
| 240 |
name: string, Required. The name of the model to get. The name must have the form `projects/{project_id}/models/{model_id}` (required) |
| 241 |
x__xgafv: string, V1 error format. |
| 242 |
Allowed values |
| 243 |
1 - v1 error format |
| 244 |
2 - v2 error format |
| 245 |
|
| 246 |
Returns: |
| 247 |
An object of the form: |
| 248 |
|
| 249 |
{ # An ML model hosted in Firebase ML |
| 250 |
"activeOperations": [ # Output only. Lists operation ids associated with this model whose status is NOT done. |
| 251 |
{ # This resource represents a long-running operation that is the result of a network API call. |
| 252 |
"done": 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. |
| 253 |
"error": { # 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. |
| 254 |
"code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 255 |
"details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. |
| 256 |
{ |
| 257 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 258 |
}, |
| 259 |
], |
| 260 |
"message": "A String", # 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. |
| 261 |
}, |
| 262 |
"metadata": { # 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. |
| 263 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 264 |
}, |
| 265 |
"name": "A String", # 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}`. |
| 266 |
"response": { # 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`. |
| 267 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 268 |
}, |
| 269 |
}, |
| 270 |
], |
| 271 |
"createTime": "A String", # Output only. Timestamp when this model was created in Firebase ML. |
| 272 |
"displayName": "A String", # 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. |
| 273 |
"etag": "A String", # Output only. See RFC7232 https://tools.ietf.org/html/rfc7232#section-2.3 |
| 274 |
"modelHash": "A String", # Output only. The model_hash will change if a new file is available for download. |
| 275 |
"name": "A String", # 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. |
| 276 |
"state": { # State common to all model types. Includes publishing and validation information. # State common to all model types. Includes publishing and validation information. |
| 277 |
"published": True or False, # Indicates if this model has been published. |
| 278 |
"validationError": { # 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). # 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. |
| 279 |
"code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 280 |
"details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. |
| 281 |
{ |
| 282 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 283 |
}, |
| 284 |
], |
| 285 |
"message": "A String", # 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. |
| 286 |
}, |
| 287 |
}, |
| 288 |
"tags": [ # User defined tags which can be used to group/filter models during listing |
| 289 |
"A String", |
| 290 |
], |
| 291 |
"tfliteModel": { # Information that is specific to TfLite models. # A TFLite Model |
| 292 |
"automlModel": "A String", # 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) |
| 293 |
"gcsTfliteUri": "A String", # 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. |
| 294 |
"sizeBytes": "A String", # Output only. The size of the TFLite model |
| 295 |
}, |
| 296 |
"updateTime": "A String", # Output only. Timestamp when this model was updated in Firebase ML. |
| 297 |
}</pre> |
| 298 |
</div> |
| 299 |
|
| 300 |
<div class="method"> |
| 301 |
<code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code> |
| 302 |
<pre>Lists the models |
| 303 |
|
| 304 |
Args: |
| 305 |
parent: string, Required. The name of the parent to list models for. The parent must have the form `projects/{project_id}' (required) |
| 306 |
filter: string, A filter for the list e.g. 'tags: abc' to list models which are tagged with "abc" |
| 307 |
pageSize: integer, The maximum number of items to return |
| 308 |
pageToken: string, The next_page_token value returned from a previous List request, if any. |
| 309 |
x__xgafv: string, V1 error format. |
| 310 |
Allowed values |
| 311 |
1 - v1 error format |
| 312 |
2 - v2 error format |
| 313 |
|
| 314 |
Returns: |
| 315 |
An object of the form: |
| 316 |
|
| 317 |
{ # The response for list models |
| 318 |
"models": [ # The list of models |
| 319 |
{ # An ML model hosted in Firebase ML |
| 320 |
"activeOperations": [ # Output only. Lists operation ids associated with this model whose status is NOT done. |
| 321 |
{ # This resource represents a long-running operation that is the result of a network API call. |
| 322 |
"done": 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. |
| 323 |
"error": { # 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. |
| 324 |
"code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 325 |
"details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. |
| 326 |
{ |
| 327 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 328 |
}, |
| 329 |
], |
| 330 |
"message": "A String", # 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. |
| 331 |
}, |
| 332 |
"metadata": { # 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. |
| 333 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 334 |
}, |
| 335 |
"name": "A String", # 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}`. |
| 336 |
"response": { # 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`. |
| 337 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 338 |
}, |
| 339 |
}, |
| 340 |
], |
| 341 |
"createTime": "A String", # Output only. Timestamp when this model was created in Firebase ML. |
| 342 |
"displayName": "A String", # 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. |
| 343 |
"etag": "A String", # Output only. See RFC7232 https://tools.ietf.org/html/rfc7232#section-2.3 |
| 344 |
"modelHash": "A String", # Output only. The model_hash will change if a new file is available for download. |
| 345 |
"name": "A String", # 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. |
| 346 |
"state": { # State common to all model types. Includes publishing and validation information. # State common to all model types. Includes publishing and validation information. |
| 347 |
"published": True or False, # Indicates if this model has been published. |
| 348 |
"validationError": { # 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). # 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. |
| 349 |
"code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 350 |
"details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. |
| 351 |
{ |
| 352 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 353 |
}, |
| 354 |
], |
| 355 |
"message": "A String", # 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. |
| 356 |
}, |
| 357 |
}, |
| 358 |
"tags": [ # User defined tags which can be used to group/filter models during listing |
| 359 |
"A String", |
| 360 |
], |
| 361 |
"tfliteModel": { # Information that is specific to TfLite models. # A TFLite Model |
| 362 |
"automlModel": "A String", # 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) |
| 363 |
"gcsTfliteUri": "A String", # 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. |
| 364 |
"sizeBytes": "A String", # Output only. The size of the TFLite model |
| 365 |
}, |
| 366 |
"updateTime": "A String", # Output only. Timestamp when this model was updated in Firebase ML. |
| 367 |
}, |
| 368 |
], |
| 369 |
"nextPageToken": "A String", # Token to retrieve the next page of results, or empty if there are no more results in the list. |
| 370 |
}</pre> |
| 371 |
</div> |
| 372 |
|
| 373 |
<div class="method"> |
| 374 |
<code class="details" id="list_next">list_next()</code> |
| 375 |
<pre>Retrieves the next page of results. |
| 376 |
|
| 377 |
Args: |
| 378 |
previous_request: The request for the previous page. (required) |
| 379 |
previous_response: The response from the request for the previous page. (required) |
| 380 |
|
| 381 |
Returns: |
| 382 |
A request object that you can call 'execute()' on to request the next |
| 383 |
page. Returns None if there are no more items in the collection. |
| 384 |
</pre> |
| 385 |
</div> |
| 386 |
|
| 387 |
<div class="method"> |
| 388 |
<code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code> |
| 389 |
<pre>Updates a model. The longrunning operation will eventually return a Model. |
| 390 |
|
| 391 |
Args: |
| 392 |
name: string, 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. (required) |
| 393 |
body: object, The request body. |
| 394 |
The object takes the form of: |
| 395 |
|
| 396 |
{ # An ML model hosted in Firebase ML |
| 397 |
"activeOperations": [ # Output only. Lists operation ids associated with this model whose status is NOT done. |
| 398 |
{ # This resource represents a long-running operation that is the result of a network API call. |
| 399 |
"done": 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. |
| 400 |
"error": { # 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. |
| 401 |
"code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 402 |
"details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. |
| 403 |
{ |
| 404 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 405 |
}, |
| 406 |
], |
| 407 |
"message": "A String", # 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. |
| 408 |
}, |
| 409 |
"metadata": { # 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. |
| 410 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 411 |
}, |
| 412 |
"name": "A String", # 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}`. |
| 413 |
"response": { # 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`. |
| 414 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 415 |
}, |
| 416 |
}, |
| 417 |
], |
| 418 |
"createTime": "A String", # Output only. Timestamp when this model was created in Firebase ML. |
| 419 |
"displayName": "A String", # 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. |
| 420 |
"etag": "A String", # Output only. See RFC7232 https://tools.ietf.org/html/rfc7232#section-2.3 |
| 421 |
"modelHash": "A String", # Output only. The model_hash will change if a new file is available for download. |
| 422 |
"name": "A String", # 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. |
| 423 |
"state": { # State common to all model types. Includes publishing and validation information. # State common to all model types. Includes publishing and validation information. |
| 424 |
"published": True or False, # Indicates if this model has been published. |
| 425 |
"validationError": { # 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). # 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. |
| 426 |
"code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 427 |
"details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. |
| 428 |
{ |
| 429 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 430 |
}, |
| 431 |
], |
| 432 |
"message": "A String", # 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. |
| 433 |
}, |
| 434 |
}, |
| 435 |
"tags": [ # User defined tags which can be used to group/filter models during listing |
| 436 |
"A String", |
| 437 |
], |
| 438 |
"tfliteModel": { # Information that is specific to TfLite models. # A TFLite Model |
| 439 |
"automlModel": "A String", # 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) |
| 440 |
"gcsTfliteUri": "A String", # 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. |
| 441 |
"sizeBytes": "A String", # Output only. The size of the TFLite model |
| 442 |
}, |
| 443 |
"updateTime": "A String", # Output only. Timestamp when this model was updated in Firebase ML. |
| 444 |
} |
| 445 |
|
| 446 |
updateMask: string, The update mask |
| 447 |
x__xgafv: string, V1 error format. |
| 448 |
Allowed values |
| 449 |
1 - v1 error format |
| 450 |
2 - v2 error format |
| 451 |
|
| 452 |
Returns: |
| 453 |
An object of the form: |
| 454 |
|
| 455 |
{ # This resource represents a long-running operation that is the result of a network API call. |
| 456 |
"done": 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. |
| 457 |
"error": { # 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. |
| 458 |
"code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 459 |
"details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. |
| 460 |
{ |
| 461 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 462 |
}, |
| 463 |
], |
| 464 |
"message": "A String", # 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. |
| 465 |
}, |
| 466 |
"metadata": { # 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. |
| 467 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 468 |
}, |
| 469 |
"name": "A String", # 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}`. |
| 470 |
"response": { # 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`. |
| 471 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 472 |
}, |
| 473 |
}</pre> |
| 474 |
</div> |
| 475 |
|
| 476 |
</body></html> |