google-cloud-storage_transfer-v1 0.8.0 → 1.4.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.
@@ -32,6 +32,12 @@ module Google
32
32
  # source external to Google to a Cloud Storage bucket.
33
33
  #
34
34
  class Client
35
+ # @private
36
+ API_VERSION = ""
37
+
38
+ # @private
39
+ DEFAULT_ENDPOINT_TEMPLATE = "storagetransfer.$UNIVERSE_DOMAIN$"
40
+
35
41
  include Paths
36
42
 
37
43
  # @private
@@ -99,6 +105,15 @@ module Google
99
105
  @config
100
106
  end
101
107
 
108
+ ##
109
+ # The effective universe domain
110
+ #
111
+ # @return [String]
112
+ #
113
+ def universe_domain
114
+ @storage_transfer_service_stub.universe_domain
115
+ end
116
+
102
117
  ##
103
118
  # Create a new StorageTransferService client object.
104
119
  #
@@ -132,8 +147,9 @@ module Google
132
147
  credentials = @config.credentials
133
148
  # Use self-signed JWT if the endpoint is unchanged from default,
134
149
  # but only if the default endpoint does not have a region prefix.
135
- enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
136
- !@config.endpoint.split(".").first.include?("-")
150
+ enable_self_signed_jwt = @config.endpoint.nil? ||
151
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
152
+ !@config.endpoint.split(".").first.include?("-"))
137
153
  credentials ||= Credentials.default scope: @config.scope,
138
154
  enable_self_signed_jwt: enable_self_signed_jwt
139
155
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
@@ -146,16 +162,30 @@ module Google
146
162
  config.credentials = credentials
147
163
  config.quota_project = @quota_project_id
148
164
  config.endpoint = @config.endpoint
165
+ config.universe_domain = @config.universe_domain
149
166
  end
150
167
 
151
168
  @storage_transfer_service_stub = ::Gapic::ServiceStub.new(
152
169
  ::Google::Cloud::StorageTransfer::V1::StorageTransferService::Stub,
153
- credentials: credentials,
154
- endpoint: @config.endpoint,
170
+ credentials: credentials,
171
+ endpoint: @config.endpoint,
172
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
173
+ universe_domain: @config.universe_domain,
155
174
  channel_args: @config.channel_args,
156
175
  interceptors: @config.interceptors,
157
- channel_pool_config: @config.channel_pool
176
+ channel_pool_config: @config.channel_pool,
177
+ logger: @config.logger
158
178
  )
179
+
180
+ @storage_transfer_service_stub.stub_logger&.info do |entry|
181
+ entry.set_system_name
182
+ entry.set_service
183
+ entry.message = "Created client for #{entry.service}"
184
+ entry.set_credentials_fields credentials
185
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
186
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
187
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
188
+ end
159
189
  end
160
190
 
161
191
  ##
@@ -165,6 +195,15 @@ module Google
165
195
  #
166
196
  attr_reader :operations_client
167
197
 
198
+ ##
199
+ # The logger used for request/response debug logging.
200
+ #
201
+ # @return [Logger]
202
+ #
203
+ def logger
204
+ @storage_transfer_service_stub.logger
205
+ end
206
+
168
207
  # Service calls
169
208
 
170
209
  ##
@@ -230,10 +269,11 @@ module Google
230
269
  # Customize the options with defaults
231
270
  metadata = @config.rpcs.get_google_service_account.metadata.to_h
232
271
 
233
- # Set x-goog-api-client and x-goog-user-project headers
272
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
234
273
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
235
274
  lib_name: @config.lib_name, lib_version: @config.lib_version,
236
275
  gapic_version: ::Google::Cloud::StorageTransfer::V1::VERSION
276
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
237
277
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
238
278
 
239
279
  header_params = {}
@@ -254,7 +294,6 @@ module Google
254
294
 
255
295
  @storage_transfer_service_stub.call_rpc :get_google_service_account, request, options: options do |response, operation|
256
296
  yield response, operation if block_given?
257
- return response
258
297
  end
259
298
  rescue ::GRPC::BadStatus => e
260
299
  raise ::Google::Cloud::Error.from_error(e)
@@ -315,10 +354,11 @@ module Google
315
354
  # Customize the options with defaults
316
355
  metadata = @config.rpcs.create_transfer_job.metadata.to_h
317
356
 
318
- # Set x-goog-api-client and x-goog-user-project headers
357
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
319
358
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
320
359
  lib_name: @config.lib_name, lib_version: @config.lib_version,
