google-cloud-firestore-v1 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/firestore/v1/firestore/client.rb +30 -17
- data/lib/google/cloud/firestore/v1/firestore/rest/client.rb +31 -12
- data/lib/google/cloud/firestore/v1/firestore/rest/service_stub.rb +105 -68
- data/lib/google/cloud/firestore/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +56 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e3946f134f47bb01d97f593b495d551d5ee8e3fbf37e9da7188c21eff5d7d1b
|
4
|
+
data.tar.gz: 0fa14b11306092449b176a8da701809cdaaba15887da6b7f9721e8d13c51792a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 410874675fe7cac03c0ca1a04ba1bdfffd0ad5bcb8e16d1d7b28eb107baed3301d98198fa9c717c77cbf432739027b05f838e4b1403115e5da5930d1ad9214ed
|
7
|
+
data.tar.gz: 2c001f6d685436333ee276debdd8e145955615003f08cf45eed355ed62a805016f2f66f64dca8188844515b52bce4ffb0464d11e4a941965cac5a9c87a721185
|
data/README.md
CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/firestore)
|
44
44
|
for general usage information.
|
45
45
|
|
46
|
-
##
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
46
|
+
## Debug Logging
|
47
|
+
|
48
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
49
|
+
your application's integration with the API. When logging is activated, key
|
50
|
+
events such as requests and responses, along with data payloads and metadata
|
51
|
+
such as headers and client configuration, are logged to the standard error
|
52
|
+
stream.
|
53
|
+
|
54
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
55
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
56
|
+
customers, private keys, or other security data that could be compromising if
|
57
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
58
|
+
the principle of least access. Google also recommends that Client Library Debug
|
59
|
+
Logging be enabled only temporarily during active debugging, and not used
|
60
|
+
permanently in production.
|
61
|
+
|
62
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
63
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
64
|
+
list of client library gem names. This will select the default logging behavior,
|
65
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
66
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
67
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
68
|
+
results in logs appearing alongside your application logs in the
|
69
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
70
|
+
|
71
|
+
You can customize logging by modifying the `logger` configuration when
|
72
|
+
constructing a client object. For example:
|
55
73
|
|
56
74
|
```ruby
|
75
|
+
require "google/cloud/firestore/v1"
|
57
76
|
require "logger"
|
58
77
|
|
59
|
-
|
60
|
-
|
61
|
-
def logger
|
62
|
-
LOGGER
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
# Define a gRPC module-level logger method before grpc/logconfig.rb loads.
|
67
|
-
module GRPC
|
68
|
-
extend MyLogger
|
78
|
+
client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config|
|
79
|
+
config.logger = Logger.new "my-app.log"
|
69
80
|
end
|
70
81
|
```
|
71
82
|
|
72
|
-
|
73
83
|
## Google Cloud Samples
|
74
84
|
|
75
85
|
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
@@ -240,14 +240,26 @@ module Google
|
|
240
240
|
universe_domain: @config.universe_domain,
|
241
241
|
channel_args: @config.channel_args,
|
242
242
|
interceptors: @config.interceptors,
|
243
|
-
channel_pool_config: @config.channel_pool
|
243
|
+
channel_pool_config: @config.channel_pool,
|
244
|
+
logger: @config.logger
|
244
245
|
)
|
245
246
|
|
247
|
+
@firestore_stub.stub_logger&.info do |entry|
|
248
|
+
entry.set_system_name
|
249
|
+
entry.set_service
|
250
|
+
entry.message = "Created client for #{entry.service}"
|
251
|
+
entry.set_credentials_fields credentials
|
252
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
253
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
254
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
255
|
+
end
|
256
|
+
|
246
257
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
247
258
|
config.credentials = credentials
|
248
259
|
config.quota_project = @quota_project_id
|
249
260
|
config.endpoint = @firestore_stub.endpoint
|
250
261
|
config.universe_domain = @firestore_stub.universe_domain
|
262
|
+
config.logger = @firestore_stub.logger if config.respond_to? :logger=
|
251
263
|
end
|
252
264
|
end
|
253
265
|
|
@@ -258,6 +270,15 @@ module Google
|
|
258
270
|
#
|
259
271
|
attr_reader :location_client
|
260
272
|
|
273
|
+
##
|
274
|
+
# The logger used for request/response debug logging.
|
275
|
+
#
|
276
|
+
# @return [Logger]
|
277
|
+
#
|
278
|
+
def logger
|
279
|
+
@firestore_stub.logger
|
280
|
+
end
|
281
|
+
|
261
282
|
# Service calls
|
262
283
|
|
263
284
|
##
|
@@ -354,7 +375,6 @@ module Google
|
|
354
375
|
|
355
376
|
@firestore_stub.call_rpc :get_document, request, options: options do |response, operation|
|
356
377
|
yield response, operation if block_given?
|
357
|
-
return response
|
358
378
|
end
|
359
379
|
rescue ::GRPC::BadStatus => e
|
360
380
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -502,7 +522,7 @@ module Google
|
|
502
522
|
@firestore_stub.call_rpc :list_documents, request, options: options do |response, operation|
|
503
523
|
response = ::Gapic::PagedEnumerable.new @firestore_stub, :list_documents, request, response, operation, options
|
504
524
|
yield response, operation if block_given?
|
505
|
-
|
525
|
+
throw :response, response
|
506
526
|
end
|
507
527
|
rescue ::GRPC::BadStatus => e
|
508
528
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -605,7 +625,6 @@ module Google
|
|
605
625
|
|
606
626
|
@firestore_stub.call_rpc :update_document, request, options: options do |response, operation|
|
607
627
|
yield response, operation if block_given?
|
608
|
-
return response
|
609
628
|
end
|
610
629
|
rescue ::GRPC::BadStatus => e
|
611
630
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -695,7 +714,6 @@ module Google
|
|
695
714
|
|
696
715
|
@firestore_stub.call_rpc :delete_document, request, options: options do |response, operation|
|
697
716
|
yield response, operation if block_given?
|
698
|
-
return response
|
699
717
|
end
|
700
718
|
rescue ::GRPC::BadStatus => e
|
701
719
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -811,7 +829,6 @@ module Google
|
|
811
829
|
|
812
830
|
@firestore_stub.call_rpc :batch_get_documents, request, options: options do |response, operation|
|
813
831
|
yield response, operation if block_given?
|
814
|
-
return response
|
815
832
|
end
|
816
833
|
rescue ::GRPC::BadStatus => e
|
817
834
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -901,7 +918,6 @@ module Google
|
|
901
918
|
|
902
919
|
@firestore_stub.call_rpc :begin_transaction, request, options: options do |response, operation|
|
903
920
|
yield response, operation if block_given?
|
904
|
-
return response
|
905
921
|
end
|
906
922
|
rescue ::GRPC::BadStatus => e
|
907
923
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -994,7 +1010,6 @@ module Google
|
|
994
1010
|
|
995
1011
|
@firestore_stub.call_rpc :commit, request, options: options do |response, operation|
|
996
1012
|
yield response, operation if block_given?
|
997
|
-
return response
|
998
1013
|
end
|
999
1014
|
rescue ::GRPC::BadStatus => e
|
1000
1015
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1083,7 +1098,6 @@ module Google
|
|
1083
1098
|
|
1084
1099
|
@firestore_stub.call_rpc :rollback, request, options: options do |response, operation|
|
1085
1100
|
yield response, operation if block_given?
|
1086
|
-
return response
|
1087
1101
|
end
|
1088
1102
|
rescue ::GRPC::BadStatus => e
|
1089
1103
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1197,7 +1211,6 @@ module Google
|
|
1197
1211
|
|
1198
1212
|
@firestore_stub.call_rpc :run_query, request, options: options do |response, operation|
|
1199
1213
|
yield response, operation if block_given?
|
1200
|
-
return response
|
1201
1214
|
end
|
1202
1215
|
rescue ::GRPC::BadStatus => e
|
1203
1216
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1323,7 +1336,6 @@ module Google
|
|
1323
1336
|
|
1324
1337
|
@firestore_stub.call_rpc :run_aggregation_query, request, options: options do |response, operation|
|
1325
1338
|
yield response, operation if block_given?
|
1326
|
-
return response
|
1327
1339
|
end
|
1328
1340
|
rescue ::GRPC::BadStatus => e
|
1329
1341
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1461,7 +1473,7 @@ module Google
|
|
1461
1473
|
@firestore_stub.call_rpc :partition_query, request, options: options do |response, operation|
|
1462
1474
|
response = ::Gapic::PagedEnumerable.new @firestore_stub, :partition_query, request, response, operation, options
|
1463
1475
|
yield response, operation if block_given?
|
1464
|
-
|
1476
|
+
throw :response, response
|
1465
1477
|
end
|
1466
1478
|
rescue ::GRPC::BadStatus => e
|
1467
1479
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1541,7 +1553,6 @@ module Google
|
|
1541
1553
|
|
1542
1554
|
@firestore_stub.call_rpc :write, request, options: options do |response, operation|
|
1543
1555
|
yield response, operation if block_given?
|
1544
|
-
return response
|
1545
1556
|
end
|
1546
1557
|
rescue ::GRPC::BadStatus => e
|
1547
1558
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1621,7 +1632,6 @@ module Google
|
|
1621
1632
|
|
1622
1633
|
@firestore_stub.call_rpc :listen, request, options: options do |response, operation|
|
1623
1634
|
yield response, operation if block_given?
|
1624
|
-
return response
|
1625
1635
|
end
|
1626
1636
|
rescue ::GRPC::BadStatus => e
|
1627
1637
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1721,7 +1731,6 @@ module Google
|
|
1721
1731
|
|
1722
1732
|
@firestore_stub.call_rpc :list_collection_ids, request, options: options do |response, operation|
|
1723
1733
|
yield response, operation if block_given?
|
1724
|
-
return response
|
1725
1734
|
end
|
1726
1735
|
rescue ::GRPC::BadStatus => e
|
1727
1736
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1825,7 +1834,6 @@ module Google
|
|
1825
1834
|
|
1826
1835
|
@firestore_stub.call_rpc :batch_write, request, options: options do |response, operation|
|
1827
1836
|
yield response, operation if block_given?
|
1828
|
-
return response
|
1829
1837
|
end
|
1830
1838
|
rescue ::GRPC::BadStatus => e
|
1831
1839
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1930,7 +1938,6 @@ module Google
|
|
1930
1938
|
|
1931
1939
|
@firestore_stub.call_rpc :create_document, request, options: options do |response, operation|
|
1932
1940
|
yield response, operation if block_given?
|
1933
|
-
return response
|
1934
1941
|
end
|
1935
1942
|
rescue ::GRPC::BadStatus => e
|
1936
1943
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2019,6 +2026,11 @@ module Google
|
|
2019
2026
|
# default endpoint URL. The default value of nil uses the environment
|
2020
2027
|
# universe (usually the default "googleapis.com" universe).
|
2021
2028
|
# @return [::String,nil]
|
2029
|
+
# @!attribute [rw] logger
|
2030
|
+
# A custom logger to use for request/response debug logging, or the value
|
2031
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
2032
|
+
# explicitly disable logging.
|
2033
|
+
# @return [::Logger,:default,nil]
|
2022
2034
|
#
|
2023
2035
|
class Configuration
|
2024
2036
|
extend ::Gapic::Config
|
@@ -2043,6 +2055,7 @@ module Google
|
|
2043
2055
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2044
2056
|
config_attr :quota_project, nil, ::String, nil
|
2045
2057
|
config_attr :universe_domain, nil, ::String, nil
|
2058
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
2046
2059
|
|
2047
2060
|
# @private
|
2048
2061
|
def initialize parent_config = nil
|
@@ -226,14 +226,26 @@ module Google
|
|
226
226
|
endpoint: @config.endpoint,
|
227
227
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
228
228
|
universe_domain: @config.universe_domain,
|
229
|
-
credentials: credentials
|
229
|
+
credentials: credentials,
|
230
|
+
logger: @config.logger
|
230
231
|
)
|
231
232
|
|
233
|
+
@firestore_stub.logger(stub: true)&.info do |entry|
|
234
|
+
entry.set_system_name
|
235
|
+
entry.set_service
|
236
|
+
entry.message = "Created client for #{entry.service}"
|
237
|
+
entry.set_credentials_fields credentials
|
238
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
239
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
240
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
241
|
+
end
|
242
|
+
|
232
243
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
233
244
|
config.credentials = credentials
|
234
245
|
config.quota_project = @quota_project_id
|
235
246
|
config.endpoint = @firestore_stub.endpoint
|
236
247
|
config.universe_domain = @firestore_stub.universe_domain
|
248
|
+
config.logger = @firestore_stub.logger if config.respond_to? :logger=
|
237
249
|
end
|
238
250
|
end
|
239
251
|
|
@@ -244,6 +256,15 @@ module Google
|
|
244
256
|
#
|
245
257
|
attr_reader :location_client
|
246
258
|
|
259
|
+
##
|
260
|
+
# The logger used for request/response debug logging.
|
261
|
+
#
|
262
|
+
# @return [Logger]
|
263
|
+
#
|
264
|
+
def logger
|
265
|
+
@firestore_stub.logger
|
266
|
+
end
|
267
|
+
|
247
268
|
# Service calls
|
248
269
|
|
249
270
|
##
|
@@ -333,7 +354,6 @@ module Google
|
|
333
354
|
|
334
355
|
@firestore_stub.get_document request, options do |result, operation|
|
335
356
|
yield result, operation if block_given?
|
336
|
-
return result
|
337
357
|
end
|
338
358
|
rescue ::Gapic::Rest::Error => e
|
339
359
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -471,7 +491,7 @@ module Google
|
|
471
491
|
@firestore_stub.list_documents request, options do |result, operation|
|
472
492
|
result = ::Gapic::Rest::PagedEnumerable.new @firestore_stub, :list_documents, "documents", request, result, options
|
473
493
|
yield result, operation if block_given?
|
474
|
-
|
494
|
+
throw :response, result
|
475
495
|
end
|
476
496
|
rescue ::Gapic::Rest::Error => e
|
477
497
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -567,7 +587,6 @@ module Google
|
|
567
587
|
|
568
588
|
@firestore_stub.update_document request, options do |result, operation|
|
569
589
|
yield result, operation if block_given?
|
570
|
-
return result
|
571
590
|
end
|
572
591
|
rescue ::Gapic::Rest::Error => e
|
573
592
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -650,7 +669,6 @@ module Google
|
|
650
669
|
|
651
670
|
@firestore_stub.delete_document request, options do |result, operation|
|
652
671
|
yield result, operation if block_given?
|
653
|
-
return result
|
654
672
|
end
|
655
673
|
rescue ::Gapic::Rest::Error => e
|
656
674
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -843,7 +861,6 @@ module Google
|
|
843
861
|
|
844
862
|
@firestore_stub.begin_transaction request, options do |result, operation|
|
845
863
|
yield result, operation if block_given?
|
846
|
-
return result
|
847
864
|
end
|
848
865
|
rescue ::Gapic::Rest::Error => e
|
849
866
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -929,7 +946,6 @@ module Google
|
|
929
946
|
|
930
947
|
@firestore_stub.commit request, options do |result, operation|
|
931
948
|
yield result, operation if block_given?
|
932
|
-
return result
|
933
949
|
end
|
934
950
|
rescue ::Gapic::Rest::Error => e
|
935
951
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1011,7 +1027,6 @@ module Google
|
|
1011
1027
|
|
1012
1028
|
@firestore_stub.rollback request, options do |result, operation|
|
1013
1029
|
yield result, operation if block_given?
|
1014
|
-
return result
|
1015
1030
|
end
|
1016
1031
|
rescue ::Gapic::Rest::Error => e
|
1017
1032
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1370,7 +1385,7 @@ module Google
|
|
1370
1385
|
@firestore_stub.partition_query request, options do |result, operation|
|
1371
1386
|
result = ::Gapic::Rest::PagedEnumerable.new @firestore_stub, :partition_query, "partitions", request, result, options
|
1372
1387
|
yield result, operation if block_given?
|
1373
|
-
|
1388
|
+
throw :response, result
|
1374
1389
|
end
|
1375
1390
|
rescue ::Gapic::Rest::Error => e
|
1376
1391
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1464,7 +1479,7 @@ module Google
|
|
1464
1479
|
@firestore_stub.list_collection_ids request, options do |result, operation|
|
1465
1480
|
result = ::Gapic::Rest::PagedEnumerable.new @firestore_stub, :list_collection_ids, "collection_ids", request, result, options
|
1466
1481
|
yield result, operation if block_given?
|
1467
|
-
|
1482
|
+
throw :response, result
|
1468
1483
|
end
|
1469
1484
|
rescue ::Gapic::Rest::Error => e
|
1470
1485
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1561,7 +1576,6 @@ module Google
|
|
1561
1576
|
|
1562
1577
|
@firestore_stub.batch_write request, options do |result, operation|
|
1563
1578
|
yield result, operation if block_given?
|
1564
|
-
return result
|
1565
1579
|
end
|
1566
1580
|
rescue ::Gapic::Rest::Error => e
|
1567
1581
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1656,7 +1670,6 @@ module Google
|
|
1656
1670
|
|
1657
1671
|
@firestore_stub.create_document request, options do |result, operation|
|
1658
1672
|
yield result, operation if block_given?
|
1659
|
-
return result
|
1660
1673
|
end
|
1661
1674
|
rescue ::Gapic::Rest::Error => e
|
1662
1675
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1736,6 +1749,11 @@ module Google
|
|
1736
1749
|
# default endpoint URL. The default value of nil uses the environment
|
1737
1750
|
# universe (usually the default "googleapis.com" universe).
|
1738
1751
|
# @return [::String,nil]
|
1752
|
+
# @!attribute [rw] logger
|
1753
|
+
# A custom logger to use for request/response debug logging, or the value
|
1754
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1755
|
+
# explicitly disable logging.
|
1756
|
+
# @return [::Logger,:default,nil]
|
1739
1757
|
#
|
1740
1758
|
class Configuration
|
1741
1759
|
extend ::Gapic::Config
|
@@ -1757,6 +1775,7 @@ module Google
|
|
1757
1775
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1758
1776
|
config_attr :quota_project, nil, ::String, nil
|
1759
1777
|
config_attr :universe_domain, nil, ::String, nil
|
1778
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1760
1779
|
|
1761
1780
|
# @private
|
1762
1781
|
def initialize parent_config = nil
|
@@ -30,7 +30,8 @@ module Google
|
|
30
30
|
# including transcoding, making the REST call, and deserialing the response.
|
31
31
|
#
|
32
32
|
class ServiceStub
|
33
|
-
|
33
|
+
# @private
|
34
|
+
def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
|
34
35
|
# These require statements are intentionally placed here to initialize
|
35
36
|
# the REST modules only when it's required.
|
36
37
|
require "gapic/rest"
|
@@ -40,7 +41,9 @@ module Google
|
|
40
41
|
universe_domain: universe_domain,
|
41
42
|
credentials: credentials,
|
42
43
|
numeric_enums: true,
|
43
|
-
|
44
|
+
service_name: self.class,
|
45
|
+
raise_faraday_errors: false,
|
46
|
+
logger: logger
|
44
47
|
end
|
45
48
|
|
46
49
|
##
|
@@ -61,6 +64,15 @@ module Google
|
|
61
64
|
@client_stub.endpoint
|
62
65
|
end
|
63
66
|
|
67
|
+
##
|
68
|
+
# The logger used for request/response debug logging.
|
69
|
+
#
|
70
|
+
# @return [Logger]
|
71
|
+
#
|
72
|
+
def logger stub: false
|
73
|
+
stub ? @client_stub.stub_logger : @client_stub.logger
|
74
|
+
end
|
75
|
+
|
64
76
|
##
|
65
77
|
# Baseline implementation for the get_document REST call
|
66
78
|
#
|
@@ -87,16 +99,18 @@ module Google
|
|
87
99
|
|
88
100
|
response = @client_stub.make_http_request(
|
89
101
|
verb,
|
90
|
-
uri:
|
91
|
-
body:
|
92
|
-
params:
|
102
|
+
uri: uri,
|
103
|
+
body: body || "",
|
104
|
+
params: query_string_params,
|
105
|
+
method_name: "get_document",
|
93
106
|
options: options
|
94
107
|
)
|
95
108
|
operation = ::Gapic::Rest::TransportOperation.new response
|
96
109
|
result = ::Google::Cloud::Firestore::V1::Document.decode_json response.body, ignore_unknown_fields: true
|
97
|
-
|
98
|
-
|
99
|
-
|
110
|
+
catch :response do
|
111
|
+
yield result, operation if block_given?
|
112
|
+
result
|
113
|
+
end
|
100
114
|
end
|
101
115
|
|
102
116
|
##
|
@@ -125,16 +139,18 @@ module Google
|
|
125
139
|
|
126
140
|
response = @client_stub.make_http_request(
|
127
141
|
verb,
|
128
|
-
uri:
|
129
|
-
body:
|
130
|
-
params:
|
142
|
+
uri: uri,
|
143
|
+
body: body || "",
|
144
|
+
params: query_string_params,
|
145
|
+
method_name: "list_documents",
|
131
146
|
options: options
|
132
147
|
)
|
133
148
|
operation = ::Gapic::Rest::TransportOperation.new response
|
134
149
|
result = ::Google::Cloud::Firestore::V1::ListDocumentsResponse.decode_json response.body, ignore_unknown_fields: true
|
135
|
-
|
136
|
-
|
137
|
-
|
150
|
+
catch :response do
|
151
|
+
yield result, operation if block_given?
|
152
|
+
result
|
153
|
+
end
|
138
154
|
end
|
139
155
|
|
140
156
|
##
|
@@ -163,16 +179,18 @@ module Google
|
|
163
179
|
|
164
180
|
response = @client_stub.make_http_request(
|
165
181
|
verb,
|
166
|
-
uri:
|
167
|
-
body:
|
168
|
-
params:
|
182
|
+
uri: uri,
|
183
|
+
body: body || "",
|
184
|
+
params: query_string_params,
|
185
|
+
method_name: "update_document",
|
169
186
|
options: options
|
170
187
|
)
|
171
188
|
operation = ::Gapic::Rest::TransportOperation.new response
|
172
189
|
result = ::Google::Cloud::Firestore::V1::Document.decode_json response.body, ignore_unknown_fields: true
|
173
|
-
|
174
|
-
|
175
|
-
|
190
|
+
catch :response do
|
191
|
+
yield result, operation if block_given?
|
192
|
+
result
|
193
|
+
end
|
176
194
|
end
|
177
195
|
|
178
196
|
##
|
@@ -201,16 +219,18 @@ module Google
|
|
201
219
|
|
202
220
|
response = @client_stub.make_http_request(
|
203
221
|
verb,
|
204
|
-
uri:
|
205
|
-
body:
|
206
|
-
params:
|
222
|
+
uri: uri,
|
223
|
+
body: body || "",
|
224
|
+
params: query_string_params,
|
225
|
+
method_name: "delete_document",
|
207
226
|
options: options
|
208
227
|
)
|
209
228
|
operation = ::Gapic::Rest::TransportOperation.new response
|
210
229
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
211
|
-
|
212
|
-
|
213
|
-
|
230
|
+
catch :response do
|
231
|
+
yield result, operation if block_given?
|
232
|
+
result
|
233
|
+
end
|
214
234
|
end
|
215
235
|
|
216
236
|
##
|
@@ -239,6 +259,7 @@ module Google
|
|
239
259
|
uri: uri,
|
240
260
|
body: body || "",
|
241
261
|
params: query_string_params,
|
262
|
+
method_name: "batch_get_documents",
|
242
263
|
options: options,
|
243
264
|
is_server_streaming: true,
|
244
265
|
&block
|
@@ -272,16 +293,18 @@ module Google
|
|
272
293
|
|
273
294
|
response = @client_stub.make_http_request(
|
274
295
|
verb,
|
275
|
-
uri:
|
276
|
-
body:
|
277
|
-
params:
|
296
|
+
uri: uri,
|
297
|
+
body: body || "",
|
298
|
+
params: query_string_params,
|
299
|
+
method_name: "begin_transaction",
|
278
300
|
options: options
|
279
301
|
)
|
280
302
|
operation = ::Gapic::Rest::TransportOperation.new response
|
281
303
|
result = ::Google::Cloud::Firestore::V1::BeginTransactionResponse.decode_json response.body, ignore_unknown_fields: true
|
282
|
-
|
283
|
-
|
284
|
-
|
304
|
+
catch :response do
|
305
|
+
yield result, operation if block_given?
|
306
|
+
result
|
307
|
+
end
|
285
308
|
end
|
286
309
|
|
287
310
|
##
|
@@ -310,16 +333,18 @@ module Google
|
|
310
333
|
|
311
334
|
response = @client_stub.make_http_request(
|
312
335
|
verb,
|
313
|
-
uri:
|
314
|
-
body:
|
315
|
-
params:
|
336
|
+
uri: uri,
|
337
|
+
body: body || "",
|
338
|
+
params: query_string_params,
|
339
|
+
method_name: "commit",
|
316
340
|
options: options
|
317
341
|
)
|
318
342
|
operation = ::Gapic::Rest::TransportOperation.new response
|
319
343
|
result = ::Google::Cloud::Firestore::V1::CommitResponse.decode_json response.body, ignore_unknown_fields: true
|
320
|
-
|
321
|
-
|
322
|
-
|
344
|
+
catch :response do
|
345
|
+
yield result, operation if block_given?
|
346
|
+
result
|
347
|
+
end
|
323
348
|
end
|
324
349
|
|
325
350
|
##
|
@@ -348,16 +373,18 @@ module Google
|
|
348
373
|
|
349
374
|
response = @client_stub.make_http_request(
|
350
375
|
verb,
|
351
|
-
uri:
|
352
|
-
body:
|
353
|
-
params:
|
376
|
+
uri: uri,
|
377
|
+
body: body || "",
|
378
|
+
params: query_string_params,
|
379
|
+
method_name: "rollback",
|
354
380
|
options: options
|
355
381
|
)
|
356
382
|
operation = ::Gapic::Rest::TransportOperation.new response
|
357
383
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
358
|
-
|
359
|
-
|
360
|
-
|
384
|
+
catch :response do
|
385
|
+
yield result, operation if block_given?
|
386
|
+
result
|
387
|
+
end
|
361
388
|
end
|
362
389
|
|
363
390
|
##
|
@@ -386,6 +413,7 @@ module Google
|
|
386
413
|
uri: uri,
|
387
414
|
body: body || "",
|
388
415
|
params: query_string_params,
|
416
|
+
method_name: "run_query",
|
389
417
|
options: options,
|
390
418
|
is_server_streaming: true,
|
391
419
|
&block
|
@@ -419,6 +447,7 @@ module Google
|
|
419
447
|
uri: uri,
|
420
448
|
body: body || "",
|
421
449
|
params: query_string_params,
|
450
|
+
method_name: "run_aggregation_query",
|
422
451
|
options: options,
|
423
452
|
is_server_streaming: true,
|
424
453
|
&block
|
@@ -452,16 +481,18 @@ module Google
|
|
452
481
|
|
453
482
|
response = @client_stub.make_http_request(
|
454
483
|
verb,
|
455
|
-
uri:
|
456
|
-
body:
|
457
|
-
params:
|
484
|
+
uri: uri,
|
485
|
+
body: body || "",
|
486
|
+
params: query_string_params,
|
487
|
+
method_name: "partition_query",
|
458
488
|
options: options
|
459
489
|
)
|
460
490
|
operation = ::Gapic::Rest::TransportOperation.new response
|
461
491
|
result = ::Google::Cloud::Firestore::V1::PartitionQueryResponse.decode_json response.body, ignore_unknown_fields: true
|
462
|
-
|
463
|
-
|
464
|
-
|
492
|
+
catch :response do
|
493
|
+
yield result, operation if block_given?
|
494
|
+
result
|
495
|
+
end
|
465
496
|
end
|
466
497
|
|
467
498
|
##
|
@@ -490,16 +521,18 @@ module Google
|
|
490
521
|
|
491
522
|
response = @client_stub.make_http_request(
|
492
523
|
verb,
|
493
|
-
uri:
|
494
|
-
body:
|
495
|
-
params:
|
524
|
+
uri: uri,
|
525
|
+
body: body || "",
|
526
|
+
params: query_string_params,
|
527
|
+
method_name: "list_collection_ids",
|
496
528
|
options: options
|
497
529
|
)
|
498
530
|
operation = ::Gapic::Rest::TransportOperation.new response
|
499
531
|
result = ::Google::Cloud::Firestore::V1::ListCollectionIdsResponse.decode_json response.body, ignore_unknown_fields: true
|
500
|
-
|
501
|
-
|
502
|
-
|
532
|
+
catch :response do
|
533
|
+
yield result, operation if block_given?
|
534
|
+
result
|
535
|
+
end
|
503
536
|
end
|
504
537
|
|
505
538
|
##
|
@@ -528,16 +561,18 @@ module Google
|
|
528
561
|
|
529
562
|
response = @client_stub.make_http_request(
|
530
563
|
verb,
|
531
|
-
uri:
|
532
|
-
body:
|
533
|
-
params:
|
564
|
+
uri: uri,
|
565
|
+
body: body || "",
|
566
|
+
params: query_string_params,
|
567
|
+
method_name: "batch_write",
|
534
568
|
options: options
|
535
569
|
)
|
536
570
|
operation = ::Gapic::Rest::TransportOperation.new response
|
537
571
|
result = ::Google::Cloud::Firestore::V1::BatchWriteResponse.decode_json response.body, ignore_unknown_fields: true
|
538
|
-
|
539
|
-
|
540
|
-
|
572
|
+
catch :response do
|
573
|
+
yield result, operation if block_given?
|
574
|
+
result
|
575
|
+
end
|
541
576
|
end
|
542
577
|
|
543
578
|
##
|
@@ -566,16 +601,18 @@ module Google
|
|
566
601
|
|
567
602
|
response = @client_stub.make_http_request(
|
568
603
|
verb,
|
569
|
-
uri:
|
570
|
-
body:
|
571
|
-
params:
|
604
|
+
uri: uri,
|
605
|
+
body: body || "",
|
606
|
+
params: query_string_params,
|
607
|
+
method_name: "create_document",
|
572
608
|
options: options
|
573
609
|
)
|
574
610
|
operation = ::Gapic::Rest::TransportOperation.new response
|
575
611
|
result = ::Google::Cloud::Firestore::V1::Document.decode_json response.body, ignore_unknown_fields: true
|
576
|
-
|
577
|
-
|
578
|
-
|
612
|
+
catch :response do
|
613
|
+
yield result, operation if block_given?
|
614
|
+
result
|
615
|
+
end
|
579
616
|
end
|
580
617
|
|
581
618
|
##
|
@@ -28,6 +28,9 @@ module Google
|
|
28
28
|
# @!attribute [rw] destinations
|
29
29
|
# @return [::Array<::Google::Api::ClientLibraryDestination>]
|
30
30
|
# The destination where API teams want this client library to be published.
|
31
|
+
# @!attribute [rw] selective_gapic_generation
|
32
|
+
# @return [::Google::Api::SelectiveGapicGeneration]
|
33
|
+
# Configuration for which RPCs should be generated in the GAPIC client.
|
31
34
|
class CommonLanguageSettings
|
32
35
|
include ::Google::Protobuf::MessageExts
|
33
36
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -196,9 +199,32 @@ module Google
|
|
196
199
|
# @!attribute [rw] common
|
197
200
|
# @return [::Google::Api::CommonLanguageSettings]
|
198
201
|
# Some settings.
|
202
|
+
# @!attribute [rw] experimental_features
|
203
|
+
# @return [::Google::Api::PythonSettings::ExperimentalFeatures]
|
204
|
+
# Experimental features to be included during client library generation.
|
199
205
|
class PythonSettings
|
200
206
|
include ::Google::Protobuf::MessageExts
|
201
207
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
208
|
+
|
209
|
+
# Experimental features to be included during client library generation.
|
210
|
+
# These fields will be deprecated once the feature graduates and is enabled
|
211
|
+
# by default.
|
212
|
+
# @!attribute [rw] rest_async_io_enabled
|
213
|
+
# @return [::Boolean]
|
214
|
+
# Enables generation of asynchronous REST clients if `rest` transport is
|
215
|
+
# enabled. By default, asynchronous REST clients will not be generated.
|
216
|
+
# This feature will be enabled by default 1 month after launching the
|
217
|
+
# feature in preview packages.
|
218
|
+
# @!attribute [rw] protobuf_pythonic_types_enabled
|
219
|
+
# @return [::Boolean]
|
220
|
+
# Enables generation of protobuf code using new types that are more
|
221
|
+
# Pythonic which are included in `protobuf>=5.29.x`. This feature will be
|
222
|
+
# enabled by default 1 month after launching the feature in preview
|
223
|
+
# packages.
|
224
|
+
class ExperimentalFeatures
|
225
|
+
include ::Google::Protobuf::MessageExts
|
226
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
227
|
+
end
|
202
228
|
end
|
203
229
|
|
204
230
|
# Settings for Node client libraries.
|
@@ -280,9 +306,28 @@ module Google
|
|
280
306
|
# @!attribute [rw] common
|
281
307
|
# @return [::Google::Api::CommonLanguageSettings]
|
282
308
|
# Some settings.
|
309
|
+
# @!attribute [rw] renamed_services
|
310
|
+
# @return [::Google::Protobuf::Map{::String => ::String}]
|
311
|
+
# Map of service names to renamed services. Keys are the package relative
|
312
|
+
# service names and values are the name to be used for the service client
|
313
|
+
# and call options.
|
314
|
+
#
|
315
|
+
# publishing:
|
316
|
+
# go_settings:
|
317
|
+
# renamed_services:
|
318
|
+
# Publisher: TopicAdmin
|
283
319
|
class GoSettings
|
284
320
|
include ::Google::Protobuf::MessageExts
|
285
321
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
322
|
+
|
323
|
+
# @!attribute [rw] key
|
324
|
+
# @return [::String]
|
325
|
+
# @!attribute [rw] value
|
326
|
+
# @return [::String]
|
327
|
+
class RenamedServicesEntry
|
328
|
+
include ::Google::Protobuf::MessageExts
|
329
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
330
|
+
end
|
286
331
|
end
|
287
332
|
|
288
333
|
# Describes the generator configuration for a method.
|
@@ -358,6 +403,17 @@ module Google
|
|
358
403
|
end
|
359
404
|
end
|
360
405
|
|
406
|
+
# This message is used to configure the generation of a subset of the RPCs in
|
407
|
+
# a service for client libraries.
|
408
|
+
# @!attribute [rw] methods
|
409
|
+
# @return [::Array<::String>]
|
410
|
+
# An allowlist of the fully qualified names of RPCs that should be included
|
411
|
+
# on public client surfaces.
|
412
|
+
class SelectiveGapicGeneration
|
413
|
+
include ::Google::Protobuf::MessageExts
|
414
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
415
|
+
end
|
416
|
+
|
361
417
|
# The organization for which the client libraries are being published.
|
362
418
|
# Affects the url where generated docs are published, etc.
|
363
419
|
module ClientLibraryOrganization
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-firestore-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.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: 2024-
|
11
|
+
date: 2024-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.24.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
29
|
+
version: 0.24.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
136
|
- !ruby/object:Gem::Version
|
137
137
|
version: '0'
|
138
138
|
requirements: []
|
139
|
-
rubygems_version: 3.5.
|
139
|
+
rubygems_version: 3.5.23
|
140
140
|
signing_key:
|
141
141
|
specification_version: 4
|
142
142
|
summary: Accesses the NoSQL document database built for automatic scaling, high performance,
|