google-cloud-gke_hub-v1beta1 0.11.0 → 0.12.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/gke_hub/v1beta1/gke_hub_membership_service/client.rb +52 -17
- data/lib/google/cloud/gke_hub/v1beta1/gke_hub_membership_service/operations.rb +25 -20
- data/lib/google/cloud/gke_hub/v1beta1/gke_hub_membership_service/rest/client.rb +51 -17
- data/lib/google/cloud/gke_hub/v1beta1/gke_hub_membership_service/rest/operations.rb +54 -42
- data/lib/google/cloud/gke_hub/v1beta1/gke_hub_membership_service/rest/service_stub.rb +78 -50
- data/lib/google/cloud/gke_hub/v1beta1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +74 -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: 2c779d3971a72cdd8fb4125b0c50a7785f245aae1fe5e312def2305d6b91ff88
|
4
|
+
data.tar.gz: 33db3cd26f1e5f0b1134426908acc22328b7f5c3f9dc8342cbffbf734b47b641
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff1f7c8deec00d0d79e235f5eda59e500e8e018e9979b7c3fdc0254ade71a533fec1af72489e4ade05e3da2f12b0865ae9ed11ff2120362043b891a6c10e69ea
|
7
|
+
data.tar.gz: 10a1632f8f101c49b1131398cea08a1cda039762cf7ccce46d7410f7f0942f1a879eec04414d6bd00d2b47316427f68d812240316d01cced1f65fd6f310d7cf5
|
data/README.md
CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/anthos/clusters/docs)
|
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/gke_hub/v1beta1"
|
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::GkeHub::V1beta1::GkeHubMembershipService::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).
|
@@ -41,6 +41,9 @@ module Google
|
|
41
41
|
# with Membership resources.
|
42
42
|
#
|
43
43
|
class Client
|
44
|
+
# @private
|
45
|
+
API_VERSION = ""
|
46
|
+
|
44
47
|
# @private
|
45
48
|
DEFAULT_ENDPOINT_TEMPLATE = "gkehub.$UNIVERSE_DOMAIN$"
|
46
49
|
|
@@ -177,14 +180,26 @@ module Google
|
|
177
180
|
universe_domain: @config.universe_domain,
|
178
181
|
channel_args: @config.channel_args,
|
179
182
|
interceptors: @config.interceptors,
|
180
|
-
channel_pool_config: @config.channel_pool
|
183
|
+
channel_pool_config: @config.channel_pool,
|
184
|
+
logger: @config.logger
|
181
185
|
)
|
182
186
|
|
187
|
+
@gke_hub_membership_service_stub.stub_logger&.info do |entry|
|
188
|
+
entry.set_system_name
|
189
|
+
entry.set_service
|
190
|
+
entry.message = "Created client for #{entry.service}"
|
191
|
+
entry.set_credentials_fields credentials
|
192
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
193
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
194
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
195
|
+
end
|
196
|
+
|
183
197
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
184
198
|
config.credentials = credentials
|
185
199
|
config.quota_project = @quota_project_id
|
186
200
|
config.endpoint = @gke_hub_membership_service_stub.endpoint
|
187
201
|
config.universe_domain = @gke_hub_membership_service_stub.universe_domain
|
202
|
+
config.logger = @gke_hub_membership_service_stub.logger if config.respond_to? :logger=
|
188
203
|
end
|
189
204
|
|
190
205
|
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
|
@@ -192,6 +207,7 @@ module Google
|
|
192
207
|
config.quota_project = @quota_project_id
|
193
208
|
config.endpoint = @gke_hub_membership_service_stub.endpoint
|
194
209
|
config.universe_domain = @gke_hub_membership_service_stub.universe_domain
|
210
|
+
config.logger = @gke_hub_membership_service_stub.logger if config.respond_to? :logger=
|
195
211
|
end
|
196
212
|
end
|
197
213
|
|
@@ -216,6 +232,15 @@ module Google
|
|
216
232
|
#
|
217
233
|
attr_reader :iam_policy_client
|
218
234
|
|
235
|
+
##
|
236
|
+
# The logger used for request/response debug logging.
|
237
|
+
#
|
238
|
+
# @return [Logger]
|
239
|
+
#
|
240
|
+
def logger
|
241
|
+
@gke_hub_membership_service_stub.logger
|
242
|
+
end
|
243
|
+
|
219
244
|
# Service calls
|
220
245
|
|
221
246
|
##
|
@@ -311,10 +336,11 @@ module Google
|
|
311
336
|
# Customize the options with defaults
|
312
337
|
metadata = @config.rpcs.list_memberships.metadata.to_h
|
313
338
|
|
314
|
-
# Set x-goog-api-client
|
339
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
315
340
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
316
341
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
317
342
|
gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION
|
343
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
318
344
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
319
345
|
|
320
346
|
header_params = {}
|
@@ -336,7 +362,7 @@ module Google
|
|
336
362
|
@gke_hub_membership_service_stub.call_rpc :list_memberships, request, options: options do |response, operation|
|
337
363
|
response = ::Gapic::PagedEnumerable.new @gke_hub_membership_service_stub, :list_memberships, request, response, operation, options
|
338
364
|
yield response, operation if block_given?
|
339
|
-
|
365
|
+
throw :response, response
|
340
366
|
end
|
341
367
|
rescue ::GRPC::BadStatus => e
|
342
368
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -398,10 +424,11 @@ module Google
|
|
398
424
|
# Customize the options with defaults
|
399
425
|
metadata = @config.rpcs.get_membership.metadata.to_h
|
400
426
|
|
401
|
-
# Set x-goog-api-client
|
427
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
402
428
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
403
429
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
404
430
|
gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION
|
431
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
405
432
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
406
433
|
|
407
434
|
header_params = {}
|
@@ -422,7 +449,6 @@ module Google
|
|
422
449
|
|
423
450
|
@gke_hub_membership_service_stub.call_rpc :get_membership, request, options: options do |response, operation|
|
424
451
|
yield response, operation if block_given?
|
425
|
-
return response
|
426
452
|
end
|
427
453
|
rescue ::GRPC::BadStatus => e
|
428
454
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -521,10 +547,11 @@ module Google
|
|
521
547
|
# Customize the options with defaults
|
522
548
|
metadata = @config.rpcs.create_membership.metadata.to_h
|
523
549
|
|
524
|
-
# Set x-goog-api-client
|
550
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
525
551
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
526
552
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
527
553
|
gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION
|
554
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
528
555
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
529
556
|
|
530
557
|
header_params = {}
|
@@ -546,7 +573,7 @@ module Google
|
|
546
573
|
@gke_hub_membership_service_stub.call_rpc :create_membership, request, options: options do |response, operation|
|
547
574
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
548
575
|
yield response, operation if block_given?
|
549
|
-
|
576
|
+
throw :response, response
|
550
577
|
end
|
551
578
|
rescue ::GRPC::BadStatus => e
|
552
579
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -637,10 +664,11 @@ module Google
|
|
637
664
|
# Customize the options with defaults
|
638
665
|
metadata = @config.rpcs.delete_membership.metadata.to_h
|
639
666
|
|
640
|
-
# Set x-goog-api-client
|
667
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
641
668
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
642
669
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
643
670
|
gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION
|
671
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
644
672
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
645
673
|
|
646
674
|
header_params = {}
|
@@ -662,7 +690,7 @@ module Google
|
|
662
690
|
@gke_hub_membership_service_stub.call_rpc :delete_membership, request, options: options do |response, operation|
|
663
691
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
664
692
|
yield response, operation if block_given?
|
665
|
-
|
693
|
+
throw :response, response
|
666
694
|
end
|
667
695
|
rescue ::GRPC::BadStatus => e
|
668
696
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -757,10 +785,11 @@ module Google
|
|
757
785
|
# Customize the options with defaults
|
758
786
|
metadata = @config.rpcs.update_membership.metadata.to_h
|
759
787
|
|
760
|
-
# Set x-goog-api-client
|
788
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
761
789
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
762
790
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
763
791
|
gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION
|
792
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
764
793
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
765
794
|
|
766
795
|
header_params = {}
|
@@ -782,7 +811,7 @@ module Google
|
|
782
811
|
@gke_hub_membership_service_stub.call_rpc :update_membership, request, options: options do |response, operation|
|
783
812
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
784
813
|
yield response, operation if block_given?
|
785
|
-
|
814
|
+
throw :response, response
|
786
815
|
end
|
787
816
|
rescue ::GRPC::BadStatus => e
|
788
817
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -860,10 +889,11 @@ module Google
|
|
860
889
|
# Customize the options with defaults
|
861
890
|
metadata = @config.rpcs.generate_connect_manifest.metadata.to_h
|
862
891
|
|
863
|
-
# Set x-goog-api-client
|
892
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
864
893
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
865
894
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
866
895
|
gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION
|
896
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
867
897
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
868
898
|
|
869
899
|
header_params = {}
|
@@ -884,7 +914,6 @@ module Google
|
|
884
914
|
|
885
915
|
@gke_hub_membership_service_stub.call_rpc :generate_connect_manifest, request, options: options do |response, operation|
|
886
916
|
yield response, operation if block_given?
|
887
|
-
return response
|
888
917
|
end
|
889
918
|
rescue ::GRPC::BadStatus => e
|
890
919
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -954,10 +983,11 @@ module Google
|
|
954
983
|
# Customize the options with defaults
|
955
984
|
metadata = @config.rpcs.validate_exclusivity.metadata.to_h
|
956
985
|
|
957
|
-
# Set x-goog-api-client
|
986
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
958
987
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
959
988
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
960
989
|
gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION
|
990
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
961
991
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
962
992
|
|
963
993
|
header_params = {}
|
@@ -978,7 +1008,6 @@ module Google
|
|
978
1008
|
|
979
1009
|
@gke_hub_membership_service_stub.call_rpc :validate_exclusivity, request, options: options do |response, operation|
|
980
1010
|
yield response, operation if block_given?
|
981
|
-
return response
|
982
1011
|
end
|
983
1012
|
rescue ::GRPC::BadStatus => e
|
984
1013
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1059,10 +1088,11 @@ module Google
|
|
1059
1088
|
# Customize the options with defaults
|
1060
1089
|
metadata = @config.rpcs.generate_exclusivity_manifest.metadata.to_h
|
1061
1090
|
|
1062
|
-
# Set x-goog-api-client
|
1091
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1063
1092
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1064
1093
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1065
1094
|
gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION
|
1095
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1066
1096
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1067
1097
|
|
1068
1098
|
header_params = {}
|
@@ -1083,7 +1113,6 @@ module Google
|
|
1083
1113
|
|
1084
1114
|
@gke_hub_membership_service_stub.call_rpc :generate_exclusivity_manifest, request, options: options do |response, operation|
|
1085
1115
|
yield response, operation if block_given?
|
1086
|
-
return response
|
1087
1116
|
end
|
1088
1117
|
rescue ::GRPC::BadStatus => e
|
1089
1118
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1172,6 +1201,11 @@ module Google
|
|
1172
1201
|
# default endpoint URL. The default value of nil uses the environment
|
1173
1202
|
# universe (usually the default "googleapis.com" universe).
|
1174
1203
|
# @return [::String,nil]
|
1204
|
+
# @!attribute [rw] logger
|
1205
|
+
# A custom logger to use for request/response debug logging, or the value
|
1206
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1207
|
+
# explicitly disable logging.
|
1208
|
+
# @return [::Logger,:default,nil]
|
1175
1209
|
#
|
1176
1210
|
class Configuration
|
1177
1211
|
extend ::Gapic::Config
|
@@ -1196,6 +1230,7 @@ module Google
|
|
1196
1230
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1197
1231
|
config_attr :quota_project, nil, ::String, nil
|
1198
1232
|
config_attr :universe_domain, nil, ::String, nil
|
1233
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1199
1234
|
|
1200
1235
|
# @private
|
1201
1236
|
def initialize parent_config = nil
|
@@ -26,6 +26,9 @@ module Google
|
|
26
26
|
module GkeHubMembershipService
|
27
27
|
# Service that implements Longrunning Operations API.
|
28
28
|
class Operations
|
29
|
+
# @private
|
30
|
+
API_VERSION = ""
|
31
|
+
|
29
32
|
# @private
|
30
33
|
DEFAULT_ENDPOINT_TEMPLATE = "gkehub.$UNIVERSE_DOMAIN$"
|
31
34
|
|
@@ -121,14 +124,6 @@ module Google
|
|
121
124
|
# Lists operations that match the specified filter in the request. If the
|
122
125
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
123
126
|
#
|
124
|
-
# NOTE: the `name` binding allows API services to override the binding
|
125
|
-
# to use different resource name schemes, such as `users/*/operations`. To
|
126
|
-
# override the binding, API services can add a binding such as
|
127
|
-
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
128
|
-
# For backwards compatibility, the default name includes the operations
|
129
|
-
# collection id, however overriding users must ensure the name binding
|
130
|
-
# is the parent resource, without the operations collection id.
|
131
|
-
#
|
132
127
|
# @overload list_operations(request, options = nil)
|
133
128
|
# Pass arguments to `list_operations` via a request object, either of type
|
134
129
|
# {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
@@ -191,10 +186,11 @@ module Google
|
|
191
186
|
# Customize the options with defaults
|
192
187
|
metadata = @config.rpcs.list_operations.metadata.to_h
|
193
188
|
|
194
|
-
# Set x-goog-api-client
|
189
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
195
190
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
196
191
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
197
192
|
gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION
|
193
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
198
194
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
199
195
|
|
200
196
|
header_params = {}
|
@@ -217,7 +213,7 @@ module Google
|
|
217
213
|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
218
214
|
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
219
215
|
yield response, operation if block_given?
|
220
|
-
|
216
|
+
throw :response, response
|
221
217
|
end
|
222
218
|
rescue ::GRPC::BadStatus => e
|
223
219
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -287,10 +283,11 @@ module Google
|
|
287
283
|
# Customize the options with defaults
|
288
284
|
metadata = @config.rpcs.get_operation.metadata.to_h
|
289
285
|
|
290
|
-
# Set x-goog-api-client
|
286
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
291
287
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
292
288
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
293
289
|
gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION
|
290
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
294
291
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
295
292
|
|
296
293
|
header_params = {}
|
@@ -312,7 +309,7 @@ module Google
|
|
312
309
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
313
310
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
314
311
|
yield response, operation if block_given?
|
315
|
-
|
312
|
+
throw :response, response
|
316
313
|
end
|
317
314
|
rescue ::GRPC::BadStatus => e
|
318
315
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -376,10 +373,11 @@ module Google
|
|
376
373
|
# Customize the options with defaults
|
377
374
|
metadata = @config.rpcs.delete_operation.metadata.to_h
|
378
375
|
|
379
|
-
# Set x-goog-api-client
|
376
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
380
377
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
381
378
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
382
379
|
gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION
|
380
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
383
381
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
384
382
|
|
385
383
|
header_params = {}
|
@@ -400,7 +398,6 @@ module Google
|
|
400
398
|
|
401
399
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
402
400
|
yield response, operation if block_given?
|
403
|
-
return response
|
404
401
|
end
|
405
402
|
rescue ::GRPC::BadStatus => e
|
406
403
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -415,8 +412,9 @@ module Google
|
|
415
412
|
# other methods to check whether the cancellation succeeded or whether the
|
416
413
|
# operation completed despite cancellation. On successful cancellation,
|
417
414
|
# the operation is not deleted; instead, it becomes an operation with
|
418
|
-
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
419
|
-
# 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`.
|
420
418
|
#
|
421
419
|
# @overload cancel_operation(request, options = nil)
|
422
420
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
@@ -470,10 +468,11 @@ module Google
|
|
470
468
|
# Customize the options with defaults
|
471
469
|
metadata = @config.rpcs.cancel_operation.metadata.to_h
|
472
470
|
|
473
|
-
# Set x-goog-api-client
|
471
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
474
472
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
475
473
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
476
474
|
gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION
|
475
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
477
476
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
478
477
|
|
479
478
|
header_params = {}
|
@@ -494,7 +493,6 @@ module Google
|
|
494
493
|
|
495
494
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
496
495
|
yield response, operation if block_given?
|
497
|
-
return response
|
498
496
|
end
|
499
497
|
rescue ::GRPC::BadStatus => e
|
500
498
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -574,10 +572,11 @@ module Google
|
|
574
572
|
# Customize the options with defaults
|
575
573
|
metadata = @config.rpcs.wait_operation.metadata.to_h
|
576
574
|
|
577
|
-
# Set x-goog-api-client
|
575
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
578
576
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
579
577
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
580
578
|
gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION
|
579
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
581
580
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
582
581
|
|
583
582
|
options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
|
@@ -591,7 +590,7 @@ module Google
|
|
591
590
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
592
591
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
593
592
|
yield response, operation if block_given?
|
594
|
-
|
593
|
+
throw :response, response
|
595
594
|
end
|
596
595
|
rescue ::GRPC::BadStatus => e
|
597
596
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -680,6 +679,11 @@ module Google
|
|
680
679
|
# default endpoint URL. The default value of nil uses the environment
|
681
680
|
# universe (usually the default "googleapis.com" universe).
|
682
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]
|
683
687
|
#
|
684
688
|
class Configuration
|
685
689
|
extend ::Gapic::Config
|
@@ -704,6 +708,7 @@ module Google
|
|
704
708
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
705
709
|
config_attr :quota_project, nil, ::String, nil
|
706
710
|
config_attr :universe_domain, nil, ::String, nil
|
711
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
707
712
|
|
708
713
|
# @private
|
709
714
|
def initialize parent_config = nil
|