321
360
  gapic_version: ::Google::Cloud::StorageTransfer::V1::VERSION
361
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
322
362
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
323
363
 
324
364
  options.apply_defaults timeout: @config.rpcs.create_transfer_job.timeout,
@@ -331,7 +371,6 @@ module Google
331
371
 
332
372
  @storage_transfer_service_stub.call_rpc :create_transfer_job, request, options: options do |response, operation|
333
373
  yield response, operation if block_given?
334
- return response
335
374
  end
336
375
  rescue ::GRPC::BadStatus => e
337
376
  raise ::Google::Cloud::Error.from_error(e)
@@ -427,10 +466,11 @@ module Google
427
466
  # Customize the options with defaults
428
467
  metadata = @config.rpcs.update_transfer_job.metadata.to_h
429
468
 
430
- # Set x-goog-api-client and x-goog-user-project headers
469
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
431
470
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
432
471
  lib_name: @config.lib_name, lib_version: @config.lib_version,
433
472
  gapic_version: ::Google::Cloud::StorageTransfer::V1::VERSION
473
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
434
474
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
435
475
 
436
476
  header_params = {}
@@ -451,7 +491,6 @@ module Google
451
491
 
452
492
  @storage_transfer_service_stub.call_rpc :update_transfer_job, request, options: options do |response, operation|
453
493
  yield response, operation if block_given?
454
- return response
455
494
  end
456
495
  rescue ::GRPC::BadStatus => e
457
496
  raise ::Google::Cloud::Error.from_error(e)
@@ -515,10 +554,11 @@ module Google
515
554
  # Customize the options with defaults
516
555
  metadata = @config.rpcs.get_transfer_job.metadata.to_h
517
556
 
518
- # Set x-goog-api-client and x-goog-user-project headers
557
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
519
558
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
520
559
  lib_name: @config.lib_name, lib_version: @config.lib_version,
521
560
  gapic_version: ::Google::Cloud::StorageTransfer::V1::VERSION
561
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
522
562
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
523
563
 
524
564
  header_params = {}
@@ -539,7 +579,6 @@ module Google
539
579
 
540
580
  @storage_transfer_service_stub.call_rpc :get_transfer_job, request, options: options do |response, operation|
541
581
  yield response, operation if block_given?
542
- return response
543
582
  end
544
583
  rescue ::GRPC::BadStatus => e
545
584
  raise ::Google::Cloud::Error.from_error(e)
@@ -565,17 +604,32 @@ module Google
565
604
  #
566
605
  # @param filter [::String]
567
606
  # Required. A list of query parameters specified as JSON text in the form of:
568
- # `{"projectId":"my_project_id",
569
- # "jobNames":["jobid1","jobid2",...],
570
- # "jobStatuses":["status1","status2",...]}`
571
- #
572
- # Since `jobNames` and `jobStatuses` support multiple values, their values
573
- # must be specified with array notation. `projectId` is required.
574
- # `jobNames` and `jobStatuses` are optional. The valid values for
575
- # `jobStatuses` are case-insensitive:
576
- # {::Google::Cloud::StorageTransfer::V1::TransferJob::Status::ENABLED ENABLED},
577
- # {::Google::Cloud::StorageTransfer::V1::TransferJob::Status::DISABLED DISABLED}, and
578
- # {::Google::Cloud::StorageTransfer::V1::TransferJob::Status::DELETED DELETED}.
607
+ #
608
+ # ```
609
+ # {
610
+ # "projectId":"my_project_id",
611
+ # "jobNames":["jobid1","jobid2",...],
612
+ # "jobStatuses":["status1","status2",...],
613
+ # "dataBackend":"QUERY_REPLICATION_CONFIGS",
614
+ # "sourceBucket":"source-bucket-name",
615
+ # "sinkBucket":"sink-bucket-name",
616
+ # }
617
+ # ```
618
+ #
619
+ # The JSON formatting in the example is for display only; provide the
620
+ # query parameters without spaces or line breaks.
621
+ #
622
+ # * `projectId` is required.
623
+ # * Since `jobNames` and `jobStatuses` support multiple values, their values
624
+ # must be specified with array notation. `jobNames` and `jobStatuses` are
625
+ # optional. Valid values are case-insensitive:
626
+ # * {::Google::Cloud::StorageTransfer::V1::TransferJob::Status::ENABLED ENABLED}
627
+ # * {::Google::Cloud::StorageTransfer::V1::TransferJob::Status::DISABLED DISABLED}
628
+ # * {::Google::Cloud::StorageTransfer::V1::TransferJob::Status::DELETED DELETED}
629
+ # * Specify `"dataBackend":"QUERY_REPLICATION_CONFIGS"` to return a list of
630
+ # cross-bucket replication jobs.
631
+ # * Limit the results to jobs from a particular bucket with `sourceBucket`
632
+ # and/or to a particular bucket with `sinkBucket`.
579
633
  # @param page_size [::Integer]
