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
+ @metadata_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 = @metadata_service_stub.endpoint
169
180
  config.universe_domain = @metadata_service_stub.universe_domain
170
181
  config.bindings_override = @config.bindings_override
182
+ config.logger = @metadata_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 = @metadata_service_stub.endpoint
177
189
  config.universe_domain = @metadata_service_stub.universe_domain
178
190
  config.bindings_override = @config.bindings_override
191
+ config.logger = @metadata_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
+ @metadata_service_stub.logger
223
+ end
224
+
203
225
  # Service calls
204
226
 
205
227
  ##
@@ -296,7 +318,7 @@ module Google
296
318
  @metadata_service_stub.create_metadata_store 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)
@@ -377,7 +399,6 @@ module Google
377
399
 
378
400
  @metadata_service_stub.get_metadata_store request, options do |result, operation|
379
401
  yield result, operation if block_given?
380
- return result
381
402
  end
382
403
  rescue ::Gapic::Rest::Error => e
383
404
  raise ::Google::Cloud::Error.from_error(e)
@@ -475,7 +496,7 @@ module Google
475
496
  @metadata_service_stub.list_metadata_stores request, options do |result, operation|
476
497
  result = ::Gapic::Rest::PagedEnumerable.new @metadata_service_stub, :list_metadata_stores, "metadata_stores", request, result, options
477
498
  yield result, operation if block_given?
478
- return result
499
+ throw :response, result
479
500
  end
480
501
  rescue ::Gapic::Rest::Error => e
481
502
  raise ::Google::Cloud::Error.from_error(e)
@@ -567,7 +588,7 @@ module Google
567
588
  @metadata_service_stub.delete_metadata_store request, options do |result, operation|
568
589
  result = ::Gapic::Operation.new result, @operations_client, options: options
569
590
  yield result, operation if block_given?
570
- return result
591
+ throw :response, result
571
592
  end
572
593
  rescue ::Gapic::Rest::Error => e
573
594
  raise ::Google::Cloud::Error.from_error(e)
@@ -659,7 +680,6 @@ module Google
659
680
 
660
681
  @metadata_service_stub.create_artifact request, options do |result, operation|
661
682
  yield result, operation if block_given?
662
- return result
663
683
  end
664
684
  rescue ::Gapic::Rest::Error => e
665
685
  raise ::Google::Cloud::Error.from_error(e)
@@ -740,7 +760,6 @@ module Google
740
760
 
741
761
  @metadata_service_stub.get_artifact request, options do |result, operation|
742
762
  yield result, operation if block_given?
743
- return result
744
763
  end
745
764
  rescue ::Gapic::Rest::Error => e
746
765
  raise ::Google::Cloud::Error.from_error(e)
@@ -876,7 +895,7 @@ module Google
876
895
  @metadata_service_stub.list_artifacts request, options do |result, operation|
877
896
  result = ::Gapic::Rest::PagedEnumerable.new @metadata_service_stub, :list_artifacts, "artifacts", request, result, options
878
897
  yield result, operation if block_given?
879
- return result
898
+ throw :response, result
880
899
  end
881
900
  rescue ::Gapic::Rest::Error => e
882
901
  raise ::Google::Cloud::Error.from_error(e)
@@ -964,7 +983,6 @@ module Google
964
983
 
965
984
  @metadata_service_stub.update_artifact request, options do |result, operation|
966
985
  yield result, operation if block_given?
967
- return result
968
986
  end
969
987
  rescue ::Gapic::Rest::Error => e
970
988
  raise ::Google::Cloud::Error.from_error(e)
@@ -1057,7 +1075,7 @@ module Google
1057
1075
  @metadata_service_stub.delete_artifact request, options do |result, operation|
1058
1076
  result = ::Gapic::Operation.new result, @operations_client, options: options
1059
1077
  yield result, operation if block_given?
1060
- return result
1078
+ throw :response, result
1061
1079
  end
1062
1080
  rescue ::Gapic::Rest::Error => e
1063
1081
  raise ::Google::Cloud::Error.from_error(e)
@@ -1153,7 +1171,7 @@ module Google
1153
1171
  @metadata_service_stub.purge_artifacts request, options do |result, operation|
1154
1172
  result = ::Gapic::Operation.new result, @operations_client, options: options
1155
1173
  yield result, operation if block_given?
1156
- return result
1174
+ throw :response, result
1157
1175
  end
1158
1176
  rescue ::Gapic::Rest::Error => e
1159
1177
  raise ::Google::Cloud::Error.from_error(e)
@@ -1244,7 +1262,6 @@ module Google
1244
1262
 
1245
1263
  @metadata_service_stub.create_context request, options do |result, operation|
1246
1264
  yield result, operation if block_given?
1247
- return result
1248
1265
  end
1249
1266
  rescue ::Gapic::Rest::Error => e
1250
1267
  raise ::Google::Cloud::Error.from_error(e)
@@ -1325,7 +1342,6 @@ module Google
1325
1342
 
