google-cloud-firestore-v1 0.8.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,7 +21,8 @@ module Google
21
21
  module Cloud
22
22
  module Firestore
23
23
  module V1
24
- # The request for {::Google::Cloud::Firestore::V1::Firestore::Client#get_document Firestore.GetDocument}.
24
+ # The request for
25
+ # {::Google::Cloud::Firestore::V1::Firestore::Client#get_document Firestore.GetDocument}.
25
26
  # @!attribute [rw] name
26
27
  # @return [::String]
27
28
  # Required. The resource name of the Document to get. In the format:
@@ -44,68 +45,93 @@ module Google
44
45
  extend ::Google::Protobuf::MessageExts::ClassMethods
45
46
  end
46
47
 
47
- # The request for {::Google::Cloud::Firestore::V1::Firestore::Client#list_documents Firestore.ListDocuments}.
48
+ # The request for
49
+ # {::Google::Cloud::Firestore::V1::Firestore::Client#list_documents Firestore.ListDocuments}.
48
50
  # @!attribute [rw] parent
49
51
  # @return [::String]
50
52
  # Required. The parent resource name. In the format:
51
53
  # `projects/{project_id}/databases/{database_id}/documents` or
52
54
  # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
55
+ #
53
56
  # For example:
54
57
  # `projects/my-project/databases/my-database/documents` or
55
58
  # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
56
59
  # @!attribute [rw] collection_id
57
60
  # @return [::String]
58
- # Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`
59
- # or `messages`.
61
+ # Optional. The collection ID, relative to `parent`, to list.
62
+ #
63
+ # For example: `chatrooms` or `messages`.
64
+ #
65
+ # This is optional, and when not provided, Firestore will list documents
66
+ # from all collections under the provided `parent`.
60
67
  # @!attribute [rw] page_size
61
68
  # @return [::Integer]
62
- # The maximum number of documents to return.
69
+ # Optional. The maximum number of documents to return in a single response.
70
+ #
71
+ # Firestore may return fewer than this value.
63
72
  # @!attribute [rw] page_token
64
73
  # @return [::String]
65
- # The `next_page_token` value returned from a previous List request, if any.
74
+ # Optional. A page token, received from a previous `ListDocuments` response.
75
+ #
76
+ # Provide this to retrieve the subsequent page. When paginating, all other
77
+ # parameters (with the exception of `page_size`) must match the values set
78
+ # in the request that generated the page token.
66
79
  # @!attribute [rw] order_by
67
80
  # @return [::String]
68
- # The order to sort results by. For example: `priority desc, name`.
81
+ # Optional. The optional ordering of the documents to return.
82
+ #
83
+ # For example: `priority desc, __name__ desc`.
84
+ #
85
+ # This mirrors the {::Google::Cloud::Firestore::V1::StructuredQuery#order_by `ORDER BY`}
86
+ # used in Firestore queries but in a string representation. When absent,
87
+ # documents are ordered based on `__name__ ASC`.
69
88
  # @!attribute [rw] mask
70
89
  # @return [::Google::Cloud::Firestore::V1::DocumentMask]
71
- # The fields to return. If not set, returns all fields.
90
+ # Optional. The fields to return. If not set, returns all fields.
72
91
  #
73
92
  # If a document has a field that is not present in this mask, that field
74
93
  # will not be returned in the response.
75
94
  # @!attribute [rw] transaction
76
95
  # @return [::String]
77
- # Reads documents in a transaction.
96
+ # Perform the read as part of an already active transaction.
78
97
  # @!attribute [rw] read_time
79
98
  # @return [::Google::Protobuf::Timestamp]
80
- # Reads documents as they were at the given time.
99
+ # Perform the read at the provided time.
100
+ #
81
101
  # This may not be older than 270 seconds.
82
102
  # @!attribute [rw] show_missing
83
103
  # @return [::Boolean]
