google-cloud-ai_platform-v1 0.60.0 → 0.61.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +30 -20
  3. data/lib/google/cloud/ai_platform/v1/dataset_service/client.rb +43 -20
  4. data/lib/google/cloud/ai_platform/v1/dataset_service/operations.rb +9 -5
  5. data/lib/google/cloud/ai_platform/v1/dataset_service/rest/client.rb +43 -20
  6. data/lib/google/cloud/ai_platform/v1/dataset_service/rest/operations.rb +49 -35
  7. data/lib/google/cloud/ai_platform/v1/dataset_service/rest/service_stub.rb +166 -116
  8. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/client.rb +34 -7
  9. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/operations.rb +9 -5
  10. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/client.rb +33 -7
  11. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/operations.rb +49 -35
  12. data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/rest/service_stub.rb +62 -38
  13. data/lib/google/cloud/ai_platform/v1/endpoint_service/client.rb +36 -10
  14. data/lib/google/cloud/ai_platform/v1/endpoint_service/operations.rb +9 -5
  15. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/client.rb +36 -10
  16. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/operations.rb +49 -35
  17. data/lib/google/cloud/ai_platform/v1/endpoint_service/rest/service_stub.rb +86 -56
  18. data/lib/google/cloud/ai_platform/v1/evaluation_service/client.rb +29 -2
  19. data/lib/google/cloud/ai_platform/v1/evaluation_service/rest/client.rb +29 -2
  20. data/lib/google/cloud/ai_platform/v1/evaluation_service/rest/service_stub.rb +22 -8
  21. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/client.rb +38 -14
  22. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/operations.rb +9 -5
  23. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/client.rb +38 -14
  24. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/operations.rb +49 -35
  25. data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/rest/service_stub.rb +118 -80
  26. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/client.rb +29 -3
  27. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest/client.rb +29 -3
  28. data/lib/google/cloud/ai_platform/v1/feature_online_store_service/rest/service_stub.rb +30 -14
  29. data/lib/google/cloud/ai_platform/v1/feature_registry_service/client.rb +38 -12
  30. data/lib/google/cloud/ai_platform/v1/feature_registry_service/operations.rb +9 -5
  31. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/client.rb +38 -12
  32. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/operations.rb +49 -35
  33. data/lib/google/cloud/ai_platform/v1/feature_registry_service/rest/service_stub.rb +102 -68
  34. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/client.rb +29 -4
  35. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest/client.rb +29 -3
  36. data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/rest/service_stub.rb +31 -14
  37. data/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb +45 -22
  38. data/lib/google/cloud/ai_platform/v1/featurestore_service/operations.rb +9 -5
  39. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/client.rb +45 -22
  40. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/operations.rb +49 -35
  41. data/lib/google/cloud/ai_platform/v1/featurestore_service/rest/service_stub.rb +182 -128
  42. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/client.rb +31 -6
  43. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/operations.rb +9 -5
  44. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/client.rb +31 -6
  45. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/operations.rb +49 -35
  46. data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/rest/service_stub.rb +54 -32
  47. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/client.rb +35 -9
  48. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/operations.rb +9 -5
  49. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/client.rb +35 -9
  50. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/operations.rb +49 -35
  51. data/lib/google/cloud/ai_platform/v1/index_endpoint_service/rest/service_stub.rb +78 -50
  52. data/lib/google/cloud/ai_platform/v1/index_service/client.rb +33 -8
  53. data/lib/google/cloud/ai_platform/v1/index_service/operations.rb +9 -5
  54. data/lib/google/cloud/ai_platform/v1/index_service/rest/client.rb +33 -8
  55. data/lib/google/cloud/ai_platform/v1/index_service/rest/operations.rb +49 -35
  56. data/lib/google/cloud/ai_platform/v1/index_service/rest/service_stub.rb +70 -44
  57. data/lib/google/cloud/ai_platform/v1/job_service/client.rb +44 -36
  58. data/lib/google/cloud/ai_platform/v1/job_service/operations.rb +9 -5
  59. data/lib/google/cloud/ai_platform/v1/job_service/rest/client.rb +44 -36
  60. data/lib/google/cloud/ai_platform/v1/job_service/rest/operations.rb +49 -35
  61. data/lib/google/cloud/ai_platform/v1/job_service/rest/service_stub.rb +294 -212
  62. data/lib/google/cloud/ai_platform/v1/llm_utility_service/client.rb +29 -3
  63. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/client.rb +29 -3
  64. data/lib/google/cloud/ai_platform/v1/llm_utility_service/rest/service_stub.rb +30 -14
  65. data/lib/google/cloud/ai_platform/v1/match_service/client.rb +29 -3
  66. data/lib/google/cloud/ai_platform/v1/match_service/rest/client.rb +29 -3
  67. data/lib/google/cloud/ai_platform/v1/match_service/rest/service_stub.rb +30 -14
  68. data/lib/google/cloud/ai_platform/v1/metadata_service/client.rb +42 -33
  69. data/lib/google/cloud/ai_platform/v1/metadata_service/operations.rb +9 -5
  70. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/client.rb +42 -33
  71. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/operations.rb +49 -35
  72. data/lib/google/cloud/ai_platform/v1/metadata_service/rest/service_stub.rb +270 -194
  73. data/lib/google/cloud/ai_platform/v1/migration_service/client.rb +31 -3
  74. data/lib/google/cloud/ai_platform/v1/migration_service/operations.rb +9 -5
  75. data/lib/google/cloud/ai_platform/v1/migration_service/rest/client.rb +31 -3
  76. data/lib/google/cloud/ai_platform/v1/migration_service/rest/operations.rb +49 -35
  77. data/lib/google/cloud/ai_platform/v1/migration_service/rest/service_stub.rb +30 -14
  78. data/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb +29 -2
  79. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/client.rb +29 -2
  80. data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/service_stub.rb +22 -8
  81. data/lib/google/cloud/ai_platform/v1/model_service/client.rb +39 -19
  82. data/lib/google/cloud/ai_platform/v1/model_service/operations.rb +9 -5
  83. data/lib/google/cloud/ai_platform/v1/model_service/rest/client.rb +39 -19
  84. data/lib/google/cloud/ai_platform/v1/model_service/rest/operations.rb +49 -35
  85. data/lib/google/cloud/ai_platform/v1/model_service/rest/service_stub.rb +158 -110
  86. data/lib/google/cloud/ai_platform/v1/notebook_service/client.rb +41 -17
  87. data/lib/google/cloud/ai_platform/v1/notebook_service/operations.rb +9 -5
  88. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/client.rb +41 -17
  89. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/operations.rb +49 -35
  90. data/lib/google/cloud/ai_platform/v1/notebook_service/rest/service_stub.rb +142 -98
  91. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/client.rb +34 -7
  92. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/operations.rb +9 -5
  93. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/client.rb +34 -7
  94. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/operations.rb +49 -35
  95. data/lib/google/cloud/ai_platform/v1/persistent_resource_service/rest/service_stub.rb +62 -38
  96. data/lib/google/cloud/ai_platform/v1/pipeline_service/client.rb +35 -13
  97. data/lib/google/cloud/ai_platform/v1/pipeline_service/operations.rb +9 -5
  98. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/client.rb +35 -13
  99. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/operations.rb +49 -35
  100. data/lib/google/cloud/ai_platform/v1/pipeline_service/rest/service_stub.rb +110 -74
  101. data/lib/google/cloud/ai_platform/v1/prediction_service/client.rb +29 -14
  102. data/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb +29 -7
  103. data/lib/google/cloud/ai_platform/v1/prediction_service/rest/service_stub.rb +65 -38
  104. data/lib/google/cloud/ai_platform/v1/schedule_service/client.rb +31 -8
  105. data/lib/google/cloud/ai_platform/v1/schedule_service/operations.rb +9 -5
  106. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/client.rb +31 -8
  107. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/operations.rb +49 -35
  108. data/lib/google/cloud/ai_platform/v1/schedule_service/rest/service_stub.rb +70 -44
  109. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/client.rb +33 -6
  110. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/operations.rb +9 -5
  111. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/client.rb +33 -6
  112. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/operations.rb +49 -35
  113. data/lib/google/cloud/ai_platform/v1/specialist_pool_service/rest/service_stub.rb +54 -32
  114. data/lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb +40 -31
  115. data/lib/google/cloud/ai_platform/v1/tensorboard_service/operations.rb +9 -5
  116. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/client.rb +40 -30
  117. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/operations.rb +49 -35
  118. data/lib/google/cloud/ai_platform/v1/tensorboard_service/rest/service_stub.rb +247 -176
  119. data/lib/google/cloud/ai_platform/v1/version.rb +1 -1
  120. data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/client.rb +36 -11
  121. data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/operations.rb +9 -5
  122. data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/client.rb +36 -11
  123. data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/operations.rb +49 -35
  124. data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/service_stub.rb +94 -62
  125. data/lib/google/cloud/ai_platform/v1/vertex_rag_service/client.rb +29 -4
  126. data/lib/google/cloud/ai_platform/v1/vertex_rag_service/rest/client.rb +29 -4
  127. data/lib/google/cloud/ai_platform/v1/vertex_rag_service/rest/service_stub.rb +38 -20
  128. data/lib/google/cloud/ai_platform/v1/vizier_service/client.rb +33 -16
  129. data/lib/google/cloud/ai_platform/v1/vizier_service/operations.rb +9 -5
  130. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/client.rb +33 -16
  131. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/operations.rb +49 -35
  132. data/lib/google/cloud/ai_platform/v1/vizier_service/rest/service_stub.rb +134 -92
  133. data/lib/google/cloud/aiplatform/v1/accelerator_type_pb.rb +1 -1
  134. data/proto_docs/google/cloud/aiplatform/v1/accelerator_type.rb +3 -0
  135. metadata +4 -4
