google-cloud-firestore-v1 0.10.0 → 0.11.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,6 +21,7 @@ module Google
21
21
  module Api
22
22
  # Required information for every language.
23
23
  # @!attribute [rw] reference_docs_uri
24
+ # @deprecated This field is deprecated and may be removed in the next major version update.
24
25
  # @return [::String]
25
26
  # Link to automatically generated reference documentation. Example:
26
27
  # https://cloud.google.com/nodejs/docs/reference/asset/latest
@@ -35,7 +36,9 @@ module Google
35
36
  # Details about how and where to publish client libraries.
36
37
  # @!attribute [rw] version
37
38
  # @return [::String]
38
- # Version of the API to apply these settings to.
39
+ # Version of the API to apply these settings to. This is the full protobuf
40
+ # package for the API, ending in the version element.
41
+ # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
39
42
  # @!attribute [rw] launch_stage
40
43
  # @return [::Google::Api::LaunchStage]
41
44
  # Launch stage of this version of the API.
@@ -81,7 +84,7 @@ module Google
81
84
  # long-running operation pattern.
82
85
  # @!attribute [rw] new_issue_uri
83
86
  # @return [::String]
84
- # Link to a place that API users can report issues. Example:
87
+ # Link to a *public* URI where users can report issues. Example:
85
88
  # https://issuetracker.google.com/issues/new?component=190865&template=1161103
86
89
  # @!attribute [rw] documentation_uri
87
90
  # @return [::String]
@@ -111,6 +114,10 @@ module Google
111
114
  # Client library settings. If the same version string appears multiple
112
115
  # times in this list, then the last one wins. Settings from earlier
113
116
  # settings with the same version string are discarded.
117
+ # @!attribute [rw] proto_reference_documentation_uri
118
+ # @return [::String]
119
+ # Optional link to proto reference documentation. Example:
120
+ # https://cloud.google.com/pubsub/lite/docs/reference/rpc
114
121
  class Publishing
115
122
  include ::Google::Protobuf::MessageExts
116
123
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -203,9 +210,57 @@ module Google
203
210
  # @!attribute [rw] common
204
211
  # @return [::Google::Api::CommonLanguageSettings]
205
212
  # Some settings.
213
+ # @!attribute [rw] renamed_services
214
+ # @return [::Google::Protobuf::Map{::String => ::String}]
215
+ # Map from original service names to renamed versions.
216
+ # This is used when the default generated types
217
+ # would cause a naming conflict. (Neither name is
218
+ # fully-qualified.)
219
+ # Example: Subscriber to SubscriberServiceApi.
220
+ # @!attribute [rw] renamed_resources
221
+ # @return [::Google::Protobuf::Map{::String => ::String}]
222
+ # Map from full resource types to the effective short name
223
+ # for the resource. This is used when otherwise resource
224
+ # named from different services would cause naming collisions.
225
+ # Example entry:
226
+ # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
227
+ # @!attribute [rw] ignored_resources
228
+ # @return [::Array<::String>]
229
+ # List of full resource types to ignore during generation.
230
+ # This is typically used for API-specific Location resources,
231
+ # which should be handled by the generator as if they were actually
232
+ # the common Location resources.
233
+ # Example entry: "documentai.googleapis.com/Location"
234
+ # @!attribute [rw] forced_namespace_aliases
235
+ # @return [::Array<::String>]
236
+ # Namespaces which must be aliased in snippets due to
237
+ # a known (but non-generator-predictable) naming collision
238
+ # @!attribute [rw] handwritten_signatures
239
+ # @return [::Array<::String>]
240
+ # Method signatures (in the form "service.method(signature)")
241
+ # which are provided separately, so shouldn't be generated.
242
+ # Snippets *calling* these methods are still generated, however.
206
243
  class DotnetSettings
207
244
  include ::Google::Protobuf::MessageExts
208
245
  extend ::Google::Protobuf::MessageExts::ClassMethods
