google-analytics-data-v1beta 0.13.1 → 0.15.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/analytics/data/v1beta/analytics_data/client.rb +52 -30
- data/lib/google/analytics/data/v1beta/analytics_data/operations.rb +12 -15
- data/lib/google/analytics/data/v1beta/analytics_data/rest/client.rb +52 -30
- data/lib/google/analytics/data/v1beta/analytics_data/rest/operations.rb +43 -38
- data/lib/google/analytics/data/v1beta/analytics_data/rest/service_stub.rb +102 -68
- data/lib/google/analytics/data/v1beta/analytics_data_api_services_pb.rb +3 -3
- data/lib/google/analytics/data/v1beta/data_pb.rb +2 -1
- data/lib/google/analytics/data/v1beta/version.rb +1 -1
- data/proto_docs/google/analytics/data/v1beta/analytics_data_api.rb +24 -18
- data/proto_docs/google/analytics/data/v1beta/data.rb +11 -2
- data/proto_docs/google/api/client.rb +39 -0
- 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: 9ad671716cd7ce9e1da68e17b827923a556fac9d949ed2e2056926bafdc767ad
|
4
|
+
data.tar.gz: d64ed75c83d62ebdf0f1b0c61283ba60a1f8760d2dd4cd3fa41df28f23bffbc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87d4ea3da1da23b51e96a8b7d26154e1e63fad8c33b7b04e698f80ef56134ba013e08bb8ec0610d154cc9330bd372d5a83f95d9b43ada91b0369cb76529c8984
|
7
|
+
data.tar.gz: 4139e7a671417fa6c263474e6ce72ab14174979f0fce188e2fd79dce97e26fa3c95e3dc8f30e6aac3ac44ea9f8e41bbd798cdfd004ecec205e718e93e4767a86
|
data/README.md
CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://developers.google.com/analytics/devguides/reporting/data/v1)
|
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/analytics/data/v1beta"
|
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::Analytics::Data::V1beta::AnalyticsData::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).
|
@@ -183,8 +183,19 @@ module Google
|
|
183
183
|
universe_domain: @config.universe_domain,
|
184
184
|
channel_args: @config.channel_args,
|
185
185
|
interceptors: @config.interceptors,
|
186
|
-
channel_pool_config: @config.channel_pool
|
186
|
+
channel_pool_config: @config.channel_pool,
|
187
|
+
logger: @config.logger
|
187
188
|
)
|
189
|
+
|
190
|
+
@analytics_data_stub.stub_logger&.info do |entry|
|
191
|
+
entry.set_system_name
|
192
|
+
entry.set_service
|
193
|
+
entry.message = "Created client for #{entry.service}"
|
194
|
+
entry.set_credentials_fields credentials
|
195
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
196
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
197
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
198
|
+
end
|
188
199
|
end
|
189
200
|
|
190
201
|
##
|
@@ -194,6 +205,15 @@ module Google
|
|
194
205
|
#
|
195
206
|
attr_reader :operations_client
|
196
207
|
|
208
|
+
##
|
209
|
+
# The logger used for request/response debug logging.
|
210
|
+
#
|
211
|
+
# @return [Logger]
|
212
|
+
#
|
213
|
+
def logger
|
214
|
+
@analytics_data_stub.logger
|
215
|
+
end
|
216
|
+
|
197
217
|
# Service calls
|
198
218
|
|
199
219
|
##
|
@@ -225,7 +245,7 @@ module Google
|
|
225
245
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
226
246
|
#
|
227
247
|
# @param property [::String]
|
228
|
-
# A Google Analytics
|
248
|
+
# A Google Analytics property identifier whose events are tracked.
|
229
249
|
# Specified in the URL path and not the body. To learn more, see [where to
|
230
250
|
# find your Property
|
231
251
|
# ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
@@ -277,8 +297,12 @@ module Google
|
|
277
297
|
# @param metric_aggregations [::Array<::Google::Analytics::Data::V1beta::MetricAggregation>]
|
278
298
|
# Aggregation of metrics. Aggregated metric values will be shown in rows
|
279
299
|
# where the dimension_values are set to "RESERVED_(MetricAggregation)".
|
300
|
+
# Aggregates including both comparisons and multiple date ranges will
|
301
|
+
# be aggregated based on the date ranges.
|
280
302
|
# @param order_bys [::Array<::Google::Analytics::Data::V1beta::OrderBy, ::Hash>]
|
281
303
|
# Specifies how rows are ordered in the response.
|
304
|
+
# Requests including both comparisons and multiple date ranges will
|
305
|
+
# have order bys applied on the comparisons.
|
282
306
|
# @param currency_code [::String]
|
283
307
|
# A currency code in ISO4217 format, such as "AED", "USD", "JPY".
|
284
308
|
# If the field is empty, the report uses the property's default currency.
|
@@ -291,14 +315,14 @@ module Google
|
|
291
315
|
# removed by a filter.
|
292
316
|
#
|
293
317
|
# Regardless of this `keep_empty_rows` setting, only data recorded by the
|
294
|
-
# Google Analytics
|
318
|
+
# Google Analytics property can be displayed in a report.
|
295
319
|
#
|
296
320
|
# For example if a property never logs a `purchase` event, then a query for
|
297
321
|
# the `eventName` dimension and `eventCount` metric will not have a row
|
298
322
|
# eventName: "purchase" and eventCount: 0.
|
299
323
|
# @param return_property_quota [::Boolean]
|
300
|
-
# Toggles whether to return the current state of this Analytics
|
301
|
-
# quota. Quota is returned in [PropertyQuota](#PropertyQuota).
|
324
|
+
# Toggles whether to return the current state of this Google Analytics
|
325
|
+
# property's quota. Quota is returned in [PropertyQuota](#PropertyQuota).
|
302
326
|
# @param comparisons [::Array<::Google::Analytics::Data::V1beta::Comparison, ::Hash>]
|
303
327
|
# Optional. The configuration of comparisons requested and displayed. The
|
304
328
|
# request only requires a comparisons field in order to receive a comparison
|
@@ -363,7 +387,6 @@ module Google
|
|
363
387
|
|
364
388
|
@analytics_data_stub.call_rpc :run_report, request, options: options do |response, operation|
|
365
389
|
yield response, operation if block_given?
|
366
|
-
return response
|
367
390
|
end
|
368
391
|
rescue ::GRPC::BadStatus => e
|
369
392
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -392,7 +415,7 @@ module Google
|
|
392
415
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
393
416
|
#
|
394
417
|
# @param property [::String]
|
395
|
-
# A Google Analytics
|
418
|
+
# A Google Analytics property identifier whose events are tracked.
|
396
419
|
# Specified in the URL path and not the body. To learn more, see [where to
|
397
420
|
# find your Property
|
398
421
|
# ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
@@ -437,14 +460,14 @@ module Google
|
|
437
460
|
# removed by a filter.
|
438
461
|
#
|
439
462
|
# Regardless of this `keep_empty_rows` setting, only data recorded by the
|
440
|
-
# Google Analytics
|
463
|
+
# Google Analytics property can be displayed in a report.
|
441
464
|
#
|
442
465
|
# For example if a property never logs a `purchase` event, then a query for
|
443
466
|
# the `eventName` dimension and `eventCount` metric will not have a row
|
444
467
|
# eventName: "purchase" and eventCount: 0.
|
445
468
|
# @param return_property_quota [::Boolean]
|
446
|
-
# Toggles whether to return the current state of this Analytics
|
447
|
-
# quota. Quota is returned in [PropertyQuota](#PropertyQuota).
|
469
|
+
# Toggles whether to return the current state of this Google Analytics
|
470
|
+
# property's quota. Quota is returned in [PropertyQuota](#PropertyQuota).
|
448
471
|
# @param comparisons [::Array<::Google::Analytics::Data::V1beta::Comparison, ::Hash>]
|
449
472
|
# Optional. The configuration of comparisons requested and displayed. The
|
450
473
|
# request requires both a comparisons field and a comparisons dimension to
|
@@ -509,7 +532,6 @@ module Google
|
|
509
532
|
|
510
533
|
@analytics_data_stub.call_rpc :run_pivot_report, request, options: options do |response, operation|
|
511
534
|
yield response, operation if block_given?
|
512
|
-
return response
|
513
535
|
end
|
514
536
|
rescue ::GRPC::BadStatus => e
|
515
537
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -517,7 +539,7 @@ module Google
|
|
517
539
|
|
518
540
|
##
|
519
541
|
# Returns multiple reports in a batch. All reports must be for the same
|
520
|
-
#
|
542
|
+
# Google Analytics property.
|
521
543
|
#
|
522
544
|
# @overload batch_run_reports(request, options = nil)
|
523
545
|
# Pass arguments to `batch_run_reports` via a request object, either of type
|
@@ -535,7 +557,7 @@ module Google
|
|
535
557
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
536
558
|
#
|
537
559
|
# @param property [::String]
|
538
|
-
# A Google Analytics
|
560
|
+
# A Google Analytics property identifier whose events are tracked.
|
539
561
|
# Specified in the URL path and not the body. To learn more, see [where to
|
540
562
|
# find your Property
|
541
563
|
# ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
@@ -607,7 +629,6 @@ module Google
|
|
607
629
|
|
608
630
|
@analytics_data_stub.call_rpc :batch_run_reports, request, options: options do |response, operation|
|
609
631
|
yield response, operation if block_given?
|
610
|
-
return response
|
611
632
|
end
|
612
633
|
rescue ::GRPC::BadStatus => e
|
613
634
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -615,7 +636,7 @@ module Google
|
|
615
636
|
|
616
637
|
##
|
617
638
|
# Returns multiple pivot reports in a batch. All reports must be for the same
|
618
|
-
#
|
639
|
+
# Google Analytics property.
|
619
640
|
#
|
620
641
|
# @overload batch_run_pivot_reports(request, options = nil)
|
621
642
|
# Pass arguments to `batch_run_pivot_reports` via a request object, either of type
|
@@ -633,7 +654,7 @@ module Google
|
|
633
654
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
634
655
|
#
|
635
656
|
# @param property [::String]
|
636
|
-
# A Google Analytics
|
657
|
+
# A Google Analytics property identifier whose events are tracked.
|
637
658
|
# Specified in the URL path and not the body. To learn more, see [where to
|
638
659
|
# find your Property
|
639
660
|
# ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
@@ -705,7 +726,6 @@ module Google
|
|
705
726
|
|
706
727
|
@analytics_data_stub.call_rpc :batch_run_pivot_reports, request, options: options do |response, operation|
|
707
728
|
yield response, operation if block_given?
|
708
|
-
return response
|
709
729
|
end
|
710
730
|
rescue ::GRPC::BadStatus => e
|
711
731
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -714,7 +734,7 @@ module Google
|
|
714
734
|
##
|
715
735
|
# Returns metadata for dimensions and metrics available in reporting methods.
|
716
736
|
# Used to explore the dimensions and metrics. In this method, a Google
|
717
|
-
# Analytics
|
737
|
+
# Analytics property identifier is specified in the request, and
|
718
738
|
# the metadata response includes Custom dimensions and metrics as well as
|
719
739
|
# Universal metadata.
|
720
740
|
#
|
@@ -741,7 +761,7 @@ module Google
|
|
741
761
|
# @param name [::String]
|
742
762
|
# Required. The resource name of the metadata to retrieve. This name field is
|
743
763
|
# specified in the URL path and not URL parameters. Property is a numeric
|
744
|
-
# Google Analytics
|
764
|
+
# Google Analytics property identifier. To learn more, see [where to find
|
745
765
|
# your Property
|
746
766
|
# ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
747
767
|
#
|
@@ -810,7 +830,6 @@ module Google
|
|
810
830
|
|
811
831
|
@analytics_data_stub.call_rpc :get_metadata, request, options: options do |response, operation|
|
812
832
|
yield response, operation if block_given?
|
813
|
-
return response
|
814
833
|
end
|
815
834
|
rescue ::GRPC::BadStatus => e
|
816
835
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -843,7 +862,7 @@ module Google
|
|
843
862
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
844
863
|
#
|
845
864
|
# @param property [::String]
|
846
|
-
# A Google Analytics
|
865
|
+
# A Google Analytics property identifier whose events are tracked.
|
847
866
|
# Specified in the URL path and not the body. To learn more, see [where to
|
848
867
|
# find your Property
|
849
868
|
# ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
@@ -874,8 +893,9 @@ module Google
|
|
874
893
|
# @param order_bys [::Array<::Google::Analytics::Data::V1beta::OrderBy, ::Hash>]
|
875
894
|
# Specifies how rows are ordered in the response.
|
876
895
|
# @param return_property_quota [::Boolean]
|
877
|
-
# Toggles whether to return the current state of this Analytics
|
878
|
-
# Realtime quota. Quota is returned in
|
896
|
+
# Toggles whether to return the current state of this Google Analytics
|
897
|
+
# property's Realtime quota. Quota is returned in
|
898
|
+
# [PropertyQuota](#PropertyQuota).
|
879
899
|
# @param minute_ranges [::Array<::Google::Analytics::Data::V1beta::MinuteRange, ::Hash>]
|
880
900
|
# The minute ranges of event data to read. If unspecified, one minute range
|
881
901
|
# for the last 30 minutes will be used. If multiple minute ranges are
|
@@ -942,7 +962,6 @@ module Google
|
|
942
962
|
|
943
963
|
@analytics_data_stub.call_rpc :run_realtime_report, request, options: options do |response, operation|
|
944
964
|
yield response, operation if block_given?
|
945
|
-
return response
|
946
965
|
end
|
947
966
|
rescue ::GRPC::BadStatus => e
|
948
967
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -976,7 +995,7 @@ module Google
|
|
976
995
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
977
996
|
#
|
978
997
|
# @param property [::String]
|
979
|
-
# A Google Analytics
|
998
|
+
# A Google Analytics property identifier whose events are tracked. To
|
980
999
|
# learn more, see [where to find your Property
|
981
1000
|
# ID](https://developers.google.com/analytics/devguides/reporting/data/v1/property-id).
|
982
1001
|
# `property` should be the same value as in your `runReport` request.
|
@@ -1058,7 +1077,6 @@ module Google
|
|
1058
1077
|
|
1059
1078
|
@analytics_data_stub.call_rpc :check_compatibility, request, options: options do |response, operation|
|
1060
1079
|
yield response, operation if block_given?
|
1061
|
-
return response
|
1062
1080
|
end
|
1063
1081
|
rescue ::GRPC::BadStatus => e
|
1064
1082
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1179,7 +1197,7 @@ module Google
|
|
1179
1197
|
@analytics_data_stub.call_rpc :create_audience_export, request, options: options do |response, operation|
|
1180
1198
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1181
1199
|
yield response, operation if block_given?
|
1182
|
-
|
1200
|
+
throw :response, response
|
1183
1201
|
end
|
1184
1202
|
rescue ::GRPC::BadStatus => e
|
1185
1203
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1305,7 +1323,6 @@ module Google
|
|
1305
1323
|
|
1306
1324
|
@analytics_data_stub.call_rpc :query_audience_export, request, options: options do |response, operation|
|
1307
1325
|
yield response, operation if block_given?
|
1308
|
-
return response
|
1309
1326
|
end
|
1310
1327
|
rescue ::GRPC::BadStatus => e
|
1311
1328
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1403,7 +1420,6 @@ module Google
|
|
1403
1420
|
|
1404
1421
|
@analytics_data_stub.call_rpc :get_audience_export, request, options: options do |response, operation|
|
1405
1422
|
yield response, operation if block_given?
|
1406
|
-
return response
|
1407
1423
|
end
|
1408
1424
|
rescue ::GRPC::BadStatus => e
|
1409
1425
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1520,7 +1536,7 @@ module Google
|
|
1520
1536
|
@analytics_data_stub.call_rpc :list_audience_exports, request, options: options do |response, operation|
|
1521
1537
|
response = ::Gapic::PagedEnumerable.new @analytics_data_stub, :list_audience_exports, request, response, operation, options
|
1522
1538
|
yield response, operation if block_given?
|
1523
|
-
|
1539
|
+
throw :response, response
|
1524
1540
|
end
|
1525
1541
|
rescue ::GRPC::BadStatus => e
|
1526
1542
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1609,6 +1625,11 @@ module Google
|
|
1609
1625
|
# default endpoint URL. The default value of nil uses the environment
|
1610
1626
|
# universe (usually the default "googleapis.com" universe).
|
1611
1627
|
# @return [::String,nil]
|
1628
|
+
# @!attribute [rw] logger
|
1629
|
+
# A custom logger to use for request/response debug logging, or the value
|
1630
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1631
|
+
# explicitly disable logging.
|
1632
|
+
# @return [::Logger,:default,nil]
|
1612
1633
|
#
|
1613
1634
|
class Configuration
|
1614
1635
|
extend ::Gapic::Config
|
@@ -1633,6 +1654,7 @@ module Google
|
|
1633
1654
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1634
1655
|
config_attr :quota_project, nil, ::String, nil
|
1635
1656
|
config_attr :universe_domain, nil, ::String, nil
|
1657
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1636
1658
|
|
1637
1659
|
# @private
|
1638
1660
|
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
|