@@ -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
+ @tensorboard_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 = @tensorboard_service_stub.endpoint
176
187
  config.universe_domain = @tensorboard_service_stub.universe_domain
188
+ config.logger = @tensorboard_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 = @tensorboard_service_stub.endpoint
183
195
  config.universe_domain = @tensorboard_service_stub.universe_domain
196
+ config.logger = @tensorboard_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
+ @tensorboard_service_stub.logger
228
+ end
229
+
208
230
  # Service calls
209
231
 
210
232
  ##
@@ -298,7 +320,7 @@ module Google
298
320
  @tensorboard_service_stub.call_rpc :create_tensorboard, request, options: options do |response, operation|
299
321
  response = ::Gapic::Operation.new response, @operations_client, options: options
300
322
  yield response, operation if block_given?
301
- return response
323
+ throw :response, response
302
324
  end
303
325
  rescue ::GRPC::BadStatus => e
304
326
  raise ::Google::Cloud::Error.from_error(e)
@@ -386,7 +408,6 @@ module Google
386
408
 
387
409
  @tensorboard_service_stub.call_rpc :get_tensorboard, request, options: options do |response, operation|
388
410
  yield response, operation if block_given?
389
- return response
390
411
  end
391
412
  rescue ::GRPC::BadStatus => e
