google-cloud-ai_platform-v1 0.60.0 → 0.61.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +30 -20
  3. data/lib/google/cloud/ai_platform/v1/dataset_service/client.rb +43 -20
  4. data/lib/google/cloud/ai_platform/v1/dataset_service/operations.rb +9 -5
  5. data/lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb +43 -20
  6. data/lib/google/cloud/ai_platform/v1/dataset_service/rest/operations.rb +49 -35
  7. data/lib/google/cloud/ai_platform/v1/dataset_service/rest/service_stub.rb +166 -116
  8. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/client.rb +34 -7
  9. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/operations.rb +9 -5
  10. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/client.rb +33 -7
  11. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/operations.rb +49 -35
  12. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/service_stub.rb +62 -38
  13. data/lib/google/cloud/ai_platform/v1/endpoint_service/client.rb +36 -10
  14. data/lib/google/cloud/ai_platform/v1/endpoint_service/operations.rb +9 -5
  15. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/client.rb +36 -10
  16. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/operations.rb +49 -35
  17. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/service_stub.rb +86 -56
  18. data/lib/google/cloud/ai_platform/v1/evaluation_service/client.rb +29 -2
  19. data/lib/google/cloud/ai_platform/v1/evaluation_service/rest/client.rb +29 -2
  20. data/lib/google/cloud/ai_platform/v1/evaluation_service/rest/service_stub.rb +22 -8
  21. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/client.rb +38 -14
  22. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/operations.rb +9 -5
  23. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/client.rb +38 -14
  24. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/operations.rb +49 -35
  25. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/service_stub.rb +118 -80
  26. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/client.rb +29 -3
  27. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest/client.rb +29 -3
  28. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest/service_stub.rb +30 -14
  29. data/lib/google/cloud/ai_platform/v1/feature_registry_service/client.rb +38 -12
  30. data/lib/google/cloud/ai_platform/v1/feature_registry_service/operations.rb +9 -5
  31. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/client.rb +38 -12
  32. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/operations.rb +49 -35
  33. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/service_stub.rb +102 -68
  34. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/client.rb +29 -4
  35. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest/client.rb +29 -3
  36. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest/service_stub.rb +31 -14
  37. data/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb +45 -22
  38. data/lib/google/cloud/ai_platform/v1/featurestore_service/operations.rb +9 -5
  39. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/client.rb +45 -22
  40. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/operations.rb +49 -35
  41. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/service_stub.rb +182 -128
  42. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/client.rb +31 -6
  43. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/operations.rb +9 -5
  44. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/client.rb +31 -6
  45. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/operations.rb +49 -35
  46. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/service_stub.rb +54 -32
  47. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/client.rb +35 -9
  48. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/operations.rb +9 -5
  49. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/client.rb +35 -9
  50. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/operations.rb +49 -35
  51. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/service_stub.rb +78 -50
  52. data/lib/google/cloud/ai_platform/v1/index_service/client.rb +33 -8
  53. data/lib/google/cloud/ai_platform/v1/index_service/operations.rb +9 -5
  54. data/lib/google/cloud/ai_platform/v1/index_service/rest/client.rb +33 -8
  55. data/lib/google/cloud/ai_platform/v1/index_service/rest/operations.rb +49 -35
  56. data/lib/google/cloud/ai_platform/v1/index_service/rest/service_stub.rb +70 -44
  57. data/lib/google/cloud/ai_platform/v1/job_service/client.rb +44 -36
  58. data/lib/google/cloud/ai_platform/v1/job_service/operations.rb +9 -5
  59. data/lib/google/cloud/ai_platform/v1/job_service/rest/client.rb +44 -36
  60. data/lib/google/cloud/ai_platform/v1/job_service/rest/operations.rb +49 -35
  61. data/lib/google/cloud/ai_platform/v1/job_service/rest/service_stub.rb +294 -212
  62. data/lib/google/cloud/ai_platform/v1/llm_utility_service/client.rb +29 -3
  63. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/client.rb +29 -3
  64. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/service_stub.rb +30 -14
  65. data/lib/google/cloud/ai_platform/v1/match_service/client.rb +29 -3
  66. data/lib/google/cloud/ai_platform/v1/match_service/rest/client.rb +29 -3
  67. data/lib/google/cloud/ai_platform/v1/match_service/rest/service_stub.rb +30 -14
  68. data/lib/google/cloud/ai_platform/v1/metadata_service/client.rb +42 -33
  69. data/lib/google/cloud/ai_platform/v1/metadata_service/operations.rb +9 -5
  70. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/client.rb +42 -33
  71. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/operations.rb +49 -35
  72. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/service_stub.rb +270 -194
  73. data/lib/google/cloud/ai_platform/v1/migration_service/client.rb +31 -3
  74. data/lib/google/cloud/ai_platform/v1/migration_service/operations.rb +9 -5
  75. data/lib/google/cloud/ai_platform/v1/migration_service/rest/client.rb +31 -3
  76. data/lib/google/cloud/ai_platform/v1/migration_service/rest/operations.rb +49 -35
  77. data/lib/google/cloud/ai_platform/v1/migration_service/rest/service_stub.rb +30 -14
  78. data/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb +29 -2
  79. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/client.rb +29 -2
  80. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/service_stub.rb +22 -8
  81. data/lib/google/cloud/ai_platform/v1/model_service/client.rb +39 -19
  82. data/lib/google/cloud/ai_platform/v1/model_service/operations.rb +9 -5
  83. data/lib/google/cloud/ai_platform/v1/model_service/rest/client.rb +39 -19
  84. data/lib/google/cloud/ai_platform/v1/model_service/rest/operations.rb +49 -35
  85. data/lib/google/cloud/ai_platform/v1/model_service/rest/service_stub.rb +158 -110
  86. data/lib/google/cloud/ai_platform/v1/notebook_service/client.rb +41 -17
  87. data/lib/google/cloud/ai_platform/v1/notebook_service/operations.rb +9 -5
  88. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb +41 -17
  89. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/operations.rb +49 -35
  90. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/service_stub.rb +142 -98
  91. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/client.rb +34 -7
  92. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/operations.rb +9 -5
  93. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/client.rb +34 -7
  94. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/operations.rb +49 -35
  95. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/service_stub.rb +62 -38
  96. data/lib/google/cloud/ai_platform/v1/pipeline_service/client.rb +35 -13
  97. data/lib/google/cloud/ai_platform/v1/pipeline_service/operations.rb +9 -5
  98. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/client.rb +35 -13
  99. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/operations.rb +49 -35
  100. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/service_stub.rb +110 -74
  101. data/lib/google/cloud/ai_platform/v1/prediction_service/client.rb +29 -14
  102. data/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb +29 -7
  103. data/lib/google/cloud/ai_platform/v1/prediction_service/rest/service_stub.rb +65 -38
  104. data/lib/google/cloud/ai_platform/v1/schedule_service/client.rb +31 -8
  105. data/lib/google/cloud/ai_platform/v1/schedule_service/operations.rb +9 -5
  106. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/client.rb +31 -8
  107. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/operations.rb +49 -35
  108. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/service_stub.rb +70 -44
  109. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/client.rb +33 -6
  110. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/operations.rb +9 -5
  111. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/client.rb +33 -6
  112. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/operations.rb +49 -35
  113. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/service_stub.rb +54 -32
  114. data/lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb +40 -31
  115. data/lib/google/cloud/ai_platform/v1/tensorboard_service/operations.rb +9 -5
  116. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/client.rb +40 -30
  117. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/operations.rb +49 -35
  118. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/service_stub.rb +247 -176
  119. data/lib/google/cloud/ai_platform/v1/version.rb +1 -1
  120. data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/client.rb +36 -11
  121. data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/operations.rb +9 -5
  122. data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/client.rb +36 -11
  123. data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/operations.rb +49 -35
  124. data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/service_stub.rb +94 -62
  125. data/lib/google/cloud/ai_platform/v1/vertex_rag_service/client.rb +29 -4
  126. data/lib/google/cloud/ai_platform/v1/vertex_rag_service/rest/client.rb +29 -4
  127. data/lib/google/cloud/ai_platform/v1/vertex_rag_service/rest/service_stub.rb +38 -20
  128. data/lib/google/cloud/ai_platform/v1/vizier_service/client.rb +33 -16
  129. data/lib/google/cloud/ai_platform/v1/vizier_service/operations.rb +9 -5
  130. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/client.rb +33 -16
  131. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/operations.rb +49 -35
  132. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/service_stub.rb +134 -92
  133. data/lib/google/cloud/aiplatform/v1/accelerator_type_pb.rb +1 -1
  134. data/proto_docs/google/cloud/aiplatform/v1/accelerator_type.rb +3 -0
  135. metadata +4 -4
