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
@@ -166,14 +166,26 @@ module Google
166
166
  universe_domain: @config.universe_domain,
167
167
  channel_args: @config.channel_args,
168
168
  interceptors: @config.interceptors,
169
- channel_pool_config: @config.channel_pool
169
+ channel_pool_config: @config.channel_pool,
170
+ logger: @config.logger
170
171
  )
171
172
 
173
+ @notebook_service_stub.stub_logger&.info do |entry|
174
+ entry.set_system_name
175
+ entry.set_service
176
+ entry.message = "Created client for #{entry.service}"
177
+ entry.set_credentials_fields credentials
178
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
179
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
180
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
181
+ end
182
+
172
183
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
173
184
  config.credentials = credentials
174
185
  config.quota_project = @quota_project_id
175
186
  config.endpoint = @notebook_service_stub.endpoint
176
187
  config.universe_domain = @notebook_service_stub.universe_domain
188
+ config.logger = @notebook_service_stub.logger if config.respond_to? :logger=
177
189
  end
178
190
 
179
191
  @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
@@ -181,6 +193,7 @@ module Google
181
193
  config.quota_project = @quota_project_id
182
194
  config.endpoint = @notebook_service_stub.endpoint
183
195
  config.universe_domain = @notebook_service_stub.universe_domain
196
+ config.logger = @notebook_service_stub.logger if config.respond_to? :logger=
184
197
  end
185
198
  end
186
199
 
@@ -205,6 +218,15 @@ module Google
205
218
  #
206
219
  attr_reader :iam_policy_client
207
220
 
221
+ ##
222
+ # The logger used for request/response debug logging.
223
+ #
224
+ # @return [Logger]
225
+ #
226
+ def logger
227
+ @notebook_service_stub.logger
228
+ end
229
+
208
230
  # Service calls
209
231
 
210
232
  ##
@@ -300,7 +322,7 @@ module Google
300
322
  @notebook_service_stub.call_rpc :create_notebook_runtime_template, request, options: options do |response, operation|
301
323
  response = ::Gapic::Operation.new response, @operations_client, options: options
302
324
  yield response, operation if block_given?
303
- return response
325
+ throw :response, response
304
326
  end
305
327
  rescue ::GRPC::BadStatus => e
306
328
  raise ::Google::Cloud::Error.from_error(e)
@@ -388,7 +410,6 @@ module Google
388
410
 
389
411
  @notebook_service_stub.call_rpc :get_notebook_runtime_template, request, options: options do |response, operation|
390
412
  yield response, operation if block_given?
391
- return response
392
413
  end
393
414
  rescue ::GRPC::BadStatus => e
394
415
  raise ::Google::Cloud::Error.from_error(e)
@@ -523,7 +544,7 @@ module Google
523
544
  @notebook_service_stub.call_rpc :list_notebook_runtime_templates, request, options: options do |response, operation|
524
545
  response = ::Gapic::PagedEnumerable.new @notebook_service_stub, :list_notebook_runtime_templates, request, response, operation, options
525
546
  yield response, operation if block_given?
526
- return response
547
+ throw :response, response
527
548
  end
528
549
  rescue ::GRPC::BadStatus => e
529
550
  raise ::Google::Cloud::Error.from_error(e)
@@ -619,7 +640,7 @@ module Google
619
640
  @notebook_service_stub.call_rpc :delete_notebook_runtime_template, request, options: options do |response, operation|
620
641
  response = ::Gapic::Operation.new response, @operations_client, options: options
621
642
  yield response, operation if block_given?
622
- return response
643
+ throw :response, response
623
644
  end
624
645
  rescue ::GRPC::BadStatus => e
625
646
  raise ::Google::Cloud::Error.from_error(e)
@@ -712,7 +733,6 @@ module Google
712
733
 
713
734
  @notebook_service_stub.call_rpc :update_notebook_runtime_template, request, options: options do |response, operation|
714
735
  yield response, operation if block_given?