392
413
  raise ::Google::Cloud::Error.from_error(e)
@@ -489,7 +510,7 @@ module Google
489
510
  @tensorboard_service_stub.call_rpc :update_tensorboard, request, options: options do |response, operation|
490
511
  response = ::Gapic::Operation.new response, @operations_client, options: options
491
512
  yield response, operation if block_given?
492
- return response
513
+ throw :response, response
493
514
  end
494
515
  rescue ::GRPC::BadStatus => e
495
516
  raise ::Google::Cloud::Error.from_error(e)
@@ -601,7 +622,7 @@ module Google
601
622
  @tensorboard_service_stub.call_rpc :list_tensorboards, request, options: options do |response, operation|
602
623
  response = ::Gapic::PagedEnumerable.new @tensorboard_service_stub, :list_tensorboards, request, response, operation, options
603
624
  yield response, operation if block_given?
604
- return response
625
+ throw :response, response
605
626
  end
606
627
  rescue ::GRPC::BadStatus => e
607
628
  raise ::Google::Cloud::Error.from_error(e)
@@ -697,7 +718,7 @@ module Google
697
718
  @tensorboard_service_stub.call_rpc :delete_tensorboard, request, options: options do |response, operation|
698
719
  response = ::Gapic::Operation.new response, @operations_client, options: options
699
720
  yield response, operation if block_given?
700
- return response
721
+ throw :response, response
701
722
  end
702
723
  rescue ::GRPC::BadStatus => e
703
724
  raise ::Google::Cloud::Error.from_error(e)
@@ -785,7 +806,6 @@ module Google
785
806
 
786
807
  @tensorboard_service_stub.call_rpc :read_tensorboard_usage, request, options: options do |response, operation|
787
808
  yield response, operation if block_given?
788
- return response
789
809
  end
790
810
  rescue ::GRPC::BadStatus => e
791
811
  raise ::Google::Cloud::Error.from_error(e)
@@ -873,7 +893,6 @@ module Google
873
893
 
874
894
  @tensorboard_service_stub.call_rpc :read_tensorboard_size, request, options: options do |response, operation|
875
895
  yield response, operation if block_given?
876
- return response
877
896
  end
878
897
  rescue ::GRPC::BadStatus => e
879
898
  raise ::Google::Cloud::Error.from_error(e)
@@ -969,7 +988,6 @@ module Google
969
988
 
970
989
  @tensorboard_service_stub.call_rpc :create_tensorboard_experiment, request, options: options do |response, operation|
971
990
  yield response, operation if block_given?
972
- return response
973
991
  end
974
992
  rescue ::GRPC::BadStatus => e
975
993
  raise ::Google::Cloud::Error.from_error(e)
@@ -1057,7 +1075,6 @@ module Google
1057
1075
 
1058
1076
  @tensorboard_service_stub.call_rpc :get_tensorboard_experiment, request, options: options do |response, operation|
1059
1077
  yield response, operation if block_given?
1060
- return response
1061
1078
  end
1062
1079
  rescue ::GRPC::BadStatus => e
1063
1080
  raise ::Google::Cloud::Error.from_error(e)
@@ -1152,7 +1169,6 @@ module Google
1152
1169
 
1153
1170
  @tensorboard_service_stub.call_rpc :update_tensorboard_experiment, request, options: options do |response, operation|
1154
1171
  yield response, operation if block_given?
1155
- return response
1156
1172
  end
1157
1173
  rescue ::GRPC::BadStatus => e
1158
1174
  raise ::Google::Cloud::Error.from_error(e)
