google-cloud-ai_platform-v1 0.60.0 → 0.62.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (181) 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 +84 -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 +84 -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 +84 -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 +84 -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 +84 -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 +84 -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_cache_service/client.rb +872 -0
  43. data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service/credentials.rb +47 -0
  44. data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service/paths.rb +88 -0
  45. data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service/rest/client.rb +820 -0
  46. data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service/rest/service_stub.rb +388 -0
  47. data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service/rest.rb +53 -0
  48. data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service.rb +55 -0
  49. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/client.rb +31 -6
  50. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/operations.rb +9 -5
  51. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/client.rb +31 -6
  52. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/operations.rb +84 -35
  53. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/service_stub.rb +54 -32
  54. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/client.rb +35 -9
  55. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/operations.rb +9 -5
  56. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/client.rb +35 -9
  57. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/operations.rb +84 -35
  58. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/service_stub.rb +78 -50
  59. data/lib/google/cloud/ai_platform/v1/index_service/client.rb +33 -8
  60. data/lib/google/cloud/ai_platform/v1/index_service/operations.rb +9 -5
  61. data/lib/google/cloud/ai_platform/v1/index_service/rest/client.rb +33 -8
  62. data/lib/google/cloud/ai_platform/v1/index_service/rest/operations.rb +84 -35
  63. data/lib/google/cloud/ai_platform/v1/index_service/rest/service_stub.rb +70 -44
  64. data/lib/google/cloud/ai_platform/v1/job_service/client.rb +44 -36
  65. data/lib/google/cloud/ai_platform/v1/job_service/operations.rb +9 -5
  66. data/lib/google/cloud/ai_platform/v1/job_service/rest/client.rb +44 -36
  67. data/lib/google/cloud/ai_platform/v1/job_service/rest/operations.rb +84 -35
  68. data/lib/google/cloud/ai_platform/v1/job_service/rest/service_stub.rb +294 -212
  69. data/lib/google/cloud/ai_platform/v1/llm_utility_service/client.rb +29 -3
  70. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/client.rb +29 -3
  71. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/service_stub.rb +30 -14
  72. data/lib/google/cloud/ai_platform/v1/match_service/client.rb +29 -3
  73. data/lib/google/cloud/ai_platform/v1/match_service/rest/client.rb +29 -3
  74. data/lib/google/cloud/ai_platform/v1/match_service/rest/service_stub.rb +30 -14
  75. data/lib/google/cloud/ai_platform/v1/metadata_service/client.rb +42 -33
  76. data/lib/google/cloud/ai_platform/v1/metadata_service/operations.rb +9 -5
  77. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/client.rb +42 -33
  78. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/operations.rb +84 -35
  79. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/service_stub.rb +270 -194
  80. data/lib/google/cloud/ai_platform/v1/migration_service/client.rb +31 -3
  81. data/lib/google/cloud/ai_platform/v1/migration_service/operations.rb +9 -5
  82. data/lib/google/cloud/ai_platform/v1/migration_service/rest/client.rb +31 -3
  83. data/lib/google/cloud/ai_platform/v1/migration_service/rest/operations.rb +84 -35
  84. data/lib/google/cloud/ai_platform/v1/migration_service/rest/service_stub.rb +30 -14
  85. data/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb +29 -2
  86. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/client.rb +29 -2
  87. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/service_stub.rb +22 -8
  88. data/lib/google/cloud/ai_platform/v1/model_service/client.rb +39 -19
  89. data/lib/google/cloud/ai_platform/v1/model_service/operations.rb +9 -5
  90. data/lib/google/cloud/ai_platform/v1/model_service/rest/client.rb +39 -19
  91. data/lib/google/cloud/ai_platform/v1/model_service/rest/operations.rb +84 -35
  92. data/lib/google/cloud/ai_platform/v1/model_service/rest/service_stub.rb +158 -110
  93. data/lib/google/cloud/ai_platform/v1/notebook_service/client.rb +41 -17
  94. data/lib/google/cloud/ai_platform/v1/notebook_service/operations.rb +9 -5
  95. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb +41 -17
  96. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/operations.rb +84 -35
  97. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/service_stub.rb +142 -98
  98. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/client.rb +34 -7
  99. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/operations.rb +9 -5
  100. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/client.rb +34 -7
  101. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/operations.rb +84 -35
  102. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/service_stub.rb +62 -38
  103. data/lib/google/cloud/ai_platform/v1/pipeline_service/client.rb +35 -13
  104. data/lib/google/cloud/ai_platform/v1/pipeline_service/operations.rb +9 -5
  105. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/client.rb +35 -13
  106. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/operations.rb +84 -35
  107. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/service_stub.rb +110 -74
  108. data/lib/google/cloud/ai_platform/v1/prediction_service/client.rb +43 -16
  109. data/lib/google/cloud/ai_platform/v1/prediction_service/paths.rb +19 -0
  110. data/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb +43 -9
  111. data/lib/google/cloud/ai_platform/v1/prediction_service/rest/service_stub.rb +65 -38
  112. data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/client.rb +593 -0
  113. data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/credentials.rb +47 -0
  114. data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/paths.rb +52 -0
  115. data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/rest/client.rb +564 -0
  116. data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/rest/service_stub.rb +199 -0
  117. data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/rest.rb +53 -0
  118. data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service.rb +55 -0
  119. data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/client.rb +914 -0
  120. data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/credentials.rb +47 -0
  121. data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/operations.rb +814 -0
  122. data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/paths.rb +69 -0
  123. data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/rest/client.rb +862 -0
  124. data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/rest/operations.rb +4293 -0
  125. data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/rest/service_stub.rb +388 -0
  126. data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/rest.rb +54 -0
  127. data/lib/google/cloud/ai_platform/v1/reasoning_engine_service.rb +56 -0
  128. data/lib/google/cloud/ai_platform/v1/rest.rb +3 -0
  129. data/lib/google/cloud/ai_platform/v1/schedule_service/client.rb +31 -8
  130. data/lib/google/cloud/ai_platform/v1/schedule_service/operations.rb +9 -5
  131. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/client.rb +31 -8
  132. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/operations.rb +84 -35
  133. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/service_stub.rb +70 -44
  134. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/client.rb +33 -6
  135. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/operations.rb +9 -5
  136. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/client.rb +33 -6
  137. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/operations.rb +84 -35
  138. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/service_stub.rb +54 -32
  139. data/lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb +40 -31
  140. data/lib/google/cloud/ai_platform/v1/tensorboard_service/operations.rb +9 -5
  141. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/client.rb +40 -30
  142. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/operations.rb +84 -35
  143. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/service_stub.rb +247 -176
  144. data/lib/google/cloud/ai_platform/v1/version.rb +1 -1
  145. data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/client.rb +36 -11
  146. data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/operations.rb +9 -5
  147. data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/client.rb +36 -11
  148. data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/operations.rb +84 -35
  149. data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/service_stub.rb +94 -62
  150. data/lib/google/cloud/ai_platform/v1/vertex_rag_service/client.rb +29 -4
  151. data/lib/google/cloud/ai_platform/v1/vertex_rag_service/rest/client.rb +29 -4
  152. data/lib/google/cloud/ai_platform/v1/vertex_rag_service/rest/service_stub.rb +38 -20
  153. data/lib/google/cloud/ai_platform/v1/vizier_service/client.rb +33 -16
  154. data/lib/google/cloud/ai_platform/v1/vizier_service/operations.rb +9 -5
  155. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/client.rb +33 -16
  156. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/operations.rb +84 -35
  157. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/service_stub.rb +134 -92
  158. data/lib/google/cloud/ai_platform/v1.rb +3 -0
  159. data/lib/google/cloud/aiplatform/v1/accelerator_type_pb.rb +1 -1
  160. data/lib/google/cloud/aiplatform/v1/cached_content_pb.rb +54 -0
  161. data/lib/google/cloud/aiplatform/v1/gen_ai_cache_service_pb.rb +57 -0
  162. data/lib/google/cloud/aiplatform/v1/gen_ai_cache_service_services_pb.rb +54 -0
  163. data/lib/google/cloud/aiplatform/v1/notebook_runtime_pb.rb +1 -1
  164. data/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb +1 -1
  165. data/lib/google/cloud/aiplatform/v1/reasoning_engine_execution_service_pb.rb +52 -0
  166. data/lib/google/cloud/aiplatform/v1/reasoning_engine_execution_service_services_pb.rb +47 -0
  167. data/lib/google/cloud/aiplatform/v1/reasoning_engine_pb.rb +51 -0
  168. data/lib/google/cloud/aiplatform/v1/reasoning_engine_service_pb.rb +62 -0
  169. data/lib/google/cloud/aiplatform/v1/reasoning_engine_service_services_pb.rb +53 -0
  170. data/lib/google/cloud/aiplatform/v1/tool_pb.rb +4 -1
  171. data/proto_docs/google/cloud/aiplatform/v1/accelerator_type.rb +3 -0
  172. data/proto_docs/google/cloud/aiplatform/v1/cached_content.rb +101 -0
  173. data/proto_docs/google/cloud/aiplatform/v1/gen_ai_cache_service.rb +108 -0
  174. data/proto_docs/google/cloud/aiplatform/v1/notebook_runtime.rb +42 -2
  175. data/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb +11 -0
  176. data/proto_docs/google/cloud/aiplatform/v1/reasoning_engine.rb +87 -0
  177. data/proto_docs/google/cloud/aiplatform/v1/reasoning_engine_execution_service.rb +73 -0
  178. data/proto_docs/google/cloud/aiplatform/v1/reasoning_engine_service.rb +136 -0
  179. data/proto_docs/google/cloud/aiplatform/v1/tool.rb +15 -0
  180. data/proto_docs/google/type/latlng.rb +38 -0
  181. metadata +42 -8