246
+
247
+ # @!attribute [rw] key
248
+ # @return [::String]
249
+ # @!attribute [rw] value
250
+ # @return [::String]
251
+ class RenamedServicesEntry
252
+ include ::Google::Protobuf::MessageExts
253
+ extend ::Google::Protobuf::MessageExts::ClassMethods
254
+ end
255
+
256
+ # @!attribute [rw] key
257
+ # @return [::String]
258
+ # @!attribute [rw] value
259
+ # @return [::String]
260
+ class RenamedResourcesEntry
261
+ include ::Google::Protobuf::MessageExts
262
+ extend ::Google::Protobuf::MessageExts::ClassMethods
263
+ end
209
264
  end
210
265
 
211
266
  # Settings for Ruby client libraries.
@@ -240,8 +295,8 @@ module Google
240
295
  # Example of a YAML configuration::
241
296
  #
242
297
  # publishing:
243
- # method_behavior:
244
- # - selector: CreateAdDomain
298
+ # method_settings:
299
+ # - selector: google.cloud.speech.v2.Speech.BatchRecognize
245
300
  # long_running:
246
301
  # initial_poll_delay:
247
302
  # seconds: 60 # 1 minute
@@ -250,6 +305,19 @@ module Google
250
305
  # seconds: 360 # 6 minutes
251
306
  # total_poll_timeout:
252
307
  # seconds: 54000 # 90 minutes
308
+ # @!attribute [rw] auto_populated_fields
309
+ # @return [::Array<::String>]
310
+ # List of top-level fields of the request message, that should be
311
+ # automatically populated by the client libraries based on their
312
+ # (google.api.field_info).format. Currently supported format: UUID4.
313
+ #
314
+ # Example of a YAML configuration:
315
+ #
316
+ # publishing:
317
+ # method_settings:
318
+ # - selector: google.example.v1.ExampleService.CreateExample
319
+ # auto_populated_fields:
320
+ # - request_id
253
321
  class MethodSettings
254
322
  include ::Google::Protobuf::MessageExts
255
323
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -299,6 +367,15 @@ module Google
299
367
 
300
368
  # Street View Org.
301
369
  STREET_VIEW = 4
370
+
371
+ # Shopping Org.
372
+ SHOPPING = 5
373
+
374
+ # Geo Org.
375
+ GEO = 6
376
+
377
+ # Generative AI - https://developers.generativeai.google
378
+ GENERATIVE_AI = 7
302
379
  end
303
380
 
304
381
  # To where should client libraries be published?
@@ -66,6 +66,20 @@ module Google
66
66
  # a non-empty value will be returned. The user will not be aware of what
67
67
  # non-empty value to expect.
68
68
  NON_EMPTY_DEFAULT = 7
69
+
70
+ # Denotes that the field in a resource (a message annotated with
71
+ # google.api.resource) is used in the resource name to uniquely identify the
72
+ # resource. For AIP-compliant APIs, this should only be applied to the
73
+ # `name` field on the resource.
74
+ #
75
+ # This behavior should not be applied to references to other resources within
76
+ # the message.
77
+ #
78
+ # The identifier field of resources often have different field behavior
79
+ # depending on the request it is embedded in (e.g. for Create methods name
80
+ # is optional and unused, while for Update methods it is required). Instead
81
+ # of method-specific annotations, only `IDENTIFIER` is required.
82
+ IDENTIFIER = 8
69
83
  end
70
84
  end
71
85
  end