@@ -1264,7 +1280,7 @@ module Google
1264
1280
  @tensorboard_service_stub.call_rpc :list_tensorboard_experiments, request, options: options do |response, operation|
1265
1281
  response = ::Gapic::PagedEnumerable.new @tensorboard_service_stub, :list_tensorboard_experiments, request, response, operation, options
1266
1282
  yield response, operation if block_given?
1267
- return response
1283
+ throw :response, response
1268
1284
  end
1269
1285
  rescue ::GRPC::BadStatus => e
1270
1286
  raise ::Google::Cloud::Error.from_error(e)
@@ -1360,7 +1376,7 @@ module Google
1360
1376
  @tensorboard_service_stub.call_rpc :delete_tensorboard_experiment, request, options: options do |response, operation|
1361
1377
  response = ::Gapic::Operation.new response, @operations_client, options: options
1362
1378
  yield response, operation if block_given?
1363
- return response
1379
+ throw :response, response
1364
1380
  end
1365
1381
  rescue ::GRPC::BadStatus => e
1366
1382
  raise ::Google::Cloud::Error.from_error(e)
@@ -1456,7 +1472,6 @@ module Google
1456
1472
 
1457
1473
  @tensorboard_service_stub.call_rpc :create_tensorboard_run, request, options: options do |response, operation|
1458
1474
  yield response, operation if block_given?
1459
- return response
1460
1475
  end
1461
1476
  rescue ::GRPC::BadStatus => e
1462
1477
  raise ::Google::Cloud::Error.from_error(e)
@@ -1549,7 +1564,6 @@ module Google
1549
1564
 
1550
1565
  @tensorboard_service_stub.call_rpc :batch_create_tensorboard_runs, request, options: options do |response, operation|
1551
1566
  yield response, operation if block_given?
1552
- return response
1553
1567
  end
1554
1568
  rescue ::GRPC::BadStatus => e
1555
1569
  raise ::Google::Cloud::Error.from_error(e)
@@ -1637,7 +1651,6 @@ module Google
1637
1651
 
1638
1652
  @tensorboard_service_stub.call_rpc :get_tensorboard_run, request, options: options do |response, operation|
1639
1653
  yield response, operation if block_given?
1640
- return response
1641
1654
  end
1642
1655
  rescue ::GRPC::BadStatus => e
1643
1656
  raise ::Google::Cloud::Error.from_error(e)
@@ -1732,7 +1745,6 @@ module Google
1732
1745
 
1733
1746
  @tensorboard_service_stub.call_rpc :update_tensorboard_run, request, options: options do |response, operation|
1734
1747
  yield response, operation if block_given?
1735
- return response
1736
1748
  end
1737
1749
  rescue ::GRPC::BadStatus => e
1738
1750
  raise ::Google::Cloud::Error.from_error(e)
@@ -1844,7 +1856,7 @@ module Google
1844
1856
  @tensorboard_service_stub.call_rpc :list_tensorboard_runs, request, options: options do |response, operation|
1845
1857
  response = ::Gapic::PagedEnumerable.new @tensorboard_service_stub, :list_tensorboard_runs, request, response, operation, options
1846
1858
  yield response, operation if block_given?
1847
- return response
1859
+ throw :response, response
1848
1860
  end
1849
1861
  rescue ::GRPC::BadStatus => e
1850
1862
  raise ::Google::Cloud::Error.from_error(e)
@@ -1940,7 +1952,7 @@ module Google
1940
1952
  @tensorboard_service_stub.call_rpc :delete_tensorboard_run, request, options: options do |response, operation|
1941
1953
  response = ::Gapic::Operation.new response, @operations_client, options: options
1942
1954
  yield response, operation if block_given?
1943
- return response
1955
+ throw :response, response
1944
1956
  end
1945
1957
  rescue ::GRPC::BadStatus => e
1946
1958
  raise ::Google::Cloud::Error.from_error(e)
@@ -2035,7 +2047,6 @@ module Google
2035
2047
 
2036
2048
  @tensorboard_service_stub.call_rpc :batch_create_tensorboard_time_series, request, options: options do |response, operation|
2037
2049
  yield response, operation if block_given?
2038
- return response
2039
2050
  end
2040
2051
  rescue ::GRPC::BadStatus => e
2041
2052
  raise ::Google::Cloud::Error.from_error(e)
@@ -2131,7 +2142,6 @@ module Google
2131
2142
 
2132
2143
  @tensorboard_service_stub.call_rpc :create_tensorboard_time_series, request, options: options do |response, operation|
2133
2144
  yield response, operation if block_given?
2134
- return response
2135
2145
  end
2136
2146
  rescue ::GRPC::BadStatus => e
2137
2147
  raise ::Google::Cloud::Error.from_error(e)
@@ -2219,7 +2229,6 @@ module Google
2219
2229
 
2220
2230
  @tensorboard_service_stub.call_rpc :get_tensorboard_time_series, request, options: options do |response, operation|
2221
2231
  yield response, operation if block_given?
2222
- return response
2223
2232
  end