@@ -167,14 +167,26 @@ module Google
167
167
  universe_domain: @config.universe_domain,
168
168
  channel_args: @config.channel_args,
169
169
  interceptors: @config.interceptors,
170
- channel_pool_config: @config.channel_pool
170
+ channel_pool_config: @config.channel_pool,
171
+ logger: @config.logger
171
172
  )
172
173
 
174
+ @feature_registry_service_stub.stub_logger&.info do |entry|
175
+ entry.set_system_name
176
+ entry.set_service
177
+ entry.message = "Created client for #{entry.service}"
178
+ entry.set_credentials_fields credentials
179
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
180
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
181
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
182
+ end
183
+
173
184
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
174
185
  config.credentials = credentials
175
186
  config.quota_project = @quota_project_id
176
187
  config.endpoint = @feature_registry_service_stub.endpoint
177
188
  config.universe_domain = @feature_registry_service_stub.universe_domain
189
+ config.logger = @feature_registry_service_stub.logger if config.respond_to? :logger=
178
190
  end
179
191
 
180
192
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
@@ -182,6 +194,7 @@ module Google
182
194
  config.quota_project = @quota_project_id
183
195
  config.endpoint = @feature_registry_service_stub.endpoint
184
196
  config.universe_domain = @feature_registry_service_stub.universe_domain