1326
1343
  @metadata_service_stub.get_context request, options do |result, operation|
1327
1344
  yield result, operation if block_given?
1328
- return result
1329
1345
  end
1330
1346
  rescue ::Gapic::Rest::Error => e
1331
1347
  raise ::Google::Cloud::Error.from_error(e)
@@ -1465,7 +1481,7 @@ module Google
1465
1481
  @metadata_service_stub.list_contexts request, options do |result, operation|
1466
1482
  result = ::Gapic::Rest::PagedEnumerable.new @metadata_service_stub, :list_contexts, "contexts", request, result, options
1467
1483
  yield result, operation if block_given?
1468
- return result
1484
+ throw :response, result
1469
1485
  end
1470
1486
  rescue ::Gapic::Rest::Error => e
1471
1487
  raise ::Google::Cloud::Error.from_error(e)
@@ -1552,7 +1568,6 @@ module Google
1552
1568
 
1553
1569
  @metadata_service_stub.update_context request, options do |result, operation|
1554
1570
  yield result, operation if block_given?
1555
- return result
1556
1571
  end
1557
1572
  rescue ::Gapic::Rest::Error => e
1558
1573
  raise ::Google::Cloud::Error.from_error(e)
@@ -1648,7 +1663,7 @@ module Google
1648
1663
  @metadata_service_stub.delete_context request, options do |result, operation|
1649
1664
  result = ::Gapic::Operation.new result, @operations_client, options: options
1650
1665
  yield result, operation if block_given?
1651
- return result
1666
+ throw :response, result
1652
1667
  end
1653
1668
  rescue ::Gapic::Rest::Error => e
1654
1669
  raise ::Google::Cloud::Error.from_error(e)
@@ -1744,7 +1759,7 @@ module Google
1744
1759
  @metadata_service_stub.purge_contexts request, options do |result, operation|
1745
1760
  result = ::Gapic::Operation.new result, @operations_client, options: options
1746
1761
  yield result, operation if block_given?
1747
- return result
1762
+ throw :response, result
1748
1763
  end
1749
1764
  rescue ::Gapic::Rest::Error => e
1750
1765
  raise ::Google::Cloud::Error.from_error(e)
@@ -1838,7 +1853,6 @@ module Google
1838
1853
 
1839
1854
  @metadata_service_stub.add_context_artifacts_and_executions request, options do |result, operation|
1840
1855
  yield result, operation if block_given?
1841
- return result
1842
1856
  end
1843
1857
  rescue ::Gapic::Rest::Error => e
1844
1858
  raise ::Google::Cloud::Error.from_error(e)
@@ -1926,7 +1940,6 @@ module Google
1926
1940
 
1927
1941
  @metadata_service_stub.add_context_children request, options do |result, operation|
1928
1942
  yield result, operation if block_given?
1929
- return result
1930
1943
  end
1931
1944
  rescue ::Gapic::Rest::Error => e
1932
1945
  raise ::Google::Cloud::Error.from_error(e)
@@ -2012,7 +2025,6 @@ module Google
2012
2025
 
2013
2026
  @metadata_service_stub.remove_context_children request, options do |result, operation|
2014
2027
  yield result, operation if block_given?
2015
- return result
2016
2028
  end
2017
2029
  rescue ::Gapic::Rest::Error => e
2018
2030
  raise ::Google::Cloud::Error.from_error(e)
@@ -2099,7 +2111,6 @@ module Google
2099
2111
 
2100
2112
  @metadata_service_stub.query_context_lineage_subgraph request, options do |result, operation|
2101
2113
  yield result, operation if block_given?
2102
- return result
2103
2114
  end
2104
2115
  rescue ::Gapic::Rest::Error => e
2105
2116
  raise ::Google::Cloud::Error.from_error(e)
@@ -2192,7 +2203,6 @@ module Google
2192
2203
 
2193
2204
  @metadata_service_stub.create_execution request, options do |result, operation|
2194
2205
  yield result, operation if block_given?
2195
- return result
2196
2206
  end
2197
2207
  rescue ::Gapic::Rest::Error => e
2198
2208
  raise ::Google::Cloud::Error.from_error(e)
@@ -2273,7 +2283,6 @@ module Google
2273
2283
 
2274
2284
  @metadata_service_stub.get_execution request, options do |result, operation|
2275
2285
  yield result, operation if block_given?
2276
- return result
2277
2286
  end
2278
2287
  rescue ::Gapic::Rest::Error => e
2279
2288
  raise ::Google::Cloud::Error.from_error(e)
@@ -2409,7 +2418,7 @@ module Google
2409
2418
  @metadata_service_stub.list_executions request, options do |result, operation|
2410
2419
  result = ::Gapic::Rest::PagedEnumerable.new @metadata_service_stub, :list_executions, "executions", request, result, options
2411
2420
  yield result, operation if block_given?
2412
- return result
2421
+ throw :response, result
2413
2422
  end