2224
2233
  rescue ::GRPC::BadStatus => e
2225
2234
  raise ::Google::Cloud::Error.from_error(e)
@@ -2315,7 +2324,6 @@ module Google
2315
2324
 
2316
2325
  @tensorboard_service_stub.call_rpc :update_tensorboard_time_series, request, options: options do |response, operation|
2317
2326
  yield response, operation if block_given?
2318
- return response
2319
2327
  end
2320
2328
  rescue ::GRPC::BadStatus => e
2321
2329
  raise ::Google::Cloud::Error.from_error(e)
@@ -2427,7 +2435,7 @@ module Google
2427
2435
  @tensorboard_service_stub.call_rpc :list_tensorboard_time_series, request, options: options do |response, operation|
2428
2436
  response = ::Gapic::PagedEnumerable.new @tensorboard_service_stub, :list_tensorboard_time_series, request, response, operation, options
2429
2437
  yield response, operation if block_given?
2430
- return response
2438
+ throw :response, response
2431
2439
  end
2432
2440
  rescue ::GRPC::BadStatus => e
2433
2441
  raise ::Google::Cloud::Error.from_error(e)
@@ -2523,7 +2531,7 @@ module Google
2523
2531
  @tensorboard_service_stub.call_rpc :delete_tensorboard_time_series, request, options: options do |response, operation|
2524
2532
  response = ::Gapic::Operation.new response, @operations_client, options: options
2525
2533
  yield response, operation if block_given?
2526
- return response
2534
+ throw :response, response
2527
2535
  end
2528
2536
  rescue ::GRPC::BadStatus => e
2529
2537
  raise ::Google::Cloud::Error.from_error(e)
@@ -2622,7 +2630,6 @@ module Google
2622
2630
 
2623
2631
  @tensorboard_service_stub.call_rpc :batch_read_tensorboard_time_series_data, request, options: options do |response, operation|
2624
2632
  yield response, operation if block_given?
2625
- return response
2626
2633
  end
2627
2634
  rescue ::GRPC::BadStatus => e
2628
2635
  raise ::Google::Cloud::Error.from_error(e)
@@ -2721,7 +2728,6 @@ module Google
2721
2728
 
2722
2729
  @tensorboard_service_stub.call_rpc :read_tensorboard_time_series_data, request, options: options do |response, operation|
2723
2730
  yield response, operation if block_given?
2724
- return response
2725
2731
  end
2726
2732
  rescue ::GRPC::BadStatus => e
2727
2733
  raise ::Google::Cloud::Error.from_error(e)
@@ -2817,7 +2823,6 @@ module Google
2817
2823
 
2818
2824
  @tensorboard_service_stub.call_rpc :read_tensorboard_blob_data, request, options: options do |response, operation|
2819
2825
  yield response, operation if block_given?
2820
- return response
2821
2826
  end
2822
2827
  rescue ::GRPC::BadStatus => e
2823
2828
  raise ::Google::Cloud::Error.from_error(e)
@@ -2908,7 +2913,6 @@ module Google
2908
2913
 
2909
2914
  @tensorboard_service_stub.call_rpc :write_tensorboard_experiment_data, request, options: options do |response, operation|
2910
2915
  yield response, operation if block_given?
2911
- return response
2912
2916
  end
2913
2917
  rescue ::GRPC::BadStatus => e
2914
2918
  raise ::Google::Cloud::Error.from_error(e)
@@ -3003,7 +3007,6 @@ module Google
3003
3007
 
3004
3008
  @tensorboard_service_stub.call_rpc :write_tensorboard_run_data, request, options: options do |response, operation|
3005
3009
  yield response, operation if block_given?
3006
- return response
3007
3010
  end
3008
3011
  rescue ::GRPC::BadStatus => e
3009
3012
  raise ::Google::Cloud::Error.from_error(e)
@@ -3115,7 +3118,7 @@ module Google
3115
3118
  @tensorboard_service_stub.call_rpc :export_tensorboard_time_series_data, request, options: options do |response, operation|
3116
3119
  response = ::Gapic::PagedEnumerable.new @tensorboard_service_stub, :export_tensorboard_time_series_data, request, response, operation, options
3117
3120
  yield response, operation if block_given?
3118
- return response
3121
+ throw :response, response
3119
3122
  end
3120
3123
  rescue ::GRPC::BadStatus => e
3121
3124
  raise ::Google::Cloud::Error.from_error(e)
@@ -3204,6 +3207,11 @@ module Google
3204
3207
  # default endpoint URL. The default value of nil uses the environment
3205
3208
  # universe (usually the default "googleapis.com" universe).
3206
3209
  # @return [::String,nil]
3210
+ # @!attribute [rw] logger
3211
+ # A custom logger to use for request/response debug logging, or the value
3212
+ # `:default` (the default) to construct a default logger, or `nil` to
3213
+ # explicitly disable logging.
3214
+ # @return [::Logger,:default,nil]
3207
3215
  #
