google-cloud-ai_platform-v1 0.59.0 → 0.61.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) 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/lib/google/cloud/aiplatform/v1/notebook_execution_job_pb.rb +2 -1
  135. data/proto_docs/google/api/client.rb +19 -0
  136. data/proto_docs/google/cloud/aiplatform/v1/accelerator_type.rb +3 -0
  137. data/proto_docs/google/cloud/aiplatform/v1/notebook_execution_job.rb +15 -1
  138. metadata +5 -5
@@ -159,15 +159,27 @@ module Google
159
159
  endpoint: @config.endpoint,
160
160
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
161
161
  universe_domain: @config.universe_domain,
162
- credentials: credentials
162
+ credentials: credentials,
163
+ logger: @config.logger
163
164
  )
164
165
 
166
+ @job_service_stub.logger(stub: true)&.info do |entry|
167
+ entry.set_system_name
168
+ entry.set_service
169
+ entry.message = "Created client for #{entry.service}"
170
+ entry.set_credentials_fields credentials
171
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
172
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
173
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
174
+ end
175
+
165
176
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
166
177
  config.credentials = credentials
167
178
  config.quota_project = @quota_project_id
168
179
  config.endpoint = @job_service_stub.endpoint
169
180
  config.universe_domain = @job_service_stub.universe_domain
170
181
  config.bindings_override = @config.bindings_override
182
+ config.logger = @job_service_stub.logger if config.respond_to? :logger=
171
183
  end
172
184
 
173
185
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
@@ -176,6 +188,7 @@ module Google
176
188
  config.endpoint = @job_service_stub.endpoint
177
189
  config.universe_domain = @job_service_stub.universe_domain
178
190
  config.bindings_override = @config.bindings_override
191
+ config.logger = @job_service_stub.logger if config.respond_to? :logger=
179
192
  end
180
193
  end
181
194
 
@@ -200,6 +213,15 @@ module Google
200
213
  #
201
214
  attr_reader :iam_policy_client
202
215
 
216
+ ##
217
+ # The logger used for request/response debug logging.
218
+ #
219
+ # @return [Logger]
220
+ #
221
+ def logger
222
+ @job_service_stub.logger
223
+ end
224
+
203
225
  # Service calls
204
226
 
205
227
  ##
@@ -279,7 +301,6 @@ module Google
279
301
 
280
302
  @job_service_stub.create_custom_job request, options do |result, operation|
281
303
  yield result, operation if block_given?
282
- return result
283
304
  end
284
305
  rescue ::Gapic::Rest::Error => e
285
306
  raise ::Google::Cloud::Error.from_error(e)
@@ -360,7 +381,6 @@ module Google
360
381
 
361
382
  @job_service_stub.get_custom_job request, options do |result, operation|
362
383
  yield result, operation if block_given?
363
- return result
364
384
  end
365
385
  rescue ::Gapic::Rest::Error => e
366
386
  raise ::Google::Cloud::Error.from_error(e)
@@ -477,7 +497,7 @@ module Google
477
497
  @job_service_stub.list_custom_jobs request, options do |result, operation|
478
498
  result = ::Gapic::Rest::PagedEnumerable.new @job_service_stub, :list_custom_jobs, "custom_jobs", request, result, options
479
499
  yield result, operation if block_given?
480
- return result
500
+ throw :response, result
481
501
  end
482
502
  rescue ::Gapic::Rest::Error => e
483
503
  raise ::Google::Cloud::Error.from_error(e)
@@ -566,7 +586,7 @@ module Google
566
586
  @job_service_stub.delete_custom_job request, options do |result, operation|
567
587
  result = ::Gapic::Operation.new result, @operations_client, options: options
568
588
  yield result, operation if block_given?
569
- return result
589
+ throw :response, result
570
590
  end
571
591
  rescue ::Gapic::Rest::Error => e
572
592
  raise ::Google::Cloud::Error.from_error(e)
@@ -659,7 +679,6 @@ module Google
659
679
 
660
680
  @job_service_stub.cancel_custom_job request, options do |result, operation|
661
681
  yield result, operation if block_given?
662
- return result
663
682
  end
664
683
  rescue ::Gapic::Rest::Error => e
665
684
  raise ::Google::Cloud::Error.from_error(e)
@@ -741,7 +760,6 @@ module Google
741
760
 
742
761
  @job_service_stub.create_data_labeling_job request, options do |result, operation|
743
762
  yield result, operation if block_given?
744
- return result
745
763
  end
746
764
  rescue ::Gapic::Rest::Error => e
747
765
  raise ::Google::Cloud::Error.from_error(e)
@@ -822,7 +840,6 @@ module Google
822
840
 
823
841
  @job_service_stub.get_data_labeling_job request, options do |result, operation|