197
+ config.logger = @feature_registry_service_stub.logger if config.respond_to? :logger=
185
198
  end
186
199
  end
187
200
 
@@ -206,6 +219,15 @@ module Google
206
219
  #
207
220
  attr_reader :iam_policy_client
208
221
 
222
+ ##
223
+ # The logger used for request/response debug logging.
224
+ #
225
+ # @return [Logger]
226
+ #
227
+ def logger
228
+ @feature_registry_service_stub.logger
229
+ end
230
+
209
231
  # Service calls
210
232
 
211
233
  ##
@@ -308,7 +330,7 @@ module Google
308
330
  @feature_registry_service_stub.call_rpc :create_feature_group, request, options: options do |response, operation|
309
331
  response = ::Gapic::Operation.new response, @operations_client, options: options
310
332
  yield response, operation if block_given?
311
- return response
333
+ throw :response, response
312
334
  end
313
335
  rescue ::GRPC::BadStatus => e
314
336
  raise ::Google::Cloud::Error.from_error(e)
@@ -394,7 +416,6 @@ module Google
394
416
 
395
417
  @feature_registry_service_stub.call_rpc :get_feature_group, request, options: options do |response, operation|
396
418
  yield response, operation if block_given?
397
- return response
398
419
  end
399
420
  rescue ::GRPC::BadStatus => e
400
421
  raise ::Google::Cloud::Error.from_error(e)
@@ -525,7 +546,7 @@ module Google
525
546
  @feature_registry_service_stub.call_rpc :list_feature_groups, request, options: options do |response, operation|
526
547
  response = ::Gapic::PagedEnumerable.new @feature_registry_service_stub, :list_feature_groups, request, response, operation, options
527
548
  yield response, operation if block_given?
528
- return response
549
+ throw :response, response
529
550
  end
530
551
  rescue ::GRPC::BadStatus => e
531
552
  raise ::Google::Cloud::Error.from_error(e)
@@ -636,7 +657,7 @@ module Google
636
657
  @feature_registry_service_stub.call_rpc :update_feature_group, request, options: options do |response, operation|
637
658
  response = ::Gapic::Operation.new response, @operations_client, options: options