715
- return response
716
736
  end
717
737
  rescue ::GRPC::BadStatus => e
718
738
  raise ::Google::Cloud::Error.from_error(e)
@@ -816,7 +836,7 @@ module Google
816
836
  @notebook_service_stub.call_rpc :assign_notebook_runtime, request, options: options do |response, operation|
817
837
  response = ::Gapic::Operation.new response, @operations_client, options: options
818
838
  yield response, operation if block_given?
819
- return response
839
+ throw :response, response
820
840
  end
821
841
  rescue ::GRPC::BadStatus => e
822
842
  raise ::Google::Cloud::Error.from_error(e)
@@ -905,7 +925,6 @@ module Google
905
925
 
906
926
  @notebook_service_stub.call_rpc :get_notebook_runtime, request, options: options do |response, operation|
907
927
  yield response, operation if block_given?
908
- return response
909
928
  end
910
929
  rescue ::GRPC::BadStatus => e
911
930
  raise ::Google::Cloud::Error.from_error(e)
@@ -1054,7 +1073,7 @@ module Google
1054
1073
  @notebook_service_stub.call_rpc :list_notebook_runtimes, request, options: options do |response, operation|
1055
1074
  response = ::Gapic::PagedEnumerable.new @notebook_service_stub, :list_notebook_runtimes, request, response, operation, options
1056
1075
  yield response, operation if block_given?
1057
- return response
1076
+ throw :response, response
1058
1077
  end
1059
1078
  rescue ::GRPC::BadStatus => e
1060
1079
  raise ::Google::Cloud::Error.from_error(e)
@@ -1151,7 +1170,7 @@ module Google
1151
1170
  @notebook_service_stub.call_rpc :delete_notebook_runtime, request, options: options do |response, operation|
1152
1171
  response = ::Gapic::Operation.new response, @operations_client, options: options
1153
1172
  yield response, operation if block_given?
1154
- return response
1173
+ throw :response, response
1155
1174
  end
1156
1175
  rescue ::GRPC::BadStatus => e
1157
1176
  raise ::Google::Cloud::Error.from_error(e)
@@ -1248,7 +1267,7 @@ module Google
1248
1267
  @notebook_service_stub.call_rpc :upgrade_notebook_runtime, request, options: options do |response, operation|
1249
1268
  response = ::Gapic::Operation.new response, @operations_client, options: options
1250
1269
  yield response, operation if block_given?
1251
- return response
1270
+ throw :response, response
1252
1271
  end
1253
1272
  rescue ::GRPC::BadStatus => e
1254
1273
  raise ::Google::Cloud::Error.from_error(e)
@@ -1345,7 +1364,7 @@ module Google
1345
1364
  @notebook_service_stub.call_rpc :start_notebook_runtime, request, options: options do |response, operation|
1346
1365
  response = ::Gapic::Operation.new response, @operations_client, options: options
1347
1366
  yield response, operation if block_given?
1348
- return response
1367
+ throw :response, response
1349
1368
  end
1350
1369
  rescue ::GRPC::BadStatus => e
1351
1370
  raise ::Google::Cloud::Error.from_error(e)
@@ -1442,7 +1461,7 @@ module Google
1442
1461
  @notebook_service_stub.call_rpc :stop_notebook_runtime, request, options: options do |response, operation|
1443
1462
  response = ::Gapic::Operation.new response, @operations_client, options: options
1444
1463
  yield response, operation if block_given?
1445
- return response
1464
+ throw :response, response
1446
1465
  end
1447
1466
  rescue ::GRPC::BadStatus => e
1448
1467
  raise ::Google::Cloud::Error.from_error(e)
@@ -1541,7 +1560,7 @@ module Google
1541
1560
  @notebook_service_stub.call_rpc :create_notebook_execution_job, request, options: options do |response, operation|
1542
1561
  response = ::Gapic::Operation.new response, @operations_client, options: options