@@ -168,14 +168,26 @@ module Google
168
168
  universe_domain: @config.universe_domain,
169
169
  channel_args: @config.channel_args,
170
170
  interceptors: @config.interceptors,
171
- channel_pool_config: @config.channel_pool
171
+ channel_pool_config: @config.channel_pool,
172
+ logger: @config.logger
172
173
  )
173
174
 
175
+ @pipeline_service_stub.stub_logger&.info do |entry|
176
+ entry.set_system_name
177
+ entry.set_service
178
+ entry.message = "Created client for #{entry.service}"
179
+ entry.set_credentials_fields credentials
180
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
181
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
182
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
183
+ end
184
+
174
185
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
175
186
  config.credentials = credentials
176
187
  config.quota_project = @quota_project_id
177
188
  config.endpoint = @pipeline_service_stub.endpoint
178
189
  config.universe_domain = @pipeline_service_stub.universe_domain
190
+ config.logger = @pipeline_service_stub.logger if config.respond_to? :logger=
179
191
  end
180
192
 
181
193
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
@@ -183,6 +195,7 @@ module Google
183
195
  config.quota_project = @quota_project_id
184
196
  config.endpoint = @pipeline_service_stub.endpoint
185
197
  config.universe_domain = @pipeline_service_stub.universe_domain
