google-cloud-discovery_engine-v1beta 0.14.2 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb +155 -0
  3. data/lib/google/cloud/discovery_engine/v1beta/completion_service/paths.rb +62 -0
  4. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb +148 -0
  5. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/service_stub.rb +76 -0
  6. data/lib/google/cloud/discovery_engine/v1beta/control_service/client.rb +6 -6
  7. data/lib/google/cloud/discovery_engine/v1beta/control_service/rest/client.rb +6 -6
  8. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +18 -13
  9. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb +18 -13
  10. data/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +109 -1
  11. data/lib/google/cloud/discovery_engine/v1beta/document_service/paths.rb +25 -0
  12. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb +102 -1
  13. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/service_stub.rb +66 -0
  14. data/lib/google/cloud/discovery_engine/v1beta/engine_service/client.rb +3 -3
  15. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/client.rb +3 -3
  16. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/client.rb +218 -4
  17. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/paths.rb +85 -0
  18. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/client.rb +125 -4
  19. data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/service_stub.rb +60 -0
  20. data/lib/google/cloud/discovery_engine/v1beta/rank_service/client.rb +1 -1
  21. data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/client.rb +1 -1
  22. data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +410 -4
  23. data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +402 -4
  24. data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/service_stub.rb +76 -0
  25. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/client.rb +2 -2
  26. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/client.rb +2 -2
  27. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/client.rb +324 -1
  28. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/paths.rb +49 -0
  29. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/client.rb +303 -1
  30. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/service_stub.rb +193 -0
  31. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb +1 -1
  32. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb +1 -1
  33. data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
  34. data/lib/google/cloud/discoveryengine/v1beta/answer_pb.rb +2 -1
  35. data/lib/google/cloud/discoveryengine/v1beta/common_pb.rb +1 -1
  36. data/lib/google/cloud/discoveryengine/v1beta/completion_service_pb.rb +18 -1
  37. data/lib/google/cloud/discoveryengine/v1beta/completion_service_services_pb.rb +2 -0
  38. data/lib/google/cloud/discoveryengine/v1beta/control_pb.rb +1 -1
  39. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +4 -1
  40. data/lib/google/cloud/discoveryengine/v1beta/custom_tuning_model_pb.rb +1 -1
  41. data/lib/google/cloud/discoveryengine/v1beta/data_store_pb.rb +7 -1
  42. data/lib/google/cloud/discoveryengine/v1beta/document_pb.rb +4 -1
  43. data/lib/google/cloud/discoveryengine/v1beta/document_service_pb.rb +11 -1
  44. data/lib/google/cloud/discoveryengine/v1beta/document_service_services_pb.rb +4 -0
  45. data/lib/google/cloud/discoveryengine/v1beta/engine_pb.rb +1 -1
  46. data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_pb.rb +24 -1
  47. data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_services_pb.rb +4 -0
  48. data/lib/google/cloud/discoveryengine/v1beta/grounding_pb.rb +2 -1
  49. data/lib/google/cloud/discoveryengine/v1beta/import_config_pb.rb +1 -1
  50. data/lib/google/cloud/discoveryengine/v1beta/purge_config_pb.rb +5 -1
  51. data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +6 -1
  52. data/lib/google/cloud/discoveryengine/v1beta/search_service_services_pb.rb +14 -0
  53. data/lib/google/cloud/discoveryengine/v1beta/serving_config_pb.rb +2 -2
  54. data/lib/google/cloud/discoveryengine/v1beta/site_search_engine_pb.rb +2 -1
  55. data/lib/google/cloud/discoveryengine/v1beta/site_search_engine_service_pb.rb +10 -1
  56. data/lib/google/cloud/discoveryengine/v1beta/site_search_engine_service_services_pb.rb +7 -0
  57. data/lib/google/cloud/discoveryengine/v1beta/user_event_pb.rb +1 -1
  58. data/proto_docs/google/api/client.rb +20 -0
  59. data/proto_docs/google/cloud/discoveryengine/v1beta/answer.rb +68 -8
  60. data/proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb +268 -0
  61. data/proto_docs/google/cloud/discoveryengine/v1beta/control.rb +10 -1
  62. data/proto_docs/google/cloud/discoveryengine/v1beta/control_service.rb +6 -6
  63. data/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb +98 -15
  64. data/proto_docs/google/cloud/discoveryengine/v1beta/custom_tuning_model.rb +11 -3
  65. data/proto_docs/google/cloud/discoveryengine/v1beta/data_store.rb +131 -0
  66. data/proto_docs/google/cloud/discoveryengine/v1beta/document.rb +22 -0
  67. data/proto_docs/google/cloud/discoveryengine/v1beta/document_processing_config.rb +9 -5
  68. data/proto_docs/google/cloud/discoveryengine/v1beta/document_service.rb +123 -0
  69. data/proto_docs/google/cloud/discoveryengine/v1beta/engine.rb +5 -1
  70. data/proto_docs/google/cloud/discoveryengine/v1beta/engine_service.rb +4 -4
  71. data/proto_docs/google/cloud/discoveryengine/v1beta/grounded_generation_service.rb +398 -2
  72. data/proto_docs/google/cloud/discoveryengine/v1beta/grounding.rb +10 -0
  73. data/proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb +13 -7
  74. data/proto_docs/google/cloud/discoveryengine/v1beta/project.rb +1 -1
  75. data/proto_docs/google/cloud/discoveryengine/v1beta/purge_config.rb +39 -1
  76. data/proto_docs/google/cloud/discoveryengine/v1beta/rank_service.rb +1 -1
  77. data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +175 -6
  78. data/proto_docs/google/cloud/discoveryengine/v1beta/serving_config.rb +16 -0
  79. data/proto_docs/google/cloud/discoveryengine/v1beta/serving_config_service.rb +2 -2
  80. data/proto_docs/google/cloud/discoveryengine/v1beta/site_search_engine.rb +17 -0
  81. data/proto_docs/google/cloud/discoveryengine/v1beta/site_search_engine_service.rb +147 -1
  82. data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +13 -1
  83. metadata +3 -3