@@ -0,0 +1,79 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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 Cloud
22
+ module Firestore
23
+ module V1
24
+ # A sequence of bits, encoded in a byte array.
25
+ #
26
+ # Each byte in the `bitmap` byte array stores 8 bits of the sequence. The only
27
+ # exception is the last byte, which may store 8 _or fewer_ bits. The `padding`
28
+ # defines the number of bits of the last byte to be ignored as "padding". The
29
+ # values of these "padding" bits are unspecified and must be ignored.
30
+ #
31
+ # To retrieve the first bit, bit 0, calculate: `(bitmap[0] & 0x01) != 0`.
32
+ # To retrieve the second bit, bit 1, calculate: `(bitmap[0] & 0x02) != 0`.
33
+ # To retrieve the third bit, bit 2, calculate: `(bitmap[0] & 0x04) != 0`.
34
+ # To retrieve the fourth bit, bit 3, calculate: `(bitmap[0] & 0x08) != 0`.
35
+ # To retrieve bit n, calculate: `(bitmap[n / 8] & (0x01 << (n % 8))) != 0`.
36
+ #
37
+ # The "size" of a `BitSequence` (the number of bits it contains) is calculated
38
+ # by this formula: `(bitmap.length * 8) - padding`.
39
+ # @!attribute [rw] bitmap
40
+ # @return [::String]
41
+ # The bytes that encode the bit sequence.
42
+ # May have a length of zero.
43
+ # @!attribute [rw] padding
44
+ # @return [::Integer]
45
+ # The number of bits of the last byte in `bitmap` to ignore as "padding".
46
+ # If the length of `bitmap` is zero, then this value must be `0`.
47
+ # Otherwise, this value must be between 0 and 7, inclusive.
48
+ class BitSequence
49
+ include ::Google::Protobuf::MessageExts
50
+ extend ::Google::Protobuf::MessageExts::ClassMethods
51
+ end
52
+
53
+ # A bloom filter (https://en.wikipedia.org/wiki/Bloom_filter).
54
+ #
55
+ # The bloom filter hashes the entries with MD5 and treats the resulting 128-bit
56
+ # hash as 2 distinct 64-bit hash values, interpreted as unsigned integers
57
+ # using 2's complement encoding.
58
+ #
59
+ # These two hash values, named `h1` and `h2`, are then used to compute the
60
+ # `hash_count` hash values using the formula, starting at `i=0`:
61
+ #
62
+ # h(i) = h1 + (i * h2)
63
+ #
64
+ # These resulting values are then taken modulo the number of bits in the bloom
65
+ # filter to get the bits of the bloom filter to test for the given entry.
66
+ # @!attribute [rw] bits
67
+ # @return [::Google::Cloud::Firestore::V1::BitSequence]
68
+ # The bloom filter data.
69
+ # @!attribute [rw] hash_count
70
+ # @return [::Integer]
71
+ # The number of hashes used by the algorithm.
72
+ class BloomFilter
73
+ include ::Google::Protobuf::MessageExts
74
+ extend ::Google::Protobuf::MessageExts::ClassMethods
75
+ end
76
+ end
77
+ end
78
+ end
79
+ end
@@ -63,6 +63,9 @@ module Google
63
63
  extend ::Google::Protobuf::MessageExts::ClassMethods
64
64
 
65
65
  # Options for a transaction that can be used to read and write documents.
66
+ #
67
+ # Firestore does not allow 3rd party auth requests to create read-write.
68
+ # transactions.
66
69
  # @!attribute [rw] retry_transaction
67
70
  # @return [::String]
68
71
  # An optional transaction to retry.
@@ -75,7 +78,10 @@ module Google
75
78
  # @!attribute [rw] read_time
76
79
  # @return [::Google::Protobuf::Timestamp]
77
80
  # Reads documents at the given time.
78
- # This may not be older than 60 seconds.
81
+ #
82
+ # This must be a microsecond precision timestamp within the past one
83
+ # hour, or if Point-in-Time Recovery is enabled, can additionally be a
84
+ # whole minute timestamp within the past 7 days.
79
85
  class ReadOnly
80
86
  include ::Google::Protobuf::MessageExts
81
87
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -34,23 +34,23 @@ module Google
34
34
  #
35
35
  # The map keys represent field names.
36
36
  #