84
- # If the list should show missing documents. A missing document is a
85
- # document that does not exist but has sub-documents. These documents will
86
- # be returned with a key but will not have fields, {::Google::Cloud::Firestore::V1::Document#create_time Document.create_time},
87
- # or {::Google::Cloud::Firestore::V1::Document#update_time Document.update_time} set.
104
+ # If the list should show missing documents.
105
+ #
106
+ # A document is missing if it does not exist, but there are sub-documents
107
+ # nested underneath it. When true, such missing documents will be returned
108
+ # with a key but will not have fields,
109
+ # {::Google::Cloud::Firestore::V1::Document#create_time `create_time`}, or
110
+ # {::Google::Cloud::Firestore::V1::Document#update_time `update_time`} set.
88
111
  #
89
- # Requests with `show_missing` may not specify `where` or
90
- # `order_by`.
112
+ # Requests with `show_missing` may not specify `where` or `order_by`.
91
113
  class ListDocumentsRequest
92
114
  include ::Google::Protobuf::MessageExts
93
115
  extend ::Google::Protobuf::MessageExts::ClassMethods
94
116
  end
95
117
 
96
- # The response for {::Google::Cloud::Firestore::V1::Firestore::Client#list_documents Firestore.ListDocuments}.
118
+ # The response for
119
+ # {::Google::Cloud::Firestore::V1::Firestore::Client#list_documents Firestore.ListDocuments}.
97
120
  # @!attribute [rw] documents
98
121
  # @return [::Array<::Google::Cloud::Firestore::V1::Document>]
99
122
  # The Documents found.
100
123
  # @!attribute [rw] next_page_token
101
124
  # @return [::String]
102
- # The next page token.
125
+ # A token to retrieve the next page of documents.
126
+ #
127
+ # If this field is omitted, there are no subsequent pages.
103
128
  class ListDocumentsResponse
104
129
  include ::Google::Protobuf::MessageExts
105
130
  extend ::Google::Protobuf::MessageExts::ClassMethods
106
131
  end
107
132
 
108
- # The request for {::Google::Cloud::Firestore::V1::Firestore::Client#create_document Firestore.CreateDocument}.
133
+ # The request for
134
+ # {::Google::Cloud::Firestore::V1::Firestore::Client#create_document Firestore.CreateDocument}.
109
135
  # @!attribute [rw] parent
110
136
  # @return [::String]
111
137
  # Required. The parent resource. For example:
@@ -113,7 +139,8 @@ module Google
113
139
  # `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`
114
140
  # @!attribute [rw] collection_id
115
141
  # @return [::String]
116
- # Required. The collection ID, relative to `parent`, to list. For example: `chatrooms`.
142
+ # Required. The collection ID, relative to `parent`, to list. For example:
143
+ # `chatrooms`.
117
144
  # @!attribute [rw] document_id
118
145
  # @return [::String]
119
146
  # The client-assigned document ID to use for this document.
@@ -133,7 +160,8 @@ module Google
133
160
  extend ::Google::Protobuf::MessageExts::ClassMethods
134
161
  end
135
162
 
136
- # The request for {::Google::Cloud::Firestore::V1::Firestore::Client#update_document Firestore.UpdateDocument}.
163
+ # The request for
164
+ # {::Google::Cloud::Firestore::V1::Firestore::Client#update_document Firestore.UpdateDocument}.
137
165
  # @!attribute [rw] document
138
166
  # @return [::Google::Cloud::Firestore::V1::Document]
139
167
  # Required. The updated document.
@@ -162,7 +190,8 @@ module Google
162
190
  extend ::Google::Protobuf::MessageExts::ClassMethods
163
191
  end
164
192
 
165
- # The request for {::Google::Cloud::Firestore::V1::Firestore::Client#delete_document Firestore.DeleteDocument}.
193
+ # The request for
194
+ # {::Google::Cloud::Firestore::V1::Firestore::Client#delete_document Firestore.DeleteDocument}.
166
195
  # @!attribute [rw] name
167
196
  # @return [::String]
168
197
  # Required. The resource name of the Document to delete. In the format:
@@ -176,7 +205,8 @@ module Google
176
205
  extend ::Google::Protobuf::MessageExts::ClassMethods
177
206
  end