@@ -896,6 +896,304 @@ module Google
896
896
  raise ::Google::Cloud::Error.from_error(e)
897
897
  end
898
898
 
899
+ ##
900
+ # Creates a {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap}.
901
+ #
902
+ # @overload create_sitemap(request, options = nil)
903
+ # Pass arguments to `create_sitemap` via a request object, either of type
904
+ # {::Google::Cloud::DiscoveryEngine::V1beta::CreateSitemapRequest} or an equivalent Hash.
905
+ #
906
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::CreateSitemapRequest, ::Hash]
907
+ # A request object representing the call parameters. Required. To specify no
908
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
909
+ # @param options [::Gapic::CallOptions, ::Hash]
910
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
911
+ #
912
+ # @overload create_sitemap(parent: nil, sitemap: nil)
913
+ # Pass arguments to `create_sitemap` via keyword arguments. Note that at
914
+ # least one keyword argument is required. To specify no parameters, or to keep all
915
+ # the default parameter values, pass an empty Hash as a request object (see above).
916
+ #
917
+ # @param parent [::String]
918
+ # Required. Parent resource name of the
919
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngine SiteSearchEngine},
920
+ # such as
921
+ # `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.
922
+ # @param sitemap [::Google::Cloud::DiscoveryEngine::V1beta::Sitemap, ::Hash]
923
+ # Required. The {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap} to
924
+ # create.
925
+ #
926
+ # @yield [response, operation] Access the result along with the RPC operation
927
+ # @yieldparam response [::Gapic::Operation]
928
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
929
+ #
930
+ # @return [::Gapic::Operation]
931
+ #
932
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
933
+ #
934
+ # @example Basic example
935
+ # require "google/cloud/discovery_engine/v1beta"
936
+ #
937
+ # # Create a client object. The client can be reused for multiple calls.
938
+ # client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Client.new
939
+ #
940
+ # # Create a request. To set request fields, pass in keyword arguments.
941
+ # request = Google::Cloud::DiscoveryEngine::V1beta::CreateSitemapRequest.new
942
+ #
943
+ # # Call the create_sitemap method.
944
+ # result = client.create_sitemap request
945
+ #
946
+ # # The returned object is of type Gapic::Operation. You can use it to
947
+ # # check the status of an operation, cancel it, or wait for results.
948
+ # # Here is how to wait for a response.
949
+ # result.wait_until_done! timeout: 60
950
+ # if result.response?
951
+ # p result.response
952
+ # else
953
+ # puts "No response received."
954
+ # end
955
+ #
956
+ def create_sitemap request, options = nil
957
+ raise ::ArgumentError, "request must be provided" if request.nil?
958
+
959
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::CreateSitemapRequest
960
+
961
+ # Converts hash and nil to an options object
962
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
963
+
964
+ # Customize the options with defaults
965
+ metadata = @config.rpcs.create_sitemap.metadata.to_h
966
+
967
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
968
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
969
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
970
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
971
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
972
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
973
+
974
+ header_params = {}
975
+ if request.parent
976
+ header_params["parent"] = request.parent
977
+ end
978
+
979
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
980
+ metadata[:"x-goog-request-params"] ||= request_params_header
981
+
982
+ options.apply_defaults timeout: @config.rpcs.create_sitemap.timeout,
983
+ metadata: metadata,
984
+ retry_policy: @config.rpcs.create_sitemap.retry_policy
985
+
986
+ options.apply_defaults timeout: @config.timeout,
987
+ metadata: @config.metadata,
988
+ retry_policy: @config.retry_policy
989
+
990
+ @site_search_engine_service_stub.call_rpc :create_sitemap, request, options: options do |response, operation|
991
+ response = ::Gapic::Operation.new response, @operations_client, options: options
992
+ yield response, operation if block_given?
993
+ return response
994
+ end
995
+ rescue ::GRPC::BadStatus => e
996
+ raise ::Google::Cloud::Error.from_error(e)
997
+ end
998
+
999
+ ##
1000
+ # Deletes a {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap}.
1001
+ #
1002
+ # @overload delete_sitemap(request, options = nil)
1003
+ # Pass arguments to `delete_sitemap` via a request object, either of type
1004
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DeleteSitemapRequest} or an equivalent Hash.
1005
+ #
1006
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::DeleteSitemapRequest, ::Hash]
1007
+ # A request object representing the call parameters. Required. To specify no
1008
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1009
+ # @param options [::Gapic::CallOptions, ::Hash]
1010
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1011
+ #
1012
+ # @overload delete_sitemap(name: nil)
1013
+ # Pass arguments to `delete_sitemap` via keyword arguments. Note that at
1014
+ # least one keyword argument is required. To specify no parameters, or to keep all
1015
+ # the default parameter values, pass an empty Hash as a request object (see above).
1016
+ #
1017
+ # @param name [::String]
1018
+ # Required. Full resource name of
1019
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap}, such as
1020
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/sitemaps/{sitemap}`.
1021
+ #
1022
+ # If the caller does not have permission to access the
1023
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap}, regardless of
1024
+ # whether or not it exists, a PERMISSION_DENIED error is returned.
1025
+ #
1026
+ # If the requested {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap}
1027
+ # does not exist, a NOT_FOUND error is returned.
1028
+ #
1029
+ # @yield [response, operation] Access the result along with the RPC operation
1030
+ # @yieldparam response [::Gapic::Operation]
1031
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1032
+ #
1033
+ # @return [::Gapic::Operation]
1034
+ #
1035
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1036
+ #
1037
+ # @example Basic example
1038
+ # require "google/cloud/discovery_engine/v1beta"
1039
+ #
1040
+ # # Create a client object. The client can be reused for multiple calls.
1041
+ # client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Client.new
1042
+ #
1043
+ # # Create a request. To set request fields, pass in keyword arguments.
1044
+ # request = Google::Cloud::DiscoveryEngine::V1beta::DeleteSitemapRequest.new
1045
+ #
1046
+ # # Call the delete_sitemap method.
1047
+ # result = client.delete_sitemap request
1048
+ #
1049
+ # # The returned object is of type Gapic::Operation. You can use it to
1050
+ # # check the status of an operation, cancel it, or wait for results.
1051
+ # # Here is how to wait for a response.
1052
+ # result.wait_until_done! timeout: 60
1053
+ # if result.response?
1054
+ # p result.response
1055
+ # else
1056
+ # puts "No response received."
1057
+ # end
1058
+ #
1059
+ def delete_sitemap request, options = nil
1060
+ raise ::ArgumentError, "request must be provided" if request.nil?
1061
+
1062
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::DeleteSitemapRequest
1063
+
1064
+ # Converts hash and nil to an options object
1065
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1066
+
1067
+ # Customize the options with defaults
1068
+ metadata = @config.rpcs.delete_sitemap.metadata.to_h
1069
+
1070
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1071
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1072
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1073
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
1074
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1075
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1076
+
1077
+ header_params = {}
1078
+ if request.name
1079
+ header_params["name"] = request.name
1080
+ end
1081
+
1082
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1083
+ metadata[:"x-goog-request-params"] ||= request_params_header
1084
+
1085
+ options.apply_defaults timeout: @config.rpcs.delete_sitemap.timeout,
1086
+ metadata: metadata,
1087
+ retry_policy: @config.rpcs.delete_sitemap.retry_policy
1088
+
1089
+ options.apply_defaults timeout: @config.timeout,
1090
+ metadata: @config.metadata,
1091
+ retry_policy: @config.retry_policy
1092
+
1093
+ @site_search_engine_service_stub.call_rpc :delete_sitemap, request, options: options do |response, operation|
1094
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1095
+ yield response, operation if block_given?
1096
+ return response
1097
+ end
1098
+ rescue ::GRPC::BadStatus => e
1099
+ raise ::Google::Cloud::Error.from_error(e)
1100
+ end
1101
+
1102
+ ##
1103
+ # Fetch {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap}s in a
1104
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}.
1105
+ #
1106
+ # @overload fetch_sitemaps(request, options = nil)
1107
+ # Pass arguments to `fetch_sitemaps` via a request object, either of type
1108
+ # {::Google::Cloud::DiscoveryEngine::V1beta::FetchSitemapsRequest} or an equivalent Hash.
1109
+ #
1110
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::FetchSitemapsRequest, ::Hash]
1111
+ # A request object representing the call parameters. Required. To specify no
1112
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1113
+ # @param options [::Gapic::CallOptions, ::Hash]
1114
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1115
+ #
1116
+ # @overload fetch_sitemaps(parent: nil, matcher: nil)
1117
+ # Pass arguments to `fetch_sitemaps` via keyword arguments. Note that at
1118
+ # least one keyword argument is required. To specify no parameters, or to keep all
1119
+ # the default parameter values, pass an empty Hash as a request object (see above).
1120
+ #
1121
+ # @param parent [::String]
1122
+ # Required. Parent resource name of the
1123
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngine SiteSearchEngine},
1124
+ # such as
1125
+ # `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.
1126
+ # @param matcher [::Google::Cloud::DiscoveryEngine::V1beta::FetchSitemapsRequest::Matcher, ::Hash]
1127
+ # Optional. If specified, fetches the matching
1128
+ # {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap}s. If not specified,
1129
+ # fetches all {::Google::Cloud::DiscoveryEngine::V1beta::Sitemap Sitemap}s in the
1130
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DataStore DataStore}.
1131
+ #
1132
+ # @yield [response, operation] Access the result along with the RPC operation
1133
+ # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1beta::FetchSitemapsResponse]
1134
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1135
+ #
1136
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::FetchSitemapsResponse]
1137
+ #
1138
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1139
+ #
1140
+ # @example Basic example
1141
+ # require "google/cloud/discovery_engine/v1beta"
1142
+ #
1143
+ # # Create a client object. The client can be reused for multiple calls.
1144
+ # client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Client.new
1145
+ #
1146
+ # # Create a request. To set request fields, pass in keyword arguments.
1147
+ # request = Google::Cloud::DiscoveryEngine::V1beta::FetchSitemapsRequest.new
1148
+ #
1149
+ # # Call the fetch_sitemaps method.
1150
+ # result = client.fetch_sitemaps request
1151
+ #
1152
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::FetchSitemapsResponse.
1153
+ # p result
1154
+ #
1155
+ def fetch_sitemaps request, options = nil
1156
+ raise ::ArgumentError, "request must be provided" if request.nil?
1157
+
1158
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::FetchSitemapsRequest
1159
+
1160
+ # Converts hash and nil to an options object
1161
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1162
+
1163
+ # Customize the options with defaults
1164
+ metadata = @config.rpcs.fetch_sitemaps.metadata.to_h
1165
+
1166
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1167
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1168
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1169
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
1170
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1171
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1172
+
1173
+ header_params = {}
1174
+ if request.parent
1175
+ header_params["parent"] = request.parent
1176
+ end
1177
+
1178
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1179
+ metadata[:"x-goog-request-params"] ||= request_params_header
1180
+
1181
+ options.apply_defaults timeout: @config.rpcs.fetch_sitemaps.timeout,
1182
+ metadata: metadata,
1183
+ retry_policy: @config.rpcs.fetch_sitemaps.retry_policy
1184
+
1185
+ options.apply_defaults timeout: @config.timeout,
1186
+ metadata: @config.metadata,
1187
+ retry_policy: @config.retry_policy
1188
+
1189
+ @site_search_engine_service_stub.call_rpc :fetch_sitemaps, request, options: options do |response, operation|
1190
+ yield response, operation if block_given?
1191
+ return response
1192
+ end
1193
+ rescue ::GRPC::BadStatus => e
1194
+ raise ::Google::Cloud::Error.from_error(e)
1195
+ end
1196
+
899
1197
  ##