37
- # A simple field name contains only characters `a` to `z`, `A` to `Z`,
38
- # `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
39
- # `foo_bar_17`.
40
- #
41
37
  # Field names matching the regular expression `__.*__` are reserved. Reserved
42
- # field names are forbidden except in certain documented contexts. The map
43
- # keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
38
+ # field names are forbidden except in certain documented contexts. The field
39
+ # names, represented as UTF-8, must not exceed 1,500 bytes and cannot be
44
40
  # empty.
45
41
  #
46
42
  # Field paths may be used in other contexts to refer to structured fields
47
- # defined here. For `map_value`, the field path is represented by the simple
48
- # or quoted field names of the containing fields, delimited by `.`. For
49
- # example, the structured field
50
- # `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
51
- # represented by the field path `foo.x&y`.
43
+ # defined here. For `map_value`, the field path is represented by a
44
+ # dot-delimited (`.`) string of segments. Each segment is either a simple
45
+ # field name (defined below) or a quoted field name. For example, the
46
+ # structured field `"foo" : { map_value: { "x&y" : { string_value: "hello"
47
+ # }}}` would be represented by the field path `` foo.`x&y` ``.
48
+ #
49
+ # A simple field name contains only characters `a` to `z`, `A` to `Z`,
50
+ # `0` to `9`, or `_`, and must not start with `0` to `9`. For example,
51
+ # `foo_bar_17`.
52
52
  #
53
- # Within a field path, a quoted field name starts and ends with `` ` `` and
53
+ # A quoted field name starts and ends with `` ` `` and
54
54
  # may contain any character. Some characters, including `` ` ``, must be
55
55
  # escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
56
56
  # `` `bak\`tik` `` represents `` bak`tik ``.
@@ -39,7 +39,10 @@ module Google
39
39
  # @!attribute [rw] read_time
40
40
  # @return [::Google::Protobuf::Timestamp]
41
41
  # Reads the version of the document at the given time.
42
- # This may not be older than 270 seconds.
42
+ #
43
+ # This must be a microsecond precision timestamp within the past one hour,
44
+ # or if Point-in-Time Recovery is enabled, can additionally be a whole
45
+ # minute timestamp within the past 7 days.
43
46
  class GetDocumentRequest
44
47
  include ::Google::Protobuf::MessageExts
45
48
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -98,7 +101,9 @@ module Google
98
101
  # @return [::Google::Protobuf::Timestamp]
99
102
  # Perform the read at the provided time.
100
103
  #
101
- # This may not be older than 270 seconds.
104
+ # This must be a microsecond precision timestamp within the past one hour,
105
+ # or if Point-in-Time Recovery is enabled, can additionally be a whole
106
+ # minute timestamp within the past 7 days.
102
107
  # @!attribute [rw] show_missing
103
108
  # @return [::Boolean]
104
109
  # If the list should show missing documents.
@@ -235,7 +240,10 @@ module Google
235
240
  # @!attribute [rw] read_time
236
241
  # @return [::Google::Protobuf::Timestamp]
237
242
  # Reads documents as they were at the given time.
238
- # This may not be older than 270 seconds.
243
+ #
244
+ # This must be a microsecond precision timestamp within the past one hour,
245
+ # or if Point-in-Time Recovery is enabled, can additionally be a whole
246
+ # minute timestamp within the past 7 days.
239
247
  class BatchGetDocumentsRequest
240
248
  include ::Google::Protobuf::MessageExts
241
249
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -365,7 +373,10 @@ module Google
365
373
  # @!attribute [rw] read_time
366
374
  # @return [::Google::Protobuf::Timestamp]
367
375
  # Reads documents as they were at the given time.
368
- # This may not be older than 270 seconds.
376
+ #
377
+ # This must be a microsecond precision timestamp within the past one hour,
378
+ # or if Point-in-Time Recovery is enabled, can additionally be a whole
379
+ # minute timestamp within the past 7 days.
369
380
  class RunQueryRequest
370
381
  include ::Google::Protobuf::MessageExts
