lib/google/cloud/vision_ai/v1/warehouse/client.rb in google-cloud-vision_ai-v1-0.2.0 vs lib/google/cloud/vision_ai/v1/warehouse/client.rb in google-cloud-vision_ai-v1-0.3.0
- old
+ new
@@ -194,25 +194,38 @@
endpoint: @config.endpoint,
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
universe_domain: @config.universe_domain,
channel_args: @config.channel_args,
interceptors: @config.interceptors,
- channel_pool_config: @config.channel_pool
+ channel_pool_config: @config.channel_pool,
+ logger: @config.logger
)
+ @warehouse_stub.stub_logger&.info do |entry|
+ entry.set_system_name
+ entry.set_service
+ entry.message = "Created client for #{entry.service}"
+ entry.set_credentials_fields credentials
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
+ end
+
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
config.credentials = credentials
config.quota_project = @quota_project_id
config.endpoint = @warehouse_stub.endpoint
config.universe_domain = @warehouse_stub.universe_domain
+ config.logger = @warehouse_stub.logger if config.respond_to? :logger=
end
@iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
config.credentials = credentials
config.quota_project = @quota_project_id
config.endpoint = @warehouse_stub.endpoint
config.universe_domain = @warehouse_stub.universe_domain
+ config.logger = @warehouse_stub.logger if config.respond_to? :logger=
end
end
##
# Get the associated client for long-running operations.
@@ -233,10 +246,19 @@
#
# @return [Google::Iam::V1::IAMPolicy::Client]
#
attr_reader :iam_policy_client
+ ##
+ # The logger used for request/response debug logging.
+ #
+ # @return [Logger]
+ #
+ def logger
+ @warehouse_stub.logger
+ end
+
# Service calls
##
# Creates an asset inside corpus.
#
@@ -327,11 +349,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :create_asset, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -419,11 +440,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :update_asset, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -507,11 +527,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :get_asset, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -616,11 +635,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :list_assets, request, options: options do |response, operation|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :list_assets, request, response, operation, options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -712,11 +731,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :delete_asset, request, options: options do |response, operation|
response = ::Gapic::Operation.new response, @operations_client, options: options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -819,11 +838,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :upload_asset, request, options: options do |response, operation|
response = ::Gapic::Operation.new response, @operations_client, options: options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -909,11 +928,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :generate_retrieval_url, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -1005,11 +1023,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :analyze_asset, request, options: options do |response, operation|
response = ::Gapic::Operation.new response, @operations_client, options: options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -1106,11 +1124,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :index_asset, request, options: options do |response, operation|
response = ::Gapic::Operation.new response, @operations_client, options: options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -1207,11 +1225,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :remove_index_asset, request, options: options do |response, operation|
response = ::Gapic::Operation.new response, @operations_client, options: options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -1316,11 +1334,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :view_indexed_assets, request, options: options do |response, operation|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :view_indexed_assets, request, response, operation, options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -1422,11 +1440,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :create_index, request, options: options do |response, operation|
response = ::Gapic::Operation.new response, @operations_client, options: options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -1525,11 +1543,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :update_index, request, options: options do |response, operation|
response = ::Gapic::Operation.new response, @operations_client, options: options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -1613,11 +1631,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :get_index, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -1717,11 +1734,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :list_indexes, request, options: options do |response, operation|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :list_indexes, request, response, operation, options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -1814,11 +1831,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :delete_index, request, options: options do |response, operation|
response = ::Gapic::Operation.new response, @operations_client, options: options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -1910,11 +1927,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :create_corpus, request, options: options do |response, operation|
response = ::Gapic::Operation.new response, @operations_client, options: options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -1996,11 +2013,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :get_corpus, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -2084,11 +2100,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :update_corpus, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -2193,11 +2208,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :list_corpora, request, options: options do |response, operation|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :list_corpora, request, response, operation, options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -2280,11 +2295,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :delete_corpus, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -2376,11 +2390,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :analyze_corpus, request, options: options do |response, operation|
response = ::Gapic::Operation.new response, @operations_client, options: options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -2466,11 +2480,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :create_data_schema, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -2556,11 +2569,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :update_data_schema, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -2644,11 +2656,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :get_data_schema, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -2732,11 +2743,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :delete_data_schema, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -2835,11 +2845,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :list_data_schemas, request, options: options do |response, operation|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :list_data_schemas, request, response, operation, options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -2933,11 +2943,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :create_annotation, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -3021,11 +3030,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :get_annotation, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -3140,11 +3148,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :list_annotations, request, options: options do |response, operation|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :list_annotations, request, response, operation, options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -3231,11 +3239,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :update_annotation, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -3319,11 +3326,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :delete_annotation, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -3401,11 +3407,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :ingest_asset, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -3496,11 +3501,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :clip_asset, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -3592,11 +3596,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :generate_hls_uri, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -3695,11 +3698,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :import_assets, request, options: options do |response, operation|
response = ::Gapic::Operation.new response, @operations_client, options: options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -3804,11 +3807,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :create_search_config, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -3910,11 +3912,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :update_search_config, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -3998,11 +3999,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :get_search_config, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -4089,11 +4089,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :delete_search_config, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -4193,11 +4192,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :list_search_configs, request, options: options do |response, operation|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :list_search_configs, request, response, operation, options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -4285,11 +4284,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :create_search_hypernym, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -4377,11 +4375,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :update_search_hypernym, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -4465,11 +4462,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :get_search_hypernym, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -4553,11 +4549,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :delete_search_hypernym, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -4657,11 +4652,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :list_search_hypernyms, request, options: options do |response, operation|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :list_search_hypernyms, request, response, operation, options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -4777,11 +4772,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :search_assets, request, options: options do |response, operation|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :search_assets, request, response, operation, options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -4888,11 +4883,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :search_index_endpoint, request, options: options do |response, operation|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :search_index_endpoint, request, response, operation, options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -4992,11 +4987,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :create_index_endpoint, request, options: options do |response, operation|
response = ::Gapic::Operation.new response, @operations_client, options: options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -5078,11 +5073,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :get_index_endpoint, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -5188,11 +5182,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :list_index_endpoints, request, options: options do |response, operation|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :list_index_endpoints, request, response, operation, options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -5290,11 +5284,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :update_index_endpoint, request, options: options do |response, operation|
response = ::Gapic::Operation.new response, @operations_client, options: options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -5384,11 +5378,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :delete_index_endpoint, request, options: options do |response, operation|
response = ::Gapic::Operation.new response, @operations_client, options: options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -5482,11 +5476,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :deploy_index, request, options: options do |response, operation|
response = ::Gapic::Operation.new response, @operations_client, options: options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -5578,11 +5572,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :undeploy_index, request, options: options do |response, operation|
response = ::Gapic::Operation.new response, @operations_client, options: options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -5683,11 +5677,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :create_collection, request, options: options do |response, operation|
response = ::Gapic::Operation.new response, @operations_client, options: options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -5778,11 +5772,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :delete_collection, request, options: options do |response, operation|
response = ::Gapic::Operation.new response, @operations_client, options: options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -5865,11 +5859,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :get_collection, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -5963,11 +5956,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :update_collection, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -6065,11 +6057,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :list_collections, request, options: options do |response, operation|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :list_collections, request, response, operation, options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -6151,11 +6143,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :add_collection_item, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -6237,11 +6228,10 @@
metadata: @config.metadata,
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :remove_collection_item, request, options: options do |response, operation|
yield response, operation if block_given?
- return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -6340,11 +6330,11 @@
retry_policy: @config.retry_policy
@warehouse_stub.call_rpc :view_collection_items, request, options: options do |response, operation|
response = ::Gapic::PagedEnumerable.new @warehouse_stub, :view_collection_items, request, response, operation, options
yield response, operation if block_given?
- return response
+ throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end
@@ -6429,10 +6419,15 @@
# @!attribute [rw] universe_domain
# The universe domain within which to make requests. This determines the
# default endpoint URL. The default value of nil uses the environment
# universe (usually the default "googleapis.com" universe).
# @return [::String,nil]
+ # @!attribute [rw] logger
+ # A custom logger to use for request/response debug logging, or the value
+ # `:default` (the default) to construct a default logger, or `nil` to
+ # explicitly disable logging.
+ # @return [::Logger,:default,nil]
#
class Configuration
extend ::Gapic::Config
# @private
@@ -6453,9 +6448,10 @@
config_attr :timeout, nil, ::Numeric, nil
config_attr :metadata, nil, ::Hash, nil
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
config_attr :quota_project, nil, ::String, nil
config_attr :universe_domain, nil, ::String, nil
+ config_attr :logger, :default, ::Logger, nil, :default
# @private
def initialize parent_config = nil
@parent_config = parent_config unless parent_config.nil?