2414
2423
  rescue ::Gapic::Rest::Error => e
2415
2424
  raise ::Google::Cloud::Error.from_error(e)
@@ -2497,7 +2506,6 @@ module Google
2497
2506
 
2498
2507
  @metadata_service_stub.update_execution request, options do |result, operation|
2499
2508
  yield result, operation if block_given?
2500
- return result
2501
2509
  end
2502
2510
  rescue ::Gapic::Rest::Error => e
2503
2511
  raise ::Google::Cloud::Error.from_error(e)
@@ -2590,7 +2598,7 @@ module Google
2590
2598
  @metadata_service_stub.delete_execution request, options do |result, operation|
2591
2599
  result = ::Gapic::Operation.new result, @operations_client, options: options
2592
2600
  yield result, operation if block_given?
2593
- return result
2601
+ throw :response, result
2594
2602
  end
2595
2603
  rescue ::Gapic::Rest::Error => e
2596
2604
  raise ::Google::Cloud::Error.from_error(e)
@@ -2686,7 +2694,7 @@ module Google
2686
2694
  @metadata_service_stub.purge_executions request, options do |result, operation|
2687
2695
  result = ::Gapic::Operation.new result, @operations_client, options: options
2688
2696
  yield result, operation if block_given?
2689
- return result
2697
+ throw :response, result
2690
2698
  end
2691
2699
  rescue ::Gapic::Rest::Error => e
2692
2700
  raise ::Google::Cloud::Error.from_error(e)
@@ -2773,7 +2781,6 @@ module Google
2773
2781
 
2774
2782
  @metadata_service_stub.add_execution_events request, options do |result, operation|
2775
2783
  yield result, operation if block_given?
2776
- return result
2777
2784
  end
2778
2785
  rescue ::Gapic::Rest::Error => e
2779
2786
  raise ::Google::Cloud::Error.from_error(e)
@@ -2856,7 +2863,6 @@ module Google
2856
2863
 
2857
2864
  @metadata_service_stub.query_execution_inputs_and_outputs request, options do |result, operation|
2858
2865
  yield result, operation if block_given?
2859
- return result
2860
2866
  end
2861
2867
  rescue ::Gapic::Rest::Error => e
2862
2868
  raise ::Google::Cloud::Error.from_error(e)
@@ -2948,7 +2954,6 @@ module Google
2948
2954
 
2949
2955
  @metadata_service_stub.create_metadata_schema request, options do |result, operation|
2950
2956
  yield result, operation if block_given?
2951
- return result
2952
2957
  end
2953
2958
  rescue ::Gapic::Rest::Error => e
2954
2959
  raise ::Google::Cloud::Error.from_error(e)
@@ -3029,7 +3034,6 @@ module Google
3029
3034
 
3030
3035
  @metadata_service_stub.get_metadata_schema request, options do |result, operation|
3031
3036
  yield result, operation if block_given?
3032
- return result
3033
3037
  end
3034
3038
  rescue ::Gapic::Rest::Error => e
3035
3039
  raise ::Google::Cloud::Error.from_error(e)
@@ -3129,7 +3133,7 @@ module Google
3129
3133
  @metadata_service_stub.list_metadata_schemas request, options do |result, operation|
3130
3134
  result = ::Gapic::Rest::PagedEnumerable.new @metadata_service_stub, :list_metadata_schemas, "metadata_schemas", request, result, options
3131
3135
  yield result, operation if block_given?
3132
- return result
3136
+ throw :response, result
3133
3137
  end
3134
3138
  rescue ::Gapic::Rest::Error => e
3135
3139
  raise ::Google::Cloud::Error.from_error(e)
@@ -3247,7 +3251,6 @@ module Google
3247
3251
 
3248
3252
  @metadata_service_stub.query_artifact_lineage_subgraph request, options do |result, operation|
3249
3253
  yield result, operation if block_given?
3250
- return result
3251
3254
  end
3252
3255
  rescue ::Gapic::Rest::Error => e
3253
3256
  raise ::Google::Cloud::Error.from_error(e)
@@ -3327,6 +3330,11 @@ module Google
3327
3330
  # default endpoint URL. The default value of nil uses the environment
3328
3331
  # universe (usually the default "googleapis.com" universe).
3329
3332
  # @return [::String,nil]
3333
+ # @!attribute [rw] logger
3334
+ # A custom logger to use for request/response debug logging, or the value
3335
+ # `:default` (the default) to construct a default logger, or `nil` to
3336
+ # explicitly disable logging.
3337
+ # @return [::Logger,:default,nil]
3330
3338
  #
3331
3339
  class Configuration
3332
3340
  extend ::Gapic::Config
@@ -3355,6 +3363,7 @@ module Google
3355
3363
  # by the host service.
3356
3364
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
3357
3365
  config_attr :bindings_override, {}, ::Hash, nil
3366
+ config_attr :logger, :default, ::Logger, nil, :default
3358
3367
 
3359
3368
  # @private
3360
3369
  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
  ##