1543
1562
  yield response, operation if block_given?
1544
- return response
1563
+ throw :response, response
1545
1564
  end
1546
1565
  rescue ::GRPC::BadStatus => e
1547
1566
  raise ::Google::Cloud::Error.from_error(e)
@@ -1629,7 +1648,6 @@ module Google
1629
1648
 
1630
1649
  @notebook_service_stub.call_rpc :get_notebook_execution_job, request, options: options do |response, operation|
1631
1650
  yield response, operation if block_given?
1632
- return response
1633
1651
  end
1634
1652
  rescue ::GRPC::BadStatus => e
1635
1653
  raise ::Google::Cloud::Error.from_error(e)
@@ -1755,7 +1773,7 @@ module Google
1755
1773
  @notebook_service_stub.call_rpc :list_notebook_execution_jobs, request, options: options do |response, operation|
1756
1774
  response = ::Gapic::PagedEnumerable.new @notebook_service_stub, :list_notebook_execution_jobs, request, response, operation, options
1757
1775
  yield response, operation if block_given?
1758
- return response
1776
+ throw :response, response
1759
1777
  end
1760
1778
  rescue ::GRPC::BadStatus => e
1761
1779
  raise ::Google::Cloud::Error.from_error(e)
@@ -1849,7 +1867,7 @@ module Google
1849
1867
  @notebook_service_stub.call_rpc :delete_notebook_execution_job, request, options: options do |response, operation|
1850
1868
  response = ::Gapic::Operation.new response, @operations_client, options: options
1851
1869
  yield response, operation if block_given?
1852
- return response
1870
+ throw :response, response
1853
1871
  end
1854
1872
  rescue ::GRPC::BadStatus => e
1855
1873
  raise ::Google::Cloud::Error.from_error(e)
@@ -1938,6 +1956,11 @@ module Google
1938
1956
  # default endpoint URL. The default value of nil uses the environment
1939
1957
  # universe (usually the default "googleapis.com" universe).
1940
1958
  # @return [::String,nil]
1959
+ # @!attribute [rw] logger
1960
+ # A custom logger to use for request/response debug logging, or the value
1961
+ # `:default` (the default) to construct a default logger, or `nil` to
1962
+ # explicitly disable logging.
1963
+ # @return [::Logger,:default,nil]
1941
1964
  #
1942
1965
  class Configuration
1943
1966
  extend ::Gapic::Config
@@ -1962,6 +1985,7 @@ module Google
1962
1985
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1963
1986
  config_attr :quota_project, nil, ::String, nil
1964
1987
  config_attr :universe_domain, nil, ::String, nil
1988
+ config_attr :logger, :default, ::Logger, nil, :default
1965
1989
 
1966
1990
  # @private
1967
1991
  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
@@ -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
+ @notebook_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 = @notebook_service_stub.endpoint
169
180
  config.universe_domain = @notebook_service_stub.universe_domain
170
181
  config.bindings_override = @config.bindings_override
182
+ config.logger = @notebook_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 = @notebook_service_stub.endpoint
177
189
  config.universe_domain = @notebook_service_stub.universe_domain
178
190
  config.bindings_override = @config.bindings_override
191
+ config.logger = @notebook_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
+ @notebook_service_stub.logger
223
+ end
224
+
203
225
  # Service calls
204
226
 
205
227
  ##
@@ -288,7 +310,7 @@ module Google
288
310
  @notebook_service_stub.create_notebook_runtime_template request, options do |result, operation|
289
311
  result = ::Gapic::Operation.new result, @operations_client, options: options
290
312
  yield result, operation if block_given?
291
- return result
313
+ throw :response, result
292
314
  end
293
315
  rescue ::Gapic::Rest::Error => e
294
316
  raise ::Google::Cloud::Error.from_error(e)
@@ -369,7 +391,6 @@ module Google
369
391
 
370
392
  @notebook_service_stub.get_notebook_runtime_template request, options do |result, operation|