178
207
 
179
- # The request for {::Google::Cloud::Firestore::V1::Firestore::Client#batch_get_documents Firestore.BatchGetDocuments}.
208
+ # The request for
209
+ # {::Google::Cloud::Firestore::V1::Firestore::Client#batch_get_documents Firestore.BatchGetDocuments}.
180
210
  # @!attribute [rw] database
181
211
  # @return [::String]
182
212
  # Required. The database name. In the format:
@@ -211,7 +241,8 @@ module Google
211
241
  extend ::Google::Protobuf::MessageExts::ClassMethods
212
242
  end
213
243
 
214
- # The streamed response for {::Google::Cloud::Firestore::V1::Firestore::Client#batch_get_documents Firestore.BatchGetDocuments}.
244
+ # The streamed response for
245
+ # {::Google::Cloud::Firestore::V1::Firestore::Client#batch_get_documents Firestore.BatchGetDocuments}.
215
246
  # @!attribute [rw] found
216
247
  # @return [::Google::Cloud::Firestore::V1::Document]
217
248
  # A document that was requested.
@@ -223,7 +254,8 @@ module Google
223
254
  # @return [::String]
224
255
  # The transaction that was started as part of this request.
225
256
  # Will only be set in the first response, and only if
226
- # {::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest#new_transaction BatchGetDocumentsRequest.new_transaction} was set in the request.
257
+ # {::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest#new_transaction BatchGetDocumentsRequest.new_transaction}
258
+ # was set in the request.
227
259
  # @!attribute [rw] read_time
228
260
  # @return [::Google::Protobuf::Timestamp]
229
261
  # The time at which the document was read.
@@ -235,7 +267,8 @@ module Google
235
267
  extend ::Google::Protobuf::MessageExts::ClassMethods
236
268
  end
237
269
 
238
- # The request for {::Google::Cloud::Firestore::V1::Firestore::Client#begin_transaction Firestore.BeginTransaction}.
270
+ # The request for
271
+ # {::Google::Cloud::Firestore::V1::Firestore::Client#begin_transaction Firestore.BeginTransaction}.
239
272
  # @!attribute [rw] database
240
273
  # @return [::String]
241
274
  # Required. The database name. In the format:
@@ -249,7 +282,8 @@ module Google
249
282
  extend ::Google::Protobuf::MessageExts::ClassMethods
250
283
  end
251
284
 
252
- # The response for {::Google::Cloud::Firestore::V1::Firestore::Client#begin_transaction Firestore.BeginTransaction}.
285
+ # The response for
286
+ # {::Google::Cloud::Firestore::V1::Firestore::Client#begin_transaction Firestore.BeginTransaction}.
253
287
  # @!attribute [rw] transaction
254
288
  # @return [::String]
255
289
  # The transaction that was started.
@@ -337,13 +371,15 @@ module Google
337
371
  extend ::Google::Protobuf::MessageExts::ClassMethods
338
372
  end
339
373
 
340
- # The response for {::Google::Cloud::Firestore::V1::Firestore::Client#run_query Firestore.RunQuery}.
374
+ # The response for
375
+ # {::Google::Cloud::Firestore::V1::Firestore::Client#run_query Firestore.RunQuery}.
341
376
  # @!attribute [rw] transaction
342
377
  # @return [::String]
343
378
  # The transaction that was started as part of this request.
344
379
  # Can only be set in the first response, and only if
345
- # {::Google::Cloud::Firestore::V1::RunQueryRequest#new_transaction RunQueryRequest.new_transaction} was set in the request.
346
- # If set, no other fields will be set in this response.
380
+ # {::Google::Cloud::Firestore::V1::RunQueryRequest#new_transaction RunQueryRequest.new_transaction}
381
+ # was set in the request. If set, no other fields will be set in this
382
+ # response.
347
383
  # @!attribute [rw] document
348
384
  # @return [::Google::Cloud::Firestore::V1::Document]
349
385
  # A query result, not set when reporting partial progress.
@@ -369,7 +405,8 @@ module Google
369
405
  extend ::Google::Protobuf::MessageExts::ClassMethods