371
382
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -433,9 +444,9 @@ module Google
433
444
  # @return [::Google::Protobuf::Timestamp]
434
445
  # Executes the query at the given timestamp.
435
446
  #
436
- # Requires:
437
- #
438
- # * Cannot be more than 270 seconds in the past.
447
+ # This must be a microsecond precision timestamp within the past one hour,
448
+ # or if Point-in-Time Recovery is enabled, can additionally be a whole
449
+ # minute timestamp within the past 7 days.
439
450
  class RunAggregationQueryRequest
440
451
  include ::Google::Protobuf::MessageExts
441
452
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -456,7 +467,14 @@ module Google
456
467
  # a new transaction.
457
468
  # @!attribute [rw] read_time
458
469
  # @return [::Google::Protobuf::Timestamp]
459
- # The time at which the aggregate value is valid for.
470
+ # The time at which the aggregate result was computed. This is always
471
+ # monotonically increasing; in this case, the previous AggregationResult in
472
+ # the result stream are guaranteed not to have changed between their
473
+ # `read_time` and this one.
474
+ #
475
+ # If the query returns no results, a response with `read_time` and no
476
+ # `result` will be sent, and this represents the time at which the query
477
+ # was run.
460
478
  class RunAggregationQueryResponse
461
479
  include ::Google::Protobuf::MessageExts
462
480
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -513,7 +531,10 @@ module Google
513
531
  # @!attribute [rw] read_time
514
532
  # @return [::Google::Protobuf::Timestamp]
515
533
  # Reads documents as they were at the given time.
516
- # This may not be older than 270 seconds.
534
+ #
535
+ # This must be a microsecond precision timestamp within the past one hour,
536
+ # or if Point-in-Time Recovery is enabled, can additionally be a whole
537
+ # minute timestamp within the past 7 days.
517
538
  class PartitionQueryRequest
518
539
  include ::Google::Protobuf::MessageExts
519
540
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -539,7 +560,7 @@ module Google
539
560
  # * query, start_at B
540
561
  #
541
562
  # An empty result may indicate that the query has too few results to be
542
- # partitioned.
563
+ # partitioned, or that the query is not yet supported for partitioning.
543
564
  # @!attribute [rw] next_page_token
544
565
  # @return [::String]
545
566
  # A page token that may be used to request an additional set of results, up
@@ -713,9 +734,32 @@ module Google
713
734
  # @return [::Integer]
714
735
  # The target ID that identifies the target on the stream. Must be a positive
715
736
  # number and non-zero.
737
+ #
738
+ # If `target_id` is 0 (or unspecified), the server will assign an ID for this
739
+ # target and return that in a `TargetChange::ADD` event. Once a target with
740
+ # `target_id=0` is added, all subsequent targets must also have
741
+ # `target_id=0`. If an `AddTarget` request with `target_id != 0` is
742
+ # sent to the server after a target with `target_id=0` is added, the server
743
+ # will immediately send a response with a `TargetChange::Remove` event.
744
+ #
745
+ # Note that if the client sends multiple `AddTarget` requests
746
+ # without an ID, the order of IDs returned in `TargetChage.target_ids` are
747
+ # undefined. Therefore, clients should provide a target ID instead of relying
748
+ # on the server to assign one.
749
+ #
750
+ # If `target_id` is non-zero, there must not be an existing active target on
751
+ # this stream with the same ID.
716
752
  # @!attribute [rw] once
717
753
  # @return [::Boolean]
718
754
  # If the target should be removed once it is current and consistent.
755
+ # @!attribute [rw] expected_count
756
+ # @return [::Google::Protobuf::Int32Value]
757
+ # The number of documents that last matched the query at the resume token or
758
+ # read time.
759
+ #
760
+ # This value is only relevant when a `resume_type` is provided. This value
761
+ # being present and greater than zero signals that the client wants
762
+ # `ExistenceFilter.unchanged_names` to be included in the response.
719
763
  class Target
