• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_v1beta1.html">Cloud Firestore API</a> . <a href="firestore_v1beta1.projects.html">projects</a> . <a href="firestore_v1beta1.projects.databases.html">databases</a> . <a href="firestore_v1beta1.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, x__xgafv=None)</a></code></p>
79<p class="firstline">Gets multiple documents.</p>
80<p class="toc_element">
81  <code><a href="#beginTransaction">beginTransaction(database, body, x__xgafv=None)</a></code></p>
82<p class="firstline">Starts a new transaction.</p>
83<p class="toc_element">
84  <code><a href="#commit">commit(database, body, x__xgafv=None)</a></code></p>
85<p class="firstline">Commits a transaction, while optionally updating documents.</p>
86<p class="toc_element">
87  <code><a href="#createDocument">createDocument(parent, collectionId, body, mask_fieldPaths=None, x__xgafv=None, documentId=None)</a></code></p>
88<p class="firstline">Creates a new document.</p>
89<p class="toc_element">
90  <code><a href="#delete">delete(name, currentDocument_updateTime=None, x__xgafv=None, currentDocument_exists=None)</a></code></p>
91<p class="firstline">Deletes a document.</p>
92<p class="toc_element">
93  <code><a href="#get">get(name, transaction=None, mask_fieldPaths=None, x__xgafv=None, readTime=None)</a></code></p>
94<p class="firstline">Gets a single document.</p>
95<p class="toc_element">
96  <code><a href="#list">list(parent, collectionId, orderBy=None, showMissing=None, pageSize=None, mask_fieldPaths=None, x__xgafv=None, pageToken=None, readTime=None, transaction=None)</a></code></p>
97<p class="firstline">Lists documents.</p>
98<p class="toc_element">
99  <code><a href="#listCollectionIds">listCollectionIds(parent, body, x__xgafv=None)</a></code></p>
100<p class="firstline">Lists all the collection IDs underneath a document.</p>
101<p class="toc_element">
102  <code><a href="#listCollectionIds_next">listCollectionIds_next(previous_request, previous_response)</a></code></p>
103<p class="firstline">Retrieves the next page of results.</p>
104<p class="toc_element">
105  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
106<p class="firstline">Retrieves the next page of results.</p>
107<p class="toc_element">
108  <code><a href="#listen">listen(database, body, x__xgafv=None)</a></code></p>
109<p class="firstline">Listens to changes.</p>
110<p class="toc_element">
111  <code><a href="#patch">patch(name, body, updateMask_fieldPaths=None, mask_fieldPaths=None, x__xgafv=None, currentDocument_updateTime=None, currentDocument_exists=None)</a></code></p>
112<p class="firstline">Updates or inserts a document.</p>
113<p class="toc_element">
114  <code><a href="#rollback">rollback(database, body, x__xgafv=None)</a></code></p>
115<p class="firstline">Rolls back a transaction.</p>
116<p class="toc_element">
117  <code><a href="#runQuery">runQuery(parent, body, x__xgafv=None)</a></code></p>
118<p class="firstline">Runs a query.</p>
119<p class="toc_element">
120  <code><a href="#write">write(database, body, x__xgafv=None)</a></code></p>
121<p class="firstline">Streams batches of document updates and deletes, in order.</p>
122<h3>Method Details</h3>
123<div class="method">
124    <code class="details" id="batchGet">batchGet(database, body, x__xgafv=None)</code>
125  <pre>Gets multiple documents.
126
127Documents returned by this method are not guaranteed to be returned in the
128same order that they were requested.
129
130Args:
131  database: string, The database name. In the format:
132`projects/{project_id}/databases/{database_id}`. (required)
133  body: object, The request body. (required)
134    The object takes the form of:
135
136{ # The request for Firestore.BatchGetDocuments.
137    "newTransaction": { # Options for creating a new transaction. # Starts a new transaction and reads the documents.
138        # Defaults to a read-only transaction.
139        # The new transaction ID will be returned as the first response in the
140        # stream.
141      "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.
142        "retryTransaction": "A String", # An optional transaction to retry.
143      },
144      "readOnly": { # Options for a transaction that can only be used to read documents. # The transaction can only be used for read operations.
145        "readTime": "A String", # Reads documents at the given time.
146            # This may not be older than 60 seconds.
147      },
148    },
149    "transaction": "A String", # Reads documents in a transaction.
150    "documents": [ # The names of the documents to retrieve. In the format:
151        # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
152        # The request will fail if any of the document is not a child resource of the
153        # given `database`. Duplicate names will be elided.
154      "A String",
155    ],
156    "mask": { # A set of field paths on a document. # The fields to return. If not set, returns all fields.
157        #
158        # If a document has a field that is not present in this mask, that field will
159        # not be returned in the response.
160        # Used to restrict a get or update operation on a document to a subset of its
161        # fields.
162        # This is different from standard field masks, as this is always scoped to a
163        # Document, and takes in account the dynamic nature of Value.
164      "fieldPaths": [ # The list of field paths in the mask. See Document.fields for a field
165          # path syntax reference.
166        "A String",
167      ],
168    },
169    "readTime": "A String", # Reads documents as they were at the given time.
170        # This may not be older than 60 seconds.
171  }
172
173  x__xgafv: string, V1 error format.
174    Allowed values
175      1 - v1 error format
176      2 - v2 error format
177
178Returns:
179  An object of the form:
180
181    { # The streamed response for Firestore.BatchGetDocuments.
182    "found": { # A Firestore document. # A document that was requested.
183        #
184        # Must not exceed 1 MiB - 4 bytes.
185      "fields": { # The document's fields.
186          #
187          # The map keys represent field names.
188          #
189          # A simple field name contains only characters `a` to `z`, `A` to `Z`,
190          # `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
191          # `foo_bar_17`.
192          #
193          # Field names matching the regular expression `__.*__` are reserved. Reserved
194          # field names are forbidden except in certain documented contexts. The map
195          # keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
196          # empty.
197          #
198          # Field paths may be used in other contexts to refer to structured fields
199          # defined here. For `map_value`, the field path is represented by the simple
200          # or quoted field names of the containing fields, delimited by `.`. For
201          # example, the structured field
202          # `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
203          # represented by the field path `foo.x&y`.
204          #
205          # Within a field path, a quoted field name starts and ends with `` ` `` and
206          # may contain any character. Some characters, including `` ` ``, must be
207          # escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
208          # `` `bak\`tik` `` represents `` bak`tik ``.
209        "a_key": { # A message that can hold any of the supported value types.
210          "bytesValue": "A String", # A bytes value.
211              #
212              # Must not exceed 1 MiB - 89 bytes.
213              # Only the first 1,500 bytes are considered by queries.
214          "timestampValue": "A String", # A timestamp value.
215              #
216              # Precise only to microseconds. When stored, any additional precision is
217              # rounded down.
218          "nullValue": "A String", # A null value.
219          "referenceValue": "A String", # A reference to a document. For example:
220              # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
221          "doubleValue": 3.14, # A double value.
222          "mapValue": { # A map value. # A map value.
223            "fields": { # The map's fields.
224                #
225                # The map keys represent field names. Field names matching the regular
226                # expression `__.*__` are reserved. Reserved field names are forbidden except
227                # in certain documented contexts. The map keys, represented as UTF-8, must
228                # not exceed 1,500 bytes and cannot be empty.
229              "a_key": # Object with schema name: Value
230            },
231          },
232          "stringValue": "A String", # A string value.
233              #
234              # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
235              # Only the first 1,500 bytes of the UTF-8 representation are considered by
236              # queries.
237          "booleanValue": True or False, # A boolean value.
238          "arrayValue": { # An array value. # An array value.
239              #
240              # Cannot directly contain another array value, though can contain an
241              # map which contains another array.
242            "values": [ # Values in the array.
243              # Object with schema name: Value
244            ],
245          },
246          "integerValue": "A String", # An integer value.
247          "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
248              # of doubles representing degrees latitude and degrees longitude. Unless
249              # specified otherwise, this must conform to the
250              # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
251              # standard</a>. Values must be within normalized ranges.
252            "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
253            "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
254          },
255        },
256      },
257      "updateTime": "A String", # Output only. The time at which the document was last changed.
258          #
259          # This value is initially set to the `create_time` then increases
260          # monotonically with each change to the document. It can also be
261          # compared to values from other documents and the `read_time` of a query.
262      "createTime": "A String", # Output only. The time at which the document was created.
263          #
264          # This value increases monotonically when a document is deleted then
265          # recreated. It can also be compared to values from other documents and
266          # the `read_time` of a query.
267      "name": "A String", # The resource name of the document, for example
268          # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
269    },
270    "missing": "A String", # A document name that was requested but does not exist. In the format:
271        # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
272    "transaction": "A String", # The transaction that was started as part of this request.
273        # Will only be set in the first response, and only if
274        # BatchGetDocumentsRequest.new_transaction was set in the request.
275    "readTime": "A String", # The time at which the document was read.
276        # This may be monotically increasing, in this case the previous documents in
277        # the result stream are guaranteed not to have changed between their
278        # read_time and this one.
279  }</pre>
280</div>
281
282<div class="method">
283    <code class="details" id="beginTransaction">beginTransaction(database, body, x__xgafv=None)</code>
284  <pre>Starts a new transaction.
285
286Args:
287  database: string, The database name. In the format:
288`projects/{project_id}/databases/{database_id}`. (required)
289  body: object, The request body. (required)
290    The object takes the form of:
291
292{ # The request for Firestore.BeginTransaction.
293    "options": { # Options for creating a new transaction. # The options for the transaction.
294        # Defaults to a read-write transaction.
295      "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.
296        "retryTransaction": "A String", # An optional transaction to retry.
297      },
298      "readOnly": { # Options for a transaction that can only be used to read documents. # The transaction can only be used for read operations.
299        "readTime": "A String", # Reads documents at the given time.
300            # This may not be older than 60 seconds.
301      },
302    },
303  }
304
305  x__xgafv: string, V1 error format.
306    Allowed values
307      1 - v1 error format
308      2 - v2 error format
309
310Returns:
311  An object of the form:
312
313    { # The response for Firestore.BeginTransaction.
314    "transaction": "A String", # The transaction that was started.
315  }</pre>
316</div>
317
318<div class="method">
319    <code class="details" id="commit">commit(database, body, x__xgafv=None)</code>
320  <pre>Commits a transaction, while optionally updating documents.
321
322Args:
323  database: string, The database name. In the format:
324`projects/{project_id}/databases/{database_id}`. (required)
325  body: object, The request body. (required)
326    The object takes the form of:
327
328{ # The request for Firestore.Commit.
329    "writes": [ # The writes to apply.
330        #
331        # Always executed atomically and in order.
332      { # A write on a document.
333        "delete": "A String", # A document name to delete. In the format:
334            # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
335        "updateMask": { # A set of field paths on a document. # The fields to update in this write.
336            #
337            # This field can be set only when the operation is `update`.
338            # If the mask is not set for an `update` and the document exists, any
339            # existing data will be overwritten.
340            # If the mask is set and the document on the server has fields not covered by
341            # the mask, they are left unchanged.
342            # Fields referenced in the mask, but not present in the input document, are
343            # deleted from the document on the server.
344            # The field paths in this mask must not contain a reserved field name.
345            # Used to restrict a get or update operation on a document to a subset of its
346            # fields.
347            # This is different from standard field masks, as this is always scoped to a
348            # Document, and takes in account the dynamic nature of Value.
349          "fieldPaths": [ # The list of field paths in the mask. See Document.fields for a field
350              # path syntax reference.
351            "A String",
352          ],
353        },
354        "update": { # A Firestore document. # A document to write.
355            #
356            # Must not exceed 1 MiB - 4 bytes.
357          "fields": { # The document's fields.
358              #
359              # The map keys represent field names.
360              #
361              # A simple field name contains only characters `a` to `z`, `A` to `Z`,
362              # `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
363              # `foo_bar_17`.
364              #
365              # Field names matching the regular expression `__.*__` are reserved. Reserved
366              # field names are forbidden except in certain documented contexts. The map
367              # keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
368              # empty.
369              #
370              # Field paths may be used in other contexts to refer to structured fields
371              # defined here. For `map_value`, the field path is represented by the simple
372              # or quoted field names of the containing fields, delimited by `.`. For
373              # example, the structured field
374              # `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
375              # represented by the field path `foo.x&y`.
376              #
377              # Within a field path, a quoted field name starts and ends with `` ` `` and
378              # may contain any character. Some characters, including `` ` ``, must be
379              # escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
380              # `` `bak\`tik` `` represents `` bak`tik ``.
381            "a_key": { # A message that can hold any of the supported value types.
382              "bytesValue": "A String", # A bytes value.
383                  #
384                  # Must not exceed 1 MiB - 89 bytes.
385                  # Only the first 1,500 bytes are considered by queries.
386              "timestampValue": "A String", # A timestamp value.
387                  #
388                  # Precise only to microseconds. When stored, any additional precision is
389                  # rounded down.
390              "nullValue": "A String", # A null value.
391              "referenceValue": "A String", # A reference to a document. For example:
392                  # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
393              "doubleValue": 3.14, # A double value.
394              "mapValue": { # A map value. # A map value.
395                "fields": { # The map's fields.
396                    #
397                    # The map keys represent field names. Field names matching the regular
398                    # expression `__.*__` are reserved. Reserved field names are forbidden except
399                    # in certain documented contexts. The map keys, represented as UTF-8, must
400                    # not exceed 1,500 bytes and cannot be empty.
401                  "a_key": # Object with schema name: Value
402                },
403              },
404              "stringValue": "A String", # A string value.
405                  #
406                  # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
407                  # Only the first 1,500 bytes of the UTF-8 representation are considered by
408                  # queries.
409              "booleanValue": True or False, # A boolean value.
410              "arrayValue": { # An array value. # An array value.
411                  #
412                  # Cannot directly contain another array value, though can contain an
413                  # map which contains another array.
414                "values": [ # Values in the array.
415                  # Object with schema name: Value
416                ],
417              },
418              "integerValue": "A String", # An integer value.
419              "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
420                  # of doubles representing degrees latitude and degrees longitude. Unless
421                  # specified otherwise, this must conform to the
422                  # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
423                  # standard</a>. Values must be within normalized ranges.
424                "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
425                "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
426              },
427            },
428          },
429          "updateTime": "A String", # Output only. The time at which the document was last changed.
430              #
431              # This value is initially set to the `create_time` then increases
432              # monotonically with each change to the document. It can also be
433              # compared to values from other documents and the `read_time` of a query.
434          "createTime": "A String", # Output only. The time at which the document was created.
435              #
436              # This value increases monotonically when a document is deleted then
437              # recreated. It can also be compared to values from other documents and
438              # the `read_time` of a query.
439          "name": "A String", # The resource name of the document, for example
440              # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
441        },
442        "currentDocument": { # A precondition on a document, used for conditional operations. # An optional precondition on the document.
443            #
444            # The write will fail if this is set and not met by the target document.
445          "updateTime": "A String", # When set, the target document must exist and have been last updated at
446              # that time.
447          "exists": True or False, # When set to `true`, the target document must exist.
448              # When set to `false`, the target document must not exist.
449        },
450        "transform": { # A transformation of a document. # Applies a transformation to a document.
451            # At most one `transform` per document is allowed in a given request.
452            # An `update` cannot follow a `transform` on the same document in a given
453            # request.
454          "document": "A String", # The name of the document to transform.
455          "fieldTransforms": [ # The list of transformations to apply to the fields of the document, in
456              # order.
457              # This must not be empty.
458            { # A transformation of a field of the document.
459              "setToServerValue": "A String", # Sets the field to the given server value.
460              "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.
461                  #
462                  # This must be an integer or a double value.
463                  # If the field is not an integer or double, or if the field does not yet
464                  # exist, the transformation will set the field to the given value.
465                  # If a maximum operation is applied where the field and the input value
466                  # are of mixed types (that is - one is an integer and one is a double)
467                  # the field takes on the type of the larger operand. If the operands are
468                  # equivalent (e.g. 3 and 3.0), the field does not change.
469                  # 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and
470                  # zero input value is always the stored value.
471                  # The maximum of any numeric value x and NaN is NaN.
472                "bytesValue": "A String", # A bytes value.
473                    #
474                    # Must not exceed 1 MiB - 89 bytes.
475                    # Only the first 1,500 bytes are considered by queries.
476                "timestampValue": "A String", # A timestamp value.
477                    #
478                    # Precise only to microseconds. When stored, any additional precision is
479                    # rounded down.
480                "nullValue": "A String", # A null value.
481                "referenceValue": "A String", # A reference to a document. For example:
482                    # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
483                "doubleValue": 3.14, # A double value.
484                "mapValue": { # A map value. # A map value.
485                  "fields": { # The map's fields.
486                      #
487                      # The map keys represent field names. Field names matching the regular
488                      # expression `__.*__` are reserved. Reserved field names are forbidden except
489                      # in certain documented contexts. The map keys, represented as UTF-8, must
490                      # not exceed 1,500 bytes and cannot be empty.
491                    "a_key": # Object with schema name: Value
492                  },
493                },
494                "stringValue": "A String", # A string value.
495                    #
496                    # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
497                    # Only the first 1,500 bytes of the UTF-8 representation are considered by
498                    # queries.
499                "booleanValue": True or False, # A boolean value.
500                "arrayValue": { # An array value. # An array value.
501                    #
502                    # Cannot directly contain another array value, though can contain an
503                    # map which contains another array.
504                  "values": [ # Values in the array.
505                    # Object with schema name: Value
506                  ],
507                },
508                "integerValue": "A String", # An integer value.
509                "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
510                    # of doubles representing degrees latitude and degrees longitude. Unless
511                    # specified otherwise, this must conform to the
512                    # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
513                    # standard</a>. Values must be within normalized ranges.
514                  "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
515                  "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
516                },
517              },
518              "increment": { # A message that can hold any of the supported value types. # Adds the given value to the field's current value.
519                  #
520                  # This must be an integer or a double value.
521                  # If the field is not an integer or double, or if the field does not yet
522                  # exist, the transformation will set the field to the given value.
523                  # If either of the given value or the current field value are doubles,
524                  # both values will be interpreted as doubles. Double arithmetic and
525                  # representation of double values follow IEEE 754 semantics.
526                  # If there is positive/negative integer overflow, the field is resolved
527                  # to the largest magnitude positive/negative integer.
528                "bytesValue": "A String", # A bytes value.
529                    #
530                    # Must not exceed 1 MiB - 89 bytes.
531                    # Only the first 1,500 bytes are considered by queries.
532                "timestampValue": "A String", # A timestamp value.
533                    #
534                    # Precise only to microseconds. When stored, any additional precision is
535                    # rounded down.
536                "nullValue": "A String", # A null value.
537                "referenceValue": "A String", # A reference to a document. For example:
538                    # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
539                "doubleValue": 3.14, # A double value.
540                "mapValue": { # A map value. # A map value.
541                  "fields": { # The map's fields.
542                      #
543                      # The map keys represent field names. Field names matching the regular
544                      # expression `__.*__` are reserved. Reserved field names are forbidden except
545                      # in certain documented contexts. The map keys, represented as UTF-8, must
546                      # not exceed 1,500 bytes and cannot be empty.
547                    "a_key": # Object with schema name: Value
548                  },
549                },
550                "stringValue": "A String", # A string value.
551                    #
552                    # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
553                    # Only the first 1,500 bytes of the UTF-8 representation are considered by
554                    # queries.
555                "booleanValue": True or False, # A boolean value.
556                "arrayValue": { # An array value. # An array value.
557                    #
558                    # Cannot directly contain another array value, though can contain an
559                    # map which contains another array.
560                  "values": [ # Values in the array.
561                    # Object with schema name: Value
562                  ],
563                },
564                "integerValue": "A String", # An integer value.
565                "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
566                    # of doubles representing degrees latitude and degrees longitude. Unless
567                    # specified otherwise, this must conform to the
568                    # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
569                    # standard</a>. Values must be within normalized ranges.
570                  "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
571                  "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
572                },
573              },
574              "fieldPath": "A String", # The path of the field. See Document.fields for the field path syntax
575                  # reference.
576              "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.
577                  #
578                  # This must be an integer or a double value.
579                  # If the field is not an integer or double, or if the field does not yet
580                  # exist, the transformation will set the field to the input value.
581                  # If a minimum operation is applied where the field and the input value
582                  # are of mixed types (that is - one is an integer and one is a double)
583                  # the field takes on the type of the smaller operand. If the operands are
584                  # equivalent (e.g. 3 and 3.0), the field does not change.
585                  # 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and
586                  # zero input value is always the stored value.
587                  # The minimum of any numeric value x and NaN is NaN.
588                "bytesValue": "A String", # A bytes value.
589                    #
590                    # Must not exceed 1 MiB - 89 bytes.
591                    # Only the first 1,500 bytes are considered by queries.
592                "timestampValue": "A String", # A timestamp value.
593                    #
594                    # Precise only to microseconds. When stored, any additional precision is
595                    # rounded down.
596                "nullValue": "A String", # A null value.
597                "referenceValue": "A String", # A reference to a document. For example:
598                    # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
599                "doubleValue": 3.14, # A double value.
600                "mapValue": { # A map value. # A map value.
601                  "fields": { # The map's fields.
602                      #
603                      # The map keys represent field names. Field names matching the regular
604                      # expression `__.*__` are reserved. Reserved field names are forbidden except
605                      # in certain documented contexts. The map keys, represented as UTF-8, must
606                      # not exceed 1,500 bytes and cannot be empty.
607                    "a_key": # Object with schema name: Value
608                  },
609                },
610                "stringValue": "A String", # A string value.
611                    #
612                    # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
613                    # Only the first 1,500 bytes of the UTF-8 representation are considered by
614                    # queries.
615                "booleanValue": True or False, # A boolean value.
616                "arrayValue": { # An array value. # An array value.
617                    #
618                    # Cannot directly contain another array value, though can contain an
619                    # map which contains another array.
620                  "values": [ # Values in the array.
621                    # Object with schema name: Value
622                  ],
623                },
624                "integerValue": "A String", # An integer value.
625                "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
626                    # of doubles representing degrees latitude and degrees longitude. Unless
627                    # specified otherwise, this must conform to the
628                    # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
629                    # standard</a>. Values must be within normalized ranges.
630                  "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
631                  "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
632                },
633              },
634              "appendMissingElements": { # An array value. # Append the given elements in order if they are not already present in
635                  # the current field value.
636                  # If the field is not an array, or if the field does not yet exist, it is
637                  # first set to the empty array.
638                  #
639                  # Equivalent numbers of different types (e.g. 3L and 3.0) are
640                  # considered equal when checking if a value is missing.
641                  # NaN is equal to NaN, and Null is equal to Null.
642                  # If the input contains multiple equivalent values, only the first will
643                  # be considered.
644                  #
645                  # The corresponding transform_result will be the null value.
646                "values": [ # Values in the array.
647                  # Object with schema name: Value
648                ],
649              },
650              "removeAllFromArray": { # An array value. # Remove all of the given elements from the array in the field.
651                  # If the field is not an array, or if the field does not yet exist, it is
652                  # set to the empty array.
653                  #
654                  # Equivalent numbers of the different types (e.g. 3L and 3.0) are
655                  # considered equal when deciding whether an element should be removed.
656                  # NaN is equal to NaN, and Null is equal to Null.
657                  # This will remove all equivalent values if there are duplicates.
658                  #
659                  # The corresponding transform_result will be the null value.
660                "values": [ # Values in the array.
661                  # Object with schema name: Value
662                ],
663              },
664            },
665          ],
666        },
667      },
668    ],
669    "transaction": "A String", # If set, applies all writes in this transaction, and commits it.
670  }
671
672  x__xgafv: string, V1 error format.
673    Allowed values
674      1 - v1 error format
675      2 - v2 error format
676
677Returns:
678  An object of the form:
679
680    { # The response for Firestore.Commit.
681    "writeResults": [ # The result of applying the writes.
682        #
683        # This i-th write result corresponds to the i-th write in the
684        # request.
685      { # The result of applying a write.
686        "updateTime": "A String", # The last update time of the document after applying the write. Not set
687            # after a `delete`.
688            #
689            # If the write did not actually change the document, this will be the
690            # previous update_time.
691        "transformResults": [ # The results of applying each DocumentTransform.FieldTransform, in the
692            # same order.
693          { # A message that can hold any of the supported value types.
694            "bytesValue": "A String", # A bytes value.
695                #
696                # Must not exceed 1 MiB - 89 bytes.
697                # Only the first 1,500 bytes are considered by queries.
698            "timestampValue": "A String", # A timestamp value.
699                #
700                # Precise only to microseconds. When stored, any additional precision is
701                # rounded down.
702            "nullValue": "A String", # A null value.
703            "referenceValue": "A String", # A reference to a document. For example:
704                # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
705            "doubleValue": 3.14, # A double value.
706            "mapValue": { # A map value. # A map value.
707              "fields": { # The map's fields.
708                  #
709                  # The map keys represent field names. Field names matching the regular
710                  # expression `__.*__` are reserved. Reserved field names are forbidden except
711                  # in certain documented contexts. The map keys, represented as UTF-8, must
712                  # not exceed 1,500 bytes and cannot be empty.
713                "a_key": # Object with schema name: Value
714              },
715            },
716            "stringValue": "A String", # A string value.
717                #
718                # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
719                # Only the first 1,500 bytes of the UTF-8 representation are considered by
720                # queries.
721            "booleanValue": True or False, # A boolean value.
722            "arrayValue": { # An array value. # An array value.
723                #
724                # Cannot directly contain another array value, though can contain an
725                # map which contains another array.
726              "values": [ # Values in the array.
727                # Object with schema name: Value
728              ],
729            },
730            "integerValue": "A String", # An integer value.
731            "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
732                # of doubles representing degrees latitude and degrees longitude. Unless
733                # specified otherwise, this must conform to the
734                # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
735                # standard</a>. Values must be within normalized ranges.
736              "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
737              "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
738            },
739          },
740        ],
741      },
742    ],
743    "commitTime": "A String", # The time at which the commit occurred.
744  }</pre>
745</div>
746
747<div class="method">
748    <code class="details" id="createDocument">createDocument(parent, collectionId, body, mask_fieldPaths=None, x__xgafv=None, documentId=None)</code>
749  <pre>Creates a new document.
750
751Args:
752  parent: string, The parent resource. For example:
753`projects/{project_id}/databases/{database_id}/documents` or
754`projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` (required)
755  collectionId: string, The collection ID, relative to `parent`, to list. For example: `chatrooms`. (required)
756  body: object, The request body. (required)
757    The object takes the form of:
758
759{ # A Firestore document.
760    #
761    # Must not exceed 1 MiB - 4 bytes.
762  "fields": { # The document's fields.
763      #
764      # The map keys represent field names.
765      #
766      # A simple field name contains only characters `a` to `z`, `A` to `Z`,
767      # `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
768      # `foo_bar_17`.
769      #
770      # Field names matching the regular expression `__.*__` are reserved. Reserved
771      # field names are forbidden except in certain documented contexts. The map
772      # keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
773      # empty.
774      #
775      # Field paths may be used in other contexts to refer to structured fields
776      # defined here. For `map_value`, the field path is represented by the simple
777      # or quoted field names of the containing fields, delimited by `.`. For
778      # example, the structured field
779      # `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
780      # represented by the field path `foo.x&y`.
781      #
782      # Within a field path, a quoted field name starts and ends with `` ` `` and
783      # may contain any character. Some characters, including `` ` ``, must be
784      # escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
785      # `` `bak\`tik` `` represents `` bak`tik ``.
786    "a_key": { # A message that can hold any of the supported value types.
787      "bytesValue": "A String", # A bytes value.
788          #
789          # Must not exceed 1 MiB - 89 bytes.
790          # Only the first 1,500 bytes are considered by queries.
791      "timestampValue": "A String", # A timestamp value.
792          #
793          # Precise only to microseconds. When stored, any additional precision is
794          # rounded down.
795      "nullValue": "A String", # A null value.
796      "referenceValue": "A String", # A reference to a document. For example:
797          # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
798      "doubleValue": 3.14, # A double value.
799      "mapValue": { # A map value. # A map value.
800        "fields": { # The map's fields.
801            #
802            # The map keys represent field names. Field names matching the regular
803            # expression `__.*__` are reserved. Reserved field names are forbidden except
804            # in certain documented contexts. The map keys, represented as UTF-8, must
805            # not exceed 1,500 bytes and cannot be empty.
806          "a_key": # Object with schema name: Value
807        },
808      },
809      "stringValue": "A String", # A string value.
810          #
811          # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
812          # Only the first 1,500 bytes of the UTF-8 representation are considered by
813          # queries.
814      "booleanValue": True or False, # A boolean value.
815      "arrayValue": { # An array value. # An array value.
816          #
817          # Cannot directly contain another array value, though can contain an
818          # map which contains another array.
819        "values": [ # Values in the array.
820          # Object with schema name: Value
821        ],
822      },
823      "integerValue": "A String", # An integer value.
824      "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
825          # of doubles representing degrees latitude and degrees longitude. Unless
826          # specified otherwise, this must conform to the
827          # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
828          # standard</a>. Values must be within normalized ranges.
829        "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
830        "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
831      },
832    },
833  },
834  "updateTime": "A String", # Output only. The time at which the document was last changed.
835      #
836      # This value is initially set to the `create_time` then increases
837      # monotonically with each change to the document. It can also be
838      # compared to values from other documents and the `read_time` of a query.
839  "createTime": "A String", # Output only. The time at which the document was created.
840      #
841      # This value increases monotonically when a document is deleted then
842      # recreated. It can also be compared to values from other documents and
843      # the `read_time` of a query.
844  "name": "A String", # The resource name of the document, for example
845      # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
846}
847
848  mask_fieldPaths: string, The list of field paths in the mask. See Document.fields for a field
849path syntax reference. (repeated)
850  x__xgafv: string, V1 error format.
851    Allowed values
852      1 - v1 error format
853      2 - v2 error format
854  documentId: string, The client-assigned document ID to use for this document.
855
856Optional. If not specified, an ID will be assigned by the service.
857
858Returns:
859  An object of the form:
860
861    { # A Firestore document.
862      #
863      # Must not exceed 1 MiB - 4 bytes.
864    "fields": { # The document's fields.
865        #
866        # The map keys represent field names.
867        #
868        # A simple field name contains only characters `a` to `z`, `A` to `Z`,
869        # `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
870        # `foo_bar_17`.
871        #
872        # Field names matching the regular expression `__.*__` are reserved. Reserved
873        # field names are forbidden except in certain documented contexts. The map
874        # keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
875        # empty.
876        #
877        # Field paths may be used in other contexts to refer to structured fields
878        # defined here. For `map_value`, the field path is represented by the simple
879        # or quoted field names of the containing fields, delimited by `.`. For
880        # example, the structured field
881        # `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
882        # represented by the field path `foo.x&y`.
883        #
884        # Within a field path, a quoted field name starts and ends with `` ` `` and
885        # may contain any character. Some characters, including `` ` ``, must be
886        # escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
887        # `` `bak\`tik` `` represents `` bak`tik ``.
888      "a_key": { # A message that can hold any of the supported value types.
889        "bytesValue": "A String", # A bytes value.
890            #
891            # Must not exceed 1 MiB - 89 bytes.
892            # Only the first 1,500 bytes are considered by queries.
893        "timestampValue": "A String", # A timestamp value.
894            #
895            # Precise only to microseconds. When stored, any additional precision is
896            # rounded down.
897        "nullValue": "A String", # A null value.
898        "referenceValue": "A String", # A reference to a document. For example:
899            # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
900        "doubleValue": 3.14, # A double value.
901        "mapValue": { # A map value. # A map value.
902          "fields": { # The map's fields.
903              #
904              # The map keys represent field names. Field names matching the regular
905              # expression `__.*__` are reserved. Reserved field names are forbidden except
906              # in certain documented contexts. The map keys, represented as UTF-8, must
907              # not exceed 1,500 bytes and cannot be empty.
908            "a_key": # Object with schema name: Value
909          },
910        },
911        "stringValue": "A String", # A string value.
912            #
913            # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
914            # Only the first 1,500 bytes of the UTF-8 representation are considered by
915            # queries.
916        "booleanValue": True or False, # A boolean value.
917        "arrayValue": { # An array value. # An array value.
918            #
919            # Cannot directly contain another array value, though can contain an
920            # map which contains another array.
921          "values": [ # Values in the array.
922            # Object with schema name: Value
923          ],
924        },
925        "integerValue": "A String", # An integer value.
926        "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
927            # of doubles representing degrees latitude and degrees longitude. Unless
928            # specified otherwise, this must conform to the
929            # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
930            # standard</a>. Values must be within normalized ranges.
931          "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
932          "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
933        },
934      },
935    },
936    "updateTime": "A String", # Output only. The time at which the document was last changed.
937        #
938        # This value is initially set to the `create_time` then increases
939        # monotonically with each change to the document. It can also be
940        # compared to values from other documents and the `read_time` of a query.
941    "createTime": "A String", # Output only. The time at which the document was created.
942        #
943        # This value increases monotonically when a document is deleted then
944        # recreated. It can also be compared to values from other documents and
945        # the `read_time` of a query.
946    "name": "A String", # The resource name of the document, for example
947        # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
948  }</pre>
949</div>
950
951<div class="method">
952    <code class="details" id="delete">delete(name, currentDocument_updateTime=None, x__xgafv=None, currentDocument_exists=None)</code>
953  <pre>Deletes a document.
954
955Args:
956  name: string, The resource name of the Document to delete. In the format:
957`projects/{project_id}/databases/{database_id}/documents/{document_path}`. (required)
958  currentDocument_updateTime: string, When set, the target document must exist and have been last updated at
959that time.
960  x__xgafv: string, V1 error format.
961    Allowed values
962      1 - v1 error format
963      2 - v2 error format
964  currentDocument_exists: boolean, When set to `true`, the target document must exist.
965When set to `false`, the target document must not exist.
966
967Returns:
968  An object of the form:
969
970    { # A generic empty message that you can re-use to avoid defining duplicated
971      # empty messages in your APIs. A typical example is to use it as the request
972      # or the response type of an API method. For instance:
973      #
974      #     service Foo {
975      #       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
976      #     }
977      #
978      # The JSON representation for `Empty` is empty JSON object `{}`.
979  }</pre>
980</div>
981
982<div class="method">
983    <code class="details" id="get">get(name, transaction=None, mask_fieldPaths=None, x__xgafv=None, readTime=None)</code>
984  <pre>Gets a single document.
985
986Args:
987  name: string, The resource name of the Document to get. In the format:
988`projects/{project_id}/databases/{database_id}/documents/{document_path}`. (required)
989  transaction: string, Reads the document in a transaction.
990  mask_fieldPaths: string, The list of field paths in the mask. See Document.fields for a field
991path syntax reference. (repeated)
992  x__xgafv: string, V1 error format.
993    Allowed values
994      1 - v1 error format
995      2 - v2 error format
996  readTime: string, Reads the version of the document at the given time.
997This may not be older than 60 seconds.
998
999Returns:
1000  An object of the form:
1001
1002    { # A Firestore document.
1003      #
1004      # Must not exceed 1 MiB - 4 bytes.
1005    "fields": { # The document's fields.
1006        #
1007        # The map keys represent field names.
1008        #
1009        # A simple field name contains only characters `a` to `z`, `A` to `Z`,
1010        # `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
1011        # `foo_bar_17`.
1012        #
1013        # Field names matching the regular expression `__.*__` are reserved. Reserved
1014        # field names are forbidden except in certain documented contexts. The map
1015        # keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
1016        # empty.
1017        #
1018        # Field paths may be used in other contexts to refer to structured fields
1019        # defined here. For `map_value`, the field path is represented by the simple
1020        # or quoted field names of the containing fields, delimited by `.`. For
1021        # example, the structured field
1022        # `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
1023        # represented by the field path `foo.x&y`.
1024        #
1025        # Within a field path, a quoted field name starts and ends with `` ` `` and
1026        # may contain any character. Some characters, including `` ` ``, must be
1027        # escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
1028        # `` `bak\`tik` `` represents `` bak`tik ``.
1029      "a_key": { # A message that can hold any of the supported value types.
1030        "bytesValue": "A String", # A bytes value.
1031            #
1032            # Must not exceed 1 MiB - 89 bytes.
1033            # Only the first 1,500 bytes are considered by queries.
1034        "timestampValue": "A String", # A timestamp value.
1035            #
1036            # Precise only to microseconds. When stored, any additional precision is
1037            # rounded down.
1038        "nullValue": "A String", # A null value.
1039        "referenceValue": "A String", # A reference to a document. For example:
1040            # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
1041        "doubleValue": 3.14, # A double value.
1042        "mapValue": { # A map value. # A map value.
1043          "fields": { # The map's fields.
1044              #
1045              # The map keys represent field names. Field names matching the regular
1046              # expression `__.*__` are reserved. Reserved field names are forbidden except
1047              # in certain documented contexts. The map keys, represented as UTF-8, must
1048              # not exceed 1,500 bytes and cannot be empty.
1049            "a_key": # Object with schema name: Value
1050          },
1051        },
1052        "stringValue": "A String", # A string value.
1053            #
1054            # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
1055            # Only the first 1,500 bytes of the UTF-8 representation are considered by
1056            # queries.
1057        "booleanValue": True or False, # A boolean value.
1058        "arrayValue": { # An array value. # An array value.
1059            #
1060            # Cannot directly contain another array value, though can contain an
1061            # map which contains another array.
1062          "values": [ # Values in the array.
1063            # Object with schema name: Value
1064          ],
1065        },
1066        "integerValue": "A String", # An integer value.
1067        "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
1068            # of doubles representing degrees latitude and degrees longitude. Unless
1069            # specified otherwise, this must conform to the
1070            # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1071            # standard</a>. Values must be within normalized ranges.
1072          "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1073          "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1074        },
1075      },
1076    },
1077    "updateTime": "A String", # Output only. The time at which the document was last changed.
1078        #
1079        # This value is initially set to the `create_time` then increases
1080        # monotonically with each change to the document. It can also be
1081        # compared to values from other documents and the `read_time` of a query.
1082    "createTime": "A String", # Output only. The time at which the document was created.
1083        #
1084        # This value increases monotonically when a document is deleted then
1085        # recreated. It can also be compared to values from other documents and
1086        # the `read_time` of a query.
1087    "name": "A String", # The resource name of the document, for example
1088        # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
1089  }</pre>
1090</div>
1091
1092<div class="method">
1093    <code class="details" id="list">list(parent, collectionId, orderBy=None, showMissing=None, pageSize=None, mask_fieldPaths=None, x__xgafv=None, pageToken=None, readTime=None, transaction=None)</code>
1094  <pre>Lists documents.
1095
1096Args:
1097  parent: string, The parent resource name. In the format:
1098`projects/{project_id}/databases/{database_id}/documents` or
1099`projects/{project_id}/databases/{database_id}/documents/{document_path}`.
1100For example:
1101`projects/my-project/databases/my-database/documents` or
1102`projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` (required)
1103  collectionId: string, The collection ID, relative to `parent`, to list. For example: `chatrooms`
1104or `messages`. (required)
1105  orderBy: string, The order to sort results by. For example: `priority desc, name`.
1106  showMissing: boolean, If the list should show missing documents. A missing document is a
1107document that does not exist but has sub-documents. These documents will
1108be returned with a key but will not have fields, Document.create_time,
1109or Document.update_time set.
1110
1111Requests with `show_missing` may not specify `where` or
1112`order_by`.
1113  pageSize: integer, The maximum number of documents to return.
1114  mask_fieldPaths: string, The list of field paths in the mask. See Document.fields for a field
1115path syntax reference. (repeated)
1116  x__xgafv: string, V1 error format.
1117    Allowed values
1118      1 - v1 error format
1119      2 - v2 error format
1120  pageToken: string, The `next_page_token` value returned from a previous List request, if any.
1121  readTime: string, Reads documents as they were at the given time.
1122This may not be older than 60 seconds.
1123  transaction: string, Reads documents in a transaction.
1124
1125Returns:
1126  An object of the form:
1127
1128    { # The response for Firestore.ListDocuments.
1129    "nextPageToken": "A String", # The next page token.
1130    "documents": [ # The Documents found.
1131      { # A Firestore document.
1132          #
1133          # Must not exceed 1 MiB - 4 bytes.
1134        "fields": { # The document's fields.
1135            #
1136            # The map keys represent field names.
1137            #
1138            # A simple field name contains only characters `a` to `z`, `A` to `Z`,
1139            # `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
1140            # `foo_bar_17`.
1141            #
1142            # Field names matching the regular expression `__.*__` are reserved. Reserved
1143            # field names are forbidden except in certain documented contexts. The map
1144            # keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
1145            # empty.
1146            #
1147            # Field paths may be used in other contexts to refer to structured fields
1148            # defined here. For `map_value`, the field path is represented by the simple
1149            # or quoted field names of the containing fields, delimited by `.`. For
1150            # example, the structured field
1151            # `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
1152            # represented by the field path `foo.x&y`.
1153            #
1154            # Within a field path, a quoted field name starts and ends with `` ` `` and
1155            # may contain any character. Some characters, including `` ` ``, must be
1156            # escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
1157            # `` `bak\`tik` `` represents `` bak`tik ``.
1158          "a_key": { # A message that can hold any of the supported value types.
1159            "bytesValue": "A String", # A bytes value.
1160                #
1161                # Must not exceed 1 MiB - 89 bytes.
1162                # Only the first 1,500 bytes are considered by queries.
1163            "timestampValue": "A String", # A timestamp value.
1164                #
1165                # Precise only to microseconds. When stored, any additional precision is
1166                # rounded down.
1167            "nullValue": "A String", # A null value.
1168            "referenceValue": "A String", # A reference to a document. For example:
1169                # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
1170            "doubleValue": 3.14, # A double value.
1171            "mapValue": { # A map value. # A map value.
1172              "fields": { # The map's fields.
1173                  #
1174                  # The map keys represent field names. Field names matching the regular
1175                  # expression `__.*__` are reserved. Reserved field names are forbidden except
1176                  # in certain documented contexts. The map keys, represented as UTF-8, must
1177                  # not exceed 1,500 bytes and cannot be empty.
1178                "a_key": # Object with schema name: Value
1179              },
1180            },
1181            "stringValue": "A String", # A string value.
1182                #
1183                # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
1184                # Only the first 1,500 bytes of the UTF-8 representation are considered by
1185                # queries.
1186            "booleanValue": True or False, # A boolean value.
1187            "arrayValue": { # An array value. # An array value.
1188                #
1189                # Cannot directly contain another array value, though can contain an
1190                # map which contains another array.
1191              "values": [ # Values in the array.
1192                # Object with schema name: Value
1193              ],
1194            },
1195            "integerValue": "A String", # An integer value.
1196            "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
1197                # of doubles representing degrees latitude and degrees longitude. Unless
1198                # specified otherwise, this must conform to the
1199                # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1200                # standard</a>. Values must be within normalized ranges.
1201              "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1202              "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1203            },
1204          },
1205        },
1206        "updateTime": "A String", # Output only. The time at which the document was last changed.
1207            #
1208            # This value is initially set to the `create_time` then increases
1209            # monotonically with each change to the document. It can also be
1210            # compared to values from other documents and the `read_time` of a query.
1211        "createTime": "A String", # Output only. The time at which the document was created.
1212            #
1213            # This value increases monotonically when a document is deleted then
1214            # recreated. It can also be compared to values from other documents and
1215            # the `read_time` of a query.
1216        "name": "A String", # The resource name of the document, for example
1217            # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
1218      },
1219    ],
1220  }</pre>
1221</div>
1222
1223<div class="method">
1224    <code class="details" id="listCollectionIds">listCollectionIds(parent, body, x__xgafv=None)</code>
1225  <pre>Lists all the collection IDs underneath a document.
1226
1227Args:
1228  parent: string, The parent document. In the format:
1229`projects/{project_id}/databases/{database_id}/documents/{document_path}`.
1230For example:
1231`projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` (required)
1232  body: object, The request body. (required)
1233    The object takes the form of:
1234
1235{ # The request for Firestore.ListCollectionIds.
1236    "pageToken": "A String", # A page token. Must be a value from
1237        # ListCollectionIdsResponse.
1238    "pageSize": 42, # The maximum number of results to return.
1239  }
1240
1241  x__xgafv: string, V1 error format.
1242    Allowed values
1243      1 - v1 error format
1244      2 - v2 error format
1245
1246Returns:
1247  An object of the form:
1248
1249    { # The response from Firestore.ListCollectionIds.
1250    "nextPageToken": "A String", # A page token that may be used to continue the list.
1251    "collectionIds": [ # The collection ids.
1252      "A String",
1253    ],
1254  }</pre>
1255</div>
1256
1257<div class="method">
1258    <code class="details" id="listCollectionIds_next">listCollectionIds_next(previous_request, previous_response)</code>
1259  <pre>Retrieves the next page of results.
1260
1261Args:
1262  previous_request: The request for the previous page. (required)
1263  previous_response: The response from the request for the previous page. (required)
1264
1265Returns:
1266  A request object that you can call 'execute()' on to request the next
1267  page. Returns None if there are no more items in the collection.
1268    </pre>
1269</div>
1270
1271<div class="method">
1272    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1273  <pre>Retrieves the next page of results.
1274
1275Args:
1276  previous_request: The request for the previous page. (required)
1277  previous_response: The response from the request for the previous page. (required)
1278
1279Returns:
1280  A request object that you can call 'execute()' on to request the next
1281  page. Returns None if there are no more items in the collection.
1282    </pre>
1283</div>
1284
1285<div class="method">
1286    <code class="details" id="listen">listen(database, body, x__xgafv=None)</code>
1287  <pre>Listens to changes.
1288
1289Args:
1290  database: string, The database name. In the format:
1291`projects/{project_id}/databases/{database_id}`. (required)
1292  body: object, The request body. (required)
1293    The object takes the form of:
1294
1295{ # A request for Firestore.Listen
1296    "labels": { # Labels associated with this target change.
1297      "a_key": "A String",
1298    },
1299    "addTarget": { # A specification of a set of documents to listen to. # A target to add to this stream.
1300      "documents": { # A target specified by a set of documents names. # A target specified by a set of document names.
1301        "documents": [ # The names of the documents to retrieve. In the format:
1302            # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
1303            # The request will fail if any of the document is not a child resource of
1304            # the given `database`. Duplicate names will be elided.
1305          "A String",
1306        ],
1307      },
1308      "resumeToken": "A String", # A resume token from a prior TargetChange for an identical target.
1309          #
1310          # Using a resume token with a different target is unsupported and may fail.
1311      "targetId": 42, # A client provided target ID.
1312          #
1313          # If not set, the server will assign an ID for the target.
1314          #
1315          # Used for resuming a target without changing IDs. The IDs can either be
1316          # client-assigned or be server-assigned in a previous stream. All targets
1317          # with client provided IDs must be added before adding a target that needs
1318          # a server-assigned id.
1319      "query": { # A target specified by a query. # A target specified by a query.
1320        "structuredQuery": { # A Firestore query. # A structured query.
1321          "orderBy": [ # The order to apply to the query results.
1322              #
1323              # Firestore guarantees a stable ordering through the following rules:
1324              #
1325              #  * Any field required to appear in `order_by`, that is not already
1326              #    specified in `order_by`, is appended to the order in field name order
1327              #    by default.
1328              #  * If an order on `__name__` is not specified, it is appended by default.
1329              #
1330              # Fields are appended with the same sort direction as the last order
1331              # specified, or 'ASCENDING' if no order was specified. For example:
1332              #
1333              #  * `SELECT * FROM Foo ORDER BY A` becomes
1334              #    `SELECT * FROM Foo ORDER BY A, __name__`
1335              #  * `SELECT * FROM Foo ORDER BY A DESC` becomes
1336              #    `SELECT * FROM Foo ORDER BY A DESC, __name__ DESC`
1337              #  * `SELECT * FROM Foo WHERE A > 1` becomes
1338              #    `SELECT * FROM Foo WHERE A > 1 ORDER BY A, __name__`
1339            { # An order on a field.
1340              "field": { # A reference to a field, such as `max(messages.time) as max_time`. # The field to order by.
1341                "fieldPath": "A String",
1342              },
1343              "direction": "A String", # The direction to order by. Defaults to `ASCENDING`.
1344            },
1345          ],
1346          "startAt": { # A position in a query result set. # A starting point for the query results.
1347            "values": [ # The values that represent a position, in the order they appear in
1348                # the order by clause of a query.
1349                #
1350                # Can contain fewer values than specified in the order by clause.
1351              { # A message that can hold any of the supported value types.
1352                "bytesValue": "A String", # A bytes value.
1353                    #
1354                    # Must not exceed 1 MiB - 89 bytes.
1355                    # Only the first 1,500 bytes are considered by queries.
1356                "timestampValue": "A String", # A timestamp value.
1357                    #
1358                    # Precise only to microseconds. When stored, any additional precision is
1359                    # rounded down.
1360                "nullValue": "A String", # A null value.
1361                "referenceValue": "A String", # A reference to a document. For example:
1362                    # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
1363                "doubleValue": 3.14, # A double value.
1364                "mapValue": { # A map value. # A map value.
1365                  "fields": { # The map's fields.
1366                      #
1367                      # The map keys represent field names. Field names matching the regular
1368                      # expression `__.*__` are reserved. Reserved field names are forbidden except
1369                      # in certain documented contexts. The map keys, represented as UTF-8, must
1370                      # not exceed 1,500 bytes and cannot be empty.
1371                    "a_key": # Object with schema name: Value
1372                  },
1373                },
1374                "stringValue": "A String", # A string value.
1375                    #
1376                    # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
1377                    # Only the first 1,500 bytes of the UTF-8 representation are considered by
1378                    # queries.
1379                "booleanValue": True or False, # A boolean value.
1380                "arrayValue": { # An array value. # An array value.
1381                    #
1382                    # Cannot directly contain another array value, though can contain an
1383                    # map which contains another array.
1384                  "values": [ # Values in the array.
1385                    # Object with schema name: Value
1386                  ],
1387                },
1388                "integerValue": "A String", # An integer value.
1389                "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
1390                    # of doubles representing degrees latitude and degrees longitude. Unless
1391                    # specified otherwise, this must conform to the
1392                    # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1393                    # standard</a>. Values must be within normalized ranges.
1394                  "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1395                  "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1396                },
1397              },
1398            ],
1399            "before": True or False, # If the position is just before or just after the given values, relative
1400                # to the sort order defined by the query.
1401          },
1402          "endAt": { # A position in a query result set. # A end point for the query results.
1403            "values": [ # The values that represent a position, in the order they appear in
1404                # the order by clause of a query.
1405                #
1406                # Can contain fewer values than specified in the order by clause.
1407              { # A message that can hold any of the supported value types.
1408                "bytesValue": "A String", # A bytes value.
1409                    #
1410                    # Must not exceed 1 MiB - 89 bytes.
1411                    # Only the first 1,500 bytes are considered by queries.
1412                "timestampValue": "A String", # A timestamp value.
1413                    #
1414                    # Precise only to microseconds. When stored, any additional precision is
1415                    # rounded down.
1416                "nullValue": "A String", # A null value.
1417                "referenceValue": "A String", # A reference to a document. For example:
1418                    # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
1419                "doubleValue": 3.14, # A double value.
1420                "mapValue": { # A map value. # A map value.
1421                  "fields": { # The map's fields.
1422                      #
1423                      # The map keys represent field names. Field names matching the regular
1424                      # expression `__.*__` are reserved. Reserved field names are forbidden except
1425                      # in certain documented contexts. The map keys, represented as UTF-8, must
1426                      # not exceed 1,500 bytes and cannot be empty.
1427                    "a_key": # Object with schema name: Value
1428                  },
1429                },
1430                "stringValue": "A String", # A string value.
1431                    #
1432                    # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
1433                    # Only the first 1,500 bytes of the UTF-8 representation are considered by
1434                    # queries.
1435                "booleanValue": True or False, # A boolean value.
1436                "arrayValue": { # An array value. # An array value.
1437                    #
1438                    # Cannot directly contain another array value, though can contain an
1439                    # map which contains another array.
1440                  "values": [ # Values in the array.
1441                    # Object with schema name: Value
1442                  ],
1443                },
1444                "integerValue": "A String", # An integer value.
1445                "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
1446                    # of doubles representing degrees latitude and degrees longitude. Unless
1447                    # specified otherwise, this must conform to the
1448                    # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1449                    # standard</a>. Values must be within normalized ranges.
1450                  "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1451                  "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1452                },
1453              },
1454            ],
1455            "before": True or False, # If the position is just before or just after the given values, relative
1456                # to the sort order defined by the query.
1457          },
1458          "limit": 42, # The maximum number of results to return.
1459              #
1460              # Applies after all other constraints.
1461              # Must be >= 0 if specified.
1462          "offset": 42, # The number of results to skip.
1463              #
1464              # Applies before limit, but after all other constraints. Must be >= 0 if
1465              # specified.
1466          "from": [ # The collections to query.
1467            { # A selection of a collection, such as `messages as m1`.
1468              "allDescendants": True or False, # When false, selects only collections that are immediate children of
1469                  # the `parent` specified in the containing `RunQueryRequest`.
1470                  # When true, selects all descendant collections.
1471              "collectionId": "A String", # The collection ID.
1472                  # When set, selects only collections with this ID.
1473            },
1474          ],
1475          "where": { # A filter. # The filter to apply.
1476            "compositeFilter": { # A filter that merges multiple other filters using the given operator. # A composite filter.
1477              "filters": [ # The list of filters to combine.
1478                  # Must contain at least one filter.
1479                # Object with schema name: Filter
1480              ],
1481              "op": "A String", # The operator for combining multiple filters.
1482            },
1483            "fieldFilter": { # A filter on a specific field. # A filter on a document field.
1484              "field": { # A reference to a field, such as `max(messages.time) as max_time`. # The field to filter by.
1485                "fieldPath": "A String",
1486              },
1487              "value": { # A message that can hold any of the supported value types. # The value to compare to.
1488                "bytesValue": "A String", # A bytes value.
1489                    #
1490                    # Must not exceed 1 MiB - 89 bytes.
1491                    # Only the first 1,500 bytes are considered by queries.
1492                "timestampValue": "A String", # A timestamp value.
1493                    #
1494                    # Precise only to microseconds. When stored, any additional precision is
1495                    # rounded down.
1496                "nullValue": "A String", # A null value.
1497                "referenceValue": "A String", # A reference to a document. For example:
1498                    # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
1499                "doubleValue": 3.14, # A double value.
1500                "mapValue": { # A map value. # A map value.
1501                  "fields": { # The map's fields.
1502                      #
1503                      # The map keys represent field names. Field names matching the regular
1504                      # expression `__.*__` are reserved. Reserved field names are forbidden except
1505                      # in certain documented contexts. The map keys, represented as UTF-8, must
1506                      # not exceed 1,500 bytes and cannot be empty.
1507                    "a_key": # Object with schema name: Value
1508                  },
1509                },
1510                "stringValue": "A String", # A string value.
1511                    #
1512                    # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
1513                    # Only the first 1,500 bytes of the UTF-8 representation are considered by
1514                    # queries.
1515                "booleanValue": True or False, # A boolean value.
1516                "arrayValue": { # An array value. # An array value.
1517                    #
1518                    # Cannot directly contain another array value, though can contain an
1519                    # map which contains another array.
1520                  "values": [ # Values in the array.
1521                    # Object with schema name: Value
1522                  ],
1523                },
1524                "integerValue": "A String", # An integer value.
1525                "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
1526                    # of doubles representing degrees latitude and degrees longitude. Unless
1527                    # specified otherwise, this must conform to the
1528                    # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1529                    # standard</a>. Values must be within normalized ranges.
1530                  "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1531                  "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1532                },
1533              },
1534              "op": "A String", # The operator to filter by.
1535            },
1536            "unaryFilter": { # A filter with a single operand. # A filter that takes exactly one argument.
1537              "field": { # A reference to a field, such as `max(messages.time) as max_time`. # The field to which to apply the operator.
1538                "fieldPath": "A String",
1539              },
1540              "op": "A String", # The unary operator to apply.
1541            },
1542          },
1543          "select": { # The projection of document's fields to return. # The projection to return.
1544            "fields": [ # The fields to return.
1545                #
1546                # If empty, all fields are returned. To only return the name
1547                # of the document, use `['__name__']`.
1548              { # A reference to a field, such as `max(messages.time) as max_time`.
1549                "fieldPath": "A String",
1550              },
1551            ],
1552          },
1553        },
1554        "parent": "A String", # The parent resource name. In the format:
1555            # `projects/{project_id}/databases/{database_id}/documents` or
1556            # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
1557            # For example:
1558            # `projects/my-project/databases/my-database/documents` or
1559            # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
1560      },
1561      "readTime": "A String", # Start listening after a specific `read_time`.
1562          #
1563          # The client must know the state of matching documents at this time.
1564      "once": True or False, # If the target should be removed once it is current and consistent.
1565    },
1566    "removeTarget": 42, # The ID of a target to remove from this stream.
1567  }
1568
1569  x__xgafv: string, V1 error format.
1570    Allowed values
1571      1 - v1 error format
1572      2 - v2 error format
1573
1574Returns:
1575  An object of the form:
1576
1577    { # The response for Firestore.Listen.
1578    "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
1579        # given target.
1580        #
1581        # Returned when documents may have been removed from the given target, but
1582        # the exact documents are unknown.
1583      "count": 42, # The total count of documents that match target_id.
1584          #
1585          # If different from the count of documents in the client that match, the
1586          # client must manually determine which documents no longer match the target.
1587      "targetId": 42, # The target ID to which this filter applies.
1588    },
1589    "documentDelete": { # A Document has been deleted. # A Document has been deleted.
1590        #
1591        # May be the result of multiple writes, including updates, the
1592        # last of which deleted the Document.
1593        #
1594        # Multiple DocumentDelete messages may be returned for the same logical
1595        # delete, if multiple targets are affected.
1596      "document": "A String", # The resource name of the Document that was deleted.
1597      "removedTargetIds": [ # A set of target IDs for targets that previously matched this entity.
1598        42,
1599      ],
1600      "readTime": "A String", # The read timestamp at which the delete was observed.
1601          #
1602          # Greater or equal to the `commit_time` of the delete.
1603    },
1604    "documentRemove": { # A Document has been removed from the view of the targets. # A Document has been removed from a target (because it is no longer
1605        # relevant to that target).
1606        #
1607        # Sent if the document is no longer relevant to a target and is out of view.
1608        # Can be sent instead of a DocumentDelete or a DocumentChange if the server
1609        # can not send the new value of the document.
1610        #
1611        # Multiple DocumentRemove messages may be returned for the same logical
1612        # write or delete, if multiple targets are affected.
1613      "document": "A String", # The resource name of the Document that has gone out of view.
1614      "removedTargetIds": [ # A set of target IDs for targets that previously matched this document.
1615        42,
1616      ],
1617      "readTime": "A String", # The read timestamp at which the remove was observed.
1618          #
1619          # Greater or equal to the `commit_time` of the change/delete/remove.
1620    },
1621    "documentChange": { # A Document has changed. # A Document has changed.
1622        #
1623        # May be the result of multiple writes, including deletes, that
1624        # ultimately resulted in a new value for the Document.
1625        #
1626        # Multiple DocumentChange messages may be returned for the same logical
1627        # change, if multiple targets are affected.
1628      "removedTargetIds": [ # A set of target IDs for targets that no longer match this document.
1629        42,
1630      ],
1631      "document": { # A Firestore document. # The new state of the Document.
1632          #
1633          # If `mask` is set, contains only fields that were updated or added.
1634          #
1635          # Must not exceed 1 MiB - 4 bytes.
1636        "fields": { # The document's fields.
1637            #
1638            # The map keys represent field names.
1639            #
1640            # A simple field name contains only characters `a` to `z`, `A` to `Z`,
1641            # `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
1642            # `foo_bar_17`.
1643            #
1644            # Field names matching the regular expression `__.*__` are reserved. Reserved
1645            # field names are forbidden except in certain documented contexts. The map
1646            # keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
1647            # empty.
1648            #
1649            # Field paths may be used in other contexts to refer to structured fields
1650            # defined here. For `map_value`, the field path is represented by the simple
1651            # or quoted field names of the containing fields, delimited by `.`. For
1652            # example, the structured field
1653            # `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
1654            # represented by the field path `foo.x&y`.
1655            #
1656            # Within a field path, a quoted field name starts and ends with `` ` `` and
1657            # may contain any character. Some characters, including `` ` ``, must be
1658            # escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
1659            # `` `bak\`tik` `` represents `` bak`tik ``.
1660          "a_key": { # A message that can hold any of the supported value types.
1661            "bytesValue": "A String", # A bytes value.
1662                #
1663                # Must not exceed 1 MiB - 89 bytes.
1664                # Only the first 1,500 bytes are considered by queries.
1665            "timestampValue": "A String", # A timestamp value.
1666                #
1667                # Precise only to microseconds. When stored, any additional precision is
1668                # rounded down.
1669            "nullValue": "A String", # A null value.
1670            "referenceValue": "A String", # A reference to a document. For example:
1671                # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
1672            "doubleValue": 3.14, # A double value.
1673            "mapValue": { # A map value. # A map value.
1674              "fields": { # The map's fields.
1675                  #
1676                  # The map keys represent field names. Field names matching the regular
1677                  # expression `__.*__` are reserved. Reserved field names are forbidden except
1678                  # in certain documented contexts. The map keys, represented as UTF-8, must
1679                  # not exceed 1,500 bytes and cannot be empty.
1680                "a_key": # Object with schema name: Value
1681              },
1682            },
1683            "stringValue": "A String", # A string value.
1684                #
1685                # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
1686                # Only the first 1,500 bytes of the UTF-8 representation are considered by
1687                # queries.
1688            "booleanValue": True or False, # A boolean value.
1689            "arrayValue": { # An array value. # An array value.
1690                #
1691                # Cannot directly contain another array value, though can contain an
1692                # map which contains another array.
1693              "values": [ # Values in the array.
1694                # Object with schema name: Value
1695              ],
1696            },
1697            "integerValue": "A String", # An integer value.
1698            "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
1699                # of doubles representing degrees latitude and degrees longitude. Unless
1700                # specified otherwise, this must conform to the
1701                # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1702                # standard</a>. Values must be within normalized ranges.
1703              "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1704              "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1705            },
1706          },
1707        },
1708        "updateTime": "A String", # Output only. The time at which the document was last changed.
1709            #
1710            # This value is initially set to the `create_time` then increases
1711            # monotonically with each change to the document. It can also be
1712            # compared to values from other documents and the `read_time` of a query.
1713        "createTime": "A String", # Output only. The time at which the document was created.
1714            #
1715            # This value increases monotonically when a document is deleted then
1716            # recreated. It can also be compared to values from other documents and
1717            # the `read_time` of a query.
1718        "name": "A String", # The resource name of the document, for example
1719            # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
1720      },
1721      "targetIds": [ # A set of target IDs of targets that match this document.
1722        42,
1723      ],
1724    },
1725    "targetChange": { # Targets being watched have changed. # Targets have changed.
1726      "resumeToken": "A String", # A token that can be used to resume the stream for the given `target_ids`,
1727          # or all targets if `target_ids` is empty.
1728          #
1729          # Not set on every target change.
1730      "targetChangeType": "A String", # The type of change that occurred.
1731      "cause": { # The `Status` type defines a logical error model that is suitable for # The error that resulted in this change, if applicable.
1732          # different programming environments, including REST APIs and RPC APIs. It is
1733          # used by [gRPC](https://github.com/grpc). The error model is designed to be:
1734          #
1735          # - Simple to use and understand for most users
1736          # - Flexible enough to meet unexpected needs
1737          #
1738          # # Overview
1739          #
1740          # The `Status` message contains three pieces of data: error code, error
1741          # message, and error details. The error code should be an enum value of
1742          # google.rpc.Code, but it may accept additional error codes if needed.  The
1743          # error message should be a developer-facing English message that helps
1744          # developers *understand* and *resolve* the error. If a localized user-facing
1745          # error message is needed, put the localized message in the error details or
1746          # localize it in the client. The optional error details may contain arbitrary
1747          # information about the error. There is a predefined set of error detail types
1748          # in the package `google.rpc` that can be used for common error conditions.
1749          #
1750          # # Language mapping
1751          #
1752          # The `Status` message is the logical representation of the error model, but it
1753          # is not necessarily the actual wire format. When the `Status` message is
1754          # exposed in different client libraries and different wire protocols, it can be
1755          # mapped differently. For example, it will likely be mapped to some exceptions
1756          # in Java, but more likely mapped to some error codes in C.
1757          #
1758          # # Other uses
1759          #
1760          # The error model and the `Status` message can be used in a variety of
1761          # environments, either with or without APIs, to provide a
1762          # consistent developer experience across different environments.
1763          #
1764          # Example uses of this error model include:
1765          #
1766          # - Partial errors. If a service needs to return partial errors to the client,
1767          #     it may embed the `Status` in the normal response to indicate the partial
1768          #     errors.
1769          #
1770          # - Workflow errors. A typical workflow has multiple steps. Each step may
1771          #     have a `Status` message for error reporting.
1772          #
1773          # - Batch operations. If a client uses batch request and batch response, the
1774          #     `Status` message should be used directly inside batch response, one for
1775          #     each error sub-response.
1776          #
1777          # - Asynchronous operations. If an API call embeds asynchronous operation
1778          #     results in its response, the status of those operations should be
1779          #     represented directly using the `Status` message.
1780          #
1781          # - Logging. If some API errors are stored in logs, the message `Status` could
1782          #     be used directly after any stripping needed for security/privacy reasons.
1783        "message": "A String", # A developer-facing error message, which should be in English. Any
1784            # user-facing error message should be localized and sent in the
1785            # google.rpc.Status.details field, or localized by the client.
1786        "code": 42, # The status code, which should be an enum value of google.rpc.Code.
1787        "details": [ # A list of messages that carry the error details.  There is a common set of
1788            # message types for APIs to use.
1789          {
1790            "a_key": "", # Properties of the object. Contains field @type with type URL.
1791          },
1792        ],
1793      },
1794      "targetIds": [ # The target IDs of targets that have changed.
1795          #
1796          # If empty, the change applies to all targets.
1797          #
1798          # For `target_change_type=ADD`, the order of the target IDs matches the order
1799          # of the requests to add the targets. This allows clients to unambiguously
1800          # associate server-assigned target IDs with added targets.
1801          #
1802          # For other states, the order of the target IDs is not defined.
1803        42,
1804      ],
1805      "readTime": "A String", # The consistent `read_time` for the given `target_ids` (omitted when the
1806          # target_ids are not at a consistent snapshot).
1807          #
1808          # The stream is guaranteed to send a `read_time` with `target_ids` empty
1809          # whenever the entire stream reaches a new consistent snapshot. ADD,
1810          # CURRENT, and RESET messages are guaranteed to (eventually) result in a
1811          # new consistent snapshot (while NO_CHANGE and REMOVE messages are not).
1812          #
1813          # For a given stream, `read_time` is guaranteed to be monotonically
1814          # increasing.
1815    },
1816  }</pre>
1817</div>
1818
1819<div class="method">
1820    <code class="details" id="patch">patch(name, body, updateMask_fieldPaths=None, mask_fieldPaths=None, x__xgafv=None, currentDocument_updateTime=None, currentDocument_exists=None)</code>
1821  <pre>Updates or inserts a document.
1822
1823Args:
1824  name: string, The resource name of the document, for example
1825`projects/{project_id}/databases/{database_id}/documents/{document_path}`. (required)
1826  body: object, The request body. (required)
1827    The object takes the form of:
1828
1829{ # A Firestore document.
1830    #
1831    # Must not exceed 1 MiB - 4 bytes.
1832  "fields": { # The document's fields.
1833      #
1834      # The map keys represent field names.
1835      #
1836      # A simple field name contains only characters `a` to `z`, `A` to `Z`,
1837      # `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
1838      # `foo_bar_17`.
1839      #
1840      # Field names matching the regular expression `__.*__` are reserved. Reserved
1841      # field names are forbidden except in certain documented contexts. The map
1842      # keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
1843      # empty.
1844      #
1845      # Field paths may be used in other contexts to refer to structured fields
1846      # defined here. For `map_value`, the field path is represented by the simple
1847      # or quoted field names of the containing fields, delimited by `.`. For
1848      # example, the structured field
1849      # `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
1850      # represented by the field path `foo.x&y`.
1851      #
1852      # Within a field path, a quoted field name starts and ends with `` ` `` and
1853      # may contain any character. Some characters, including `` ` ``, must be
1854      # escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
1855      # `` `bak\`tik` `` represents `` bak`tik ``.
1856    "a_key": { # A message that can hold any of the supported value types.
1857      "bytesValue": "A String", # A bytes value.
1858          #
1859          # Must not exceed 1 MiB - 89 bytes.
1860          # Only the first 1,500 bytes are considered by queries.
1861      "timestampValue": "A String", # A timestamp value.
1862          #
1863          # Precise only to microseconds. When stored, any additional precision is
1864          # rounded down.
1865      "nullValue": "A String", # A null value.
1866      "referenceValue": "A String", # A reference to a document. For example:
1867          # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
1868      "doubleValue": 3.14, # A double value.
1869      "mapValue": { # A map value. # A map value.
1870        "fields": { # The map's fields.
1871            #
1872            # The map keys represent field names. Field names matching the regular
1873            # expression `__.*__` are reserved. Reserved field names are forbidden except
1874            # in certain documented contexts. The map keys, represented as UTF-8, must
1875            # not exceed 1,500 bytes and cannot be empty.
1876          "a_key": # Object with schema name: Value
1877        },
1878      },
1879      "stringValue": "A String", # A string value.
1880          #
1881          # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
1882          # Only the first 1,500 bytes of the UTF-8 representation are considered by
1883          # queries.
1884      "booleanValue": True or False, # A boolean value.
1885      "arrayValue": { # An array value. # An array value.
1886          #
1887          # Cannot directly contain another array value, though can contain an
1888          # map which contains another array.
1889        "values": [ # Values in the array.
1890          # Object with schema name: Value
1891        ],
1892      },
1893      "integerValue": "A String", # An integer value.
1894      "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
1895          # of doubles representing degrees latitude and degrees longitude. Unless
1896          # specified otherwise, this must conform to the
1897          # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
1898          # standard</a>. Values must be within normalized ranges.
1899        "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
1900        "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
1901      },
1902    },
1903  },
1904  "updateTime": "A String", # Output only. The time at which the document was last changed.
1905      #
1906      # This value is initially set to the `create_time` then increases
1907      # monotonically with each change to the document. It can also be
1908      # compared to values from other documents and the `read_time` of a query.
1909  "createTime": "A String", # Output only. The time at which the document was created.
1910      #
1911      # This value increases monotonically when a document is deleted then
1912      # recreated. It can also be compared to values from other documents and
1913      # the `read_time` of a query.
1914  "name": "A String", # The resource name of the document, for example
1915      # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
1916}
1917
1918  updateMask_fieldPaths: string, The list of field paths in the mask. See Document.fields for a field
1919path syntax reference. (repeated)
1920  mask_fieldPaths: string, The list of field paths in the mask. See Document.fields for a field
1921path syntax reference. (repeated)
1922  x__xgafv: string, V1 error format.
1923    Allowed values
1924      1 - v1 error format
1925      2 - v2 error format
1926  currentDocument_updateTime: string, When set, the target document must exist and have been last updated at
1927that time.
1928  currentDocument_exists: boolean, When set to `true`, the target document must exist.
1929When set to `false`, the target document must not exist.
1930
1931Returns:
1932  An object of the form:
1933
1934    { # A Firestore document.
1935      #
1936      # Must not exceed 1 MiB - 4 bytes.
1937    "fields": { # The document's fields.
1938        #
1939        # The map keys represent field names.
1940        #
1941        # A simple field name contains only characters `a` to `z`, `A` to `Z`,
1942        # `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
1943        # `foo_bar_17`.
1944        #
1945        # Field names matching the regular expression `__.*__` are reserved. Reserved
1946        # field names are forbidden except in certain documented contexts. The map
1947        # keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
1948        # empty.
1949        #
1950        # Field paths may be used in other contexts to refer to structured fields
1951        # defined here. For `map_value`, the field path is represented by the simple
1952        # or quoted field names of the containing fields, delimited by `.`. For
1953        # example, the structured field
1954        # `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
1955        # represented by the field path `foo.x&y`.
1956        #
1957        # Within a field path, a quoted field name starts and ends with `` ` `` and
1958        # may contain any character. Some characters, including `` ` ``, must be
1959        # escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
1960        # `` `bak\`tik` `` represents `` bak`tik ``.
1961      "a_key": { # A message that can hold any of the supported value types.
1962        "bytesValue": "A String", # A bytes value.
1963            #
1964            # Must not exceed 1 MiB - 89 bytes.
1965            # Only the first 1,500 bytes are considered by queries.
1966        "timestampValue": "A String", # A timestamp value.
1967            #
1968            # Precise only to microseconds. When stored, any additional precision is
1969            # rounded down.
1970        "nullValue": "A String", # A null value.
1971        "referenceValue": "A String", # A reference to a document. For example:
1972            # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
1973        "doubleValue": 3.14, # A double value.
1974        "mapValue": { # A map value. # A map value.
1975          "fields": { # The map's fields.
1976              #
1977              # The map keys represent field names. Field names matching the regular
1978              # expression `__.*__` are reserved. Reserved field names are forbidden except
1979              # in certain documented contexts. The map keys, represented as UTF-8, must
1980              # not exceed 1,500 bytes and cannot be empty.
1981            "a_key": # Object with schema name: Value
1982          },
1983        },
1984        "stringValue": "A String", # A string value.
1985            #
1986            # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
1987            # Only the first 1,500 bytes of the UTF-8 representation are considered by
1988            # queries.
1989        "booleanValue": True or False, # A boolean value.
1990        "arrayValue": { # An array value. # An array value.
1991            #
1992            # Cannot directly contain another array value, though can contain an
1993            # map which contains another array.
1994          "values": [ # Values in the array.
1995            # Object with schema name: Value
1996          ],
1997        },
1998        "integerValue": "A String", # An integer value.
1999        "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
2000            # of doubles representing degrees latitude and degrees longitude. Unless
2001            # specified otherwise, this must conform to the
2002            # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
2003            # standard</a>. Values must be within normalized ranges.
2004          "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
2005          "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
2006        },
2007      },
2008    },
2009    "updateTime": "A String", # Output only. The time at which the document was last changed.
2010        #
2011        # This value is initially set to the `create_time` then increases
2012        # monotonically with each change to the document. It can also be
2013        # compared to values from other documents and the `read_time` of a query.
2014    "createTime": "A String", # Output only. The time at which the document was created.
2015        #
2016        # This value increases monotonically when a document is deleted then
2017        # recreated. It can also be compared to values from other documents and
2018        # the `read_time` of a query.
2019    "name": "A String", # The resource name of the document, for example
2020        # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
2021  }</pre>
2022</div>
2023
2024<div class="method">
2025    <code class="details" id="rollback">rollback(database, body, x__xgafv=None)</code>
2026  <pre>Rolls back a transaction.
2027
2028Args:
2029  database: string, The database name. In the format:
2030`projects/{project_id}/databases/{database_id}`. (required)
2031  body: object, The request body. (required)
2032    The object takes the form of:
2033
2034{ # The request for Firestore.Rollback.
2035    "transaction": "A String", # The transaction to roll back.
2036  }
2037
2038  x__xgafv: string, V1 error format.
2039    Allowed values
2040      1 - v1 error format
2041      2 - v2 error format
2042
2043Returns:
2044  An object of the form:
2045
2046    { # A generic empty message that you can re-use to avoid defining duplicated
2047      # empty messages in your APIs. A typical example is to use it as the request
2048      # or the response type of an API method. For instance:
2049      #
2050      #     service Foo {
2051      #       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
2052      #     }
2053      #
2054      # The JSON representation for `Empty` is empty JSON object `{}`.
2055  }</pre>
2056</div>
2057
2058<div class="method">
2059    <code class="details" id="runQuery">runQuery(parent, body, x__xgafv=None)</code>
2060  <pre>Runs a query.
2061
2062Args:
2063  parent: string, The parent resource name. In the format:
2064`projects/{project_id}/databases/{database_id}/documents` or
2065`projects/{project_id}/databases/{database_id}/documents/{document_path}`.
2066For example:
2067`projects/my-project/databases/my-database/documents` or
2068`projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` (required)
2069  body: object, The request body. (required)
2070    The object takes the form of:
2071
2072{ # The request for Firestore.RunQuery.
2073    "newTransaction": { # Options for creating a new transaction. # Starts a new transaction and reads the documents.
2074        # Defaults to a read-only transaction.
2075        # The new transaction ID will be returned as the first response in the
2076        # stream.
2077      "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.
2078        "retryTransaction": "A String", # An optional transaction to retry.
2079      },
2080      "readOnly": { # Options for a transaction that can only be used to read documents. # The transaction can only be used for read operations.
2081        "readTime": "A String", # Reads documents at the given time.
2082            # This may not be older than 60 seconds.
2083      },
2084    },
2085    "transaction": "A String", # Reads documents in a transaction.
2086    "structuredQuery": { # A Firestore query. # A structured query.
2087      "orderBy": [ # The order to apply to the query results.
2088          #
2089          # Firestore guarantees a stable ordering through the following rules:
2090          #
2091          #  * Any field required to appear in `order_by`, that is not already
2092          #    specified in `order_by`, is appended to the order in field name order
2093          #    by default.
2094          #  * If an order on `__name__` is not specified, it is appended by default.
2095          #
2096          # Fields are appended with the same sort direction as the last order
2097          # specified, or 'ASCENDING' if no order was specified. For example:
2098          #
2099          #  * `SELECT * FROM Foo ORDER BY A` becomes
2100          #    `SELECT * FROM Foo ORDER BY A, __name__`
2101          #  * `SELECT * FROM Foo ORDER BY A DESC` becomes
2102          #    `SELECT * FROM Foo ORDER BY A DESC, __name__ DESC`
2103          #  * `SELECT * FROM Foo WHERE A > 1` becomes
2104          #    `SELECT * FROM Foo WHERE A > 1 ORDER BY A, __name__`
2105        { # An order on a field.
2106          "field": { # A reference to a field, such as `max(messages.time) as max_time`. # The field to order by.
2107            "fieldPath": "A String",
2108          },
2109          "direction": "A String", # The direction to order by. Defaults to `ASCENDING`.
2110        },
2111      ],
2112      "startAt": { # A position in a query result set. # A starting point for the query results.
2113        "values": [ # The values that represent a position, in the order they appear in
2114            # the order by clause of a query.
2115            #
2116            # Can contain fewer values than specified in the order by clause.
2117          { # A message that can hold any of the supported value types.
2118            "bytesValue": "A String", # A bytes value.
2119                #
2120                # Must not exceed 1 MiB - 89 bytes.
2121                # Only the first 1,500 bytes are considered by queries.
2122            "timestampValue": "A String", # A timestamp value.
2123                #
2124                # Precise only to microseconds. When stored, any additional precision is
2125                # rounded down.
2126            "nullValue": "A String", # A null value.
2127            "referenceValue": "A String", # A reference to a document. For example:
2128                # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
2129            "doubleValue": 3.14, # A double value.
2130            "mapValue": { # A map value. # A map value.
2131              "fields": { # The map's fields.
2132                  #
2133                  # The map keys represent field names. Field names matching the regular
2134                  # expression `__.*__` are reserved. Reserved field names are forbidden except
2135                  # in certain documented contexts. The map keys, represented as UTF-8, must
2136                  # not exceed 1,500 bytes and cannot be empty.
2137                "a_key": # Object with schema name: Value
2138              },
2139            },
2140            "stringValue": "A String", # A string value.
2141                #
2142                # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
2143                # Only the first 1,500 bytes of the UTF-8 representation are considered by
2144                # queries.
2145            "booleanValue": True or False, # A boolean value.
2146            "arrayValue": { # An array value. # An array value.
2147                #
2148                # Cannot directly contain another array value, though can contain an
2149                # map which contains another array.
2150              "values": [ # Values in the array.
2151                # Object with schema name: Value
2152              ],
2153            },
2154            "integerValue": "A String", # An integer value.
2155            "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
2156                # of doubles representing degrees latitude and degrees longitude. Unless
2157                # specified otherwise, this must conform to the
2158                # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
2159                # standard</a>. Values must be within normalized ranges.
2160              "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
2161              "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
2162            },
2163          },
2164        ],
2165        "before": True or False, # If the position is just before or just after the given values, relative
2166            # to the sort order defined by the query.
2167      },
2168      "endAt": { # A position in a query result set. # A end point for the query results.
2169        "values": [ # The values that represent a position, in the order they appear in
2170            # the order by clause of a query.
2171            #
2172            # Can contain fewer values than specified in the order by clause.
2173          { # A message that can hold any of the supported value types.
2174            "bytesValue": "A String", # A bytes value.
2175                #
2176                # Must not exceed 1 MiB - 89 bytes.
2177                # Only the first 1,500 bytes are considered by queries.
2178            "timestampValue": "A String", # A timestamp value.
2179                #
2180                # Precise only to microseconds. When stored, any additional precision is
2181                # rounded down.
2182            "nullValue": "A String", # A null value.
2183            "referenceValue": "A String", # A reference to a document. For example:
2184                # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
2185            "doubleValue": 3.14, # A double value.
2186            "mapValue": { # A map value. # A map value.
2187              "fields": { # The map's fields.
2188                  #
2189                  # The map keys represent field names. Field names matching the regular
2190                  # expression `__.*__` are reserved. Reserved field names are forbidden except
2191                  # in certain documented contexts. The map keys, represented as UTF-8, must
2192                  # not exceed 1,500 bytes and cannot be empty.
2193                "a_key": # Object with schema name: Value
2194              },
2195            },
2196            "stringValue": "A String", # A string value.
2197                #
2198                # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
2199                # Only the first 1,500 bytes of the UTF-8 representation are considered by
2200                # queries.
2201            "booleanValue": True or False, # A boolean value.
2202            "arrayValue": { # An array value. # An array value.
2203                #
2204                # Cannot directly contain another array value, though can contain an
2205                # map which contains another array.
2206              "values": [ # Values in the array.
2207                # Object with schema name: Value
2208              ],
2209            },
2210            "integerValue": "A String", # An integer value.
2211            "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
2212                # of doubles representing degrees latitude and degrees longitude. Unless
2213                # specified otherwise, this must conform to the
2214                # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
2215                # standard</a>. Values must be within normalized ranges.
2216              "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
2217              "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
2218            },
2219          },
2220        ],
2221        "before": True or False, # If the position is just before or just after the given values, relative
2222            # to the sort order defined by the query.
2223      },
2224      "limit": 42, # The maximum number of results to return.
2225          #
2226          # Applies after all other constraints.
2227          # Must be >= 0 if specified.
2228      "offset": 42, # The number of results to skip.
2229          #
2230          # Applies before limit, but after all other constraints. Must be >= 0 if
2231          # specified.
2232      "from": [ # The collections to query.
2233        { # A selection of a collection, such as `messages as m1`.
2234          "allDescendants": True or False, # When false, selects only collections that are immediate children of
2235              # the `parent` specified in the containing `RunQueryRequest`.
2236              # When true, selects all descendant collections.
2237          "collectionId": "A String", # The collection ID.
2238              # When set, selects only collections with this ID.
2239        },
2240      ],
2241      "where": { # A filter. # The filter to apply.
2242        "compositeFilter": { # A filter that merges multiple other filters using the given operator. # A composite filter.
2243          "filters": [ # The list of filters to combine.
2244              # Must contain at least one filter.
2245            # Object with schema name: Filter
2246          ],
2247          "op": "A String", # The operator for combining multiple filters.
2248        },
2249        "fieldFilter": { # A filter on a specific field. # A filter on a document field.
2250          "field": { # A reference to a field, such as `max(messages.time) as max_time`. # The field to filter by.
2251            "fieldPath": "A String",
2252          },
2253          "value": { # A message that can hold any of the supported value types. # The value to compare to.
2254            "bytesValue": "A String", # A bytes value.
2255                #
2256                # Must not exceed 1 MiB - 89 bytes.
2257                # Only the first 1,500 bytes are considered by queries.
2258            "timestampValue": "A String", # A timestamp value.
2259                #
2260                # Precise only to microseconds. When stored, any additional precision is
2261                # rounded down.
2262            "nullValue": "A String", # A null value.
2263            "referenceValue": "A String", # A reference to a document. For example:
2264                # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
2265            "doubleValue": 3.14, # A double value.
2266            "mapValue": { # A map value. # A map value.
2267              "fields": { # The map's fields.
2268                  #
2269                  # The map keys represent field names. Field names matching the regular
2270                  # expression `__.*__` are reserved. Reserved field names are forbidden except
2271                  # in certain documented contexts. The map keys, represented as UTF-8, must
2272                  # not exceed 1,500 bytes and cannot be empty.
2273                "a_key": # Object with schema name: Value
2274              },
2275            },
2276            "stringValue": "A String", # A string value.
2277                #
2278                # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
2279                # Only the first 1,500 bytes of the UTF-8 representation are considered by
2280                # queries.
2281            "booleanValue": True or False, # A boolean value.
2282            "arrayValue": { # An array value. # An array value.
2283                #
2284                # Cannot directly contain another array value, though can contain an
2285                # map which contains another array.
2286              "values": [ # Values in the array.
2287                # Object with schema name: Value
2288              ],
2289            },
2290            "integerValue": "A String", # An integer value.
2291            "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
2292                # of doubles representing degrees latitude and degrees longitude. Unless
2293                # specified otherwise, this must conform to the
2294                # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
2295                # standard</a>. Values must be within normalized ranges.
2296              "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
2297              "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
2298            },
2299          },
2300          "op": "A String", # The operator to filter by.
2301        },
2302        "unaryFilter": { # A filter with a single operand. # A filter that takes exactly one argument.
2303          "field": { # A reference to a field, such as `max(messages.time) as max_time`. # The field to which to apply the operator.
2304            "fieldPath": "A String",
2305          },
2306          "op": "A String", # The unary operator to apply.
2307        },
2308      },
2309      "select": { # The projection of document's fields to return. # The projection to return.
2310        "fields": [ # The fields to return.
2311            #
2312            # If empty, all fields are returned. To only return the name
2313            # of the document, use `['__name__']`.
2314          { # A reference to a field, such as `max(messages.time) as max_time`.
2315            "fieldPath": "A String",
2316          },
2317        ],
2318      },
2319    },
2320    "readTime": "A String", # Reads documents as they were at the given time.
2321        # This may not be older than 60 seconds.
2322  }
2323
2324  x__xgafv: string, V1 error format.
2325    Allowed values
2326      1 - v1 error format
2327      2 - v2 error format
2328
2329Returns:
2330  An object of the form:
2331
2332    { # The response for Firestore.RunQuery.
2333    "skippedResults": 42, # The number of results that have been skipped due to an offset between
2334        # the last response and the current response.
2335    "transaction": "A String", # The transaction that was started as part of this request.
2336        # Can only be set in the first response, and only if
2337        # RunQueryRequest.new_transaction was set in the request.
2338        # If set, no other fields will be set in this response.
2339    "document": { # A Firestore document. # A query result.
2340        # Not set when reporting partial progress.
2341        #
2342        # Must not exceed 1 MiB - 4 bytes.
2343      "fields": { # The document's fields.
2344          #
2345          # The map keys represent field names.
2346          #
2347          # A simple field name contains only characters `a` to `z`, `A` to `Z`,
2348          # `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
2349          # `foo_bar_17`.
2350          #
2351          # Field names matching the regular expression `__.*__` are reserved. Reserved
2352          # field names are forbidden except in certain documented contexts. The map
2353          # keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
2354          # empty.
2355          #
2356          # Field paths may be used in other contexts to refer to structured fields
2357          # defined here. For `map_value`, the field path is represented by the simple
2358          # or quoted field names of the containing fields, delimited by `.`. For
2359          # example, the structured field
2360          # `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
2361          # represented by the field path `foo.x&y`.
2362          #
2363          # Within a field path, a quoted field name starts and ends with `` ` `` and
2364          # may contain any character. Some characters, including `` ` ``, must be
2365          # escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
2366          # `` `bak\`tik` `` represents `` bak`tik ``.
2367        "a_key": { # A message that can hold any of the supported value types.
2368          "bytesValue": "A String", # A bytes value.
2369              #
2370              # Must not exceed 1 MiB - 89 bytes.
2371              # Only the first 1,500 bytes are considered by queries.
2372          "timestampValue": "A String", # A timestamp value.
2373              #
2374              # Precise only to microseconds. When stored, any additional precision is
2375              # rounded down.
2376          "nullValue": "A String", # A null value.
2377          "referenceValue": "A String", # A reference to a document. For example:
2378              # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
2379          "doubleValue": 3.14, # A double value.
2380          "mapValue": { # A map value. # A map value.
2381            "fields": { # The map's fields.
2382                #
2383                # The map keys represent field names. Field names matching the regular
2384                # expression `__.*__` are reserved. Reserved field names are forbidden except
2385                # in certain documented contexts. The map keys, represented as UTF-8, must
2386                # not exceed 1,500 bytes and cannot be empty.
2387              "a_key": # Object with schema name: Value
2388            },
2389          },
2390          "stringValue": "A String", # A string value.
2391              #
2392              # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
2393              # Only the first 1,500 bytes of the UTF-8 representation are considered by
2394              # queries.
2395          "booleanValue": True or False, # A boolean value.
2396          "arrayValue": { # An array value. # An array value.
2397              #
2398              # Cannot directly contain another array value, though can contain an
2399              # map which contains another array.
2400            "values": [ # Values in the array.
2401              # Object with schema name: Value
2402            ],
2403          },
2404          "integerValue": "A String", # An integer value.
2405          "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
2406              # of doubles representing degrees latitude and degrees longitude. Unless
2407              # specified otherwise, this must conform to the
2408              # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
2409              # standard</a>. Values must be within normalized ranges.
2410            "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
2411            "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
2412          },
2413        },
2414      },
2415      "updateTime": "A String", # Output only. The time at which the document was last changed.
2416          #
2417          # This value is initially set to the `create_time` then increases
2418          # monotonically with each change to the document. It can also be
2419          # compared to values from other documents and the `read_time` of a query.
2420      "createTime": "A String", # Output only. The time at which the document was created.
2421          #
2422          # This value increases monotonically when a document is deleted then
2423          # recreated. It can also be compared to values from other documents and
2424          # the `read_time` of a query.
2425      "name": "A String", # The resource name of the document, for example
2426          # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
2427    },
2428    "readTime": "A String", # The time at which the document was read. This may be monotonically
2429        # increasing; in this case, the previous documents in the result stream are
2430        # guaranteed not to have changed between their `read_time` and this one.
2431        #
2432        # If the query returns no results, a response with `read_time` and no
2433        # `document` will be sent, and this represents the time at which the query
2434        # was run.
2435  }</pre>
2436</div>
2437
2438<div class="method">
2439    <code class="details" id="write">write(database, body, x__xgafv=None)</code>
2440  <pre>Streams batches of document updates and deletes, in order.
2441
2442Args:
2443  database: string, The database name. In the format:
2444`projects/{project_id}/databases/{database_id}`.
2445This is only required in the first message. (required)
2446  body: object, The request body. (required)
2447    The object takes the form of:
2448
2449{ # The request for Firestore.Write.
2450      #
2451      # The first request creates a stream, or resumes an existing one from a token.
2452      #
2453      # When creating a new stream, the server replies with a response containing
2454      # only an ID and a token, to use in the next request.
2455      #
2456      # When resuming a stream, the server first streams any responses later than the
2457      # given token, then a response containing only an up-to-date token, to use in
2458      # the next request.
2459    "writes": [ # The writes to apply.
2460        #
2461        # Always executed atomically and in order.
2462        # This must be empty on the first request.
2463        # This may be empty on the last request.
2464        # This must not be empty on all other requests.
2465      { # A write on a document.
2466        "delete": "A String", # A document name to delete. In the format:
2467            # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
2468        "updateMask": { # A set of field paths on a document. # The fields to update in this write.
2469            #
2470            # This field can be set only when the operation is `update`.
2471            # If the mask is not set for an `update` and the document exists, any
2472            # existing data will be overwritten.
2473            # If the mask is set and the document on the server has fields not covered by
2474            # the mask, they are left unchanged.
2475            # Fields referenced in the mask, but not present in the input document, are
2476            # deleted from the document on the server.
2477            # The field paths in this mask must not contain a reserved field name.
2478            # Used to restrict a get or update operation on a document to a subset of its
2479            # fields.
2480            # This is different from standard field masks, as this is always scoped to a
2481            # Document, and takes in account the dynamic nature of Value.
2482          "fieldPaths": [ # The list of field paths in the mask. See Document.fields for a field
2483              # path syntax reference.
2484            "A String",
2485          ],
2486        },
2487        "update": { # A Firestore document. # A document to write.
2488            #
2489            # Must not exceed 1 MiB - 4 bytes.
2490          "fields": { # The document's fields.
2491              #
2492              # The map keys represent field names.
2493              #
2494              # A simple field name contains only characters `a` to `z`, `A` to `Z`,
2495              # `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
2496              # `foo_bar_17`.
2497              #
2498              # Field names matching the regular expression `__.*__` are reserved. Reserved
2499              # field names are forbidden except in certain documented contexts. The map
2500              # keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
2501              # empty.
2502              #
2503              # Field paths may be used in other contexts to refer to structured fields
2504              # defined here. For `map_value`, the field path is represented by the simple
2505              # or quoted field names of the containing fields, delimited by `.`. For
2506              # example, the structured field
2507              # `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
2508              # represented by the field path `foo.x&y`.
2509              #
2510              # Within a field path, a quoted field name starts and ends with `` ` `` and
2511              # may contain any character. Some characters, including `` ` ``, must be
2512              # escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
2513              # `` `bak\`tik` `` represents `` bak`tik ``.
2514            "a_key": { # A message that can hold any of the supported value types.
2515              "bytesValue": "A String", # A bytes value.
2516                  #
2517                  # Must not exceed 1 MiB - 89 bytes.
2518                  # Only the first 1,500 bytes are considered by queries.
2519              "timestampValue": "A String", # A timestamp value.
2520                  #
2521                  # Precise only to microseconds. When stored, any additional precision is
2522                  # rounded down.
2523              "nullValue": "A String", # A null value.
2524              "referenceValue": "A String", # A reference to a document. For example:
2525                  # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
2526              "doubleValue": 3.14, # A double value.
2527              "mapValue": { # A map value. # A map value.
2528                "fields": { # The map's fields.
2529                    #
2530                    # The map keys represent field names. Field names matching the regular
2531                    # expression `__.*__` are reserved. Reserved field names are forbidden except
2532                    # in certain documented contexts. The map keys, represented as UTF-8, must
2533                    # not exceed 1,500 bytes and cannot be empty.
2534                  "a_key": # Object with schema name: Value
2535                },
2536              },
2537              "stringValue": "A String", # A string value.
2538                  #
2539                  # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
2540                  # Only the first 1,500 bytes of the UTF-8 representation are considered by
2541                  # queries.
2542              "booleanValue": True or False, # A boolean value.
2543              "arrayValue": { # An array value. # An array value.
2544                  #
2545                  # Cannot directly contain another array value, though can contain an
2546                  # map which contains another array.
2547                "values": [ # Values in the array.
2548                  # Object with schema name: Value
2549                ],
2550              },
2551              "integerValue": "A String", # An integer value.
2552              "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
2553                  # of doubles representing degrees latitude and degrees longitude. Unless
2554                  # specified otherwise, this must conform to the
2555                  # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
2556                  # standard</a>. Values must be within normalized ranges.
2557                "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
2558                "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
2559              },
2560            },
2561          },
2562          "updateTime": "A String", # Output only. The time at which the document was last changed.
2563              #
2564              # This value is initially set to the `create_time` then increases
2565              # monotonically with each change to the document. It can also be
2566              # compared to values from other documents and the `read_time` of a query.
2567          "createTime": "A String", # Output only. The time at which the document was created.
2568              #
2569              # This value increases monotonically when a document is deleted then
2570              # recreated. It can also be compared to values from other documents and
2571              # the `read_time` of a query.
2572          "name": "A String", # The resource name of the document, for example
2573              # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
2574        },
2575        "currentDocument": { # A precondition on a document, used for conditional operations. # An optional precondition on the document.
2576            #
2577            # The write will fail if this is set and not met by the target document.
2578          "updateTime": "A String", # When set, the target document must exist and have been last updated at
2579              # that time.
2580          "exists": True or False, # When set to `true`, the target document must exist.
2581              # When set to `false`, the target document must not exist.
2582        },
2583        "transform": { # A transformation of a document. # Applies a transformation to a document.
2584            # At most one `transform` per document is allowed in a given request.
2585            # An `update` cannot follow a `transform` on the same document in a given
2586            # request.
2587          "document": "A String", # The name of the document to transform.
2588          "fieldTransforms": [ # The list of transformations to apply to the fields of the document, in
2589              # order.
2590              # This must not be empty.
2591            { # A transformation of a field of the document.
2592              "setToServerValue": "A String", # Sets the field to the given server value.
2593              "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.
2594                  #
2595                  # This must be an integer or a double value.
2596                  # If the field is not an integer or double, or if the field does not yet
2597                  # exist, the transformation will set the field to the given value.
2598                  # If a maximum operation is applied where the field and the input value
2599                  # are of mixed types (that is - one is an integer and one is a double)
2600                  # the field takes on the type of the larger operand. If the operands are
2601                  # equivalent (e.g. 3 and 3.0), the field does not change.
2602                  # 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and
2603                  # zero input value is always the stored value.
2604                  # The maximum of any numeric value x and NaN is NaN.
2605                "bytesValue": "A String", # A bytes value.
2606                    #
2607                    # Must not exceed 1 MiB - 89 bytes.
2608                    # Only the first 1,500 bytes are considered by queries.
2609                "timestampValue": "A String", # A timestamp value.
2610                    #
2611                    # Precise only to microseconds. When stored, any additional precision is
2612                    # rounded down.
2613                "nullValue": "A String", # A null value.
2614                "referenceValue": "A String", # A reference to a document. For example:
2615                    # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
2616                "doubleValue": 3.14, # A double value.
2617                "mapValue": { # A map value. # A map value.
2618                  "fields": { # The map's fields.
2619                      #
2620                      # The map keys represent field names. Field names matching the regular
2621                      # expression `__.*__` are reserved. Reserved field names are forbidden except
2622                      # in certain documented contexts. The map keys, represented as UTF-8, must
2623                      # not exceed 1,500 bytes and cannot be empty.
2624                    "a_key": # Object with schema name: Value
2625                  },
2626                },
2627                "stringValue": "A String", # A string value.
2628                    #
2629                    # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
2630                    # Only the first 1,500 bytes of the UTF-8 representation are considered by
2631                    # queries.
2632                "booleanValue": True or False, # A boolean value.
2633                "arrayValue": { # An array value. # An array value.
2634                    #
2635                    # Cannot directly contain another array value, though can contain an
2636                    # map which contains another array.
2637                  "values": [ # Values in the array.
2638                    # Object with schema name: Value
2639                  ],
2640                },
2641                "integerValue": "A String", # An integer value.
2642                "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
2643                    # of doubles representing degrees latitude and degrees longitude. Unless
2644                    # specified otherwise, this must conform to the
2645                    # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
2646                    # standard</a>. Values must be within normalized ranges.
2647                  "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
2648                  "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
2649                },
2650              },
2651              "increment": { # A message that can hold any of the supported value types. # Adds the given value to the field's current value.
2652                  #
2653                  # This must be an integer or a double value.
2654                  # If the field is not an integer or double, or if the field does not yet
2655                  # exist, the transformation will set the field to the given value.
2656                  # If either of the given value or the current field value are doubles,
2657                  # both values will be interpreted as doubles. Double arithmetic and
2658                  # representation of double values follow IEEE 754 semantics.
2659                  # If there is positive/negative integer overflow, the field is resolved
2660                  # to the largest magnitude positive/negative integer.
2661                "bytesValue": "A String", # A bytes value.
2662                    #
2663                    # Must not exceed 1 MiB - 89 bytes.
2664                    # Only the first 1,500 bytes are considered by queries.
2665                "timestampValue": "A String", # A timestamp value.
2666                    #
2667                    # Precise only to microseconds. When stored, any additional precision is
2668                    # rounded down.
2669                "nullValue": "A String", # A null value.
2670                "referenceValue": "A String", # A reference to a document. For example:
2671                    # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
2672                "doubleValue": 3.14, # A double value.
2673                "mapValue": { # A map value. # A map value.
2674                  "fields": { # The map's fields.
2675                      #
2676                      # The map keys represent field names. Field names matching the regular
2677                      # expression `__.*__` are reserved. Reserved field names are forbidden except
2678                      # in certain documented contexts. The map keys, represented as UTF-8, must
2679                      # not exceed 1,500 bytes and cannot be empty.
2680                    "a_key": # Object with schema name: Value
2681                  },
2682                },
2683                "stringValue": "A String", # A string value.
2684                    #
2685                    # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
2686                    # Only the first 1,500 bytes of the UTF-8 representation are considered by
2687                    # queries.
2688                "booleanValue": True or False, # A boolean value.
2689                "arrayValue": { # An array value. # An array value.
2690                    #
2691                    # Cannot directly contain another array value, though can contain an
2692                    # map which contains another array.
2693                  "values": [ # Values in the array.
2694                    # Object with schema name: Value
2695                  ],
2696                },
2697                "integerValue": "A String", # An integer value.
2698                "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
2699                    # of doubles representing degrees latitude and degrees longitude. Unless
2700                    # specified otherwise, this must conform to the
2701                    # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
2702                    # standard</a>. Values must be within normalized ranges.
2703                  "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
2704                  "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
2705                },
2706              },
2707              "fieldPath": "A String", # The path of the field. See Document.fields for the field path syntax
2708                  # reference.
2709              "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.
2710                  #
2711                  # This must be an integer or a double value.
2712                  # If the field is not an integer or double, or if the field does not yet
2713                  # exist, the transformation will set the field to the input value.
2714                  # If a minimum operation is applied where the field and the input value
2715                  # are of mixed types (that is - one is an integer and one is a double)
2716                  # the field takes on the type of the smaller operand. If the operands are
2717                  # equivalent (e.g. 3 and 3.0), the field does not change.
2718                  # 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and
2719                  # zero input value is always the stored value.
2720                  # The minimum of any numeric value x and NaN is NaN.
2721                "bytesValue": "A String", # A bytes value.
2722                    #
2723                    # Must not exceed 1 MiB - 89 bytes.
2724                    # Only the first 1,500 bytes are considered by queries.
2725                "timestampValue": "A String", # A timestamp value.
2726                    #
2727                    # Precise only to microseconds. When stored, any additional precision is
2728                    # rounded down.
2729                "nullValue": "A String", # A null value.
2730                "referenceValue": "A String", # A reference to a document. For example:
2731                    # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
2732                "doubleValue": 3.14, # A double value.
2733                "mapValue": { # A map value. # A map value.
2734                  "fields": { # The map's fields.
2735                      #
2736                      # The map keys represent field names. Field names matching the regular
2737                      # expression `__.*__` are reserved. Reserved field names are forbidden except
2738                      # in certain documented contexts. The map keys, represented as UTF-8, must
2739                      # not exceed 1,500 bytes and cannot be empty.
2740                    "a_key": # Object with schema name: Value
2741                  },
2742                },
2743                "stringValue": "A String", # A string value.
2744                    #
2745                    # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
2746                    # Only the first 1,500 bytes of the UTF-8 representation are considered by
2747                    # queries.
2748                "booleanValue": True or False, # A boolean value.
2749                "arrayValue": { # An array value. # An array value.
2750                    #
2751                    # Cannot directly contain another array value, though can contain an
2752                    # map which contains another array.
2753                  "values": [ # Values in the array.
2754                    # Object with schema name: Value
2755                  ],
2756                },
2757                "integerValue": "A String", # An integer value.
2758                "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
2759                    # of doubles representing degrees latitude and degrees longitude. Unless
2760                    # specified otherwise, this must conform to the
2761                    # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
2762                    # standard</a>. Values must be within normalized ranges.
2763                  "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
2764                  "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
2765                },
2766              },
2767              "appendMissingElements": { # An array value. # Append the given elements in order if they are not already present in
2768                  # the current field value.
2769                  # If the field is not an array, or if the field does not yet exist, it is
2770                  # first set to the empty array.
2771                  #
2772                  # Equivalent numbers of different types (e.g. 3L and 3.0) are
2773                  # considered equal when checking if a value is missing.
2774                  # NaN is equal to NaN, and Null is equal to Null.
2775                  # If the input contains multiple equivalent values, only the first will
2776                  # be considered.
2777                  #
2778                  # The corresponding transform_result will be the null value.
2779                "values": [ # Values in the array.
2780                  # Object with schema name: Value
2781                ],
2782              },
2783              "removeAllFromArray": { # An array value. # Remove all of the given elements from the array in the field.
2784                  # If the field is not an array, or if the field does not yet exist, it is
2785                  # set to the empty array.
2786                  #
2787                  # Equivalent numbers of the different types (e.g. 3L and 3.0) are
2788                  # considered equal when deciding whether an element should be removed.
2789                  # NaN is equal to NaN, and Null is equal to Null.
2790                  # This will remove all equivalent values if there are duplicates.
2791                  #
2792                  # The corresponding transform_result will be the null value.
2793                "values": [ # Values in the array.
2794                  # Object with schema name: Value
2795                ],
2796              },
2797            },
2798          ],
2799        },
2800      },
2801    ],
2802    "labels": { # Labels associated with this write request.
2803      "a_key": "A String",
2804    },
2805    "streamToken": "A String", # A stream token that was previously sent by the server.
2806        #
2807        # The client should set this field to the token from the most recent
2808        # WriteResponse it has received. This acknowledges that the client has
2809        # received responses up to this token. After sending this token, earlier
2810        # tokens may not be used anymore.
2811        #
2812        # The server may close the stream if there are too many unacknowledged
2813        # responses.
2814        #
2815        # Leave this field unset when creating a new stream. To resume a stream at
2816        # a specific point, set this field and the `stream_id` field.
2817        #
2818        # Leave this field unset when creating a new stream.
2819    "streamId": "A String", # The ID of the write stream to resume.
2820        # This may only be set in the first message. When left empty, a new write
2821        # stream will be created.
2822  }
2823
2824  x__xgafv: string, V1 error format.
2825    Allowed values
2826      1 - v1 error format
2827      2 - v2 error format
2828
2829Returns:
2830  An object of the form:
2831
2832    { # The response for Firestore.Write.
2833    "writeResults": [ # The result of applying the writes.
2834        #
2835        # This i-th write result corresponds to the i-th write in the
2836        # request.
2837      { # The result of applying a write.
2838        "updateTime": "A String", # The last update time of the document after applying the write. Not set
2839            # after a `delete`.
2840            #
2841            # If the write did not actually change the document, this will be the
2842            # previous update_time.
2843        "transformResults": [ # The results of applying each DocumentTransform.FieldTransform, in the
2844            # same order.
2845          { # A message that can hold any of the supported value types.
2846            "bytesValue": "A String", # A bytes value.
2847                #
2848                # Must not exceed 1 MiB - 89 bytes.
2849                # Only the first 1,500 bytes are considered by queries.
2850            "timestampValue": "A String", # A timestamp value.
2851                #
2852                # Precise only to microseconds. When stored, any additional precision is
2853                # rounded down.
2854            "nullValue": "A String", # A null value.
2855            "referenceValue": "A String", # A reference to a document. For example:
2856                # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
2857            "doubleValue": 3.14, # A double value.
2858            "mapValue": { # A map value. # A map value.
2859              "fields": { # The map's fields.
2860                  #
2861                  # The map keys represent field names. Field names matching the regular
2862                  # expression `__.*__` are reserved. Reserved field names are forbidden except
2863                  # in certain documented contexts. The map keys, represented as UTF-8, must
2864                  # not exceed 1,500 bytes and cannot be empty.
2865                "a_key": # Object with schema name: Value
2866              },
2867            },
2868            "stringValue": "A String", # A string value.
2869                #
2870                # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
2871                # Only the first 1,500 bytes of the UTF-8 representation are considered by
2872                # queries.
2873            "booleanValue": True or False, # A boolean value.
2874            "arrayValue": { # An array value. # An array value.
2875                #
2876                # Cannot directly contain another array value, though can contain an
2877                # map which contains another array.
2878              "values": [ # Values in the array.
2879                # Object with schema name: Value
2880              ],
2881            },
2882            "integerValue": "A String", # An integer value.
2883            "geoPointValue": { # An object representing a latitude/longitude pair. This is expressed as a pair # A geo point value representing a point on the surface of Earth.
2884                # of doubles representing degrees latitude and degrees longitude. Unless
2885                # specified otherwise, this must conform to the
2886                # <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
2887                # standard</a>. Values must be within normalized ranges.
2888              "latitude": 3.14, # The latitude in degrees. It must be in the range [-90.0, +90.0].
2889              "longitude": 3.14, # The longitude in degrees. It must be in the range [-180.0, +180.0].
2890            },
2891          },
2892        ],
2893      },
2894    ],
2895    "streamToken": "A String", # A token that represents the position of this response in the stream.
2896        # This can be used by a client to resume the stream at this point.
2897        #
2898        # This field is always set.
2899    "commitTime": "A String", # The time at which the commit occurred.
2900    "streamId": "A String", # The ID of the stream.
2901        # Only set on the first message, when a new stream was created.
2902  }</pre>
2903</div>
2904
2905</body></html>