580
634
  # The list page size. The max allowed value is 256.
581
635
  # @param page_token [::String]
@@ -619,10 +673,11 @@ module Google
619
673
  # Customize the options with defaults
620
674
  metadata = @config.rpcs.list_transfer_jobs.metadata.to_h
621
675
 
622
- # Set x-goog-api-client and x-goog-user-project headers
676
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
623
677
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
624
678
  lib_name: @config.lib_name, lib_version: @config.lib_version,
625
679
  gapic_version: ::Google::Cloud::StorageTransfer::V1::VERSION
680
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
626
681
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
627
682
 
628
683
  options.apply_defaults timeout: @config.rpcs.list_transfer_jobs.timeout,
@@ -636,7 +691,7 @@ module Google
636
691
  @storage_transfer_service_stub.call_rpc :list_transfer_jobs, request, options: options do |response, operation|
637
692
  response = ::Gapic::PagedEnumerable.new @storage_transfer_service_stub, :list_transfer_jobs, request, response, operation, options
638
693
  yield response, operation if block_given?
639
- return response
694
+ throw :response, response
640
695
  end
641
696
  rescue ::GRPC::BadStatus => e
642
697
  raise ::Google::Cloud::Error.from_error(e)
@@ -697,10 +752,11 @@ module Google
697
752
  # Customize the options with defaults
698
753
  metadata = @config.rpcs.pause_transfer_operation.metadata.to_h
699
754
 
700
- # Set x-goog-api-client and x-goog-user-project headers
755
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
701
756
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
702
757
  lib_name: @config.lib_name, lib_version: @config.lib_version,
703
758
  gapic_version: ::Google::Cloud::StorageTransfer::V1::VERSION
759
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
704
760
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
705
761
 
706
762
  header_params = {}
@@ -721,7 +777,6 @@ module Google
721
777
 
722
778
  @storage_transfer_service_stub.call_rpc :pause_transfer_operation, request, options: options do |response, operation|
723
779
  yield response, operation if block_given?
724
- return response
725
780
  end
726
781
  rescue ::GRPC::BadStatus => e
727
782
  raise ::Google::Cloud::Error.from_error(e)
@@ -782,10 +837,11 @@ module Google
782
837
  # Customize the options with defaults
783
838
  metadata = @config.rpcs.resume_transfer_operation.metadata.to_h
784
839
 
785
- # Set x-goog-api-client and x-goog-user-project headers
840
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
786
841
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
787
842
  lib_name: @config.lib_name, lib_version: @config.lib_version,
788
843
  gapic_version: ::Google::Cloud::StorageTransfer::V1::VERSION
844
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
789
845
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
790
846
 
791
847
  header_params = {}
@@ -806,7 +862,6 @@ module Google
806
862
 
807
863
  @storage_transfer_service_stub.call_rpc :resume_transfer_operation, request, options: options do |response, operation|
808
864
  yield response, operation if block_given?
809
- return response
810
865
  end
811
866
  rescue ::GRPC::BadStatus => e
812
867
  raise ::Google::Cloud::Error.from_error(e)
@@ -880,10 +935,11 @@ module Google
880
935
  # Customize the options with defaults
881
936
  metadata = @config.rpcs.run_transfer_job.metadata.to_h
882
937
 
883
- # Set x-goog-api-client and x-goog-user-project headers
938
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
884
939
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
885
940
  lib_name: @config.lib_name, lib_version: @config.lib_version,
886
941
  gapic_version: ::Google::Cloud::StorageTransfer::V1::VERSION
942
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
887
943
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
888
944
 
889
945
  header_params = {}
@@ -905,7 +961,7 @@ module Google
905
961
  @storage_transfer_service_stub.call_rpc :run_transfer_job, request, options: options do |response, operation|
906
962
  response = ::Gapic::Operation.new response, @operations_client, options: options
907
963
  yield response, operation if block_given?