198
+ config.logger = @pipeline_service_stub.logger if config.respond_to? :logger=
186
199
  end
187
200
  end
188
201
 
@@ -207,6 +220,15 @@ module Google
207
220
  #
208
221
  attr_reader :iam_policy_client
209
222
 
223
+ ##
224
+ # The logger used for request/response debug logging.
225
+ #
226
+ # @return [Logger]
227
+ #
228
+ def logger
229
+ @pipeline_service_stub.logger
230
+ end
231
+
210
232
  # Service calls
211
233
 
212
234
  ##
@@ -293,7 +315,6 @@ module Google
293
315
 
294
316
  @pipeline_service_stub.call_rpc :create_training_pipeline, request, options: options do |response, operation|
295
317
  yield response, operation if block_given?
296
- return response
297
318
  end
298
319
  rescue ::GRPC::BadStatus => e
299
320
  raise ::Google::Cloud::Error.from_error(e)
@@ -381,7 +402,6 @@ module Google
381
402
 
382
403
  @pipeline_service_stub.call_rpc :get_training_pipeline, request, options: options do |response, operation|
383
404
  yield response, operation if block_given?
384
- return response
385
405
  end
386
406
  rescue ::GRPC::BadStatus => e
387
407
  raise ::Google::Cloud::Error.from_error(e)
@@ -505,7 +525,7 @@ module Google
505
525
  @pipeline_service_stub.call_rpc :list_training_pipelines, request, options: options do |response, operation|