638
659
  yield response, operation if block_given?
639
- return response
660
+ throw :response, response
640
661
  end
641
662
  rescue ::GRPC::BadStatus => e
642
663
  raise ::Google::Cloud::Error.from_error(e)
@@ -736,7 +757,7 @@ module Google
736
757
  @feature_registry_service_stub.call_rpc :delete_feature_group, request, options: options do |response, operation|
737
758
  response = ::Gapic::Operation.new response, @operations_client, options: options
738
759
  yield response, operation if block_given?
739
- return response
760
+ throw :response, response
740
761
  end
741
762
  rescue ::GRPC::BadStatus => e
742
763
  raise ::Google::Cloud::Error.from_error(e)
@@ -844,7 +865,7 @@ module Google
844
865
  @feature_registry_service_stub.call_rpc :create_feature, request, options: options do |response, operation|
845
866
  response = ::Gapic::Operation.new response, @operations_client, options: options
846
867
  yield response, operation if block_given?
847
- return response
868
+ throw :response, response
848
869
  end
849
870
  rescue ::GRPC::BadStatus => e
850
871
  raise ::Google::Cloud::Error.from_error(e)
@@ -947,7 +968,7 @@ module Google
947
968
  @feature_registry_service_stub.call_rpc :batch_create_features, request, options: options do |response, operation|
948
969
  response = ::Gapic::Operation.new response, @operations_client, options: options
949
970
  yield response, operation if block_given?
950
- return response
971
+ throw :response, response
951
972
  end
952
973
  rescue ::GRPC::BadStatus => e
953
974
  raise ::Google::Cloud::Error.from_error(e)
@@ -1037,7 +1058,6 @@ module Google
1037
1058
 
1038
1059
  @feature_registry_service_stub.call_rpc :get_feature, request, options: options do |response, operation|
1039
1060
  yield response, operation if block_given?
1040
- return response
1041
1061
  end
1042
1062
  rescue ::GRPC::BadStatus => e
1043
1063
  raise ::Google::Cloud::Error.from_error(e)
@@ -1189,7 +1209,7 @@ module Google
1189
1209
  @feature_registry_service_stub.call_rpc :list_features, request, options: options do |response, operation|
1190
1210
  response = ::Gapic::PagedEnumerable.new @feature_registry_service_stub, :list_features, request, response, operation, options
1191
1211
  yield response, operation if block_given?
1192
- return response
1212
+ throw :response, response
1193
1213
  end
1194
1214
  rescue ::GRPC::BadStatus => e
1195
1215
  raise ::Google::Cloud::Error.from_error(e)
@@ -1302,7 +1322,7 @@ module Google
1302
1322
  @feature_registry_service_stub.call_rpc :update_feature, request, options: options do |response, operation|
1303
1323
  response = ::Gapic::Operation.new response, @operations_client, options: options
1304
1324
  yield response, operation if block_given?
1305
- return response
1325
+ throw :response, response
1306
1326
  end
1307
1327
  rescue ::GRPC::BadStatus => e
1308
1328
  raise ::Google::Cloud::Error.from_error(e)
@@ -1399,7 +1419,7 @@ module Google
1399
1419
  @feature_registry_service_stub.call_rpc :delete_feature, request, options: options do |response, operation|
1400
1420
  response = ::Gapic::Operation.new response, @operations_client, options: options
1401
1421
  yield response, operation if block_given?
1402
- return response
1422
+ throw :response, response
1403
1423
  end
1404
1424
  rescue ::GRPC::BadStatus => e
1405
1425
  raise ::Google::Cloud::Error.from_error(e)
@@ -1488,6 +1508,11 @@ module Google
1488
1508
  # default endpoint URL. The default value of nil uses the environment
1489
1509
  # universe (usually the default "googleapis.com" universe).
1490
1510
  # @return [::String,nil]
1511
+ # @!attribute [rw] logger
1512
+ # A custom logger to use for request/response debug logging, or the value
1513
+ # `:default` (the default) to construct a default logger, or `nil` to
1514
+ # explicitly disable logging.
1515
+ # @return [::Logger,:default,nil]
1491
1516
  #