370
406
  end
371
407
 
372
- # The request for {::Google::Cloud::Firestore::V1::Firestore::Client#run_aggregation_query Firestore.RunAggregationQuery}.
408
+ # The request for
409
+ # {::Google::Cloud::Firestore::V1::Firestore::Client#run_aggregation_query Firestore.RunAggregationQuery}.
373
410
  # @!attribute [rw] parent
374
411
  # @return [::String]
375
412
  # Required. The parent resource name. In the format:
@@ -404,7 +441,8 @@ module Google
404
441
  extend ::Google::Protobuf::MessageExts::ClassMethods
405
442
  end
406
443
 
407
- # The response for {::Google::Cloud::Firestore::V1::Firestore::Client#run_aggregation_query Firestore.RunAggregationQuery}.
444
+ # The response for
445
+ # {::Google::Cloud::Firestore::V1::Firestore::Client#run_aggregation_query Firestore.RunAggregationQuery}.
408
446
  # @!attribute [rw] result
409
447
  # @return [::Google::Cloud::Firestore::V1::AggregationResult]
410
448
  # A single aggregation result.
@@ -424,7 +462,8 @@ module Google
424
462
  extend ::Google::Protobuf::MessageExts::ClassMethods
425
463
  end
426
464
 
427
- # The request for {::Google::Cloud::Firestore::V1::Firestore::Client#partition_query Firestore.PartitionQuery}.
465
+ # The request for
466
+ # {::Google::Cloud::Firestore::V1::Firestore::Client#partition_query Firestore.PartitionQuery}.
428
467
  # @!attribute [rw] parent
429
468
  # @return [::String]
430
469
  # Required. The parent resource name. In the format:
@@ -480,7 +519,8 @@ module Google
480
519
  extend ::Google::Protobuf::MessageExts::ClassMethods
481
520
  end
482
521
 
483
- # The response for {::Google::Cloud::Firestore::V1::Firestore::Client#partition_query Firestore.PartitionQuery}.
522
+ # The response for
523
+ # {::Google::Cloud::Firestore::V1::Firestore::Client#partition_query Firestore.PartitionQuery}.
484
524
  # @!attribute [rw] partitions
485
525
  # @return [::Array<::Google::Cloud::Firestore::V1::Cursor>]
486
526
  # Partition results.
@@ -543,9 +583,9 @@ module Google
543
583
  # A stream token that was previously sent by the server.
544
584
  #
545
585
  # The client should set this field to the token from the most recent
546
- # {::Google::Cloud::Firestore::V1::WriteResponse WriteResponse} it has received. This acknowledges that the client has
547
- # received responses up to this token. After sending this token, earlier
548
- # tokens may not be used anymore.
586
+ # {::Google::Cloud::Firestore::V1::WriteResponse WriteResponse} it has received. This
587
+ # acknowledges that the client has received responses up to this token. After
588
+ # sending this token, earlier tokens may not be used anymore.
549
589
  #
550
590
  # The server may close the stream if there are too many unacknowledged
551
591
  # responses.
@@ -637,8 +677,8 @@ module Google
637
677
  # A {::Google::Cloud::Firestore::V1::Document Document} has been deleted.
638
678
  # @!attribute [rw] document_remove
639
679
  # @return [::Google::Cloud::Firestore::V1::DocumentRemove]
640
- # A {::Google::Cloud::Firestore::V1::Document Document} has been removed from a target (because it is no longer
641
- # relevant to that target).
680
+ # A {::Google::Cloud::Firestore::V1::Document Document} has been removed from a target
681
+ # (because it is no longer relevant to that target).
642
682
  # @!attribute [rw] filter
643
683
  # @return [::Google::Cloud::Firestore::V1::ExistenceFilter]
644
684
  # A filter to apply to the set of documents previously returned for the
@@ -660,7 +700,8 @@ module Google
660
700
  # A target specified by a set of document names.
661
701
  # @!attribute [rw] resume_token
662
702
  # @return [::String]