506
526
  response = ::Gapic::PagedEnumerable.new @pipeline_service_stub, :list_training_pipelines, request, response, operation, options
507
527
  yield response, operation if block_given?
508
- return response
528
+ throw :response, response
509
529
  end
510
530
  rescue ::GRPC::BadStatus => e
511
531
  raise ::Google::Cloud::Error.from_error(e)
@@ -601,7 +621,7 @@ module Google
601
621
  @pipeline_service_stub.call_rpc :delete_training_pipeline, request, options: options do |response, operation|
602
622
  response = ::Gapic::Operation.new response, @operations_client, options: options
603
623
  yield response, operation if block_given?
604
- return response
624
+ throw :response, response
605
625
  end
606
626
  rescue ::GRPC::BadStatus => e
607
627
  raise ::Google::Cloud::Error.from_error(e)
@@ -702,7 +722,6 @@ module Google
702
722
 
703
723
  @pipeline_service_stub.call_rpc :cancel_training_pipeline, request, options: options do |response, operation|
704
724
  yield response, operation if block_given?
705
- return response
706
725
  end
707
726
  rescue ::GRPC::BadStatus => e
708
727
  raise ::Google::Cloud::Error.from_error(e)
@@ -798,7 +817,6 @@ module Google
798
817
 
799
818
  @pipeline_service_stub.call_rpc :create_pipeline_job, request, options: options do |response, operation|
800
819
  yield response, operation if block_given?
801
- return response
802
820
  end
803
821
  rescue ::GRPC::BadStatus => e
804
822
  raise ::Google::Cloud::Error.from_error(e)
@@ -886,7 +904,6 @@ module Google
886
904
 
887
905
  @pipeline_service_stub.call_rpc :get_pipeline_job, request, options: options do |response, operation|
888
906
  yield response, operation if block_given?
889
- return response
890
907
  end
891
908
  rescue ::GRPC::BadStatus => e
892
909
  raise ::Google::Cloud::Error.from_error(e)
@@ -1038,7 +1055,7 @@ module Google
1038
1055
  @pipeline_service_stub.call_rpc :list_pipeline_jobs, request, options: options do |response, operation|
1039
1056
  response = ::Gapic::PagedEnumerable.new @pipeline_service_stub, :list_pipeline_jobs, request, response, operation, options
1040
1057
  yield response, operation if block_given?
1041
- return response
1058
+ throw :response, response
1042
1059
  end
1043
1060
  rescue ::GRPC::BadStatus => e
1044
1061
  raise ::Google::Cloud::Error.from_error(e)
@@ -1134,7 +1151,7 @@ module Google
1134
1151
  @pipeline_service_stub.call_rpc :delete_pipeline_job, request, options: options do |response, operation|
1135
1152
  response = ::Gapic::Operation.new response, @operations_client, options: options
1136
1153
  yield response, operation if block_given?
1137
- return response
1154
+ throw :response, response
1138
1155
  end
1139
1156
  rescue ::GRPC::BadStatus => e
1140
1157
  raise ::Google::Cloud::Error.from_error(e)
@@ -1236,7 +1253,7 @@ module Google
1236
1253
  @pipeline_service_stub.call_rpc :batch_delete_pipeline_jobs, request, options: options do |response, operation|
1237
1254
  response = ::Gapic::Operation.new response, @operations_client, options: options
1238
1255
  yield response, operation if block_given?
1239
- return response
1256
+ throw :response, response
1240
1257
  end
1241
1258
  rescue ::GRPC::BadStatus => e
1242
1259
  raise ::Google::Cloud::Error.from_error(e)
@@ -1336,7 +1353,6 @@ module Google
1336
1353
 
1337
1354
  @pipeline_service_stub.call_rpc :cancel_pipeline_job, request, options: options do |response, operation|
1338
1355
  yield response, operation if block_given?
1339
- return response
1340
1356
  end
1341
1357
  rescue ::GRPC::BadStatus => e
1342
1358
  raise ::Google::Cloud::Error.from_error(e)
@@ -1442,7 +1458,7 @@ module Google
1442
1458
  @pipeline_service_stub.call_rpc :batch_cancel_pipeline_jobs, request, options: options do |response, operation|
1443
1459
  response = ::Gapic::Operation.new response, @operations_client, options: options