908
- return response
964
+ throw :response, response
909
965
  end
910
966
  rescue ::GRPC::BadStatus => e
911
967
  raise ::Google::Cloud::Error.from_error(e)
@@ -970,10 +1026,11 @@ module Google
970
1026
  # Customize the options with defaults
971
1027
  metadata = @config.rpcs.delete_transfer_job.metadata.to_h
972
1028
 
973
- # Set x-goog-api-client and x-goog-user-project headers
1029
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
974
1030
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
975
1031
  lib_name: @config.lib_name, lib_version: @config.lib_version,
976
1032
  gapic_version: ::Google::Cloud::StorageTransfer::V1::VERSION
1033
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
977
1034
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
978
1035
 
979
1036
  header_params = {}
@@ -994,7 +1051,6 @@ module Google
994
1051
 
995
1052
  @storage_transfer_service_stub.call_rpc :delete_transfer_job, request, options: options do |response, operation|
996
1053
  yield response, operation if block_given?
997
- return response
998
1054
  end
999
1055
  rescue ::GRPC::BadStatus => e
1000
1056
  raise ::Google::Cloud::Error.from_error(e)
@@ -1072,10 +1128,11 @@ module Google
1072
1128
  # Customize the options with defaults
1073
1129
  metadata = @config.rpcs.create_agent_pool.metadata.to_h
1074
1130
 
1075
- # Set x-goog-api-client and x-goog-user-project headers
1131
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1076
1132
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1077
1133
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1078
1134
  gapic_version: ::Google::Cloud::StorageTransfer::V1::VERSION
1135
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1079
1136
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1080
1137
 
1081
1138
  header_params = {}
@@ -1096,7 +1153,6 @@ module Google
1096
1153
 
1097
1154
  @storage_transfer_service_stub.call_rpc :create_agent_pool, request, options: options do |response, operation|
1098
1155
  yield response, operation if block_given?
1099
- return response
1100
1156
  end
1101
1157
  rescue ::GRPC::BadStatus => e
1102
1158
  raise ::Google::Cloud::Error.from_error(e)
@@ -1175,10 +1231,11 @@ module Google
1175
1231
  # Customize the options with defaults
1176
1232
  metadata = @config.rpcs.update_agent_pool.metadata.to_h
1177
1233
 
1178
- # Set x-goog-api-client and x-goog-user-project headers
1234
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1179
1235
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1180
1236
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1181
1237
  gapic_version: ::Google::Cloud::StorageTransfer::V1::VERSION
1238
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1182
1239
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1183
1240
 
1184
1241
  header_params = {}
@@ -1199,7 +1256,6 @@ module Google
1199
1256
 
1200
1257
  @storage_transfer_service_stub.call_rpc :update_agent_pool, request, options: options do |response, operation|
1201
1258
  yield response, operation if block_given?
1202
- return response
1203
1259
  end
1204
1260
  rescue ::GRPC::BadStatus => e
1205
1261
  raise ::Google::Cloud::Error.from_error(e)
@@ -1260,10 +1316,11 @@ module Google
1260
1316
  # Customize the options with defaults
1261
1317
  metadata = @config.rpcs.get_agent_pool.metadata.to_h
1262
1318
 
1263
- # Set x-goog-api-client and x-goog-user-project headers
1319
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1264
1320
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1265
1321
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1266
1322
  gapic_version: ::Google::Cloud::StorageTransfer::V1::VERSION
1323
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1267
1324
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1268
1325
 
1269
1326
  header_params = {}
@@ -1284,7 +1341,6 @@ module Google
1284
1341
 
1285
1342
  @storage_transfer_service_stub.call_rpc :get_agent_pool, request, options: options do |response, operation|
1286
1343
  yield response, operation if block_given?
1287
- return response
1288
1344
  end
1289
1345
  rescue ::GRPC::BadStatus => e
1290
1346
  raise ::Google::Cloud::Error.from_error(e)
@@ -1362,10 +1418,11 @@ module Google
1362
1418
  # Customize the options with defaults
1363
1419
  metadata = @config.rpcs.list_agent_pools.metadata.to_h
1364
1420
 
1365
- # Set x-goog-api-client and x-goog-user-project headers
1421
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1366
1422
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1367
1423
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1368
1424
  gapic_version: ::Google::Cloud::StorageTransfer::V1::VERSION
1425
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1369
1426
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1370
1427
 
1371
1428
  header_params = {}