1492
1517
  class Configuration
1493
1518
  extend ::Gapic::Config
@@ -1512,6 +1537,7 @@ module Google
1512
1537
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1513
1538
  config_attr :quota_project, nil, ::String, nil
1514
1539
  config_attr :universe_domain, nil, ::String, nil
1540
+ config_attr :logger, :default, ::Logger, nil, :default
1515
1541
 
1516
1542
  # @private
1517
1543
  def initialize parent_config = nil
@@ -213,7 +213,7 @@ module Google
213
213
  wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
214
214
  response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
215
215
  yield response, operation if block_given?
216
- return response
216
+ throw :response, response
217
217
  end
218
218
  rescue ::GRPC::BadStatus => e
219
219
  raise ::Google::Cloud::Error.from_error(e)
@@ -309,7 +309,7 @@ module Google
309
309
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
310
310
  response = ::Gapic::Operation.new response, @operations_client, options: options
311
311
  yield response, operation if block_given?
312
- return response
312
+ throw :response, response
313
313
  end
314
314
  rescue ::GRPC::BadStatus => e
315
315
  raise ::Google::Cloud::Error.from_error(e)
@@ -398,7 +398,6 @@ module Google
398
398
 
399
399
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
400
400
  yield response, operation if block_given?
401
- return response
402
401
  end
403
402
  rescue ::GRPC::BadStatus => e
404
403
  raise ::Google::Cloud::Error.from_error(e)
@@ -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)
@@ -600,7 +598,7 @@ module Google
600
598
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
601
599
  response = ::Gapic::Operation.new response, @operations_client, options: options
602
600
  yield response, operation if block_given?
603
- return response
601
+ throw :response, response
604
602
  end
605
603
  rescue ::GRPC::BadStatus => e
606
604
  raise ::Google::Cloud::Error.from_error(e)
@@ -689,6 +687,11 @@ module Google
689
687
  # default endpoint URL. The default value of nil uses the environment
690
688
  # universe (usually the default "googleapis.com" universe).
691
689
  # @return [::String,nil]
690
+ # @!attribute [rw] logger
691
+ # A custom logger to use for request/response debug logging, or the value
692
+ # `:default` (the default) to construct a default logger, or `nil` to
693
+ # explicitly disable logging.
694
+ # @return [::Logger,:default,nil]
692
695
  #
693
696
  class Configuration
694
697
  extend ::Gapic::Config
@@ -713,6 +716,7 @@ module Google
713
716
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
714
717
  config_attr :quota_project, nil, ::String, nil
715
718
  config_attr :universe_domain, nil, ::String, nil
719
+ config_attr :logger, :default, ::Logger, nil, :default
716
720
 
717
721
  # @private
718
722
  def initialize parent_config = nil
@@ -160,15 +160,27 @@ module Google
160
160
  endpoint: @config.endpoint,
161
161
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
162
162
  universe_domain: @config.universe_domain,
163
- credentials: credentials
163
+ credentials: credentials,
164
+ logger: @config.logger
164
165
  )
165
166
 
167
+ @feature_registry_service_stub.logger(stub: true)&.info do |entry|
168
+ entry.set_system_name
169
+ entry.set_service
170
+ entry.message = "Created client for #{entry.service}"
171
+ entry.set_credentials_fields credentials
172
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
173
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
174
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
175
+ end
176
+
166
177
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
167
178
  config.credentials = credentials
168
179
  config.quota_project = @quota_project_id
169
180
  config.endpoint = @feature_registry_service_stub.endpoint
170
181
  config.universe_domain = @feature_registry_service_stub.universe_domain
171
182
  config.bindings_override = @config.bindings_override
183
+ config.logger = @feature_registry_service_stub.logger if config.respond_to? :logger=
172
184
  end
173
185
 
174
186
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
@@ -177,6 +189,7 @@ module Google
177
189
  config.endpoint = @feature_registry_service_stub.endpoint
178
190
  config.universe_domain = @feature_registry_service_stub.universe_domain
179
191
  config.bindings_override = @config.bindings_override
192
+ config.logger = @feature_registry_service_stub.logger if config.respond_to? :logger=
180
193
  end
