google-cloud-domains-v1beta1 0.9.0 → 0.10.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/domains/v1beta1/domains/client.rb +69 -31
- data/lib/google/cloud/domains/v1beta1/domains/operations.rb +25 -20
- data/lib/google/cloud/domains/v1beta1/domains/rest/client.rb +69 -31
- data/lib/google/cloud/domains/v1beta1/domains/rest/operations.rb +54 -42
- data/lib/google/cloud/domains/v1beta1/domains/rest/service_stub.rb +134 -92
- data/lib/google/cloud/domains/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: 68ab7714ae9284075509637935ec0e7343cc845d8c5c0ced987bc0d83af0106b
|
4
|
+
data.tar.gz: 283c44561931f8118d0772c3bf3724d0484d35250e2873cc8e1aee2f4138b406
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 184d41d2f9525fc7ceae8bd64afeac4460213d017b18a36a5210d2deaafee8f8d57326a40d51e728ad054a4bbef077b67819bd2c00201ba6391f03d9780bc344
|
7
|
+
data.tar.gz: 4087ba8a45d681de5ca1787d4ddd4db1c921d1e0aa9e1c5327243a248cd07f2bae7369f34f2aeabdb8c930eaad7df6dcf20a62d8290e58b453902d399413e760
|
data/README.md
CHANGED
@@ -43,33 +43,43 @@ for class and method documentation.
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/domains)
|
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/domains/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::Domains::V1beta1::Domains::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).
|
@@ -30,6 +30,9 @@ module Google
|
|
30
30
|
# The Cloud Domains API enables management and configuration of domain names.
|
31
31
|
#
|
32
32
|
class Client
|
33
|
+
# @private
|
34
|
+
API_VERSION = ""
|
35
|
+
|
33
36
|
# @private
|
34
37
|
DEFAULT_ENDPOINT_TEMPLATE = "domains.$UNIVERSE_DOMAIN$"
|
35
38
|
|
@@ -161,8 +164,19 @@ module Google
|
|
161
164
|
universe_domain: @config.universe_domain,
|
162
165
|
channel_args: @config.channel_args,
|
163
166
|
interceptors: @config.interceptors,
|
164
|
-
channel_pool_config: @config.channel_pool
|
167
|
+
channel_pool_config: @config.channel_pool,
|
168
|
+
logger: @config.logger
|
165
169
|
)
|
170
|
+
|
171
|
+
@domains_stub.stub_logger&.info do |entry|
|
172
|
+
entry.set_system_name
|
173
|
+
entry.set_service
|
174
|
+
entry.message = "Created client for #{entry.service}"
|
175
|
+
entry.set_credentials_fields credentials
|
176
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
177
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
178
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
179
|
+
end
|
166
180
|
end
|
167
181
|
|
168
182
|
##
|
@@ -172,6 +186,15 @@ module Google
|
|
172
186
|
#
|
173
187
|
attr_reader :operations_client
|
174
188
|
|
189
|
+
##
|
190
|
+
# The logger used for request/response debug logging.
|
191
|
+
#
|
192
|
+
# @return [Logger]
|
193
|
+
#
|
194
|
+
def logger
|
195
|
+
@domains_stub.logger
|
196
|
+
end
|
197
|
+
|
175
198
|
# Service calls
|
176
199
|
|
177
200
|
##
|
@@ -235,10 +258,11 @@ module Google
|
|
235
258
|
# Customize the options with defaults
|
236
259
|
metadata = @config.rpcs.search_domains.metadata.to_h
|
237
260
|
|
238
|
-
# Set x-goog-api-client
|
261
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
239
262
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
240
263
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
241
264
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
|
265
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
242
266
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
243
267
|
|
244
268
|
header_params = {}
|
@@ -259,7 +283,6 @@ module Google
|
|
259
283
|
|
260
284
|
@domains_stub.call_rpc :search_domains, request, options: options do |response, operation|
|
261
285
|
yield response, operation if block_given?
|
262
|
-
return response
|
263
286
|
end
|
264
287
|
rescue ::GRPC::BadStatus => e
|
265
288
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -323,10 +346,11 @@ module Google
|
|
323
346
|
# Customize the options with defaults
|
324
347
|
metadata = @config.rpcs.retrieve_register_parameters.metadata.to_h
|
325
348
|
|
326
|
-
# Set x-goog-api-client
|
349
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
327
350
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
328
351
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
329
352
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
|
353
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
330
354
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
331
355
|
|
332
356
|
header_params = {}
|
@@ -347,7 +371,6 @@ module Google
|
|
347
371
|
|
348
372
|
@domains_stub.call_rpc :retrieve_register_parameters, request, options: options do |response, operation|
|
349
373
|
yield response, operation if block_given?
|
350
|
-
return response
|
351
374
|
end
|
352
375
|
rescue ::GRPC::BadStatus => e
|
353
376
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -445,10 +468,11 @@ module Google
|
|
445
468
|
# Customize the options with defaults
|
446
469
|
metadata = @config.rpcs.register_domain.metadata.to_h
|
447
470
|
|
448
|
-
# Set x-goog-api-client
|
471
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
449
472
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
450
473
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
451
474
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
|
475
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
452
476
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
453
477
|
|
454
478
|
header_params = {}
|
@@ -470,7 +494,7 @@ module Google
|
|
470
494
|
@domains_stub.call_rpc :register_domain, request, options: options do |response, operation|
|
471
495
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
472
496
|
yield response, operation if block_given?
|
473
|
-
|
497
|
+
throw :response, response
|
474
498
|
end
|
475
499
|
rescue ::GRPC::BadStatus => e
|
476
500
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -538,10 +562,11 @@ module Google
|
|
538
562
|
# Customize the options with defaults
|
539
563
|
metadata = @config.rpcs.retrieve_transfer_parameters.metadata.to_h
|
540
564
|
|
541
|
-
# Set x-goog-api-client
|
565
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
542
566
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
543
567
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
544
568
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
|
569
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
545
570
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
546
571
|
|
547
572
|
header_params = {}
|
@@ -562,7 +587,6 @@ module Google
|
|
562
587
|
|
563
588
|
@domains_stub.call_rpc :retrieve_transfer_parameters, request, options: options do |response, operation|
|
564
589
|
yield response, operation if block_given?
|
565
|
-
return response
|
566
590
|
end
|
567
591
|
rescue ::GRPC::BadStatus => e
|
568
592
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -672,10 +696,11 @@ module Google
|
|
672
696
|
# Customize the options with defaults
|
673
697
|
metadata = @config.rpcs.transfer_domain.metadata.to_h
|
674
698
|
|
675
|
-
# Set x-goog-api-client
|
699
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
676
700
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
677
701
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
678
702
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
|
703
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
679
704
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
680
705
|
|
681
706
|
header_params = {}
|
@@ -697,7 +722,7 @@ module Google
|
|
697
722
|
@domains_stub.call_rpc :transfer_domain, request, options: options do |response, operation|
|
698
723
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
699
724
|
yield response, operation if block_given?
|
700
|
-
|
725
|
+
throw :response, response
|
701
726
|
end
|
702
727
|
rescue ::GRPC::BadStatus => e
|
703
728
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -785,10 +810,11 @@ module Google
|
|
785
810
|
# Customize the options with defaults
|
786
811
|
metadata = @config.rpcs.list_registrations.metadata.to_h
|
787
812
|
|
788
|
-
# Set x-goog-api-client
|
813
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
789
814
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
790
815
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
791
816
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
|
817
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
792
818
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
793
819
|
|
794
820
|
header_params = {}
|
@@ -810,7 +836,7 @@ module Google
|
|
810
836
|
@domains_stub.call_rpc :list_registrations, request, options: options do |response, operation|
|
811
837
|
response = ::Gapic::PagedEnumerable.new @domains_stub, :list_registrations, request, response, operation, options
|
812
838
|
yield response, operation if block_given?
|
813
|
-
|
839
|
+
throw :response, response
|
814
840
|
end
|
815
841
|
rescue ::GRPC::BadStatus => e
|
816
842
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -872,10 +898,11 @@ module Google
|
|
872
898
|
# Customize the options with defaults
|
873
899
|
metadata = @config.rpcs.get_registration.metadata.to_h
|
874
900
|
|
875
|
-
# Set x-goog-api-client
|
901
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
876
902
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
877
903
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
878
904
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
|
905
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
879
906
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
880
907
|
|
881
908
|
header_params = {}
|
@@ -896,7 +923,6 @@ module Google
|
|
896
923
|
|
897
924
|
@domains_stub.call_rpc :get_registration, request, options: options do |response, operation|
|
898
925
|
yield response, operation if block_given?
|
899
|
-
return response
|
900
926
|
end
|
901
927
|
rescue ::GRPC::BadStatus => e
|
902
928
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -973,10 +999,11 @@ module Google
|
|
973
999
|
# Customize the options with defaults
|
974
1000
|
metadata = @config.rpcs.update_registration.metadata.to_h
|
975
1001
|
|
976
|
-
# Set x-goog-api-client
|
1002
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
977
1003
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
978
1004
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
979
1005
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
|
1006
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
980
1007
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
981
1008
|
|
982
1009
|
header_params = {}
|
@@ -998,7 +1025,7 @@ module Google
|
|
998
1025
|
@domains_stub.call_rpc :update_registration, request, options: options do |response, operation|
|
999
1026
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1000
1027
|
yield response, operation if block_given?
|
1001
|
-
|
1028
|
+
throw :response, response
|
1002
1029
|
end
|
1003
1030
|
rescue ::GRPC::BadStatus => e
|
1004
1031
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1073,10 +1100,11 @@ module Google
|
|
1073
1100
|
# Customize the options with defaults
|
1074
1101
|
metadata = @config.rpcs.configure_management_settings.metadata.to_h
|
1075
1102
|
|
1076
|
-
# Set x-goog-api-client
|
1103
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1077
1104
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1078
1105
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1079
1106
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
|
1107
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1080
1108
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1081
1109
|
|
1082
1110
|
header_params = {}
|
@@ -1098,7 +1126,7 @@ module Google
|
|
1098
1126
|
@domains_stub.call_rpc :configure_management_settings, request, options: options do |response, operation|
|
1099
1127
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1100
1128
|
yield response, operation if block_given?
|
1101
|
-
|
1129
|
+
throw :response, response
|
1102
1130
|
end
|
1103
1131
|
rescue ::GRPC::BadStatus => e
|
1104
1132
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1181,10 +1209,11 @@ module Google
|
|
1181
1209
|
# Customize the options with defaults
|
1182
1210
|
metadata = @config.rpcs.configure_dns_settings.metadata.to_h
|
1183
1211
|
|
1184
|
-
# Set x-goog-api-client
|
1212
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1185
1213
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1186
1214
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1187
1215
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
|
1216
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1188
1217
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1189
1218
|
|
1190
1219
|
header_params = {}
|
@@ -1206,7 +1235,7 @@ module Google
|
|
1206
1235
|
@domains_stub.call_rpc :configure_dns_settings, request, options: options do |response, operation|
|
1207
1236
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1208
1237
|
yield response, operation if block_given?
|
1209
|
-
|
1238
|
+
throw :response, response
|
1210
1239
|
end
|
1211
1240
|
rescue ::GRPC::BadStatus => e
|
1212
1241
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1287,10 +1316,11 @@ module Google
|
|
1287
1316
|
# Customize the options with defaults
|
1288
1317
|
metadata = @config.rpcs.configure_contact_settings.metadata.to_h
|
1289
1318
|
|
1290
|
-
# Set x-goog-api-client
|
1319
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1291
1320
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1292
1321
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1293
1322
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
|
1323
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1294
1324
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1295
1325
|
|
1296
1326
|
header_params = {}
|
@@ -1312,7 +1342,7 @@ module Google
|
|
1312
1342
|
@domains_stub.call_rpc :configure_contact_settings, request, options: options do |response, operation|
|
1313
1343
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1314
1344
|
yield response, operation if block_given?
|
1315
|
-
|
1345
|
+
throw :response, response
|
1316
1346
|
end
|
1317
1347
|
rescue ::GRPC::BadStatus => e
|
1318
1348
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1389,10 +1419,11 @@ module Google
|
|
1389
1419
|
# Customize the options with defaults
|
1390
1420
|
metadata = @config.rpcs.export_registration.metadata.to_h
|
1391
1421
|
|
1392
|
-
# Set x-goog-api-client
|
1422
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1393
1423
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1394
1424
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1395
1425
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
|
1426
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1396
1427
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1397
1428
|
|
1398
1429
|
header_params = {}
|
@@ -1414,7 +1445,7 @@ module Google
|
|
1414
1445
|
@domains_stub.call_rpc :export_registration, request, options: options do |response, operation|
|
1415
1446
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1416
1447
|
yield response, operation if block_given?
|
1417
|
-
|
1448
|
+
throw :response, response
|
1418
1449
|
end
|
1419
1450
|
rescue ::GRPC::BadStatus => e
|
1420
1451
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1501,10 +1532,11 @@ module Google
|
|
1501
1532
|
# Customize the options with defaults
|
1502
1533
|
metadata = @config.rpcs.delete_registration.metadata.to_h
|
1503
1534
|
|
1504
|
-
# Set x-goog-api-client
|
1535
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1505
1536
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1506
1537
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1507
1538
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
|
1539
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1508
1540
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1509
1541
|
|
1510
1542
|
header_params = {}
|
@@ -1526,7 +1558,7 @@ module Google
|
|
1526
1558
|
@domains_stub.call_rpc :delete_registration, request, options: options do |response, operation|
|
1527
1559
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1528
1560
|
yield response, operation if block_given?
|
1529
|
-
|
1561
|
+
throw :response, response
|
1530
1562
|
end
|
1531
1563
|
rescue ::GRPC::BadStatus => e
|
1532
1564
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1592,10 +1624,11 @@ module Google
|
|
1592
1624
|
# Customize the options with defaults
|
1593
1625
|
metadata = @config.rpcs.retrieve_authorization_code.metadata.to_h
|
1594
1626
|
|
1595
|
-
# Set x-goog-api-client
|
1627
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1596
1628
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1597
1629
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1598
1630
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
|
1631
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1599
1632
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1600
1633
|
|
1601
1634
|
header_params = {}
|
@@ -1616,7 +1649,6 @@ module Google
|
|
1616
1649
|
|
1617
1650
|
@domains_stub.call_rpc :retrieve_authorization_code, request, options: options do |response, operation|
|
1618
1651
|
yield response, operation if block_given?
|
1619
|
-
return response
|
1620
1652
|
end
|
1621
1653
|
rescue ::GRPC::BadStatus => e
|
1622
1654
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1681,10 +1713,11 @@ module Google
|
|
1681
1713
|
# Customize the options with defaults
|
1682
1714
|
metadata = @config.rpcs.reset_authorization_code.metadata.to_h
|
1683
1715
|
|
1684
|
-
# Set x-goog-api-client
|
1716
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1685
1717
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1686
1718
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1687
1719
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION
|
1720
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1688
1721
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1689
1722
|
|
1690
1723
|
header_params = {}
|
@@ -1705,7 +1738,6 @@ module Google
|
|
1705
1738
|
|
1706
1739
|
@domains_stub.call_rpc :reset_authorization_code, request, options: options do |response, operation|
|
1707
1740
|
yield response, operation if block_given?
|
1708
|
-
return response
|
1709
1741
|
end
|
1710
1742
|
rescue ::GRPC::BadStatus => e
|
1711
1743
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1794,6 +1826,11 @@ module Google
|
|
1794
1826
|
# default endpoint URL. The default value of nil uses the environment
|
1795
1827
|
# universe (usually the default "googleapis.com" universe).
|
1796
1828
|
# @return [::String,nil]
|
1829
|
+
# @!attribute [rw] logger
|
1830
|
+
# A custom logger to use for request/response debug logging, or the value
|
1831
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1832
|
+
# explicitly disable logging.
|
1833
|
+
# @return [::Logger,:default,nil]
|
1797
1834
|
#
|
1798
1835
|
class Configuration
|
1799
1836
|
extend ::Gapic::Config
|
@@ -1818,6 +1855,7 @@ module Google
|
|
1818
1855
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1819
1856
|
config_attr :quota_project, nil, ::String, nil
|
1820
1857
|
config_attr :universe_domain, nil, ::String, nil
|
1858
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1821
1859
|
|
1822
1860
|
# @private
|
1823
1861
|
def initialize parent_config = nil
|
@@ -26,6 +26,9 @@ module Google
|
|
26
26
|
module Domains
|
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 = "domains.$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::Domains::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::Domains::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::Domains::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::Domains::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::Domains::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
|