824
842
  yield result, operation if block_given?
825
- return result
826
843
  end
827
844
  rescue ::Gapic::Rest::Error => e
828
845
  raise ::Google::Cloud::Error.from_error(e)
@@ -941,7 +958,7 @@ module Google
941
958
  @job_service_stub.list_data_labeling_jobs request, options do |result, operation|
942
959
  result = ::Gapic::Rest::PagedEnumerable.new @job_service_stub, :list_data_labeling_jobs, "data_labeling_jobs", request, result, options
943
960
  yield result, operation if block_given?
944
- return result
961
+ throw :response, result
945
962
  end
946
963
  rescue ::Gapic::Rest::Error => e
947
964
  raise ::Google::Cloud::Error.from_error(e)
@@ -1030,7 +1047,7 @@ module Google
1030
1047
  @job_service_stub.delete_data_labeling_job request, options do |result, operation|
1031
1048
  result = ::Gapic::Operation.new result, @operations_client, options: options
1032
1049
  yield result, operation if block_given?
1033
- return result
1050
+ throw :response, result
1034
1051
  end
1035
1052
  rescue ::Gapic::Rest::Error => e
1036
1053
  raise ::Google::Cloud::Error.from_error(e)
@@ -1111,7 +1128,6 @@ module Google
1111
1128
 
1112
1129
  @job_service_stub.cancel_data_labeling_job request, options do |result, operation|
1113
1130
  yield result, operation if block_given?
1114
- return result
1115
1131
  end
1116
1132
  rescue ::Gapic::Rest::Error => e
1117
1133
  raise ::Google::Cloud::Error.from_error(e)
@@ -1194,7 +1210,6 @@ module Google
1194
1210
 
1195
1211
  @job_service_stub.create_hyperparameter_tuning_job request, options do |result, operation|
1196
1212
  yield result, operation if block_given?
1197
- return result
1198
1213
  end
1199
1214
  rescue ::Gapic::Rest::Error => e
1200
1215
  raise ::Google::Cloud::Error.from_error(e)
@@ -1275,7 +1290,6 @@ module Google
1275
1290
 
1276
1291
  @job_service_stub.get_hyperparameter_tuning_job request, options do |result, operation|
1277
1292
  yield result, operation if block_given?
1278
- return result
1279
1293
  end
1280
1294
  rescue ::Gapic::Rest::Error => e
1281
1295
  raise ::Google::Cloud::Error.from_error(e)
@@ -1393,7 +1407,7 @@ module Google
1393
1407
  @job_service_stub.list_hyperparameter_tuning_jobs request, options do |result, operation|
1394
1408
  result = ::Gapic::Rest::PagedEnumerable.new @job_service_stub, :list_hyperparameter_tuning_jobs, "hyperparameter_tuning_jobs", request, result, options
1395
1409
  yield result, operation if block_given?
1396
- return result
1410
+ throw :response, result
1397
1411
  end
1398
1412
  rescue ::Gapic::Rest::Error => e
1399
1413
  raise ::Google::Cloud::Error.from_error(e)
@@ -1482,7 +1496,7 @@ module Google
1482
1496
  @job_service_stub.delete_hyperparameter_tuning_job request, options do |result, operation|
1483
1497
  result = ::Gapic::Operation.new result, @operations_client, options: options
1484
1498
  yield result, operation if block_given?
1485
- return result
1499
+ throw :response, result
1486
1500
  end
1487
1501
  rescue ::Gapic::Rest::Error => e
1488
1502
  raise ::Google::Cloud::Error.from_error(e)
@@ -1576,7 +1590,6 @@ module Google
1576
1590
 
1577
1591
  @job_service_stub.cancel_hyperparameter_tuning_job request, options do |result, operation|
1578
1592
  yield result, operation if block_given?
1579
- return result
1580
1593
  end
1581
1594
  rescue ::Gapic::Rest::Error => e
1582
1595
  raise ::Google::Cloud::Error.from_error(e)
@@ -1658,7 +1671,6 @@ module Google
1658
1671
 
1659
1672
  @job_service_stub.create_nas_job request, options do |result, operation|
1660
1673
  yield result, operation if block_given?
1661
- return result
1662
1674
  end
1663
1675
  rescue ::Gapic::Rest::Error => e
1664
1676
  raise ::Google::Cloud::Error.from_error(e)
@@ -1739,7 +1751,6 @@ module Google
1739
1751
 
1740
1752
  @job_service_stub.get_nas_job request, options do |result, operation|
1741
1753
  yield result, operation if block_given?
1742
- return result
1743
1754
  end
1744
1755
  rescue ::Gapic::Rest::Error => e
1745
1756
  raise ::Google::Cloud::Error.from_error(e)