181
194
  end
182
195
 
@@ -201,6 +214,15 @@ module Google
201
214
  #
202
215
  attr_reader :iam_policy_client
203
216
 
217
+ ##
218
+ # The logger used for request/response debug logging.
219
+ #
220
+ # @return [Logger]
221
+ #
222
+ def logger
223
+ @feature_registry_service_stub.logger
224
+ end
225
+
204
226
  # Service calls
205
227
 
206
228
  ##
@@ -296,7 +318,7 @@ module Google
296
318
  @feature_registry_service_stub.create_feature_group request, options do |result, operation|
297
319
  result = ::Gapic::Operation.new result, @operations_client, options: options
298
320
  yield result, operation if block_given?
299
- return result
321
+ throw :response, result
300
322
  end
301
323
  rescue ::Gapic::Rest::Error => e
302
324
  raise ::Google::Cloud::Error.from_error(e)
@@ -375,7 +397,6 @@ module Google
375
397
 
376
398
  @feature_registry_service_stub.get_feature_group request, options do |result, operation|
377
399
  yield result, operation if block_given?
378
- return result
379
400
  end
380
401
  rescue ::Gapic::Rest::Error => e
381
402
  raise ::Google::Cloud::Error.from_error(e)
@@ -499,7 +520,7 @@ module Google
499
520
  @feature_registry_service_stub.list_feature_groups request, options do |result, operation|
500
521
  result = ::Gapic::Rest::PagedEnumerable.new @feature_registry_service_stub, :list_feature_groups, "feature_groups", request, result, options
501
522
  yield result, operation if block_given?
502
- return result
523
+ throw :response, result
503
524
  end
504
525
  rescue ::Gapic::Rest::Error => e
505
526
  raise ::Google::Cloud::Error.from_error(e)
@@ -603,7 +624,7 @@ module Google
603
624
  @feature_registry_service_stub.update_feature_group request, options do |result, operation|
604
625
  result = ::Gapic::Operation.new result, @operations_client, options: options
605
626
  yield result, operation if block_given?
606
- return result
627
+ throw :response, result
607
628
  end
608
629
  rescue ::Gapic::Rest::Error => e
609
630
  raise ::Google::Cloud::Error.from_error(e)
@@ -696,7 +717,7 @@ module Google
696
717
  @feature_registry_service_stub.delete_feature_group request, options do |result, operation|
697
718
  result = ::Gapic::Operation.new result, @operations_client, options: options
698
719
  yield result, operation if block_given?
699
- return result
720
+ throw :response, result
700
721
  end
701
722
  rescue ::Gapic::Rest::Error => e
702
723
  raise ::Google::Cloud::Error.from_error(e)
@@ -797,7 +818,7 @@ module Google
797
818
  @feature_registry_service_stub.create_feature request, options do |result, operation|
798
819
  result = ::Gapic::Operation.new result, @operations_client, options: options
799
820
  yield result, operation if block_given?
800
- return result
821
+ throw :response, result
801
822
  end
802
823
  rescue ::Gapic::Rest::Error => e
803
824
  raise ::Google::Cloud::Error.from_error(e)
@@ -893,7 +914,7 @@ module Google
893
914
  @feature_registry_service_stub.batch_create_features request, options do |result, operation|
894
915
  result = ::Gapic::Operation.new result, @operations_client, options: options
895
916
  yield result, operation if block_given?
896
- return result
917
+ throw :response, result
897
918
  end
898
919
  rescue ::Gapic::Rest::Error => e
899
920
  raise ::Google::Cloud::Error.from_error(e)
@@ -976,7 +997,6 @@ module Google
976
997
 
977
998
  @feature_registry_service_stub.get_feature request, options do |result, operation|
978
999
  yield result, operation if block_given?
979
- return result
980
1000
  end
981
1001
  rescue ::Gapic::Rest::Error => e
982
1002
  raise ::Google::Cloud::Error.from_error(e)
@@ -1121,7 +1141,7 @@ module Google
1121
1141
  @feature_registry_service_stub.list_features request, options do |result, operation|
