google-cloud-discovery_engine-v1beta 0.15.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +30 -20
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb +186 -6
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/operations.rb +12 -15
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/paths.rb +62 -0
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb +179 -6
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/operations.rb +43 -38
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/service_stub.rb +131 -31
- data/lib/google/cloud/discovery_engine/v1beta/control_service/client.rb +35 -12
- data/lib/google/cloud/discovery_engine/v1beta/control_service/rest/client.rb +35 -12
- data/lib/google/cloud/discovery_engine/v1beta/control_service/rest/service_stub.rb +54 -32
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +48 -27
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb +48 -27
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/service_stub.rb +118 -80
- data/lib/google/cloud/discovery_engine/v1beta/data_store_service/client.rb +31 -6
- data/lib/google/cloud/discovery_engine/v1beta/data_store_service/operations.rb +12 -15
- data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/client.rb +31 -6
- data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/operations.rb +43 -38
- data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/service_stub.rb +54 -32
- data/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +31 -9
- data/lib/google/cloud/discovery_engine/v1beta/document_service/operations.rb +12 -15
- data/lib/google/cloud/discovery_engine/v1beta/document_service/paths.rb +25 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb +31 -9
- data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb +43 -38
- data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/service_stub.rb +78 -50
- data/lib/google/cloud/discovery_engine/v1beta/engine_service/client.rb +35 -12
- data/lib/google/cloud/discovery_engine/v1beta/engine_service/operations.rb +12 -15
- data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/client.rb +35 -12
- data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/operations.rb +43 -38
- data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/service_stub.rb +78 -50
- data/lib/google/cloud/discovery_engine/v1beta/evaluation_service/client.rb +31 -5
- data/lib/google/cloud/discovery_engine/v1beta/evaluation_service/operations.rb +12 -15
- data/lib/google/cloud/discovery_engine/v1beta/evaluation_service/rest/client.rb +31 -5
- data/lib/google/cloud/discovery_engine/v1beta/evaluation_service/rest/operations.rb +43 -38
- data/lib/google/cloud/discovery_engine/v1beta/evaluation_service/rest/service_stub.rb +46 -26
- data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/client.rb +244 -6
- data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/paths.rb +85 -0
- data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/client.rb +152 -6
- data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/service_stub.rb +83 -7
- data/lib/google/cloud/discovery_engine/v1beta/project_service/client.rb +29 -2
- data/lib/google/cloud/discovery_engine/v1beta/project_service/operations.rb +12 -15
- data/lib/google/cloud/discovery_engine/v1beta/project_service/rest/client.rb +29 -2
- data/lib/google/cloud/discovery_engine/v1beta/project_service/rest/operations.rb +43 -38
- data/lib/google/cloud/discovery_engine/v1beta/project_service/rest/service_stub.rb +22 -8
- data/lib/google/cloud/discovery_engine/v1beta/rank_service/client.rb +29 -3
- data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/client.rb +29 -3
- data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/service_stub.rb +22 -8
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/client.rb +28 -2
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/client.rb +28 -2
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/service_stub.rb +22 -8
- data/lib/google/cloud/discovery_engine/v1beta/sample_query_service/client.rb +30 -7
- data/lib/google/cloud/discovery_engine/v1beta/sample_query_service/operations.rb +12 -15
- data/lib/google/cloud/discovery_engine/v1beta/sample_query_service/rest/client.rb +30 -7
- data/lib/google/cloud/discovery_engine/v1beta/sample_query_service/rest/operations.rb +43 -38
- data/lib/google/cloud/discovery_engine/v1beta/sample_query_service/rest/service_stub.rb +62 -38
- data/lib/google/cloud/discovery_engine/v1beta/sample_query_set_service/client.rb +29 -6
- data/lib/google/cloud/discovery_engine/v1beta/sample_query_set_service/rest/client.rb +29 -6
- data/lib/google/cloud/discovery_engine/v1beta/sample_query_set_service/rest/service_stub.rb +54 -32
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/client.rb +32 -6
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/operations.rb +12 -15
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/client.rb +32 -6
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb +43 -38
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/service_stub.rb +54 -32
- data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +427 -3
- data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +417 -3
- data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/service_stub.rb +99 -7
- data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/client.rb +29 -3
- data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/operations.rb +12 -15
- data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/client.rb +29 -3
- data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/operations.rb +43 -38
- data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/service_stub.rb +30 -14
- data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/client.rb +31 -6
- data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/client.rb +31 -6
- data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/service_stub.rb +38 -20
- data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/client.rb +361 -14
- data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/operations.rb +12 -15
- data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/paths.rb +49 -0
- data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/client.rb +340 -14
- data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/operations.rb +43 -38
- data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/service_stub.rb +308 -73
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb +31 -6
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/operations.rb +12 -15
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb +31 -6
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb +43 -38
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/service_stub.rb +46 -26
- data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/answer_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/common_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/completion_service_pb.rb +18 -1
- data/lib/google/cloud/discoveryengine/v1beta/completion_service_services_pb.rb +2 -0
- data/lib/google/cloud/discoveryengine/v1beta/control_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +4 -1
- data/lib/google/cloud/discoveryengine/v1beta/custom_tuning_model_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/data_store_pb.rb +7 -1
- data/lib/google/cloud/discoveryengine/v1beta/document_service_pb.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1beta/engine_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_pb.rb +24 -1
- data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_services_pb.rb +4 -0
- data/lib/google/cloud/discoveryengine/v1beta/grounding_pb.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +3 -1
- data/lib/google/cloud/discoveryengine/v1beta/search_service_services_pb.rb +14 -0
- data/lib/google/cloud/discoveryengine/v1beta/serving_config_pb.rb +2 -2
- data/lib/google/cloud/discoveryengine/v1beta/site_search_engine_pb.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1beta/site_search_engine_service_pb.rb +10 -1
- data/lib/google/cloud/discoveryengine/v1beta/site_search_engine_service_services_pb.rb +7 -0
- data/lib/google/cloud/discoveryengine/v1beta/user_event_pb.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/answer.rb +20 -6
- data/proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb +268 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/control.rb +9 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/control_service.rb +6 -6
- data/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb +95 -15
- data/proto_docs/google/cloud/discoveryengine/v1beta/custom_tuning_model.rb +8 -3
- data/proto_docs/google/cloud/discoveryengine/v1beta/data_store.rb +131 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/document_processing_config.rb +7 -5
- data/proto_docs/google/cloud/discoveryengine/v1beta/document_service.rb +19 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/engine.rb +5 -1
- data/proto_docs/google/cloud/discoveryengine/v1beta/engine_service.rb +4 -4
- data/proto_docs/google/cloud/discoveryengine/v1beta/grounded_generation_service.rb +396 -1
- data/proto_docs/google/cloud/discoveryengine/v1beta/grounding.rb +10 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/project.rb +1 -1
- data/proto_docs/google/cloud/discoveryengine/v1beta/purge_config.rb +1 -1
- data/proto_docs/google/cloud/discoveryengine/v1beta/rank_service.rb +1 -1
- data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +71 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/serving_config.rb +16 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/serving_config_service.rb +2 -2
- data/proto_docs/google/cloud/discoveryengine/v1beta/site_search_engine.rb +17 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/site_search_engine_service.rb +147 -1
- data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +9 -1
- data/proto_docs/google/longrunning/operations.rb +19 -14
- metadata +5 -5
@@ -165,14 +165,26 @@ module Google
|
|
165
165
|
universe_domain: @config.universe_domain,
|
166
166
|
channel_args: @config.channel_args,
|
167
167
|
interceptors: @config.interceptors,
|
168
|
-
channel_pool_config: @config.channel_pool
|
168
|
+
channel_pool_config: @config.channel_pool,
|
169
|
+
logger: @config.logger
|
169
170
|
)
|
170
171
|
|
172
|
+
@site_search_engine_service_stub.stub_logger&.info do |entry|
|
173
|
+
entry.set_system_name
|
174
|
+
entry.set_service
|
175
|
+
entry.message = "Created client for #{entry.service}"
|
176
|
+
entry.set_credentials_fields credentials
|
177
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
178
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
179
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
180
|
+
end
|
181
|
+
|
171
182
|
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
172
183
|
config.credentials = credentials
|
173
184
|
config.quota_project = @quota_project_id
|
174
185
|
config.endpoint = @site_search_engine_service_stub.endpoint
|
175
186
|
config.universe_domain = @site_search_engine_service_stub.universe_domain
|
187
|
+
config.logger = @site_search_engine_service_stub.logger if config.respond_to? :logger=
|
176
188
|
end
|
177
189
|
end
|
178
190
|
|
@@ -190,6 +202,15 @@ module Google
|
|
190
202
|
#
|
191
203
|
attr_reader :location_client
|
192
204
|
|
205
|
+
##
|
206
|
+
# The logger used for request/response debug logging.
|
207
|
+
#
|
208
|
+
# @return [Logger]
|
209
|
+
#
|
210
|
+
def logger
|
211
|
+
@site_search_engine_service_stub.logger
|
212
|
+
end
|
213
|
+
|
193
214
|
# Service calls
|
194
215
|
|
195
216
|
##
|
@@ -280,7 +301,6 @@ module Google
|
|
280
301
|
|
281
302
|
@site_search_engine_service_stub.call_rpc :get_site_search_engine, request, options: options do |response, operation|
|
282
303
|
yield response, operation if block_given?
|
283
|
-
return response
|
284
304
|
end
|
285
305
|
rescue ::GRPC::BadStatus => e
|
286
306
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -379,7 +399,7 @@ module Google
|
|
379
399
|
@site_search_engine_service_stub.call_rpc :create_target_site, request, options: options do |response, operation|
|
380
400
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
381
401
|
yield response, operation if block_given?
|
382
|
-
|
402
|
+
throw :response, response
|
383
403
|
end
|
384
404
|
rescue ::GRPC::BadStatus => e
|
385
405
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -480,7 +500,7 @@ module Google
|
|
480
500
|
@site_search_engine_service_stub.call_rpc :batch_create_target_sites, request, options: options do |response, operation|
|
481
501
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
482
502
|
yield response, operation if block_given?
|
483
|
-
|
503
|
+
throw :response, response
|
484
504
|
end
|
485
505
|
rescue ::GRPC::BadStatus => e
|
486
506
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -576,7 +596,6 @@ module Google
|
|
576
596
|
|
577
597
|
@site_search_engine_service_stub.call_rpc :get_target_site, request, options: options do |response, operation|
|
578
598
|
yield response, operation if block_given?
|
579
|
-
return response
|
580
599
|
end
|
581
600
|
rescue ::GRPC::BadStatus => e
|
582
601
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -676,7 +695,7 @@ module Google
|
|
676
695
|
@site_search_engine_service_stub.call_rpc :update_target_site, request, options: options do |response, operation|
|
677
696
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
678
697
|
yield response, operation if block_given?
|
679
|
-
|
698
|
+
throw :response, response
|
680
699
|
end
|
681
700
|
rescue ::GRPC::BadStatus => e
|
682
701
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -780,7 +799,7 @@ module Google
|
|
780
799
|
@site_search_engine_service_stub.call_rpc :delete_target_site, request, options: options do |response, operation|
|
781
800
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
782
801
|
yield response, operation if block_given?
|
783
|
-
|
802
|
+
throw :response, response
|
784
803
|
end
|
785
804
|
rescue ::GRPC::BadStatus => e
|
786
805
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -890,7 +909,304 @@ module Google
|
|
890
909
|
@site_search_engine_service_stub.call_rpc :list_target_sites, request, options: options do |response, operation|
|
891
910
|
response = ::Gapic::PagedEnumerable.new @site_search_engine_service_stub, :list_target_sites, request, response, operation, options
|
892
911
|
yield response, operation if block_given?
|
893
|
-
|
912
|
+
throw :response, response
|
913
|
+
end
|
914
|
+
rescue ::GRPC::BadStatus => e
|
915
|
+
raise ::Google::Cloud::Error.from_error(e)
|
916
|
+
end
|
917
|
+
|
918
|
+
##
|
919
|
+
# Creates a {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap}.
|
920
|
+
#
|
921
|
+
# @overload create_sitemap(request, options = nil)
|
922
|
+
# Pass arguments to `create_sitemap` via a request object, either of type
|
923
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::CreateSitemapRequest} or an equivalent Hash.
|
924
|
+
#
|
925
|
+
# @param request [::Google::Cloud::DiscoveryEngine::V1beta::CreateSitemapRequest, ::Hash]
|
926
|
+
# A request object representing the call parameters. Required. To specify no
|
927
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
928
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
929
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
930
|
+
#
|
931
|
+
# @overload create_sitemap(parent: nil, sitemap: nil)
|
932
|
+
# Pass arguments to `create_sitemap` via keyword arguments. Note that at
|
933
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
934
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
935
|
+
#
|
936
|
+
# @param parent [::String]
|
937
|
+
# Required. Parent resource name of the
|
938
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngine SiteSearchEngine},
|
939
|
+
# such as
|
940
|
+
# `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.
|
941
|
+
# @param sitemap [::Google::Cloud::DiscoveryEngine::V1beta::Sitemap, ::Hash]
|
942
|
+
# Required. The {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap} to
|
943
|
+
# create.
|
944
|
+
#
|
945
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
946
|
+
# @yieldparam response [::Gapic::Operation]
|
947
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
948
|
+
#
|
949
|
+
# @return [::Gapic::Operation]
|
950
|
+
#
|
951
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
952
|
+
#
|
953
|
+
# @example Basic example
|
954
|
+
# require "google/cloud/discovery_engine/v1beta"
|
955
|
+
#
|
956
|
+
# # Create a client object. The client can be reused for multiple calls.
|
957
|
+
# client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Client.new
|
958
|
+
#
|
959
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
960
|
+
# request = Google::Cloud::DiscoveryEngine::V1beta::CreateSitemapRequest.new
|
961
|
+
#
|
962
|
+
# # Call the create_sitemap method.
|
963
|
+
# result = client.create_sitemap request
|
964
|
+
#
|
965
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
966
|
+
# # check the status of an operation, cancel it, or wait for results.
|
967
|
+
# # Here is how to wait for a response.
|
968
|
+
# result.wait_until_done! timeout: 60
|
969
|
+
# if result.response?
|
970
|
+
# p result.response
|
971
|
+
# else
|
972
|
+
# puts "No response received."
|
973
|
+
# end
|
974
|
+
#
|
975
|
+
def create_sitemap request, options = nil
|
976
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
977
|
+
|
978
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::CreateSitemapRequest
|
979
|
+
|
980
|
+
# Converts hash and nil to an options object
|
981
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
982
|
+
|
983
|
+
# Customize the options with defaults
|
984
|
+
metadata = @config.rpcs.create_sitemap.metadata.to_h
|
985
|
+
|
986
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
987
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
988
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
989
|
+
gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
|
990
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
991
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
992
|
+
|
993
|
+
header_params = {}
|
994
|
+
if request.parent
|
995
|
+
header_params["parent"] = request.parent
|
996
|
+
end
|
997
|
+
|
998
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
999
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1000
|
+
|
1001
|
+
options.apply_defaults timeout: @config.rpcs.create_sitemap.timeout,
|
1002
|
+
metadata: metadata,
|
1003
|
+
retry_policy: @config.rpcs.create_sitemap.retry_policy
|
1004
|
+
|
1005
|
+
options.apply_defaults timeout: @config.timeout,
|
1006
|
+
metadata: @config.metadata,
|
1007
|
+
retry_policy: @config.retry_policy
|
1008
|
+
|
1009
|
+
@site_search_engine_service_stub.call_rpc :create_sitemap, request, options: options do |response, operation|
|
1010
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1011
|
+
yield response, operation if block_given?
|
1012
|
+
throw :response, response
|
1013
|
+
end
|
1014
|
+
rescue ::GRPC::BadStatus => e
|
1015
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1016
|
+
end
|
1017
|
+
|
1018
|
+
##
|
1019
|
+
# Deletes a {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap}.
|
1020
|
+
#
|
1021
|
+
# @overload delete_sitemap(request, options = nil)
|
1022
|
+
# Pass arguments to `delete_sitemap` via a request object, either of type
|
1023
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::DeleteSitemapRequest} or an equivalent Hash.
|
1024
|
+
#
|
1025
|
+
# @param request [::Google::Cloud::DiscoveryEngine::V1beta::DeleteSitemapRequest, ::Hash]
|
1026
|
+
# A request object representing the call parameters. Required. To specify no
|
1027
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1028
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1029
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1030
|
+
#
|
1031
|
+
# @overload delete_sitemap(name: nil)
|
1032
|
+
# Pass arguments to `delete_sitemap` via keyword arguments. Note that at
|
1033
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1034
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1035
|
+
#
|
1036
|
+
# @param name [::String]
|
1037
|
+
# Required. Full resource name of
|
1038
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap}, such as
|
1039
|
+
# `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}`.
|
1040
|
+
#
|
1041
|
+
# If the caller does not have permission to access the
|
1042
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap}, regardless of
|
1043
|
+
# whether or not it exists, a PERMISSION_DENIED error is returned.
|
1044
|
+
#
|
1045
|
+
# If the requested {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap}
|
1046
|
+
# does not exist, a NOT_FOUND error is returned.
|
1047
|
+
#
|
1048
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1049
|
+
# @yieldparam response [::Gapic::Operation]
|
1050
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1051
|
+
#
|
1052
|
+
# @return [::Gapic::Operation]
|
1053
|
+
#
|
1054
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1055
|
+
#
|
1056
|
+
# @example Basic example
|
1057
|
+
# require "google/cloud/discovery_engine/v1beta"
|
1058
|
+
#
|
1059
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1060
|
+
# client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Client.new
|
1061
|
+
#
|
1062
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1063
|
+
# request = Google::Cloud::DiscoveryEngine::V1beta::DeleteSitemapRequest.new
|
1064
|
+
#
|
1065
|
+
# # Call the delete_sitemap method.
|
1066
|
+
# result = client.delete_sitemap request
|
1067
|
+
#
|
1068
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1069
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1070
|
+
# # Here is how to wait for a response.
|
1071
|
+
# result.wait_until_done! timeout: 60
|
1072
|
+
# if result.response?
|
1073
|
+
# p result.response
|
1074
|
+
# else
|
1075
|
+
# puts "No response received."
|
1076
|
+
# end
|
1077
|
+
#
|
1078
|
+
def delete_sitemap request, options = nil
|
1079
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1080
|
+
|
1081
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::DeleteSitemapRequest
|
1082
|
+
|
1083
|
+
# Converts hash and nil to an options object
|
1084
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1085
|
+
|
1086
|
+
# Customize the options with defaults
|
1087
|
+
metadata = @config.rpcs.delete_sitemap.metadata.to_h
|
1088
|
+
|
1089
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1090
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1091
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1092
|
+
gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
|
1093
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1094
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1095
|
+
|
1096
|
+
header_params = {}
|
1097
|
+
if request.name
|
1098
|
+
header_params["name"] = request.name
|
1099
|
+
end
|
1100
|
+
|
1101
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1102
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1103
|
+
|
1104
|
+
options.apply_defaults timeout: @config.rpcs.delete_sitemap.timeout,
|
1105
|
+
metadata: metadata,
|
1106
|
+
retry_policy: @config.rpcs.delete_sitemap.retry_policy
|
1107
|
+
|
1108
|
+
options.apply_defaults timeout: @config.timeout,
|
1109
|
+
metadata: @config.metadata,
|
1110
|
+
retry_policy: @config.retry_policy
|
1111
|
+
|
1112
|
+
@site_search_engine_service_stub.call_rpc :delete_sitemap, request, options: options do |response, operation|
|
1113
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1114
|
+
yield response, operation if block_given?
|
1115
|
+
throw :response, response
|
1116
|
+
end
|
1117
|
+
rescue ::GRPC::BadStatus => e
|
1118
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1119
|
+
end
|
1120
|
+
|
1121
|
+
##
|
1122
|
+
# Fetch {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap}s in a
|
1123
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}.
|
1124
|
+
#
|
1125
|
+
# @overload fetch_sitemaps(request, options = nil)
|
1126
|
+
# Pass arguments to `fetch_sitemaps` via a request object, either of type
|
1127
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::FetchSitemapsRequest} or an equivalent Hash.
|
1128
|
+
#
|
1129
|
+
# @param request [::Google::Cloud::DiscoveryEngine::V1beta::FetchSitemapsRequest, ::Hash]
|
1130
|
+
# A request object representing the call parameters. Required. To specify no
|
1131
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1132
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1133
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1134
|
+
#
|
1135
|
+
# @overload fetch_sitemaps(parent: nil, matcher: nil)
|
1136
|
+
# Pass arguments to `fetch_sitemaps` via keyword arguments. Note that at
|
1137
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1138
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1139
|
+
#
|
1140
|
+
# @param parent [::String]
|
1141
|
+
# Required. Parent resource name of the
|
1142
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngine SiteSearchEngine},
|
1143
|
+
# such as
|
1144
|
+
# `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.
|
1145
|
+
# @param matcher [::Google::Cloud::DiscoveryEngine::V1beta::FetchSitemapsRequest::Matcher, ::Hash]
|
1146
|
+
# Optional. If specified, fetches the matching
|
1147
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap}s. If not specified,
|
1148
|
+
# fetches all {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap}s in the
|
1149
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}.
|
1150
|
+
#
|
1151
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1152
|
+
# @yieldparam response [::Google::Cloud::DiscoveryEngine::V1beta::FetchSitemapsResponse]
|
1153
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1154
|
+
#
|
1155
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::FetchSitemapsResponse]
|
1156
|
+
#
|
1157
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1158
|
+
#
|
1159
|
+
# @example Basic example
|
1160
|
+
# require "google/cloud/discovery_engine/v1beta"
|
1161
|
+
#
|
1162
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1163
|
+
# client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Client.new
|
1164
|
+
#
|
1165
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1166
|
+
# request = Google::Cloud::DiscoveryEngine::V1beta::FetchSitemapsRequest.new
|
1167
|
+
#
|
1168
|
+
# # Call the fetch_sitemaps method.
|
1169
|
+
# result = client.fetch_sitemaps request
|
1170
|
+
#
|
1171
|
+
# # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::FetchSitemapsResponse.
|
1172
|
+
# p result
|
1173
|
+
#
|
1174
|
+
def fetch_sitemaps request, options = nil
|
1175
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1176
|
+
|
1177
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::FetchSitemapsRequest
|
1178
|
+
|
1179
|
+
# Converts hash and nil to an options object
|
1180
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1181
|
+
|
1182
|
+
# Customize the options with defaults
|
1183
|
+
metadata = @config.rpcs.fetch_sitemaps.metadata.to_h
|
1184
|
+
|
1185
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1186
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1187
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1188
|
+
gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
|
1189
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1190
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1191
|
+
|
1192
|
+
header_params = {}
|
1193
|
+
if request.parent
|
1194
|
+
header_params["parent"] = request.parent
|
1195
|
+
end
|
1196
|
+
|
1197
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1198
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1199
|
+
|
1200
|
+
options.apply_defaults timeout: @config.rpcs.fetch_sitemaps.timeout,
|
1201
|
+
metadata: metadata,
|
1202
|
+
retry_policy: @config.rpcs.fetch_sitemaps.retry_policy
|
1203
|
+
|
1204
|
+
options.apply_defaults timeout: @config.timeout,
|
1205
|
+
metadata: @config.metadata,
|
1206
|
+
retry_policy: @config.retry_policy
|
1207
|
+
|
1208
|
+
@site_search_engine_service_stub.call_rpc :fetch_sitemaps, request, options: options do |response, operation|
|
1209
|
+
yield response, operation if block_given?
|
894
1210
|
end
|
895
1211
|
rescue ::GRPC::BadStatus => e
|
896
1212
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -987,7 +1303,7 @@ module Google
|
|
987
1303
|
@site_search_engine_service_stub.call_rpc :enable_advanced_site_search, request, options: options do |response, operation|
|
988
1304
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
989
1305
|
yield response, operation if block_given?
|
990
|
-
|
1306
|
+
throw :response, response
|
991
1307
|
end
|
992
1308
|
rescue ::GRPC::BadStatus => e
|
993
1309
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1084,7 +1400,7 @@ module Google
|
|
1084
1400
|
@site_search_engine_service_stub.call_rpc :disable_advanced_site_search, request, options: options do |response, operation|
|
1085
1401
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1086
1402
|
yield response, operation if block_given?
|
1087
|
-
|
1403
|
+
throw :response, response
|
1088
1404
|
end
|
1089
1405
|
rescue ::GRPC::BadStatus => e
|
1090
1406
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1103,7 +1419,7 @@ module Google
|
|
1103
1419
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1104
1420
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1105
1421
|
#
|
1106
|
-
# @overload recrawl_uris(site_search_engine: nil, uris: nil)
|
1422
|
+
# @overload recrawl_uris(site_search_engine: nil, uris: nil, site_credential: nil)
|
1107
1423
|
# Pass arguments to `recrawl_uris` via keyword arguments. Note that at
|
1108
1424
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1109
1425
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -1118,6 +1434,10 @@ module Google
|
|
1118
1434
|
# an INVALID_ARGUMENT error is thrown. Each URI should match at least one
|
1119
1435
|
# {::Google::Cloud::DiscoveryEngine::V1beta::TargetSite TargetSite} in
|
1120
1436
|
# `site_search_engine`.
|
1437
|
+
# @param site_credential [::String]
|
1438
|
+
# Optional. Full resource name of the [SiteCredential][], such as
|
1439
|
+
# `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCredentials/*`.
|
1440
|
+
# Only set to crawl private URIs.
|
1121
1441
|
#
|
1122
1442
|
# @yield [response, operation] Access the result along with the RPC operation
|
1123
1443
|
# @yieldparam response [::Gapic::Operation]
|
@@ -1186,7 +1506,7 @@ module Google
|
|
1186
1506
|
@site_search_engine_service_stub.call_rpc :recrawl_uris, request, options: options do |response, operation|
|
1187
1507
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1188
1508
|
yield response, operation if block_given?
|
1189
|
-
|
1509
|
+
throw :response, response
|
1190
1510
|
end
|
1191
1511
|
rescue ::GRPC::BadStatus => e
|
1192
1512
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1283,7 +1603,7 @@ module Google
|
|
1283
1603
|
@site_search_engine_service_stub.call_rpc :batch_verify_target_sites, request, options: options do |response, operation|
|
1284
1604
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1285
1605
|
yield response, operation if block_given?
|
1286
|
-
|
1606
|
+
throw :response, response
|
1287
1607
|
end
|
1288
1608
|
rescue ::GRPC::BadStatus => e
|
1289
1609
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1391,7 +1711,7 @@ module Google
|
|
1391
1711
|
@site_search_engine_service_stub.call_rpc :fetch_domain_verification_status, request, options: options do |response, operation|
|
1392
1712
|
response = ::Gapic::PagedEnumerable.new @site_search_engine_service_stub, :fetch_domain_verification_status, request, response, operation, options
|
1393
1713
|
yield response, operation if block_given?
|
1394
|
-
|
1714
|
+
throw :response, response
|
1395
1715
|
end
|
1396
1716
|
rescue ::GRPC::BadStatus => e
|
1397
1717
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1480,6 +1800,11 @@ module Google
|
|
1480
1800
|
# default endpoint URL. The default value of nil uses the environment
|
1481
1801
|
# universe (usually the default "googleapis.com" universe).
|
1482
1802
|
# @return [::String,nil]
|
1803
|
+
# @!attribute [rw] logger
|
1804
|
+
# A custom logger to use for request/response debug logging, or the value
|
1805
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1806
|
+
# explicitly disable logging.
|
1807
|
+
# @return [::Logger,:default,nil]
|
1483
1808
|
#
|
1484
1809
|
class Configuration
|
1485
1810
|
extend ::Gapic::Config
|
@@ -1504,6 +1829,7 @@ module Google
|
|
1504
1829
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1505
1830
|
config_attr :quota_project, nil, ::String, nil
|
1506
1831
|
config_attr :universe_domain, nil, ::String, nil
|
1832
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1507
1833
|
|
1508
1834
|
# @private
|
1509
1835
|
def initialize parent_config = nil
|
@@ -1586,6 +1912,21 @@ module Google
|
|
1586
1912
|
#
|
1587
1913
|
attr_reader :list_target_sites
|
1588
1914
|
##
|
1915
|
+
# RPC-specific configuration for `create_sitemap`
|
1916
|
+
# @return [::Gapic::Config::Method]
|
1917
|
+
#
|
1918
|
+
attr_reader :create_sitemap
|
1919
|
+
##
|
1920
|
+
# RPC-specific configuration for `delete_sitemap`
|
1921
|
+
# @return [::Gapic::Config::Method]
|
1922
|
+
#
|
1923
|
+
attr_reader :delete_sitemap
|
1924
|
+
##
|
1925
|
+
# RPC-specific configuration for `fetch_sitemaps`
|
1926
|
+
# @return [::Gapic::Config::Method]
|
1927
|
+
#
|
1928
|
+
attr_reader :fetch_sitemaps
|
1929
|
+
##
|
1589
1930
|
# RPC-specific configuration for `enable_advanced_site_search`
|
1590
1931
|
# @return [::Gapic::Config::Method]
|
1591
1932
|
#
|
@@ -1627,6 +1968,12 @@ module Google
|
|
1627
1968
|
@delete_target_site = ::Gapic::Config::Method.new delete_target_site_config
|
1628
1969
|
list_target_sites_config = parent_rpcs.list_target_sites if parent_rpcs.respond_to? :list_target_sites
|
1629
1970
|
@list_target_sites = ::Gapic::Config::Method.new list_target_sites_config
|
1971
|
+
create_sitemap_config = parent_rpcs.create_sitemap if parent_rpcs.respond_to? :create_sitemap
|
1972
|
+
@create_sitemap = ::Gapic::Config::Method.new create_sitemap_config
|
1973
|
+
delete_sitemap_config = parent_rpcs.delete_sitemap if parent_rpcs.respond_to? :delete_sitemap
|
1974
|
+
@delete_sitemap = ::Gapic::Config::Method.new delete_sitemap_config
|
1975
|
+
fetch_sitemaps_config = parent_rpcs.fetch_sitemaps if parent_rpcs.respond_to? :fetch_sitemaps
|
1976
|
+
@fetch_sitemaps = ::Gapic::Config::Method.new fetch_sitemaps_config
|
1630
1977
|
enable_advanced_site_search_config = parent_rpcs.enable_advanced_site_search if parent_rpcs.respond_to? :enable_advanced_site_search
|
1631
1978
|
@enable_advanced_site_search = ::Gapic::Config::Method.new enable_advanced_site_search_config
|
1632
1979
|
disable_advanced_site_search_config = parent_rpcs.disable_advanced_site_search if parent_rpcs.respond_to? :disable_advanced_site_search
|
@@ -124,14 +124,6 @@ module Google
|
|
124
124
|
# Lists operations that match the specified filter in the request. If the
|
125
125
|
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
126
126
|
#
|
127
|
-
# NOTE: the `name` binding allows API services to override the binding
|
128
|
-
# to use different resource name schemes, such as `users/*/operations`. To
|
129
|
-
# override the binding, API services can add a binding such as
|
130
|
-
# `"/v1/{name=users/*}/operations"` to their service configuration.
|
131
|
-
# For backwards compatibility, the default name includes the operations
|
132
|
-
# collection id, however overriding users must ensure the name binding
|
133
|
-
# is the parent resource, without the operations collection id.
|
134
|
-
#
|
135
127
|
# @overload list_operations(request, options = nil)
|
136
128
|
# Pass arguments to `list_operations` via a request object, either of type
|
137
129
|
# {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash.
|
@@ -221,7 +213,7 @@ module Google
|
|
221
213
|
wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
|
222
214
|
response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
|
223
215
|
yield response, operation if block_given?
|
224
|
-
|
216
|
+
throw :response, response
|
225
217
|
end
|
226
218
|
rescue ::GRPC::BadStatus => e
|
227
219
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -317,7 +309,7 @@ module Google
|
|
317
309
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
318
310
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
319
311
|
yield response, operation if block_given?
|
320
|
-
|
312
|
+
throw :response, response
|
321
313
|
end
|
322
314
|
rescue ::GRPC::BadStatus => e
|
323
315
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -406,7 +398,6 @@ module Google
|
|
406
398
|
|
407
399
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
408
400
|
yield response, operation if block_given?
|
409
|
-
return response
|
410
401
|
end
|
411
402
|
rescue ::GRPC::BadStatus => e
|
412
403
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -421,8 +412,9 @@ module Google
|
|
421
412
|
# other methods to check whether the cancellation succeeded or whether the
|
422
413
|
# operation completed despite cancellation. On successful cancellation,
|
423
414
|
# the operation is not deleted; instead, it becomes an operation with
|
424
|
-
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
425
|
-
# corresponding to
|
415
|
+
# an {::Google::Longrunning::Operation#error Operation.error} value with a
|
416
|
+
# {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to
|
417
|
+
# `Code.CANCELLED`.
|
426
418
|
#
|
427
419
|
# @overload cancel_operation(request, options = nil)
|
428
420
|
# Pass arguments to `cancel_operation` via a request object, either of type
|
@@ -501,7 +493,6 @@ module Google
|
|
501
493
|
|
502
494
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
503
495
|
yield response, operation if block_given?
|
504
|
-
return response
|
505
496
|
end
|
506
497
|
rescue ::GRPC::BadStatus => e
|
507
498
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -599,7 +590,7 @@ module Google
|
|
599
590
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
600
591
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
601
592
|
yield response, operation if block_given?
|
602
|
-
|
593
|
+
throw :response, response
|
603
594
|
end
|
604
595
|
rescue ::GRPC::BadStatus => e
|
605
596
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -688,6 +679,11 @@ module Google
|
|
688
679
|
# default endpoint URL. The default value of nil uses the environment
|
689
680
|
# universe (usually the default "googleapis.com" universe).
|
690
681
|
# @return [::String,nil]
|
682
|
+
# @!attribute [rw] logger
|
683
|
+
# A custom logger to use for request/response debug logging, or the value
|
684
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
685
|
+
# explicitly disable logging.
|
686
|
+
# @return [::Logger,:default,nil]
|
691
687
|
#
|
692
688
|
class Configuration
|
693
689
|
extend ::Gapic::Config
|
@@ -712,6 +708,7 @@ module Google
|
|
712
708
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
713
709
|
config_attr :quota_project, nil, ::String, nil
|
714
710
|
config_attr :universe_domain, nil, ::String, nil
|
711
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
715
712
|
|
716
713
|
# @private
|
717
714
|
def initialize parent_config = nil
|
@@ -69,6 +69,55 @@ module Google
|
|
69
69
|
resource.call(**args)
|
70
70
|
end
|
71
71
|
|
72
|
+
##
|
73
|
+
# Create a fully-qualified Sitemap resource string.
|
74
|
+
#
|
75
|
+
# @overload sitemap_path(project:, location:, data_store:, sitemap:)
|
76
|
+
# The resource will be in the following format:
|
77
|
+
#
|
78
|
+
# `projects/{project}/locations/{location}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}`
|
79
|
+
#
|
80
|
+
# @param project [String]
|
81
|
+
# @param location [String]
|
82
|
+
# @param data_store [String]
|
83
|
+
# @param sitemap [String]
|
84
|
+
#
|
85
|
+
# @overload sitemap_path(project:, location:, collection:, data_store:, sitemap:)
|
86
|
+
# The resource will be in the following format:
|
87
|
+
#
|
88
|
+
# `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}`
|
89
|
+
#
|
90
|
+
# @param project [String]
|
91
|
+
# @param location [String]
|
92
|
+
# @param collection [String]
|
93
|
+
# @param data_store [String]
|
94
|
+
# @param sitemap [String]
|
95
|
+
#
|
96
|
+
# @return [::String]
|
97
|
+
def sitemap_path **args
|
98
|
+
resources = {
|
99
|
+
"data_store:location:project:sitemap" => (proc do |project:, location:, data_store:, sitemap:|
|
100
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
101
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
102
|
+
raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/"
|
103
|
+
|
104
|
+
"projects/#{project}/locations/#{location}/dataStores/#{data_store}/siteSearchEngine/sitemaps/#{sitemap}"
|
105
|
+
end),
|
106
|
+
"collection:data_store:location:project:sitemap" => (proc do |project:, location:, collection:, data_store:, sitemap:|
|
107
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
108
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
109
|
+
raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/"
|
110
|
+
raise ::ArgumentError, "data_store cannot contain /" if data_store.to_s.include? "/"
|
111
|
+
|
112
|
+
"projects/#{project}/locations/#{location}/collections/#{collection}/dataStores/#{data_store}/siteSearchEngine/sitemaps/#{sitemap}"
|
113
|
+
end)
|
114
|
+
}
|
115
|
+
|
116
|
+
resource = resources[args.keys.sort.join(":")]
|
117
|
+
raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil?
|
118
|
+
resource.call(**args)
|
119
|
+
end
|
120
|
+
|
72
121
|
##
|
73
122
|
# Create a fully-qualified TargetSite resource string.
|
74
123
|
#
|