google-apis-firestore_v1beta1 0.14.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b4d68fd45f0a34837336b1cde95add12b38129d2689d37e4333a18353a7658fa
4
- data.tar.gz: 7a32f14bc19c4c228e29764ed65fbbde12ac0477de3281b964054c8e7f7a26ad
3
+ metadata.gz: d5ad7df8bf4a701960f4825cec2dbb52602ff4e653693b8a3788ad60701b939d
4
+ data.tar.gz: eb58ab4b7d0fd8f6dc2e52fb8de3bc783382c27c3c3c7fbb2befaece1564ea27
5
5
  SHA512:
6
- metadata.gz: a5bf55367115f6aece8b1777fc5aa5b41ac409696b079c7d93a0e2545d0ce8a5263220068f6314dddae3cbd1e5caf26c00fe17298a544915ece2a95f9f98c045
7
- data.tar.gz: 9235cacce28e4a66a390909231f39d303ac60d6fb6c560beb6ddde90946c0dc36b68b25d17e87514d3089c6354310b7cf251846f422d3650e7b7b8357f098a1a
6
+ metadata.gz: dceea397ebc9b08c9f0ad39bbdd8561126dfa316f56a089c72f63339e20e9d3833a8177063347631f178c5e4f88006c94a2d81b61b5a5a965c61d6fd0902b33d
7
+ data.tar.gz: 7d6a6b3dbcc41a152f7a6897b9c923c09b0d7744c89c0d3a19cec89886168e3d431b7d47f55e37474b967513a62307928f98741ec431def9de9308f9c4d7055e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release history for google-apis-firestore_v1beta1
2
2
 
3
+ ### v0.15.0 (2022-05-07)
4
+
5
+ * Regenerated from discovery document revision 20220428
6
+
3
7
  ### v0.14.0 (2022-04-09)
4
8
 
5
9
  * Regenerated from discovery document revision 20220402
@@ -22,57 +22,6 @@ module Google
22
22
  module Apis
23
23
  module FirestoreV1beta1
24
24
 
25
- # Defines a aggregation that produces a single result.
26
- class Aggregation
27
- include Google::Apis::Core::Hashable
28
-
29
- # Required. The name of the field to store the result of the aggregation into.
30
- # Requires: * Must be present. * Must be unique across all aggregation aliases. *
31
- # Conform to existing document field name limitations.
32
- # Corresponds to the JSON property `alias`
33
- # @return [String]
34
- attr_accessor :alias
35
-
36
- # Count of documents that match the query. The `COUNT(*)` aggregation function
37
- # operates on the entire document so it does not require a field reference.
38
- # Corresponds to the JSON property `count`
39
- # @return [Google::Apis::FirestoreV1beta1::Count]
40
- attr_accessor :count
41
-
42
- def initialize(**args)
43
- update!(**args)
44
- end
45
-
46
- # Update properties of this object
47
- def update!(**args)
48
- @alias = args[:alias] if args.key?(:alias)
49
- @count = args[:count] if args.key?(:count)
50
- end
51
- end
52
-
53
- # The result of a single bucket from a Firestore aggregation query. The keys of `
54
- # aggregate_fields` are the same for all results in an aggregation query, unlike
55
- # document queries which can have different fields present for each result.
56
- class AggregationResult
57
- include Google::Apis::Core::Hashable
58
-
59
- # The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. The key
60
- # is the alias assigned to the aggregation function on input and the size of
61
- # this map equals the number of aggregation functions in the query.
62
- # Corresponds to the JSON property `aggregateFields`
63
- # @return [Hash<String,Google::Apis::FirestoreV1beta1::Value>]
64
- attr_accessor :aggregate_fields
65
-
66
- def initialize(**args)
67
- update!(**args)
68
- end
69
-
70
- # Update properties of this object
71
- def update!(**args)
72
- @aggregate_fields = args[:aggregate_fields] if args.key?(:aggregate_fields)
73
- end
74
- end
75
-
76
25
  # An array value.
77
26
  class ArrayValue
78
27
  include Google::Apis::Core::Hashable
@@ -385,30 +334,6 @@ module Google
385
334
  end
386
335
  end
387
336
 
