1<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="firestore_v1.html">Cloud Firestore API</a> . <a href="firestore_v1.projects.html">projects</a> . <a href="firestore_v1.projects.databases.html">databases</a> . <a href="firestore_v1.projects.databases.documents.html">documents</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#batchGet">batchGet(database, body=None, x__xgafv=None)</a></code></p> 79<p class="firstline">Gets multiple documents. Documents returned by this method are not guaranteed to be returned in the same order that they were requested.</p> 80<p class="toc_element"> 81 <code><a href="#batchWrite">batchWrite(database, body=None, x__xgafv=None)</a></code></p> 82<p class="firstline">Applies a batch of write operations. The BatchWrite method does not apply the write operations atomically and can apply them out of order. Method does not allow more than one write per document. Each write succeeds or fails independently. See the BatchWriteResponse for the success status of each write. If you require an atomically applied set of writes, use Commit instead.</p> 83<p class="toc_element"> 84 <code><a href="#beginTransaction">beginTransaction(database, body=None, x__xgafv=None)</a></code></p> 85<p class="firstline">Starts a new transaction.</p> 86<p class="toc_element"> 87 <code><a href="#close">close()</a></code></p> 88<p class="firstline">Close httplib2 connections.</p> 89<p class="toc_element"> 90 <code><a href="#commit">commit(database, body=None, x__xgafv=None)</a></code></p> 91<p class="firstline">Commits a transaction, while optionally updating documents.</p> 92<p class="toc_element"> 93 <code><a href="#createDocument">createDocument(parent, collectionId, body=None, documentId=None, mask_fieldPaths=None, x__xgafv=None)</a></code></p> 94<p class="firstline">Creates a new document.</p> 95<p class="toc_element"> 96 <code><a href="#delete">delete(name, currentDocument_exists=None, currentDocument_updateTime=None, x__xgafv=None)</a></code></p> 97<p class="firstline">Deletes a document.</p> 98<p class="toc_element"> 99 <code><a href="#get">get(name, mask_fieldPaths=None, readTime=None, transaction=None, x__xgafv=None)</a></code></p> 100<p class="firstline">Gets a single document.</p> 101<p class="toc_element"> 102 <code><a href="#list">list(parent, collectionId, mask_fieldPaths=None, orderBy=None, pageSize=None, pageToken=None, readTime=None, showMissing=None, transaction=None, x__xgafv=None)</a></code></p> 103<p class="firstline">Lists documents.</p> 104<p class="toc_element"> 105 <code><a href="#listCollectionIds">listCollectionIds(parent, body=None, x__xgafv=None)</a></code></p> 106<p class="firstline">Lists all the collection IDs underneath a document.</p> 107<p class="toc_element"> 108 <code><a href="#listCollectionIds_next">listCollectionIds_next(previous_request, previous_response)</a></code></p> 109<p class="firstline">Retrieves the next page of results.</p> 110<p class="toc_element"> 111 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 112<p class="firstline">Retrieves the next page of results.</p> 113<p class="toc_element"> 114 <code><a href="#listen">listen(database, body=None, x__xgafv=None)</a></code></p> 115<p class="firstline">Listens to changes.</p> 116<p class="toc_element"> 117 <code><a href="#partitionQuery">partitionQuery(parent, body=None, x__xgafv=None)</a></code></p> 118<p class="firstline">Partitions a query by returning partition cursors that can be used to run the query in parallel. The returned partition cursors are split points that can be used by RunQuery as starting/end points for the query results.</p> 119<p class="toc_element"> 120 <code><a href="#partitionQuery_next">partitionQuery_next(previous_request, previous_response)</a></code></p> 121<p class="firstline">Retrieves the next page of results.</p> 122<p class="toc_element"> 123 <code><a href="#patch">patch(name, body=None, currentDocument_exists=None, currentDocument_updateTime=None, mask_fieldPaths=None, updateMask_fieldPaths=None, x__xgafv=None)</a></code></p> 124<p class="firstline">Updates or inserts a document.</p> 125<p class="toc_element"> 126 <code><a href="#rollback">rollback(database, body=None, x__xgafv=None)</a></code></p> 127<p class="firstline">Rolls back a transaction.</p> 128<p class="toc_element"> 129 <code><a href="#runQuery">runQuery(parent, body=None, x__xgafv=None)</a></code></p> 130<p class="firstline">Runs a query.</p> 131<p class="toc_element"> 132 <code><a href="#write">write(database, body=None, x__xgafv=None)</a></code></p> 133<p class="firstline">Streams batches of document updates and deletes, in order.</p> 134<h3>Method Details</h3> 135<div class="method"> 136 <code class="details" id="batchGet">batchGet(database, body=None, x__xgafv=None)</code> 137 <pre>Gets multiple documents. Documents returned by this method are not guaranteed to be returned in the same order that they were requested. 138 139Args: 140 database: string, Required. The database name. In the format: `projects/{project_id}/databases/{database_id}`. (required) 141 body: object, The request body. 142 The object takes the form of: 143 144{ # The request for Firestore.BatchGetDocuments. 145 "documents": [ # The names of the documents to retrieve. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. The request will fail if any of the document is not a child resource of the given `database`. Duplicate names will be elided. 146 "A String", 147 ], 148 "mask": { # A set of field paths on a document. Used to restrict a get or update operation on a document to a subset of its fields. This is different from standard field masks, as this is always scoped to a Document, and takes in account the dynamic nature of Value. # The fields to return. If not set, returns all fields. If a document has a field that is not present in this mask, that field will not be returned in the response. 149 "fieldPaths": [ # The list of field paths in the mask. See Document.fields for a field path syntax reference. 150 "A String", 151 ], 152 }, 153 "newTransaction": { # Options for creating a new transaction. # Starts a new transaction and reads the documents. Defaults to a read-only transaction. The new transaction ID will be returned as the first response in the stream. 154 "readOnly": { # Options for a transaction that can only be used to read documents. # The transaction can only be used for read operations. 155 "readTime": "A String", # Reads documents at the given time. This may not be older than 60 seconds. 156 }, 157 "readWrite": { # Options for a transaction that can be used to read and write documents. # The transaction can be used for both read and write operations. 158 "retryTransaction": "A String", # An optional transaction to retry. 159 }, 160 }, 161 "readTime": "A String", # Reads documents as they were at the given time. This may not be older than 270 seconds. 162 "transaction": "A String", # Reads documents in a transaction. 163} 164 165 x__xgafv: string, V1 error format. 166 Allowed values 167 1 - v1 error format 168 2 - v2 error format 169 170Returns: 171 An object of the form: 172 173 { # The streamed response for Firestore.BatchGetDocuments. 174 "found": { # A Firestore document. Must not exceed 1 MiB - 4 bytes. # A document that was requested. 175 "createTime": "A String", # Output only. The time at which the document was created. This value increases monotonically when a document is deleted then recreated. It can also be compared to values from other documents and the `read_time` of a query. 176 "fields": { # The document's fields. The map keys represent field names. A simple field name contains only characters `a` to `z`, `A` to `Z`, `0` to `9`, or `_`, and must not start with `0` to `9`. For example, `foo_bar_17`. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. Field paths may be used in other contexts to refer to structured fields defined here. For `map_value`, the field path is represented by the simple or quoted field names of the containing fields, delimited by `.`. For example, the structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be represented by the field path `foo.x&y`. Within a field path, a quoted field name starts and ends with `` ` `` and may contain any character. Some characters, including `` ` ``, must be escaped using a `\`. For example, `` `x&y` `` represents `x&y` and `` `bak\`tik` `` represents `` bak`tik ``. 177 "a_key": { # A message that can hold any of the supported value types. 178 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 179 "booleanValue": True or False, # A boolean value. 180 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 181 "doubleValue": 3.14, # A double value. 182 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 183 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 184 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 185 }, 186 "integerValue": "A String", # An integer value. 187 "mapValue": { # A map value. # A map value. 188 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 189 "a_key": # Object with schema name: Value 190 }, 191 }, 192 "nullValue": "A String", # A null value. 193 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 194 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 195 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 196 }, 197 }, 198 "name": "A String", # The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 199 "updateTime": "A String", # Output only. The time at which the document was last changed. This value is initially set to the `create_time` then increases monotonically with each change to the document. It can also be compared to values from other documents and the `read_time` of a query. 200 }, 201 "missing": "A String", # A document name that was requested but does not exist. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 202 "readTime": "A String", # The time at which the document was read. This may be monotically increasing, in this case the previous documents in the result stream are guaranteed not to have changed between their read_time and this one. 203 "transaction": "A String", # The transaction that was started as part of this request. Will only be set in the first response, and only if BatchGetDocumentsRequest.new_transaction was set in the request. 204}</pre> 205</div> 206 207<div class="method"> 208 <code class="details" id="batchWrite">batchWrite(database, body=None, x__xgafv=None)</code> 209 <pre>Applies a batch of write operations. The BatchWrite method does not apply the write operations atomically and can apply them out of order. Method does not allow more than one write per document. Each write succeeds or fails independently. See the BatchWriteResponse for the success status of each write. If you require an atomically applied set of writes, use Commit instead. 210 211Args: 212 database: string, Required. The database name. In the format: `projects/{project_id}/databases/{database_id}`. (required) 213 body: object, The request body. 214 The object takes the form of: 215 216{ # The request for Firestore.BatchWrite. 217 "labels": { # Labels associated with this batch write. 218 "a_key": "A String", 219 }, 220 "writes": [ # The writes to apply. Method does not apply writes atomically and does not guarantee ordering. Each write succeeds or fails independently. You cannot write to the same document more than once per request. 221 { # A write on a document. 222 "currentDocument": { # A precondition on a document, used for conditional operations. # An optional precondition on the document. The write will fail if this is set and not met by the target document. 223 "exists": True or False, # When set to `true`, the target document must exist. When set to `false`, the target document must not exist. 224 "updateTime": "A String", # When set, the target document must exist and have been last updated at that time. Timestamp must be microsecond aligned. 225 }, 226 "delete": "A String", # A document name to delete. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 227 "transform": { # A transformation of a document. # Applies a transformation to a document. 228 "document": "A String", # The name of the document to transform. 229 "fieldTransforms": [ # The list of transformations to apply to the fields of the document, in order. This must not be empty. 230 { # A transformation of a field of the document. 231 "appendMissingElements": { # An array value. # Append the given elements in order if they are not already present in the current field value. If the field is not an array, or if the field does not yet exist, it is first set to the empty array. Equivalent numbers of different types (e.g. 3L and 3.0) are considered equal when checking if a value is missing. NaN is equal to NaN, and Null is equal to Null. If the input contains multiple equivalent values, only the first will be considered. The corresponding transform_result will be the null value. 232 "values": [ # Values in the array. 233 { # A message that can hold any of the supported value types. 234 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 235 "booleanValue": True or False, # A boolean value. 236 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 237 "doubleValue": 3.14, # A double value. 238 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 239 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 240 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 241 }, 242 "integerValue": "A String", # An integer value. 243 "mapValue": { # A map value. # A map value. 244 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 245 "a_key": # Object with schema name: Value 246 }, 247 }, 248 "nullValue": "A String", # A null value. 249 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 250 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 251 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 252 }, 253 ], 254 }, 255 "fieldPath": "A String", # The path of the field. See Document.fields for the field path syntax reference. 256 "increment": { # A message that can hold any of the supported value types. # Adds the given value to the field's current value. This must be an integer or a double value. If the field is not an integer or double, or if the field does not yet exist, the transformation will set the field to the given value. If either of the given value or the current field value are doubles, both values will be interpreted as doubles. Double arithmetic and representation of double values follow IEEE 754 semantics. If there is positive/negative integer overflow, the field is resolved to the largest magnitude positive/negative integer. 257 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 258 "booleanValue": True or False, # A boolean value. 259 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 260 "doubleValue": 3.14, # A double value. 261 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 262 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 263 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 264 }, 265 "integerValue": "A String", # An integer value. 266 "mapValue": { # A map value. # A map value. 267 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 268 "a_key": # Object with schema name: Value 269 }, 270 }, 271 "nullValue": "A String", # A null value. 272 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 273 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 274 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 275 }, 276 "maximum": { # A message that can hold any of the supported value types. # Sets the field to the maximum of its current value and the given value. This must be an integer or a double value. If the field is not an integer or double, or if the field does not yet exist, the transformation will set the field to the given value. If a maximum operation is applied where the field and the input value are of mixed types (that is - one is an integer and one is a double) the field takes on the type of the larger operand. If the operands are equivalent (e.g. 3 and 3.0), the field does not change. 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and zero input value is always the stored value. The maximum of any numeric value x and NaN is NaN. 277 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 278 "booleanValue": True or False, # A boolean value. 279 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 280 "doubleValue": 3.14, # A double value. 281 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 282 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 283 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 284 }, 285 "integerValue": "A String", # An integer value. 286 "mapValue": { # A map value. # A map value. 287 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 288 "a_key": # Object with schema name: Value 289 }, 290 }, 291 "nullValue": "A String", # A null value. 292 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 293 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 294 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 295 }, 296 "minimum": { # A message that can hold any of the supported value types. # Sets the field to the minimum of its current value and the given value. This must be an integer or a double value. If the field is not an integer or double, or if the field does not yet exist, the transformation will set the field to the input value. If a minimum operation is applied where the field and the input value are of mixed types (that is - one is an integer and one is a double) the field takes on the type of the smaller operand. If the operands are equivalent (e.g. 3 and 3.0), the field does not change. 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and zero input value is always the stored value. The minimum of any numeric value x and NaN is NaN. 297 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 298 "booleanValue": True or False, # A boolean value. 299 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 300 "doubleValue": 3.14, # A double value. 301 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 302 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 303 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 304 }, 305 "integerValue": "A String", # An integer value. 306 "mapValue": { # A map value. # A map value. 307 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 308 "a_key": # Object with schema name: Value 309 }, 310 }, 311 "nullValue": "A String", # A null value. 312 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 313 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 314 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 315 }, 316 "removeAllFromArray": { # An array value. # Remove all of the given elements from the array in the field. If the field is not an array, or if the field does not yet exist, it is set to the empty array. Equivalent numbers of the different types (e.g. 3L and 3.0) are considered equal when deciding whether an element should be removed. NaN is equal to NaN, and Null is equal to Null. This will remove all equivalent values if there are duplicates. The corresponding transform_result will be the null value. 317 "values": [ # Values in the array. 318 { # A message that can hold any of the supported value types. 319 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 320 "booleanValue": True or False, # A boolean value. 321 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 322 "doubleValue": 3.14, # A double value. 323 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 324 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 325 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 326 }, 327 "integerValue": "A String", # An integer value. 328 "mapValue": { # A map value. # A map value. 329 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 330 "a_key": # Object with schema name: Value 331 }, 332 }, 333 "nullValue": "A String", # A null value. 334 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 335 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 336 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 337 }, 338 ], 339 }, 340 "setToServerValue": "A String", # Sets the field to the given server value. 341 }, 342 ], 343 }, 344 "update": { # A Firestore document. Must not exceed 1 MiB - 4 bytes. # A document to write. 345 "createTime": "A String", # Output only. The time at which the document was created. This value increases monotonically when a document is deleted then recreated. It can also be compared to values from other documents and the `read_time` of a query. 346 "fields": { # The document's fields. The map keys represent field names. A simple field name contains only characters `a` to `z`, `A` to `Z`, `0` to `9`, or `_`, and must not start with `0` to `9`. For example, `foo_bar_17`. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. Field paths may be used in other contexts to refer to structured fields defined here. For `map_value`, the field path is represented by the simple or quoted field names of the containing fields, delimited by `.`. For example, the structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be represented by the field path `foo.x&y`. Within a field path, a quoted field name starts and ends with `` ` `` and may contain any character. Some characters, including `` ` ``, must be escaped using a `\`. For example, `` `x&y` `` represents `x&y` and `` `bak\`tik` `` represents `` bak`tik ``. 347 "a_key": { # A message that can hold any of the supported value types. 348 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 349 "booleanValue": True or False, # A boolean value. 350 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 351 "doubleValue": 3.14, # A double value. 352 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 353 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 354 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 355 }, 356 "integerValue": "A String", # An integer value. 357 "mapValue": { # A map value. # A map value. 358 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 359 "a_key": # Object with schema name: Value 360 }, 361 }, 362 "nullValue": "A String", # A null value. 363 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 364 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 365 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 366 }, 367 }, 368 "name": "A String", # The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 369 "updateTime": "A String", # Output only. The time at which the document was last changed. This value is initially set to the `create_time` then increases monotonically with each change to the document. It can also be compared to values from other documents and the `read_time` of a query. 370 }, 371 "updateMask": { # A set of field paths on a document. Used to restrict a get or update operation on a document to a subset of its fields. This is different from standard field masks, as this is always scoped to a Document, and takes in account the dynamic nature of Value. # The fields to update in this write. This field can be set only when the operation is `update`. If the mask is not set for an `update` and the document exists, any existing data will be overwritten. If the mask is set and the document on the server has fields not covered by the mask, they are left unchanged. Fields referenced in the mask, but not present in the input document, are deleted from the document on the server. The field paths in this mask must not contain a reserved field name. 372 "fieldPaths": [ # The list of field paths in the mask. See Document.fields for a field path syntax reference. 373 "A String", 374 ], 375 }, 376 "updateTransforms": [ # The transforms to perform after update. This field can be set only when the operation is `update`. If present, this write is equivalent to performing `update` and `transform` to the same document atomically and in order. 377 { # A transformation of a field of the document. 378 "appendMissingElements": { # An array value. # Append the given elements in order if they are not already present in the current field value. If the field is not an array, or if the field does not yet exist, it is first set to the empty array. Equivalent numbers of different types (e.g. 3L and 3.0) are considered equal when checking if a value is missing. NaN is equal to NaN, and Null is equal to Null. If the input contains multiple equivalent values, only the first will be considered. The corresponding transform_result will be the null value. 379 "values": [ # Values in the array. 380 { # A message that can hold any of the supported value types. 381 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 382 "booleanValue": True or False, # A boolean value. 383 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 384 "doubleValue": 3.14, # A double value. 385 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 386 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 387 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 388 }, 389 "integerValue": "A String", # An integer value. 390 "mapValue": { # A map value. # A map value. 391 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 392 "a_key": # Object with schema name: Value 393 }, 394 }, 395 "nullValue": "A String", # A null value. 396 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 397 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 398 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 399 }, 400 ], 401 }, 402 "fieldPath": "A String", # The path of the field. See Document.fields for the field path syntax reference. 403 "increment": { # A message that can hold any of the supported value types. # Adds the given value to the field's current value. This must be an integer or a double value. If the field is not an integer or double, or if the field does not yet exist, the transformation will set the field to the given value. If either of the given value or the current field value are doubles, both values will be interpreted as doubles. Double arithmetic and representation of double values follow IEEE 754 semantics. If there is positive/negative integer overflow, the field is resolved to the largest magnitude positive/negative integer. 404 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 405 "booleanValue": True or False, # A boolean value. 406 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 407 "doubleValue": 3.14, # A double value. 408 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 409 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 410 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 411 }, 412 "integerValue": "A String", # An integer value. 413 "mapValue": { # A map value. # A map value. 414 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 415 "a_key": # Object with schema name: Value 416 }, 417 }, 418 "nullValue": "A String", # A null value. 419 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 420 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 421 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 422 }, 423 "maximum": { # A message that can hold any of the supported value types. # Sets the field to the maximum of its current value and the given value. This must be an integer or a double value. If the field is not an integer or double, or if the field does not yet exist, the transformation will set the field to the given value. If a maximum operation is applied where the field and the input value are of mixed types (that is - one is an integer and one is a double) the field takes on the type of the larger operand. If the operands are equivalent (e.g. 3 and 3.0), the field does not change. 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and zero input value is always the stored value. The maximum of any numeric value x and NaN is NaN. 424 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 425 "booleanValue": True or False, # A boolean value. 426 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 427 "doubleValue": 3.14, # A double value. 428 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 429 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 430 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 431 }, 432 "integerValue": "A String", # An integer value. 433 "mapValue": { # A map value. # A map value. 434 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 435 "a_key": # Object with schema name: Value 436 }, 437 }, 438 "nullValue": "A String", # A null value. 439 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 440 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 441 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 442 }, 443 "minimum": { # A message that can hold any of the supported value types. # Sets the field to the minimum of its current value and the given value. This must be an integer or a double value. If the field is not an integer or double, or if the field does not yet exist, the transformation will set the field to the input value. If a minimum operation is applied where the field and the input value are of mixed types (that is - one is an integer and one is a double) the field takes on the type of the smaller operand. If the operands are equivalent (e.g. 3 and 3.0), the field does not change. 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and zero input value is always the stored value. The minimum of any numeric value x and NaN is NaN. 444 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 445 "booleanValue": True or False, # A boolean value. 446 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 447 "doubleValue": 3.14, # A double value. 448 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 449 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 450 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 451 }, 452 "integerValue": "A String", # An integer value. 453 "mapValue": { # A map value. # A map value. 454 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 455 "a_key": # Object with schema name: Value 456 }, 457 }, 458 "nullValue": "A String", # A null value. 459 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 460 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 461 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 462 }, 463 "removeAllFromArray": { # An array value. # Remove all of the given elements from the array in the field. If the field is not an array, or if the field does not yet exist, it is set to the empty array. Equivalent numbers of the different types (e.g. 3L and 3.0) are considered equal when deciding whether an element should be removed. NaN is equal to NaN, and Null is equal to Null. This will remove all equivalent values if there are duplicates. The corresponding transform_result will be the null value. 464 "values": [ # Values in the array. 465 { # A message that can hold any of the supported value types. 466 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 467 "booleanValue": True or False, # A boolean value. 468 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 469 "doubleValue": 3.14, # A double value. 470 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 471 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 472 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 473 }, 474 "integerValue": "A String", # An integer value. 475 "mapValue": { # A map value. # A map value. 476 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 477 "a_key": # Object with schema name: Value 478 }, 479 }, 480 "nullValue": "A String", # A null value. 481 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 482 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 483 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 484 }, 485 ], 486 }, 487 "setToServerValue": "A String", # Sets the field to the given server value. 488 }, 489 ], 490 }, 491 ], 492} 493 494 x__xgafv: string, V1 error format. 495 Allowed values 496 1 - v1 error format 497 2 - v2 error format 498 499Returns: 500 An object of the form: 501 502 { # The response from Firestore.BatchWrite. 503 "status": [ # The status of applying the writes. This i-th write status corresponds to the i-th write in the request. 504 { # 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). 505 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 506 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 507 { 508 "a_key": "", # Properties of the object. Contains field @type with type URL. 509 }, 510 ], 511 "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. 512 }, 513 ], 514 "writeResults": [ # The result of applying the writes. This i-th write result corresponds to the i-th write in the request. 515 { # The result of applying a write. 516 "transformResults": [ # The results of applying each DocumentTransform.FieldTransform, in the same order. 517 { # A message that can hold any of the supported value types. 518 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 519 "booleanValue": True or False, # A boolean value. 520 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 521 "doubleValue": 3.14, # A double value. 522 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 523 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 524 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 525 }, 526 "integerValue": "A String", # An integer value. 527 "mapValue": { # A map value. # A map value. 528 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 529 "a_key": # Object with schema name: Value 530 }, 531 }, 532 "nullValue": "A String", # A null value. 533 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 534 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 535 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 536 }, 537 ], 538 "updateTime": "A String", # The last update time of the document after applying the write. Not set after a `delete`. If the write did not actually change the document, this will be the previous update_time. 539 }, 540 ], 541}</pre> 542</div> 543 544<div class="method"> 545 <code class="details" id="beginTransaction">beginTransaction(database, body=None, x__xgafv=None)</code> 546 <pre>Starts a new transaction. 547 548Args: 549 database: string, Required. The database name. In the format: `projects/{project_id}/databases/{database_id}`. (required) 550 body: object, The request body. 551 The object takes the form of: 552 553{ # The request for Firestore.BeginTransaction. 554 "options": { # Options for creating a new transaction. # The options for the transaction. Defaults to a read-write transaction. 555 "readOnly": { # Options for a transaction that can only be used to read documents. # The transaction can only be used for read operations. 556 "readTime": "A String", # Reads documents at the given time. This may not be older than 60 seconds. 557 }, 558 "readWrite": { # Options for a transaction that can be used to read and write documents. # The transaction can be used for both read and write operations. 559 "retryTransaction": "A String", # An optional transaction to retry. 560 }, 561 }, 562} 563 564 x__xgafv: string, V1 error format. 565 Allowed values 566 1 - v1 error format 567 2 - v2 error format 568 569Returns: 570 An object of the form: 571 572 { # The response for Firestore.BeginTransaction. 573 "transaction": "A String", # The transaction that was started. 574}</pre> 575</div> 576 577<div class="method"> 578 <code class="details" id="close">close()</code> 579 <pre>Close httplib2 connections.</pre> 580</div> 581 582<div class="method"> 583 <code class="details" id="commit">commit(database, body=None, x__xgafv=None)</code> 584 <pre>Commits a transaction, while optionally updating documents. 585 586Args: 587 database: string, Required. The database name. In the format: `projects/{project_id}/databases/{database_id}`. (required) 588 body: object, The request body. 589 The object takes the form of: 590 591{ # The request for Firestore.Commit. 592 "transaction": "A String", # If set, applies all writes in this transaction, and commits it. 593 "writes": [ # The writes to apply. Always executed atomically and in order. 594 { # A write on a document. 595 "currentDocument": { # A precondition on a document, used for conditional operations. # An optional precondition on the document. The write will fail if this is set and not met by the target document. 596 "exists": True or False, # When set to `true`, the target document must exist. When set to `false`, the target document must not exist. 597 "updateTime": "A String", # When set, the target document must exist and have been last updated at that time. Timestamp must be microsecond aligned. 598 }, 599 "delete": "A String", # A document name to delete. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 600 "transform": { # A transformation of a document. # Applies a transformation to a document. 601 "document": "A String", # The name of the document to transform. 602 "fieldTransforms": [ # The list of transformations to apply to the fields of the document, in order. This must not be empty. 603 { # A transformation of a field of the document. 604 "appendMissingElements": { # An array value. # Append the given elements in order if they are not already present in the current field value. If the field is not an array, or if the field does not yet exist, it is first set to the empty array. Equivalent numbers of different types (e.g. 3L and 3.0) are considered equal when checking if a value is missing. NaN is equal to NaN, and Null is equal to Null. If the input contains multiple equivalent values, only the first will be considered. The corresponding transform_result will be the null value. 605 "values": [ # Values in the array. 606 { # A message that can hold any of the supported value types. 607 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 608 "booleanValue": True or False, # A boolean value. 609 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 610 "doubleValue": 3.14, # A double value. 611 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 612 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 613 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 614 }, 615 "integerValue": "A String", # An integer value. 616 "mapValue": { # A map value. # A map value. 617 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 618 "a_key": # Object with schema name: Value 619 }, 620 }, 621 "nullValue": "A String", # A null value. 622 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 623 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 624 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 625 }, 626 ], 627 }, 628 "fieldPath": "A String", # The path of the field. See Document.fields for the field path syntax reference. 629 "increment": { # A message that can hold any of the supported value types. # Adds the given value to the field's current value. This must be an integer or a double value. If the field is not an integer or double, or if the field does not yet exist, the transformation will set the field to the given value. If either of the given value or the current field value are doubles, both values will be interpreted as doubles. Double arithmetic and representation of double values follow IEEE 754 semantics. If there is positive/negative integer overflow, the field is resolved to the largest magnitude positive/negative integer. 630 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 631 "booleanValue": True or False, # A boolean value. 632 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 633 "doubleValue": 3.14, # A double value. 634 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 635 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 636 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 637 }, 638 "integerValue": "A String", # An integer value. 639 "mapValue": { # A map value. # A map value. 640 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 641 "a_key": # Object with schema name: Value 642 }, 643 }, 644 "nullValue": "A String", # A null value. 645 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 646 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 647 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 648 }, 649 "maximum": { # A message that can hold any of the supported value types. # Sets the field to the maximum of its current value and the given value. This must be an integer or a double value. If the field is not an integer or double, or if the field does not yet exist, the transformation will set the field to the given value. If a maximum operation is applied where the field and the input value are of mixed types (that is - one is an integer and one is a double) the field takes on the type of the larger operand. If the operands are equivalent (e.g. 3 and 3.0), the field does not change. 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and zero input value is always the stored value. The maximum of any numeric value x and NaN is NaN. 650 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 651 "booleanValue": True or False, # A boolean value. 652 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 653 "doubleValue": 3.14, # A double value. 654 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 655 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 656 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 657 }, 658 "integerValue": "A String", # An integer value. 659 "mapValue": { # A map value. # A map value. 660 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 661 "a_key": # Object with schema name: Value 662 }, 663 }, 664 "nullValue": "A String", # A null value. 665 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 666 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 667 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 668 }, 669 "minimum": { # A message that can hold any of the supported value types. # Sets the field to the minimum of its current value and the given value. This must be an integer or a double value. If the field is not an integer or double, or if the field does not yet exist, the transformation will set the field to the input value. If a minimum operation is applied where the field and the input value are of mixed types (that is - one is an integer and one is a double) the field takes on the type of the smaller operand. If the operands are equivalent (e.g. 3 and 3.0), the field does not change. 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and zero input value is always the stored value. The minimum of any numeric value x and NaN is NaN. 670 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 671 "booleanValue": True or False, # A boolean value. 672 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 673 "doubleValue": 3.14, # A double value. 674 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 675 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 676 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 677 }, 678 "integerValue": "A String", # An integer value. 679 "mapValue": { # A map value. # A map value. 680 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 681 "a_key": # Object with schema name: Value 682 }, 683 }, 684 "nullValue": "A String", # A null value. 685 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 686 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 687 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 688 }, 689 "removeAllFromArray": { # An array value. # Remove all of the given elements from the array in the field. If the field is not an array, or if the field does not yet exist, it is set to the empty array. Equivalent numbers of the different types (e.g. 3L and 3.0) are considered equal when deciding whether an element should be removed. NaN is equal to NaN, and Null is equal to Null. This will remove all equivalent values if there are duplicates. The corresponding transform_result will be the null value. 690 "values": [ # Values in the array. 691 { # A message that can hold any of the supported value types. 692 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 693 "booleanValue": True or False, # A boolean value. 694 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 695 "doubleValue": 3.14, # A double value. 696 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 697 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 698 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 699 }, 700 "integerValue": "A String", # An integer value. 701 "mapValue": { # A map value. # A map value. 702 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 703 "a_key": # Object with schema name: Value 704 }, 705 }, 706 "nullValue": "A String", # A null value. 707 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 708 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 709 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 710 }, 711 ], 712 }, 713 "setToServerValue": "A String", # Sets the field to the given server value. 714 }, 715 ], 716 }, 717 "update": { # A Firestore document. Must not exceed 1 MiB - 4 bytes. # A document to write. 718 "createTime": "A String", # Output only. The time at which the document was created. This value increases monotonically when a document is deleted then recreated. It can also be compared to values from other documents and the `read_time` of a query. 719 "fields": { # The document's fields. The map keys represent field names. A simple field name contains only characters `a` to `z`, `A` to `Z`, `0` to `9`, or `_`, and must not start with `0` to `9`. For example, `foo_bar_17`. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. Field paths may be used in other contexts to refer to structured fields defined here. For `map_value`, the field path is represented by the simple or quoted field names of the containing fields, delimited by `.`. For example, the structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be represented by the field path `foo.x&y`. Within a field path, a quoted field name starts and ends with `` ` `` and may contain any character. Some characters, including `` ` ``, must be escaped using a `\`. For example, `` `x&y` `` represents `x&y` and `` `bak\`tik` `` represents `` bak`tik ``. 720 "a_key": { # A message that can hold any of the supported value types. 721 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 722 "booleanValue": True or False, # A boolean value. 723 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 724 "doubleValue": 3.14, # A double value. 725 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 726 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 727 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 728 }, 729 "integerValue": "A String", # An integer value. 730 "mapValue": { # A map value. # A map value. 731 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 732 "a_key": # Object with schema name: Value 733 }, 734 }, 735 "nullValue": "A String", # A null value. 736 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 737 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 738 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 739 }, 740 }, 741 "name": "A String", # The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 742 "updateTime": "A String", # Output only. The time at which the document was last changed. This value is initially set to the `create_time` then increases monotonically with each change to the document. It can also be compared to values from other documents and the `read_time` of a query. 743 }, 744 "updateMask": { # A set of field paths on a document. Used to restrict a get or update operation on a document to a subset of its fields. This is different from standard field masks, as this is always scoped to a Document, and takes in account the dynamic nature of Value. # The fields to update in this write. This field can be set only when the operation is `update`. If the mask is not set for an `update` and the document exists, any existing data will be overwritten. If the mask is set and the document on the server has fields not covered by the mask, they are left unchanged. Fields referenced in the mask, but not present in the input document, are deleted from the document on the server. The field paths in this mask must not contain a reserved field name. 745 "fieldPaths": [ # The list of field paths in the mask. See Document.fields for a field path syntax reference. 746 "A String", 747 ], 748 }, 749 "updateTransforms": [ # The transforms to perform after update. This field can be set only when the operation is `update`. If present, this write is equivalent to performing `update` and `transform` to the same document atomically and in order. 750 { # A transformation of a field of the document. 751 "appendMissingElements": { # An array value. # Append the given elements in order if they are not already present in the current field value. If the field is not an array, or if the field does not yet exist, it is first set to the empty array. Equivalent numbers of different types (e.g. 3L and 3.0) are considered equal when checking if a value is missing. NaN is equal to NaN, and Null is equal to Null. If the input contains multiple equivalent values, only the first will be considered. The corresponding transform_result will be the null value. 752 "values": [ # Values in the array. 753 { # A message that can hold any of the supported value types. 754 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 755 "booleanValue": True or False, # A boolean value. 756 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 757 "doubleValue": 3.14, # A double value. 758 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 759 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 760 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 761 }, 762 "integerValue": "A String", # An integer value. 763 "mapValue": { # A map value. # A map value. 764 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 765 "a_key": # Object with schema name: Value 766 }, 767 }, 768 "nullValue": "A String", # A null value. 769 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 770 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 771 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 772 }, 773 ], 774 }, 775 "fieldPath": "A String", # The path of the field. See Document.fields for the field path syntax reference. 776 "increment": { # A message that can hold any of the supported value types. # Adds the given value to the field's current value. This must be an integer or a double value. If the field is not an integer or double, or if the field does not yet exist, the transformation will set the field to the given value. If either of the given value or the current field value are doubles, both values will be interpreted as doubles. Double arithmetic and representation of double values follow IEEE 754 semantics. If there is positive/negative integer overflow, the field is resolved to the largest magnitude positive/negative integer. 777 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 778 "booleanValue": True or False, # A boolean value. 779 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 780 "doubleValue": 3.14, # A double value. 781 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 782 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 783 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 784 }, 785 "integerValue": "A String", # An integer value. 786 "mapValue": { # A map value. # A map value. 787 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 788 "a_key": # Object with schema name: Value 789 }, 790 }, 791 "nullValue": "A String", # A null value. 792 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 793 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 794 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 795 }, 796 "maximum": { # A message that can hold any of the supported value types. # Sets the field to the maximum of its current value and the given value. This must be an integer or a double value. If the field is not an integer or double, or if the field does not yet exist, the transformation will set the field to the given value. If a maximum operation is applied where the field and the input value are of mixed types (that is - one is an integer and one is a double) the field takes on the type of the larger operand. If the operands are equivalent (e.g. 3 and 3.0), the field does not change. 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and zero input value is always the stored value. The maximum of any numeric value x and NaN is NaN. 797 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 798 "booleanValue": True or False, # A boolean value. 799 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 800 "doubleValue": 3.14, # A double value. 801 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 802 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 803 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 804 }, 805 "integerValue": "A String", # An integer value. 806 "mapValue": { # A map value. # A map value. 807 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 808 "a_key": # Object with schema name: Value 809 }, 810 }, 811 "nullValue": "A String", # A null value. 812 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 813 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 814 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 815 }, 816 "minimum": { # A message that can hold any of the supported value types. # Sets the field to the minimum of its current value and the given value. This must be an integer or a double value. If the field is not an integer or double, or if the field does not yet exist, the transformation will set the field to the input value. If a minimum operation is applied where the field and the input value are of mixed types (that is - one is an integer and one is a double) the field takes on the type of the smaller operand. If the operands are equivalent (e.g. 3 and 3.0), the field does not change. 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and zero input value is always the stored value. The minimum of any numeric value x and NaN is NaN. 817 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 818 "booleanValue": True or False, # A boolean value. 819 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 820 "doubleValue": 3.14, # A double value. 821 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 822 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 823 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 824 }, 825 "integerValue": "A String", # An integer value. 826 "mapValue": { # A map value. # A map value. 827 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 828 "a_key": # Object with schema name: Value 829 }, 830 }, 831 "nullValue": "A String", # A null value. 832 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 833 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 834 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 835 }, 836 "removeAllFromArray": { # An array value. # Remove all of the given elements from the array in the field. If the field is not an array, or if the field does not yet exist, it is set to the empty array. Equivalent numbers of the different types (e.g. 3L and 3.0) are considered equal when deciding whether an element should be removed. NaN is equal to NaN, and Null is equal to Null. This will remove all equivalent values if there are duplicates. The corresponding transform_result will be the null value. 837 "values": [ # Values in the array. 838 { # A message that can hold any of the supported value types. 839 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 840 "booleanValue": True or False, # A boolean value. 841 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 842 "doubleValue": 3.14, # A double value. 843 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 844 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 845 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 846 }, 847 "integerValue": "A String", # An integer value. 848 "mapValue": { # A map value. # A map value. 849 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 850 "a_key": # Object with schema name: Value 851 }, 852 }, 853 "nullValue": "A String", # A null value. 854 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 855 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 856 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 857 }, 858 ], 859 }, 860 "setToServerValue": "A String", # Sets the field to the given server value. 861 }, 862 ], 863 }, 864 ], 865} 866 867 x__xgafv: string, V1 error format. 868 Allowed values 869 1 - v1 error format 870 2 - v2 error format 871 872Returns: 873 An object of the form: 874 875 { # The response for Firestore.Commit. 876 "commitTime": "A String", # The time at which the commit occurred. Any read with an equal or greater `read_time` is guaranteed to see the effects of the commit. 877 "writeResults": [ # The result of applying the writes. This i-th write result corresponds to the i-th write in the request. 878 { # The result of applying a write. 879 "transformResults": [ # The results of applying each DocumentTransform.FieldTransform, in the same order. 880 { # A message that can hold any of the supported value types. 881 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 882 "booleanValue": True or False, # A boolean value. 883 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 884 "doubleValue": 3.14, # A double value. 885 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 886 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 887 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 888 }, 889 "integerValue": "A String", # An integer value. 890 "mapValue": { # A map value. # A map value. 891 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 892 "a_key": # Object with schema name: Value 893 }, 894 }, 895 "nullValue": "A String", # A null value. 896 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 897 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 898 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 899 }, 900 ], 901 "updateTime": "A String", # The last update time of the document after applying the write. Not set after a `delete`. If the write did not actually change the document, this will be the previous update_time. 902 }, 903 ], 904}</pre> 905</div> 906 907<div class="method"> 908 <code class="details" id="createDocument">createDocument(parent, collectionId, body=None, documentId=None, mask_fieldPaths=None, x__xgafv=None)</code> 909 <pre>Creates a new document. 910 911Args: 912 parent: string, Required. The parent resource. For example: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` (required) 913 collectionId: string, Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`. (required) 914 body: object, The request body. 915 The object takes the form of: 916 917{ # A Firestore document. Must not exceed 1 MiB - 4 bytes. 918 "createTime": "A String", # Output only. The time at which the document was created. This value increases monotonically when a document is deleted then recreated. It can also be compared to values from other documents and the `read_time` of a query. 919 "fields": { # The document's fields. The map keys represent field names. A simple field name contains only characters `a` to `z`, `A` to `Z`, `0` to `9`, or `_`, and must not start with `0` to `9`. For example, `foo_bar_17`. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. Field paths may be used in other contexts to refer to structured fields defined here. For `map_value`, the field path is represented by the simple or quoted field names of the containing fields, delimited by `.`. For example, the structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be represented by the field path `foo.x&y`. Within a field path, a quoted field name starts and ends with `` ` `` and may contain any character. Some characters, including `` ` ``, must be escaped using a `\`. For example, `` `x&y` `` represents `x&y` and `` `bak\`tik` `` represents `` bak`tik ``. 920 "a_key": { # A message that can hold any of the supported value types. 921 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 922 "booleanValue": True or False, # A boolean value. 923 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 924 "doubleValue": 3.14, # A double value. 925 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 926 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 927 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 928 }, 929 "integerValue": "A String", # An integer value. 930 "mapValue": { # A map value. # A map value. 931 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 932 "a_key": # Object with schema name: Value 933 }, 934 }, 935 "nullValue": "A String", # A null value. 936 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 937 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 938 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 939 }, 940 }, 941 "name": "A String", # The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 942 "updateTime": "A String", # Output only. The time at which the document was last changed. This value is initially set to the `create_time` then increases monotonically with each change to the document. It can also be compared to values from other documents and the `read_time` of a query. 943} 944 945 documentId: string, The client-assigned document ID to use for this document. Optional. If not specified, an ID will be assigned by the service. 946 mask_fieldPaths: string, The list of field paths in the mask. See Document.fields for a field path syntax reference. (repeated) 947 x__xgafv: string, V1 error format. 948 Allowed values 949 1 - v1 error format 950 2 - v2 error format 951 952Returns: 953 An object of the form: 954 955 { # A Firestore document. Must not exceed 1 MiB - 4 bytes. 956 "createTime": "A String", # Output only. The time at which the document was created. This value increases monotonically when a document is deleted then recreated. It can also be compared to values from other documents and the `read_time` of a query. 957 "fields": { # The document's fields. The map keys represent field names. A simple field name contains only characters `a` to `z`, `A` to `Z`, `0` to `9`, or `_`, and must not start with `0` to `9`. For example, `foo_bar_17`. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. Field paths may be used in other contexts to refer to structured fields defined here. For `map_value`, the field path is represented by the simple or quoted field names of the containing fields, delimited by `.`. For example, the structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be represented by the field path `foo.x&y`. Within a field path, a quoted field name starts and ends with `` ` `` and may contain any character. Some characters, including `` ` ``, must be escaped using a `\`. For example, `` `x&y` `` represents `x&y` and `` `bak\`tik` `` represents `` bak`tik ``. 958 "a_key": { # A message that can hold any of the supported value types. 959 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 960 "booleanValue": True or False, # A boolean value. 961 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 962 "doubleValue": 3.14, # A double value. 963 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 964 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 965 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 966 }, 967 "integerValue": "A String", # An integer value. 968 "mapValue": { # A map value. # A map value. 969 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 970 "a_key": # Object with schema name: Value 971 }, 972 }, 973 "nullValue": "A String", # A null value. 974 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 975 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 976 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 977 }, 978 }, 979 "name": "A String", # The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 980 "updateTime": "A String", # Output only. The time at which the document was last changed. This value is initially set to the `create_time` then increases monotonically with each change to the document. It can also be compared to values from other documents and the `read_time` of a query. 981}</pre> 982</div> 983 984<div class="method"> 985 <code class="details" id="delete">delete(name, currentDocument_exists=None, currentDocument_updateTime=None, x__xgafv=None)</code> 986 <pre>Deletes a document. 987 988Args: 989 name: string, Required. The resource name of the Document to delete. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. (required) 990 currentDocument_exists: boolean, When set to `true`, the target document must exist. When set to `false`, the target document must not exist. 991 currentDocument_updateTime: string, When set, the target document must exist and have been last updated at that time. Timestamp must be microsecond aligned. 992 x__xgafv: string, V1 error format. 993 Allowed values 994 1 - v1 error format 995 2 - v2 error format 996 997Returns: 998 An object of the form: 999 1000 { # 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 `{}`. 1001}</pre> 1002</div> 1003 1004<div class="method"> 1005 <code class="details" id="get">get(name, mask_fieldPaths=None, readTime=None, transaction=None, x__xgafv=None)</code> 1006 <pre>Gets a single document. 1007 1008Args: 1009 name: string, Required. The resource name of the Document to get. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. (required) 1010 mask_fieldPaths: string, The list of field paths in the mask. See Document.fields for a field path syntax reference. (repeated) 1011 readTime: string, Reads the version of the document at the given time. This may not be older than 270 seconds. 1012 transaction: string, Reads the document in a transaction. 1013 x__xgafv: string, V1 error format. 1014 Allowed values 1015 1 - v1 error format 1016 2 - v2 error format 1017 1018Returns: 1019 An object of the form: 1020 1021 { # A Firestore document. Must not exceed 1 MiB - 4 bytes. 1022 "createTime": "A String", # Output only. The time at which the document was created. This value increases monotonically when a document is deleted then recreated. It can also be compared to values from other documents and the `read_time` of a query. 1023 "fields": { # The document's fields. The map keys represent field names. A simple field name contains only characters `a` to `z`, `A` to `Z`, `0` to `9`, or `_`, and must not start with `0` to `9`. For example, `foo_bar_17`. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. Field paths may be used in other contexts to refer to structured fields defined here. For `map_value`, the field path is represented by the simple or quoted field names of the containing fields, delimited by `.`. For example, the structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be represented by the field path `foo.x&y`. Within a field path, a quoted field name starts and ends with `` ` `` and may contain any character. Some characters, including `` ` ``, must be escaped using a `\`. For example, `` `x&y` `` represents `x&y` and `` `bak\`tik` `` represents `` bak`tik ``. 1024 "a_key": { # A message that can hold any of the supported value types. 1025 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 1026 "booleanValue": True or False, # A boolean value. 1027 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 1028 "doubleValue": 3.14, # A double value. 1029 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 1030 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 1031 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 1032 }, 1033 "integerValue": "A String", # An integer value. 1034 "mapValue": { # A map value. # A map value. 1035 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 1036 "a_key": # Object with schema name: Value 1037 }, 1038 }, 1039 "nullValue": "A String", # A null value. 1040 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1041 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 1042 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 1043 }, 1044 }, 1045 "name": "A String", # The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1046 "updateTime": "A String", # Output only. The time at which the document was last changed. This value is initially set to the `create_time` then increases monotonically with each change to the document. It can also be compared to values from other documents and the `read_time` of a query. 1047}</pre> 1048</div> 1049 1050<div class="method"> 1051 <code class="details" id="list">list(parent, collectionId, mask_fieldPaths=None, orderBy=None, pageSize=None, pageToken=None, readTime=None, showMissing=None, transaction=None, x__xgafv=None)</code> 1052 <pre>Lists documents. 1053 1054Args: 1055 parent: string, Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` (required) 1056 collectionId: string, Required. The collection ID, relative to `parent`, to list. For example: `chatrooms` or `messages`. (required) 1057 mask_fieldPaths: string, The list of field paths in the mask. See Document.fields for a field path syntax reference. (repeated) 1058 orderBy: string, The order to sort results by. For example: `priority desc, name`. 1059 pageSize: integer, The maximum number of documents to return. 1060 pageToken: string, The `next_page_token` value returned from a previous List request, if any. 1061 readTime: string, Reads documents as they were at the given time. This may not be older than 270 seconds. 1062 showMissing: boolean, If the list should show missing documents. A missing document is a document that does not exist but has sub-documents. These documents will be returned with a key but will not have fields, Document.create_time, or Document.update_time set. Requests with `show_missing` may not specify `where` or `order_by`. 1063 transaction: string, Reads documents in a transaction. 1064 x__xgafv: string, V1 error format. 1065 Allowed values 1066 1 - v1 error format 1067 2 - v2 error format 1068 1069Returns: 1070 An object of the form: 1071 1072 { # The response for Firestore.ListDocuments. 1073 "documents": [ # The Documents found. 1074 { # A Firestore document. Must not exceed 1 MiB - 4 bytes. 1075 "createTime": "A String", # Output only. The time at which the document was created. This value increases monotonically when a document is deleted then recreated. It can also be compared to values from other documents and the `read_time` of a query. 1076 "fields": { # The document's fields. The map keys represent field names. A simple field name contains only characters `a` to `z`, `A` to `Z`, `0` to `9`, or `_`, and must not start with `0` to `9`. For example, `foo_bar_17`. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. Field paths may be used in other contexts to refer to structured fields defined here. For `map_value`, the field path is represented by the simple or quoted field names of the containing fields, delimited by `.`. For example, the structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be represented by the field path `foo.x&y`. Within a field path, a quoted field name starts and ends with `` ` `` and may contain any character. Some characters, including `` ` ``, must be escaped using a `\`. For example, `` `x&y` `` represents `x&y` and `` `bak\`tik` `` represents `` bak`tik ``. 1077 "a_key": { # A message that can hold any of the supported value types. 1078 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 1079 "booleanValue": True or False, # A boolean value. 1080 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 1081 "doubleValue": 3.14, # A double value. 1082 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 1083 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 1084 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 1085 }, 1086 "integerValue": "A String", # An integer value. 1087 "mapValue": { # A map value. # A map value. 1088 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 1089 "a_key": # Object with schema name: Value 1090 }, 1091 }, 1092 "nullValue": "A String", # A null value. 1093 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1094 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 1095 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 1096 }, 1097 }, 1098 "name": "A String", # The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1099 "updateTime": "A String", # Output only. The time at which the document was last changed. This value is initially set to the `create_time` then increases monotonically with each change to the document. It can also be compared to values from other documents and the `read_time` of a query. 1100 }, 1101 ], 1102 "nextPageToken": "A String", # The next page token. 1103}</pre> 1104</div> 1105 1106<div class="method"> 1107 <code class="details" id="listCollectionIds">listCollectionIds(parent, body=None, x__xgafv=None)</code> 1108 <pre>Lists all the collection IDs underneath a document. 1109 1110Args: 1111 parent: string, Required. The parent document. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` (required) 1112 body: object, The request body. 1113 The object takes the form of: 1114 1115{ # The request for Firestore.ListCollectionIds. 1116 "pageSize": 42, # The maximum number of results to return. 1117 "pageToken": "A String", # A page token. Must be a value from ListCollectionIdsResponse. 1118} 1119 1120 x__xgafv: string, V1 error format. 1121 Allowed values 1122 1 - v1 error format 1123 2 - v2 error format 1124 1125Returns: 1126 An object of the form: 1127 1128 { # The response from Firestore.ListCollectionIds. 1129 "collectionIds": [ # The collection ids. 1130 "A String", 1131 ], 1132 "nextPageToken": "A String", # A page token that may be used to continue the list. 1133}</pre> 1134</div> 1135 1136<div class="method"> 1137 <code class="details" id="listCollectionIds_next">listCollectionIds_next(previous_request, previous_response)</code> 1138 <pre>Retrieves the next page of results. 1139 1140Args: 1141 previous_request: The request for the previous page. (required) 1142 previous_response: The response from the request for the previous page. (required) 1143 1144Returns: 1145 A request object that you can call 'execute()' on to request the next 1146 page. Returns None if there are no more items in the collection. 1147 </pre> 1148</div> 1149 1150<div class="method"> 1151 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 1152 <pre>Retrieves the next page of results. 1153 1154Args: 1155 previous_request: The request for the previous page. (required) 1156 previous_response: The response from the request for the previous page. (required) 1157 1158Returns: 1159 A request object that you can call 'execute()' on to request the next 1160 page. Returns None if there are no more items in the collection. 1161 </pre> 1162</div> 1163 1164<div class="method"> 1165 <code class="details" id="listen">listen(database, body=None, x__xgafv=None)</code> 1166 <pre>Listens to changes. 1167 1168Args: 1169 database: string, Required. The database name. In the format: `projects/{project_id}/databases/{database_id}`. (required) 1170 body: object, The request body. 1171 The object takes the form of: 1172 1173{ # A request for Firestore.Listen 1174 "addTarget": { # A specification of a set of documents to listen to. # A target to add to this stream. 1175 "documents": { # A target specified by a set of documents names. # A target specified by a set of document names. 1176 "documents": [ # The names of the documents to retrieve. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. The request will fail if any of the document is not a child resource of the given `database`. Duplicate names will be elided. 1177 "A String", 1178 ], 1179 }, 1180 "once": True or False, # If the target should be removed once it is current and consistent. 1181 "query": { # A target specified by a query. # A target specified by a query. 1182 "parent": "A String", # The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` 1183 "structuredQuery": { # A Firestore query. # A structured query. 1184 "endAt": { # A position in a query result set. # A end point for the query results. 1185 "before": True or False, # If the position is just before or just after the given values, relative to the sort order defined by the query. 1186 "values": [ # The values that represent a position, in the order they appear in the order by clause of a query. Can contain fewer values than specified in the order by clause. 1187 { # A message that can hold any of the supported value types. 1188 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 1189 "booleanValue": True or False, # A boolean value. 1190 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 1191 "doubleValue": 3.14, # A double value. 1192 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 1193 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 1194 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 1195 }, 1196 "integerValue": "A String", # An integer value. 1197 "mapValue": { # A map value. # A map value. 1198 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 1199 "a_key": # Object with schema name: Value 1200 }, 1201 }, 1202 "nullValue": "A String", # A null value. 1203 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1204 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 1205 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 1206 }, 1207 ], 1208 }, 1209 "from": [ # The collections to query. 1210 { # A selection of a collection, such as `messages as m1`. 1211 "allDescendants": True or False, # When false, selects only collections that are immediate children of the `parent` specified in the containing `RunQueryRequest`. When true, selects all descendant collections. 1212 "collectionId": "A String", # The collection ID. When set, selects only collections with this ID. 1213 }, 1214 ], 1215 "limit": 42, # The maximum number of results to return. Applies after all other constraints. Must be >= 0 if specified. 1216 "offset": 42, # The number of results to skip. Applies before limit, but after all other constraints. Must be >= 0 if specified. 1217 "orderBy": [ # The order to apply to the query results. Firestore guarantees a stable ordering through the following rules: * Any field required to appear in `order_by`, that is not already specified in `order_by`, is appended to the order in field name order by default. * If an order on `__name__` is not specified, it is appended by default. Fields are appended with the same sort direction as the last order specified, or 'ASCENDING' if no order was specified. For example: * `SELECT * FROM Foo ORDER BY A` becomes `SELECT * FROM Foo ORDER BY A, __name__` * `SELECT * FROM Foo ORDER BY A DESC` becomes `SELECT * FROM Foo ORDER BY A DESC, __name__ DESC` * `SELECT * FROM Foo WHERE A > 1` becomes `SELECT * FROM Foo WHERE A > 1 ORDER BY A, __name__` 1218 { # An order on a field. 1219 "direction": "A String", # The direction to order by. Defaults to `ASCENDING`. 1220 "field": { # A reference to a field, such as `max(messages.time) as max_time`. # The field to order by. 1221 "fieldPath": "A String", 1222 }, 1223 }, 1224 ], 1225 "select": { # The projection of document's fields to return. # The projection to return. 1226 "fields": [ # The fields to return. If empty, all fields are returned. To only return the name of the document, use `['__name__']`. 1227 { # A reference to a field, such as `max(messages.time) as max_time`. 1228 "fieldPath": "A String", 1229 }, 1230 ], 1231 }, 1232 "startAt": { # A position in a query result set. # A starting point for the query results. 1233 "before": True or False, # If the position is just before or just after the given values, relative to the sort order defined by the query. 1234 "values": [ # The values that represent a position, in the order they appear in the order by clause of a query. Can contain fewer values than specified in the order by clause. 1235 { # A message that can hold any of the supported value types. 1236 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 1237 "booleanValue": True or False, # A boolean value. 1238 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 1239 "doubleValue": 3.14, # A double value. 1240 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 1241 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 1242 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 1243 }, 1244 "integerValue": "A String", # An integer value. 1245 "mapValue": { # A map value. # A map value. 1246 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 1247 "a_key": # Object with schema name: Value 1248 }, 1249 }, 1250 "nullValue": "A String", # A null value. 1251 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1252 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 1253 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 1254 }, 1255 ], 1256 }, 1257 "where": { # A filter. # The filter to apply. 1258 "compositeFilter": { # A filter that merges multiple other filters using the given operator. # A composite filter. 1259 "filters": [ # The list of filters to combine. Must contain at least one filter. 1260 # Object with schema name: Filter 1261 ], 1262 "op": "A String", # The operator for combining multiple filters. 1263 }, 1264 "fieldFilter": { # A filter on a specific field. # A filter on a document field. 1265 "field": { # A reference to a field, such as `max(messages.time) as max_time`. # The field to filter by. 1266 "fieldPath": "A String", 1267 }, 1268 "op": "A String", # The operator to filter by. 1269 "value": { # A message that can hold any of the supported value types. # The value to compare to. 1270 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 1271 "booleanValue": True or False, # A boolean value. 1272 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 1273 "doubleValue": 3.14, # A double value. 1274 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 1275 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 1276 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 1277 }, 1278 "integerValue": "A String", # An integer value. 1279 "mapValue": { # A map value. # A map value. 1280 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 1281 "a_key": # Object with schema name: Value 1282 }, 1283 }, 1284 "nullValue": "A String", # A null value. 1285 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1286 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 1287 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 1288 }, 1289 }, 1290 "unaryFilter": { # A filter with a single operand. # A filter that takes exactly one argument. 1291 "field": { # A reference to a field, such as `max(messages.time) as max_time`. # The field to which to apply the operator. 1292 "fieldPath": "A String", 1293 }, 1294 "op": "A String", # The unary operator to apply. 1295 }, 1296 }, 1297 }, 1298 }, 1299 "readTime": "A String", # Start listening after a specific `read_time`. The client must know the state of matching documents at this time. 1300 "resumeToken": "A String", # A resume token from a prior TargetChange for an identical target. Using a resume token with a different target is unsupported and may fail. 1301 "targetId": 42, # The target ID that identifies the target on the stream. Must be a positive number and non-zero. 1302 }, 1303 "labels": { # Labels associated with this target change. 1304 "a_key": "A String", 1305 }, 1306 "removeTarget": 42, # The ID of a target to remove from this stream. 1307} 1308 1309 x__xgafv: string, V1 error format. 1310 Allowed values 1311 1 - v1 error format 1312 2 - v2 error format 1313 1314Returns: 1315 An object of the form: 1316 1317 { # The response for Firestore.Listen. 1318 "documentChange": { # A Document has changed. May be the result of multiple writes, including deletes, that ultimately resulted in a new value for the Document. Multiple DocumentChange messages may be returned for the same logical change, if multiple targets are affected. # A Document has changed. 1319 "document": { # A Firestore document. Must not exceed 1 MiB - 4 bytes. # The new state of the Document. If `mask` is set, contains only fields that were updated or added. 1320 "createTime": "A String", # Output only. The time at which the document was created. This value increases monotonically when a document is deleted then recreated. It can also be compared to values from other documents and the `read_time` of a query. 1321 "fields": { # The document's fields. The map keys represent field names. A simple field name contains only characters `a` to `z`, `A` to `Z`, `0` to `9`, or `_`, and must not start with `0` to `9`. For example, `foo_bar_17`. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. Field paths may be used in other contexts to refer to structured fields defined here. For `map_value`, the field path is represented by the simple or quoted field names of the containing fields, delimited by `.`. For example, the structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be represented by the field path `foo.x&y`. Within a field path, a quoted field name starts and ends with `` ` `` and may contain any character. Some characters, including `` ` ``, must be escaped using a `\`. For example, `` `x&y` `` represents `x&y` and `` `bak\`tik` `` represents `` bak`tik ``. 1322 "a_key": { # A message that can hold any of the supported value types. 1323 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 1324 "booleanValue": True or False, # A boolean value. 1325 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 1326 "doubleValue": 3.14, # A double value. 1327 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 1328 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 1329 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 1330 }, 1331 "integerValue": "A String", # An integer value. 1332 "mapValue": { # A map value. # A map value. 1333 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 1334 "a_key": # Object with schema name: Value 1335 }, 1336 }, 1337 "nullValue": "A String", # A null value. 1338 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1339 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 1340 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 1341 }, 1342 }, 1343 "name": "A String", # The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1344 "updateTime": "A String", # Output only. The time at which the document was last changed. This value is initially set to the `create_time` then increases monotonically with each change to the document. It can also be compared to values from other documents and the `read_time` of a query. 1345 }, 1346 "removedTargetIds": [ # A set of target IDs for targets that no longer match this document. 1347 42, 1348 ], 1349 "targetIds": [ # A set of target IDs of targets that match this document. 1350 42, 1351 ], 1352 }, 1353 "documentDelete": { # A Document has been deleted. May be the result of multiple writes, including updates, the last of which deleted the Document. Multiple DocumentDelete messages may be returned for the same logical delete, if multiple targets are affected. # A Document has been deleted. 1354 "document": "A String", # The resource name of the Document that was deleted. 1355 "readTime": "A String", # The read timestamp at which the delete was observed. Greater or equal to the `commit_time` of the delete. 1356 "removedTargetIds": [ # A set of target IDs for targets that previously matched this entity. 1357 42, 1358 ], 1359 }, 1360 "documentRemove": { # A Document has been removed from the view of the targets. Sent if the document is no longer relevant to a target and is out of view. Can be sent instead of a DocumentDelete or a DocumentChange if the server can not send the new value of the document. Multiple DocumentRemove messages may be returned for the same logical write or delete, if multiple targets are affected. # A Document has been removed from a target (because it is no longer relevant to that target). 1361 "document": "A String", # The resource name of the Document that has gone out of view. 1362 "readTime": "A String", # The read timestamp at which the remove was observed. Greater or equal to the `commit_time` of the change/delete/remove. 1363 "removedTargetIds": [ # A set of target IDs for targets that previously matched this document. 1364 42, 1365 ], 1366 }, 1367 "filter": { # A digest of all the documents that match a given target. # A filter to apply to the set of documents previously returned for the given target. Returned when documents may have been removed from the given target, but the exact documents are unknown. 1368 "count": 42, # The total count of documents that match target_id. If different from the count of documents in the client that match, the client must manually determine which documents no longer match the target. 1369 "targetId": 42, # The target ID to which this filter applies. 1370 }, 1371 "targetChange": { # Targets being watched have changed. # Targets have changed. 1372 "cause": { # 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 that resulted in this change, if applicable. 1373 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 1374 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 1375 { 1376 "a_key": "", # Properties of the object. Contains field @type with type URL. 1377 }, 1378 ], 1379 "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. 1380 }, 1381 "readTime": "A String", # The consistent `read_time` for the given `target_ids` (omitted when the target_ids are not at a consistent snapshot). The stream is guaranteed to send a `read_time` with `target_ids` empty whenever the entire stream reaches a new consistent snapshot. ADD, CURRENT, and RESET messages are guaranteed to (eventually) result in a new consistent snapshot (while NO_CHANGE and REMOVE messages are not). For a given stream, `read_time` is guaranteed to be monotonically increasing. 1382 "resumeToken": "A String", # A token that can be used to resume the stream for the given `target_ids`, or all targets if `target_ids` is empty. Not set on every target change. 1383 "targetChangeType": "A String", # The type of change that occurred. 1384 "targetIds": [ # The target IDs of targets that have changed. If empty, the change applies to all targets. The order of the target IDs is not defined. 1385 42, 1386 ], 1387 }, 1388}</pre> 1389</div> 1390 1391<div class="method"> 1392 <code class="details" id="partitionQuery">partitionQuery(parent, body=None, x__xgafv=None)</code> 1393 <pre>Partitions a query by returning partition cursors that can be used to run the query in parallel. The returned partition cursors are split points that can be used by RunQuery as starting/end points for the query results. 1394 1395Args: 1396 parent: string, Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents`. Document resource names are not supported; only database resource names can be specified. (required) 1397 body: object, The request body. 1398 The object takes the form of: 1399 1400{ # The request for Firestore.PartitionQuery. 1401 "pageSize": 42, # The maximum number of partitions to return in this call, subject to `partition_count`. For example, if `partition_count` = 10 and `page_size` = 8, the first call to PartitionQuery will return up to 8 partitions and a `next_page_token` if more results exist. A second call to PartitionQuery will return up to 2 partitions, to complete the total of 10 specified in `partition_count`. 1402 "pageToken": "A String", # The `next_page_token` value returned from a previous call to PartitionQuery that may be used to get an additional set of results. There are no ordering guarantees between sets of results. Thus, using multiple sets of results will require merging the different result sets. For example, two subsequent calls using a page_token may return: * cursor B, cursor M, cursor Q * cursor A, cursor U, cursor W To obtain a complete result set ordered with respect to the results of the query supplied to PartitionQuery, the results sets should be merged: cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W 1403 "partitionCount": "A String", # The desired maximum number of partition points. The partitions may be returned across multiple pages of results. The number must be positive. The actual number of partitions returned may be fewer. For example, this may be set to one fewer than the number of parallel queries to be run, or in running a data pipeline job, one fewer than the number of workers or compute instances available. 1404 "structuredQuery": { # A Firestore query. # A structured query. Query must specify collection with all descendants and be ordered by name ascending. Other filters, order bys, limits, offsets, and start/end cursors are not supported. 1405 "endAt": { # A position in a query result set. # A end point for the query results. 1406 "before": True or False, # If the position is just before or just after the given values, relative to the sort order defined by the query. 1407 "values": [ # The values that represent a position, in the order they appear in the order by clause of a query. Can contain fewer values than specified in the order by clause. 1408 { # A message that can hold any of the supported value types. 1409 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 1410 "booleanValue": True or False, # A boolean value. 1411 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 1412 "doubleValue": 3.14, # A double value. 1413 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 1414 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 1415 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 1416 }, 1417 "integerValue": "A String", # An integer value. 1418 "mapValue": { # A map value. # A map value. 1419 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 1420 "a_key": # Object with schema name: Value 1421 }, 1422 }, 1423 "nullValue": "A String", # A null value. 1424 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1425 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 1426 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 1427 }, 1428 ], 1429 }, 1430 "from": [ # The collections to query. 1431 { # A selection of a collection, such as `messages as m1`. 1432 "allDescendants": True or False, # When false, selects only collections that are immediate children of the `parent` specified in the containing `RunQueryRequest`. When true, selects all descendant collections. 1433 "collectionId": "A String", # The collection ID. When set, selects only collections with this ID. 1434 }, 1435 ], 1436 "limit": 42, # The maximum number of results to return. Applies after all other constraints. Must be >= 0 if specified. 1437 "offset": 42, # The number of results to skip. Applies before limit, but after all other constraints. Must be >= 0 if specified. 1438 "orderBy": [ # The order to apply to the query results. Firestore guarantees a stable ordering through the following rules: * Any field required to appear in `order_by`, that is not already specified in `order_by`, is appended to the order in field name order by default. * If an order on `__name__` is not specified, it is appended by default. Fields are appended with the same sort direction as the last order specified, or 'ASCENDING' if no order was specified. For example: * `SELECT * FROM Foo ORDER BY A` becomes `SELECT * FROM Foo ORDER BY A, __name__` * `SELECT * FROM Foo ORDER BY A DESC` becomes `SELECT * FROM Foo ORDER BY A DESC, __name__ DESC` * `SELECT * FROM Foo WHERE A > 1` becomes `SELECT * FROM Foo WHERE A > 1 ORDER BY A, __name__` 1439 { # An order on a field. 1440 "direction": "A String", # The direction to order by. Defaults to `ASCENDING`. 1441 "field": { # A reference to a field, such as `max(messages.time) as max_time`. # The field to order by. 1442 "fieldPath": "A String", 1443 }, 1444 }, 1445 ], 1446 "select": { # The projection of document's fields to return. # The projection to return. 1447 "fields": [ # The fields to return. If empty, all fields are returned. To only return the name of the document, use `['__name__']`. 1448 { # A reference to a field, such as `max(messages.time) as max_time`. 1449 "fieldPath": "A String", 1450 }, 1451 ], 1452 }, 1453 "startAt": { # A position in a query result set. # A starting point for the query results. 1454 "before": True or False, # If the position is just before or just after the given values, relative to the sort order defined by the query. 1455 "values": [ # The values that represent a position, in the order they appear in the order by clause of a query. Can contain fewer values than specified in the order by clause. 1456 { # A message that can hold any of the supported value types. 1457 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 1458 "booleanValue": True or False, # A boolean value. 1459 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 1460 "doubleValue": 3.14, # A double value. 1461 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 1462 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 1463 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 1464 }, 1465 "integerValue": "A String", # An integer value. 1466 "mapValue": { # A map value. # A map value. 1467 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 1468 "a_key": # Object with schema name: Value 1469 }, 1470 }, 1471 "nullValue": "A String", # A null value. 1472 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1473 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 1474 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 1475 }, 1476 ], 1477 }, 1478 "where": { # A filter. # The filter to apply. 1479 "compositeFilter": { # A filter that merges multiple other filters using the given operator. # A composite filter. 1480 "filters": [ # The list of filters to combine. Must contain at least one filter. 1481 # Object with schema name: Filter 1482 ], 1483 "op": "A String", # The operator for combining multiple filters. 1484 }, 1485 "fieldFilter": { # A filter on a specific field. # A filter on a document field. 1486 "field": { # A reference to a field, such as `max(messages.time) as max_time`. # The field to filter by. 1487 "fieldPath": "A String", 1488 }, 1489 "op": "A String", # The operator to filter by. 1490 "value": { # A message that can hold any of the supported value types. # The value to compare to. 1491 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 1492 "booleanValue": True or False, # A boolean value. 1493 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 1494 "doubleValue": 3.14, # A double value. 1495 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 1496 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 1497 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 1498 }, 1499 "integerValue": "A String", # An integer value. 1500 "mapValue": { # A map value. # A map value. 1501 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 1502 "a_key": # Object with schema name: Value 1503 }, 1504 }, 1505 "nullValue": "A String", # A null value. 1506 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1507 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 1508 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 1509 }, 1510 }, 1511 "unaryFilter": { # A filter with a single operand. # A filter that takes exactly one argument. 1512 "field": { # A reference to a field, such as `max(messages.time) as max_time`. # The field to which to apply the operator. 1513 "fieldPath": "A String", 1514 }, 1515 "op": "A String", # The unary operator to apply. 1516 }, 1517 }, 1518 }, 1519} 1520 1521 x__xgafv: string, V1 error format. 1522 Allowed values 1523 1 - v1 error format 1524 2 - v2 error format 1525 1526Returns: 1527 An object of the form: 1528 1529 { # The response for Firestore.PartitionQuery. 1530 "nextPageToken": "A String", # A page token that may be used to request an additional set of results, up to the number specified by `partition_count` in the PartitionQuery request. If blank, there are no more results. 1531 "partitions": [ # Partition results. Each partition is a split point that can be used by RunQuery as a starting or end point for the query results. The RunQuery requests must be made with the same query supplied to this PartitionQuery request. The partition cursors will be ordered according to same ordering as the results of the query supplied to PartitionQuery. For example, if a PartitionQuery request returns partition cursors A and B, running the following three queries will return the entire result set of the original query: * query, end_at A * query, start_at A, end_at B * query, start_at B An empty result may indicate that the query has too few results to be partitioned. 1532 { # A position in a query result set. 1533 "before": True or False, # If the position is just before or just after the given values, relative to the sort order defined by the query. 1534 "values": [ # The values that represent a position, in the order they appear in the order by clause of a query. Can contain fewer values than specified in the order by clause. 1535 { # A message that can hold any of the supported value types. 1536 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 1537 "booleanValue": True or False, # A boolean value. 1538 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 1539 "doubleValue": 3.14, # A double value. 1540 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 1541 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 1542 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 1543 }, 1544 "integerValue": "A String", # An integer value. 1545 "mapValue": { # A map value. # A map value. 1546 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 1547 "a_key": # Object with schema name: Value 1548 }, 1549 }, 1550 "nullValue": "A String", # A null value. 1551 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1552 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 1553 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 1554 }, 1555 ], 1556 }, 1557 ], 1558}</pre> 1559</div> 1560 1561<div class="method"> 1562 <code class="details" id="partitionQuery_next">partitionQuery_next(previous_request, previous_response)</code> 1563 <pre>Retrieves the next page of results. 1564 1565Args: 1566 previous_request: The request for the previous page. (required) 1567 previous_response: The response from the request for the previous page. (required) 1568 1569Returns: 1570 A request object that you can call 'execute()' on to request the next 1571 page. Returns None if there are no more items in the collection. 1572 </pre> 1573</div> 1574 1575<div class="method"> 1576 <code class="details" id="patch">patch(name, body=None, currentDocument_exists=None, currentDocument_updateTime=None, mask_fieldPaths=None, updateMask_fieldPaths=None, x__xgafv=None)</code> 1577 <pre>Updates or inserts a document. 1578 1579Args: 1580 name: string, The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`. (required) 1581 body: object, The request body. 1582 The object takes the form of: 1583 1584{ # A Firestore document. Must not exceed 1 MiB - 4 bytes. 1585 "createTime": "A String", # Output only. The time at which the document was created. This value increases monotonically when a document is deleted then recreated. It can also be compared to values from other documents and the `read_time` of a query. 1586 "fields": { # The document's fields. The map keys represent field names. A simple field name contains only characters `a` to `z`, `A` to `Z`, `0` to `9`, or `_`, and must not start with `0` to `9`. For example, `foo_bar_17`. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. Field paths may be used in other contexts to refer to structured fields defined here. For `map_value`, the field path is represented by the simple or quoted field names of the containing fields, delimited by `.`. For example, the structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be represented by the field path `foo.x&y`. Within a field path, a quoted field name starts and ends with `` ` `` and may contain any character. Some characters, including `` ` ``, must be escaped using a `\`. For example, `` `x&y` `` represents `x&y` and `` `bak\`tik` `` represents `` bak`tik ``. 1587 "a_key": { # A message that can hold any of the supported value types. 1588 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 1589 "booleanValue": True or False, # A boolean value. 1590 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 1591 "doubleValue": 3.14, # A double value. 1592 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 1593 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 1594 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 1595 }, 1596 "integerValue": "A String", # An integer value. 1597 "mapValue": { # A map value. # A map value. 1598 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 1599 "a_key": # Object with schema name: Value 1600 }, 1601 }, 1602 "nullValue": "A String", # A null value. 1603 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1604 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 1605 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 1606 }, 1607 }, 1608 "name": "A String", # The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1609 "updateTime": "A String", # Output only. The time at which the document was last changed. This value is initially set to the `create_time` then increases monotonically with each change to the document. It can also be compared to values from other documents and the `read_time` of a query. 1610} 1611 1612 currentDocument_exists: boolean, When set to `true`, the target document must exist. When set to `false`, the target document must not exist. 1613 currentDocument_updateTime: string, When set, the target document must exist and have been last updated at that time. Timestamp must be microsecond aligned. 1614 mask_fieldPaths: string, The list of field paths in the mask. See Document.fields for a field path syntax reference. (repeated) 1615 updateMask_fieldPaths: string, The list of field paths in the mask. See Document.fields for a field path syntax reference. (repeated) 1616 x__xgafv: string, V1 error format. 1617 Allowed values 1618 1 - v1 error format 1619 2 - v2 error format 1620 1621Returns: 1622 An object of the form: 1623 1624 { # A Firestore document. Must not exceed 1 MiB - 4 bytes. 1625 "createTime": "A String", # Output only. The time at which the document was created. This value increases monotonically when a document is deleted then recreated. It can also be compared to values from other documents and the `read_time` of a query. 1626 "fields": { # The document's fields. The map keys represent field names. A simple field name contains only characters `a` to `z`, `A` to `Z`, `0` to `9`, or `_`, and must not start with `0` to `9`. For example, `foo_bar_17`. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. Field paths may be used in other contexts to refer to structured fields defined here. For `map_value`, the field path is represented by the simple or quoted field names of the containing fields, delimited by `.`. For example, the structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be represented by the field path `foo.x&y`. Within a field path, a quoted field name starts and ends with `` ` `` and may contain any character. Some characters, including `` ` ``, must be escaped using a `\`. For example, `` `x&y` `` represents `x&y` and `` `bak\`tik` `` represents `` bak`tik ``. 1627 "a_key": { # A message that can hold any of the supported value types. 1628 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 1629 "booleanValue": True or False, # A boolean value. 1630 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 1631 "doubleValue": 3.14, # A double value. 1632 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 1633 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 1634 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 1635 }, 1636 "integerValue": "A String", # An integer value. 1637 "mapValue": { # A map value. # A map value. 1638 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 1639 "a_key": # Object with schema name: Value 1640 }, 1641 }, 1642 "nullValue": "A String", # A null value. 1643 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1644 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 1645 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 1646 }, 1647 }, 1648 "name": "A String", # The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1649 "updateTime": "A String", # Output only. The time at which the document was last changed. This value is initially set to the `create_time` then increases monotonically with each change to the document. It can also be compared to values from other documents and the `read_time` of a query. 1650}</pre> 1651</div> 1652 1653<div class="method"> 1654 <code class="details" id="rollback">rollback(database, body=None, x__xgafv=None)</code> 1655 <pre>Rolls back a transaction. 1656 1657Args: 1658 database: string, Required. The database name. In the format: `projects/{project_id}/databases/{database_id}`. (required) 1659 body: object, The request body. 1660 The object takes the form of: 1661 1662{ # The request for Firestore.Rollback. 1663 "transaction": "A String", # Required. The transaction to roll back. 1664} 1665 1666 x__xgafv: string, V1 error format. 1667 Allowed values 1668 1 - v1 error format 1669 2 - v2 error format 1670 1671Returns: 1672 An object of the form: 1673 1674 { # 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 `{}`. 1675}</pre> 1676</div> 1677 1678<div class="method"> 1679 <code class="details" id="runQuery">runQuery(parent, body=None, x__xgafv=None)</code> 1680 <pre>Runs a query. 1681 1682Args: 1683 parent: string, Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/documents/{document_path}`. For example: `projects/my-project/databases/my-database/documents` or `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` (required) 1684 body: object, The request body. 1685 The object takes the form of: 1686 1687{ # The request for Firestore.RunQuery. 1688 "newTransaction": { # Options for creating a new transaction. # Starts a new transaction and reads the documents. Defaults to a read-only transaction. The new transaction ID will be returned as the first response in the stream. 1689 "readOnly": { # Options for a transaction that can only be used to read documents. # The transaction can only be used for read operations. 1690 "readTime": "A String", # Reads documents at the given time. This may not be older than 60 seconds. 1691 }, 1692 "readWrite": { # Options for a transaction that can be used to read and write documents. # The transaction can be used for both read and write operations. 1693 "retryTransaction": "A String", # An optional transaction to retry. 1694 }, 1695 }, 1696 "readTime": "A String", # Reads documents as they were at the given time. This may not be older than 270 seconds. 1697 "structuredQuery": { # A Firestore query. # A structured query. 1698 "endAt": { # A position in a query result set. # A end point for the query results. 1699 "before": True or False, # If the position is just before or just after the given values, relative to the sort order defined by the query. 1700 "values": [ # The values that represent a position, in the order they appear in the order by clause of a query. Can contain fewer values than specified in the order by clause. 1701 { # A message that can hold any of the supported value types. 1702 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 1703 "booleanValue": True or False, # A boolean value. 1704 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 1705 "doubleValue": 3.14, # A double value. 1706 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 1707 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 1708 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 1709 }, 1710 "integerValue": "A String", # An integer value. 1711 "mapValue": { # A map value. # A map value. 1712 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 1713 "a_key": # Object with schema name: Value 1714 }, 1715 }, 1716 "nullValue": "A String", # A null value. 1717 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1718 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 1719 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 1720 }, 1721 ], 1722 }, 1723 "from": [ # The collections to query. 1724 { # A selection of a collection, such as `messages as m1`. 1725 "allDescendants": True or False, # When false, selects only collections that are immediate children of the `parent` specified in the containing `RunQueryRequest`. When true, selects all descendant collections. 1726 "collectionId": "A String", # The collection ID. When set, selects only collections with this ID. 1727 }, 1728 ], 1729 "limit": 42, # The maximum number of results to return. Applies after all other constraints. Must be >= 0 if specified. 1730 "offset": 42, # The number of results to skip. Applies before limit, but after all other constraints. Must be >= 0 if specified. 1731 "orderBy": [ # The order to apply to the query results. Firestore guarantees a stable ordering through the following rules: * Any field required to appear in `order_by`, that is not already specified in `order_by`, is appended to the order in field name order by default. * If an order on `__name__` is not specified, it is appended by default. Fields are appended with the same sort direction as the last order specified, or 'ASCENDING' if no order was specified. For example: * `SELECT * FROM Foo ORDER BY A` becomes `SELECT * FROM Foo ORDER BY A, __name__` * `SELECT * FROM Foo ORDER BY A DESC` becomes `SELECT * FROM Foo ORDER BY A DESC, __name__ DESC` * `SELECT * FROM Foo WHERE A > 1` becomes `SELECT * FROM Foo WHERE A > 1 ORDER BY A, __name__` 1732 { # An order on a field. 1733 "direction": "A String", # The direction to order by. Defaults to `ASCENDING`. 1734 "field": { # A reference to a field, such as `max(messages.time) as max_time`. # The field to order by. 1735 "fieldPath": "A String", 1736 }, 1737 }, 1738 ], 1739 "select": { # The projection of document's fields to return. # The projection to return. 1740 "fields": [ # The fields to return. If empty, all fields are returned. To only return the name of the document, use `['__name__']`. 1741 { # A reference to a field, such as `max(messages.time) as max_time`. 1742 "fieldPath": "A String", 1743 }, 1744 ], 1745 }, 1746 "startAt": { # A position in a query result set. # A starting point for the query results. 1747 "before": True or False, # If the position is just before or just after the given values, relative to the sort order defined by the query. 1748 "values": [ # The values that represent a position, in the order they appear in the order by clause of a query. Can contain fewer values than specified in the order by clause. 1749 { # A message that can hold any of the supported value types. 1750 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 1751 "booleanValue": True or False, # A boolean value. 1752 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 1753 "doubleValue": 3.14, # A double value. 1754 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 1755 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 1756 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 1757 }, 1758 "integerValue": "A String", # An integer value. 1759 "mapValue": { # A map value. # A map value. 1760 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 1761 "a_key": # Object with schema name: Value 1762 }, 1763 }, 1764 "nullValue": "A String", # A null value. 1765 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1766 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 1767 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 1768 }, 1769 ], 1770 }, 1771 "where": { # A filter. # The filter to apply. 1772 "compositeFilter": { # A filter that merges multiple other filters using the given operator. # A composite filter. 1773 "filters": [ # The list of filters to combine. Must contain at least one filter. 1774 # Object with schema name: Filter 1775 ], 1776 "op": "A String", # The operator for combining multiple filters. 1777 }, 1778 "fieldFilter": { # A filter on a specific field. # A filter on a document field. 1779 "field": { # A reference to a field, such as `max(messages.time) as max_time`. # The field to filter by. 1780 "fieldPath": "A String", 1781 }, 1782 "op": "A String", # The operator to filter by. 1783 "value": { # A message that can hold any of the supported value types. # The value to compare to. 1784 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 1785 "booleanValue": True or False, # A boolean value. 1786 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 1787 "doubleValue": 3.14, # A double value. 1788 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 1789 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 1790 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 1791 }, 1792 "integerValue": "A String", # An integer value. 1793 "mapValue": { # A map value. # A map value. 1794 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 1795 "a_key": # Object with schema name: Value 1796 }, 1797 }, 1798 "nullValue": "A String", # A null value. 1799 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1800 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 1801 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 1802 }, 1803 }, 1804 "unaryFilter": { # A filter with a single operand. # A filter that takes exactly one argument. 1805 "field": { # A reference to a field, such as `max(messages.time) as max_time`. # The field to which to apply the operator. 1806 "fieldPath": "A String", 1807 }, 1808 "op": "A String", # The unary operator to apply. 1809 }, 1810 }, 1811 }, 1812 "transaction": "A String", # Reads documents in a transaction. 1813} 1814 1815 x__xgafv: string, V1 error format. 1816 Allowed values 1817 1 - v1 error format 1818 2 - v2 error format 1819 1820Returns: 1821 An object of the form: 1822 1823 { # The response for Firestore.RunQuery. 1824 "document": { # A Firestore document. Must not exceed 1 MiB - 4 bytes. # A query result. Not set when reporting partial progress. 1825 "createTime": "A String", # Output only. The time at which the document was created. This value increases monotonically when a document is deleted then recreated. It can also be compared to values from other documents and the `read_time` of a query. 1826 "fields": { # The document's fields. The map keys represent field names. A simple field name contains only characters `a` to `z`, `A` to `Z`, `0` to `9`, or `_`, and must not start with `0` to `9`. For example, `foo_bar_17`. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. Field paths may be used in other contexts to refer to structured fields defined here. For `map_value`, the field path is represented by the simple or quoted field names of the containing fields, delimited by `.`. For example, the structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be represented by the field path `foo.x&y`. Within a field path, a quoted field name starts and ends with `` ` `` and may contain any character. Some characters, including `` ` ``, must be escaped using a `\`. For example, `` `x&y` `` represents `x&y` and `` `bak\`tik` `` represents `` bak`tik ``. 1827 "a_key": { # A message that can hold any of the supported value types. 1828 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 1829 "booleanValue": True or False, # A boolean value. 1830 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 1831 "doubleValue": 3.14, # A double value. 1832 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 1833 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 1834 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 1835 }, 1836 "integerValue": "A String", # An integer value. 1837 "mapValue": { # A map value. # A map value. 1838 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 1839 "a_key": # Object with schema name: Value 1840 }, 1841 }, 1842 "nullValue": "A String", # A null value. 1843 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1844 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 1845 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 1846 }, 1847 }, 1848 "name": "A String", # The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1849 "updateTime": "A String", # Output only. The time at which the document was last changed. This value is initially set to the `create_time` then increases monotonically with each change to the document. It can also be compared to values from other documents and the `read_time` of a query. 1850 }, 1851 "readTime": "A String", # The time at which the document was read. This may be monotonically increasing; in this case, the previous documents in the result stream are guaranteed not to have changed between their `read_time` and this one. If the query returns no results, a response with `read_time` and no `document` will be sent, and this represents the time at which the query was run. 1852 "skippedResults": 42, # The number of results that have been skipped due to an offset between the last response and the current response. 1853 "transaction": "A String", # The transaction that was started as part of this request. Can only be set in the first response, and only if RunQueryRequest.new_transaction was set in the request. If set, no other fields will be set in this response. 1854}</pre> 1855</div> 1856 1857<div class="method"> 1858 <code class="details" id="write">write(database, body=None, x__xgafv=None)</code> 1859 <pre>Streams batches of document updates and deletes, in order. 1860 1861Args: 1862 database: string, Required. The database name. In the format: `projects/{project_id}/databases/{database_id}`. This is only required in the first message. (required) 1863 body: object, The request body. 1864 The object takes the form of: 1865 1866{ # The request for Firestore.Write. The first request creates a stream, or resumes an existing one from a token. When creating a new stream, the server replies with a response containing only an ID and a token, to use in the next request. When resuming a stream, the server first streams any responses later than the given token, then a response containing only an up-to-date token, to use in the next request. 1867 "labels": { # Labels associated with this write request. 1868 "a_key": "A String", 1869 }, 1870 "streamId": "A String", # The ID of the write stream to resume. This may only be set in the first message. When left empty, a new write stream will be created. 1871 "streamToken": "A String", # A stream token that was previously sent by the server. The client should set this field to the token from the most recent WriteResponse it has received. This acknowledges that the client has received responses up to this token. After sending this token, earlier tokens may not be used anymore. The server may close the stream if there are too many unacknowledged responses. Leave this field unset when creating a new stream. To resume a stream at a specific point, set this field and the `stream_id` field. Leave this field unset when creating a new stream. 1872 "writes": [ # The writes to apply. Always executed atomically and in order. This must be empty on the first request. This may be empty on the last request. This must not be empty on all other requests. 1873 { # A write on a document. 1874 "currentDocument": { # A precondition on a document, used for conditional operations. # An optional precondition on the document. The write will fail if this is set and not met by the target document. 1875 "exists": True or False, # When set to `true`, the target document must exist. When set to `false`, the target document must not exist. 1876 "updateTime": "A String", # When set, the target document must exist and have been last updated at that time. Timestamp must be microsecond aligned. 1877 }, 1878 "delete": "A String", # A document name to delete. In the format: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1879 "transform": { # A transformation of a document. # Applies a transformation to a document. 1880 "document": "A String", # The name of the document to transform. 1881 "fieldTransforms": [ # The list of transformations to apply to the fields of the document, in order. This must not be empty. 1882 { # A transformation of a field of the document. 1883 "appendMissingElements": { # An array value. # Append the given elements in order if they are not already present in the current field value. If the field is not an array, or if the field does not yet exist, it is first set to the empty array. Equivalent numbers of different types (e.g. 3L and 3.0) are considered equal when checking if a value is missing. NaN is equal to NaN, and Null is equal to Null. If the input contains multiple equivalent values, only the first will be considered. The corresponding transform_result will be the null value. 1884 "values": [ # Values in the array. 1885 { # A message that can hold any of the supported value types. 1886 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 1887 "booleanValue": True or False, # A boolean value. 1888 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 1889 "doubleValue": 3.14, # A double value. 1890 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 1891 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 1892 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 1893 }, 1894 "integerValue": "A String", # An integer value. 1895 "mapValue": { # A map value. # A map value. 1896 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 1897 "a_key": # Object with schema name: Value 1898 }, 1899 }, 1900 "nullValue": "A String", # A null value. 1901 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1902 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 1903 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 1904 }, 1905 ], 1906 }, 1907 "fieldPath": "A String", # The path of the field. See Document.fields for the field path syntax reference. 1908 "increment": { # A message that can hold any of the supported value types. # Adds the given value to the field's current value. This must be an integer or a double value. If the field is not an integer or double, or if the field does not yet exist, the transformation will set the field to the given value. If either of the given value or the current field value are doubles, both values will be interpreted as doubles. Double arithmetic and representation of double values follow IEEE 754 semantics. If there is positive/negative integer overflow, the field is resolved to the largest magnitude positive/negative integer. 1909 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 1910 "booleanValue": True or False, # A boolean value. 1911 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 1912 "doubleValue": 3.14, # A double value. 1913 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 1914 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 1915 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 1916 }, 1917 "integerValue": "A String", # An integer value. 1918 "mapValue": { # A map value. # A map value. 1919 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 1920 "a_key": # Object with schema name: Value 1921 }, 1922 }, 1923 "nullValue": "A String", # A null value. 1924 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1925 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 1926 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 1927 }, 1928 "maximum": { # A message that can hold any of the supported value types. # Sets the field to the maximum of its current value and the given value. This must be an integer or a double value. If the field is not an integer or double, or if the field does not yet exist, the transformation will set the field to the given value. If a maximum operation is applied where the field and the input value are of mixed types (that is - one is an integer and one is a double) the field takes on the type of the larger operand. If the operands are equivalent (e.g. 3 and 3.0), the field does not change. 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and zero input value is always the stored value. The maximum of any numeric value x and NaN is NaN. 1929 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 1930 "booleanValue": True or False, # A boolean value. 1931 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 1932 "doubleValue": 3.14, # A double value. 1933 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 1934 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 1935 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 1936 }, 1937 "integerValue": "A String", # An integer value. 1938 "mapValue": { # A map value. # A map value. 1939 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 1940 "a_key": # Object with schema name: Value 1941 }, 1942 }, 1943 "nullValue": "A String", # A null value. 1944 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1945 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 1946 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 1947 }, 1948 "minimum": { # A message that can hold any of the supported value types. # Sets the field to the minimum of its current value and the given value. This must be an integer or a double value. If the field is not an integer or double, or if the field does not yet exist, the transformation will set the field to the input value. If a minimum operation is applied where the field and the input value are of mixed types (that is - one is an integer and one is a double) the field takes on the type of the smaller operand. If the operands are equivalent (e.g. 3 and 3.0), the field does not change. 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and zero input value is always the stored value. The minimum of any numeric value x and NaN is NaN. 1949 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 1950 "booleanValue": True or False, # A boolean value. 1951 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 1952 "doubleValue": 3.14, # A double value. 1953 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 1954 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 1955 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 1956 }, 1957 "integerValue": "A String", # An integer value. 1958 "mapValue": { # A map value. # A map value. 1959 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 1960 "a_key": # Object with schema name: Value 1961 }, 1962 }, 1963 "nullValue": "A String", # A null value. 1964 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1965 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 1966 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 1967 }, 1968 "removeAllFromArray": { # An array value. # Remove all of the given elements from the array in the field. If the field is not an array, or if the field does not yet exist, it is set to the empty array. Equivalent numbers of the different types (e.g. 3L and 3.0) are considered equal when deciding whether an element should be removed. NaN is equal to NaN, and Null is equal to Null. This will remove all equivalent values if there are duplicates. The corresponding transform_result will be the null value. 1969 "values": [ # Values in the array. 1970 { # A message that can hold any of the supported value types. 1971 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 1972 "booleanValue": True or False, # A boolean value. 1973 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 1974 "doubleValue": 3.14, # A double value. 1975 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 1976 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 1977 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 1978 }, 1979 "integerValue": "A String", # An integer value. 1980 "mapValue": { # A map value. # A map value. 1981 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 1982 "a_key": # Object with schema name: Value 1983 }, 1984 }, 1985 "nullValue": "A String", # A null value. 1986 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 1987 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 1988 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 1989 }, 1990 ], 1991 }, 1992 "setToServerValue": "A String", # Sets the field to the given server value. 1993 }, 1994 ], 1995 }, 1996 "update": { # A Firestore document. Must not exceed 1 MiB - 4 bytes. # A document to write. 1997 "createTime": "A String", # Output only. The time at which the document was created. This value increases monotonically when a document is deleted then recreated. It can also be compared to values from other documents and the `read_time` of a query. 1998 "fields": { # The document's fields. The map keys represent field names. A simple field name contains only characters `a` to `z`, `A` to `Z`, `0` to `9`, or `_`, and must not start with `0` to `9`. For example, `foo_bar_17`. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. Field paths may be used in other contexts to refer to structured fields defined here. For `map_value`, the field path is represented by the simple or quoted field names of the containing fields, delimited by `.`. For example, the structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be represented by the field path `foo.x&y`. Within a field path, a quoted field name starts and ends with `` ` `` and may contain any character. Some characters, including `` ` ``, must be escaped using a `\`. For example, `` `x&y` `` represents `x&y` and `` `bak\`tik` `` represents `` bak`tik ``. 1999 "a_key": { # A message that can hold any of the supported value types. 2000 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 2001 "booleanValue": True or False, # A boolean value. 2002 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 2003 "doubleValue": 3.14, # A double value. 2004 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 2005 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 2006 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 2007 }, 2008 "integerValue": "A String", # An integer value. 2009 "mapValue": { # A map value. # A map value. 2010 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 2011 "a_key": # Object with schema name: Value 2012 }, 2013 }, 2014 "nullValue": "A String", # A null value. 2015 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 2016 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 2017 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 2018 }, 2019 }, 2020 "name": "A String", # The resource name of the document, for example `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 2021 "updateTime": "A String", # Output only. The time at which the document was last changed. This value is initially set to the `create_time` then increases monotonically with each change to the document. It can also be compared to values from other documents and the `read_time` of a query. 2022 }, 2023 "updateMask": { # A set of field paths on a document. Used to restrict a get or update operation on a document to a subset of its fields. This is different from standard field masks, as this is always scoped to a Document, and takes in account the dynamic nature of Value. # The fields to update in this write. This field can be set only when the operation is `update`. If the mask is not set for an `update` and the document exists, any existing data will be overwritten. If the mask is set and the document on the server has fields not covered by the mask, they are left unchanged. Fields referenced in the mask, but not present in the input document, are deleted from the document on the server. The field paths in this mask must not contain a reserved field name. 2024 "fieldPaths": [ # The list of field paths in the mask. See Document.fields for a field path syntax reference. 2025 "A String", 2026 ], 2027 }, 2028 "updateTransforms": [ # The transforms to perform after update. This field can be set only when the operation is `update`. If present, this write is equivalent to performing `update` and `transform` to the same document atomically and in order. 2029 { # A transformation of a field of the document. 2030 "appendMissingElements": { # An array value. # Append the given elements in order if they are not already present in the current field value. If the field is not an array, or if the field does not yet exist, it is first set to the empty array. Equivalent numbers of different types (e.g. 3L and 3.0) are considered equal when checking if a value is missing. NaN is equal to NaN, and Null is equal to Null. If the input contains multiple equivalent values, only the first will be considered. The corresponding transform_result will be the null value. 2031 "values": [ # Values in the array. 2032 { # A message that can hold any of the supported value types. 2033 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 2034 "booleanValue": True or False, # A boolean value. 2035 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 2036 "doubleValue": 3.14, # A double value. 2037 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 2038 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 2039 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 2040 }, 2041 "integerValue": "A String", # An integer value. 2042 "mapValue": { # A map value. # A map value. 2043 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 2044 "a_key": # Object with schema name: Value 2045 }, 2046 }, 2047 "nullValue": "A String", # A null value. 2048 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 2049 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 2050 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 2051 }, 2052 ], 2053 }, 2054 "fieldPath": "A String", # The path of the field. See Document.fields for the field path syntax reference. 2055 "increment": { # A message that can hold any of the supported value types. # Adds the given value to the field's current value. This must be an integer or a double value. If the field is not an integer or double, or if the field does not yet exist, the transformation will set the field to the given value. If either of the given value or the current field value are doubles, both values will be interpreted as doubles. Double arithmetic and representation of double values follow IEEE 754 semantics. If there is positive/negative integer overflow, the field is resolved to the largest magnitude positive/negative integer. 2056 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 2057 "booleanValue": True or False, # A boolean value. 2058 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 2059 "doubleValue": 3.14, # A double value. 2060 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 2061 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 2062 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 2063 }, 2064 "integerValue": "A String", # An integer value. 2065 "mapValue": { # A map value. # A map value. 2066 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 2067 "a_key": # Object with schema name: Value 2068 }, 2069 }, 2070 "nullValue": "A String", # A null value. 2071 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 2072 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 2073 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 2074 }, 2075 "maximum": { # A message that can hold any of the supported value types. # Sets the field to the maximum of its current value and the given value. This must be an integer or a double value. If the field is not an integer or double, or if the field does not yet exist, the transformation will set the field to the given value. If a maximum operation is applied where the field and the input value are of mixed types (that is - one is an integer and one is a double) the field takes on the type of the larger operand. If the operands are equivalent (e.g. 3 and 3.0), the field does not change. 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and zero input value is always the stored value. The maximum of any numeric value x and NaN is NaN. 2076 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 2077 "booleanValue": True or False, # A boolean value. 2078 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 2079 "doubleValue": 3.14, # A double value. 2080 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 2081 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 2082 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 2083 }, 2084 "integerValue": "A String", # An integer value. 2085 "mapValue": { # A map value. # A map value. 2086 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 2087 "a_key": # Object with schema name: Value 2088 }, 2089 }, 2090 "nullValue": "A String", # A null value. 2091 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 2092 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 2093 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 2094 }, 2095 "minimum": { # A message that can hold any of the supported value types. # Sets the field to the minimum of its current value and the given value. This must be an integer or a double value. If the field is not an integer or double, or if the field does not yet exist, the transformation will set the field to the input value. If a minimum operation is applied where the field and the input value are of mixed types (that is - one is an integer and one is a double) the field takes on the type of the smaller operand. If the operands are equivalent (e.g. 3 and 3.0), the field does not change. 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and zero input value is always the stored value. The minimum of any numeric value x and NaN is NaN. 2096 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 2097 "booleanValue": True or False, # A boolean value. 2098 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 2099 "doubleValue": 3.14, # A double value. 2100 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 2101 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 2102 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 2103 }, 2104 "integerValue": "A String", # An integer value. 2105 "mapValue": { # A map value. # A map value. 2106 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 2107 "a_key": # Object with schema name: Value 2108 }, 2109 }, 2110 "nullValue": "A String", # A null value. 2111 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 2112 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 2113 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 2114 }, 2115 "removeAllFromArray": { # An array value. # Remove all of the given elements from the array in the field. If the field is not an array, or if the field does not yet exist, it is set to the empty array. Equivalent numbers of the different types (e.g. 3L and 3.0) are considered equal when deciding whether an element should be removed. NaN is equal to NaN, and Null is equal to Null. This will remove all equivalent values if there are duplicates. The corresponding transform_result will be the null value. 2116 "values": [ # Values in the array. 2117 { # A message that can hold any of the supported value types. 2118 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 2119 "booleanValue": True or False, # A boolean value. 2120 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 2121 "doubleValue": 3.14, # A double value. 2122 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 2123 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 2124 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 2125 }, 2126 "integerValue": "A String", # An integer value. 2127 "mapValue": { # A map value. # A map value. 2128 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 2129 "a_key": # Object with schema name: Value 2130 }, 2131 }, 2132 "nullValue": "A String", # A null value. 2133 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 2134 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 2135 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 2136 }, 2137 ], 2138 }, 2139 "setToServerValue": "A String", # Sets the field to the given server value. 2140 }, 2141 ], 2142 }, 2143 ], 2144} 2145 2146 x__xgafv: string, V1 error format. 2147 Allowed values 2148 1 - v1 error format 2149 2 - v2 error format 2150 2151Returns: 2152 An object of the form: 2153 2154 { # The response for Firestore.Write. 2155 "commitTime": "A String", # The time at which the commit occurred. Any read with an equal or greater `read_time` is guaranteed to see the effects of the write. 2156 "streamId": "A String", # The ID of the stream. Only set on the first message, when a new stream was created. 2157 "streamToken": "A String", # A token that represents the position of this response in the stream. This can be used by a client to resume the stream at this point. This field is always set. 2158 "writeResults": [ # The result of applying the writes. This i-th write result corresponds to the i-th write in the request. 2159 { # The result of applying a write. 2160 "transformResults": [ # The results of applying each DocumentTransform.FieldTransform, in the same order. 2161 { # A message that can hold any of the supported value types. 2162 "arrayValue": # Object with schema name: ArrayValue # An array value. Cannot directly contain another array value, though can contain an map which contains another array. 2163 "booleanValue": True or False, # A boolean value. 2164 "bytesValue": "A String", # A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. 2165 "doubleValue": 3.14, # A double value. 2166 "geoPointValue": { # An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. # A geo point value representing a point on the surface of Earth. 2167 "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0]. 2168 "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0]. 2169 }, 2170 "integerValue": "A String", # An integer value. 2171 "mapValue": { # A map value. # A map value. 2172 "fields": { # The map's fields. The map keys represent field names. Field names matching the regular expression `__.*__` are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty. 2173 "a_key": # Object with schema name: Value 2174 }, 2175 }, 2176 "nullValue": "A String", # A null value. 2177 "referenceValue": "A String", # A reference to a document. For example: `projects/{project_id}/databases/{database_id}/documents/{document_path}`. 2178 "stringValue": "A String", # A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. 2179 "timestampValue": "A String", # A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. 2180 }, 2181 ], 2182 "updateTime": "A String", # The last update time of the document after applying the write. Not set after a `delete`. If the write did not actually change the document, this will be the previous update_time. 2183 }, 2184 ], 2185}</pre> 2186</div> 2187 2188</body></html>