663
- # A resume token from a prior {::Google::Cloud::Firestore::V1::TargetChange TargetChange} for an identical target.
703
+ # A resume token from a prior
704
+ # {::Google::Cloud::Firestore::V1::TargetChange TargetChange} for an identical target.
664
705
  #
665
706
  # Using a resume token with a different target is unsupported and may fail.
666
707
  # @!attribute [rw] read_time
@@ -775,7 +816,8 @@ module Google
775
816
  end
776
817
  end
777
818
 
778
- # The request for {::Google::Cloud::Firestore::V1::Firestore::Client#list_collection_ids Firestore.ListCollectionIds}.
819
+ # The request for
820
+ # {::Google::Cloud::Firestore::V1::Firestore::Client#list_collection_ids Firestore.ListCollectionIds}.
779
821
  # @!attribute [rw] parent
780
822
  # @return [::String]
781
823
  # Required. The parent document. In the format:
@@ -798,7 +840,8 @@ module Google
798
840
  extend ::Google::Protobuf::MessageExts::ClassMethods
799
841
  end
800
842
 
801
- # The response from {::Google::Cloud::Firestore::V1::Firestore::Client#list_collection_ids Firestore.ListCollectionIds}.
843
+ # The response from
844
+ # {::Google::Cloud::Firestore::V1::Firestore::Client#list_collection_ids Firestore.ListCollectionIds}.
802
845
  # @!attribute [rw] collection_ids
803
846
  # @return [::Array<::String>]
804
847
  # The collection ids.
@@ -810,7 +853,8 @@ module Google
810
853
  extend ::Google::Protobuf::MessageExts::ClassMethods
811
854
  end
812
855
 
813
- # The request for {::Google::Cloud::Firestore::V1::Firestore::Client#batch_write Firestore.BatchWrite}.
856
+ # The request for
857
+ # {::Google::Cloud::Firestore::V1::Firestore::Client#batch_write Firestore.BatchWrite}.
814
858
  # @!attribute [rw] database
815
859
  # @return [::String]
816
860
  # Required. The database name. In the format:
@@ -839,7 +883,8 @@ module Google
839
883
  end
840
884
  end
841
885
 
842
- # The response from {::Google::Cloud::Firestore::V1::Firestore::Client#batch_write Firestore.BatchWrite}.
886
+ # The response from
887
+ # {::Google::Cloud::Firestore::V1::Firestore::Client#batch_write Firestore.BatchWrite}.
843
888
  # @!attribute [rw] write_results
844
889
  # @return [::Array<::Google::Cloud::Firestore::V1::WriteResult>]
845
890
  # The result of applying the writes.
@@ -172,6 +172,9 @@ module Google
172
172
 
173
173
  # Documents are required to satisfy all of the combined filters.
174
174
  AND = 1
175
+
176
+ # Documents are required to satisfy at least one of the combined filters.
177
+ OR = 2
175
178
  end
176
179
  end
177
180
 
@@ -324,7 +327,8 @@ module Google
324
327
  #
325
328
  # Requires:
326
329
  #
327
- # * Conform to {::Google::Cloud::Firestore::V1::Document#fields document field name} limitations.
330
+ # * Conform to {::Google::Cloud::Firestore::V1::Document#fields document field name}
331
+ # limitations.
328
332
  class FieldReference
329
333
  include ::Google::Protobuf::MessageExts
330
334
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -355,13 +359,15 @@ module Google
355
359
  end
356
360
  end
357
361
 
358
- # Firestore query for running an aggregation over a {::Google::Cloud::Firestore::V1::StructuredQuery StructuredQuery}.
362
+ # Firestore query for running an aggregation over a
363
+ # {::Google::Cloud::Firestore::V1::StructuredQuery StructuredQuery}.
359
364
  # @!attribute [rw] structured_query
360
365
  # @return [::Google::Cloud::Firestore::V1::StructuredQuery]
361
366
  # Nested structured query.
362
367
  # @!attribute [rw] aggregations
363
368
  # @return [::Array<::Google::Cloud::Firestore::V1::StructuredAggregationQuery::Aggregation>]