1444
1460
  yield response, operation if block_given?
1445
- return response
1461
+ throw :response, response
1446
1462
  end
1447
1463
  rescue ::GRPC::BadStatus => e
1448
1464
  raise ::Google::Cloud::Error.from_error(e)
@@ -1531,6 +1547,11 @@ module Google
1531
1547
  # default endpoint URL. The default value of nil uses the environment
1532
1548
  # universe (usually the default "googleapis.com" universe).
1533
1549
  # @return [::String,nil]
1550
+ # @!attribute [rw] logger
1551
+ # A custom logger to use for request/response debug logging, or the value
1552
+ # `:default` (the default) to construct a default logger, or `nil` to
1553
+ # explicitly disable logging.
1554
+ # @return [::Logger,:default,nil]
1534
1555
  #
1535
1556
  class Configuration
1536
1557
  extend ::Gapic::Config
@@ -1555,6 +1576,7 @@ module Google
1555
1576
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1556
1577
  config_attr :quota_project, nil, ::String, nil
1557
1578
  config_attr :universe_domain, nil, ::String, nil
1579
+ config_attr :logger, :default, ::Logger, nil, :default
1558
1580
 
1559
1581
  # @private
1560
1582
  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
@@ -161,15 +161,27 @@ module Google
161
161
  endpoint: @config.endpoint,
162
162
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
163
163
  universe_domain: @config.universe_domain,
164
- credentials: credentials
164
+ credentials: credentials,
165
+ logger: @config.logger
165
166
  )
166
167
 
168
+ @pipeline_service_stub.logger(stub: true)&.info do |entry|
169
+ entry.set_system_name
170
+ entry.set_service
171
+ entry.message = "Created client for #{entry.service}"
172
+ entry.set_credentials_fields credentials
173
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
174
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
175
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
176
+ end
177
+
167
178
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
168
179
  config.credentials = credentials
169
180
  config.quota_project = @quota_project_id
170
181
  config.endpoint = @pipeline_service_stub.endpoint
171
182
  config.universe_domain = @pipeline_service_stub.universe_domain
172
183
  config.bindings_override = @config.bindings_override
184
+ config.logger = @pipeline_service_stub.logger if config.respond_to? :logger=
173
185
  end
174
186
 
175
187
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
@@ -178,6 +190,7 @@ module Google
178
190
  config.endpoint = @pipeline_service_stub.endpoint
179
191
  config.universe_domain = @pipeline_service_stub.universe_domain
180
192
  config.bindings_override = @config.bindings_override
193
+ config.logger = @pipeline_service_stub.logger if config.respond_to? :logger=
181
194
  end
182
195
  end
183
196
 
@@ -202,6 +215,15 @@ module Google
202
215
  #
203
216
  attr_reader :iam_policy_client
204
217
 
218
+ ##
219
+ # The logger used for request/response debug logging.
220
+ #
221
+ # @return [Logger]
222
+ #
223
+ def logger
224
+ @pipeline_service_stub.logger
225
+ end
226
+
205
227
  # Service calls
206
228
 
207
229
  ##
@@ -281,7 +303,6 @@ module Google
281
303
 
282
304
  @pipeline_service_stub.create_training_pipeline request, options do |result, operation|
283
305
  yield result, operation if block_given?
284
- return result
285
306
  end
286
307
  rescue ::Gapic::Rest::Error => e
287
308
  raise ::Google::Cloud::Error.from_error(e)
@@ -362,7 +383,6 @@ module Google
362
383
 
363
384
  @pipeline_service_stub.get_training_pipeline request, options do |result, operation|
364
385
  yield result, operation if block_given?
365
- return result
366
386
  end
367
387
  rescue ::Gapic::Rest::Error => e
368
388
  raise ::Google::Cloud::Error.from_error(e)
@@ -479,7 +499,7 @@ module Google
479
499
  @pipeline_service_stub.list_training_pipelines request, options do |result, operation|
480
500
  result = ::Gapic::Rest::PagedEnumerable.new @pipeline_service_stub, :list_training_pipelines, "training_pipelines", request, result, options
481
501
  yield result, operation if block_given?
482
- return result
502
+ throw :response, result
483
503
  end
484
504
  rescue ::Gapic::Rest::Error => e