@@ -1856,7 +1867,7 @@ module Google
1856
1867
  @job_service_stub.list_nas_jobs request, options do |result, operation|
1857
1868
  result = ::Gapic::Rest::PagedEnumerable.new @job_service_stub, :list_nas_jobs, "nas_jobs", request, result, options
1858
1869
  yield result, operation if block_given?
1859
- return result
1870
+ throw :response, result
1860
1871
  end
1861
1872
  rescue ::Gapic::Rest::Error => e
1862
1873
  raise ::Google::Cloud::Error.from_error(e)
@@ -1945,7 +1956,7 @@ module Google
1945
1956
  @job_service_stub.delete_nas_job request, options do |result, operation|
1946
1957
  result = ::Gapic::Operation.new result, @operations_client, options: options
1947
1958
  yield result, operation if block_given?
1948
- return result
1959
+ throw :response, result
1949
1960
  end
1950
1961
  rescue ::Gapic::Rest::Error => e
1951
1962
  raise ::Google::Cloud::Error.from_error(e)
@@ -2038,7 +2049,6 @@ module Google
2038
2049
 
2039
2050
  @job_service_stub.cancel_nas_job request, options do |result, operation|
2040
2051
  yield result, operation if block_given?
2041
- return result
2042
2052
  end
2043
2053
  rescue ::Gapic::Rest::Error => e
2044
2054
  raise ::Google::Cloud::Error.from_error(e)
@@ -2119,7 +2129,6 @@ module Google
2119
2129
 
2120
2130
  @job_service_stub.get_nas_trial_detail request, options do |result, operation|
2121
2131
  yield result, operation if block_given?
2122
- return result
2123
2132
  end
2124
2133
  rescue ::Gapic::Rest::Error => e
2125
2134
  raise ::Google::Cloud::Error.from_error(e)
@@ -2214,7 +2223,7 @@ module Google
2214
2223
  @job_service_stub.list_nas_trial_details request, options do |result, operation|
2215
2224
  result = ::Gapic::Rest::PagedEnumerable.new @job_service_stub, :list_nas_trial_details, "nas_trial_details", request, result, options
2216
2225
  yield result, operation if block_given?
2217
- return result
2226
+ throw :response, result
2218
2227
  end
2219
2228
  rescue ::Gapic::Rest::Error => e
2220
2229
  raise ::Google::Cloud::Error.from_error(e)
@@ -2297,7 +2306,6 @@ module Google
2297
2306
 
2298
2307
  @job_service_stub.create_batch_prediction_job request, options do |result, operation|
2299
2308
  yield result, operation if block_given?
2300
- return result
2301
2309
  end
2302
2310
  rescue ::Gapic::Rest::Error => e
2303
2311
  raise ::Google::Cloud::Error.from_error(e)
@@ -2378,7 +2386,6 @@ module Google
2378
2386
 
2379
2387
  @job_service_stub.get_batch_prediction_job request, options do |result, operation|
2380
2388
  yield result, operation if block_given?
2381
- return result
2382
2389
  end
2383
2390
  rescue ::Gapic::Rest::Error => e
2384
2391
  raise ::Google::Cloud::Error.from_error(e)
@@ -2496,7 +2503,7 @@ module Google
2496
2503
  @job_service_stub.list_batch_prediction_jobs request, options do |result, operation|
2497
2504
  result = ::Gapic::Rest::PagedEnumerable.new @job_service_stub, :list_batch_prediction_jobs, "batch_prediction_jobs", request, result, options
2498
2505
  yield result, operation if block_given?
2499
- return result
2506
+ throw :response, result
2500
2507
  end
2501
2508
  rescue ::Gapic::Rest::Error => e
2502
2509
  raise ::Google::Cloud::Error.from_error(e)
@@ -2586,7 +2593,7 @@ module Google
2586
2593
  @job_service_stub.delete_batch_prediction_job request, options do |result, operation|
2587
2594
  result = ::Gapic::Operation.new result, @operations_client, options: options
2588
2595
  yield result, operation if block_given?
2589
- return result
2596
+ throw :response, result
2590
2597
  end
2591
2598
  rescue ::Gapic::Rest::Error => e
2592
2599
  raise ::Google::Cloud::Error.from_error(e)
@@ -2678,7 +2685,6 @@ module Google
2678
2685
 
2679
2686
  @job_service_stub.cancel_batch_prediction_job request, options do |result, operation|
2680
2687
  yield result, operation if block_given?
2681
- return result
2682
2688
  end
2683
2689
  rescue ::Gapic::Rest::Error => e
2684
2690
  raise ::Google::Cloud::Error.from_error(e)
@@ -2761,7 +2767,6 @@ module Google
2761
2767
 