388
- # Count of documents that match the query. The `COUNT(*)` aggregation function
389
- # operates on the entire document so it does not require a field reference.
390
- class Count
391
- include Google::Apis::Core::Hashable
392
-
393
- # Optional. Optional constraint on the maximum number of documents to count.
394
- # This provides a way to set an upper bound on the number of documents to scan,
395
- # limiting latency and cost. High-Level Example: ``` SELECT COUNT_UP_TO(1000)
396
- # FROM ( SELECT * FROM k ); ``` Requires: * Must be greater than zero when
397
- # present.
398
- # Corresponds to the JSON property `upTo`
399
- # @return [Fixnum]
400
- attr_accessor :up_to
401
-
402
- def initialize(**args)
403
- update!(**args)
404
- end
405
-
406
- # Update properties of this object
407
- def update!(**args)
408
- @up_to = args[:up_to] if args.key?(:up_to)
409
- end
410
- end
411
-
412
337
  # A position in a query result set.
413
338
  class Cursor
414
339
  include Google::Apis::Core::Hashable
@@ -1774,81 +1699,6 @@ module Google
1774
1699
  end
1775
1700
  end
1776
1701
 
1777
- # The request for Firestore.RunAggregationQuery.
1778
- class RunAggregationQueryRequest
1779
- include Google::Apis::Core::Hashable
1780
-
1781
- # Options for creating a new transaction.
1782
- # Corresponds to the JSON property `newTransaction`
1783
- # @return [Google::Apis::FirestoreV1beta1::TransactionOptions]
1784
- attr_accessor :new_transaction
1785
-
1786
- # Executes the query at the given timestamp. Requires: * Cannot be more than 270
1787
- # seconds in the past.
1788
- # Corresponds to the JSON property `readTime`
1789
- # @return [String]
1790
- attr_accessor :read_time
1791
-
1792
- # Firestore query for running an aggregation over a StructuredQuery.
1793
- # Corresponds to the JSON property `structuredAggregationQuery`
1794
- # @return [Google::Apis::FirestoreV1beta1::StructuredAggregationQuery]
1795
- attr_accessor :structured_aggregation_query
1796
-
1797
- # Run the aggregation within an already active transaction. The value here is
1798
- # the opaque transaction ID to execute the query in.
1799
- # Corresponds to the JSON property `transaction`
1800
- # NOTE: Values are automatically base64 encoded/decoded in the client library.
1801
- # @return [String]
1802
- attr_accessor :transaction
1803
-
1804
- def initialize(**args)
1805
- update!(**args)
1806
- end
1807
-
1808
- # Update properties of this object
1809
- def update!(**args)
1810
- @new_transaction = args[:new_transaction] if args.key?(:new_transaction)
1811
- @read_time = args[:read_time] if args.key?(:read_time)
1812
- @structured_aggregation_query = args[:structured_aggregation_query] if args.key?(:structured_aggregation_query)
1813
- @transaction = args[:transaction] if args.key?(:transaction)
1814
- end
1815
- end
1816
-
1817
- # The response for Firestore.RunAggregationQuery.
1818
- class RunAggregationQueryResponse
1819
- include Google::Apis::Core::Hashable
1820
-
1821
- # The time at which the aggregate value is valid for.
1822
- # Corresponds to the JSON property `readTime`
1823
- # @return [String]
1824
- attr_accessor :read_time
1825
-
1826
- # The result of a single bucket from a Firestore aggregation query. The keys of `
1827
- # aggregate_fields` are the same for all results in an aggregation query, unlike
1828
- # document queries which can have different fields present for each result.
1829
- # Corresponds to the JSON property `result`
1830
- # @return [Google::Apis::FirestoreV1beta1::AggregationResult]
1831
- attr_accessor :result
1832
-
1833
- # The transaction that was started as part of this request. Only present on the
1834
- # first response when the request requested to start a new transaction.
1835
- # Corresponds to the JSON property `transaction`
1836
- # NOTE: Values are automatically base64 encoded/decoded in the client library.
1837
- # @return [String]
1838
- attr_accessor :transaction
1839
-
1840
- def initialize(**args)
1841
- update!(**args)
1842
- end
1843
-
1844
- # Update properties of this object
1845
- def update!(**args)
1846
- @read_time = args[:read_time] if args.key?(:read_time)
1847
- @result = args[:result] if args.key?(:result)
1848
- @transaction = args[:transaction] if args.key?(:transaction)
1849
- end
1850
- end
1851
-
1852
1702
  # The request for Firestore.RunQuery.
