google-apis-firestore_v1beta1 0.11.0 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/google/apis/firestore_v1beta1/classes.rb +191 -3
- data/lib/google/apis/firestore_v1beta1/gem_version.rb +2 -2
- data/lib/google/apis/firestore_v1beta1/representations.rb +94 -0
- data/lib/google/apis/firestore_v1beta1/service.rb +106 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4d68fd45f0a34837336b1cde95add12b38129d2689d37e4333a18353a7658fa
|
4
|
+
data.tar.gz: 7a32f14bc19c4c228e29764ed65fbbde12ac0477de3281b964054c8e7f7a26ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5bf55367115f6aece8b1777fc5aa5b41ac409696b079c7d93a0e2545d0ce8a5263220068f6314dddae3cbd1e5caf26c00fe17298a544915ece2a95f9f98c045
|
7
|
+
data.tar.gz: 9235cacce28e4a66a390909231f39d303ac60d6fb6c560beb6ddde90946c0dc36b68b25d17e87514d3089c6354310b7cf251846f422d3650e7b7b8357f098a1a
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# Release history for google-apis-firestore_v1beta1
|
2
2
|
|
3
|
+
### v0.14.0 (2022-04-09)
|
4
|
+
|
5
|
+
* Regenerated from discovery document revision 20220402
|
6
|
+
|
7
|
+
### v0.13.0 (2022-03-30)
|
8
|
+
|
9
|
+
* Regenerated from discovery document revision 20220319
|
10
|
+
|
11
|
+
### v0.12.0 (2022-03-19)
|
12
|
+
|
13
|
+
* Regenerated from discovery document revision 20220305
|
14
|
+
|
3
15
|
### v0.11.0 (2022-03-04)
|
4
16
|
|
5
17
|
* Regenerated from discovery document revision 20220221
|
@@ -22,6 +22,57 @@ 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
|
+
|
25
76
|
# An array value.
|
26
77
|
class ArrayValue
|
27
78
|
include Google::Apis::Core::Hashable
|
@@ -313,7 +364,7 @@ module Google
|
|
313
364
|
class CompositeFilter
|
314
365
|
include Google::Apis::Core::Hashable
|
315
366
|
|
316
|
-
# The list of filters to combine.
|
367
|
+
# The list of filters to combine. Requires: * At least one filter is present.
|
317
368
|
# Corresponds to the JSON property `filters`
|
318
369
|
# @return [Array<Google::Apis::FirestoreV1beta1::Filter>]
|
319
370
|
attr_accessor :filters
|
@@ -334,6 +385,30 @@ module Google
|
|
334
385
|
end
|
335
386
|
end
|
336
387
|
|
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
|
+
|
337
412
|
# A position in a query result set.
|
338
413
|
class Cursor
|
339
414
|
include Google::Apis::Core::Hashable
|
@@ -598,8 +673,7 @@ module Google
|
|
598
673
|
# A generic empty message that you can re-use to avoid defining duplicated empty
|
599
674
|
# messages in your APIs. A typical example is to use it as the request or the
|
600
675
|
# response type of an API method. For instance: service Foo ` rpc Bar(google.
|
601
|
-
# protobuf.Empty) returns (google.protobuf.Empty); `
|
602
|
-
# `Empty` is empty JSON object ````.
|
676
|
+
# protobuf.Empty) returns (google.protobuf.Empty); `
|
603
677
|
class Empty
|
604
678
|
include Google::Apis::Core::Hashable
|
605
679
|
|
@@ -1269,6 +1343,12 @@ module Google
|
|
1269
1343
|
# @return [String]
|
1270
1344
|
attr_accessor :page_token
|
1271
1345
|
|
1346
|
+
# Reads documents as they were at the given time. This may not be older than 270
|
1347
|
+
# seconds.
|
1348
|
+
# Corresponds to the JSON property `readTime`
|
1349
|
+
# @return [String]
|
1350
|
+
attr_accessor :read_time
|
1351
|
+
|
1272
1352
|
def initialize(**args)
|
1273
1353
|
update!(**args)
|
1274
1354
|
end
|
@@ -1277,6 +1357,7 @@ module Google
|
|
1277
1357
|
def update!(**args)
|
1278
1358
|
@page_size = args[:page_size] if args.key?(:page_size)
|
1279
1359
|
@page_token = args[:page_token] if args.key?(:page_token)
|
1360
|
+
@read_time = args[:read_time] if args.key?(:read_time)
|
1280
1361
|
end
|
1281
1362
|
end
|
1282
1363
|
|
@@ -1497,6 +1578,12 @@ module Google
|
|
1497
1578
|
# @return [Fixnum]
|
1498
1579
|
attr_accessor :partition_count
|
1499
1580
|
|
1581
|
+
# Reads documents as they were at the given time. This may not be older than 270
|
1582
|
+
# seconds.
|
1583
|
+
# Corresponds to the JSON property `readTime`
|
1584
|
+
# @return [String]
|
1585
|
+
attr_accessor :read_time
|
1586
|
+
|
1500
1587
|
# A Firestore query.
|
1501
1588
|
# Corresponds to the JSON property `structuredQuery`
|
1502
1589
|
# @return [Google::Apis::FirestoreV1beta1::StructuredQuery]
|
@@ -1511,6 +1598,7 @@ module Google
|
|
1511
1598
|
@page_size = args[:page_size] if args.key?(:page_size)
|
1512
1599
|
@page_token = args[:page_token] if args.key?(:page_token)
|
1513
1600
|
@partition_count = args[:partition_count] if args.key?(:partition_count)
|
1601
|
+
@read_time = args[:read_time] if args.key?(:read_time)
|
1514
1602
|
@structured_query = args[:structured_query] if args.key?(:structured_query)
|
1515
1603
|
end
|
1516
1604
|
end
|
@@ -1686,6 +1774,81 @@ module Google
|
|
1686
1774
|
end
|
1687
1775
|
end
|
1688
1776
|
|
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
|
+
|
1689
1852
|
# The request for Firestore.RunQuery.
|
1690
1853
|
class RunQueryRequest
|
1691
1854
|
include Google::Apis::Core::Hashable
|
@@ -1810,6 +1973,31 @@ module Google
|
|
1810
1973
|
end
|
1811
1974
|
end
|
1812
1975
|
|
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
|
+
|
1813
2001
|
# A Firestore query.
|
1814
2002
|
class StructuredQuery
|
1815
2003
|
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.
|
19
|
+
GEM_VERSION = "0.14.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 = "
|
25
|
+
REVISION = "20220402"
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -22,6 +22,18 @@ 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
|
+
|
25
37
|
class ArrayValue
|
26
38
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
27
39
|
|
@@ -88,6 +100,12 @@ module Google
|
|
88
100
|
include Google::Apis::Core::JsonObjectSupport
|
89
101
|
end
|
90
102
|
|
103
|
+
class Count
|
104
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
105
|
+
|
106
|
+
include Google::Apis::Core::JsonObjectSupport
|
107
|
+
end
|
108
|
+
|
91
109
|
class Cursor
|
92
110
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
93
111
|
|
@@ -346,6 +364,18 @@ module Google
|
|
346
364
|
include Google::Apis::Core::JsonObjectSupport
|
347
365
|
end
|
348
366
|
|
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
|
+
|
349
379
|
class RunQueryRequest
|
350
380
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
351
381
|
|
@@ -364,6 +394,12 @@ module Google
|
|
364
394
|
include Google::Apis::Core::JsonObjectSupport
|
365
395
|
end
|
366
396
|
|
397
|
+
class StructuredAggregationQuery
|
398
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
399
|
+
|
400
|
+
include Google::Apis::Core::JsonObjectSupport
|
401
|
+
end
|
402
|
+
|
367
403
|
class StructuredQuery
|
368
404
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
369
405
|
|
@@ -424,6 +460,23 @@ module Google
|
|
424
460
|
include Google::Apis::Core::JsonObjectSupport
|
425
461
|
end
|
426
462
|
|
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
|
+
|
427
480
|
class ArrayValue
|
428
481
|
# @private
|
429
482
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -525,6 +578,13 @@ module Google
|
|
525
578
|
end
|
526
579
|
end
|
527
580
|
|
581
|
+
class Count
|
582
|
+
# @private
|
583
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
584
|
+
property :up_to, as: 'upTo'
|
585
|
+
end
|
586
|
+
end
|
587
|
+
|
528
588
|
class Cursor
|
529
589
|
# @private
|
530
590
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -797,6 +857,7 @@ module Google
|
|
797
857
|
class Representation < Google::Apis::Core::JsonRepresentation
|
798
858
|
property :page_size, as: 'pageSize'
|
799
859
|
property :page_token, as: 'pageToken'
|
860
|
+
property :read_time, as: 'readTime'
|
800
861
|
end
|
801
862
|
end
|
802
863
|
|
@@ -866,6 +927,7 @@ module Google
|
|
866
927
|
property :page_size, as: 'pageSize'
|
867
928
|
property :page_token, as: 'pageToken'
|
868
929
|
property :partition_count, :numeric_string => true, as: 'partitionCount'
|
930
|
+
property :read_time, as: 'readTime'
|
869
931
|
property :structured_query, as: 'structuredQuery', class: Google::Apis::FirestoreV1beta1::StructuredQuery, decorator: Google::Apis::FirestoreV1beta1::StructuredQuery::Representation
|
870
932
|
|
871
933
|
end
|
@@ -926,6 +988,28 @@ module Google
|
|
926
988
|
end
|
927
989
|
end
|
928
990
|
|
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
|
+
|
929
1013
|
class RunQueryRequest
|
930
1014
|
# @private
|
931
1015
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -958,6 +1042,16 @@ module Google
|
|
958
1042
|
end
|
959
1043
|
end
|
960
1044
|
|
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
|
+
|
961
1055
|
class StructuredQuery
|
962
1056
|
# @private
|
963
1057
|
class Representation < Google::Apis::Core::JsonRepresentation
|
@@ -497,6 +497,71 @@ module Google
|
|
497
497
|
execute_or_queue_command(command, &block)
|
498
498
|
end
|
499
499
|
|
500
|
+
# Lists documents.
|
501
|
+
# @param [String] parent
|
502
|
+
# Required. The parent resource name. In the format: `projects/`project_id`/
|
503
|
+
# databases/`database_id`/documents` or `projects/`project_id`/databases/`
|
504
|
+
# database_id`/documents/`document_path``. For example: `projects/my-project/
|
505
|
+
# databases/my-database/documents` or `projects/my-project/databases/my-database/
|
506
|
+
# documents/chatrooms/my-chatroom`
|
507
|
+
# @param [String] collection_id
|
508
|
+
# Required. The collection ID, relative to `parent`, to list. For example: `
|
509
|
+
# chatrooms` or `messages`.
|
510
|
+
# @param [Array<String>, String] mask_field_paths
|
511
|
+
# The list of field paths in the mask. See Document.fields for a field path
|
512
|
+
# syntax reference.
|
513
|
+
# @param [String] order_by
|
514
|
+
# The order to sort results by. For example: `priority desc, name`.
|
515
|
+
# @param [Fixnum] page_size
|
516
|
+
# The maximum number of documents to return.
|
517
|
+
# @param [String] page_token
|
518
|
+
# The `next_page_token` value returned from a previous List request, if any.
|
519
|
+
# @param [String] read_time
|
520
|
+
# Reads documents as they were at the given time. This may not be older than 270
|
521
|
+
# seconds.
|
522
|
+
# @param [Boolean] show_missing
|
523
|
+
# If the list should show missing documents. A missing document is a document
|
524
|
+
# that does not exist but has sub-documents. These documents will be returned
|
525
|
+
# with a key but will not have fields, Document.create_time, or Document.
|
526
|
+
# update_time set. Requests with `show_missing` may not specify `where` or `
|
527
|
+
# order_by`.
|
528
|
+
# @param [String] transaction
|
529
|
+
# Reads documents in a transaction.
|
530
|
+
# @param [String] fields
|
531
|
+
# Selector specifying which fields to include in a partial response.
|
532
|
+
# @param [String] quota_user
|
533
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
534
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
535
|
+
# @param [Google::Apis::RequestOptions] options
|
536
|
+
# Request-specific options
|
537
|
+
#
|
538
|
+
# @yield [result, err] Result & error if block supplied
|
539
|
+
# @yieldparam result [Google::Apis::FirestoreV1beta1::ListDocumentsResponse] parsed result object
|
540
|
+
# @yieldparam err [StandardError] error object if request failed
|
541
|
+
#
|
542
|
+
# @return [Google::Apis::FirestoreV1beta1::ListDocumentsResponse]
|
543
|
+
#
|
544
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
545
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
546
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
547
|
+
def list_project_database_document_documents(parent, collection_id, mask_field_paths: nil, order_by: nil, page_size: nil, page_token: nil, read_time: nil, show_missing: nil, transaction: nil, fields: nil, quota_user: nil, options: nil, &block)
|
548
|
+
command = make_simple_command(:get, 'v1beta1/{+parent}/{collectionId}', options)
|
549
|
+
command.response_representation = Google::Apis::FirestoreV1beta1::ListDocumentsResponse::Representation
|
550
|
+
command.response_class = Google::Apis::FirestoreV1beta1::ListDocumentsResponse
|
551
|
+
command.params['parent'] = parent unless parent.nil?
|
552
|
+
command.params['collectionId'] = collection_id unless collection_id.nil?
|
553
|
+
command.query['mask.fieldPaths'] = mask_field_paths unless mask_field_paths.nil?
|
554
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
555
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
556
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
557
|
+
command.query['readTime'] = read_time unless read_time.nil?
|
558
|
+
command.query['showMissing'] = show_missing unless show_missing.nil?
|
559
|
+
command.query['transaction'] = transaction unless transaction.nil?
|
560
|
+
command.query['fields'] = fields unless fields.nil?
|
561
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
562
|
+
execute_or_queue_command(command, &block)
|
563
|
+
end
|
564
|
+
|
500
565
|
# Listens to changes.
|
501
566
|
# @param [String] database
|
502
567
|
# Required. The database name. In the format: `projects/`project_id`/databases/`
|
@@ -652,6 +717,47 @@ module Google
|
|
652
717
|
execute_or_queue_command(command, &block)
|
653
718
|
end
|
654
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
|
+
|
655
761
|
# Runs a query.
|
656
762
|
# @param [String] parent
|
657
763
|
# 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.
|
4
|
+
version: 0.14.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-
|
11
|
+
date: 2022-04-11 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.
|
61
|
+
documentation_uri: https://googleapis.dev/ruby/google-apis-firestore_v1beta1/v0.14.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: []
|