364
- # Optional. Series of aggregations to apply over the results of the `structured_query`.
369
+ # Optional. Series of aggregations to apply over the results of the
370
+ # `structured_query`.
365
371
  #
366
372
  # Requires:
367
373
  #
@@ -376,7 +382,8 @@ module Google
376
382
  # Count aggregator.
377
383
  # @!attribute [rw] alias
378
384
  # @return [::String]
379
- # Optional. Optional name of the field to store the result of the aggregation into.
385
+ # Optional. Optional name of the field to store the result of the
386
+ # aggregation into.
380
387
  #
381
388
  # If not provided, Firestore will pick a default name following the format
382
389
  # `field_<incremental_id++>`. For example:
@@ -408,7 +415,8 @@ module Google
408
415
  # Requires:
409
416
  #
410
417
  # * Must be unique across all aggregation aliases.
411
- # * Conform to {::Google::Cloud::Firestore::V1::Document#fields document field name} limitations.
418
+ # * Conform to {::Google::Cloud::Firestore::V1::Document#fields document field name}
419
+ # limitations.
412
420
  class Aggregation
413
421
  include ::Google::Protobuf::MessageExts
414
422
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -419,7 +427,8 @@ module Google
419
427
  # so it does not require a field reference.
420
428
  # @!attribute [rw] up_to
421
429
  # @return [::Google::Protobuf::Int64Value]
422
- # Optional. Optional constraint on the maximum number of documents to count.
430
+ # Optional. Optional constraint on the maximum number of documents to
431
+ # count.
423
432
  #
424
433
  # This provides a way to set an upper bound on the number of documents
425
434
  # to scan, limiting latency and cost.
@@ -77,8 +77,9 @@ module Google
77
77
  # A transformation of a field of the document.
78
78
  # @!attribute [rw] field_path
79
79
  # @return [::String]
80
- # The path of the field. See {::Google::Cloud::Firestore::V1::Document#fields Document.fields} for the field path syntax
81
- # reference.
80
+ # The path of the field. See
81
+ # {::Google::Cloud::Firestore::V1::Document#fields Document.fields} for the field path
82
+ # syntax reference.
82
83
  # @!attribute [rw] set_to_server_value
83
84
  # @return [::Google::Cloud::Firestore::V1::DocumentTransform::FieldTransform::ServerValue]
84
85
  # Sets the field to the given server value.
@@ -175,8 +176,9 @@ module Google
175
176
  # previous update_time.
176
177
  # @!attribute [rw] transform_results
177
178
  # @return [::Array<::Google::Cloud::Firestore::V1::Value>]
178
- # The results of applying each {::Google::Cloud::Firestore::V1::DocumentTransform::FieldTransform DocumentTransform.FieldTransform}, in the
179
- # same order.
179
+ # The results of applying each
180
+ # {::Google::Cloud::Firestore::V1::DocumentTransform::FieldTransform DocumentTransform.FieldTransform},
181
+ # in the same order.
180
182
  class WriteResult
181
183
  include ::Google::Protobuf::MessageExts
182
184
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -184,11 +186,12 @@ module Google
184
186
 
185
187
  # A {::Google::Cloud::Firestore::V1::Document Document} has changed.
186
188
  #
187
- # May be the result of multiple {::Google::Cloud::Firestore::V1::Write writes}, including deletes, that
188
- # ultimately resulted in a new value for the {::Google::Cloud::Firestore::V1::Document Document}.
189
+ # May be the result of multiple {::Google::Cloud::Firestore::V1::Write writes}, including
190
+ # deletes, that ultimately resulted in a new value for the
191
+ # {::Google::Cloud::Firestore::V1::Document Document}.
189
192
  #
190
- # Multiple {::Google::Cloud::Firestore::V1::DocumentChange DocumentChange} messages may be returned for the same logical
191
- # change, if multiple targets are affected.
193
+ # Multiple {::Google::Cloud::Firestore::V1::DocumentChange DocumentChange} messages may be
194
+ # returned for the same logical change, if multiple targets are affected.
192
195
  # @!attribute [rw] document