1853
1703
  class RunQueryRequest
1854
1704
  include Google::Apis::Core::Hashable
@@ -1898,6 +1748,13 @@ module Google
1898
1748
  # @return [Google::Apis::FirestoreV1beta1::Document]
1899
1749
  attr_accessor :document
1900
1750
 
1751
+ # If present, Firestore has completely finished the request and no more
1752
+ # documents will be returned.
1753
+ # Corresponds to the JSON property `done`
1754
+ # @return [Boolean]
1755
+ attr_accessor :done
1756
+ alias_method :done?, :done
1757
+
1901
1758
  # The time at which the document was read. This may be monotonically increasing;
1902
1759
  # in this case, the previous documents in the result stream are guaranteed not
1903
1760
  # to have changed between their `read_time` and this one. If the query returns
@@ -1928,6 +1785,7 @@ module Google
1928
1785
  # Update properties of this object
1929
1786
  def update!(**args)
1930
1787
  @document = args[:document] if args.key?(:document)
1788
+ @done = args[:done] if args.key?(:done)
1931
1789
  @read_time = args[:read_time] if args.key?(:read_time)
1932
1790
  @skipped_results = args[:skipped_results] if args.key?(:skipped_results)
1933
1791
  @transaction = args[:transaction] if args.key?(:transaction)
@@ -1973,31 +1831,6 @@ module Google
1973
1831
  end
1974
1832
  end
1975
1833
 
1976
- # Firestore query for running an aggregation over a StructuredQuery.
1977
- class StructuredAggregationQuery
1978
- include Google::Apis::Core::Hashable
1979
-
1980
- # Optional. Series of aggregations to apply on top of the `structured_query`.
1981
- # Corresponds to the JSON property `aggregations`
1982
- # @return [Array<Google::Apis::FirestoreV1beta1::Aggregation>]
1983
- attr_accessor :aggregations
1984
-
1985
- # A Firestore query.
1986
- # Corresponds to the JSON property `structuredQuery`
1987
- # @return [Google::Apis::FirestoreV1beta1::StructuredQuery]
1988
- attr_accessor :structured_query
1989
-
1990
- def initialize(**args)
1991
- update!(**args)
1992
- end
1993
-
1994
- # Update properties of this object
1995
- def update!(**args)
1996
- @aggregations = args[:aggregations] if args.key?(:aggregations)
1997
- @structured_query = args[:structured_query] if args.key?(:structured_query)
1998
- end
1999
- end
2000
-
2001
1834
  # A Firestore query.
2002
1835
  class StructuredQuery
2003
1836
  include Google::Apis::Core::Hashable
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module FirestoreV1beta1
18
18
  # Version of the google-apis-firestore_v1beta1 gem
19
- GEM_VERSION = "0.14.0"
19
+ GEM_VERSION = "0.15.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
22
  GENERATOR_VERSION = "0.4.1"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20220402"
25
+ REVISION = "20220428"
26
26
  end
27
27
  end
28
28
  end
@@ -22,18 +22,6 @@ module Google
22
22
  module Apis
23
23
  module FirestoreV1beta1
24
24
 
25
- class Aggregation
26
- class Representation < Google::Apis::Core::JsonRepresentation; end
27
-
28
- include Google::Apis::Core::JsonObjectSupport
29
- end
30
-
31
- class AggregationResult
32
- class Representation < Google::Apis::Core::JsonRepresentation; end
33
-
34
- include Google::Apis::Core::JsonObjectSupport
35
- end
36
-
37
25
  class ArrayValue
38
26
  class Representation < Google::Apis::Core::JsonRepresentation; end
39
27
 
@@ -100,12 +88,6 @@ module Google
100
88
  include Google::Apis::Core::JsonObjectSupport
101
89
  end
102
90
 
103
- class Count
104
- class Representation < Google::Apis::Core::JsonRepresentation; end
105
-
106
- include Google::Apis::Core::JsonObjectSupport
107
- end
108
-
109
91
  class Cursor
110
92
  class Representation < Google::Apis::Core::JsonRepresentation; end
111
93
 