371
393
  yield result, operation if block_given?
372
- return result
373
394
  end
374
395
  rescue ::Gapic::Rest::Error => e
375
396
  raise ::Google::Cloud::Error.from_error(e)
@@ -497,7 +518,7 @@ module Google
497
518
  @notebook_service_stub.list_notebook_runtime_templates request, options do |result, operation|
498
519
  result = ::Gapic::Rest::PagedEnumerable.new @notebook_service_stub, :list_notebook_runtime_templates, "notebook_runtime_templates", request, result, options
499
520
  yield result, operation if block_given?
500
- return result
521
+ throw :response, result
501
522
  end
502
523
  rescue ::Gapic::Rest::Error => e
503
524
  raise ::Google::Cloud::Error.from_error(e)
@@ -586,7 +607,7 @@ module Google
586
607
  @notebook_service_stub.delete_notebook_runtime_template request, options do |result, operation|
587
608
  result = ::Gapic::Operation.new result, @operations_client, options: options
588
609
  yield result, operation if block_given?
589
- return result
610
+ throw :response, result
590
611
  end
591
612
  rescue ::Gapic::Rest::Error => e
592
613
  raise ::Google::Cloud::Error.from_error(e)
@@ -672,7 +693,6 @@ module Google
672
693
 
673
694
  @notebook_service_stub.update_notebook_runtime_template request, options do |result, operation|
674
695
  yield result, operation if block_given?
675
- return result
676
696
  end
677
697
  rescue ::Gapic::Rest::Error => e
678
698
  raise ::Google::Cloud::Error.from_error(e)
@@ -769,7 +789,7 @@ module Google
769
789
  @notebook_service_stub.assign_notebook_runtime request, options do |result, operation|
770
790
  result = ::Gapic::Operation.new result, @operations_client, options: options
771
791
  yield result, operation if block_given?
772
- return result
792
+ throw :response, result
773
793
  end
774
794
  rescue ::Gapic::Rest::Error => e
775
795
  raise ::Google::Cloud::Error.from_error(e)
@@ -851,7 +871,6 @@ module Google
851
871
 
852
872
  @notebook_service_stub.get_notebook_runtime request, options do |result, operation|
853
873
  yield result, operation if block_given?
854
- return result
855
874
  end
856
875
  rescue ::Gapic::Rest::Error => e
857
876
  raise ::Google::Cloud::Error.from_error(e)
@@ -993,7 +1012,7 @@ module Google
993
1012
  @notebook_service_stub.list_notebook_runtimes request, options do |result, operation|
994
1013
  result = ::Gapic::Rest::PagedEnumerable.new @notebook_service_stub, :list_notebook_runtimes, "notebook_runtimes", request, result, options
995
1014
  yield result, operation if block_given?
996
- return result
1015
+ throw :response, result
997
1016
  end
998
1017
  rescue ::Gapic::Rest::Error => e
999
1018
  raise ::Google::Cloud::Error.from_error(e)
@@ -1083,7 +1102,7 @@ module Google
1083
1102
  @notebook_service_stub.delete_notebook_runtime request, options do |result, operation|
1084
1103
  result = ::Gapic::Operation.new result, @operations_client, options: options
1085
1104
  yield result, operation if block_given?
1086
- return result
1105
+ throw :response, result
1087
1106
  end
1088
1107
  rescue ::Gapic::Rest::Error => e
1089
1108
  raise ::Google::Cloud::Error.from_error(e)
@@ -1173,7 +1192,7 @@ module Google
1173
1192
  @notebook_service_stub.upgrade_notebook_runtime request, options do |result, operation|
1174
1193
  result = ::Gapic::Operation.new result, @operations_client, options: options
1175
1194
  yield result, operation if block_given?
1176
- return result
1195
+ throw :response, result
1177
1196
  end
1178
1197
  rescue ::Gapic::Rest::Error => e
1179
1198
  raise ::Google::Cloud::Error.from_error(e)
