google-cloud-discovery_engine-v1beta 0.7.2 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb +235 -4
  3. data/lib/google/cloud/discovery_engine/v1beta/completion_service/operations.rb +801 -0
  4. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb +221 -4
  5. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/operations.rb +1077 -0
  6. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/service_stub.rb +136 -0
  7. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest.rb +1 -0
  8. data/lib/google/cloud/discovery_engine/v1beta/completion_service.rb +1 -0
  9. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +20 -3
  10. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/paths.rb +91 -0
  11. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb +20 -3
  12. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/service_stub.rb +45 -0
  13. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/client.rb +925 -0
  14. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/credentials.rb +47 -0
  15. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/operations.rb +801 -0
  16. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/paths.rb +97 -0
  17. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/client.rb +864 -0
  18. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/operations.rb +1077 -0
  19. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/service_stub.rb +403 -0
  20. data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest.rb +54 -0
  21. data/lib/google/cloud/discovery_engine/v1beta/data_store_service.rb +57 -0
  22. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb +14 -0
  23. data/lib/google/cloud/discovery_engine/v1beta/engine_service/client.rb +887 -0
  24. data/lib/google/cloud/discovery_engine/v1beta/engine_service/credentials.rb +47 -0
  25. data/lib/google/cloud/discovery_engine/v1beta/engine_service/operations.rb +801 -0
  26. data/lib/google/cloud/discovery_engine/v1beta/engine_service/paths.rb +73 -0
  27. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/client.rb +826 -0
  28. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/operations.rb +1077 -0
  29. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/service_stub.rb +366 -0
  30. data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest.rb +54 -0
  31. data/lib/google/cloud/discovery_engine/v1beta/engine_service.rb +57 -0
  32. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/client.rb +22 -3
  33. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/paths.rb +19 -0
  34. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/client.rb +22 -3
  35. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/service_stub.rb +8 -0
  36. data/lib/google/cloud/discovery_engine/v1beta/rest.rb +4 -0
  37. data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb +14 -0
  38. data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +48 -10
  39. data/lib/google/cloud/discovery_engine/v1beta/search_service/paths.rb +19 -0
  40. data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +48 -10
  41. data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/service_stub.rb +8 -0
  42. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/client.rb +646 -0
  43. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/credentials.rb +47 -0
  44. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/paths.rb +146 -0
  45. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/client.rb +599 -0
  46. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/service_stub.rb +291 -0
  47. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest.rb +52 -0
  48. data/lib/google/cloud/discovery_engine/v1beta/serving_config_service.rb +55 -0
  49. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/client.rb +1635 -0
  50. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/credentials.rb +47 -0
  51. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/operations.rb +801 -0
  52. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/paths.rb +127 -0
  53. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/client.rb +1525 -0
  54. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/operations.rb +1077 -0
  55. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/service_stub.rb +860 -0
  56. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest.rb +53 -0
  57. data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service.rb +56 -0
  58. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb +14 -0
  59. data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
  60. data/lib/google/cloud/discovery_engine/v1beta.rb +4 -0
  61. data/lib/google/cloud/discoveryengine/v1beta/common_pb.rb +6 -1
  62. data/lib/google/cloud/discoveryengine/v1beta/completion_pb.rb +45 -0
  63. data/lib/google/cloud/discoveryengine/v1beta/completion_service_pb.rb +4 -1
  64. data/lib/google/cloud/discoveryengine/v1beta/completion_service_services_pb.rb +8 -0
  65. data/lib/google/cloud/discoveryengine/v1beta/conversation_pb.rb +1 -1
  66. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +1 -1
  67. data/lib/google/cloud/discoveryengine/v1beta/data_store_pb.rb +49 -0
  68. data/lib/google/cloud/discoveryengine/v1beta/data_store_service_pb.rb +62 -0
  69. data/lib/google/cloud/discoveryengine/v1beta/data_store_service_services_pb.rb +61 -0
  70. data/lib/google/cloud/discoveryengine/v1beta/document_pb.rb +1 -1
  71. data/lib/google/cloud/discoveryengine/v1beta/document_service_pb.rb +1 -1
  72. data/lib/google/cloud/discoveryengine/v1beta/engine_pb.rb +53 -0
  73. data/lib/google/cloud/discoveryengine/v1beta/engine_service_pb.rb +62 -0
  74. data/lib/google/cloud/discoveryengine/v1beta/engine_service_services_pb.rb +55 -0
  75. data/lib/google/cloud/discoveryengine/v1beta/import_config_pb.rb +7 -1
  76. data/lib/google/cloud/discoveryengine/v1beta/purge_config_pb.rb +6 -1
  77. data/lib/google/cloud/discoveryengine/v1beta/recommendation_service_pb.rb +1 -1
  78. data/lib/google/cloud/discoveryengine/v1beta/schema_pb.rb +1 -1
  79. data/lib/google/cloud/discoveryengine/v1beta/schema_service_pb.rb +1 -1
  80. data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +8 -1
  81. data/lib/google/cloud/discoveryengine/v1beta/serving_config_pb.rb +53 -0
  82. data/lib/google/cloud/discoveryengine/v1beta/serving_config_service_pb.rb +54 -0
  83. data/lib/google/cloud/discoveryengine/v1beta/serving_config_service_services_pb.rb +53 -0
  84. data/lib/google/cloud/discoveryengine/v1beta/site_search_engine_pb.rb +54 -0
  85. data/lib/google/cloud/discoveryengine/v1beta/site_search_engine_service_pb.rb +82 -0
  86. data/lib/google/cloud/discoveryengine/v1beta/site_search_engine_service_services_pb.rb +74 -0
  87. data/lib/google/cloud/discoveryengine/v1beta/user_event_pb.rb +1 -1
  88. data/lib/google/cloud/discoveryengine/v1beta/user_event_service_pb.rb +1 -1
  89. data/proto_docs/google/cloud/discoveryengine/v1beta/common.rb +60 -0
  90. data/proto_docs/google/cloud/discoveryengine/v1beta/completion.rb +53 -0
  91. data/proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb +10 -4
  92. data/proto_docs/google/cloud/discoveryengine/v1beta/conversation.rb +2 -0
  93. data/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb +19 -1
  94. data/proto_docs/google/cloud/discoveryengine/v1beta/data_store.rb +88 -0
  95. data/proto_docs/google/cloud/discoveryengine/v1beta/data_store_service.rb +216 -0
  96. data/proto_docs/google/cloud/discoveryengine/v1beta/document.rb +1 -1
  97. data/proto_docs/google/cloud/discoveryengine/v1beta/engine.rb +219 -0
  98. data/proto_docs/google/cloud/discoveryengine/v1beta/engine_service.rb +179 -0
  99. data/proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb +66 -0
  100. data/proto_docs/google/cloud/discoveryengine/v1beta/purge_config.rb +41 -0
  101. data/proto_docs/google/cloud/discoveryengine/v1beta/recommendation_service.rb +22 -3
  102. data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +166 -15
  103. data/proto_docs/google/cloud/discoveryengine/v1beta/serving_config.rb +247 -0
  104. data/proto_docs/google/cloud/discoveryengine/v1beta/serving_config_service.rb +85 -0
  105. data/proto_docs/google/cloud/discoveryengine/v1beta/site_search_engine.rb +160 -0
  106. data/proto_docs/google/cloud/discoveryengine/v1beta/site_search_engine_service.rb +528 -0
  107. data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +4 -3
  108. metadata +60 -2