@@ -364,18 +346,6 @@ module Google
364
346
  include Google::Apis::Core::JsonObjectSupport
365
347
  end
366
348
 
367
- class RunAggregationQueryRequest
368
- class Representation < Google::Apis::Core::JsonRepresentation; end
369
-
370
- include Google::Apis::Core::JsonObjectSupport
371
- end
372
-
373
- class RunAggregationQueryResponse
374
- class Representation < Google::Apis::Core::JsonRepresentation; end
375
-
376
- include Google::Apis::Core::JsonObjectSupport
377
- end
378
-
379
349
  class RunQueryRequest
380
350
  class Representation < Google::Apis::Core::JsonRepresentation; end
381
351
 
@@ -394,12 +364,6 @@ module Google
394
364
  include Google::Apis::Core::JsonObjectSupport
395
365
  end
396
366
 
397
- class StructuredAggregationQuery
398
- class Representation < Google::Apis::Core::JsonRepresentation; end
399
-
400
- include Google::Apis::Core::JsonObjectSupport
401
- end
402
-
403
367
  class StructuredQuery
404
368
  class Representation < Google::Apis::Core::JsonRepresentation; end
405
369
 
@@ -460,23 +424,6 @@ module Google
460
424
  include Google::Apis::Core::JsonObjectSupport
461
425
  end
462
426
 
463
- class Aggregation
464
- # @private
465
- class Representation < Google::Apis::Core::JsonRepresentation
466
- property :alias, as: 'alias'
467
- property :count, as: 'count', class: Google::Apis::FirestoreV1beta1::Count, decorator: Google::Apis::FirestoreV1beta1::Count::Representation
468
-
469
- end
470
- end
471
-
472
- class AggregationResult
473
- # @private
474
- class Representation < Google::Apis::Core::JsonRepresentation
475
- hash :aggregate_fields, as: 'aggregateFields', class: Google::Apis::FirestoreV1beta1::Value, decorator: Google::Apis::FirestoreV1beta1::Value::Representation
476
-
477
- end
478
- end
479
-
480
427
  class ArrayValue
481
428
  # @private
482
429
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -578,13 +525,6 @@ module Google
578
525
  end
579
526
  end
580
527
 
581
- class Count
582
- # @private
583
- class Representation < Google::Apis::Core::JsonRepresentation
584
- property :up_to, as: 'upTo'
585
- end
586
- end
587
-
588
528
  class Cursor
589
529
  # @private
590
530
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -988,28 +928,6 @@ module Google
988
928
  end
989
929
  end
990
930
 
991
- class RunAggregationQueryRequest
992
- # @private
993
- class Representation < Google::Apis::Core::JsonRepresentation
994
- property :new_transaction, as: 'newTransaction', class: Google::Apis::FirestoreV1beta1::TransactionOptions, decorator: Google::Apis::FirestoreV1beta1::TransactionOptions::Representation
995
-
996
- property :read_time, as: 'readTime'
997
- property :structured_aggregation_query, as: 'structuredAggregationQuery', class: Google::Apis::FirestoreV1beta1::StructuredAggregationQuery, decorator: Google::Apis::FirestoreV1beta1::StructuredAggregationQuery::Representation
998
-
999
- property :transaction, :base64 => true, as: 'transaction'
1000
- end
1001
- end
1002
-
1003
- class RunAggregationQueryResponse
1004
- # @private
1005
- class Representation < Google::Apis::Core::JsonRepresentation
1006
- property :read_time, as: 'readTime'
1007
- property :result, as: 'result', class: Google::Apis::FirestoreV1beta1::AggregationResult, decorator: Google::Apis::FirestoreV1beta1::AggregationResult::Representation
1008
-
1009
- property :transaction, :base64 => true, as: 'transaction'
1010
- end
1011
- end
1012
-
1013
931
  class RunQueryRequest
1014
932
  # @private
1015
933
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1027,6 +945,7 @@ module Google
1027
945
  class Representation < Google::Apis::Core::JsonRepresentation
1028
946
  property :document, as: 'document', class: Google::Apis::FirestoreV1beta1::Document, decorator: Google::Apis::FirestoreV1beta1::Document::Representation
1029
947
 
948
+ property :done, as: 'done'
1030
949
  property :read_time, as: 'readTime'