@@ -1263,7 +1282,7 @@ module Google
1263
1282
  @notebook_service_stub.start_notebook_runtime request, options do |result, operation|
1264
1283
  result = ::Gapic::Operation.new result, @operations_client, options: options
1265
1284
  yield result, operation if block_given?
1266
- return result
1285
+ throw :response, result
1267
1286
  end
1268
1287
  rescue ::Gapic::Rest::Error => e
1269
1288
  raise ::Google::Cloud::Error.from_error(e)
@@ -1353,7 +1372,7 @@ module Google
1353
1372
  @notebook_service_stub.stop_notebook_runtime request, options do |result, operation|
1354
1373
  result = ::Gapic::Operation.new result, @operations_client, options: options
1355
1374
  yield result, operation if block_given?
1356
- return result
1375
+ throw :response, result
1357
1376
  end
1358
1377
  rescue ::Gapic::Rest::Error => e
1359
1378
  raise ::Google::Cloud::Error.from_error(e)
@@ -1445,7 +1464,7 @@ module Google
1445
1464
  @notebook_service_stub.create_notebook_execution_job request, options do |result, operation|
1446
1465
  result = ::Gapic::Operation.new result, @operations_client, options: options
1447
1466
  yield result, operation if block_given?
1448
- return result
1467
+ throw :response, result
1449
1468
  end
1450
1469
  rescue ::Gapic::Rest::Error => e
1451
1470
  raise ::Google::Cloud::Error.from_error(e)
@@ -1526,7 +1545,6 @@ module Google
1526
1545
 
1527
1546
  @notebook_service_stub.get_notebook_execution_job request, options do |result, operation|
1528
1547
  yield result, operation if block_given?
1529
- return result
1530
1548
  end
1531
1549
  rescue ::Gapic::Rest::Error => e
1532
1550
  raise ::Google::Cloud::Error.from_error(e)
@@ -1645,7 +1663,7 @@ module Google
1645
1663
  @notebook_service_stub.list_notebook_execution_jobs request, options do |result, operation|
1646
1664
  result = ::Gapic::Rest::PagedEnumerable.new @notebook_service_stub, :list_notebook_execution_jobs, "notebook_execution_jobs", request, result, options
1647
1665
  yield result, operation if block_given?
1648
- return result
1666
+ throw :response, result
1649
1667
  end
1650
1668
  rescue ::Gapic::Rest::Error => e
1651
1669
  raise ::Google::Cloud::Error.from_error(e)
@@ -1732,7 +1750,7 @@ module Google
1732
1750
  @notebook_service_stub.delete_notebook_execution_job request, options do |result, operation|
1733
1751
  result = ::Gapic::Operation.new result, @operations_client, options: options
1734
1752
  yield result, operation if block_given?
1735
- return result
1753
+ throw :response, result
1736
1754
  end
1737
1755
  rescue ::Gapic::Rest::Error => e
1738
1756
  raise ::Google::Cloud::Error.from_error(e)
@@ -1812,6 +1830,11 @@ module Google
1812
1830
  # default endpoint URL. The default value of nil uses the environment
1813
1831
  # universe (usually the default "googleapis.com" universe).
1814
1832
  # @return [::String,nil]
1833
+ # @!attribute [rw] logger
1834
+ # A custom logger to use for request/response debug logging, or the value
1835
+ # `:default` (the default) to construct a default logger, or `nil` to
1836
+ # explicitly disable logging.
1837
+ # @return [::Logger,:default,nil]
1815
1838
  #
1816
1839
  class Configuration
1817
1840
  extend ::Gapic::Config
@@ -1840,6 +1863,7 @@ module Google
1840
1863
  # by the host service.
1841
1864
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1842
1865
  config_attr :bindings_override, {}, ::Hash, nil
1866
+ config_attr :logger, :default, ::Logger, nil, :default
1843
1867
 
1844
1868
  # @private
1845
1869
  def initialize parent_config = nil