2762
2768
  @job_service_stub.create_model_deployment_monitoring_job request, options do |result, operation|
2763
2769
  yield result, operation if block_given?
2764
- return result
2765
2770
  end
2766
2771
  rescue ::Gapic::Rest::Error => e
2767
2772
  raise ::Google::Cloud::Error.from_error(e)
@@ -2869,7 +2874,7 @@ module Google
2869
2874
  @job_service_stub.search_model_deployment_monitoring_stats_anomalies request, options do |result, operation|
2870
2875
  result = ::Gapic::Rest::PagedEnumerable.new @job_service_stub, :search_model_deployment_monitoring_stats_anomalies, "monitoring_stats", request, result, options
2871
2876
  yield result, operation if block_given?
2872
- return result
2877
+ throw :response, result
2873
2878
  end
2874
2879
  rescue ::Gapic::Rest::Error => e
2875
2880
  raise ::Google::Cloud::Error.from_error(e)
@@ -2950,7 +2955,6 @@ module Google
2950
2955
 
2951
2956
  @job_service_stub.get_model_deployment_monitoring_job request, options do |result, operation|
2952
2957
  yield result, operation if block_given?
2953
- return result
2954
2958
  end
2955
2959
  rescue ::Gapic::Rest::Error => e
2956
2960
  raise ::Google::Cloud::Error.from_error(e)
@@ -3062,7 +3066,7 @@ module Google
3062
3066
  @job_service_stub.list_model_deployment_monitoring_jobs request, options do |result, operation|
3063
3067
  result = ::Gapic::Rest::PagedEnumerable.new @job_service_stub, :list_model_deployment_monitoring_jobs, "model_deployment_monitoring_jobs", request, result, options
3064
3068
  yield result, operation if block_given?
3065
- return result
3069
+ throw :response, result
3066
3070
  end
3067
3071
  rescue ::Gapic::Rest::Error => e
3068
3072
  raise ::Google::Cloud::Error.from_error(e)
@@ -3177,7 +3181,7 @@ module Google
3177
3181
  @job_service_stub.update_model_deployment_monitoring_job request, options do |result, operation|
3178
3182
  result = ::Gapic::Operation.new result, @operations_client, options: options
3179
3183
  yield result, operation if block_given?
3180
- return result
3184
+ throw :response, result
3181
3185
  end
3182
3186
  rescue ::Gapic::Rest::Error => e
3183
3187
  raise ::Google::Cloud::Error.from_error(e)
@@ -3266,7 +3270,7 @@ module Google
3266
3270
  @job_service_stub.delete_model_deployment_monitoring_job request, options do |result, operation|
3267
3271
  result = ::Gapic::Operation.new result, @operations_client, options: options
3268
3272
  yield result, operation if block_given?
3269
- return result
3273
+ throw :response, result
3270
3274
  end
3271
3275
  rescue ::Gapic::Rest::Error => e
3272
3276
  raise ::Google::Cloud::Error.from_error(e)
@@ -3350,7 +3354,6 @@ module Google
3350
3354
 
3351
3355
  @job_service_stub.pause_model_deployment_monitoring_job request, options do |result, operation|
3352
3356
  yield result, operation if block_given?
3353
- return result
3354
3357
  end
3355
3358
  rescue ::Gapic::Rest::Error => e
3356
3359
  raise ::Google::Cloud::Error.from_error(e)
@@ -3433,7 +3436,6 @@ module Google
3433
3436
 
3434
3437
  @job_service_stub.resume_model_deployment_monitoring_job request, options do |result, operation|
3435
3438
  yield result, operation if block_given?
3436
- return result
3437
3439
  end
3438
3440
  rescue ::Gapic::Rest::Error => e
3439
3441
  raise ::Google::Cloud::Error.from_error(e)
@@ -3513,6 +3515,11 @@ module Google
3513
3515
  # default endpoint URL. The default value of nil uses the environment
3514
3516
  # universe (usually the default "googleapis.com" universe).
3515
3517
  # @return [::String,nil]
3518
+ # @!attribute [rw] logger
3519
+ # A custom logger to use for request/response debug logging, or the value
3520
+ # `:default` (the default) to construct a default logger, or `nil` to
3521
+ # explicitly disable logging.
3522
+ # @return [::Logger,:default,nil]
3516
3523
  #
3517
3524
  class Configuration
3518
3525
  extend ::Gapic::Config
@@ -3541,6 +3548,7 @@ module Google
3541
3548
  # by the host service.
3542
3549
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
3543
3550
  config_attr :bindings_override, {}, ::Hash, nil
3551
+ config_attr :logger, :default, ::Logger, nil, :default
3544
3552
 
3545
3553
  # @private
3546
3554
  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
  ##