485
505
  raise ::Google::Cloud::Error.from_error(e)
@@ -568,7 +588,7 @@ module Google
568
588
  @pipeline_service_stub.delete_training_pipeline request, options do |result, operation|
569
589
  result = ::Gapic::Operation.new result, @operations_client, options: options
570
590
  yield result, operation if block_given?
571
- return result
591
+ throw :response, result
572
592
  end
573
593
  rescue ::Gapic::Rest::Error => e
574
594
  raise ::Google::Cloud::Error.from_error(e)
@@ -662,7 +682,6 @@ module Google
662
682
 
663
683
  @pipeline_service_stub.cancel_training_pipeline request, options do |result, operation|
664
684
  yield result, operation if block_given?
665
- return result
666
685
  end
667
686
  rescue ::Gapic::Rest::Error => e
668
687
  raise ::Google::Cloud::Error.from_error(e)
@@ -751,7 +770,6 @@ module Google
751
770
 
752
771
  @pipeline_service_stub.create_pipeline_job request, options do |result, operation|
753
772
  yield result, operation if block_given?
754
- return result
755
773
  end
756
774
  rescue ::Gapic::Rest::Error => e
757
775
  raise ::Google::Cloud::Error.from_error(e)
@@ -832,7 +850,6 @@ module Google
832
850
 
833
851
  @pipeline_service_stub.get_pipeline_job request, options do |result, operation|
834
852
  yield result, operation if block_given?
835
- return result
836
853
  end
837
854
  rescue ::Gapic::Rest::Error => e
838
855
  raise ::Google::Cloud::Error.from_error(e)
@@ -977,7 +994,7 @@ module Google
977
994
  @pipeline_service_stub.list_pipeline_jobs request, options do |result, operation|
978
995
  result = ::Gapic::Rest::PagedEnumerable.new @pipeline_service_stub, :list_pipeline_jobs, "pipeline_jobs", request, result, options
979
996
  yield result, operation if block_given?
980
- return result
997
+ throw :response, result
981
998
  end
982
999
  rescue ::Gapic::Rest::Error => e
983
1000
  raise ::Google::Cloud::Error.from_error(e)
@@ -1066,7 +1083,7 @@ module Google
1066
1083
  @pipeline_service_stub.delete_pipeline_job request, options do |result, operation|
1067
1084
  result = ::Gapic::Operation.new result, @operations_client, options: options
1068
1085
  yield result, operation if block_given?
1069
- return result
1086
+ throw :response, result
1070
1087
  end
1071
1088
  rescue ::Gapic::Rest::Error => e
1072
1089
  raise ::Google::Cloud::Error.from_error(e)
@@ -1161,7 +1178,7 @@ module Google
1161
1178
  @pipeline_service_stub.batch_delete_pipeline_jobs request, options do |result, operation|
1162
1179
  result = ::Gapic::Operation.new result, @operations_client, options: options
1163
1180
  yield result, operation if block_given?
1164
- return result
1181
+ throw :response, result
1165
1182
  end
1166
1183
  rescue ::Gapic::Rest::Error => e
1167
1184
  raise ::Google::Cloud::Error.from_error(e)
@@ -1254,7 +1271,6 @@ module Google
1254
1271
 
1255
1272
  @pipeline_service_stub.cancel_pipeline_job request, options do |result, operation|
1256
1273
  yield result, operation if block_given?
1257
- return result
1258
1274
  end
1259
1275
  rescue ::Gapic::Rest::Error => e
1260
1276
  raise ::Google::Cloud::Error.from_error(e)
@@ -1353,7 +1369,7 @@ module Google
1353
1369
  @pipeline_service_stub.batch_cancel_pipeline_jobs request, options do |result, operation|
1354
1370
  result = ::Gapic::Operation.new result, @operations_client, options: options
1355
1371
  yield result, operation if block_given?
1356
- return result
1372
+ throw :response, result
1357
1373
  end
1358
1374
  rescue ::Gapic::Rest::Error => e
1359
1375
  raise ::Google::Cloud::Error.from_error(e)
@@ -1433,6 +1449,11 @@ module Google
1433
1449
  # default endpoint URL. The default value of nil uses the environment
1434
1450
  # universe (usually the default "googleapis.com" universe).