1122
1142
  result = ::Gapic::Rest::PagedEnumerable.new @feature_registry_service_stub, :list_features, "features", request, result, options
1123
1143
  yield result, operation if block_given?
1124
- return result
1144
+ throw :response, result
1125
1145
  end
1126
1146
  rescue ::Gapic::Rest::Error => e
1127
1147
  raise ::Google::Cloud::Error.from_error(e)
@@ -1227,7 +1247,7 @@ module Google
1227
1247
  @feature_registry_service_stub.update_feature request, options do |result, operation|
1228
1248
  result = ::Gapic::Operation.new result, @operations_client, options: options
1229
1249
  yield result, operation if block_given?
1230
- return result
1250
+ throw :response, result
1231
1251
  end
1232
1252
  rescue ::Gapic::Rest::Error => e
1233
1253
  raise ::Google::Cloud::Error.from_error(e)
@@ -1317,7 +1337,7 @@ module Google
1317
1337
  @feature_registry_service_stub.delete_feature request, options do |result, operation|
1318
1338
  result = ::Gapic::Operation.new result, @operations_client, options: options
1319
1339
  yield result, operation if block_given?
1320
- return result
1340
+ throw :response, result
1321
1341
  end
1322
1342
  rescue ::Gapic::Rest::Error => e
1323
1343
  raise ::Google::Cloud::Error.from_error(e)
@@ -1397,6 +1417,11 @@ module Google
1397
1417
  # default endpoint URL. The default value of nil uses the environment
1398
1418
  # universe (usually the default "googleapis.com" universe).
1399
1419
  # @return [::String,nil]
1420
+ # @!attribute [rw] logger
1421
+ # A custom logger to use for request/response debug logging, or the value
1422
+ # `:default` (the default) to construct a default logger, or `nil` to
1423
+ # explicitly disable logging.
1424
+ # @return [::Logger,:default,nil]
1400
1425
  #
1401
1426
  class Configuration
1402
1427
  extend ::Gapic::Config
@@ -1425,6 +1450,7 @@ module Google
1425
1450
  # by the host service.
1426
1451
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1427
1452
  config_attr :bindings_override, {}, ::Hash, nil
1453
+ config_attr :logger, :default, ::Logger, nil, :default
1428
1454
 
1429
1455
  # @private
1430
1456
  def initialize parent_config = nil
@@ -196,7 +196,7 @@ module Google
196
196
  @operations_stub.list_operations request, options do |result, operation|
197
197
  result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
198
198
  yield result, operation if block_given?
199
- return result
199
+ throw :response, result
200
200
  end
201
201
  rescue ::Gapic::Rest::Error => e
202
202
  raise ::Google::Cloud::Error.from_error(e)
@@ -285,7 +285,7 @@ module Google
285
285
  @operations_stub.get_operation request, options do |result, operation|
286
286
  result = ::Gapic::Operation.new result, @operations_client, options: options
287
287
  yield result, operation if block_given?
288
- return result
288
+ throw :response, result
289
289
  end
290
290
  rescue ::Gapic::Rest::Error => e
291
291
  raise ::Google::Cloud::Error.from_error(e)
@@ -367,7 +367,6 @@ module Google
367
367
 
368
368
  @operations_stub.delete_operation request, options do |result, operation|
369
369
  yield result, operation if block_given?
370
- return result
371
370
  end
372
371
  rescue ::Gapic::Rest::Error => e
373
372
  raise ::Google::Cloud::Error.from_error(e)
@@ -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)
@@ -555,7 +553,7 @@ module Google
555
553
  @operations_stub.wait_operation request, options do |result, operation|
556
554
  result = ::Gapic::Operation.new result, @operations_client, options: options
557
555
  yield result, operation if block_given?
558
- return result
556
+ throw :response, result
559
557
  end
560
558
  rescue ::Gapic::Rest::Error => e
561
559
  raise ::Google::Cloud::Error.from_error(e)
@@ -635,6 +633,11 @@ module Google
635
633
  # default endpoint URL. The default value of nil uses the environment
636
634
  # universe (usually the default "googleapis.com" universe).
637
635
  # @return [::String,nil]