900
1198
  # Upgrade from basic site search to advanced site search.
901
1199
  #
@@ -1103,7 +1401,7 @@ module Google
1103
1401
  # @param options [::Gapic::CallOptions, ::Hash]
1104
1402
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1105
1403
  #
1106
- # @overload recrawl_uris(site_search_engine: nil, uris: nil)
1404
+ # @overload recrawl_uris(site_search_engine: nil, uris: nil, site_credential: nil)
1107
1405
  # Pass arguments to `recrawl_uris` via keyword arguments. Note that at
1108
1406
  # least one keyword argument is required. To specify no parameters, or to keep all
1109
1407
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -1118,6 +1416,10 @@ module Google
1118
1416
  # an INVALID_ARGUMENT error is thrown. Each URI should match at least one
1119
1417
  # {::Google::Cloud::DiscoveryEngine::V1beta::TargetSite TargetSite} in
1120
1418
  # `site_search_engine`.
1419
+ # @param site_credential [::String]
1420
+ # Optional. Full resource name of the [SiteCredential][], such as
1421
+ # `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCredentials/*`.
1422
+ # Only set to crawl private URIs.
1121
1423
  #
1122
1424
  # @yield [response, operation] Access the result along with the RPC operation
1123
1425
  # @yieldparam response [::Gapic::Operation]