193
196
  # @return [::Google::Cloud::Firestore::V1::Document]
194
197
  # The new state of the {::Google::Cloud::Firestore::V1::Document Document}.
@@ -207,14 +210,16 @@ module Google
207
210
 
208
211
  # A {::Google::Cloud::Firestore::V1::Document Document} has been deleted.
209
212
  #
210
- # May be the result of multiple {::Google::Cloud::Firestore::V1::Write writes}, including updates, the
211
- # last of which deleted the {::Google::Cloud::Firestore::V1::Document Document}.
213
+ # May be the result of multiple {::Google::Cloud::Firestore::V1::Write writes}, including
214
+ # updates, the last of which deleted the
215
+ # {::Google::Cloud::Firestore::V1::Document Document}.
212
216
  #
213
- # Multiple {::Google::Cloud::Firestore::V1::DocumentDelete DocumentDelete} messages may be returned for the same logical
214
- # delete, if multiple targets are affected.
217
+ # Multiple {::Google::Cloud::Firestore::V1::DocumentDelete DocumentDelete} messages may be
218
+ # returned for the same logical delete, if multiple targets are affected.
215
219
  # @!attribute [rw] document
216
220
  # @return [::String]
217
- # The resource name of the {::Google::Cloud::Firestore::V1::Document Document} that was deleted.
221
+ # The resource name of the {::Google::Cloud::Firestore::V1::Document Document} that was
222
+ # deleted.
218
223
  # @!attribute [rw] removed_target_ids
219
224
  # @return [::Array<::Integer>]
220
225
  # A set of target IDs for targets that previously matched this entity.
@@ -228,17 +233,20 @@ module Google
228
233
  extend ::Google::Protobuf::MessageExts::ClassMethods
229
234
  end
230
235
 
231
- # A {::Google::Cloud::Firestore::V1::Document Document} has been removed from the view of the targets.
236
+ # A {::Google::Cloud::Firestore::V1::Document Document} has been removed from the view of
237
+ # the targets.
232
238
  #
233
239
  # Sent if the document is no longer relevant to a target and is out of view.
234
240
  # Can be sent instead of a DocumentDelete or a DocumentChange if the server
235
241
  # can not send the new value of the document.
236
242
  #
237
- # Multiple {::Google::Cloud::Firestore::V1::DocumentRemove DocumentRemove} messages may be returned for the same logical
238
- # write or delete, if multiple targets are affected.
243
+ # Multiple {::Google::Cloud::Firestore::V1::DocumentRemove DocumentRemove} messages may be
244
+ # returned for the same logical write or delete, if multiple targets are
245
+ # affected.
239
246
  # @!attribute [rw] document
240
247
  # @return [::String]
241
- # The resource name of the {::Google::Cloud::Firestore::V1::Document Document} that has gone out of view.
248
+ # The resource name of the {::Google::Cloud::Firestore::V1::Document Document} that has
249
+ # gone out of view.
242
250
  # @!attribute [rw] removed_target_ids
243
251
  # @return [::Array<::Integer>]
244
252
  # A set of target IDs for targets that previously matched this document.
@@ -258,7 +266,8 @@ module Google
258
266
  # The target ID to which this filter applies.
259
267
  # @!attribute [rw] count
260
268
  # @return [::Integer]
261
- # The total count of documents that match {::Google::Cloud::Firestore::V1::ExistenceFilter#target_id target_id}.
269
+ # The total count of documents that match
270
+ # {::Google::Cloud::Firestore::V1::ExistenceFilter#target_id target_id}.
262
271
  #
263
272
  # If different from the count of documents in the client that match, the
264
273
  # client must manually determine which documents no longer match the target.