@@ -1387,7 +1444,7 @@ module Google
1387
1444
  @storage_transfer_service_stub.call_rpc :list_agent_pools, request, options: options do |response, operation|
1388
1445
  response = ::Gapic::PagedEnumerable.new @storage_transfer_service_stub, :list_agent_pools, request, response, operation, options
1389
1446
  yield response, operation if block_given?
1390
- return response
1447
+ throw :response, response
1391
1448
  end
1392
1449
  rescue ::GRPC::BadStatus => e
1393
1450
  raise ::Google::Cloud::Error.from_error(e)
@@ -1448,10 +1505,11 @@ module Google
1448
1505
  # Customize the options with defaults
1449
1506
  metadata = @config.rpcs.delete_agent_pool.metadata.to_h
1450
1507
 
1451
- # Set x-goog-api-client and x-goog-user-project headers
1508
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1452
1509
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1453
1510
  lib_name: @config.lib_name, lib_version: @config.lib_version,
1454
1511
  gapic_version: ::Google::Cloud::StorageTransfer::V1::VERSION
1512
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1455
1513
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1456
1514
 
1457
1515
  header_params = {}
@@ -1472,7 +1530,6 @@ module Google
1472
1530
 
1473
1531
  @storage_transfer_service_stub.call_rpc :delete_agent_pool, request, options: options do |response, operation|
1474
1532
  yield response, operation if block_given?
1475
- return response
1476
1533
  end
1477
1534
  rescue ::GRPC::BadStatus => e
1478
1535
  raise ::Google::Cloud::Error.from_error(e)
@@ -1508,9 +1565,9 @@ module Google
1508
1565
  # end
1509
1566
  #
1510
1567
  # @!attribute [rw] endpoint
1511
- # The hostname or hostname:port of the service endpoint.
1512
- # Defaults to `"storagetransfer.googleapis.com"`.
1513
- # @return [::String]
1568
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1569
+ # nil, indicating to use the default endpoint in the current universe domain.
1570
+ # @return [::String,nil]
1514
1571
  # @!attribute [rw] credentials
1515
1572
  # Credentials to send with calls. You may provide any of the following types:
1516
1573
  # * (`String`) The path to a service account key file in JSON format
@@ -1522,6 +1579,13 @@ module Google
1522
1579
  # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
1523
1580
  # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
1524
1581
  # * (`nil`) indicating no credentials
1582
+ #
1583
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
1584
+ # external source for authentication to Google Cloud, you must validate it before
1585
+ # providing it to a Google API client library. Providing an unvalidated credential
1586
+ # configuration to Google APIs can compromise the security of your systems and data.
1587
+ # For more information, refer to [Validate credential configurations from external
1588
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
1525
1589
  # @return [::Object]
1526
1590
  # @!attribute [rw] scope
1527
1591
  # The OAuth scopes
@@ -1556,13 +1620,25 @@ module Google
1556
1620
  # @!attribute [rw] quota_project
1557
1621
  # A separate project against which to charge quota.
1558
1622
  # @return [::String]
1623
+ # @!attribute [rw] universe_domain
1624
+ # The universe domain within which to make requests. This determines the
1625
+ # default endpoint URL. The default value of nil uses the environment
1626
+ # universe (usually the default "googleapis.com" universe).
1627
+ # @return [::String,nil]
1628
+ # @!attribute [rw] logger
1629
+ # A custom logger to use for request/response debug logging, or the value
1630
+ # `:default` (the default) to construct a default logger, or `nil` to
1631
+ # explicitly disable logging.
1632
+ # @return [::Logger,:default,nil]
1559
1633
  #
1560
1634
  class Configuration
1561
1635
  extend ::Gapic::Config
1562
1636
 
1637
+ # @private
1638
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1563
1639
  DEFAULT_ENDPOINT = "storagetransfer.googleapis.com"
1564
1640
 
1565
- config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1641
+ config_attr :endpoint, nil, ::String, nil
1566
1642
  config_attr :credentials, nil do |value|
1567
1643
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1568
1644
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -1577,6 +1653,8 @@ module Google
1577
1653
  config_attr :metadata, nil, ::Hash, nil
1578
1654
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1579
1655
  config_attr :quota_project, nil, ::String, nil
1656
+ config_attr :universe_domain, nil, ::String, nil
1657
+ config_attr :logger, :default, ::Logger, nil, :default
1580
1658
 
1581
1659
  # @private
1582
1660
  def initialize parent_config = nil