3208
3216
  class Configuration
3209
3217
  extend ::Gapic::Config
@@ -3228,6 +3236,7 @@ module Google
3228
3236
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
3229
3237
  config_attr :quota_project, nil, ::String, nil
3230
3238
  config_attr :universe_domain, nil, ::String, nil
3239
+ config_attr :logger, :default, ::Logger, nil, :default
3231
3240
 
3232
3241
  # @private
3233
3242
  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
+ @tensorboard_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 = @tensorboard_service_stub.endpoint
169
180
  config.universe_domain = @tensorboard_service_stub.universe_domain
170
181
  config.bindings_override = @config.bindings_override
182
+ config.logger = @tensorboard_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 = @tensorboard_service_stub.endpoint
177
189
  config.universe_domain = @tensorboard_service_stub.universe_domain
178
190
  config.bindings_override = @config.bindings_override
191
+ config.logger = @tensorboard_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
+ @tensorboard_service_stub.logger
223
+ end
224
+
203
225
  # Service calls
204
226
 
205
227
  ##
@@ -286,7 +308,7 @@ module Google
286
308
  @tensorboard_service_stub.create_tensorboard request, options do |result, operation|
287
309
  result = ::Gapic::Operation.new result, @operations_client, options: options
288
310
  yield result, operation if block_given?
289
- return result
311
+ throw :response, result
290
312
  end
291
313
  rescue ::Gapic::Rest::Error => e
292
314
  raise ::Google::Cloud::Error.from_error(e)
@@ -367,7 +389,6 @@ module Google
367
389
 
368
390
  @tensorboard_service_stub.get_tensorboard request, options do |result, operation|
369
391
  yield result, operation if block_given?
370
- return result
371
392
  end
372
393
  rescue ::Gapic::Rest::Error => e
373
394
  raise ::Google::Cloud::Error.from_error(e)
@@ -463,7 +484,7 @@ module Google
463
484
  @tensorboard_service_stub.update_tensorboard request, options do |result, operation|
464
485
  result = ::Gapic::Operation.new result, @operations_client, options: options
465
486
  yield result, operation if block_given?
466
- return result
487
+ throw :response, result
467
488
  end
468
489
  rescue ::Gapic::Rest::Error => e
469
490
  raise ::Google::Cloud::Error.from_error(e)
@@ -568,7 +589,7 @@ module Google
568
589
  @tensorboard_service_stub.list_tensorboards request, options do |result, operation|
569
590
  result = ::Gapic::Rest::PagedEnumerable.new @tensorboard_service_stub, :list_tensorboards, "tensorboards", request, result, options
570
591
  yield result, operation if block_given?
571
- return result
592
+ throw :response, result
572
593
  end
573
594
  rescue ::Gapic::Rest::Error => e
574
595
  raise ::Google::Cloud::Error.from_error(e)
@@ -657,7 +678,7 @@ module Google
657
678
  @tensorboard_service_stub.delete_tensorboard request, options do |result, operation|
658
679
  result = ::Gapic::Operation.new result, @operations_client, options: options
659
680
  yield result, operation if block_given?
660
- return result
681
+ throw :response, result
661
682
  end
662
683
  rescue ::Gapic::Rest::Error => e
663
684
  raise ::Google::Cloud::Error.from_error(e)
@@ -738,7 +759,6 @@ module Google
738
759
 
739
760
  @tensorboard_service_stub.read_tensorboard_usage request, options do |result, operation|
740
761
  yield result, operation if block_given?
741
- return result
742
762
  end
743
763
  rescue ::Gapic::Rest::Error => e
744
764
  raise ::Google::Cloud::Error.from_error(e)
@@ -819,7 +839,6 @@ module Google
819
839
 
820
840
  @tensorboard_service_stub.read_tensorboard_size request, options do |result, operation|
821
841
  yield result, operation if block_given?
822
- return result
823
842
  end
824
843
  rescue ::Gapic::Rest::Error => e
825
844
  raise ::Google::Cloud::Error.from_error(e)
@@ -908,7 +927,6 @@ module Google
908
927
 
909
928
  @tensorboard_service_stub.create_tensorboard_experiment request, options do |result, operation|
910
929
  yield result, operation if block_given?
911
- return result
912
930
  end
913
931
  rescue ::Gapic::Rest::Error => e
914
932
  raise ::Google::Cloud::Error.from_error(e)
@@ -989,7 +1007,6 @@ module Google
989
1007
 
990
1008
  @tensorboard_service_stub.get_tensorboard_experiment request, options do |result, operation|
991
1009
  yield result, operation if block_given?
992
- return result
993
1010
  end
994
1011
  rescue ::Gapic::Rest::Error => e
995
1012
  raise ::Google::Cloud::Error.from_error(e)
@@ -1077,7 +1094,6 @@ module Google
1077
1094
 
1078
1095
  @tensorboard_service_stub.update_tensorboard_experiment request, options do |result, operation|
1079
1096
  yield result, operation if block_given?