720
764
  include ::Google::Protobuf::MessageExts
721
765
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -834,7 +878,10 @@ module Google
834
878
  # @!attribute [rw] read_time
835
879
  # @return [::Google::Protobuf::Timestamp]
836
880
  # Reads documents as they were at the given time.
837
- # This may not be older than 270 seconds.
881
+ #
882
+ # This must be a microsecond precision timestamp within the past one hour,
883
+ # or if Point-in-Time Recovery is enabled, can additionally be a whole
884
+ # minute timestamp within the past 7 days.
838
885
  class ListCollectionIdsRequest
839
886
  include ::Google::Protobuf::MessageExts
840
887
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -22,9 +22,21 @@ module Google
22
22
  module Firestore
23
23
  module V1
24
24
  # A Firestore query.
25
+ #
26
+ # The query stages are executed in the following order:
27
+ # 1. from
28
+ # 2. where
29
+ # 3. select
30
+ # 4. order_by + start_at + end_at
31
+ # 5. offset
32
+ # 6. limit
25
33
  # @!attribute [rw] select
26
34
  # @return [::Google::Cloud::Firestore::V1::StructuredQuery::Projection]
27
- # The projection to return.
35
+ # Optional sub-set of the fields to return.
36
+ #
37
+ # This acts as a {::Google::Cloud::Firestore::V1::DocumentMask DocumentMask} over the
38
+ # documents returned from a query. When not set, assumes that the caller
39
+ # wants all fields returned.
28
40
  # @!attribute [rw] from
29
41
  # @return [::Array<::Google::Cloud::Firestore::V1::StructuredQuery::CollectionSelector>]
30
42
  # The collections to query.
@@ -243,8 +255,9 @@ module Google
243
255
  #
244
256
  # Requires:
245
257
  #
246
- # * That `value` is a non-empty `ArrayValue` with at most 10 values.
247
- # * No other `IN` or `ARRAY_CONTAINS_ANY` or `NOT_IN`.
258
+ # * That `value` is a non-empty `ArrayValue`, subject to disjunction
259
+ # limits.
260
+ # * No `NOT_IN` filters in the same query.
248
261
  IN = 8
249
262
 
250
263
  # The given `field` is an array that contains any of the values in the
@@ -252,8 +265,10 @@ module Google
252
265
  #
253
266
  # Requires:
254
267
  #
255
- # * That `value` is a non-empty `ArrayValue` with at most 10 values.
256
- # * No other `IN` or `ARRAY_CONTAINS_ANY` or `NOT_IN`.
268
+ # * That `value` is a non-empty `ArrayValue`, subject to disjunction
269
+ # limits.
270
+ # * No other `ARRAY_CONTAINS_ANY` filters within the same disjunction.
271
+ # * No `NOT_IN` filters in the same query.
257
272
  ARRAY_CONTAINS_ANY = 9
258
273
 
259
274
  # The value of the `field` is not in the given array.
@@ -261,7 +276,7 @@ module Google
261
276
  # Requires:
262
277
  #
263
278
  # * That `value` is a non-empty `ArrayValue` with at most 10 values.
264
- # * No other `IN`, `ARRAY_CONTAINS_ANY`, `NOT_IN`, `NOT_EQUAL`,
279
+ # * No other `OR`, `IN`, `ARRAY_CONTAINS_ANY`, `NOT_IN`, `NOT_EQUAL`,
265
280
  # `IS_NOT_NULL`, or `IS_NOT_NAN`.
266
281
  # * That `field` comes first in the `order_by`.
267
282
  NOT_IN = 10
@@ -323,11 +338,12 @@ module Google
323
338
  # A reference to a field in a document, ex: `stats.operations`.
324
339
  # @!attribute [rw] field_path
325
340
  # @return [::String]
326
- # The relative path of the document being referenced.
341
+ # A reference to a field in a document.
327
342
  #
328
343
  # Requires:
329
344
  #
330
- # * Conform to {::Google::Cloud::Firestore::V1::Document#fields document field name}
345
+ # * MUST be a dot-delimited (`.`) string of segments, where each segment
346
+ # conforms to {::Google::Cloud::Firestore::V1::Document#fields document field name}
331
347
  # limitations.
332
348
  class FieldReference
333
349
  include ::Google::Protobuf::MessageExts
@@ -376,10 +392,16 @@ module Google
376
392
  include ::Google::Protobuf::MessageExts
377
393
  extend ::Google::Protobuf::MessageExts::ClassMethods
378
394
 
379
- # Defines a aggregation that produces a single result.
395
+ # Defines an aggregation that produces a single result.
380
396
  # @!attribute [rw] count
381
397
  # @return [::Google::Cloud::Firestore::V1::StructuredAggregationQuery::Aggregation::Count]
382
398
  # Count aggregator.
399
+ # @!attribute [rw] sum
400
+ # @return [::Google::Cloud::Firestore::V1::StructuredAggregationQuery::Aggregation::Sum]
401
+ # Sum aggregator.
402
+ # @!attribute [rw] avg
403
+ # @return [::Google::Cloud::Firestore::V1::StructuredAggregationQuery::Aggregation::Avg]
404
+ # Average aggregator.
383
405
  # @!attribute [rw] alias
384
406
  # @return [::String]
385
407
  # Optional. Optional name of the field to store the result of the
@@ -393,7 +415,7 @@ module Google
393
415
  # COUNT_UP_TO(1) AS count_up_to_1,
394
416
  # COUNT_UP_TO(2),
395
417
  # COUNT_UP_TO(3) AS count_up_to_3,
396
- # COUNT_UP_TO(4)
418
+ # COUNT(*)
397
419
  # OVER (
398
420
  # ...
399
421
  # );
@@ -406,7 +428,7 @@ module Google
406
428
  # COUNT_UP_TO(1) AS count_up_to_1,
407
429
  # COUNT_UP_TO(2) AS field_1,
408
430
  # COUNT_UP_TO(3) AS count_up_to_3,
409
- # COUNT_UP_TO(4) AS field_2
431
+ # COUNT(*) AS field_2
410
432
  # OVER (
411
433
  # ...
412
434
  # );
@@ -431,7 +453,7 @@ module Google
431
453
  # count.
432
454
  #
433
455
  # This provides a way to set an upper bound on the number of documents
434
- # to scan, limiting latency and cost.
456
+ # to scan, limiting latency, and cost.
435
457
  #
436
458
  # Unspecified is interpreted as no bound.
437
459
  #
@@ -448,6 +470,54 @@ module Google
448
470
  include ::Google::Protobuf::MessageExts
449
471
  extend ::Google::Protobuf::MessageExts::ClassMethods
450
472
  end