@@ -0,0 +1,98 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Protobuf
22
+ # A Duration represents a signed, fixed-length span of time represented
23
+ # as a count of seconds and fractions of seconds at nanosecond
24
+ # resolution. It is independent of any calendar and concepts like "day"
25
+ # or "month". It is related to Timestamp in that the difference between
26
+ # two Timestamp values is a Duration and it can be added or subtracted
27
+ # from a Timestamp. Range is approximately +-10,000 years.
28
+ #
29
+ # # Examples
30
+ #
31
+ # Example 1: Compute Duration from two Timestamps in pseudo code.
32
+ #
33
+ # Timestamp start = ...;
34
+ # Timestamp end = ...;
35
+ # Duration duration = ...;
36
+ #
37
+ # duration.seconds = end.seconds - start.seconds;
38
+ # duration.nanos = end.nanos - start.nanos;
39
+ #
40
+ # if (duration.seconds < 0 && duration.nanos > 0) {
41
+ # duration.seconds += 1;
42
+ # duration.nanos -= 1000000000;
43
+ # } else if (duration.seconds > 0 && duration.nanos < 0) {
44
+ # duration.seconds -= 1;
45
+ # duration.nanos += 1000000000;
46
+ # }
47
+ #
48
+ # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
49
+ #
50
+ # Timestamp start = ...;
51
+ # Duration duration = ...;
52
+ # Timestamp end = ...;
53
+ #
54
+ # end.seconds = start.seconds + duration.seconds;
55
+ # end.nanos = start.nanos + duration.nanos;
56
+ #
57
+ # if (end.nanos < 0) {
58
+ # end.seconds -= 1;
59
+ # end.nanos += 1000000000;
60
+ # } else if (end.nanos >= 1000000000) {
61
+ # end.seconds += 1;
62
+ # end.nanos -= 1000000000;
63
+ # }
64
+ #
65
+ # Example 3: Compute Duration from datetime.timedelta in Python.
66
+ #
67
+ # td = datetime.timedelta(days=3, minutes=10)
68
+ # duration = Duration()
69
+ # duration.FromTimedelta(td)
70
+ #
71
+ # # JSON Mapping
72
+ #
73
+ # In JSON format, the Duration type is encoded as a string rather than an
74
+ # object, where the string ends in the suffix "s" (indicating seconds) and
75
+ # is preceded by the number of seconds, with nanoseconds expressed as
76
+ # fractional seconds. For example, 3 seconds with 0 nanoseconds should be
77
+ # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
78
+ # be expressed in JSON format as "3.000000001s", and 3 seconds and 1
79
+ # microsecond should be expressed in JSON format as "3.000001s".
80
+ # @!attribute [rw] seconds
81
+ # @return [::Integer]
82
+ # Signed seconds of the span of time. Must be from -315,576,000,000
83
+ # to +315,576,000,000 inclusive. Note: these bounds are computed from:
84
+ # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
85
+ # @!attribute [rw] nanos
86
+ # @return [::Integer]
87
+ # Signed fractions of a second at nanosecond resolution of the span
88
+ # of time. Durations less than one second are represented with a 0
89
+ # `seconds` field and a positive or negative `nanos` field. For durations
90
+ # of one second or more, a non-zero value for the `nanos` field must be
91
+ # of the same sign as the `seconds` field. Must be from -999,999,999
92
+ # to +999,999,999 inclusive.
93
+ class Duration
94
+ include ::Google::Protobuf::MessageExts
95
+ extend ::Google::Protobuf::MessageExts::ClassMethods
96
+ end
97
+ end
98
+ end
@@ -28,12 +28,14 @@ module Google
28
28
  # [API Design Guide](https://cloud.google.com/apis/design/errors).
29
29
  # @!attribute [rw] code
30
30
  # @return [::Integer]
31
- # The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
31
+ # The status code, which should be an enum value of
32
+ # [google.rpc.Code][google.rpc.Code].
32
33
  # @!attribute [rw] message
33
34
  # @return [::String]
34
35
  # A developer-facing error message, which should be in English. Any
35
36
  # user-facing error message should be localized and sent in the
36
- # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized by the client.
37
+ # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized
38
+ # by the client.
37
39
  # @!attribute [rw] details
38
40
  # @return [::Array<::Google::Protobuf::Any>]
39
41
  # A list of messages that carry the error details. There is a common set of