1080
- return result
1081
1097
  end
1082
1098
  rescue ::Gapic::Rest::Error => e
1083
1099
  raise ::Google::Cloud::Error.from_error(e)
@@ -1182,7 +1198,7 @@ module Google
1182
1198
  @tensorboard_service_stub.list_tensorboard_experiments request, options do |result, operation|
1183
1199
  result = ::Gapic::Rest::PagedEnumerable.new @tensorboard_service_stub, :list_tensorboard_experiments, "tensorboard_experiments", request, result, options
1184
1200
  yield result, operation if block_given?
1185
- return result
1201
+ throw :response, result
1186
1202
  end
1187
1203
  rescue ::Gapic::Rest::Error => e
1188
1204
  raise ::Google::Cloud::Error.from_error(e)
@@ -1271,7 +1287,7 @@ module Google
1271
1287
  @tensorboard_service_stub.delete_tensorboard_experiment request, options do |result, operation|
1272
1288
  result = ::Gapic::Operation.new result, @operations_client, options: options
1273
1289
  yield result, operation if block_given?
1274
- return result
1290
+ throw :response, result
1275
1291
  end
1276
1292
  rescue ::Gapic::Rest::Error => e
1277
1293
  raise ::Google::Cloud::Error.from_error(e)
@@ -1360,7 +1376,6 @@ module Google
1360
1376
 
1361
1377
  @tensorboard_service_stub.create_tensorboard_run request, options do |result, operation|
1362
1378
  yield result, operation if block_given?
1363
- return result
1364
1379
  end
1365
1380
  rescue ::Gapic::Rest::Error => e
1366
1381
  raise ::Google::Cloud::Error.from_error(e)
@@ -1446,7 +1461,6 @@ module Google
1446
1461
 
1447
1462
  @tensorboard_service_stub.batch_create_tensorboard_runs request, options do |result, operation|
1448
1463
  yield result, operation if block_given?
1449
- return result
1450
1464
  end
1451
1465
  rescue ::Gapic::Rest::Error => e
1452
1466
  raise ::Google::Cloud::Error.from_error(e)
@@ -1527,7 +1541,6 @@ module Google
1527
1541
 
1528
1542
  @tensorboard_service_stub.get_tensorboard_run request, options do |result, operation|
1529
1543
  yield result, operation if block_given?
1530
- return result
1531
1544
  end
1532
1545
  rescue ::Gapic::Rest::Error => e
1533
1546
  raise ::Google::Cloud::Error.from_error(e)
@@ -1615,7 +1628,6 @@ module Google
1615
1628
 
1616
1629
  @tensorboard_service_stub.update_tensorboard_run request, options do |result, operation|
1617
1630
  yield result, operation if block_given?
1618
- return result
1619
1631
  end
1620
1632
  rescue ::Gapic::Rest::Error => e
1621
1633
  raise ::Google::Cloud::Error.from_error(e)
@@ -1720,7 +1732,7 @@ module Google
1720
1732
  @tensorboard_service_stub.list_tensorboard_runs request, options do |result, operation|
1721
1733
  result = ::Gapic::Rest::PagedEnumerable.new @tensorboard_service_stub, :list_tensorboard_runs, "tensorboard_runs", request, result, options
1722
1734
  yield result, operation if block_given?
1723
- return result
1735
+ throw :response, result
1724
1736
  end
1725
1737
  rescue ::Gapic::Rest::Error => e
1726
1738
  raise ::Google::Cloud::Error.from_error(e)
@@ -1809,7 +1821,7 @@ module Google
1809
1821
  @tensorboard_service_stub.delete_tensorboard_run request, options do |result, operation|
1810
1822
  result = ::Gapic::Operation.new result, @operations_client, options: options
1811
1823
  yield result, operation if block_given?
1812
- return result
1824
+ throw :response, result
1813
1825
  end
1814
1826
  rescue ::Gapic::Rest::Error => e
1815
1827
  raise ::Google::Cloud::Error.from_error(e)
@@ -1897,7 +1909,6 @@ module Google
1897
1909
 
1898
1910
  @tensorboard_service_stub.batch_create_tensorboard_time_series request, options do |result, operation|
1899
1911
  yield result, operation if block_given?
1900
- return result
1901
1912
  end
1902
1913
  rescue ::Gapic::Rest::Error => e
1903
1914
  raise ::Google::Cloud::Error.from_error(e)
@@ -1986,7 +1997,6 @@ module Google
1986
1997
 
1987
1998
  @tensorboard_service_stub.create_tensorboard_time_series request, options do |result, operation|
1988
1999
  yield result, operation if block_given?
1989
- return result
1990
2000
  end
1991
2001
  rescue ::Gapic::Rest::Error => e
1992
2002
  raise ::Google::Cloud::Error.from_error(e)
@@ -2067,7 +2077,6 @@ module Google
2067
2077
 
2068
2078
  @tensorboard_service_stub.get_tensorboard_time_series request, options do |result, operation|