@@ -1586,6 +1888,21 @@ module Google
1586
1888
  #
1587
1889
  attr_reader :list_target_sites
1588
1890
  ##
1891
+ # RPC-specific configuration for `create_sitemap`
1892
+ # @return [::Gapic::Config::Method]
1893
+ #
1894
+ attr_reader :create_sitemap
1895
+ ##
1896
+ # RPC-specific configuration for `delete_sitemap`
1897
+ # @return [::Gapic::Config::Method]
1898
+ #
1899
+ attr_reader :delete_sitemap
1900
+ ##
1901
+ # RPC-specific configuration for `fetch_sitemaps`
1902
+ # @return [::Gapic::Config::Method]
1903
+ #
1904
+ attr_reader :fetch_sitemaps
1905
+ ##
1589
1906
  # RPC-specific configuration for `enable_advanced_site_search`
1590
1907
  # @return [::Gapic::Config::Method]
1591
1908
  #
@@ -1627,6 +1944,12 @@ module Google
1627
1944
  @delete_target_site = ::Gapic::Config::Method.new delete_target_site_config
1628
1945
  list_target_sites_config = parent_rpcs.list_target_sites if parent_rpcs.respond_to? :list_target_sites
1629
1946
  @list_target_sites = ::Gapic::Config::Method.new list_target_sites_config
1947
+ create_sitemap_config = parent_rpcs.create_sitemap if parent_rpcs.respond_to? :create_sitemap
1948
+ @create_sitemap = ::Gapic::Config::Method.new create_sitemap_config
1949
+ delete_sitemap_config = parent_rpcs.delete_sitemap if parent_rpcs.respond_to? :delete_sitemap
1950
+ @delete_sitemap = ::Gapic::Config::Method.new delete_sitemap_config
1951
+ fetch_sitemaps_config = parent_rpcs.fetch_sitemaps if parent_rpcs.respond_to? :fetch_sitemaps
1952
+ @fetch_sitemaps = ::Gapic::Config::Method.new fetch_sitemaps_config
1630
1953
  enable_advanced_site_search_config = parent_rpcs.enable_advanced_site_search if parent_rpcs.respond_to? :enable_advanced_site_search
1631
1954
  @enable_advanced_site_search = ::Gapic::Config::Method.new enable_advanced_site_search_config
1632
1955
  disable_advanced_site_search_config = parent_rpcs.disable_advanced_site_search if parent_rpcs.respond_to? :disable_advanced_site_search
@@ -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
  #