1435
1451
  # @return [::String,nil]
1452
+ # @!attribute [rw] logger
1453
+ # A custom logger to use for request/response debug logging, or the value
1454
+ # `:default` (the default) to construct a default logger, or `nil` to
1455
+ # explicitly disable logging.
1456
+ # @return [::Logger,:default,nil]
1436
1457
  #
1437
1458
  class Configuration
1438
1459
  extend ::Gapic::Config
@@ -1461,6 +1482,7 @@ module Google
1461
1482
  # by the host service.
1462
1483
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1463
1484
  config_attr :bindings_override, {}, ::Hash, nil
1485
+ config_attr :logger, :default, ::Logger, nil, :default
1464
1486
 
1465
1487
  # @private
1466
1488
  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
  ##
@@ -1496,6 +1510,13 @@ module Google
1496
1510
  ["name", %r{^projects/[^/]+/locations/[^/]+/notebookRuntimeTemplates/[^/]+/?$}, false]
1497
1511
  ]
1498
1512
  )
1513
+ .with_bindings(
1514
+ uri_method: :get,
1515
+ uri_template: "/v1/{name}/operations",
1516
+ matches: [
1517
+ ["name", %r{^projects/[^/]+/locations/[^/]+/reasoningEngines/[^/]+/?$}, false]
1518
+ ]
1519
+ )
1499
1520
  .with_bindings(
1500
1521
  uri_method: :get,
1501
1522
  uri_template: "/v1/{name}/operations",
@@ -2189,6 +2210,13 @@ module Google
2189
2210
  ["name", %r{^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/ragFiles/[^/]+/operations/[^/]+/?$}, false]
2190
2211
  ]
2191
2212
  )
2213
+ .with_bindings(
2214
+ uri_method: :get,
2215
+ uri_template: "/v1/{name}",
2216
+ matches: [
2217
+ ["name", %r{^projects/[^/]+/locations/[^/]+/reasoningEngines/[^/]+/operations/[^/]+/?$}, false]
2218
+ ]
2219
+ )
2192
2220
  .with_bindings(
2193
2221
  uri_method: :get,
2194
2222
  uri_template: "/v1/{name}",
@@ -2847,6 +2875,13 @@ module Google
2847
2875
  ["name", %r{^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/ragFiles/[^/]+/operations/[^/]+/?$}, false]
2848
2876
  ]
2849
2877
  )
2878
+ .with_bindings(
2879
+ uri_method: :delete,
2880
+ uri_template: "/v1/{name}",
2881
+ matches: [
2882
+ ["name", %r{^projects/[^/]+/locations/[^/]+/reasoningEngines/[^/]+/operations/[^/]+/?$}, false]
2883
+ ]
2884
+ )
2850
2885
  .with_bindings(
2851
2886
  uri_method: :delete,
2852
2887
  uri_template: "/v1/{name}",
@@ -3498,6 +3533,13 @@ module Google
3498
3533
  ["name", %r{^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/ragFiles/[^/]+/operations/[^/]+/?$}, false]
3499
3534
  ]
3500
3535
  )
3536
+ .with_bindings(
3537
+ uri_method: :post,
3538
+ uri_template: "/v1/{name}:cancel",
3539
+ matches: [
3540
+ ["name", %r{^projects/[^/]+/locations/[^/]+/reasoningEngines/[^/]+/operations/[^/]+/?$}, false]
3541
+ ]
3542
+ )
3501
3543
  .with_bindings(
3502
3544
  uri_method: :post,
3503
3545
  uri_template: "/v1/{name}:cancel",
@@ -4128,6 +4170,13 @@ module Google
4128
4170
  ["name", %r{^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/ragFiles/[^/]+/operations/[^/]+/?$}, false]
4129
4171
  ]
4130
4172
  )
4173
+ .with_bindings(
4174
+ uri_method: :post,
4175
+ uri_template: "/v1/{name}:wait",
4176
+ matches: [
4177
+ ["name", %r{^projects/[^/]+/locations/[^/]+/reasoningEngines/[^/]+/operations/[^/]+/?$}, false]
4178
+ ]
4179
+ )
4131
4180
  .with_bindings(
4132
4181
  uri_method: :post,
4133
4182
  uri_template: "/v1/{name}:wait",