473
+
474
+ # Sum of the values of the requested field.
475
+ #
476
+ # * Only numeric values will be aggregated. All non-numeric values
477
+ # including `NULL` are skipped.
478
+ #
479
+ # * If the aggregated values contain `NaN`, returns `NaN`. Infinity math
480
+ # follows IEEE-754 standards.
481
+ #
482
+ # * If the aggregated value set is empty, returns 0.
483
+ #
484
+ # * Returns a 64-bit integer if all aggregated numbers are integers and the
485
+ # sum result does not overflow. Otherwise, the result is returned as a
486
+ # double. Note that even if all the aggregated values are integers, the
487
+ # result is returned as a double if it cannot fit within a 64-bit signed
488
+ # integer. When this occurs, the returned value will lose precision.
489
+ #
490
+ # * When underflow occurs, floating-point aggregation is non-deterministic.
491
+ # This means that running the same query repeatedly without any changes to
492
+ # the underlying values could produce slightly different results each
493
+ # time. In those cases, values should be stored as integers over
494
+ # floating-point numbers.
495
+ # @!attribute [rw] field
496
+ # @return [::Google::Cloud::Firestore::V1::StructuredQuery::FieldReference]
497
+ # The field to aggregate on.
498
+ class Sum
499
+ include ::Google::Protobuf::MessageExts
500
+ extend ::Google::Protobuf::MessageExts::ClassMethods
501
+ end
502
+
503
+ # Average of the values of the requested field.
504
+ #
505
+ # * Only numeric values will be aggregated. All non-numeric values
506
+ # including `NULL` are skipped.
507
+ #
508
+ # * If the aggregated values contain `NaN`, returns `NaN`. Infinity math
509
+ # follows IEEE-754 standards.
510
+ #
511
+ # * If the aggregated value set is empty, returns `NULL`.
512
+ #
513
+ # * Always returns the result as a double.
514
+ # @!attribute [rw] field
515
+ # @return [::Google::Cloud::Firestore::V1::StructuredQuery::FieldReference]
516
+ # The field to aggregate on.
517
+ class Avg
518
+ include ::Google::Protobuf::MessageExts
519
+ extend ::Google::Protobuf::MessageExts::ClassMethods
520
+ end
451
521
  end
452
522
  end
453
523
 
@@ -271,6 +271,24 @@ module Google
271
271
  #
272
272
  # If different from the count of documents in the client that match, the
273
273
  # client must manually determine which documents no longer match the target.
274
+ #
275
+ # The client can use the `unchanged_names` bloom filter to assist with
276
+ # this determination by testing ALL the document names against the filter;
277
+ # if the document name is NOT in the filter, it means the document no
278
+ # longer matches the target.
279
+ # @!attribute [rw] unchanged_names
280
+ # @return [::Google::Cloud::Firestore::V1::BloomFilter]
281
+ # A bloom filter that, despite its name, contains the UTF-8 byte encodings of
282
+ # the resource names of ALL the documents that match
283
+ # {::Google::Cloud::Firestore::V1::ExistenceFilter#target_id target_id}, in the form
284
+ # `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
285
+ #
286
+ # This bloom filter may be omitted at the server's discretion, such as if it
287
+ # is deemed that the client will not make use of it or if it is too
288
+ # computationally expensive to calculate or transmit. Clients must gracefully
289
+ # handle this field being absent by falling back to the logic used before
290
+ # this field existed; that is, re-add the target without a resume token to
291
+ # figure out which documents in the client's cache are out of sync.
274
292
  class ExistenceFilter
275
293
  include ::Google::Protobuf::MessageExts
276
294
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -43,8 +43,12 @@ module Google
43
43
  # if (any.is(Foo.class)) {
44
44
  # foo = any.unpack(Foo.class);
45
45
  # }
46
+ # // or ...
47
+ # if (any.isSameTypeAs(Foo.getDefaultInstance())) {
48
+ # foo = any.unpack(Foo.getDefaultInstance());
49
+ # }
46
50
  #
47
- # Example 3: Pack and unpack a message in Python.
51
+ # Example 3: Pack and unpack a message in Python.
48
52
  #
49
53
  # foo = Foo(...)
50
54
  # any = Any()
@@ -54,7 +58,7 @@ module Google
54
58
  # any.Unpack(foo)
55
59
  # ...
56
60
  #
57
- # Example 4: Pack and unpack a message in Go
61
+ # Example 4: Pack and unpack a message in Go
58
62
  #
59
63
  # foo := &pb.Foo{...}
60
64
  # any, err := anypb.New(foo)
@@ -73,9 +77,8 @@ module Google
73
77
  # in the type URL, for example "foo.bar.com/x/y.z" will yield type
74
78
  # name "y.z".
75
79
  #
76
- #
77
80
  # JSON
78
- #
81
+ # ====
79
82
  # The JSON representation of an `Any` value uses the regular
80
83
  # representation of the deserialized, embedded message, with an
81
84
  # additional field `@type` which contains the type URL. Example: