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
@@ -158,14 +158,26 @@ module Google
|
|
158
158
|
endpoint: @config.endpoint,
|
159
159
|
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
160
160
|
universe_domain: @config.universe_domain,
|
161
|
-
credentials: credentials
|
161
|
+
credentials: credentials,
|
162
|
+
logger: @config.logger
|
162
163
|
)
|
163
164
|
|
165
|
+
@site_search_engine_service_stub.logger(stub: true)&.info do |entry|
|
166
|
+
entry.set_system_name
|
167
|
+
entry.set_service
|
168
|
+
entry.message = "Created client for #{entry.service}"
|
169
|
+
entry.set_credentials_fields credentials
|
170
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
171
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
172
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
173
|
+
end
|
174
|
+
|
164
175
|
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
165
176
|
config.credentials = credentials
|
166
177
|
config.quota_project = @quota_project_id
|
167
178
|
config.endpoint = @site_search_engine_service_stub.endpoint
|
168
179
|
config.universe_domain = @site_search_engine_service_stub.universe_domain
|
180
|
+
config.logger = @site_search_engine_service_stub.logger if config.respond_to? :logger=
|
169
181
|
end
|
170
182
|
end
|
171
183
|
|
@@ -183,6 +195,15 @@ module Google
|
|
183
195
|
#
|
184
196
|
attr_reader :location_client
|
185
197
|
|
198
|
+
##
|
199
|
+
# The logger used for request/response debug logging.
|
200
|
+
#
|
201
|
+
# @return [Logger]
|
202
|
+
#
|
203
|
+
def logger
|
204
|
+
@site_search_engine_service_stub.logger
|
205
|
+
end
|
206
|
+
|
186
207
|
# Service calls
|
187
208
|
|
188
209
|
##
|
@@ -266,7 +287,6 @@ module Google
|
|
266
287
|
|
267
288
|
@site_search_engine_service_stub.get_site_search_engine request, options do |result, operation|
|
268
289
|
yield result, operation if block_given?
|
269
|
-
return result
|
270
290
|
end
|
271
291
|
rescue ::Gapic::Rest::Error => e
|
272
292
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -358,7 +378,7 @@ module Google
|
|
358
378
|
@site_search_engine_service_stub.create_target_site request, options do |result, operation|
|
359
379
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
360
380
|
yield result, operation if block_given?
|
361
|
-
|
381
|
+
throw :response, result
|
362
382
|
end
|
363
383
|
rescue ::Gapic::Rest::Error => e
|
364
384
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -452,7 +472,7 @@ module Google
|
|
452
472
|
@site_search_engine_service_stub.batch_create_target_sites request, options do |result, operation|
|
453
473
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
454
474
|
yield result, operation if block_given?
|
455
|
-
|
475
|
+
throw :response, result
|
456
476
|
end
|
457
477
|
rescue ::Gapic::Rest::Error => e
|
458
478
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -541,7 +561,6 @@ module Google
|
|
541
561
|
|
542
562
|
@site_search_engine_service_stub.get_target_site request, options do |result, operation|
|
543
563
|
yield result, operation if block_given?
|
544
|
-
return result
|
545
564
|
end
|
546
565
|
rescue ::Gapic::Rest::Error => e
|
547
566
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -634,7 +653,7 @@ module Google
|
|
634
653
|
@site_search_engine_service_stub.update_target_site request, options do |result, operation|
|
635
654
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
636
655
|
yield result, operation if block_given?
|
637
|
-
|
656
|
+
throw :response, result
|
638
657
|
end
|
639
658
|
rescue ::Gapic::Rest::Error => e
|
640
659
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -731,7 +750,7 @@ module Google
|
|
731
750
|
@site_search_engine_service_stub.delete_target_site request, options do |result, operation|
|
732
751
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
733
752
|
yield result, operation if block_given?
|
734
|
-
|
753
|
+
throw :response, result
|
735
754
|
end
|
736
755
|
rescue ::Gapic::Rest::Error => e
|
737
756
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -834,7 +853,283 @@ module Google
|
|
834
853
|
@site_search_engine_service_stub.list_target_sites request, options do |result, operation|
|
835
854
|
result = ::Gapic::Rest::PagedEnumerable.new @site_search_engine_service_stub, :list_target_sites, "target_sites", request, result, options
|
836
855
|
yield result, operation if block_given?
|
837
|
-
|
856
|
+
throw :response, result
|
857
|
+
end
|
858
|
+
rescue ::Gapic::Rest::Error => e
|
859
|
+
raise ::Google::Cloud::Error.from_error(e)
|
860
|
+
end
|
861
|
+
|
862
|
+
##
|
863
|
+
# Creates a {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap}.
|
864
|
+
#
|
865
|
+
# @overload create_sitemap(request, options = nil)
|
866
|
+
# Pass arguments to `create_sitemap` via a request object, either of type
|
867
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::CreateSitemapRequest} or an equivalent Hash.
|
868
|
+
#
|
869
|
+
# @param request [::Google::Cloud::DiscoveryEngine::V1beta::CreateSitemapRequest, ::Hash]
|
870
|
+
# A request object representing the call parameters. Required. To specify no
|
871
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
872
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
873
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
874
|
+
#
|
875
|
+
# @overload create_sitemap(parent: nil, sitemap: nil)
|
876
|
+
# Pass arguments to `create_sitemap` via keyword arguments. Note that at
|
877
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
878
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
879
|
+
#
|
880
|
+
# @param parent [::String]
|
881
|
+
# Required. Parent resource name of the
|
882
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngine SiteSearchEngine},
|
883
|
+
# such as
|
884
|
+
# `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.
|
885
|
+
# @param sitemap [::Google::Cloud::DiscoveryEngine::V1beta::Sitemap, ::Hash]
|
886
|
+
# Required. The {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap} to
|
887
|
+
# create.
|
888
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
889
|
+
# @yieldparam result [::Gapic::Operation]
|
890
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
891
|
+
#
|
892
|
+
# @return [::Gapic::Operation]
|
893
|
+
#
|
894
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
895
|
+
#
|
896
|
+
# @example Basic example
|
897
|
+
# require "google/cloud/discovery_engine/v1beta"
|
898
|
+
#
|
899
|
+
# # Create a client object. The client can be reused for multiple calls.
|
900
|
+
# client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new
|
901
|
+
#
|
902
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
903
|
+
# request = Google::Cloud::DiscoveryEngine::V1beta::CreateSitemapRequest.new
|
904
|
+
#
|
905
|
+
# # Call the create_sitemap method.
|
906
|
+
# result = client.create_sitemap request
|
907
|
+
#
|
908
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
909
|
+
# # check the status of an operation, cancel it, or wait for results.
|
910
|
+
# # Here is how to wait for a response.
|
911
|
+
# result.wait_until_done! timeout: 60
|
912
|
+
# if result.response?
|
913
|
+
# p result.response
|
914
|
+
# else
|
915
|
+
# puts "No response received."
|
916
|
+
# end
|
917
|
+
#
|
918
|
+
def create_sitemap request, options = nil
|
919
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
920
|
+
|
921
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::CreateSitemapRequest
|
922
|
+
|
923
|
+
# Converts hash and nil to an options object
|
924
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
925
|
+
|
926
|
+
# Customize the options with defaults
|
927
|
+
call_metadata = @config.rpcs.create_sitemap.metadata.to_h
|
928
|
+
|
929
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
930
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
931
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
932
|
+
gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
|
933
|
+
transports_version_send: [:rest]
|
934
|
+
|
935
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
936
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
937
|
+
|
938
|
+
options.apply_defaults timeout: @config.rpcs.create_sitemap.timeout,
|
939
|
+
metadata: call_metadata,
|
940
|
+
retry_policy: @config.rpcs.create_sitemap.retry_policy
|
941
|
+
|
942
|
+
options.apply_defaults timeout: @config.timeout,
|
943
|
+
metadata: @config.metadata,
|
944
|
+
retry_policy: @config.retry_policy
|
945
|
+
|
946
|
+
@site_search_engine_service_stub.create_sitemap request, options do |result, operation|
|
947
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
948
|
+
yield result, operation if block_given?
|
949
|
+
throw :response, result
|
950
|
+
end
|
951
|
+
rescue ::Gapic::Rest::Error => e
|
952
|
+
raise ::Google::Cloud::Error.from_error(e)
|
953
|
+
end
|
954
|
+
|
955
|
+
##
|
956
|
+
# Deletes a {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap}.
|
957
|
+
#
|
958
|
+
# @overload delete_sitemap(request, options = nil)
|
959
|
+
# Pass arguments to `delete_sitemap` via a request object, either of type
|
960
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::DeleteSitemapRequest} or an equivalent Hash.
|
961
|
+
#
|
962
|
+
# @param request [::Google::Cloud::DiscoveryEngine::V1beta::DeleteSitemapRequest, ::Hash]
|
963
|
+
# A request object representing the call parameters. Required. To specify no
|
964
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
965
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
966
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
967
|
+
#
|
968
|
+
# @overload delete_sitemap(name: nil)
|
969
|
+
# Pass arguments to `delete_sitemap` via keyword arguments. Note that at
|
970
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
971
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
972
|
+
#
|
973
|
+
# @param name [::String]
|
974
|
+
# Required. Full resource name of
|
975
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap}, such as
|
976
|
+
# `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}`.
|
977
|
+
#
|
978
|
+
# If the caller does not have permission to access the
|
979
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap}, regardless of
|
980
|
+
# whether or not it exists, a PERMISSION_DENIED error is returned.
|
981
|
+
#
|
982
|
+
# If the requested {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap}
|
983
|
+
# does not exist, a NOT_FOUND error is returned.
|
984
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
985
|
+
# @yieldparam result [::Gapic::Operation]
|
986
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
987
|
+
#
|
988
|
+
# @return [::Gapic::Operation]
|
989
|
+
#
|
990
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
991
|
+
#
|
992
|
+
# @example Basic example
|
993
|
+
# require "google/cloud/discovery_engine/v1beta"
|
994
|
+
#
|
995
|
+
# # Create a client object. The client can be reused for multiple calls.
|
996
|
+
# client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new
|
997
|
+
#
|
998
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
999
|
+
# request = Google::Cloud::DiscoveryEngine::V1beta::DeleteSitemapRequest.new
|
1000
|
+
#
|
1001
|
+
# # Call the delete_sitemap method.
|
1002
|
+
# result = client.delete_sitemap request
|
1003
|
+
#
|
1004
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1005
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1006
|
+
# # Here is how to wait for a response.
|
1007
|
+
# result.wait_until_done! timeout: 60
|
1008
|
+
# if result.response?
|
1009
|
+
# p result.response
|
1010
|
+
# else
|
1011
|
+
# puts "No response received."
|
1012
|
+
# end
|
1013
|
+
#
|
1014
|
+
def delete_sitemap request, options = nil
|
1015
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1016
|
+
|
1017
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::DeleteSitemapRequest
|
1018
|
+
|
1019
|
+
# Converts hash and nil to an options object
|
1020
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1021
|
+
|
1022
|
+
# Customize the options with defaults
|
1023
|
+
call_metadata = @config.rpcs.delete_sitemap.metadata.to_h
|
1024
|
+
|
1025
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1026
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1027
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1028
|
+
gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
|
1029
|
+
transports_version_send: [:rest]
|
1030
|
+
|
1031
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1032
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1033
|
+
|
1034
|
+
options.apply_defaults timeout: @config.rpcs.delete_sitemap.timeout,
|
1035
|
+
metadata: call_metadata,
|
1036
|
+
retry_policy: @config.rpcs.delete_sitemap.retry_policy
|
1037
|
+
|
1038
|
+
options.apply_defaults timeout: @config.timeout,
|
1039
|
+
metadata: @config.metadata,
|
1040
|
+
retry_policy: @config.retry_policy
|
1041
|
+
|
1042
|
+
@site_search_engine_service_stub.delete_sitemap request, options do |result, operation|
|
1043
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1044
|
+
yield result, operation if block_given?
|
1045
|
+
throw :response, result
|
1046
|
+
end
|
1047
|
+
rescue ::Gapic::Rest::Error => e
|
1048
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1049
|
+
end
|
1050
|
+
|
1051
|
+
##
|
1052
|
+
# Fetch {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap}s in a
|
1053
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}.
|
1054
|
+
#
|
1055
|
+
# @overload fetch_sitemaps(request, options = nil)
|
1056
|
+
# Pass arguments to `fetch_sitemaps` via a request object, either of type
|
1057
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::FetchSitemapsRequest} or an equivalent Hash.
|
1058
|
+
#
|
1059
|
+
# @param request [::Google::Cloud::DiscoveryEngine::V1beta::FetchSitemapsRequest, ::Hash]
|
1060
|
+
# A request object representing the call parameters. Required. To specify no
|
1061
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1062
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1063
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1064
|
+
#
|
1065
|
+
# @overload fetch_sitemaps(parent: nil, matcher: nil)
|
1066
|
+
# Pass arguments to `fetch_sitemaps` via keyword arguments. Note that at
|
1067
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1068
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1069
|
+
#
|
1070
|
+
# @param parent [::String]
|
1071
|
+
# Required. Parent resource name of the
|
1072
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngine SiteSearchEngine},
|
1073
|
+
# such as
|
1074
|
+
# `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.
|
1075
|
+
# @param matcher [::Google::Cloud::DiscoveryEngine::V1beta::FetchSitemapsRequest::Matcher, ::Hash]
|
1076
|
+
# Optional. If specified, fetches the matching
|
1077
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap}s. If not specified,
|
1078
|
+
# fetches all {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap}s in the
|
1079
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}.
|
1080
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1081
|
+
# @yieldparam result [::Google::Cloud::DiscoveryEngine::V1beta::FetchSitemapsResponse]
|
1082
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1083
|
+
#
|
1084
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::FetchSitemapsResponse]
|
1085
|
+
#
|
1086
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1087
|
+
#
|
1088
|
+
# @example Basic example
|
1089
|
+
# require "google/cloud/discovery_engine/v1beta"
|
1090
|
+
#
|
1091
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1092
|
+
# client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new
|
1093
|
+
#
|
1094
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1095
|
+
# request = Google::Cloud::DiscoveryEngine::V1beta::FetchSitemapsRequest.new
|
1096
|
+
#
|
1097
|
+
# # Call the fetch_sitemaps method.
|
1098
|
+
# result = client.fetch_sitemaps request
|
1099
|
+
#
|
1100
|
+
# # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::FetchSitemapsResponse.
|
1101
|
+
# p result
|
1102
|
+
#
|
1103
|
+
def fetch_sitemaps request, options = nil
|
1104
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1105
|
+
|
1106
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::FetchSitemapsRequest
|
1107
|
+
|
1108
|
+
# Converts hash and nil to an options object
|
1109
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1110
|
+
|
1111
|
+
# Customize the options with defaults
|
1112
|
+
call_metadata = @config.rpcs.fetch_sitemaps.metadata.to_h
|
1113
|
+
|
1114
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1115
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1116
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1117
|
+
gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
|
1118
|
+
transports_version_send: [:rest]
|
1119
|
+
|
1120
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1121
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1122
|
+
|
1123
|
+
options.apply_defaults timeout: @config.rpcs.fetch_sitemaps.timeout,
|
1124
|
+
metadata: call_metadata,
|
1125
|
+
retry_policy: @config.rpcs.fetch_sitemaps.retry_policy
|
1126
|
+
|
1127
|
+
options.apply_defaults timeout: @config.timeout,
|
1128
|
+
metadata: @config.metadata,
|
1129
|
+
retry_policy: @config.retry_policy
|
1130
|
+
|
1131
|
+
@site_search_engine_service_stub.fetch_sitemaps request, options do |result, operation|
|
1132
|
+
yield result, operation if block_given?
|
838
1133
|
end
|
839
1134
|
rescue ::Gapic::Rest::Error => e
|
840
1135
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -924,7 +1219,7 @@ module Google
|
|
924
1219
|
@site_search_engine_service_stub.enable_advanced_site_search request, options do |result, operation|
|
925
1220
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
926
1221
|
yield result, operation if block_given?
|
927
|
-
|
1222
|
+
throw :response, result
|
928
1223
|
end
|
929
1224
|
rescue ::Gapic::Rest::Error => e
|
930
1225
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1014,7 +1309,7 @@ module Google
|
|
1014
1309
|
@site_search_engine_service_stub.disable_advanced_site_search request, options do |result, operation|
|
1015
1310
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1016
1311
|
yield result, operation if block_given?
|
1017
|
-
|
1312
|
+
throw :response, result
|
1018
1313
|
end
|
1019
1314
|
rescue ::Gapic::Rest::Error => e
|
1020
1315
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1033,7 +1328,7 @@ module Google
|
|
1033
1328
|
# @param options [::Gapic::CallOptions, ::Hash]
|
1034
1329
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1035
1330
|
#
|
1036
|
-
# @overload recrawl_uris(site_search_engine: nil, uris: nil)
|
1331
|
+
# @overload recrawl_uris(site_search_engine: nil, uris: nil, site_credential: nil)
|
1037
1332
|
# Pass arguments to `recrawl_uris` via keyword arguments. Note that at
|
1038
1333
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
1039
1334
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -1048,6 +1343,10 @@ module Google
|
|
1048
1343
|
# an INVALID_ARGUMENT error is thrown. Each URI should match at least one
|
1049
1344
|
# {::Google::Cloud::DiscoveryEngine::V1beta::TargetSite TargetSite} in
|
1050
1345
|
# `site_search_engine`.
|
1346
|
+
# @param site_credential [::String]
|
1347
|
+
# Optional. Full resource name of the [SiteCredential][], such as
|
1348
|
+
# `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCredentials/*`.
|
1349
|
+
# Only set to crawl private URIs.
|
1051
1350
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1052
1351
|
# @yieldparam result [::Gapic::Operation]
|
1053
1352
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1109,7 +1408,7 @@ module Google
|
|
1109
1408
|
@site_search_engine_service_stub.recrawl_uris request, options do |result, operation|
|
1110
1409
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1111
1410
|
yield result, operation if block_given?
|
1112
|
-
|
1411
|
+
throw :response, result
|
1113
1412
|
end
|
1114
1413
|
rescue ::Gapic::Rest::Error => e
|
1115
1414
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1199,7 +1498,7 @@ module Google
|
|
1199
1498
|
@site_search_engine_service_stub.batch_verify_target_sites request, options do |result, operation|
|
1200
1499
|
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1201
1500
|
yield result, operation if block_given?
|
1202
|
-
|
1501
|
+
throw :response, result
|
1203
1502
|
end
|
1204
1503
|
rescue ::Gapic::Rest::Error => e
|
1205
1504
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1300,7 +1599,7 @@ module Google
|
|
1300
1599
|
@site_search_engine_service_stub.fetch_domain_verification_status request, options do |result, operation|
|
1301
1600
|
result = ::Gapic::Rest::PagedEnumerable.new @site_search_engine_service_stub, :fetch_domain_verification_status, "target_sites", request, result, options
|
1302
1601
|
yield result, operation if block_given?
|
1303
|
-
|
1602
|
+
throw :response, result
|
1304
1603
|
end
|
1305
1604
|
rescue ::Gapic::Rest::Error => e
|
1306
1605
|
raise ::Google::Cloud::Error.from_error(e)
|
@@ -1380,6 +1679,11 @@ module Google
|
|
1380
1679
|
# default endpoint URL. The default value of nil uses the environment
|
1381
1680
|
# universe (usually the default "googleapis.com" universe).
|
1382
1681
|
# @return [::String,nil]
|
1682
|
+
# @!attribute [rw] logger
|
1683
|
+
# A custom logger to use for request/response debug logging, or the value
|
1684
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
1685
|
+
# explicitly disable logging.
|
1686
|
+
# @return [::Logger,:default,nil]
|
1383
1687
|
#
|
1384
1688
|
class Configuration
|
1385
1689
|
extend ::Gapic::Config
|
@@ -1401,6 +1705,7 @@ module Google
|
|
1401
1705
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1402
1706
|
config_attr :quota_project, nil, ::String, nil
|
1403
1707
|
config_attr :universe_domain, nil, ::String, nil
|
1708
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
1404
1709
|
|
1405
1710
|
# @private
|
1406
1711
|
def initialize parent_config = nil
|
@@ -1475,6 +1780,21 @@ module Google
|
|
1475
1780
|
#
|
1476
1781
|
attr_reader :list_target_sites
|
1477
1782
|
##
|
1783
|
+
# RPC-specific configuration for `create_sitemap`
|
1784
|
+
# @return [::Gapic::Config::Method]
|
1785
|
+
#
|
1786
|
+
attr_reader :create_sitemap
|
1787
|
+
##
|
1788
|
+
# RPC-specific configuration for `delete_sitemap`
|
1789
|
+
# @return [::Gapic::Config::Method]
|
1790
|
+
#
|
1791
|
+
attr_reader :delete_sitemap
|
1792
|
+
##
|
1793
|
+
# RPC-specific configuration for `fetch_sitemaps`
|
1794
|
+
# @return [::Gapic::Config::Method]
|
1795
|
+
#
|
1796
|
+
attr_reader :fetch_sitemaps
|
1797
|
+
##
|
1478
1798
|
# RPC-specific configuration for `enable_advanced_site_search`
|
1479
1799
|
# @return [::Gapic::Config::Method]
|
1480
1800
|
#
|
@@ -1516,6 +1836,12 @@ module Google
|
|
1516
1836
|
@delete_target_site = ::Gapic::Config::Method.new delete_target_site_config
|
1517
1837
|
list_target_sites_config = parent_rpcs.list_target_sites if parent_rpcs.respond_to? :list_target_sites
|
1518
1838
|
@list_target_sites = ::Gapic::Config::Method.new list_target_sites_config
|
1839
|
+
create_sitemap_config = parent_rpcs.create_sitemap if parent_rpcs.respond_to? :create_sitemap
|
1840
|
+
@create_sitemap = ::Gapic::Config::Method.new create_sitemap_config
|
1841
|
+
delete_sitemap_config = parent_rpcs.delete_sitemap if parent_rpcs.respond_to? :delete_sitemap
|
1842
|
+
@delete_sitemap = ::Gapic::Config::Method.new delete_sitemap_config
|
1843
|
+
fetch_sitemaps_config = parent_rpcs.fetch_sitemaps if parent_rpcs.respond_to? :fetch_sitemaps
|
1844
|
+
@fetch_sitemaps = ::Gapic::Config::Method.new fetch_sitemaps_config
|
1519
1845
|
enable_advanced_site_search_config = parent_rpcs.enable_advanced_site_search if parent_rpcs.respond_to? :enable_advanced_site_search
|
1520
1846
|
@enable_advanced_site_search = ::Gapic::Config::Method.new enable_advanced_site_search_config
|
1521
1847
|
disable_advanced_site_search_config = parent_rpcs.disable_advanced_site_search if parent_rpcs.respond_to? :disable_advanced_site_search
|