google-cloud-filestore-v1 1.0.0 → 1.1.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.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/filestore/v1/cloud_filestore_manager/client.rb +42 -18
- data/lib/google/cloud/filestore/v1/cloud_filestore_manager/operations.rb +12 -15
- data/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/client.rb +40 -18
- data/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/operations.rb +43 -38
- data/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/service_stub.rb +150 -104
- data/lib/google/cloud/filestore/v1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +70 -10
- data/proto_docs/google/api/resource.rb +7 -2
- data/proto_docs/google/longrunning/operations.rb +19 -14
- 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: ddfe7d0d7ddce3bd78d7b983efaa346ebafdde61c13a9f30162841a6da4c755f
|
4
|
+
data.tar.gz: 66a9cf4e02e97ca3cf85fd178f72ba19d657fb95ce836c98ddeb3935c279d712
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b1ff145d5243498add6c364af7b88628670123be3a350df3f0e71b38dd50f2dd3dd07036532eb02575654051cca4f151838f9c03a95d061528d8718b88e2e5f
|
7
|
+
data.tar.gz: a5d16e15b8ec588f49dad3de4ab4fe9da2fc08977e981143b7887f73561e54ae825bd1a15c74ca3861fea26fca5e1a20a4c3d9912ea4b42881acd65ec909ef6b
|
data/README.md
CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/filestore/)
|
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/filestore/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::Filestore::V1::CloudFilestoreManager::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).
|
@@ -217,14 +217,26 @@ module Google
|
|
217
217
|
universe_domain: @config.universe_domain,
|
218
218
|
channel_args: @config.channel_args,
|
219
219
|
interceptors: @config.interceptors,
|
220
|
-
channel_pool_config: @config.channel_pool
|
220
|
+
channel_pool_config: @config.channel_pool,
|
221
|
+
logger: @config.logger
|
221
222
|
)
|
222
223
|
|
224
|
+
@cloud_filestore_manager_stub.stub_logger&.info do |entry|
|
225
|
+
entry.set_system_name
|
226
|
+
entry.set_service
|
227
|
+
entry.message = "Created client for #{entry.service}"
|
228
|
+
entry.set_credentials_fields credentials
|
229
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
230
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
231
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
232
|
+
end
|
233
|
+
|
223
234
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
224
235
|
config.credentials = credentials
|
225
236
|
config.quota_project = @quota_project_id
|
226
237
|
config.endpoint = @cloud_filestore_manager_stub.endpoint
|
227
238
|
config.universe_domain = @cloud_filestore_manager_stub.universe_domain
|
239
|
+
config.logger = @cloud_filestore_manager_stub.logger if config.respond_to? :logger=
|
228
240
|
end
|
229
241
|
end
|
230
242
|
|
@@ -242,6 +254,15 @@ module Google
|
|
242
254
|
#
|
243
255
|
attr_reader :location_client
|
244
256
|
|
257
|
+
##
|
258
|
+
# The logger used for request/response debug logging.
|
259
|
+
#
|
260
|
+
# @return [Logger]
|
261
|
+
#
|
262
|
+
def logger
|
263
|
+
@cloud_filestore_manager_stub.logger
|
264
|
+
end
|
265
|
+
|
245
266
|
# Service calls
|
246
267
|
|
247
268
|
##
|
@@ -344,7 +365,7 @@ module Google
|
|
344
365
|
@cloud_filestore_manager_stub.call_rpc :list_instances, request, options: options do |response, operation|
|
345
366
|
response = ::Gapic::PagedEnumerable.new @cloud_filestore_manager_stub, :list_instances, request, response, operation, options
|
346
367
|
yield response, operation if block_given?
|
347
|
-
|
368
|
+
throw :response, response
|
348
369
|
end
|
349
370
|
rescue ::GRPC::BadStatus => e
|
350
371
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -431,7 +452,6 @@ module Google
|
|
431
452
|
|
432
453
|
@cloud_filestore_manager_stub.call_rpc :get_instance, request, options: options do |response, operation|
|
433
454
|
yield response, operation if block_given?
|
434
|
-
return response
|
435
455
|
end
|
436
456
|
rescue ::GRPC::BadStatus => e
|
437
457
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -535,7 +555,7 @@ module Google
|
|
535
555
|
@cloud_filestore_manager_stub.call_rpc :create_instance, request, options: options do |response, operation|
|
536
556
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
537
557
|
yield response, operation if block_given?
|
538
|
-
|
558
|
+
throw :response, response
|
539
559
|
end
|
540
560
|
rescue ::GRPC::BadStatus => e
|
541
561
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -637,7 +657,7 @@ module Google
|
|
637
657
|
@cloud_filestore_manager_stub.call_rpc :update_instance, request, options: options do |response, operation|
|
638
658
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
639
659
|
yield response, operation if block_given?
|
640
|
-
|
660
|
+
throw :response, response
|
641
661
|
end
|
642
662
|
rescue ::GRPC::BadStatus => e
|
643
663
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -742,7 +762,7 @@ module Google
|
|
742
762
|
@cloud_filestore_manager_stub.call_rpc :restore_instance, request, options: options do |response, operation|
|
743
763
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
744
764
|
yield response, operation if block_given?
|
745
|
-
|
765
|
+
throw :response, response
|
746
766
|
end
|
747
767
|
rescue ::GRPC::BadStatus => e
|
748
768
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -842,7 +862,7 @@ module Google
|
|
842
862
|
@cloud_filestore_manager_stub.call_rpc :revert_instance, request, options: options do |response, operation|
|
843
863
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
844
864
|
yield response, operation if block_given?
|
845
|
-
|
865
|
+
throw :response, response
|
846
866
|
end
|
847
867
|
rescue ::GRPC::BadStatus => e
|
848
868
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -940,7 +960,7 @@ module Google
|
|
940
960
|
@cloud_filestore_manager_stub.call_rpc :delete_instance, request, options: options do |response, operation|
|
941
961
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
942
962
|
yield response, operation if block_given?
|
943
|
-
|
963
|
+
throw :response, response
|
944
964
|
end
|
945
965
|
rescue ::GRPC::BadStatus => e
|
946
966
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1043,7 +1063,7 @@ module Google
|
|
1043
1063
|
@cloud_filestore_manager_stub.call_rpc :list_snapshots, request, options: options do |response, operation|
|
1044
1064
|
response = ::Gapic::PagedEnumerable.new @cloud_filestore_manager_stub, :list_snapshots, request, response, operation, options
|
1045
1065
|
yield response, operation if block_given?
|
1046
|
-
|
1066
|
+
throw :response, response
|
1047
1067
|
end
|
1048
1068
|
rescue ::GRPC::BadStatus => e
|
1049
1069
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1130,7 +1150,6 @@ module Google
|
|
1130
1150
|
|
1131
1151
|
@cloud_filestore_manager_stub.call_rpc :get_snapshot, request, options: options do |response, operation|
|
1132
1152
|
yield response, operation if block_given?
|
1133
|
-
return response
|
1134
1153
|
end
|
1135
1154
|
rescue ::GRPC::BadStatus => e
|
1136
1155
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1233,7 +1252,7 @@ module Google
|
|
1233
1252
|
@cloud_filestore_manager_stub.call_rpc :create_snapshot, request, options: options do |response, operation|
|
1234
1253
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1235
1254
|
yield response, operation if block_given?
|
1236
|
-
|
1255
|
+
throw :response, response
|
1237
1256
|
end
|
1238
1257
|
rescue ::GRPC::BadStatus => e
|
1239
1258
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1328,7 +1347,7 @@ module Google
|
|
1328
1347
|
@cloud_filestore_manager_stub.call_rpc :delete_snapshot, request, options: options do |response, operation|
|
1329
1348
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1330
1349
|
yield response, operation if block_given?
|
1331
|
-
|
1350
|
+
throw :response, response
|
1332
1351
|
end
|
1333
1352
|
rescue ::GRPC::BadStatus => e
|
1334
1353
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1425,7 +1444,7 @@ module Google
|
|
1425
1444
|
@cloud_filestore_manager_stub.call_rpc :update_snapshot, request, options: options do |response, operation|
|
1426
1445
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1427
1446
|
yield response, operation if block_given?
|
1428
|
-
|
1447
|
+
throw :response, response
|
1429
1448
|
end
|
1430
1449
|
rescue ::GRPC::BadStatus => e
|
1431
1450
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1531,7 +1550,7 @@ module Google
|
|
1531
1550
|
@cloud_filestore_manager_stub.call_rpc :list_backups, request, options: options do |response, operation|
|
1532
1551
|
response = ::Gapic::PagedEnumerable.new @cloud_filestore_manager_stub, :list_backups, request, response, operation, options
|
1533
1552
|
yield response, operation if block_given?
|
1534
|
-
|
1553
|
+
throw :response, response
|
1535
1554
|
end
|
1536
1555
|
rescue ::GRPC::BadStatus => e
|
1537
1556
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1618,7 +1637,6 @@ module Google
|
|
1618
1637
|
|
1619
1638
|
@cloud_filestore_manager_stub.call_rpc :get_backup, request, options: options do |response, operation|
|
1620
1639
|
yield response, operation if block_given?
|
1621
|
-
return response
|
1622
1640
|
end
|
1623
1641
|
rescue ::GRPC::BadStatus => e
|
1624
1642
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1724,7 +1742,7 @@ module Google
|
|
1724
1742
|
@cloud_filestore_manager_stub.call_rpc :create_backup, request, options: options do |response, operation|
|
1725
1743
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1726
1744
|
yield response, operation if block_given?
|
1727
|
-
|
1745
|
+
throw :response, response
|
1728
1746
|
end
|
1729
1747
|
rescue ::GRPC::BadStatus => e
|
1730
1748
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1819,7 +1837,7 @@ module Google
|
|
1819
1837
|
@cloud_filestore_manager_stub.call_rpc :delete_backup, request, options: options do |response, operation|
|
1820
1838
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1821
1839
|
yield response, operation if block_given?
|
1822
|
-
|
1840
|
+
throw :response, response
|
1823
1841
|
end
|
1824
1842
|
rescue ::GRPC::BadStatus => e
|
1825
1843
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1916,7 +1934,7 @@ module Google
|
|
1916
1934
|
@cloud_filestore_manager_stub.call_rpc :update_backup, request, options: options do |response, operation|
|
1917
1935
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1918
1936
|
yield response, operation if block_given?
|
1919
|
-
|
1937
|
+
throw :response, response
|
1920
1938
|
end
|
1921
1939
|
rescue ::GRPC::BadStatus => e
|
1922
1940
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -2005,6 +2023,11 @@ module Google
|
|
2005
2023
|
# default endpoint URL. The default value of nil uses the environment
|
2006
2024
|
# universe (usually the default "googleapis.com" universe).
|
2007
2025
|
# @return [::String,nil]
|
2026
|
+
# @!attribute [rw] logger
|
2027
|
+
# A custom logger to use for request/response debug logging, or the value
|
2028
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
2029
|
+
# explicitly disable logging.
|
2030
|
+
# @return [::Logger,:default,nil]
|
2008
2031
|
#
|
2009
2032
|
class Configuration
|
2010
2033
|
extend ::Gapic::Config
|
@@ -2029,6 +2052,7 @@ module Google
|
|
2029
2052
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
2030
2053
|
config_attr :quota_project, nil, ::String, nil
|
2031
2054
|
config_attr :universe_domain, nil, ::String, nil
|
2055
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
2032
2056
|
|
2033
2057
|
# @private
|
2034
2058
|
def initialize parent_config = nil
|
@@ -124,14 +124,6 @@ module Google
|
|
124
124
|
# Lists operations that match the specified filter in the request. If the
|
125
125
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
126
126
|
#
|
127
|
-
# NOTE: the `name` binding allows API services to override the binding
|
128
|
-
# to use different resource name schemes, such as `users/*/operations`. To
|
129
|
-
# override the binding, API services can add a binding such as
|
130
|
-
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
131
|
-
# For backwards compatibility, the default name includes the operations
|
132
|
-
# collection id, however overriding users must ensure the name binding
|
133
|
-
# is the parent resource, without the operations collection id.
|
134
|
-
#
|
135
127
|
# @overload list_operations(request, options = nil)
|
136
128
|
# Pass arguments to `list_operations` via a request object, either of type
|
137
129
|
# {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
@@ -221,7 +213,7 @@ module Google
|
|
221
213
|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
222
214
|
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
223
215
|
yield response, operation if block_given?
|
224
|
-
|
216
|
+
throw :response, response
|
225
217
|
end
|
226
218
|
rescue ::GRPC::BadStatus => e
|
227
219
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -317,7 +309,7 @@ module Google
|
|
317
309
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
318
310
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
319
311
|
yield response, operation if block_given?
|
320
|
-
|
312
|
+
throw :response, response
|
321
313
|
end
|
322
314
|
rescue ::GRPC::BadStatus => e
|
323
315
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -406,7 +398,6 @@ module Google
|
|
406
398
|
|
407
399
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
408
400
|
yield response, operation if block_given?
|
409
|
-
return response
|
410
401
|
end
|
411
402
|
rescue ::GRPC::BadStatus => e
|
412
403
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -421,8 +412,9 @@ module Google
|
|
421
412
|
# other methods to check whether the cancellation succeeded or whether the
|
422
413
|
# operation completed despite cancellation. On successful cancellation,
|
423
414
|
# the operation is not deleted; instead, it becomes an operation with
|
424
|
-
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
425
|
-
# corresponding to
|
415
|
+
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
416
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
|
417
|
+
# `Code.CANCELLED`.
|
426
418
|
#
|
427
419
|
# @overload cancel_operation(request, options = nil)
|
428
420
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
@@ -501,7 +493,6 @@ module Google
|
|
501
493
|
|
502
494
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
503
495
|
yield response, operation if block_given?
|
504
|
-
return response
|
505
496
|
end
|
506
497
|
rescue ::GRPC::BadStatus => e
|
507
498
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -599,7 +590,7 @@ module Google
|
|
599
590
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
600
591
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
601
592
|
yield response, operation if block_given?
|
602
|
-
|
593
|
+
throw :response, response
|
603
594
|
end
|
604
595
|
rescue ::GRPC::BadStatus => e
|
605
596
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -688,6 +679,11 @@ module Google
|
|
688
679
|
# default endpoint URL. The default value of nil uses the environment
|
689
680
|
# universe (usually the default "googleapis.com" universe).
|
690
681
|
# @return [::String,nil]
|
682
|
+
# @!attribute [rw] logger
|
683
|
+
# A custom logger to use for request/response debug logging, or the value
|
684
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
685
|
+
# explicitly disable logging.
|
686
|
+
# @return [::Logger,:default,nil]
|
691
687
|
#
|
692
688
|
class Configuration
|
693
689
|
extend ::Gapic::Config
|
@@ -712,6 +708,7 @@ module Google
|
|
712
708
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
713
709
|
config_attr :quota_project, nil, ::String, nil
|
714
710
|
config_attr :universe_domain, nil, ::String, nil
|
711
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
715
712
|
|
716
713
|
# @private
|
717
714
|
def initialize parent_config = nil
|
@@ -210,15 +210,27 @@ module Google
|
|
210
210
|
endpoint: @config.endpoint,
|
211
211
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
212
212
|
universe_domain: @config.universe_domain,
|
213
|
-
credentials: credentials
|
213
|
+
credentials: credentials,
|
214
|
+
logger: @config.logger
|
214
215
|
)
|
215
216
|
|
217
|
+
@cloud_filestore_manager_stub.logger(stub: true)&.info do |entry|
|
218
|
+
entry.set_system_name
|
219
|
+
entry.set_service
|
220
|
+
entry.message = "Created client for #{entry.service}"
|
221
|
+
entry.set_credentials_fields credentials
|
222
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
223
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
224
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
225
|
+
end
|
226
|
+
|
216
227
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
217
228
|
config.credentials = credentials
|
218
229
|
config.quota_project = @quota_project_id
|
219
230
|
config.endpoint = @cloud_filestore_manager_stub.endpoint
|
220
231
|
config.universe_domain = @cloud_filestore_manager_stub.universe_domain
|
221
232
|
config.bindings_override = @config.bindings_override
|
233
|
+
config.logger = @cloud_filestore_manager_stub.logger if config.respond_to? :logger=
|
222
234
|
end
|
223
235
|
end
|
224
236
|
|
@@ -236,6 +248,15 @@ module Google
|
|
236
248
|
#
|
237
249
|
attr_reader :location_client
|
238
250
|
|
251
|
+
##
|
252
|
+
# The logger used for request/response debug logging.
|
253
|
+
#
|
254
|
+
# @return [Logger]
|
255
|
+
#
|
256
|
+
def logger
|
257
|
+
@cloud_filestore_manager_stub.logger
|
258
|
+
end
|
259
|
+
|
239
260
|
# Service calls
|
240
261
|
|
241
262
|
##
|
@@ -330,7 +351,6 @@ module Google
|
|
330
351
|
|
331
352
|
@cloud_filestore_manager_stub.list_instances request, options do |result, operation|
|
332
353
|
yield result, operation if block_given?
|
333
|
-
return result
|
334
354
|
end
|
335
355
|
rescue ::Gapic::Rest::Error => e
|
336
356
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -410,7 +430,6 @@ module Google
|
|
410
430
|
|
411
431
|
@cloud_filestore_manager_stub.get_instance request, options do |result, operation|
|
412
432
|
yield result, operation if block_given?
|
413
|
-
return result
|
414
433
|
end
|
415
434
|
rescue ::Gapic::Rest::Error => e
|
416
435
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -507,7 +526,7 @@ module Google
|
|
507
526
|
@cloud_filestore_manager_stub.create_instance request, options do |result, operation|
|
508
527
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
509
528
|
yield result, operation if block_given?
|
510
|
-
|
529
|
+
throw :response, result
|
511
530
|
end
|
512
531
|
rescue ::Gapic::Rest::Error => e
|
513
532
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -602,7 +621,7 @@ module Google
|
|
602
621
|
@cloud_filestore_manager_stub.update_instance request, options do |result, operation|
|
603
622
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
604
623
|
yield result, operation if block_given?
|
605
|
-
|
624
|
+
throw :response, result
|
606
625
|
end
|
607
626
|
rescue ::Gapic::Rest::Error => e
|
608
627
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -700,7 +719,7 @@ module Google
|
|
700
719
|
@cloud_filestore_manager_stub.restore_instance request, options do |result, operation|
|
701
720
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
702
721
|
yield result, operation if block_given?
|
703
|
-
|
722
|
+
throw :response, result
|
704
723
|
end
|
705
724
|
rescue ::Gapic::Rest::Error => e
|
706
725
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -793,7 +812,7 @@ module Google
|
|
793
812
|
@cloud_filestore_manager_stub.revert_instance request, options do |result, operation|
|
794
813
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
795
814
|
yield result, operation if block_given?
|
796
|
-
|
815
|
+
throw :response, result
|
797
816
|
end
|
798
817
|
rescue ::Gapic::Rest::Error => e
|
799
818
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -884,7 +903,7 @@ module Google
|
|
884
903
|
@cloud_filestore_manager_stub.delete_instance request, options do |result, operation|
|
885
904
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
886
905
|
yield result, operation if block_given?
|
887
|
-
|
906
|
+
throw :response, result
|
888
907
|
end
|
889
908
|
rescue ::Gapic::Rest::Error => e
|
890
909
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -980,7 +999,7 @@ module Google
|
|
980
999
|
@cloud_filestore_manager_stub.list_snapshots request, options do |result, operation|
|
981
1000
|
result = ::Gapic::Rest::PagedEnumerable.new @cloud_filestore_manager_stub, :list_snapshots, "snapshots", request, result, options
|
982
1001
|
yield result, operation if block_given?
|
983
|
-
|
1002
|
+
throw :response, result
|
984
1003
|
end
|
985
1004
|
rescue ::Gapic::Rest::Error => e
|
986
1005
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1060,7 +1079,6 @@ module Google
|
|
1060
1079
|
|
1061
1080
|
@cloud_filestore_manager_stub.get_snapshot request, options do |result, operation|
|
1062
1081
|
yield result, operation if block_given?
|
1063
|
-
return result
|
1064
1082
|
end
|
1065
1083
|
rescue ::Gapic::Rest::Error => e
|
1066
1084
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1156,7 +1174,7 @@ module Google
|
|
1156
1174
|
@cloud_filestore_manager_stub.create_snapshot request, options do |result, operation|
|
1157
1175
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1158
1176
|
yield result, operation if block_given?
|
1159
|
-
|
1177
|
+
throw :response, result
|
1160
1178
|
end
|
1161
1179
|
rescue ::Gapic::Rest::Error => e
|
1162
1180
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1244,7 +1262,7 @@ module Google
|
|
1244
1262
|
@cloud_filestore_manager_stub.delete_snapshot request, options do |result, operation|
|
1245
1263
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1246
1264
|
yield result, operation if block_given?
|
1247
|
-
|
1265
|
+
throw :response, result
|
1248
1266
|
end
|
1249
1267
|
rescue ::Gapic::Rest::Error => e
|
1250
1268
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1334,7 +1352,7 @@ module Google
|
|
1334
1352
|
@cloud_filestore_manager_stub.update_snapshot request, options do |result, operation|
|
1335
1353
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1336
1354
|
yield result, operation if block_given?
|
1337
|
-
|
1355
|
+
throw :response, result
|
1338
1356
|
end
|
1339
1357
|
rescue ::Gapic::Rest::Error => e
|
1340
1358
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1432,7 +1450,6 @@ module Google
|
|
1432
1450
|
|
1433
1451
|
@cloud_filestore_manager_stub.list_backups request, options do |result, operation|
|
1434
1452
|
yield result, operation if block_given?
|
1435
|
-
return result
|
1436
1453
|
end
|
1437
1454
|
rescue ::Gapic::Rest::Error => e
|
1438
1455
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1512,7 +1529,6 @@ module Google
|
|
1512
1529
|
|
1513
1530
|
@cloud_filestore_manager_stub.get_backup request, options do |result, operation|
|
1514
1531
|
yield result, operation if block_given?
|
1515
|
-
return result
|
1516
1532
|
end
|
1517
1533
|
rescue ::Gapic::Rest::Error => e
|
1518
1534
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1611,7 +1627,7 @@ module Google
|
|
1611
1627
|
@cloud_filestore_manager_stub.create_backup request, options do |result, operation|
|
1612
1628
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1613
1629
|
yield result, operation if block_given?
|
1614
|
-
|
1630
|
+
throw :response, result
|
1615
1631
|
end
|
1616
1632
|
rescue ::Gapic::Rest::Error => e
|
1617
1633
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1699,7 +1715,7 @@ module Google
|
|
1699
1715
|
@cloud_filestore_manager_stub.delete_backup request, options do |result, operation|
|
1700
1716
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1701
1717
|
yield result, operation if block_given?
|
1702
|
-
|
1718
|
+
throw :response, result
|
1703
1719
|
end
|
1704
1720
|
rescue ::Gapic::Rest::Error => e
|
1705
1721
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1789,7 +1805,7 @@ module Google
|
|
1789
1805
|
@cloud_filestore_manager_stub.update_backup request, options do |result, operation|
|
1790
1806
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1791
1807
|
yield result, operation if block_given?
|
1792
|
-
|
1808
|
+
throw :response, result
|
1793
1809
|
end
|
1794
1810
|
rescue ::Gapic::Rest::Error => e
|
1795
1811
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1869,6 +1885,11 @@ module Google
|
|
1869
1885
|
# default endpoint URL. The default value of nil uses the environment
|
1870
1886
|
# universe (usually the default "googleapis.com" universe).
|
1871
1887
|
# @return [::String,nil]
|
1888
|
+
# @!attribute [rw] logger
|
1889
|
+
# A custom logger to use for request/response debug logging, or the value
|
1890
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1891
|
+
# explicitly disable logging.
|
1892
|
+
# @return [::Logger,:default,nil]
|
1872
1893
|
#
|
1873
1894
|
class Configuration
|
1874
1895
|
extend ::Gapic::Config
|
@@ -1897,6 +1918,7 @@ module Google
|
|
1897
1918
|
# by the host service.
|
1898
1919
|
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
1899
1920
|
config_attr :bindings_override, {}, ::Hash, nil
|
1921
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1900
1922
|
|
1901
1923
|
# @private
|
1902
1924
|
def initialize parent_config = nil
|