2069
2079
  yield result, operation if block_given?
2070
- return result
2071
2080
  end
2072
2081
  rescue ::Gapic::Rest::Error => e
2073
2082
  raise ::Google::Cloud::Error.from_error(e)
@@ -2156,7 +2165,6 @@ module Google
2156
2165
 
2157
2166
  @tensorboard_service_stub.update_tensorboard_time_series request, options do |result, operation|
2158
2167
  yield result, operation if block_given?
2159
- return result
2160
2168
  end
2161
2169
  rescue ::Gapic::Rest::Error => e
2162
2170
  raise ::Google::Cloud::Error.from_error(e)
@@ -2261,7 +2269,7 @@ module Google
2261
2269
  @tensorboard_service_stub.list_tensorboard_time_series request, options do |result, operation|
2262
2270
  result = ::Gapic::Rest::PagedEnumerable.new @tensorboard_service_stub, :list_tensorboard_time_series, "tensorboard_time_series", request, result, options
2263
2271
  yield result, operation if block_given?
2264
- return result
2272
+ throw :response, result
2265
2273
  end
2266
2274
  rescue ::Gapic::Rest::Error => e
2267
2275
  raise ::Google::Cloud::Error.from_error(e)
@@ -2350,7 +2358,7 @@ module Google
2350
2358
  @tensorboard_service_stub.delete_tensorboard_time_series request, options do |result, operation|
2351
2359
  result = ::Gapic::Operation.new result, @operations_client, options: options
2352
2360
  yield result, operation if block_given?
2353
- return result
2361
+ throw :response, result
2354
2362
  end
2355
2363
  rescue ::Gapic::Rest::Error => e
2356
2364
  raise ::Google::Cloud::Error.from_error(e)
@@ -2442,7 +2450,6 @@ module Google
2442
2450
 
2443
2451
  @tensorboard_service_stub.batch_read_tensorboard_time_series_data request, options do |result, operation|
2444
2452
  yield result, operation if block_given?
2445
- return result
2446
2453
  end
2447
2454
  rescue ::Gapic::Rest::Error => e
2448
2455
  raise ::Google::Cloud::Error.from_error(e)
@@ -2534,7 +2541,6 @@ module Google
2534
2541
 
2535
2542
  @tensorboard_service_stub.read_tensorboard_time_series_data request, options do |result, operation|
2536
2543
  yield result, operation if block_given?
2537
- return result
2538
2544
  end
2539
2545
  rescue ::Gapic::Rest::Error => e
2540
2546
  raise ::Google::Cloud::Error.from_error(e)
@@ -2708,7 +2714,6 @@ module Google
2708
2714
 
2709
2715
  @tensorboard_service_stub.write_tensorboard_experiment_data request, options do |result, operation|
2710
2716
  yield result, operation if block_given?
2711
- return result
2712
2717
  end
2713
2718
  rescue ::Gapic::Rest::Error => e
2714
2719
  raise ::Google::Cloud::Error.from_error(e)
@@ -2796,7 +2801,6 @@ module Google
2796
2801
 
2797
2802
  @tensorboard_service_stub.write_tensorboard_run_data request, options do |result, operation|
2798
2803
  yield result, operation if block_given?
2799
- return result
2800
2804
  end
2801
2805
  rescue ::Gapic::Rest::Error => e
2802
2806
  raise ::Google::Cloud::Error.from_error(e)
@@ -2901,7 +2905,7 @@ module Google
2901
2905
  @tensorboard_service_stub.export_tensorboard_time_series_data request, options do |result, operation|
2902
2906
  result = ::Gapic::Rest::PagedEnumerable.new @tensorboard_service_stub, :export_tensorboard_time_series_data, "time_series_data_points", request, result, options
2903
2907
  yield result, operation if block_given?
2904
- return result
2908
+ throw :response, result
2905
2909
  end
2906
2910
  rescue ::Gapic::Rest::Error => e
2907
2911
  raise ::Google::Cloud::Error.from_error(e)
@@ -2981,6 +2985,11 @@ module Google
2981
2985
  # default endpoint URL. The default value of nil uses the environment
2982
2986
  # universe (usually the default "googleapis.com" universe).
2983
2987
  # @return [::String,nil]
2988
+ # @!attribute [rw] logger
2989
+ # A custom logger to use for request/response debug logging, or the value
2990
+ # `:default` (the default) to construct a default logger, or `nil` to
2991
+ # explicitly disable logging.
2992
+ # @return [::Logger,:default,nil]
2984
2993
  #
2985
2994
  class Configuration
2986
2995
  extend ::Gapic::Config
@@ -3009,6 +3018,7 @@ module Google
3009
3018
  # by the host service.
3010
3019
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
3011
3020
  config_attr :bindings_override, {}, ::Hash, nil
3021
+ config_attr :logger, :default, ::Logger, nil, :default
3012
3022
 
3013
3023
  # @private
3014
3024
  def initialize parent_config = nil