1031
950
  property :skipped_results, as: 'skippedResults'
1032
951
  property :transaction, :base64 => true, as: 'transaction'
@@ -1042,16 +961,6 @@ module Google
1042
961
  end
1043
962
  end
1044
963
 
1045
- class StructuredAggregationQuery
1046
- # @private
1047
- class Representation < Google::Apis::Core::JsonRepresentation
1048
- collection :aggregations, as: 'aggregations', class: Google::Apis::FirestoreV1beta1::Aggregation, decorator: Google::Apis::FirestoreV1beta1::Aggregation::Representation
1049
-
1050
- property :structured_query, as: 'structuredQuery', class: Google::Apis::FirestoreV1beta1::StructuredQuery, decorator: Google::Apis::FirestoreV1beta1::StructuredQuery::Representation
1051
-
1052
- end
1053
- end
1054
-
1055
964
  class StructuredQuery
1056
965
  # @private
1057
966
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -717,47 +717,6 @@ module Google
717
717
  execute_or_queue_command(command, &block)
718
718
  end
719
719
 
720
- # Runs an aggregation query. Rather than producing Document results like
721
- # Firestore.RunQuery, this API allows running an aggregation to produce a series
722
- # of AggregationResult server-side. High-Level Example: ``` -- Return the number
723
- # of documents in table given a filter. SELECT COUNT(*) FROM ( SELECT * FROM k
724
- # where a = true ); ```
725
- # @param [String] parent
726
- # Required. The parent resource name. In the format: `projects/`project_id`/
727
- # databases/`database_id`/documents` or `projects/`project_id`/databases/`
728
- # database_id`/documents/`document_path``. For example: `projects/my-project/
729
- # databases/my-database/documents` or `projects/my-project/databases/my-database/
730
- # documents/chatrooms/my-chatroom`
731
- # @param [Google::Apis::FirestoreV1beta1::RunAggregationQueryRequest] run_aggregation_query_request_object
732
- # @param [String] fields
733
- # Selector specifying which fields to include in a partial response.
734
- # @param [String] quota_user
735
- # Available to use for quota purposes for server-side applications. Can be any
736
- # arbitrary string assigned to a user, but should not exceed 40 characters.
737
- # @param [Google::Apis::RequestOptions] options
738
- # Request-specific options
739
- #
740
- # @yield [result, err] Result & error if block supplied
741
- # @yieldparam result [Google::Apis::FirestoreV1beta1::RunAggregationQueryResponse] parsed result object
742
- # @yieldparam err [StandardError] error object if request failed
743
- #
744
- # @return [Google::Apis::FirestoreV1beta1::RunAggregationQueryResponse]
745
- #
746
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
747
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
748
- # @raise [Google::Apis::AuthorizationError] Authorization is required
749
- def run_document_aggregation_query(parent, run_aggregation_query_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
750
- command = make_simple_command(:post, 'v1beta1/{+parent}:runAggregationQuery', options)
751
- command.request_representation = Google::Apis::FirestoreV1beta1::RunAggregationQueryRequest::Representation
752
- command.request_object = run_aggregation_query_request_object
753
- command.response_representation = Google::Apis::FirestoreV1beta1::RunAggregationQueryResponse::Representation
754
- command.response_class = Google::Apis::FirestoreV1beta1::RunAggregationQueryResponse
755
- command.params['parent'] = parent unless parent.nil?
756
- command.query['fields'] = fields unless fields.nil?
757
- command.query['quotaUser'] = quota_user unless quota_user.nil?
758
- execute_or_queue_command(command, &block)
759
- end
760
-
761
720
  # Runs a query.
762
721
  # @param [String] parent
763
722
  # Required. The parent resource name. In the format: `projects/`project_id`/
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-firestore_v1beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-11 00:00:00.000000000 Z
11
+ date: 2022-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -58,7 +58,7 @@ licenses:
58
58
  metadata:
59
59
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
60
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-firestore_v1beta1/CHANGELOG.md
61
- documentation_uri: https://googleapis.dev/ruby/google-apis-firestore_v1beta1/v0.14.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-firestore_v1beta1/v0.15.0
62
62
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-firestore_v1beta1
63
63
  post_install_message:
64
64
  rdoc_options: []