google-cloud-domains-v1beta1 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/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
@@ -32,6 +32,9 @@ module Google
|
|
32
32
|
# The Cloud Domains API enables management and configuration of domain names.
|
33
33
|
#
|
34
34
|
class Client
|
35
|
+
# @private
|
36
|
+
API_VERSION = ""
|
37
|
+
|
35
38
|
# @private
|
36
39
|
DEFAULT_ENDPOINT_TEMPLATE = "domains.$UNIVERSE_DOMAIN$"
|
37
40
|
|
@@ -154,8 +157,19 @@ module Google
|
|
154
157
|
endpoint: @config.endpoint,
|
155
158
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
156
159
|
universe_domain: @config.universe_domain,
|
157
|
-
credentials: credentials
|
160
|
+
credentials: credentials,
|
161
|
+
logger: @config.logger
|
158
162
|
)
|
163
|
+
|
164
|
+
@domains_stub.logger(stub: true)&.info do |entry|
|
165
|
+
entry.set_system_name
|
166
|
+
entry.set_service
|
167
|
+
entry.message = "Created client for #{entry.service}"
|
168
|
+
entry.set_credentials_fields credentials
|
169
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
170
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
171
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
172
|
+
end
|
159
173
|
end
|
160
174
|
|
161
175
|
##
|
@@ -165,6 +179,15 @@ module Google
|
|
165
179
|
#
|
166
180
|
attr_reader :operations_client
|
167
181
|
|
182
|
+
##
|
183
|
+
# The logger used for request/response debug logging.
|
184
|
+
#
|
185
|
+
# @return [Logger]
|
186
|
+
#
|
187
|
+
def logger
|
188
|
+
@domains_stub.logger
|
189
|
+
end
|
190
|
+
|
168
191
|
# Service calls
|
169
192
|
|
170
193
|
##
|
@@ -227,12 +250,13 @@ module Google
|
|
227
250
|
# Customize the options with defaults
|
228
251
|
call_metadata = @config.rpcs.search_domains.metadata.to_h
|
229
252
|
|
230
|
-
# Set x-goog-api-client
|
253
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
231
254
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
232
255
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
233
256
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION,
|
234
257
|
transports_version_send: [:rest]
|
235
258
|
|
259
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
236
260
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
237
261
|
|
238
262
|
options.apply_defaults timeout: @config.rpcs.search_domains.timeout,
|
@@ -245,7 +269,6 @@ module Google
|
|
245
269
|
|
246
270
|
@domains_stub.search_domains request, options do |result, operation|
|
247
271
|
yield result, operation if block_given?
|
248
|
-
return result
|
249
272
|
end
|
250
273
|
rescue ::Gapic::Rest::Error => e
|
251
274
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -308,12 +331,13 @@ module Google
|
|
308
331
|
# Customize the options with defaults
|
309
332
|
call_metadata = @config.rpcs.retrieve_register_parameters.metadata.to_h
|
310
333
|
|
311
|
-
# Set x-goog-api-client
|
334
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
312
335
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
313
336
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
314
337
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION,
|
315
338
|
transports_version_send: [:rest]
|
316
339
|
|
340
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
317
341
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
318
342
|
|
319
343
|
options.apply_defaults timeout: @config.rpcs.retrieve_register_parameters.timeout,
|
@@ -326,7 +350,6 @@ module Google
|
|
326
350
|
|
327
351
|
@domains_stub.retrieve_register_parameters request, options do |result, operation|
|
328
352
|
yield result, operation if block_given?
|
329
|
-
return result
|
330
353
|
end
|
331
354
|
rescue ::Gapic::Rest::Error => e
|
332
355
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -423,12 +446,13 @@ module Google
|
|
423
446
|
# Customize the options with defaults
|
424
447
|
call_metadata = @config.rpcs.register_domain.metadata.to_h
|
425
448
|
|
426
|
-
# Set x-goog-api-client
|
449
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
427
450
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
428
451
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
429
452
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION,
|
430
453
|
transports_version_send: [:rest]
|
431
454
|
|
455
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
432
456
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
433
457
|
|
434
458
|
options.apply_defaults timeout: @config.rpcs.register_domain.timeout,
|
@@ -442,7 +466,7 @@ module Google
|
|
442
466
|
@domains_stub.register_domain request, options do |result, operation|
|
443
467
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
444
468
|
yield result, operation if block_given?
|
445
|
-
|
469
|
+
throw :response, result
|
446
470
|
end
|
447
471
|
rescue ::Gapic::Rest::Error => e
|
448
472
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -509,12 +533,13 @@ module Google
|
|
509
533
|
# Customize the options with defaults
|
510
534
|
call_metadata = @config.rpcs.retrieve_transfer_parameters.metadata.to_h
|
511
535
|
|
512
|
-
# Set x-goog-api-client
|
536
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
513
537
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
514
538
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
515
539
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION,
|
516
540
|
transports_version_send: [:rest]
|
517
541
|
|
542
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
518
543
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
519
544
|
|
520
545
|
options.apply_defaults timeout: @config.rpcs.retrieve_transfer_parameters.timeout,
|
@@ -527,7 +552,6 @@ module Google
|
|
527
552
|
|
528
553
|
@domains_stub.retrieve_transfer_parameters request, options do |result, operation|
|
529
554
|
yield result, operation if block_given?
|
530
|
-
return result
|
531
555
|
end
|
532
556
|
rescue ::Gapic::Rest::Error => e
|
533
557
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -636,12 +660,13 @@ module Google
|
|
636
660
|
# Customize the options with defaults
|
637
661
|
call_metadata = @config.rpcs.transfer_domain.metadata.to_h
|
638
662
|
|
639
|
-
# Set x-goog-api-client
|
663
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
640
664
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
641
665
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
642
666
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION,
|
643
667
|
transports_version_send: [:rest]
|
644
668
|
|
669
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
645
670
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
646
671
|
|
647
672
|
options.apply_defaults timeout: @config.rpcs.transfer_domain.timeout,
|
@@ -655,7 +680,7 @@ module Google
|
|
655
680
|
@domains_stub.transfer_domain request, options do |result, operation|
|
656
681
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
657
682
|
yield result, operation if block_given?
|
658
|
-
|
683
|
+
throw :response, result
|
659
684
|
end
|
660
685
|
rescue ::Gapic::Rest::Error => e
|
661
686
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -742,12 +767,13 @@ module Google
|
|
742
767
|
# Customize the options with defaults
|
743
768
|
call_metadata = @config.rpcs.list_registrations.metadata.to_h
|
744
769
|
|
745
|
-
# Set x-goog-api-client
|
770
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
746
771
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
747
772
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
748
773
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION,
|
749
774
|
transports_version_send: [:rest]
|
750
775
|
|
776
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
751
777
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
752
778
|
|
753
779
|
options.apply_defaults timeout: @config.rpcs.list_registrations.timeout,
|
@@ -761,7 +787,7 @@ module Google
|
|
761
787
|
@domains_stub.list_registrations request, options do |result, operation|
|
762
788
|
result = ::Gapic::Rest::PagedEnumerable.new @domains_stub, :list_registrations, "registrations", request, result, options
|
763
789
|
yield result, operation if block_given?
|
764
|
-
|
790
|
+
throw :response, result
|
765
791
|
end
|
766
792
|
rescue ::Gapic::Rest::Error => e
|
767
793
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -822,12 +848,13 @@ module Google
|
|
822
848
|
# Customize the options with defaults
|
823
849
|
call_metadata = @config.rpcs.get_registration.metadata.to_h
|
824
850
|
|
825
|
-
# Set x-goog-api-client
|
851
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
826
852
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
827
853
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
828
854
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION,
|
829
855
|
transports_version_send: [:rest]
|
830
856
|
|
857
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
831
858
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
832
859
|
|
833
860
|
options.apply_defaults timeout: @config.rpcs.get_registration.timeout,
|
@@ -840,7 +867,6 @@ module Google
|
|
840
867
|
|
841
868
|
@domains_stub.get_registration request, options do |result, operation|
|
842
869
|
yield result, operation if block_given?
|
843
|
-
return result
|
844
870
|
end
|
845
871
|
rescue ::Gapic::Rest::Error => e
|
846
872
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -916,12 +942,13 @@ module Google
|
|
916
942
|
# Customize the options with defaults
|
917
943
|
call_metadata = @config.rpcs.update_registration.metadata.to_h
|
918
944
|
|
919
|
-
# Set x-goog-api-client
|
945
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
920
946
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
921
947
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
922
948
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION,
|
923
949
|
transports_version_send: [:rest]
|
924
950
|
|
951
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
925
952
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
926
953
|
|
927
954
|
options.apply_defaults timeout: @config.rpcs.update_registration.timeout,
|
@@ -935,7 +962,7 @@ module Google
|
|
935
962
|
@domains_stub.update_registration request, options do |result, operation|
|
936
963
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
937
964
|
yield result, operation if block_given?
|
938
|
-
|
965
|
+
throw :response, result
|
939
966
|
end
|
940
967
|
rescue ::Gapic::Rest::Error => e
|
941
968
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1009,12 +1036,13 @@ module Google
|
|
1009
1036
|
# Customize the options with defaults
|
1010
1037
|
call_metadata = @config.rpcs.configure_management_settings.metadata.to_h
|
1011
1038
|
|
1012
|
-
# Set x-goog-api-client
|
1039
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1013
1040
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1014
1041
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1015
1042
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION,
|
1016
1043
|
transports_version_send: [:rest]
|
1017
1044
|
|
1045
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1018
1046
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1019
1047
|
|
1020
1048
|
options.apply_defaults timeout: @config.rpcs.configure_management_settings.timeout,
|
@@ -1028,7 +1056,7 @@ module Google
|
|
1028
1056
|
@domains_stub.configure_management_settings request, options do |result, operation|
|
1029
1057
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1030
1058
|
yield result, operation if block_given?
|
1031
|
-
|
1059
|
+
throw :response, result
|
1032
1060
|
end
|
1033
1061
|
rescue ::Gapic::Rest::Error => e
|
1034
1062
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1110,12 +1138,13 @@ module Google
|
|
1110
1138
|
# Customize the options with defaults
|
1111
1139
|
call_metadata = @config.rpcs.configure_dns_settings.metadata.to_h
|
1112
1140
|
|
1113
|
-
# Set x-goog-api-client
|
1141
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1114
1142
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1115
1143
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1116
1144
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION,
|
1117
1145
|
transports_version_send: [:rest]
|
1118
1146
|
|
1147
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1119
1148
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1120
1149
|
|
1121
1150
|
options.apply_defaults timeout: @config.rpcs.configure_dns_settings.timeout,
|
@@ -1129,7 +1158,7 @@ module Google
|
|
1129
1158
|
@domains_stub.configure_dns_settings request, options do |result, operation|
|
1130
1159
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1131
1160
|
yield result, operation if block_given?
|
1132
|
-
|
1161
|
+
throw :response, result
|
1133
1162
|
end
|
1134
1163
|
rescue ::Gapic::Rest::Error => e
|
1135
1164
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1209,12 +1238,13 @@ module Google
|
|
1209
1238
|
# Customize the options with defaults
|
1210
1239
|
call_metadata = @config.rpcs.configure_contact_settings.metadata.to_h
|
1211
1240
|
|
1212
|
-
# Set x-goog-api-client
|
1241
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1213
1242
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1214
1243
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1215
1244
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION,
|
1216
1245
|
transports_version_send: [:rest]
|
1217
1246
|
|
1247
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1218
1248
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1219
1249
|
|
1220
1250
|
options.apply_defaults timeout: @config.rpcs.configure_contact_settings.timeout,
|
@@ -1228,7 +1258,7 @@ module Google
|
|
1228
1258
|
@domains_stub.configure_contact_settings request, options do |result, operation|
|
1229
1259
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1230
1260
|
yield result, operation if block_given?
|
1231
|
-
|
1261
|
+
throw :response, result
|
1232
1262
|
end
|
1233
1263
|
rescue ::Gapic::Rest::Error => e
|
1234
1264
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1304,12 +1334,13 @@ module Google
|
|
1304
1334
|
# Customize the options with defaults
|
1305
1335
|
call_metadata = @config.rpcs.export_registration.metadata.to_h
|
1306
1336
|
|
1307
|
-
# Set x-goog-api-client
|
1337
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1308
1338
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1309
1339
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1310
1340
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION,
|
1311
1341
|
transports_version_send: [:rest]
|
1312
1342
|
|
1343
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1313
1344
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1314
1345
|
|
1315
1346
|
options.apply_defaults timeout: @config.rpcs.export_registration.timeout,
|
@@ -1323,7 +1354,7 @@ module Google
|
|
1323
1354
|
@domains_stub.export_registration request, options do |result, operation|
|
1324
1355
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1325
1356
|
yield result, operation if block_given?
|
1326
|
-
|
1357
|
+
throw :response, result
|
1327
1358
|
end
|
1328
1359
|
rescue ::Gapic::Rest::Error => e
|
1329
1360
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1409,12 +1440,13 @@ module Google
|
|
1409
1440
|
# Customize the options with defaults
|
1410
1441
|
call_metadata = @config.rpcs.delete_registration.metadata.to_h
|
1411
1442
|
|
1412
|
-
# Set x-goog-api-client
|
1443
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1413
1444
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1414
1445
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1415
1446
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION,
|
1416
1447
|
transports_version_send: [:rest]
|
1417
1448
|
|
1449
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1418
1450
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1419
1451
|
|
1420
1452
|
options.apply_defaults timeout: @config.rpcs.delete_registration.timeout,
|
@@ -1428,7 +1460,7 @@ module Google
|
|
1428
1460
|
@domains_stub.delete_registration request, options do |result, operation|
|
1429
1461
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1430
1462
|
yield result, operation if block_given?
|
1431
|
-
|
1463
|
+
throw :response, result
|
1432
1464
|
end
|
1433
1465
|
rescue ::Gapic::Rest::Error => e
|
1434
1466
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1493,12 +1525,13 @@ module Google
|
|
1493
1525
|
# Customize the options with defaults
|
1494
1526
|
call_metadata = @config.rpcs.retrieve_authorization_code.metadata.to_h
|
1495
1527
|
|
1496
|
-
# Set x-goog-api-client
|
1528
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1497
1529
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1498
1530
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1499
1531
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION,
|
1500
1532
|
transports_version_send: [:rest]
|
1501
1533
|
|
1534
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1502
1535
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1503
1536
|
|
1504
1537
|
options.apply_defaults timeout: @config.rpcs.retrieve_authorization_code.timeout,
|
@@ -1511,7 +1544,6 @@ module Google
|
|
1511
1544
|
|
1512
1545
|
@domains_stub.retrieve_authorization_code request, options do |result, operation|
|
1513
1546
|
yield result, operation if block_given?
|
1514
|
-
return result
|
1515
1547
|
end
|
1516
1548
|
rescue ::Gapic::Rest::Error => e
|
1517
1549
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1575,12 +1607,13 @@ module Google
|
|
1575
1607
|
# Customize the options with defaults
|
1576
1608
|
call_metadata = @config.rpcs.reset_authorization_code.metadata.to_h
|
1577
1609
|
|
1578
|
-
# Set x-goog-api-client
|
1610
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1579
1611
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1580
1612
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1581
1613
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION,
|
1582
1614
|
transports_version_send: [:rest]
|
1583
1615
|
|
1616
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1584
1617
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1585
1618
|
|
1586
1619
|
options.apply_defaults timeout: @config.rpcs.reset_authorization_code.timeout,
|
@@ -1593,7 +1626,6 @@ module Google
|
|
1593
1626
|
|
1594
1627
|
@domains_stub.reset_authorization_code request, options do |result, operation|
|
1595
1628
|
yield result, operation if block_given?
|
1596
|
-
return result
|
1597
1629
|
end
|
1598
1630
|
rescue ::Gapic::Rest::Error => e
|
1599
1631
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1673,6 +1705,11 @@ module Google
|
|
1673
1705
|
# default endpoint URL. The default value of nil uses the environment
|
1674
1706
|
# universe (usually the default "googleapis.com" universe).
|
1675
1707
|
# @return [::String,nil]
|
1708
|
+
# @!attribute [rw] logger
|
1709
|
+
# A custom logger to use for request/response debug logging, or the value
|
1710
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1711
|
+
# explicitly disable logging.
|
1712
|
+
# @return [::Logger,:default,nil]
|
1676
1713
|
#
|
1677
1714
|
class Configuration
|
1678
1715
|
extend ::Gapic::Config
|
@@ -1694,6 +1731,7 @@ module Google
|
|
1694
1731
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1695
1732
|
config_attr :quota_project, nil, ::String, nil
|
1696
1733
|
config_attr :universe_domain, nil, ::String, nil
|
1734
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1697
1735
|
|
1698
1736
|
# @private
|
1699
1737
|
def initialize parent_config = nil
|
@@ -26,6 +26,9 @@ module Google
|
|
26
26
|
module Rest
|
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
|
|
@@ -112,14 +115,6 @@ module Google
|
|
112
115
|
# Lists operations that match the specified filter in the request. If the
|
113
116
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
114
117
|
#
|
115
|
-
# NOTE: the `name` binding allows API services to override the binding
|
116
|
-
# to use different resource name schemes, such as `users/*/operations`. To
|
117
|
-
# override the binding, API services can add a binding such as
|
118
|
-
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
119
|
-
# For backwards compatibility, the default name includes the operations
|
120
|
-
# collection id, however overriding users must ensure the name binding
|
121
|
-
# is the parent resource, without the operations collection id.
|
122
|
-
#
|
123
118
|
# @overload list_operations(request, options = nil)
|
124
119
|
# Pass arguments to `list_operations` via a request object, either of type
|
125
120
|
# {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
@@ -181,12 +176,13 @@ module Google
|
|
181
176
|
# Customize the options with defaults
|
182
177
|
call_metadata = @config.rpcs.list_operations.metadata.to_h
|
183
178
|
|
184
|
-
# Set x-goog-api-client
|
179
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
185
180
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
186
181
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
187
182
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION,
|
188
183
|
transports_version_send: [:rest]
|
189
184
|
|
185
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
190
186
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
191
187
|
|
192
188
|
options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
|
@@ -200,7 +196,7 @@ module Google
|
|
200
196
|
@operations_stub.list_operations request, options do |result, operation|
|
201
197
|
result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
|
202
198
|
yield result, operation if block_given?
|
203
|
-
|
199
|
+
throw :response, result
|
204
200
|
end
|
205
201
|
rescue ::Gapic::Rest::Error => e
|
206
202
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -269,12 +265,13 @@ module Google
|
|
269
265
|
# Customize the options with defaults
|
270
266
|
call_metadata = @config.rpcs.get_operation.metadata.to_h
|
271
267
|
|
272
|
-
# Set x-goog-api-client
|
268
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
273
269
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
274
270
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
275
271
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION,
|
276
272
|
transports_version_send: [:rest]
|
277
273
|
|
274
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
278
275
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
279
276
|
|
280
277
|
options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
|
@@ -288,7 +285,7 @@ module Google
|
|
288
285
|
@operations_stub.get_operation request, options do |result, operation|
|
289
286
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
290
287
|
yield result, operation if block_given?
|
291
|
-
|
288
|
+
throw :response, result
|
292
289
|
end
|
293
290
|
rescue ::Gapic::Rest::Error => e
|
294
291
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -351,12 +348,13 @@ module Google
|
|
351
348
|
# Customize the options with defaults
|
352
349
|
call_metadata = @config.rpcs.delete_operation.metadata.to_h
|
353
350
|
|
354
|
-
# Set x-goog-api-client
|
351
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
355
352
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
356
353
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
357
354
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION,
|
358
355
|
transports_version_send: [:rest]
|
359
356
|
|
357
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
360
358
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
361
359
|
|
362
360
|
options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
|
@@ -369,7 +367,6 @@ module Google
|
|
369
367
|
|
370
368
|
@operations_stub.delete_operation request, options do |result, operation|
|
371
369
|
yield result, operation if block_given?
|
372
|
-
return result
|
373
370
|
end
|
374
371
|
rescue ::Gapic::Rest::Error => e
|
375
372
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -384,8 +381,9 @@ module Google
|
|
384
381
|
# other methods to check whether the cancellation succeeded or whether the
|
385
382
|
# operation completed despite cancellation. On successful cancellation,
|
386
383
|
# the operation is not deleted; instead, it becomes an operation with
|
387
|
-
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
388
|
-
# corresponding to
|
384
|
+
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
385
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
|
386
|
+
# `Code.CANCELLED`.
|
389
387
|
#
|
390
388
|
# @overload cancel_operation(request, options = nil)
|
391
389
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
@@ -438,12 +436,13 @@ module Google
|
|
438
436
|
# Customize the options with defaults
|
439
437
|
call_metadata = @config.rpcs.cancel_operation.metadata.to_h
|
440
438
|
|
441
|
-
# Set x-goog-api-client
|
439
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
442
440
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
443
441
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
444
442
|
gapic_version: ::Google::Cloud::Domains::V1beta1::VERSION,
|
445
443
|
transports_version_send: [:rest]
|
446
444
|
|
445
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
447
446
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
448
447
|
|
449
448
|
options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
|
@@ -456,7 +455,6 @@ module Google
|
|
456
455
|
|
457
456
|
@operations_stub.cancel_operation request, options do |result, operation|
|
458
457
|
yield result, operation if block_given?
|
459
|
-
return result
|
460
458
|
end
|
461
459
|
rescue ::Gapic::Rest::Error => e
|
462
460
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -536,6 +534,11 @@ module Google
|
|
536
534
|
# default endpoint URL. The default value of nil uses the environment
|
537
535
|
# universe (usually the default "googleapis.com" universe).
|
538
536
|
# @return [::String,nil]
|
537
|
+
# @!attribute [rw] logger
|
538
|
+
# A custom logger to use for request/response debug logging, or the value
|
539
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
540
|
+
# explicitly disable logging.
|
541
|
+
# @return [::Logger,:default,nil]
|
539
542
|
#
|
540
543
|
class Configuration
|
541
544
|
extend ::Gapic::Config
|
@@ -557,6 +560,7 @@ module Google
|
|
557
560
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
558
561
|
config_attr :quota_project, nil, ::String, nil
|
559
562
|
config_attr :universe_domain, nil, ::String, nil
|
563
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
560
564
|
|
561
565
|
# @private
|
562
566
|
def initialize parent_config = nil
|
@@ -676,16 +680,18 @@ module Google
|
|
676
680
|
|
677
681
|
response = @client_stub.make_http_request(
|
678
682
|
verb,
|
679
|
-
uri:
|
680
|
-
body:
|
681
|
-
params:
|
683
|
+
uri: uri,
|
684
|
+
body: body || "",
|
685
|
+
params: query_string_params,
|
686
|
+
method_name: "list_operations",
|
682
687
|
options: options
|
683
688
|
)
|
684
689
|
operation = ::Gapic::Rest::TransportOperation.new response
|
685
690
|
result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
|
686
|
-
|
687
|
-
|
688
|
-
|
691
|
+
catch :response do
|
692
|
+
yield result, operation if block_given?
|
693
|
+
result
|
694
|
+
end
|
689
695
|
end
|
690
696
|
|
691
697
|
##
|
@@ -714,16 +720,18 @@ module Google
|
|
714
720
|
|
715
721
|
response = @client_stub.make_http_request(
|
716
722
|
verb,
|
717
|
-
uri:
|
718
|
-
body:
|
719
|
-
params:
|
723
|
+
uri: uri,
|
724
|
+
body: body || "",
|
725
|
+
params: query_string_params,
|
726
|
+
method_name: "get_operation",
|
720
727
|
options: options
|
721
728
|
)
|
722
729
|
operation = ::Gapic::Rest::TransportOperation.new response
|
723
730
|
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
724
|
-
|
725
|
-
|
726
|
-
|
731
|
+
catch :response do
|
732
|
+
yield result, operation if block_given?
|
733
|
+
result
|
734
|
+
end
|
727
735
|
end
|
728
736
|
|
729
737
|
##
|
@@ -752,16 +760,18 @@ module Google
|
|
752
760
|
|
753
761
|
response = @client_stub.make_http_request(
|
754
762
|
verb,
|
755
|
-
uri:
|
756
|
-
body:
|
757
|
-
params:
|
763
|
+
uri: uri,
|
764
|
+
body: body || "",
|
765
|
+
params: query_string_params,
|
766
|
+
method_name: "delete_operation",
|
758
767
|
options: options
|
759
768
|
)
|
760
769
|
operation = ::Gapic::Rest::TransportOperation.new response
|
761
770
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
762
|
-
|
763
|
-
|
764
|
-
|
771
|
+
catch :response do
|
772
|
+
yield result, operation if block_given?
|
773
|
+
result
|
774
|
+
end
|
765
775
|
end
|
766
776
|
|
767
777
|
##
|
@@ -790,16 +800,18 @@ module Google
|
|
790
800
|
|
791
801
|
response = @client_stub.make_http_request(
|
792
802
|
verb,
|
793
|
-
uri:
|
794
|
-
body:
|
795
|
-
params:
|
803
|
+
uri: uri,
|
804
|
+
body: body || "",
|
805
|
+
params: query_string_params,
|
806
|
+
method_name: "cancel_operation",
|
796
807
|
options: options
|
797
808
|
)
|
798
809
|
operation = ::Gapic::Rest::TransportOperation.new response
|
799
810
|
result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
|
800
|
-
|
801
|
-
|
802
|
-
|
811
|
+
catch :response do
|
812
|
+
yield result, operation if block_given?
|
813
|
+
result
|
814
|
+
end
|
803
815
|
end
|
804
816
|
|
805
817
|
##
|