636
+ # @!attribute [rw] logger
637
+ # A custom logger to use for request/response debug logging, or the value
638
+ # `:default` (the default) to construct a default logger, or `nil` to
639
+ # explicitly disable logging.
640
+ # @return [::Logger,:default,nil]
638
641
  #
639
642
  class Configuration
640
643
  extend ::Gapic::Config
@@ -656,6 +659,7 @@ module Google
656
659
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
657
660
  config_attr :quota_project, nil, ::String, nil
658
661
  config_attr :universe_domain, nil, ::String, nil
662
+ config_attr :logger, :default, ::Logger, nil, :default
659
663
 
660
664
  # @private
661
665
  def initialize parent_config = nil
@@ -782,16 +786,18 @@ module Google
782
786
 
783
787
  response = @client_stub.make_http_request(
784
788
  verb,
785
- uri: uri,
786
- body: body || "",
787
- params: query_string_params,
789
+ uri: uri,
790
+ body: body || "",
791
+ params: query_string_params,
792
+ method_name: "list_operations",
788
793
  options: options
789
794
  )
790
795
  operation = ::Gapic::Rest::TransportOperation.new response
791
796
  result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
792
-
793
- yield result, operation if block_given?
794
- result
797
+ catch :response do
798
+ yield result, operation if block_given?
799
+ result
800
+ end
795
801
  end
796
802
 
797
803
  ##
@@ -820,16 +826,18 @@ module Google
820
826
 
821
827
  response = @client_stub.make_http_request(
822
828
  verb,
823
- uri: uri,
824
- body: body || "",
825
- params: query_string_params,
829
+ uri: uri,
830
+ body: body || "",
831
+ params: query_string_params,
832
+ method_name: "get_operation",
826
833
  options: options
827
834
  )
828
835
  operation = ::Gapic::Rest::TransportOperation.new response
829
836
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
830
-
831
- yield result, operation if block_given?
832
- result
837
+ catch :response do
838
+ yield result, operation if block_given?
839
+ result
840
+ end
833
841
  end
834
842
 
835
843
  ##
@@ -858,16 +866,18 @@ module Google
858
866
 
859
867
  response = @client_stub.make_http_request(
860
868
  verb,
861
- uri: uri,
862
- body: body || "",
863
- params: query_string_params,
869
+ uri: uri,
870
+ body: body || "",
871
+ params: query_string_params,
872
+ method_name: "delete_operation",
864
873
  options: options
865
874
  )
866
875
  operation = ::Gapic::Rest::TransportOperation.new response
867
876
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
868
-
869
- yield result, operation if block_given?
870
- result
877
+ catch :response do
878
+ yield result, operation if block_given?
879
+ result
880
+ end
871
881
  end
872
882
 
873
883
  ##
@@ -896,16 +906,18 @@ module Google
896
906
 
897
907
  response = @client_stub.make_http_request(
898
908
  verb,
899
- uri: uri,
900
- body: body || "",
901
- params: query_string_params,
909
+ uri: uri,
910
+ body: body || "",
911
+ params: query_string_params,
912
+ method_name: "cancel_operation",
902
913
  options: options
903
914
  )
904
915
  operation = ::Gapic::Rest::TransportOperation.new response
905
916
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
906
-
907
- yield result, operation if block_given?
908
- result
917
+ catch :response do
918
+ yield result, operation if block_given?
919
+ result
920
+ end
909
921
  end
910
922
 
911
923
  ##
@@ -934,16 +946,18 @@ module Google
934
946
 
935
947
  response = @client_stub.make_http_request(
936
948
  verb,
937
- uri: uri,
938
- body: body || "",
939
- params: query_string_params,
949
+ uri: uri,
950
+ body: body || "",
951
+ params: query_string_params,
952
+ method_name: "wait_operation",
940
953
  options: options
941
954
  )
942
955
  operation = ::Gapic::Rest::TransportOperation.new response
943
956
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
944
-
945
- yield result, operation if block_given?
946
- result
957
+ catch :response do
958
+ yield result, operation if block_given?
959
+ result
960
+ end
947
961
  end
948
962
 
949
963
  ##