google-cloud-discovery_engine-v1 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +186 -4
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +181 -4
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/service_stub.rb +72 -0
- data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +8 -2
- data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +8 -2
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/client.rb +1 -3
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/client.rb +1 -3
- data/lib/google/cloud/discovery_engine/v1/rank_service/client.rb +1 -1
- data/lib/google/cloud/discovery_engine/v1/rank_service/rest/client.rb +1 -1
- data/lib/google/cloud/discovery_engine/v1/recommendation_service/client.rb +3 -3
- data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/client.rb +3 -3
- data/lib/google/cloud/discovery_engine/v1/rest.rb +1 -0
- data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +44 -12
- data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +44 -12
- data/lib/google/cloud/discovery_engine/v1/serving_config_service/client.rb +484 -0
- data/lib/google/cloud/discovery_engine/v1/serving_config_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/serving_config_service/paths.rb +101 -0
- data/lib/google/cloud/discovery_engine/v1/serving_config_service/rest/client.rb +451 -0
- data/lib/google/cloud/discovery_engine/v1/serving_config_service/rest/service_stub.rb +159 -0
- data/lib/google/cloud/discovery_engine/v1/serving_config_service/rest.rb +53 -0
- data/lib/google/cloud/discovery_engine/v1/serving_config_service.rb +56 -0
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb +316 -3
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/paths.rb +49 -0
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb +295 -3
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/service_stub.rb +206 -0
- data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +21 -9
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +21 -9
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/service_stub.rb +8 -0
- data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
- data/lib/google/cloud/discovery_engine/v1.rb +1 -0
- data/lib/google/cloud/discoveryengine/v1/answer_pb.rb +4 -1
- data/lib/google/cloud/discoveryengine/v1/common_pb.rb +4 -1
- data/lib/google/cloud/discoveryengine/v1/control_pb.rb +7 -1
- data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +12 -1
- data/lib/google/cloud/discoveryengine/v1/conversational_search_service_services_pb.rb +8 -0
- data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1/document_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/engine_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb +6 -1
- data/lib/google/cloud/discoveryengine/v1/import_config_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/safety_pb.rb +47 -0
- data/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +5 -1
- data/lib/google/cloud/discoveryengine/v1/serving_config_pb.rb +52 -0
- data/lib/google/cloud/discoveryengine/v1/serving_config_service_pb.rb +51 -0
- data/lib/google/cloud/discoveryengine/v1/serving_config_service_services_pb.rb +48 -0
- data/lib/google/cloud/discoveryengine/v1/session_pb.rb +3 -1
- data/lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1/site_search_engine_service_pb.rb +10 -1
- data/lib/google/cloud/discoveryengine/v1/site_search_engine_service_services_pb.rb +7 -0
- data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/user_event_service_pb.rb +1 -1
- data/proto_docs/google/api/client.rb +6 -0
- data/proto_docs/google/cloud/discoveryengine/v1/answer.rb +53 -2
- data/proto_docs/google/cloud/discoveryengine/v1/chunk.rb +2 -1
- data/proto_docs/google/cloud/discoveryengine/v1/common.rb +40 -0
- data/proto_docs/google/cloud/discoveryengine/v1/control.rb +122 -7
- data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +159 -2
- data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +25 -4
- data/proto_docs/google/cloud/discoveryengine/v1/document.rb +7 -2
- data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +1 -1
- data/proto_docs/google/cloud/discoveryengine/v1/engine.rb +16 -3
- data/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb +90 -12
- data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +19 -1
- data/proto_docs/google/cloud/discoveryengine/v1/purge_config.rb +9 -5
- data/proto_docs/google/cloud/discoveryengine/v1/rank_service.rb +3 -1
- data/proto_docs/google/cloud/discoveryengine/v1/recommendation_service.rb +3 -3
- data/proto_docs/google/cloud/discoveryengine/v1/safety.rb +108 -0
- data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +109 -8
- data/proto_docs/google/cloud/discoveryengine/v1/serving_config.rb +261 -0
- data/proto_docs/google/cloud/discoveryengine/v1/serving_config_service.rb +44 -0
- data/proto_docs/google/cloud/discoveryengine/v1/session.rb +18 -0
- data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine.rb +19 -2
- data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine_service.rb +146 -4
- data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +34 -0
- data/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb +12 -4
- metadata +17 -3
@@ -856,6 +856,279 @@ module Google
|
|
856
856
|
raise ::Google::Cloud::Error.from_error(e)
|
857
857
|
end
|
858
858
|
|
859
|
+
##
|
860
|
+
# Creates a {::Google::Cloud::DiscoveryEngine::V1::Sitemap Sitemap}.
|
861
|
+
#
|
862
|
+
# @overload create_sitemap(request, options = nil)
|
863
|
+
# Pass arguments to `create_sitemap` via a request object, either of type
|
864
|
+
# {::Google::Cloud::DiscoveryEngine::V1::CreateSitemapRequest} or an equivalent Hash.
|
865
|
+
#
|
866
|
+
# @param request [::Google::Cloud::DiscoveryEngine::V1::CreateSitemapRequest, ::Hash]
|
867
|
+
# A request object representing the call parameters. Required. To specify no
|
868
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
869
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
870
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
871
|
+
#
|
872
|
+
# @overload create_sitemap(parent: nil, sitemap: nil)
|
873
|
+
# Pass arguments to `create_sitemap` via keyword arguments. Note that at
|
874
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
875
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
876
|
+
#
|
877
|
+
# @param parent [::String]
|
878
|
+
# Required. Parent resource name of the
|
879
|
+
# {::Google::Cloud::DiscoveryEngine::V1::SiteSearchEngine SiteSearchEngine}, such
|
880
|
+
# as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.
|
881
|
+
# @param sitemap [::Google::Cloud::DiscoveryEngine::V1::Sitemap, ::Hash]
|
882
|
+
# Required. The {::Google::Cloud::DiscoveryEngine::V1::Sitemap Sitemap} to create.
|
883
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
884
|
+
# @yieldparam result [::Gapic::Operation]
|
885
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
886
|
+
#
|
887
|
+
# @return [::Gapic::Operation]
|
888
|
+
#
|
889
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
890
|
+
#
|
891
|
+
# @example Basic example
|
892
|
+
# require "google/cloud/discovery_engine/v1"
|
893
|
+
#
|
894
|
+
# # Create a client object. The client can be reused for multiple calls.
|
895
|
+
# client = Google::Cloud::DiscoveryEngine::V1::SiteSearchEngineService::Rest::Client.new
|
896
|
+
#
|
897
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
898
|
+
# request = Google::Cloud::DiscoveryEngine::V1::CreateSitemapRequest.new
|
899
|
+
#
|
900
|
+
# # Call the create_sitemap method.
|
901
|
+
# result = client.create_sitemap request
|
902
|
+
#
|
903
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
904
|
+
# # check the status of an operation, cancel it, or wait for results.
|
905
|
+
# # Here is how to wait for a response.
|
906
|
+
# result.wait_until_done! timeout: 60
|
907
|
+
# if result.response?
|
908
|
+
# p result.response
|
909
|
+
# else
|
910
|
+
# puts "No response received."
|
911
|
+
# end
|
912
|
+
#
|
913
|
+
def create_sitemap request, options = nil
|
914
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
915
|
+
|
916
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::CreateSitemapRequest
|
917
|
+
|
918
|
+
# Converts hash and nil to an options object
|
919
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
920
|
+
|
921
|
+
# Customize the options with defaults
|
922
|
+
call_metadata = @config.rpcs.create_sitemap.metadata.to_h
|
923
|
+
|
924
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
925
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
926
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
927
|
+
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
|
928
|
+
transports_version_send: [:rest]
|
929
|
+
|
930
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
931
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
932
|
+
|
933
|
+
options.apply_defaults timeout: @config.rpcs.create_sitemap.timeout,
|
934
|
+
metadata: call_metadata,
|
935
|
+
retry_policy: @config.rpcs.create_sitemap.retry_policy
|
936
|
+
|
937
|
+
options.apply_defaults timeout: @config.timeout,
|
938
|
+
metadata: @config.metadata,
|
939
|
+
retry_policy: @config.retry_policy
|
940
|
+
|
941
|
+
@site_search_engine_service_stub.create_sitemap request, options do |result, operation|
|
942
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
943
|
+
yield result, operation if block_given?
|
944
|
+
throw :response, result
|
945
|
+
end
|
946
|
+
rescue ::Gapic::Rest::Error => e
|
947
|
+
raise ::Google::Cloud::Error.from_error(e)
|
948
|
+
end
|
949
|
+
|
950
|
+
##
|
951
|
+
# Deletes a {::Google::Cloud::DiscoveryEngine::V1::Sitemap Sitemap}.
|
952
|
+
#
|
953
|
+
# @overload delete_sitemap(request, options = nil)
|
954
|
+
# Pass arguments to `delete_sitemap` via a request object, either of type
|
955
|
+
# {::Google::Cloud::DiscoveryEngine::V1::DeleteSitemapRequest} or an equivalent Hash.
|
956
|
+
#
|
957
|
+
# @param request [::Google::Cloud::DiscoveryEngine::V1::DeleteSitemapRequest, ::Hash]
|
958
|
+
# A request object representing the call parameters. Required. To specify no
|
959
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
960
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
961
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
962
|
+
#
|
963
|
+
# @overload delete_sitemap(name: nil)
|
964
|
+
# Pass arguments to `delete_sitemap` via keyword arguments. Note that at
|
965
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
966
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
967
|
+
#
|
968
|
+
# @param name [::String]
|
969
|
+
# Required. Full resource name of
|
970
|
+
# {::Google::Cloud::DiscoveryEngine::V1::Sitemap Sitemap}, such as
|
971
|
+
# `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}`.
|
972
|
+
#
|
973
|
+
# If the caller does not have permission to access the
|
974
|
+
# {::Google::Cloud::DiscoveryEngine::V1::Sitemap Sitemap}, regardless of whether
|
975
|
+
# or not it exists, a PERMISSION_DENIED error is returned.
|
976
|
+
#
|
977
|
+
# If the requested {::Google::Cloud::DiscoveryEngine::V1::Sitemap Sitemap} does
|
978
|
+
# not exist, a NOT_FOUND error is returned.
|
979
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
980
|
+
# @yieldparam result [::Gapic::Operation]
|
981
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
982
|
+
#
|
983
|
+
# @return [::Gapic::Operation]
|
984
|
+
#
|
985
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
986
|
+
#
|
987
|
+
# @example Basic example
|
988
|
+
# require "google/cloud/discovery_engine/v1"
|
989
|
+
#
|
990
|
+
# # Create a client object. The client can be reused for multiple calls.
|
991
|
+
# client = Google::Cloud::DiscoveryEngine::V1::SiteSearchEngineService::Rest::Client.new
|
992
|
+
#
|
993
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
994
|
+
# request = Google::Cloud::DiscoveryEngine::V1::DeleteSitemapRequest.new
|
995
|
+
#
|
996
|
+
# # Call the delete_sitemap method.
|
997
|
+
# result = client.delete_sitemap request
|
998
|
+
#
|
999
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1000
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1001
|
+
# # Here is how to wait for a response.
|
1002
|
+
# result.wait_until_done! timeout: 60
|
1003
|
+
# if result.response?
|
1004
|
+
# p result.response
|
1005
|
+
# else
|
1006
|
+
# puts "No response received."
|
1007
|
+
# end
|
1008
|
+
#
|
1009
|
+
def delete_sitemap request, options = nil
|
1010
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1011
|
+
|
1012
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::DeleteSitemapRequest
|
1013
|
+
|
1014
|
+
# Converts hash and nil to an options object
|
1015
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1016
|
+
|
1017
|
+
# Customize the options with defaults
|
1018
|
+
call_metadata = @config.rpcs.delete_sitemap.metadata.to_h
|
1019
|
+
|
1020
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1021
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1022
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1023
|
+
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
|
1024
|
+
transports_version_send: [:rest]
|
1025
|
+
|
1026
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1027
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1028
|
+
|
1029
|
+
options.apply_defaults timeout: @config.rpcs.delete_sitemap.timeout,
|
1030
|
+
metadata: call_metadata,
|
1031
|
+
retry_policy: @config.rpcs.delete_sitemap.retry_policy
|
1032
|
+
|
1033
|
+
options.apply_defaults timeout: @config.timeout,
|
1034
|
+
metadata: @config.metadata,
|
1035
|
+
retry_policy: @config.retry_policy
|
1036
|
+
|
1037
|
+
@site_search_engine_service_stub.delete_sitemap request, options do |result, operation|
|
1038
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1039
|
+
yield result, operation if block_given?
|
1040
|
+
throw :response, result
|
1041
|
+
end
|
1042
|
+
rescue ::Gapic::Rest::Error => e
|
1043
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1044
|
+
end
|
1045
|
+
|
1046
|
+
##
|
1047
|
+
# Fetch {::Google::Cloud::DiscoveryEngine::V1::Sitemap Sitemap}s in a
|
1048
|
+
# {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}.
|
1049
|
+
#
|
1050
|
+
# @overload fetch_sitemaps(request, options = nil)
|
1051
|
+
# Pass arguments to `fetch_sitemaps` via a request object, either of type
|
1052
|
+
# {::Google::Cloud::DiscoveryEngine::V1::FetchSitemapsRequest} or an equivalent Hash.
|
1053
|
+
#
|
1054
|
+
# @param request [::Google::Cloud::DiscoveryEngine::V1::FetchSitemapsRequest, ::Hash]
|
1055
|
+
# A request object representing the call parameters. Required. To specify no
|
1056
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1057
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1058
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1059
|
+
#
|
1060
|
+
# @overload fetch_sitemaps(parent: nil, matcher: nil)
|
1061
|
+
# Pass arguments to `fetch_sitemaps` via keyword arguments. Note that at
|
1062
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1063
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1064
|
+
#
|
1065
|
+
# @param parent [::String]
|
1066
|
+
# Required. Parent resource name of the
|
1067
|
+
# {::Google::Cloud::DiscoveryEngine::V1::SiteSearchEngine SiteSearchEngine}, such
|
1068
|
+
# as `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.
|
1069
|
+
# @param matcher [::Google::Cloud::DiscoveryEngine::V1::FetchSitemapsRequest::Matcher, ::Hash]
|
1070
|
+
# Optional. If specified, fetches the matching
|
1071
|
+
# {::Google::Cloud::DiscoveryEngine::V1::Sitemap Sitemap}s. If not specified,
|
1072
|
+
# fetches all {::Google::Cloud::DiscoveryEngine::V1::Sitemap Sitemap}s in the
|
1073
|
+
# {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}.
|
1074
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1075
|
+
# @yieldparam result [::Google::Cloud::DiscoveryEngine::V1::FetchSitemapsResponse]
|
1076
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1077
|
+
#
|
1078
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::FetchSitemapsResponse]
|
1079
|
+
#
|
1080
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1081
|
+
#
|
1082
|
+
# @example Basic example
|
1083
|
+
# require "google/cloud/discovery_engine/v1"
|
1084
|
+
#
|
1085
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1086
|
+
# client = Google::Cloud::DiscoveryEngine::V1::SiteSearchEngineService::Rest::Client.new
|
1087
|
+
#
|
1088
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1089
|
+
# request = Google::Cloud::DiscoveryEngine::V1::FetchSitemapsRequest.new
|
1090
|
+
#
|
1091
|
+
# # Call the fetch_sitemaps method.
|
1092
|
+
# result = client.fetch_sitemaps request
|
1093
|
+
#
|
1094
|
+
# # The returned object is of type Google::Cloud::DiscoveryEngine::V1::FetchSitemapsResponse.
|
1095
|
+
# p result
|
1096
|
+
#
|
1097
|
+
def fetch_sitemaps request, options = nil
|
1098
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1099
|
+
|
1100
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::FetchSitemapsRequest
|
1101
|
+
|
1102
|
+
# Converts hash and nil to an options object
|
1103
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1104
|
+
|
1105
|
+
# Customize the options with defaults
|
1106
|
+
call_metadata = @config.rpcs.fetch_sitemaps.metadata.to_h
|
1107
|
+
|
1108
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1109
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1110
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1111
|
+
gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION,
|
1112
|
+
transports_version_send: [:rest]
|
1113
|
+
|
1114
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1115
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1116
|
+
|
1117
|
+
options.apply_defaults timeout: @config.rpcs.fetch_sitemaps.timeout,
|
1118
|
+
metadata: call_metadata,
|
1119
|
+
retry_policy: @config.rpcs.fetch_sitemaps.retry_policy
|
1120
|
+
|
1121
|
+
options.apply_defaults timeout: @config.timeout,
|
1122
|
+
metadata: @config.metadata,
|
1123
|
+
retry_policy: @config.retry_policy
|
1124
|
+
|
1125
|
+
@site_search_engine_service_stub.fetch_sitemaps request, options do |result, operation|
|
1126
|
+
yield result, operation if block_given?
|
1127
|
+
end
|
1128
|
+
rescue ::Gapic::Rest::Error => e
|
1129
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1130
|
+
end
|
1131
|
+
|
859
1132
|
##
|
860
1133
|
# Upgrade from basic site search to advanced site search.
|
861
1134
|
#
|
@@ -1064,9 +1337,7 @@ module Google
|
|
1064
1337
|
# {::Google::Cloud::DiscoveryEngine::V1::TargetSite TargetSite} in
|
1065
1338
|
# `site_search_engine`.
|
1066
1339
|
# @param site_credential [::String]
|
1067
|
-
# Optional.
|
1068
|
-
# `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCredentials/*`.
|
1069
|
-
# Only set to crawl private URIs.
|
1340
|
+
# Optional. Credential id to use for crawling.
|
1070
1341
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
1071
1342
|
# @yieldparam result [::Gapic::Operation]
|
1072
1343
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -1507,6 +1778,21 @@ module Google
|
|
1507
1778
|
#
|
1508
1779
|
attr_reader :list_target_sites
|
1509
1780
|
##
|
1781
|
+
# RPC-specific configuration for `create_sitemap`
|
1782
|
+
# @return [::Gapic::Config::Method]
|
1783
|
+
#
|
1784
|
+
attr_reader :create_sitemap
|
1785
|
+
##
|
1786
|
+
# RPC-specific configuration for `delete_sitemap`
|
1787
|
+
# @return [::Gapic::Config::Method]
|
1788
|
+
#
|
1789
|
+
attr_reader :delete_sitemap
|
1790
|
+
##
|
1791
|
+
# RPC-specific configuration for `fetch_sitemaps`
|
1792
|
+
# @return [::Gapic::Config::Method]
|
1793
|
+
#
|
1794
|
+
attr_reader :fetch_sitemaps
|
1795
|
+
##
|
1510
1796
|
# RPC-specific configuration for `enable_advanced_site_search`
|
1511
1797
|
# @return [::Gapic::Config::Method]
|
1512
1798
|
#
|
@@ -1548,6 +1834,12 @@ module Google
|
|
1548
1834
|
@delete_target_site = ::Gapic::Config::Method.new delete_target_site_config
|
1549
1835
|
list_target_sites_config = parent_rpcs.list_target_sites if parent_rpcs.respond_to? :list_target_sites
|
1550
1836
|
@list_target_sites = ::Gapic::Config::Method.new list_target_sites_config
|
1837
|
+
create_sitemap_config = parent_rpcs.create_sitemap if parent_rpcs.respond_to? :create_sitemap
|
1838
|
+
@create_sitemap = ::Gapic::Config::Method.new create_sitemap_config
|
1839
|
+
delete_sitemap_config = parent_rpcs.delete_sitemap if parent_rpcs.respond_to? :delete_sitemap
|
1840
|
+
@delete_sitemap = ::Gapic::Config::Method.new delete_sitemap_config
|
1841
|
+
fetch_sitemaps_config = parent_rpcs.fetch_sitemaps if parent_rpcs.respond_to? :fetch_sitemaps
|
1842
|
+
@fetch_sitemaps = ::Gapic::Config::Method.new fetch_sitemaps_config
|
1551
1843
|
enable_advanced_site_search_config = parent_rpcs.enable_advanced_site_search if parent_rpcs.respond_to? :enable_advanced_site_search
|
1552
1844
|
@enable_advanced_site_search = ::Gapic::Config::Method.new enable_advanced_site_search_config
|
1553
1845
|
disable_advanced_site_search_config = parent_rpcs.disable_advanced_site_search if parent_rpcs.respond_to? :disable_advanced_site_search
|
@@ -353,6 +353,126 @@ module Google
|
|
353
353
|
end
|
354
354
|
end
|
355
355
|
|
356
|
+
##
|
357
|
+
# Baseline implementation for the create_sitemap REST call
|
358
|
+
#
|
359
|
+
# @param request_pb [::Google::Cloud::DiscoveryEngine::V1::CreateSitemapRequest]
|
360
|
+
# A request object representing the call parameters. Required.
|
361
|
+
# @param options [::Gapic::CallOptions]
|
362
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
363
|
+
#
|
364
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
365
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
366
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
367
|
+
#
|
368
|
+
# @return [::Google::Longrunning::Operation]
|
369
|
+
# A result object deserialized from the server's reply
|
370
|
+
def create_sitemap request_pb, options = nil
|
371
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
372
|
+
|
373
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_create_sitemap_request request_pb
|
374
|
+
query_string_params = if query_string_params.any?
|
375
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
376
|
+
else
|
377
|
+
{}
|
378
|
+
end
|
379
|
+
|
380
|
+
response = @client_stub.make_http_request(
|
381
|
+
verb,
|
382
|
+
uri: uri,
|
383
|
+
body: body || "",
|
384
|
+
params: query_string_params,
|
385
|
+
method_name: "create_sitemap",
|
386
|
+
options: options
|
387
|
+
)
|
388
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
389
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
390
|
+
catch :response do
|
391
|
+
yield result, operation if block_given?
|
392
|
+
result
|
393
|
+
end
|
394
|
+
end
|
395
|
+
|
396
|
+
##
|
397
|
+
# Baseline implementation for the delete_sitemap REST call
|
398
|
+
#
|
399
|
+
# @param request_pb [::Google::Cloud::DiscoveryEngine::V1::DeleteSitemapRequest]
|
400
|
+
# A request object representing the call parameters. Required.
|
401
|
+
# @param options [::Gapic::CallOptions]
|
402
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
403
|
+
#
|
404
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
405
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
406
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
407
|
+
#
|
408
|
+
# @return [::Google::Longrunning::Operation]
|
409
|
+
# A result object deserialized from the server's reply
|
410
|
+
def delete_sitemap request_pb, options = nil
|
411
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
412
|
+
|
413
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_delete_sitemap_request request_pb
|
414
|
+
query_string_params = if query_string_params.any?
|
415
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
416
|
+
else
|
417
|
+
{}
|
418
|
+
end
|
419
|
+
|
420
|
+
response = @client_stub.make_http_request(
|
421
|
+
verb,
|
422
|
+
uri: uri,
|
423
|
+
body: body || "",
|
424
|
+
params: query_string_params,
|
425
|
+
method_name: "delete_sitemap",
|
426
|
+
options: options
|
427
|
+
)
|
428
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
429
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
430
|
+
catch :response do
|
431
|
+
yield result, operation if block_given?
|
432
|
+
result
|
433
|
+
end
|
434
|
+
end
|
435
|
+
|
436
|
+
##
|
437
|
+
# Baseline implementation for the fetch_sitemaps REST call
|
438
|
+
#
|
439
|
+
# @param request_pb [::Google::Cloud::DiscoveryEngine::V1::FetchSitemapsRequest]
|
440
|
+
# A request object representing the call parameters. Required.
|
441
|
+
# @param options [::Gapic::CallOptions]
|
442
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
443
|
+
#
|
444
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
445
|
+
# @yieldparam result [::Google::Cloud::DiscoveryEngine::V1::FetchSitemapsResponse]
|
446
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
447
|
+
#
|
448
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::FetchSitemapsResponse]
|
449
|
+
# A result object deserialized from the server's reply
|
450
|
+
def fetch_sitemaps request_pb, options = nil
|
451
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
452
|
+
|
453
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_fetch_sitemaps_request request_pb
|
454
|
+
query_string_params = if query_string_params.any?
|
455
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
456
|
+
else
|
457
|
+
{}
|
458
|
+
end
|
459
|
+
|
460
|
+
response = @client_stub.make_http_request(
|
461
|
+
verb,
|
462
|
+
uri: uri,
|
463
|
+
body: body || "",
|
464
|
+
params: query_string_params,
|
465
|
+
method_name: "fetch_sitemaps",
|
466
|
+
options: options
|
467
|
+
)
|
468
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
469
|
+
result = ::Google::Cloud::DiscoveryEngine::V1::FetchSitemapsResponse.decode_json response.body, ignore_unknown_fields: true
|
470
|
+
catch :response do
|
471
|
+
yield result, operation if block_given?
|
472
|
+
result
|
473
|
+
end
|
474
|
+
end
|
475
|
+
|
356
476
|
##
|
357
477
|
# Baseline implementation for the enable_advanced_site_search REST call
|
358
478
|
#
|
@@ -755,6 +875,92 @@ module Google
|
|
755
875
|
transcoder.transcode request_pb
|
756
876
|
end
|
757
877
|
|
878
|
+
##
|
879
|
+
# @private
|
880
|
+
#
|
881
|
+
# GRPC transcoding helper method for the create_sitemap REST call
|
882
|
+
#
|
883
|
+
# @param request_pb [::Google::Cloud::DiscoveryEngine::V1::CreateSitemapRequest]
|
884
|
+
# A request object representing the call parameters. Required.
|
885
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
886
|
+
# Uri, Body, Query string parameters
|
887
|
+
def self.transcode_create_sitemap_request request_pb
|
888
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
889
|
+
.with_bindings(
|
890
|
+
uri_method: :post,
|
891
|
+
uri_template: "/v1/{parent}/sitemaps",
|
892
|
+
body: "sitemap",
|
893
|
+
matches: [
|
894
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/siteSearchEngine/?$}, false]
|
895
|
+
]
|
896
|
+
)
|
897
|
+
.with_bindings(
|
898
|
+
uri_method: :post,
|
899
|
+
uri_template: "/v1/{parent}/sitemaps",
|
900
|
+
body: "sitemap",
|
901
|
+
matches: [
|
902
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/?$}, false]
|
903
|
+
]
|
904
|
+
)
|
905
|
+
transcoder.transcode request_pb
|
906
|
+
end
|
907
|
+
|
908
|
+
##
|
909
|
+
# @private
|
910
|
+
#
|
911
|
+
# GRPC transcoding helper method for the delete_sitemap REST call
|
912
|
+
#
|
913
|
+
# @param request_pb [::Google::Cloud::DiscoveryEngine::V1::DeleteSitemapRequest]
|
914
|
+
# A request object representing the call parameters. Required.
|
915
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
916
|
+
# Uri, Body, Query string parameters
|
917
|
+
def self.transcode_delete_sitemap_request request_pb
|
918
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
919
|
+
.with_bindings(
|
920
|
+
uri_method: :delete,
|
921
|
+
uri_template: "/v1/{name}",
|
922
|
+
matches: [
|
923
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/siteSearchEngine/sitemaps/[^/]+/?$}, false]
|
924
|
+
]
|
925
|
+
)
|
926
|
+
.with_bindings(
|
927
|
+
uri_method: :delete,
|
928
|
+
uri_template: "/v1/{name}",
|
929
|
+
matches: [
|
930
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/sitemaps/[^/]+/?$}, false]
|
931
|
+
]
|
932
|
+
)
|
933
|
+
transcoder.transcode request_pb
|
934
|
+
end
|
935
|
+
|
936
|
+
##
|
937
|
+
# @private
|
938
|
+
#
|
939
|
+
# GRPC transcoding helper method for the fetch_sitemaps REST call
|
940
|
+
#
|
941
|
+
# @param request_pb [::Google::Cloud::DiscoveryEngine::V1::FetchSitemapsRequest]
|
942
|
+
# A request object representing the call parameters. Required.
|
943
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
944
|
+
# Uri, Body, Query string parameters
|
945
|
+
def self.transcode_fetch_sitemaps_request request_pb
|
946
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
947
|
+
.with_bindings(
|
948
|
+
uri_method: :get,
|
949
|
+
uri_template: "/v1/{parent}/sitemaps:fetch",
|
950
|
+
matches: [
|
951
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/siteSearchEngine/?$}, false]
|
952
|
+
]
|
953
|
+
)
|
954
|
+
.with_bindings(
|
955
|
+
uri_method: :get,
|
956
|
+
uri_template: "/v1/{parent}/sitemaps:fetch",
|
957
|
+
matches: [
|
958
|
+
["parent", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/?$}, false]
|
959
|
+
]
|
960
|
+
)
|
961
|
+
transcoder.transcode request_pb
|
962
|
+
end
|
963
|
+
|
758
964
|
##
|
759
965
|
# @private
|
760
966
|
#
|
@@ -247,9 +247,9 @@ module Google
|
|
247
247
|
# {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore} level, the format
|
248
248
|
# is:
|
249
249
|
# `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
|
250
|
-
# If the write user event action is applied in
|
251
|
-
# example, the event
|
252
|
-
# {::Google::Cloud::DiscoveryEngine::V1::Document Document} across multiple
|
250
|
+
# If the write user event action is applied in
|
251
|
+
# `::Google::Cloud::Location::Location` level, for example, the event
|
252
|
+
# with {::Google::Cloud::DiscoveryEngine::V1::Document Document} across multiple
|
253
253
|
# {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}, the format is:
|
254
254
|
# `projects/{project}/locations/{location}`.
|
255
255
|
# @param user_event [::Google::Cloud::DiscoveryEngine::V1::UserEvent, ::Hash]
|
@@ -345,8 +345,16 @@ module Google
|
|
345
345
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
346
346
|
#
|
347
347
|
# @param parent [::String]
|
348
|
-
# Required. The parent
|
348
|
+
# Required. The parent resource name.
|
349
|
+
# If the collect user event action is applied in
|
350
|
+
# {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore} level, the format
|
351
|
+
# is:
|
349
352
|
# `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
|
353
|
+
# If the collect user event action is applied in
|
354
|
+
# `::Google::Cloud::Location::Location` level, for example, the event
|
355
|
+
# with {::Google::Cloud::DiscoveryEngine::V1::Document Document} across multiple
|
356
|
+
# {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}, the format is:
|
357
|
+
# `projects/{project}/locations/{location}`.
|
350
358
|
# @param user_event [::String]
|
351
359
|
# Required. URL encoded UserEvent proto with a length limit of 2,000,000
|
352
360
|
# characters.
|
@@ -462,16 +470,20 @@ module Google
|
|
462
470
|
# * `userId`: Double quoted string. Specifying this will delete all events
|
463
471
|
# associated with a user.
|
464
472
|
#
|
473
|
+
# Note: This API only supports purging a max range of 30 days.
|
474
|
+
#
|
465
475
|
# Examples:
|
466
476
|
#
|
467
477
|
# * Deleting all events in a time range:
|
468
478
|
# `eventTime > "2012-04-23T18:25:43.511Z"
|
469
479
|
# eventTime < "2012-04-23T18:30:43.511Z"`
|
470
|
-
# * Deleting specific eventType:
|
471
|
-
# `
|
472
|
-
#
|
473
|
-
#
|
474
|
-
#
|
480
|
+
# * Deleting specific eventType in a time range:
|
481
|
+
# `eventTime > "2012-04-23T18:25:43.511Z"
|
482
|
+
# eventTime < "2012-04-23T18:30:43.511Z" eventType = "search"`
|
483
|
+
# * Deleting all events for a specific visitor in a time range:
|
484
|
+
# `eventTime > "2012-04-23T18:25:43.511Z"
|
485
|
+
# eventTime < "2012-04-23T18:30:43.511Z" userPseudoId = "visitor1024"`
|
486
|
+
# * Deleting the past 30 days of events inside a DataStore:
|
475
487
|
# `*`
|
476
488
|
#
|
477
489
|
# The filtering fields are assumed to have an implicit AND.
|
@@ -240,9 +240,9 @@ module Google
|
|
240
240
|
# {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore} level, the format
|
241
241
|
# is:
|
242
242
|
# `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
|
243
|
-
# If the write user event action is applied in
|
244
|
-
# example, the event
|
245
|
-
# {::Google::Cloud::DiscoveryEngine::V1::Document Document} across multiple
|
243
|
+
# If the write user event action is applied in
|
244
|
+
# `::Google::Cloud::Location::Location` level, for example, the event
|
245
|
+
# with {::Google::Cloud::DiscoveryEngine::V1::Document Document} across multiple
|
246
246
|
# {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}, the format is:
|
247
247
|
# `projects/{project}/locations/{location}`.
|
248
248
|
# @param user_event [::Google::Cloud::DiscoveryEngine::V1::UserEvent, ::Hash]
|
@@ -331,8 +331,16 @@ module Google
|
|
331
331
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
332
332
|
#
|
333
333
|
# @param parent [::String]
|
334
|
-
# Required. The parent
|
334
|
+
# Required. The parent resource name.
|
335
|
+
# If the collect user event action is applied in
|
336
|
+
# {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore} level, the format
|
337
|
+
# is:
|
335
338
|
# `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.
|
339
|
+
# If the collect user event action is applied in
|
340
|
+
# `::Google::Cloud::Location::Location` level, for example, the event
|
341
|
+
# with {::Google::Cloud::DiscoveryEngine::V1::Document Document} across multiple
|
342
|
+
# {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}, the format is:
|
343
|
+
# `projects/{project}/locations/{location}`.
|
336
344
|
# @param user_event [::String]
|
337
345
|
# Required. URL encoded UserEvent proto with a length limit of 2,000,000
|
338
346
|
# characters.
|
@@ -441,16 +449,20 @@ module Google
|
|
441
449
|
# * `userId`: Double quoted string. Specifying this will delete all events
|
442
450
|
# associated with a user.
|
443
451
|
#
|
452
|
+
# Note: This API only supports purging a max range of 30 days.
|
453
|
+
#
|
444
454
|
# Examples:
|
445
455
|
#
|
446
456
|
# * Deleting all events in a time range:
|
447
457
|
# `eventTime > "2012-04-23T18:25:43.511Z"
|
448
458
|
# eventTime < "2012-04-23T18:30:43.511Z"`
|
449
|
-
# * Deleting specific eventType:
|
450
|
-
# `
|
451
|
-
#
|
452
|
-
#
|
453
|
-
#
|
459
|
+
# * Deleting specific eventType in a time range:
|
460
|
+
# `eventTime > "2012-04-23T18:25:43.511Z"
|
461
|
+
# eventTime < "2012-04-23T18:30:43.511Z" eventType = "search"`
|
462
|
+
# * Deleting all events for a specific visitor in a time range:
|
463
|
+
# `eventTime > "2012-04-23T18:25:43.511Z"
|
464
|
+
# eventTime < "2012-04-23T18:30:43.511Z" userPseudoId = "visitor1024"`
|
465
|
+
# * Deleting the past 30 days of events inside a DataStore:
|
454
466
|
# `*`
|
455
467
|
#
|
456
468
|
# The filtering fields are assumed to have an implicit AND.
|