@@ -0,0 +1,1525 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/discoveryengine/v1beta/site_search_engine_service_pb"
21
+ require "google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+
24
+ module Google
25
+ module Cloud
26
+ module DiscoveryEngine
27
+ module V1beta
28
+ module SiteSearchEngineService
29
+ module Rest
30
+ ##
31
+ # REST client for the SiteSearchEngineService service.
32
+ #
33
+ # Service for managing site search related resources.
34
+ #
35
+ class Client
36
+ # @private
37
+ DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
38
+
39
+ include Paths
40
+
41
+ # @private
42
+ attr_reader :site_search_engine_service_stub
43
+
44
+ ##
45
+ # Configure the SiteSearchEngineService Client class.
46
+ #
47
+ # See {::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client::Configuration}
48
+ # for a description of the configuration fields.
49
+ #
50
+ # @example
51
+ #
52
+ # # Modify the configuration for all SiteSearchEngineService clients
53
+ # ::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.configure do |config|
54
+ # config.timeout = 10.0
55
+ # end
56
+ #
57
+ # @yield [config] Configure the Client client.
58
+ # @yieldparam config [Client::Configuration]
59
+ #
60
+ # @return [Client::Configuration]
61
+ #
62
+ def self.configure
63
+ @configure ||= begin
64
+ namespace = ["Google", "Cloud", "DiscoveryEngine", "V1beta"]
65
+ parent_config = while namespace.any?
66
+ parent_name = namespace.join "::"
67
+ parent_const = const_get parent_name
68
+ break parent_const.configure if parent_const.respond_to? :configure
69
+ namespace.pop
70
+ end
71
+ default_config = Client::Configuration.new parent_config
72
+
73
+ default_config
74
+ end
75
+ yield @configure if block_given?
76
+ @configure
77
+ end
78
+
79
+ ##
80
+ # Configure the SiteSearchEngineService Client instance.
81
+ #
82
+ # The configuration is set to the derived mode, meaning that values can be changed,
83
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
84
+ # should be made on {Client.configure}.
85
+ #
86
+ # See {::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client::Configuration}
87
+ # for a description of the configuration fields.
88
+ #
89
+ # @yield [config] Configure the Client client.
90
+ # @yieldparam config [Client::Configuration]
91
+ #
92
+ # @return [Client::Configuration]
93
+ #
94
+ def configure
95
+ yield @config if block_given?
96
+ @config
97
+ end
98
+
99
+ ##
100
+ # The effective universe domain
101
+ #
102
+ # @return [String]
103
+ #
104
+ def universe_domain
105
+ @site_search_engine_service_stub.universe_domain
106
+ end
107
+
108
+ ##
109
+ # Create a new SiteSearchEngineService REST client object.
110
+ #
111
+ # @example
112
+ #
113
+ # # Create a client using the default configuration
114
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new
115
+ #
116
+ # # Create a client using a custom configuration
117
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new do |config|
118
+ # config.timeout = 10.0
119
+ # end
120
+ #
121
+ # @yield [config] Configure the SiteSearchEngineService client.
122
+ # @yieldparam config [Client::Configuration]
123
+ #
124
+ def initialize
125
+ # Create the configuration object
126
+ @config = Configuration.new Client.configure
127
+
128
+ # Yield the configuration if needed
129
+ yield @config if block_given?
130
+
131
+ # Create credentials
132
+ credentials = @config.credentials
133
+ # Use self-signed JWT if the endpoint is unchanged from default,
134
+ # but only if the default endpoint does not have a region prefix.
135
+ enable_self_signed_jwt = @config.endpoint.nil? ||
136
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
137
+ !@config.endpoint.split(".").first.include?("-"))
138
+ credentials ||= Credentials.default scope: @config.scope,
139
+ enable_self_signed_jwt: enable_self_signed_jwt
140
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
141
+ credentials = Credentials.new credentials, scope: @config.scope
142
+ end
143
+
144
+ @quota_project_id = @config.quota_project
145
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
146
+
147
+ @operations_client = ::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Operations.new do |config|
148
+ config.credentials = credentials
149
+ config.quota_project = @quota_project_id
150
+ config.endpoint = @config.endpoint
151
+ config.universe_domain = @config.universe_domain
152
+ end
153
+
154
+ @site_search_engine_service_stub = ::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::ServiceStub.new(
155
+ endpoint: @config.endpoint,
156
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
157
+ universe_domain: @config.universe_domain,
158
+ credentials: credentials
159
+ )
160
+
161
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
162
+ config.credentials = credentials
163
+ config.quota_project = @quota_project_id
164
+ config.endpoint = @site_search_engine_service_stub.endpoint
165
+ config.universe_domain = @site_search_engine_service_stub.universe_domain
166
+ end
167
+ end
168
+
169
+ ##
170
+ # Get the associated client for long-running operations.
171
+ #
172
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Operations]
173
+ #
174
+ attr_reader :operations_client
175
+
176
+ ##
177
+ # Get the associated client for mix-in of the Locations.
178
+ #
179
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
180
+ #
181
+ attr_reader :location_client
182
+
183
+ # Service calls
184
+
185
+ ##
186
+ # Gets the
187
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngine SiteSearchEngine}.
188
+ #
189
+ # @overload get_site_search_engine(request, options = nil)
190
+ # Pass arguments to `get_site_search_engine` via a request object, either of type
191
+ # {::Google::Cloud::DiscoveryEngine::V1beta::GetSiteSearchEngineRequest} or an equivalent Hash.
192
+ #
193
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::GetSiteSearchEngineRequest, ::Hash]
194
+ # A request object representing the call parameters. Required. To specify no
195
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
196
+ # @param options [::Gapic::CallOptions, ::Hash]
197
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
198
+ #
199
+ # @overload get_site_search_engine(name: nil)
200
+ # Pass arguments to `get_site_search_engine` via keyword arguments. Note that at
201
+ # least one keyword argument is required. To specify no parameters, or to keep all
202
+ # the default parameter values, pass an empty Hash as a request object (see above).
203
+ #
204
+ # @param name [::String]
205
+ # Required. Resource name of
206
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngine SiteSearchEngine},
207
+ # such as
208
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.
209
+ #
210
+ # If the caller does not have permission to access the [SiteSearchEngine],
211
+ # regardless of whether or not it exists, a PERMISSION_DENIED error is
212
+ # returned.
213
+ # @yield [result, operation] Access the result along with the TransportOperation object
214
+ # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngine]
215
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
216
+ #
217
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngine]
218
+ #
219
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
220
+ #
221
+ # @example Basic example
222
+ # require "google/cloud/discovery_engine/v1beta"
223
+ #
224
+ # # Create a client object. The client can be reused for multiple calls.
225
+ # client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new
226
+ #
227
+ # # Create a request. To set request fields, pass in keyword arguments.
228
+ # request = Google::Cloud::DiscoveryEngine::V1beta::GetSiteSearchEngineRequest.new
229
+ #
230
+ # # Call the get_site_search_engine method.
231
+ # result = client.get_site_search_engine request
232
+ #
233
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngine.
234
+ # p result
235
+ #
236
+ def get_site_search_engine request, options = nil
237
+ raise ::ArgumentError, "request must be provided" if request.nil?
238
+
239
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::GetSiteSearchEngineRequest
240
+
241
+ # Converts hash and nil to an options object
242
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
243
+
244
+ # Customize the options with defaults
245
+ call_metadata = @config.rpcs.get_site_search_engine.metadata.to_h
246
+
247
+ # Set x-goog-api-client and x-goog-user-project headers
248
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
249
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
250
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
251
+ transports_version_send: [:rest]
252
+
253
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
254
+
255
+ options.apply_defaults timeout: @config.rpcs.get_site_search_engine.timeout,
256
+ metadata: call_metadata,
257
+ retry_policy: @config.rpcs.get_site_search_engine.retry_policy
258
+
259
+ options.apply_defaults timeout: @config.timeout,
260
+ metadata: @config.metadata,
261
+ retry_policy: @config.retry_policy
262
+
263
+ @site_search_engine_service_stub.get_site_search_engine request, options do |result, operation|
264
+ yield result, operation if block_given?
265
+ return result
266
+ end
267
+ rescue ::Gapic::Rest::Error => e
268
+ raise ::Google::Cloud::Error.from_error(e)
269
+ end
270
+
271
+ ##
272
+ # Creates a {::Google::Cloud::DiscoveryEngine::V1beta::TargetSite TargetSite}.
273
+ #
274
+ # @overload create_target_site(request, options = nil)
275
+ # Pass arguments to `create_target_site` via a request object, either of type
276
+ # {::Google::Cloud::DiscoveryEngine::V1beta::CreateTargetSiteRequest} or an equivalent Hash.
277
+ #
278
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::CreateTargetSiteRequest, ::Hash]
279
+ # A request object representing the call parameters. Required. To specify no
280
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
281
+ # @param options [::Gapic::CallOptions, ::Hash]
282
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
283
+ #
284
+ # @overload create_target_site(parent: nil, target_site: nil)
285
+ # Pass arguments to `create_target_site` via keyword arguments. Note that at
286
+ # least one keyword argument is required. To specify no parameters, or to keep all
287
+ # the default parameter values, pass an empty Hash as a request object (see above).
288
+ #
289
+ # @param parent [::String]
290
+ # Required. Parent resource name of
291
+ # {::Google::Cloud::DiscoveryEngine::V1beta::TargetSite TargetSite}, such as
292
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.
293
+ # @param target_site [::Google::Cloud::DiscoveryEngine::V1beta::TargetSite, ::Hash]
294
+ # Required. The {::Google::Cloud::DiscoveryEngine::V1beta::TargetSite TargetSite}
295
+ # to create.
296
+ # @yield [result, operation] Access the result along with the TransportOperation object
297
+ # @yieldparam result [::Gapic::Operation]
298
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
299
+ #
300
+ # @return [::Gapic::Operation]
301
+ #
302
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
303
+ #
304
+ # @example Basic example
305
+ # require "google/cloud/discovery_engine/v1beta"
306
+ #
307
+ # # Create a client object. The client can be reused for multiple calls.
308
+ # client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new
309
+ #
310
+ # # Create a request. To set request fields, pass in keyword arguments.
311
+ # request = Google::Cloud::DiscoveryEngine::V1beta::CreateTargetSiteRequest.new
312
+ #
313
+ # # Call the create_target_site method.
314
+ # result = client.create_target_site request
315
+ #
316
+ # # The returned object is of type Gapic::Operation. You can use it to
317
+ # # check the status of an operation, cancel it, or wait for results.
318
+ # # Here is how to wait for a response.
319
+ # result.wait_until_done! timeout: 60
320
+ # if result.response?
321
+ # p result.response
322
+ # else
323
+ # puts "No response received."
324
+ # end
325
+ #
326
+ def create_target_site request, options = nil
327
+ raise ::ArgumentError, "request must be provided" if request.nil?
328
+
329
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::CreateTargetSiteRequest
330
+
331
+ # Converts hash and nil to an options object
332
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
333
+
334
+ # Customize the options with defaults
335
+ call_metadata = @config.rpcs.create_target_site.metadata.to_h
336
+
337
+ # Set x-goog-api-client and x-goog-user-project headers
338
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
339
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
340
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
341
+ transports_version_send: [:rest]
342
+
343
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
344
+
345
+ options.apply_defaults timeout: @config.rpcs.create_target_site.timeout,
346
+ metadata: call_metadata,
347
+ retry_policy: @config.rpcs.create_target_site.retry_policy
348
+
349
+ options.apply_defaults timeout: @config.timeout,
350
+ metadata: @config.metadata,
351
+ retry_policy: @config.retry_policy
352
+
353
+ @site_search_engine_service_stub.create_target_site request, options do |result, operation|
354
+ result = ::Gapic::Operation.new result, @operations_client, options: options
355
+ yield result, operation if block_given?
356
+ return result
357
+ end
358
+ rescue ::Gapic::Rest::Error => e
359
+ raise ::Google::Cloud::Error.from_error(e)
360
+ end
361
+
362
+ ##
363
+ # Creates {::Google::Cloud::DiscoveryEngine::V1beta::TargetSite TargetSite} in a
364
+ # batch.
365
+ #
366
+ # @overload batch_create_target_sites(request, options = nil)
367
+ # Pass arguments to `batch_create_target_sites` via a request object, either of type
368
+ # {::Google::Cloud::DiscoveryEngine::V1beta::BatchCreateTargetSitesRequest} or an equivalent Hash.
369
+ #
370
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::BatchCreateTargetSitesRequest, ::Hash]
371
+ # A request object representing the call parameters. Required. To specify no
372
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
373
+ # @param options [::Gapic::CallOptions, ::Hash]
374
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
375
+ #
376
+ # @overload batch_create_target_sites(parent: nil, requests: nil)
377
+ # Pass arguments to `batch_create_target_sites` via keyword arguments. Note that at
378
+ # least one keyword argument is required. To specify no parameters, or to keep all
379
+ # the default parameter values, pass an empty Hash as a request object (see above).
380
+ #
381
+ # @param parent [::String]
382
+ # Required. The parent resource shared by all TargetSites being created.
383
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.
384
+ # The parent field in the CreateBookRequest messages must either be empty or
385
+ # match this field.
386
+ # @param requests [::Array<::Google::Cloud::DiscoveryEngine::V1beta::CreateTargetSiteRequest, ::Hash>]
387
+ # Required. The request message specifying the resources to create.
388
+ # A maximum of 20 TargetSites can be created in a batch.
389
+ # @yield [result, operation] Access the result along with the TransportOperation object
390
+ # @yieldparam result [::Gapic::Operation]
391
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
392
+ #
393
+ # @return [::Gapic::Operation]
394
+ #
395
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
396
+ #
397
+ # @example Basic example
398
+ # require "google/cloud/discovery_engine/v1beta"
399
+ #
400
+ # # Create a client object. The client can be reused for multiple calls.
401
+ # client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new
402
+ #
403
+ # # Create a request. To set request fields, pass in keyword arguments.
404
+ # request = Google::Cloud::DiscoveryEngine::V1beta::BatchCreateTargetSitesRequest.new
405
+ #
406
+ # # Call the batch_create_target_sites method.
407
+ # result = client.batch_create_target_sites request
408
+ #
409
+ # # The returned object is of type Gapic::Operation. You can use it to
410
+ # # check the status of an operation, cancel it, or wait for results.
411
+ # # Here is how to wait for a response.
412
+ # result.wait_until_done! timeout: 60
413
+ # if result.response?
414
+ # p result.response
415
+ # else
416
+ # puts "No response received."
417
+ # end
418
+ #
419
+ def batch_create_target_sites request, options = nil
420
+ raise ::ArgumentError, "request must be provided" if request.nil?
421
+
422
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::BatchCreateTargetSitesRequest
423
+
424
+ # Converts hash and nil to an options object
425
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
426
+
427
+ # Customize the options with defaults
428
+ call_metadata = @config.rpcs.batch_create_target_sites.metadata.to_h
429
+
430
+ # Set x-goog-api-client and x-goog-user-project headers
431
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
432
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
433
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
434
+ transports_version_send: [:rest]
435
+
436
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
437
+
438
+ options.apply_defaults timeout: @config.rpcs.batch_create_target_sites.timeout,
439
+ metadata: call_metadata,
440
+ retry_policy: @config.rpcs.batch_create_target_sites.retry_policy
441
+
442
+ options.apply_defaults timeout: @config.timeout,
443
+ metadata: @config.metadata,
444
+ retry_policy: @config.retry_policy
445
+
446
+ @site_search_engine_service_stub.batch_create_target_sites request, options do |result, operation|
447
+ result = ::Gapic::Operation.new result, @operations_client, options: options
448
+ yield result, operation if block_given?
449
+ return result
450
+ end
451
+ rescue ::Gapic::Rest::Error => e
452
+ raise ::Google::Cloud::Error.from_error(e)
453
+ end
454
+
455
+ ##
456
+ # Gets a {::Google::Cloud::DiscoveryEngine::V1beta::TargetSite TargetSite}.
457
+ #
458
+ # @overload get_target_site(request, options = nil)
459
+ # Pass arguments to `get_target_site` via a request object, either of type
460
+ # {::Google::Cloud::DiscoveryEngine::V1beta::GetTargetSiteRequest} or an equivalent Hash.
461
+ #
462
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::GetTargetSiteRequest, ::Hash]
463
+ # A request object representing the call parameters. Required. To specify no
464
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
465
+ # @param options [::Gapic::CallOptions, ::Hash]
466
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
467
+ #
468
+ # @overload get_target_site(name: nil)
469
+ # Pass arguments to `get_target_site` via keyword arguments. Note that at
470
+ # least one keyword argument is required. To specify no parameters, or to keep all
471
+ # the default parameter values, pass an empty Hash as a request object (see above).
472
+ #
473
+ # @param name [::String]
474
+ # Required. Full resource name of
475
+ # {::Google::Cloud::DiscoveryEngine::V1beta::TargetSite TargetSite}, such as
476
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`.
477
+ #
478
+ # If the caller does not have permission to access the
479
+ # {::Google::Cloud::DiscoveryEngine::V1beta::TargetSite TargetSite}, regardless of
480
+ # whether or not it exists, a PERMISSION_DENIED error is returned.
481
+ #
482
+ # If the requested
483
+ # {::Google::Cloud::DiscoveryEngine::V1beta::TargetSite TargetSite} does not
484
+ # exist, a NOT_FOUND error is returned.
485
+ # @yield [result, operation] Access the result along with the TransportOperation object
486
+ # @yieldparam result [::Google::Cloud::DiscoveryEngine::V1beta::TargetSite]
487
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
488
+ #
489
+ # @return [::Google::Cloud::DiscoveryEngine::V1beta::TargetSite]
490
+ #
491
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
492
+ #
493
+ # @example Basic example
494
+ # require "google/cloud/discovery_engine/v1beta"
495
+ #
496
+ # # Create a client object. The client can be reused for multiple calls.
497
+ # client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new
498
+ #
499
+ # # Create a request. To set request fields, pass in keyword arguments.
500
+ # request = Google::Cloud::DiscoveryEngine::V1beta::GetTargetSiteRequest.new
501
+ #
502
+ # # Call the get_target_site method.
503
+ # result = client.get_target_site request
504
+ #
505
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::TargetSite.
506
+ # p result
507
+ #
508
+ def get_target_site request, options = nil
509
+ raise ::ArgumentError, "request must be provided" if request.nil?
510
+
511
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::GetTargetSiteRequest
512
+
513
+ # Converts hash and nil to an options object
514
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
515
+
516
+ # Customize the options with defaults
517
+ call_metadata = @config.rpcs.get_target_site.metadata.to_h
518
+
519
+ # Set x-goog-api-client and x-goog-user-project headers
520
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
521
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
522
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
523
+ transports_version_send: [:rest]
524
+
525
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
526
+
527
+ options.apply_defaults timeout: @config.rpcs.get_target_site.timeout,
528
+ metadata: call_metadata,
529
+ retry_policy: @config.rpcs.get_target_site.retry_policy
530
+
531
+ options.apply_defaults timeout: @config.timeout,
532
+ metadata: @config.metadata,
533
+ retry_policy: @config.retry_policy
534
+
535
+ @site_search_engine_service_stub.get_target_site request, options do |result, operation|
536
+ yield result, operation if block_given?
537
+ return result
538
+ end
539
+ rescue ::Gapic::Rest::Error => e
540
+ raise ::Google::Cloud::Error.from_error(e)
541
+ end
542
+
543
+ ##
544
+ # Updates a {::Google::Cloud::DiscoveryEngine::V1beta::TargetSite TargetSite}.
545
+ #
546
+ # @overload update_target_site(request, options = nil)
547
+ # Pass arguments to `update_target_site` via a request object, either of type
548
+ # {::Google::Cloud::DiscoveryEngine::V1beta::UpdateTargetSiteRequest} or an equivalent Hash.
549
+ #
550
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::UpdateTargetSiteRequest, ::Hash]
551
+ # A request object representing the call parameters. Required. To specify no
552
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
553
+ # @param options [::Gapic::CallOptions, ::Hash]
554
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
555
+ #
556
+ # @overload update_target_site(target_site: nil)
557
+ # Pass arguments to `update_target_site` via keyword arguments. Note that at
558
+ # least one keyword argument is required. To specify no parameters, or to keep all
559
+ # the default parameter values, pass an empty Hash as a request object (see above).
560
+ #
561
+ # @param target_site [::Google::Cloud::DiscoveryEngine::V1beta::TargetSite, ::Hash]
562
+ # Required. The target site to update.
563
+ # If the caller does not have permission to update the
564
+ # {::Google::Cloud::DiscoveryEngine::V1beta::TargetSite TargetSite}, regardless of
565
+ # whether or not it exists, a PERMISSION_DENIED error is returned.
566
+ #
567
+ # If the {::Google::Cloud::DiscoveryEngine::V1beta::TargetSite TargetSite} to
568
+ # update does not exist, a NOT_FOUND error is returned.
569
+ # @yield [result, operation] Access the result along with the TransportOperation object
570
+ # @yieldparam result [::Gapic::Operation]
571
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
572
+ #
573
+ # @return [::Gapic::Operation]
574
+ #
575
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
576
+ #
577
+ # @example Basic example
578
+ # require "google/cloud/discovery_engine/v1beta"
579
+ #
580
+ # # Create a client object. The client can be reused for multiple calls.
581
+ # client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new
582
+ #
583
+ # # Create a request. To set request fields, pass in keyword arguments.
584
+ # request = Google::Cloud::DiscoveryEngine::V1beta::UpdateTargetSiteRequest.new
585
+ #
586
+ # # Call the update_target_site method.
587
+ # result = client.update_target_site request
588
+ #
589
+ # # The returned object is of type Gapic::Operation. You can use it to
590
+ # # check the status of an operation, cancel it, or wait for results.
591
+ # # Here is how to wait for a response.
592
+ # result.wait_until_done! timeout: 60
593
+ # if result.response?
594
+ # p result.response
595
+ # else
596
+ # puts "No response received."
597
+ # end
598
+ #
599
+ def update_target_site request, options = nil
600
+ raise ::ArgumentError, "request must be provided" if request.nil?
601
+
602
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::UpdateTargetSiteRequest
603
+
604
+ # Converts hash and nil to an options object
605
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
606
+
607
+ # Customize the options with defaults
608
+ call_metadata = @config.rpcs.update_target_site.metadata.to_h
609
+
610
+ # Set x-goog-api-client and x-goog-user-project headers
611
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
612
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
613
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
614
+ transports_version_send: [:rest]
615
+
616
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
617
+
618
+ options.apply_defaults timeout: @config.rpcs.update_target_site.timeout,
619
+ metadata: call_metadata,
620
+ retry_policy: @config.rpcs.update_target_site.retry_policy
621
+
622
+ options.apply_defaults timeout: @config.timeout,
623
+ metadata: @config.metadata,
624
+ retry_policy: @config.retry_policy
625
+
626
+ @site_search_engine_service_stub.update_target_site request, options do |result, operation|
627
+ result = ::Gapic::Operation.new result, @operations_client, options: options
628
+ yield result, operation if block_given?
629
+ return result
630
+ end
631
+ rescue ::Gapic::Rest::Error => e
632
+ raise ::Google::Cloud::Error.from_error(e)
633
+ end
634
+
635
+ ##
636
+ # Deletes a {::Google::Cloud::DiscoveryEngine::V1beta::TargetSite TargetSite}.
637
+ #
638
+ # @overload delete_target_site(request, options = nil)
639
+ # Pass arguments to `delete_target_site` via a request object, either of type
640
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DeleteTargetSiteRequest} or an equivalent Hash.
641
+ #
642
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::DeleteTargetSiteRequest, ::Hash]
643
+ # A request object representing the call parameters. Required. To specify no
644
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
645
+ # @param options [::Gapic::CallOptions, ::Hash]
646
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
647
+ #
648
+ # @overload delete_target_site(name: nil)
649
+ # Pass arguments to `delete_target_site` via keyword arguments. Note that at
650
+ # least one keyword argument is required. To specify no parameters, or to keep all
651
+ # the default parameter values, pass an empty Hash as a request object (see above).
652
+ #
653
+ # @param name [::String]
654
+ # Required. Full resource name of
655
+ # {::Google::Cloud::DiscoveryEngine::V1beta::TargetSite TargetSite}, such as
656
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine/targetSites/{target_site}`.
657
+ #
658
+ # If the caller does not have permission to access the
659
+ # {::Google::Cloud::DiscoveryEngine::V1beta::TargetSite TargetSite}, regardless of
660
+ # whether or not it exists, a PERMISSION_DENIED error is returned.
661
+ #
662
+ # If the requested
663
+ # {::Google::Cloud::DiscoveryEngine::V1beta::TargetSite TargetSite} does not
664
+ # exist, a NOT_FOUND error is returned.
665
+ # @yield [result, operation] Access the result along with the TransportOperation object
666
+ # @yieldparam result [::Gapic::Operation]
667
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
668
+ #
669
+ # @return [::Gapic::Operation]
670
+ #
671
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
672
+ #
673
+ # @example Basic example
674
+ # require "google/cloud/discovery_engine/v1beta"
675
+ #
676
+ # # Create a client object. The client can be reused for multiple calls.
677
+ # client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new
678
+ #
679
+ # # Create a request. To set request fields, pass in keyword arguments.
680
+ # request = Google::Cloud::DiscoveryEngine::V1beta::DeleteTargetSiteRequest.new
681
+ #
682
+ # # Call the delete_target_site method.
683
+ # result = client.delete_target_site request
684
+ #
685
+ # # The returned object is of type Gapic::Operation. You can use it to
686
+ # # check the status of an operation, cancel it, or wait for results.
687
+ # # Here is how to wait for a response.
688
+ # result.wait_until_done! timeout: 60
689
+ # if result.response?
690
+ # p result.response
691
+ # else
692
+ # puts "No response received."
693
+ # end
694
+ #
695
+ def delete_target_site request, options = nil
696
+ raise ::ArgumentError, "request must be provided" if request.nil?
697
+
698
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::DeleteTargetSiteRequest
699
+
700
+ # Converts hash and nil to an options object
701
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
702
+
703
+ # Customize the options with defaults
704
+ call_metadata = @config.rpcs.delete_target_site.metadata.to_h
705
+
706
+ # Set x-goog-api-client and x-goog-user-project headers
707
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
708
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
709
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
710
+ transports_version_send: [:rest]
711
+
712
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
713
+
714
+ options.apply_defaults timeout: @config.rpcs.delete_target_site.timeout,
715
+ metadata: call_metadata,
716
+ retry_policy: @config.rpcs.delete_target_site.retry_policy
717
+
718
+ options.apply_defaults timeout: @config.timeout,
719
+ metadata: @config.metadata,
720
+ retry_policy: @config.retry_policy
721
+
722
+ @site_search_engine_service_stub.delete_target_site request, options do |result, operation|
723
+ result = ::Gapic::Operation.new result, @operations_client, options: options
724
+ yield result, operation if block_given?
725
+ return result
726
+ end
727
+ rescue ::Gapic::Rest::Error => e
728
+ raise ::Google::Cloud::Error.from_error(e)
729
+ end
730
+
731
+ ##
732
+ # Gets a list of
733
+ # {::Google::Cloud::DiscoveryEngine::V1beta::TargetSite TargetSite}s.
734
+ #
735
+ # @overload list_target_sites(request, options = nil)
736
+ # Pass arguments to `list_target_sites` via a request object, either of type
737
+ # {::Google::Cloud::DiscoveryEngine::V1beta::ListTargetSitesRequest} or an equivalent Hash.
738
+ #
739
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::ListTargetSitesRequest, ::Hash]
740
+ # A request object representing the call parameters. Required. To specify no
741
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
742
+ # @param options [::Gapic::CallOptions, ::Hash]
743
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
744
+ #
745
+ # @overload list_target_sites(parent: nil, page_size: nil, page_token: nil)
746
+ # Pass arguments to `list_target_sites` via keyword arguments. Note that at
747
+ # least one keyword argument is required. To specify no parameters, or to keep all
748
+ # the default parameter values, pass an empty Hash as a request object (see above).
749
+ #
750
+ # @param parent [::String]
751
+ # Required. The parent site search engine resource name, such as
752
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.
753
+ #
754
+ # If the caller does not have permission to list
755
+ # {::Google::Cloud::DiscoveryEngine::V1beta::TargetSite TargetSite}s under this
756
+ # site search engine, regardless of whether or not this branch exists, a
757
+ # PERMISSION_DENIED error is returned.
758
+ # @param page_size [::Integer]
759
+ # Requested page size. Server may return fewer items than requested. If
760
+ # unspecified, server will pick an appropriate default. The maximum value is
761
+ # 1000; values above 1000 will be coerced to 1000.
762
+ #
763
+ # If this field is negative, an INVALID_ARGUMENT error is returned.
764
+ # @param page_token [::String]
765
+ # A page token, received from a previous `ListTargetSites` call.
766
+ # Provide this to retrieve the subsequent page.
767
+ #
768
+ # When paginating, all other parameters provided to `ListTargetSites`
769
+ # must match the call that provided the page token.
770
+ # @yield [result, operation] Access the result along with the TransportOperation object
771
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::TargetSite>]
772
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
773
+ #
774
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::TargetSite>]
775
+ #
776
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
777
+ #
778
+ # @example Basic example
779
+ # require "google/cloud/discovery_engine/v1beta"
780
+ #
781
+ # # Create a client object. The client can be reused for multiple calls.
782
+ # client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new
783
+ #
784
+ # # Create a request. To set request fields, pass in keyword arguments.
785
+ # request = Google::Cloud::DiscoveryEngine::V1beta::ListTargetSitesRequest.new
786
+ #
787
+ # # Call the list_target_sites method.
788
+ # result = client.list_target_sites request
789
+ #
790
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
791
+ # # over elements, and API calls will be issued to fetch pages as needed.
792
+ # result.each do |item|
793
+ # # Each element is of type ::Google::Cloud::DiscoveryEngine::V1beta::TargetSite.
794
+ # p item
795
+ # end
796
+ #
797
+ def list_target_sites request, options = nil
798
+ raise ::ArgumentError, "request must be provided" if request.nil?
799
+
800
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::ListTargetSitesRequest
801
+
802
+ # Converts hash and nil to an options object
803
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
804
+
805
+ # Customize the options with defaults
806
+ call_metadata = @config.rpcs.list_target_sites.metadata.to_h
807
+
808
+ # Set x-goog-api-client and x-goog-user-project headers
809
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
810
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
811
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
812
+ transports_version_send: [:rest]
813
+
814
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
815
+
816
+ options.apply_defaults timeout: @config.rpcs.list_target_sites.timeout,
817
+ metadata: call_metadata,
818
+ retry_policy: @config.rpcs.list_target_sites.retry_policy
819
+
820
+ options.apply_defaults timeout: @config.timeout,
821
+ metadata: @config.metadata,
822
+ retry_policy: @config.retry_policy
823
+
824
+ @site_search_engine_service_stub.list_target_sites request, options do |result, operation|
825
+ result = ::Gapic::Rest::PagedEnumerable.new @site_search_engine_service_stub, :list_target_sites, "target_sites", request, result, options
826
+ yield result, operation if block_given?
827
+ return result
828
+ end
829
+ rescue ::Gapic::Rest::Error => e
830
+ raise ::Google::Cloud::Error.from_error(e)
831
+ end
832
+
833
+ ##
834
+ # Upgrade from basic site search to advanced site search.
835
+ #
836
+ # @overload enable_advanced_site_search(request, options = nil)
837
+ # Pass arguments to `enable_advanced_site_search` via a request object, either of type
838
+ # {::Google::Cloud::DiscoveryEngine::V1beta::EnableAdvancedSiteSearchRequest} or an equivalent Hash.
839
+ #
840
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::EnableAdvancedSiteSearchRequest, ::Hash]
841
+ # A request object representing the call parameters. Required. To specify no
842
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
843
+ # @param options [::Gapic::CallOptions, ::Hash]
844
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
845
+ #
846
+ # @overload enable_advanced_site_search(site_search_engine: nil)
847
+ # Pass arguments to `enable_advanced_site_search` via keyword arguments. Note that at
848
+ # least one keyword argument is required. To specify no parameters, or to keep all
849
+ # the default parameter values, pass an empty Hash as a request object (see above).
850
+ #
851
+ # @param site_search_engine [::String]
852
+ # Required. Full resource name of the
853
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngine SiteSearchEngine},
854
+ # such as
855
+ # `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`.
856
+ # @yield [result, operation] Access the result along with the TransportOperation object
857
+ # @yieldparam result [::Gapic::Operation]
858
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
859
+ #
860
+ # @return [::Gapic::Operation]
861
+ #
862
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
863
+ #
864
+ # @example Basic example
865
+ # require "google/cloud/discovery_engine/v1beta"
866
+ #
867
+ # # Create a client object. The client can be reused for multiple calls.
868
+ # client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new
869
+ #
870
+ # # Create a request. To set request fields, pass in keyword arguments.
871
+ # request = Google::Cloud::DiscoveryEngine::V1beta::EnableAdvancedSiteSearchRequest.new
872
+ #
873
+ # # Call the enable_advanced_site_search method.
874
+ # result = client.enable_advanced_site_search request
875
+ #
876
+ # # The returned object is of type Gapic::Operation. You can use it to
877
+ # # check the status of an operation, cancel it, or wait for results.
878
+ # # Here is how to wait for a response.
879
+ # result.wait_until_done! timeout: 60
880
+ # if result.response?
881
+ # p result.response
882
+ # else
883
+ # puts "No response received."
884
+ # end
885
+ #
886
+ def enable_advanced_site_search request, options = nil
887
+ raise ::ArgumentError, "request must be provided" if request.nil?
888
+
889
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::EnableAdvancedSiteSearchRequest
890
+
891
+ # Converts hash and nil to an options object
892
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
893
+
894
+ # Customize the options with defaults
895
+ call_metadata = @config.rpcs.enable_advanced_site_search.metadata.to_h
896
+
897
+ # Set x-goog-api-client and x-goog-user-project headers
898
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
899
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
900
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
901
+ transports_version_send: [:rest]
902
+
903
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
904
+
905
+ options.apply_defaults timeout: @config.rpcs.enable_advanced_site_search.timeout,
906
+ metadata: call_metadata,
907
+ retry_policy: @config.rpcs.enable_advanced_site_search.retry_policy
908
+
909
+ options.apply_defaults timeout: @config.timeout,
910
+ metadata: @config.metadata,
911
+ retry_policy: @config.retry_policy
912
+
913
+ @site_search_engine_service_stub.enable_advanced_site_search request, options do |result, operation|
914
+ result = ::Gapic::Operation.new result, @operations_client, options: options
915
+ yield result, operation if block_given?
916
+ return result
917
+ end
918
+ rescue ::Gapic::Rest::Error => e
919
+ raise ::Google::Cloud::Error.from_error(e)
920
+ end
921
+
922
+ ##
923
+ # Downgrade from advanced site search to basic site search.
924
+ #
925
+ # @overload disable_advanced_site_search(request, options = nil)
926
+ # Pass arguments to `disable_advanced_site_search` via a request object, either of type
927
+ # {::Google::Cloud::DiscoveryEngine::V1beta::DisableAdvancedSiteSearchRequest} or an equivalent Hash.
928
+ #
929
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::DisableAdvancedSiteSearchRequest, ::Hash]
930
+ # A request object representing the call parameters. Required. To specify no
931
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
932
+ # @param options [::Gapic::CallOptions, ::Hash]
933
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
934
+ #
935
+ # @overload disable_advanced_site_search(site_search_engine: nil)
936
+ # Pass arguments to `disable_advanced_site_search` via keyword arguments. Note that at
937
+ # least one keyword argument is required. To specify no parameters, or to keep all
938
+ # the default parameter values, pass an empty Hash as a request object (see above).
939
+ #
940
+ # @param site_search_engine [::String]
941
+ # Required. Full resource name of the
942
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngine SiteSearchEngine},
943
+ # such as
944
+ # `projects/{project}/locations/{location}/dataStores/{data_store_id}/siteSearchEngine`.
945
+ # @yield [result, operation] Access the result along with the TransportOperation object
946
+ # @yieldparam result [::Gapic::Operation]
947
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
948
+ #
949
+ # @return [::Gapic::Operation]
950
+ #
951
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
952
+ #
953
+ # @example Basic example
954
+ # require "google/cloud/discovery_engine/v1beta"
955
+ #
956
+ # # Create a client object. The client can be reused for multiple calls.
957
+ # client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new
958
+ #
959
+ # # Create a request. To set request fields, pass in keyword arguments.
960
+ # request = Google::Cloud::DiscoveryEngine::V1beta::DisableAdvancedSiteSearchRequest.new
961
+ #
962
+ # # Call the disable_advanced_site_search method.
963
+ # result = client.disable_advanced_site_search request
964
+ #
965
+ # # The returned object is of type Gapic::Operation. You can use it to
966
+ # # check the status of an operation, cancel it, or wait for results.
967
+ # # Here is how to wait for a response.
968
+ # result.wait_until_done! timeout: 60
969
+ # if result.response?
970
+ # p result.response
971
+ # else
972
+ # puts "No response received."
973
+ # end
974
+ #
975
+ def disable_advanced_site_search request, options = nil
976
+ raise ::ArgumentError, "request must be provided" if request.nil?
977
+
978
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::DisableAdvancedSiteSearchRequest
979
+
980
+ # Converts hash and nil to an options object
981
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
982
+
983
+ # Customize the options with defaults
984
+ call_metadata = @config.rpcs.disable_advanced_site_search.metadata.to_h
985
+
986
+ # Set x-goog-api-client and x-goog-user-project headers
987
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
988
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
989
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
990
+ transports_version_send: [:rest]
991
+
992
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
993
+
994
+ options.apply_defaults timeout: @config.rpcs.disable_advanced_site_search.timeout,
995
+ metadata: call_metadata,
996
+ retry_policy: @config.rpcs.disable_advanced_site_search.retry_policy
997
+
998
+ options.apply_defaults timeout: @config.timeout,
999
+ metadata: @config.metadata,
1000
+ retry_policy: @config.retry_policy
1001
+
1002
+ @site_search_engine_service_stub.disable_advanced_site_search request, options do |result, operation|
1003
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1004
+ yield result, operation if block_given?
1005
+ return result
1006
+ end
1007
+ rescue ::Gapic::Rest::Error => e
1008
+ raise ::Google::Cloud::Error.from_error(e)
1009
+ end
1010
+
1011
+ ##
1012
+ # Request on-demand recrawl for a list of URIs.
1013
+ #
1014
+ # @overload recrawl_uris(request, options = nil)
1015
+ # Pass arguments to `recrawl_uris` via a request object, either of type
1016
+ # {::Google::Cloud::DiscoveryEngine::V1beta::RecrawlUrisRequest} or an equivalent Hash.
1017
+ #
1018
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::RecrawlUrisRequest, ::Hash]
1019
+ # A request object representing the call parameters. Required. To specify no
1020
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1021
+ # @param options [::Gapic::CallOptions, ::Hash]
1022
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1023
+ #
1024
+ # @overload recrawl_uris(site_search_engine: nil, uris: nil)
1025
+ # Pass arguments to `recrawl_uris` via keyword arguments. Note that at
1026
+ # least one keyword argument is required. To specify no parameters, or to keep all
1027
+ # the default parameter values, pass an empty Hash as a request object (see above).
1028
+ #
1029
+ # @param site_search_engine [::String]
1030
+ # Required. Full resource name of the
1031
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngine SiteSearchEngine},
1032
+ # such as
1033
+ # `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine`.
1034
+ # @param uris [::Array<::String>]
1035
+ # Required. List of URIs to crawl. At most 10K URIs are supported, otherwise
1036
+ # an INVALID_ARGUMENT error is thrown. Each URI should match at least one
1037
+ # {::Google::Cloud::DiscoveryEngine::V1beta::TargetSite TargetSite} in
1038
+ # `site_search_engine`.
1039
+ # @yield [result, operation] Access the result along with the TransportOperation object
1040
+ # @yieldparam result [::Gapic::Operation]
1041
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1042
+ #
1043
+ # @return [::Gapic::Operation]
1044
+ #
1045
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1046
+ #
1047
+ # @example Basic example
1048
+ # require "google/cloud/discovery_engine/v1beta"
1049
+ #
1050
+ # # Create a client object. The client can be reused for multiple calls.
1051
+ # client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new
1052
+ #
1053
+ # # Create a request. To set request fields, pass in keyword arguments.
1054
+ # request = Google::Cloud::DiscoveryEngine::V1beta::RecrawlUrisRequest.new
1055
+ #
1056
+ # # Call the recrawl_uris method.
1057
+ # result = client.recrawl_uris request
1058
+ #
1059
+ # # The returned object is of type Gapic::Operation. You can use it to
1060
+ # # check the status of an operation, cancel it, or wait for results.
1061
+ # # Here is how to wait for a response.
1062
+ # result.wait_until_done! timeout: 60
1063
+ # if result.response?
1064
+ # p result.response
1065
+ # else
1066
+ # puts "No response received."
1067
+ # end
1068
+ #
1069
+ def recrawl_uris request, options = nil
1070
+ raise ::ArgumentError, "request must be provided" if request.nil?
1071
+
1072
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::RecrawlUrisRequest
1073
+
1074
+ # Converts hash and nil to an options object
1075
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1076
+
1077
+ # Customize the options with defaults
1078
+ call_metadata = @config.rpcs.recrawl_uris.metadata.to_h
1079
+
1080
+ # Set x-goog-api-client and x-goog-user-project headers
1081
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1082
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1083
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
1084
+ transports_version_send: [:rest]
1085
+
1086
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1087
+
1088
+ options.apply_defaults timeout: @config.rpcs.recrawl_uris.timeout,
1089
+ metadata: call_metadata,
1090
+ retry_policy: @config.rpcs.recrawl_uris.retry_policy
1091
+
1092
+ options.apply_defaults timeout: @config.timeout,
1093
+ metadata: @config.metadata,
1094
+ retry_policy: @config.retry_policy
1095
+
1096
+ @site_search_engine_service_stub.recrawl_uris request, options do |result, operation|
1097
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1098
+ yield result, operation if block_given?
1099
+ return result
1100
+ end
1101
+ rescue ::Gapic::Rest::Error => e
1102
+ raise ::Google::Cloud::Error.from_error(e)
1103
+ end
1104
+
1105
+ ##
1106
+ # Verify target sites' ownership and validity.
1107
+ # This API sends all the target sites under site search engine for
1108
+ # verification.
1109
+ #
1110
+ # @overload batch_verify_target_sites(request, options = nil)
1111
+ # Pass arguments to `batch_verify_target_sites` via a request object, either of type
1112
+ # {::Google::Cloud::DiscoveryEngine::V1beta::BatchVerifyTargetSitesRequest} or an equivalent Hash.
1113
+ #
1114
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::BatchVerifyTargetSitesRequest, ::Hash]
1115
+ # A request object representing the call parameters. Required. To specify no
1116
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1117
+ # @param options [::Gapic::CallOptions, ::Hash]
1118
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1119
+ #
1120
+ # @overload batch_verify_target_sites(parent: nil)
1121
+ # Pass arguments to `batch_verify_target_sites` via keyword arguments. Note that at
1122
+ # least one keyword argument is required. To specify no parameters, or to keep all
1123
+ # the default parameter values, pass an empty Hash as a request object (see above).
1124
+ #
1125
+ # @param parent [::String]
1126
+ # Required. The parent resource shared by all TargetSites being verified.
1127
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.
1128
+ # @yield [result, operation] Access the result along with the TransportOperation object
1129
+ # @yieldparam result [::Gapic::Operation]
1130
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1131
+ #
1132
+ # @return [::Gapic::Operation]
1133
+ #
1134
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1135
+ #
1136
+ # @example Basic example
1137
+ # require "google/cloud/discovery_engine/v1beta"
1138
+ #
1139
+ # # Create a client object. The client can be reused for multiple calls.
1140
+ # client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new
1141
+ #
1142
+ # # Create a request. To set request fields, pass in keyword arguments.
1143
+ # request = Google::Cloud::DiscoveryEngine::V1beta::BatchVerifyTargetSitesRequest.new
1144
+ #
1145
+ # # Call the batch_verify_target_sites method.
1146
+ # result = client.batch_verify_target_sites request
1147
+ #
1148
+ # # The returned object is of type Gapic::Operation. You can use it to
1149
+ # # check the status of an operation, cancel it, or wait for results.
1150
+ # # Here is how to wait for a response.
1151
+ # result.wait_until_done! timeout: 60
1152
+ # if result.response?
1153
+ # p result.response
1154
+ # else
1155
+ # puts "No response received."
1156
+ # end
1157
+ #
1158
+ def batch_verify_target_sites request, options = nil
1159
+ raise ::ArgumentError, "request must be provided" if request.nil?
1160
+
1161
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::BatchVerifyTargetSitesRequest
1162
+
1163
+ # Converts hash and nil to an options object
1164
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1165
+
1166
+ # Customize the options with defaults
1167
+ call_metadata = @config.rpcs.batch_verify_target_sites.metadata.to_h
1168
+
1169
+ # Set x-goog-api-client and x-goog-user-project headers
1170
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1171
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1172
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
1173
+ transports_version_send: [:rest]
1174
+
1175
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1176
+
1177
+ options.apply_defaults timeout: @config.rpcs.batch_verify_target_sites.timeout,
1178
+ metadata: call_metadata,
1179
+ retry_policy: @config.rpcs.batch_verify_target_sites.retry_policy
1180
+
1181
+ options.apply_defaults timeout: @config.timeout,
1182
+ metadata: @config.metadata,
1183
+ retry_policy: @config.retry_policy
1184
+
1185
+ @site_search_engine_service_stub.batch_verify_target_sites request, options do |result, operation|
1186
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1187
+ yield result, operation if block_given?
1188
+ return result
1189
+ end
1190
+ rescue ::Gapic::Rest::Error => e
1191
+ raise ::Google::Cloud::Error.from_error(e)
1192
+ end
1193
+
1194
+ ##
1195
+ # Returns list of target sites with its domain verification status.
1196
+ # This method can only be called under data store with BASIC_SITE_SEARCH
1197
+ # state at the moment.
1198
+ #
1199
+ # @overload fetch_domain_verification_status(request, options = nil)
1200
+ # Pass arguments to `fetch_domain_verification_status` via a request object, either of type
1201
+ # {::Google::Cloud::DiscoveryEngine::V1beta::FetchDomainVerificationStatusRequest} or an equivalent Hash.
1202
+ #
1203
+ # @param request [::Google::Cloud::DiscoveryEngine::V1beta::FetchDomainVerificationStatusRequest, ::Hash]
1204
+ # A request object representing the call parameters. Required. To specify no
1205
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1206
+ # @param options [::Gapic::CallOptions, ::Hash]
1207
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1208
+ #
1209
+ # @overload fetch_domain_verification_status(site_search_engine: nil, page_size: nil, page_token: nil)
1210
+ # Pass arguments to `fetch_domain_verification_status` via keyword arguments. Note that at
1211
+ # least one keyword argument is required. To specify no parameters, or to keep all
1212
+ # the default parameter values, pass an empty Hash as a request object (see above).
1213
+ #
1214
+ # @param site_search_engine [::String]
1215
+ # Required. The site search engine resource under which we fetch all the
1216
+ # domain verification status.
1217
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/siteSearchEngine`.
1218
+ # @param page_size [::Integer]
1219
+ # Requested page size. Server may return fewer items than requested. If
1220
+ # unspecified, server will pick an appropriate default. The maximum value is
1221
+ # 1000; values above 1000 will be coerced to 1000.
1222
+ #
1223
+ # If this field is negative, an INVALID_ARGUMENT error is returned.
1224
+ # @param page_token [::String]
1225
+ # A page token, received from a previous `FetchDomainVerificationStatus`
1226
+ # call. Provide this to retrieve the subsequent page.
1227
+ #
1228
+ # When paginating, all other parameters provided to
1229
+ # `FetchDomainVerificationStatus` must match the call that provided the page
1230
+ # token.
1231
+ # @yield [result, operation] Access the result along with the TransportOperation object
1232
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::TargetSite>]
1233
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1234
+ #
1235
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::TargetSite>]
1236
+ #
1237
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1238
+ #
1239
+ # @example Basic example
1240
+ # require "google/cloud/discovery_engine/v1beta"
1241
+ #
1242
+ # # Create a client object. The client can be reused for multiple calls.
1243
+ # client = Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new
1244
+ #
1245
+ # # Create a request. To set request fields, pass in keyword arguments.
1246
+ # request = Google::Cloud::DiscoveryEngine::V1beta::FetchDomainVerificationStatusRequest.new
1247
+ #
1248
+ # # Call the fetch_domain_verification_status method.
1249
+ # result = client.fetch_domain_verification_status request
1250
+ #
1251
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1252
+ # # over elements, and API calls will be issued to fetch pages as needed.
1253
+ # result.each do |item|
1254
+ # # Each element is of type ::Google::Cloud::DiscoveryEngine::V1beta::TargetSite.
1255
+ # p item
1256
+ # end
1257
+ #
1258
+ def fetch_domain_verification_status request, options = nil
1259
+ raise ::ArgumentError, "request must be provided" if request.nil?
1260
+
1261
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::FetchDomainVerificationStatusRequest
1262
+
1263
+ # Converts hash and nil to an options object
1264
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1265
+
1266
+ # Customize the options with defaults
1267
+ call_metadata = @config.rpcs.fetch_domain_verification_status.metadata.to_h
1268
+
1269
+ # Set x-goog-api-client and x-goog-user-project headers
1270
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1271
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1272
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
1273
+ transports_version_send: [:rest]
1274
+
1275
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1276
+
1277
+ options.apply_defaults timeout: @config.rpcs.fetch_domain_verification_status.timeout,
1278
+ metadata: call_metadata,
1279
+ retry_policy: @config.rpcs.fetch_domain_verification_status.retry_policy
1280
+
1281
+ options.apply_defaults timeout: @config.timeout,
1282
+ metadata: @config.metadata,
1283
+ retry_policy: @config.retry_policy
1284
+
1285
+ @site_search_engine_service_stub.fetch_domain_verification_status request, options do |result, operation|
1286
+ result = ::Gapic::Rest::PagedEnumerable.new @site_search_engine_service_stub, :fetch_domain_verification_status, "target_sites", request, result, options
1287
+ yield result, operation if block_given?
1288
+ return result
1289
+ end
1290
+ rescue ::Gapic::Rest::Error => e
1291
+ raise ::Google::Cloud::Error.from_error(e)
1292
+ end
1293
+
1294
+ ##
1295
+ # Configuration class for the SiteSearchEngineService REST API.
1296
+ #
1297
+ # This class represents the configuration for SiteSearchEngineService REST,
1298
+ # providing control over timeouts, retry behavior, logging, transport
1299
+ # parameters, and other low-level controls. Certain parameters can also be
1300
+ # applied individually to specific RPCs. See
1301
+ # {::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client::Configuration::Rpcs}
1302
+ # for a list of RPCs that can be configured independently.
1303
+ #
1304
+ # Configuration can be applied globally to all clients, or to a single client
1305
+ # on construction.
1306
+ #
1307
+ # @example
1308
+ #
1309
+ # # Modify the global config, setting the timeout for
1310
+ # # get_site_search_engine to 20 seconds,
1311
+ # # and all remaining timeouts to 10 seconds.
1312
+ # ::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.configure do |config|
1313
+ # config.timeout = 10.0
1314
+ # config.rpcs.get_site_search_engine.timeout = 20.0
1315
+ # end
1316
+ #
1317
+ # # Apply the above configuration only to a new client.
1318
+ # client = ::Google::Cloud::DiscoveryEngine::V1beta::SiteSearchEngineService::Rest::Client.new do |config|
1319
+ # config.timeout = 10.0
1320
+ # config.rpcs.get_site_search_engine.timeout = 20.0
1321
+ # end
1322
+ #
1323
+ # @!attribute [rw] endpoint
1324
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1325
+ # nil, indicating to use the default endpoint in the current universe domain.
1326
+ # @return [::String,nil]
1327
+ # @!attribute [rw] credentials
1328
+ # Credentials to send with calls. You may provide any of the following types:
1329
+ # * (`String`) The path to a service account key file in JSON format
1330
+ # * (`Hash`) A service account key as a Hash
1331
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1332
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1333
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1334
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1335
+ # * (`nil`) indicating no credentials
1336
+ # @return [::Object]
1337
+ # @!attribute [rw] scope
1338
+ # The OAuth scopes
1339
+ # @return [::Array<::String>]
1340
+ # @!attribute [rw] lib_name
1341
+ # The library name as recorded in instrumentation and logging
1342
+ # @return [::String]
1343
+ # @!attribute [rw] lib_version
1344
+ # The library version as recorded in instrumentation and logging
1345
+ # @return [::String]
1346
+ # @!attribute [rw] timeout
1347
+ # The call timeout in seconds.
1348
+ # @return [::Numeric]
1349
+ # @!attribute [rw] metadata
1350
+ # Additional headers to be sent with the call.
1351
+ # @return [::Hash{::Symbol=>::String}]
1352
+ # @!attribute [rw] retry_policy
1353
+ # The retry policy. The value is a hash with the following keys:
1354
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1355
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1356
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1357
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1358
+ # trigger a retry.
1359
+ # @return [::Hash]
1360
+ # @!attribute [rw] quota_project
1361
+ # A separate project against which to charge quota.
1362
+ # @return [::String]
1363
+ # @!attribute [rw] universe_domain
1364
+ # The universe domain within which to make requests. This determines the
1365
+ # default endpoint URL. The default value of nil uses the environment
1366
+ # universe (usually the default "googleapis.com" universe).
1367
+ # @return [::String,nil]
1368
+ #
1369
+ class Configuration
1370
+ extend ::Gapic::Config
1371
+
1372
+ # @private
1373
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1374
+ DEFAULT_ENDPOINT = "discoveryengine.googleapis.com"
1375
+
1376
+ config_attr :endpoint, nil, ::String, nil
1377
+ config_attr :credentials, nil do |value|
1378
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1379
+ allowed.any? { |klass| klass === value }
1380
+ end
1381
+ config_attr :scope, nil, ::String, ::Array, nil
1382
+ config_attr :lib_name, nil, ::String, nil
1383
+ config_attr :lib_version, nil, ::String, nil
1384
+ config_attr :timeout, nil, ::Numeric, nil
1385
+ config_attr :metadata, nil, ::Hash, nil
1386
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1387
+ config_attr :quota_project, nil, ::String, nil
1388
+ config_attr :universe_domain, nil, ::String, nil
1389
+
1390
+ # @private
1391
+ def initialize parent_config = nil
1392
+ @parent_config = parent_config unless parent_config.nil?
1393
+
1394
+ yield self if block_given?
1395
+ end
1396
+
1397
+ ##
1398
+ # Configurations for individual RPCs
1399
+ # @return [Rpcs]
1400
+ #
1401
+ def rpcs
1402
+ @rpcs ||= begin
1403
+ parent_rpcs = nil
1404
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1405
+ Rpcs.new parent_rpcs
1406
+ end
1407
+ end
1408
+
1409
+ ##
1410
+ # Configuration RPC class for the SiteSearchEngineService API.
1411
+ #
1412
+ # Includes fields providing the configuration for each RPC in this service.
1413
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1414
+ # the following configuration fields:
1415
+ #
1416
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1417
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1418
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1419
+ # include the following keys:
1420
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1421
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1422
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1423
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1424
+ # trigger a retry.
1425
+ #
1426
+ class Rpcs
1427
+ ##
1428
+ # RPC-specific configuration for `get_site_search_engine`
1429
+ # @return [::Gapic::Config::Method]
1430
+ #
1431
+ attr_reader :get_site_search_engine
1432
+ ##
1433
+ # RPC-specific configuration for `create_target_site`
1434
+ # @return [::Gapic::Config::Method]
1435
+ #
1436
+ attr_reader :create_target_site
1437
+ ##
1438
+ # RPC-specific configuration for `batch_create_target_sites`
1439
+ # @return [::Gapic::Config::Method]
1440
+ #
1441
+ attr_reader :batch_create_target_sites
1442
+ ##
1443
+ # RPC-specific configuration for `get_target_site`
1444
+ # @return [::Gapic::Config::Method]
1445
+ #
1446
+ attr_reader :get_target_site
1447
+ ##
1448
+ # RPC-specific configuration for `update_target_site`
1449
+ # @return [::Gapic::Config::Method]
1450
+ #
1451
+ attr_reader :update_target_site
1452
+ ##
1453
+ # RPC-specific configuration for `delete_target_site`
1454
+ # @return [::Gapic::Config::Method]
1455
+ #
1456
+ attr_reader :delete_target_site
1457
+ ##
1458
+ # RPC-specific configuration for `list_target_sites`
1459
+ # @return [::Gapic::Config::Method]
1460
+ #
1461
+ attr_reader :list_target_sites
1462
+ ##
1463
+ # RPC-specific configuration for `enable_advanced_site_search`
1464
+ # @return [::Gapic::Config::Method]
1465
+ #
1466
+ attr_reader :enable_advanced_site_search
1467
+ ##
1468
+ # RPC-specific configuration for `disable_advanced_site_search`
1469
+ # @return [::Gapic::Config::Method]
1470
+ #
1471
+ attr_reader :disable_advanced_site_search
1472
+ ##
1473
+ # RPC-specific configuration for `recrawl_uris`
1474
+ # @return [::Gapic::Config::Method]
1475
+ #
1476
+ attr_reader :recrawl_uris
1477
+ ##
1478
+ # RPC-specific configuration for `batch_verify_target_sites`
1479
+ # @return [::Gapic::Config::Method]
1480
+ #
1481
+ attr_reader :batch_verify_target_sites
1482
+ ##
1483
+ # RPC-specific configuration for `fetch_domain_verification_status`
1484
+ # @return [::Gapic::Config::Method]
1485
+ #
1486
+ attr_reader :fetch_domain_verification_status
1487
+
1488
+ # @private
1489
+ def initialize parent_rpcs = nil
1490
+ get_site_search_engine_config = parent_rpcs.get_site_search_engine if parent_rpcs.respond_to? :get_site_search_engine
1491
+ @get_site_search_engine = ::Gapic::Config::Method.new get_site_search_engine_config
1492
+ create_target_site_config = parent_rpcs.create_target_site if parent_rpcs.respond_to? :create_target_site
1493
+ @create_target_site = ::Gapic::Config::Method.new create_target_site_config
1494
+ batch_create_target_sites_config = parent_rpcs.batch_create_target_sites if parent_rpcs.respond_to? :batch_create_target_sites
1495
+ @batch_create_target_sites = ::Gapic::Config::Method.new batch_create_target_sites_config
1496
+ get_target_site_config = parent_rpcs.get_target_site if parent_rpcs.respond_to? :get_target_site
1497
+ @get_target_site = ::Gapic::Config::Method.new get_target_site_config
1498
+ update_target_site_config = parent_rpcs.update_target_site if parent_rpcs.respond_to? :update_target_site
1499
+ @update_target_site = ::Gapic::Config::Method.new update_target_site_config
1500
+ delete_target_site_config = parent_rpcs.delete_target_site if parent_rpcs.respond_to? :delete_target_site
1501
+ @delete_target_site = ::Gapic::Config::Method.new delete_target_site_config
1502
+ list_target_sites_config = parent_rpcs.list_target_sites if parent_rpcs.respond_to? :list_target_sites
1503
+ @list_target_sites = ::Gapic::Config::Method.new list_target_sites_config
1504
+ enable_advanced_site_search_config = parent_rpcs.enable_advanced_site_search if parent_rpcs.respond_to? :enable_advanced_site_search
1505
+ @enable_advanced_site_search = ::Gapic::Config::Method.new enable_advanced_site_search_config
1506
+ disable_advanced_site_search_config = parent_rpcs.disable_advanced_site_search if parent_rpcs.respond_to? :disable_advanced_site_search
1507
+ @disable_advanced_site_search = ::Gapic::Config::Method.new disable_advanced_site_search_config
1508
+ recrawl_uris_config = parent_rpcs.recrawl_uris if parent_rpcs.respond_to? :recrawl_uris
1509
+ @recrawl_uris = ::Gapic::Config::Method.new recrawl_uris_config
1510
+ batch_verify_target_sites_config = parent_rpcs.batch_verify_target_sites if parent_rpcs.respond_to? :batch_verify_target_sites
1511
+ @batch_verify_target_sites = ::Gapic::Config::Method.new batch_verify_target_sites_config
1512
+ fetch_domain_verification_status_config = parent_rpcs.fetch_domain_verification_status if parent_rpcs.respond_to? :fetch_domain_verification_status
1513
+ @fetch_domain_verification_status = ::Gapic::Config::Method.new fetch_domain_verification_status_config
1514
+
1515
+ yield self if block_given?
1516
+ end
1517
+ end
1518
+ end
1519
+ end
1520
+ end
1521
+ end
1522
+ end
1523
+ end
1524
+ end
1525
+ end