google-cloud-discovery_engine-v1beta 0.4.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb +24 -1
  4. data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb +30 -0
  5. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +45 -2
  6. data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb +135 -1
  7. data/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +24 -1
  8. data/lib/google/cloud/discovery_engine/v1beta/document_service/operations.rb +10 -1
  9. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb +144 -0
  10. data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb +75 -0
  11. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/client.rb +24 -1
  12. data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/client.rb +30 -0
  13. data/lib/google/cloud/discovery_engine/v1beta/schema_service/client.rb +24 -1
  14. data/lib/google/cloud/discovery_engine/v1beta/schema_service/operations.rb +10 -1
  15. data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/client.rb +119 -0
  16. data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb +75 -0
  17. data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +54 -2
  18. data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +64 -1
  19. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb +24 -1
  20. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/operations.rb +10 -1
  21. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb +69 -0
  22. data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb +75 -0
  23. data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
  24. data/lib/google/cloud/discoveryengine/v1beta/common_pb.rb +2 -1
  25. data/lib/google/cloud/discoveryengine/v1beta/conversation_pb.rb +3 -1
  26. data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +2 -2
  27. data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +5 -1
  28. data/lib/google/cloud/discoveryengine/v1beta/user_event_pb.rb +1 -1
  29. data/proto_docs/google/api/field_behavior.rb +14 -0
  30. data/proto_docs/google/cloud/discoveryengine/v1beta/common.rb +9 -0
  31. data/proto_docs/google/cloud/discoveryengine/v1beta/conversation.rb +4 -0
  32. data/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb +34 -0
  33. data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +136 -3
  34. data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +4 -0
  35. metadata +25 -5
@@ -136,6 +136,26 @@ module Google
136
136
  # @return [::Gapic::Operation]
137
137
  #
138
138
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
139
+ #
140
+ # @example Basic example
141
+ # require "google/longrunning"
142
+ #
143
+ # # Create a client object. The client can be reused for multiple calls.
144
+ # client = Google::Longrunning::Operations::Rest::Client.new
145
+ #
146
+ # # Create a request. To set request fields, pass in keyword arguments.
147
+ # request = Google::Longrunning::ListOperationsRequest.new
148
+ #
149
+ # # Call the list_operations method.
150
+ # result = client.list_operations request
151
+ #
152
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
153
+ # # over elements, and API calls will be issued to fetch pages as needed.
154
+ # result.each do |item|
155
+ # # Each element is of type ::Google::Longrunning::Operation.
156
+ # p item
157
+ # end
158
+ #
139
159
  def list_operations request, options = nil
140
160
  raise ::ArgumentError, "request must be provided" if request.nil?
141
161
 
@@ -201,6 +221,29 @@ module Google
201
221
  # @return [::Gapic::Operation]
202
222
  #
203
223
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
224
+ #
225
+ # @example Basic example
226
+ # require "google/longrunning"
227
+ #
228
+ # # Create a client object. The client can be reused for multiple calls.
229
+ # client = Google::Longrunning::Operations::Rest::Client.new
230
+ #
231
+ # # Create a request. To set request fields, pass in keyword arguments.
232
+ # request = Google::Longrunning::GetOperationRequest.new
233
+ #
234
+ # # Call the get_operation method.
235
+ # result = client.get_operation request
236
+ #
237
+ # # The returned object is of type Gapic::Operation. You can use it to
238
+ # # check the status of an operation, cancel it, or wait for results.
239
+ # # Here is how to wait for a response.
240
+ # result.wait_until_done! timeout: 60
241
+ # if result.response?
242
+ # p result.response
243
+ # else
244
+ # puts "No response received."
245
+ # end
246
+ #
204
247
  def get_operation request, options = nil
205
248
  raise ::ArgumentError, "request must be provided" if request.nil?
206
249
 
@@ -267,6 +310,22 @@ module Google
267
310
  # @return [::Google::Protobuf::Empty]
268
311
  #
269
312
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
313
+ #
314
+ # @example Basic example
315
+ # require "google/longrunning"
316
+ #
317
+ # # Create a client object. The client can be reused for multiple calls.
318
+ # client = Google::Longrunning::Operations::Rest::Client.new
319
+ #
320
+ # # Create a request. To set request fields, pass in keyword arguments.
321
+ # request = Google::Longrunning::DeleteOperationRequest.new
322
+ #
323
+ # # Call the delete_operation method.
324
+ # result = client.delete_operation request
325
+ #
326
+ # # The returned object is of type Google::Protobuf::Empty.
327
+ # p result
328
+ #
270
329
  def delete_operation request, options = nil
271
330
  raise ::ArgumentError, "request must be provided" if request.nil?
272
331
 
@@ -338,6 +397,22 @@ module Google
338
397
  # @return [::Google::Protobuf::Empty]
339
398
  #
340
399
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
400
+ #
401
+ # @example Basic example
402
+ # require "google/longrunning"
403
+ #
404
+ # # Create a client object. The client can be reused for multiple calls.
405
+ # client = Google::Longrunning::Operations::Rest::Client.new
406
+ #
407
+ # # Create a request. To set request fields, pass in keyword arguments.
408
+ # request = Google::Longrunning::CancelOperationRequest.new
409
+ #
410
+ # # Call the cancel_operation method.
411
+ # result = client.cancel_operation request
412
+ #
413
+ # # The returned object is of type Google::Protobuf::Empty.
414
+ # p result
415
+ #
341
416
  def cancel_operation request, options = nil
342
417
  raise ::ArgumentError, "request must be provided" if request.nil?
343
418
 
@@ -18,6 +18,7 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/discoveryengine/v1beta/search_service_pb"
21
+ require "google/cloud/location"
21
22
 
22
23
  module Google
23
24
  module Cloud
@@ -138,15 +139,29 @@ module Google
138
139
  @quota_project_id = @config.quota_project
139
140
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
140
141
 
142
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
143
+ config.credentials = credentials
144
+ config.quota_project = @quota_project_id
145
+ config.endpoint = @config.endpoint
146
+ end
147
+
141
148
  @search_service_stub = ::Gapic::ServiceStub.new(
142
149
  ::Google::Cloud::DiscoveryEngine::V1beta::SearchService::Stub,
143
150
  credentials: credentials,
144
151
  endpoint: @config.endpoint,
145
152
  channel_args: @config.channel_args,
146
- interceptors: @config.interceptors
153
+ interceptors: @config.interceptors,
154
+ channel_pool_config: @config.channel_pool
147
155
  )
148
156
  end
149
157
 
158
+ ##
159
+ # Get the associated client for mix-in of the Locations.
160
+ #
161
+ # @return [Google::Cloud::Location::Locations::Client]
162
+ #
163
+ attr_reader :location_client
164
+
150
165
  # Service calls
151
166
 
152
167
  ##
@@ -162,7 +177,7 @@ module Google
162
177
  # @param options [::Gapic::CallOptions, ::Hash]
163
178
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
164
179
  #
165
- # @overload search(serving_config: nil, branch: nil, query: nil, image_query: nil, page_size: nil, page_token: nil, offset: nil, filter: nil, order_by: nil, user_info: nil, facet_specs: nil, boost_spec: nil, params: nil, query_expansion_spec: nil, spell_correction_spec: nil, user_pseudo_id: nil, content_search_spec: nil, safe_search: nil, user_labels: nil)
180
+ # @overload search(serving_config: nil, branch: nil, query: nil, image_query: nil, page_size: nil, page_token: nil, offset: nil, filter: nil, order_by: nil, user_info: nil, facet_specs: nil, boost_spec: nil, params: nil, query_expansion_spec: nil, spell_correction_spec: nil, user_pseudo_id: nil, content_search_spec: nil, embedding_spec: nil, ranking_expression: nil, safe_search: nil, user_labels: nil)
166
181
  # Pass arguments to `search` via keyword arguments. Note that at
167
182
  # least one keyword argument is required. To specify no parameters, or to keep all
168
183
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -264,6 +279,35 @@ module Google
264
279
  # characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
265
280
  # @param content_search_spec [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec, ::Hash]
266
281
  # A specification for configuring the behavior of content search.
282
+ # @param embedding_spec [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::EmbeddingSpec, ::Hash]
283
+ # Uses the provided embedding to do additional semantic document retrieval.
284
+ # The retrieval is based on the dot product of
285
+ # [SearchRequest.embedding_spec.embedding_vectors.vector][] and the document
286
+ # embedding that is provided in
287
+ # [SearchRequest.embedding_spec.embedding_vectors.field_path][].
288
+ #
289
+ # If [SearchRequest.embedding_spec.embedding_vectors.field_path][] is not
290
+ # provided, it will use [ServingConfig.embedding_config.field_paths][].
291
+ # @param ranking_expression [::String]
292
+ # The ranking expression controls the customized ranking on retrieval
293
+ # documents. This overrides [ServingConfig.ranking_expression][].
294
+ # The ranking expression is a single function or multiple functions that are
295
+ # joint by "+".
296
+ # * ranking_expression = function, { " + ", function };
297
+ # Supported functions:
298
+ # * double * relevance_score
299
+ # * double * dotProduct(embedding_field_path)
300
+ # Function variables:
301
+ # `relevance_score`: pre-defined keywords, used for measure relevance
302
+ # between query and document.
303
+ # `embedding_field_path`: the document embedding field
304
+ # used with query embedding vector.
305
+ # `dotProduct`: embedding function between embedding_field_path and query
306
+ # embedding vector.
307
+ #
308
+ # Example ranking expression:
309
+ # If document has an embedding field doc_embedding, the ranking expression
310
+ # could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
267
311
  # @param safe_search [::Boolean]
268
312
  # Whether to turn on safe search. This is only supported for
269
313
  # website search.
@@ -474,6 +518,14 @@ module Google
474
518
  end
475
519
  end
476
520
 
521
+ ##
522
+ # Configuration for the channel pool
523
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
524
+ #
525
+ def channel_pool
526
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
527
+ end
528
+
477
529
  ##
478
530
  # Configuration RPC class for the SearchService API.
479
531
  #
@@ -19,6 +19,7 @@
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/discoveryengine/v1beta/search_service_pb"
21
21
  require "google/cloud/discovery_engine/v1beta/search_service/rest/service_stub"
22
+ require "google/cloud/location/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -135,9 +136,22 @@ module Google
135
136
  @quota_project_id = @config.quota_project
136
137
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
137
138
 
139
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
140
+ config.credentials = credentials
141
+ config.quota_project = @quota_project_id
142
+ config.endpoint = @config.endpoint
143
+ end
144
+
138
145
  @search_service_stub = ::Google::Cloud::DiscoveryEngine::V1beta::SearchService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
139
146
  end
140
147
 
148
+ ##
149
+ # Get the associated client for mix-in of the Locations.
150
+ #
151
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
152
+ #
153
+ attr_reader :location_client
154
+
141
155
  # Service calls
142
156
 
143
157
  ##
@@ -153,7 +167,7 @@ module Google
153
167
  # @param options [::Gapic::CallOptions, ::Hash]
154
168
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
155
169
  #
156
- # @overload search(serving_config: nil, branch: nil, query: nil, image_query: nil, page_size: nil, page_token: nil, offset: nil, filter: nil, order_by: nil, user_info: nil, facet_specs: nil, boost_spec: nil, params: nil, query_expansion_spec: nil, spell_correction_spec: nil, user_pseudo_id: nil, content_search_spec: nil, safe_search: nil, user_labels: nil)
170
+ # @overload search(serving_config: nil, branch: nil, query: nil, image_query: nil, page_size: nil, page_token: nil, offset: nil, filter: nil, order_by: nil, user_info: nil, facet_specs: nil, boost_spec: nil, params: nil, query_expansion_spec: nil, spell_correction_spec: nil, user_pseudo_id: nil, content_search_spec: nil, embedding_spec: nil, ranking_expression: nil, safe_search: nil, user_labels: nil)
157
171
  # Pass arguments to `search` via keyword arguments. Note that at
158
172
  # least one keyword argument is required. To specify no parameters, or to keep all
159
173
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -255,6 +269,35 @@ module Google
255
269
  # characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
256
270
  # @param content_search_spec [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec, ::Hash]
257
271
  # A specification for configuring the behavior of content search.
272
+ # @param embedding_spec [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::EmbeddingSpec, ::Hash]
273
+ # Uses the provided embedding to do additional semantic document retrieval.
274
+ # The retrieval is based on the dot product of
275
+ # [SearchRequest.embedding_spec.embedding_vectors.vector][] and the document
276
+ # embedding that is provided in
277
+ # [SearchRequest.embedding_spec.embedding_vectors.field_path][].
278
+ #
279
+ # If [SearchRequest.embedding_spec.embedding_vectors.field_path][] is not
280
+ # provided, it will use [ServingConfig.embedding_config.field_paths][].
281
+ # @param ranking_expression [::String]
282
+ # The ranking expression controls the customized ranking on retrieval
283
+ # documents. This overrides [ServingConfig.ranking_expression][].
284
+ # The ranking expression is a single function or multiple functions that are
285
+ # joint by "+".
286
+ # * ranking_expression = function, { " + ", function };
287
+ # Supported functions:
288
+ # * double * relevance_score
289
+ # * double * dotProduct(embedding_field_path)
290
+ # Function variables:
291
+ # `relevance_score`: pre-defined keywords, used for measure relevance
292
+ # between query and document.
293
+ # `embedding_field_path`: the document embedding field
294
+ # used with query embedding vector.
295
+ # `dotProduct`: embedding function between embedding_field_path and query
296
+ # embedding vector.
297
+ #
298
+ # Example ranking expression:
299
+ # If document has an embedding field doc_embedding, the ranking expression
300
+ # could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
258
301
  # @param safe_search [::Boolean]
259
302
  # Whether to turn on safe search. This is only supported for
260
303
  # website search.
@@ -283,6 +326,26 @@ module Google
283
326
  # @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse]
284
327
  #
285
328
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
329
+ #
330
+ # @example Basic example
331
+ # require "google/cloud/discovery_engine/v1beta"
332
+ #
333
+ # # Create a client object. The client can be reused for multiple calls.
334
+ # client = Google::Cloud::DiscoveryEngine::V1beta::SearchService::Rest::Client.new
335
+ #
336
+ # # Create a request. To set request fields, pass in keyword arguments.
337
+ # request = Google::Cloud::DiscoveryEngine::V1beta::SearchRequest.new
338
+ #
339
+ # # Call the search method.
340
+ # result = client.search request
341
+ #
342
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
343
+ # # over elements, and API calls will be issued to fetch pages as needed.
344
+ # result.each do |item|
345
+ # # Each element is of type ::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult.
346
+ # p item
347
+ # end
348
+ #
286
349
  def search request, options = nil
287
350
  raise ::ArgumentError, "request must be provided" if request.nil?
288
351
 
@@ -18,6 +18,7 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/discoveryengine/v1beta/user_event_service_pb"
21
+ require "google/cloud/location"
21
22
 
22
23
  module Google
23
24
  module Cloud
@@ -149,12 +150,19 @@ module Google
149
150
  config.endpoint = @config.endpoint
150
151
  end
151
152
 
153
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
154
+ config.credentials = credentials
155
+ config.quota_project = @quota_project_id
156
+ config.endpoint = @config.endpoint
157
+ end
158
+
152
159
  @user_event_service_stub = ::Gapic::ServiceStub.new(
153
160
  ::Google::Cloud::DiscoveryEngine::V1beta::UserEventService::Stub,
154
161
  credentials: credentials,
155
162
  endpoint: @config.endpoint,
156
163
  channel_args: @config.channel_args,
157
- interceptors: @config.interceptors
164
+ interceptors: @config.interceptors,
165
+ channel_pool_config: @config.channel_pool
158
166
  )
159
167
  end
160
168
 
@@ -165,6 +173,13 @@ module Google
165
173
  #
166
174
  attr_reader :operations_client
167
175
 
176
+ ##
177
+ # Get the associated client for mix-in of the Locations.
178
+ #
179
+ # @return [Google::Cloud::Location::Locations::Client]
180
+ #
181
+ attr_reader :location_client
182
+
168
183
  # Service calls
169
184
 
170
185
  ##
@@ -585,6 +600,14 @@ module Google
585
600
  end
586
601
  end
587
602
 
603
+ ##
604
+ # Configuration for the channel pool
605
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
606
+ #
607
+ def channel_pool
608
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
609
+ end
610
+
588
611
  ##
589
612
  # Configuration RPC class for the UserEventService API.
590
613
  #
@@ -93,7 +93,8 @@ module Google
93
93
  credentials: credentials,
94
94
  endpoint: @config.endpoint,
95
95
  channel_args: @config.channel_args,
96
- interceptors: @config.interceptors
96
+ interceptors: @config.interceptors,
97
+ channel_pool_config: @config.channel_pool
97
98
  )
98
99
 
99
100
  # Used by an LRO wrapper for some methods of this service
@@ -701,6 +702,14 @@ module Google
701
702
  end
702
703
  end
703
704
 
705
+ ##
706
+ # Configuration for the channel pool
707
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
708
+ #
709
+ def channel_pool
710
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
711
+ end
712
+
704
713
  ##
705
714
  # Configuration RPC class for the Operations API.
706
715
  #
@@ -19,6 +19,7 @@
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/discoveryengine/v1beta/user_event_service_pb"
21
21
  require "google/cloud/discovery_engine/v1beta/user_event_service/rest/service_stub"
22
+ require "google/cloud/location/rest"
22
23
 
23
24
  module Google
24
25
  module Cloud
@@ -146,6 +147,12 @@ module Google
146
147
  config.endpoint = @config.endpoint
147
148
  end
148
149
 
150
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
151
+ config.credentials = credentials
152
+ config.quota_project = @quota_project_id
153
+ config.endpoint = @config.endpoint
154
+ end
155
+
149
156
  @user_event_service_stub = ::Google::Cloud::DiscoveryEngine::V1beta::UserEventService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
150
157
  end
151
158
 
@@ -156,6 +163,13 @@ module Google
156
163
  #
157
164
  attr_reader :operations_client
158
165
 
166
+ ##
167
+ # Get the associated client for mix-in of the Locations.
168
+ #
169
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
170
+ #
171
+ attr_reader :location_client
172
+
159
173
  # Service calls
160
174
 
161
175
  ##
@@ -188,6 +202,22 @@ module Google
188
202
  # @return [::Google::Cloud::DiscoveryEngine::V1beta::UserEvent]
189
203
  #
190
204
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
205
+ #
206
+ # @example Basic example
207
+ # require "google/cloud/discovery_engine/v1beta"
208
+ #
209
+ # # Create a client object. The client can be reused for multiple calls.
210
+ # client = Google::Cloud::DiscoveryEngine::V1beta::UserEventService::Rest::Client.new
211
+ #
212
+ # # Create a request. To set request fields, pass in keyword arguments.
213
+ # request = Google::Cloud::DiscoveryEngine::V1beta::WriteUserEventRequest.new
214
+ #
215
+ # # Call the write_user_event method.
216
+ # result = client.write_user_event request
217
+ #
218
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::UserEvent.
219
+ # p result
220
+ #
191
221
  def write_user_event request, options = nil
192
222
  raise ::ArgumentError, "request must be provided" if request.nil?
193
223
 
@@ -267,6 +297,22 @@ module Google
267
297
  # @return [::Google::Api::HttpBody]
268
298
  #
269
299
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
300
+ #
301
+ # @example Basic example
302
+ # require "google/cloud/discovery_engine/v1beta"
303
+ #
304
+ # # Create a client object. The client can be reused for multiple calls.
305
+ # client = Google::Cloud::DiscoveryEngine::V1beta::UserEventService::Rest::Client.new
306
+ #
307
+ # # Create a request. To set request fields, pass in keyword arguments.
308
+ # request = Google::Cloud::DiscoveryEngine::V1beta::CollectUserEventRequest.new
309
+ #
310
+ # # Call the collect_user_event method.
311
+ # result = client.collect_user_event request
312
+ #
313
+ # # The returned object is of type Google::Api::HttpBody.
314
+ # p result
315
+ #
270
316
  def collect_user_event request, options = nil
271
317
  raise ::ArgumentError, "request must be provided" if request.nil?
272
318
 
@@ -345,6 +391,29 @@ module Google
345
391
  # @return [::Gapic::Operation]
346
392
  #
347
393
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
394
+ #
395
+ # @example Basic example
396
+ # require "google/cloud/discovery_engine/v1beta"
397
+ #
398
+ # # Create a client object. The client can be reused for multiple calls.
399
+ # client = Google::Cloud::DiscoveryEngine::V1beta::UserEventService::Rest::Client.new
400
+ #
401
+ # # Create a request. To set request fields, pass in keyword arguments.
402
+ # request = Google::Cloud::DiscoveryEngine::V1beta::ImportUserEventsRequest.new
403
+ #
404
+ # # Call the import_user_events method.
405
+ # result = client.import_user_events request
406
+ #
407
+ # # The returned object is of type Gapic::Operation. You can use it to
408
+ # # check the status of an operation, cancel it, or wait for results.
409
+ # # Here is how to wait for a response.
410
+ # result.wait_until_done! timeout: 60
411
+ # if result.response?
412
+ # p result.response
413
+ # else
414
+ # puts "No response received."
415
+ # end
416
+ #
348
417
  def import_user_events request, options = nil
349
418
  raise ::ArgumentError, "request must be provided" if request.nil?
350
419
 
@@ -136,6 +136,26 @@ module Google
136
136
  # @return [::Gapic::Operation]
137
137
  #
138
138
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
139
+ #
140
+ # @example Basic example
141
+ # require "google/longrunning"
142
+ #
143
+ # # Create a client object. The client can be reused for multiple calls.
144
+ # client = Google::Longrunning::Operations::Rest::Client.new
145
+ #
146
+ # # Create a request. To set request fields, pass in keyword arguments.
147
+ # request = Google::Longrunning::ListOperationsRequest.new
148
+ #
149
+ # # Call the list_operations method.
150
+ # result = client.list_operations request
151
+ #
152
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
153
+ # # over elements, and API calls will be issued to fetch pages as needed.
154
+ # result.each do |item|
155
+ # # Each element is of type ::Google::Longrunning::Operation.
156
+ # p item
157
+ # end
158
+ #
139
159
  def list_operations request, options = nil
140
160
  raise ::ArgumentError, "request must be provided" if request.nil?
141
161
 
@@ -201,6 +221,29 @@ module Google
201
221
  # @return [::Gapic::Operation]
202
222
  #
203
223
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
224
+ #
225
+ # @example Basic example
226
+ # require "google/longrunning"
227
+ #
228
+ # # Create a client object. The client can be reused for multiple calls.
229
+ # client = Google::Longrunning::Operations::Rest::Client.new
230
+ #
231
+ # # Create a request. To set request fields, pass in keyword arguments.
232
+ # request = Google::Longrunning::GetOperationRequest.new
233
+ #
234
+ # # Call the get_operation method.
235
+ # result = client.get_operation request
236
+ #
237
+ # # The returned object is of type Gapic::Operation. You can use it to
238
+ # # check the status of an operation, cancel it, or wait for results.
239
+ # # Here is how to wait for a response.
240
+ # result.wait_until_done! timeout: 60
241
+ # if result.response?
242
+ # p result.response
243
+ # else
244
+ # puts "No response received."
245
+ # end
246
+ #
204
247
  def get_operation request, options = nil
205
248
  raise ::ArgumentError, "request must be provided" if request.nil?
206
249
 
@@ -267,6 +310,22 @@ module Google
267
310
  # @return [::Google::Protobuf::Empty]
268
311
  #
269
312
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
313
+ #
314
+ # @example Basic example
315
+ # require "google/longrunning"
316
+ #
317
+ # # Create a client object. The client can be reused for multiple calls.
318
+ # client = Google::Longrunning::Operations::Rest::Client.new
319
+ #
320
+ # # Create a request. To set request fields, pass in keyword arguments.
321
+ # request = Google::Longrunning::DeleteOperationRequest.new
322
+ #
323
+ # # Call the delete_operation method.
324
+ # result = client.delete_operation request
325
+ #
326
+ # # The returned object is of type Google::Protobuf::Empty.
327
+ # p result
328
+ #
270
329
  def delete_operation request, options = nil
271
330
  raise ::ArgumentError, "request must be provided" if request.nil?
272
331
 
@@ -338,6 +397,22 @@ module Google
338
397
  # @return [::Google::Protobuf::Empty]
339
398
  #
340
399
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
400
+ #
401
+ # @example Basic example
402
+ # require "google/longrunning"
403
+ #
404
+ # # Create a client object. The client can be reused for multiple calls.
405
+ # client = Google::Longrunning::Operations::Rest::Client.new
406
+ #
407
+ # # Create a request. To set request fields, pass in keyword arguments.
408
+ # request = Google::Longrunning::CancelOperationRequest.new
409
+ #
410
+ # # Call the cancel_operation method.
411
+ # result = client.cancel_operation request
412
+ #
413
+ # # The returned object is of type Google::Protobuf::Empty.
414
+ # p result
415
+ #
341
416
  def cancel_operation request, options = nil
342
417
  raise ::ArgumentError, "request must be provided" if request.nil?
343
418
 
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module DiscoveryEngine
23
23
  module V1beta
24
- VERSION = "0.4.0"
24
+ VERSION = "0.6.0"
25
25
  end
26
26
  end
27
27
  end
@@ -7,7 +7,7 @@ require 'google/protobuf'
7
7
  require 'google/api/resource_pb'
8
8
 
9
9
 
10
- descriptor_data = "\n0google/cloud/discoveryengine/v1beta/common.proto\x12#google.cloud.discoveryengine.v1beta\x1a\x19google/api/resource.proto\"x\n\x08Interval\x12\x11\n\x07minimum\x18\x01 \x01(\x01H\x00\x12\x1b\n\x11\x65xclusive_minimum\x18\x02 \x01(\x01H\x00\x12\x11\n\x07maximum\x18\x03 \x01(\x01H\x01\x12\x1b\n\x11\x65xclusive_maximum\x18\x04 \x01(\x01H\x01\x42\x05\n\x03minB\x05\n\x03max\"0\n\x0f\x43ustomAttribute\x12\x0c\n\x04text\x18\x01 \x03(\t\x12\x0f\n\x07numbers\x18\x02 \x03(\x01\"/\n\x08UserInfo\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12\x12\n\nuser_agent\x18\x02 \x01(\tB\xd2\x07\n\'com.google.cloud.discoveryengine.v1betaB\x0b\x43ommonProtoP\x01ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02#Google.Cloud.DiscoveryEngine.V1Beta\xca\x02#Google\\Cloud\\DiscoveryEngine\\V1beta\xea\x02&Google::Cloud::DiscoveryEngine::V1beta\xea\x41\xe6\x01\n%discoveryengine.googleapis.com/Branch\x12Qprojects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}\x12jprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}\xea\x41\xc5\x01\n(discoveryengine.googleapis.com/DataStore\x12?projects/{project}/locations/{location}/dataStores/{data_store}\x12Xprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}\xea\x41\x89\x02\n,discoveryengine.googleapis.com/ServingConfig\x12_projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}\x12xprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}b\x06proto3"
10
+ descriptor_data = "\n0google/cloud/discoveryengine/v1beta/common.proto\x12#google.cloud.discoveryengine.v1beta\x1a\x19google/api/resource.proto\"x\n\x08Interval\x12\x11\n\x07minimum\x18\x01 \x01(\x01H\x00\x12\x1b\n\x11\x65xclusive_minimum\x18\x02 \x01(\x01H\x00\x12\x11\n\x07maximum\x18\x03 \x01(\x01H\x01\x12\x1b\n\x11\x65xclusive_maximum\x18\x04 \x01(\x01H\x01\x42\x05\n\x03minB\x05\n\x03max\"0\n\x0f\x43ustomAttribute\x12\x0c\n\x04text\x18\x01 \x03(\t\x12\x0f\n\x07numbers\x18\x02 \x03(\x01\"/\n\x08UserInfo\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12\x12\n\nuser_agent\x18\x02 \x01(\t\"\x1c\n\nDoubleList\x12\x0e\n\x06values\x18\x01 \x03(\x01\x42\xd2\x07\n\'com.google.cloud.discoveryengine.v1betaB\x0b\x43ommonProtoP\x01ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02#Google.Cloud.DiscoveryEngine.V1Beta\xca\x02#Google\\Cloud\\DiscoveryEngine\\V1beta\xea\x02&Google::Cloud::DiscoveryEngine::V1beta\xea\x41\xe6\x01\n%discoveryengine.googleapis.com/Branch\x12Qprojects/{project}/locations/{location}/dataStores/{data_store}/branches/{branch}\x12jprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}\xea\x41\xc5\x01\n(discoveryengine.googleapis.com/DataStore\x12?projects/{project}/locations/{location}/dataStores/{data_store}\x12Xprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}\xea\x41\x89\x02\n,discoveryengine.googleapis.com/ServingConfig\x12_projects/{project}/locations/{location}/dataStores/{data_store}/servingConfigs/{serving_config}\x12xprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}b\x06proto3"
11
11
 
12
12
  pool = Google::Protobuf::DescriptorPool.generated_pool
13
13
 
@@ -40,6 +40,7 @@ module Google
40
40
  Interval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.Interval").msgclass
41
41
  CustomAttribute = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.CustomAttribute").msgclass
42
42
  UserInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.UserInfo").msgclass
43
+ DoubleList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.discoveryengine.v1beta.DoubleList").msgclass
43
44
  end
44
45
  end
45
46
  end
@@ -6,10 +6,11 @@ require 'google/protobuf'
6
6
 
7
7
  require 'google/api/field_behavior_pb'
8
8
  require 'google/api/resource_pb'
9
+ require 'google/cloud/discoveryengine/v1beta/search_service_pb'
9
10
  require 'google/protobuf/timestamp_pb'
10
11
 
11
12
 
12
- descriptor_data = "\n6google/cloud/discoveryengine/v1beta/conversation.proto\x12#google.cloud.discoveryengine.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfe\x04\n\x0c\x43onversation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x46\n\x05state\x18\x02 \x01(\x0e\x32\x37.google.cloud.discoveryengine.v1beta.Conversation.State\x12\x16\n\x0euser_pseudo_id\x18\x03 \x01(\t\x12J\n\x08messages\x18\x04 \x03(\x0b\x32\x38.google.cloud.discoveryengine.v1beta.ConversationMessage\x12\x33\n\nstart_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\">\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\r\n\tCOMPLETED\x10\x02:\x86\x02\xea\x41\x82\x02\n+discoveryengine.googleapis.com/Conversation\x12\\projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}\x12uprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}\"\xab\x01\n\x05Reply\x12\r\n\x05reply\x18\x01 \x01(\t\x12H\n\nreferences\x18\x02 \x03(\x0b\x32\x34.google.cloud.discoveryengine.v1beta.Reply.Reference\x1aI\n\tReference\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x13\n\x0b\x61nchor_text\x18\x02 \x01(\t\x12\r\n\x05start\x18\x03 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x04 \x01(\x05\"I\n\x13\x43onversationContext\x12\x19\n\x11\x63ontext_documents\x18\x01 \x03(\t\x12\x17\n\x0f\x61\x63tive_document\x18\x02 \x01(\t\"e\n\tTextInput\x12\r\n\x05input\x18\x01 \x01(\t\x12I\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x38.google.cloud.discoveryengine.v1beta.ConversationContext\"\xd9\x01\n\x13\x43onversationMessage\x12\x44\n\nuser_input\x18\x01 \x01(\x0b\x32..google.cloud.discoveryengine.v1beta.TextInputH\x00\x12;\n\x05reply\x18\x02 \x01(\x0b\x32*.google.cloud.discoveryengine.v1beta.ReplyH\x00\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x42\t\n\x07messageB\x98\x02\n\'com.google.cloud.discoveryengine.v1betaB\x11\x43onversationProtoP\x01ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02#Google.Cloud.DiscoveryEngine.V1Beta\xca\x02#Google\\Cloud\\DiscoveryEngine\\V1beta\xea\x02&Google::Cloud::DiscoveryEngine::V1betab\x06proto3"
13
+ descriptor_data = "\n6google/cloud/discoveryengine/v1beta/conversation.proto\x12#google.cloud.discoveryengine.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x38google/cloud/discoveryengine/v1beta/search_service.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfe\x04\n\x0c\x43onversation\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x46\n\x05state\x18\x02 \x01(\x0e\x32\x37.google.cloud.discoveryengine.v1beta.Conversation.State\x12\x16\n\x0euser_pseudo_id\x18\x03 \x01(\t\x12J\n\x08messages\x18\x04 \x03(\x0b\x32\x38.google.cloud.discoveryengine.v1beta.ConversationMessage\x12\x33\n\nstart_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\">\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bIN_PROGRESS\x10\x01\x12\r\n\tCOMPLETED\x10\x02:\x86\x02\xea\x41\x82\x02\n+discoveryengine.googleapis.com/Conversation\x12\\projects/{project}/locations/{location}/dataStores/{data_store}/conversations/{conversation}\x12uprojects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/conversations/{conversation}\"\x85\x02\n\x05Reply\x12\x11\n\x05reply\x18\x01 \x01(\tB\x02\x18\x01\x12L\n\nreferences\x18\x02 \x03(\x0b\x32\x34.google.cloud.discoveryengine.v1beta.Reply.ReferenceB\x02\x18\x01\x12L\n\x07summary\x18\x03 \x01(\x0b\x32;.google.cloud.discoveryengine.v1beta.SearchResponse.Summary\x1aM\n\tReference\x12\x0b\n\x03uri\x18\x01 \x01(\t\x12\x13\n\x0b\x61nchor_text\x18\x02 \x01(\t\x12\r\n\x05start\x18\x03 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x04 \x01(\x05:\x02\x18\x01\"I\n\x13\x43onversationContext\x12\x19\n\x11\x63ontext_documents\x18\x01 \x03(\t\x12\x17\n\x0f\x61\x63tive_document\x18\x02 \x01(\t\"e\n\tTextInput\x12\r\n\x05input\x18\x01 \x01(\t\x12I\n\x07\x63ontext\x18\x02 \x01(\x0b\x32\x38.google.cloud.discoveryengine.v1beta.ConversationContext\"\xd9\x01\n\x13\x43onversationMessage\x12\x44\n\nuser_input\x18\x01 \x01(\x0b\x32..google.cloud.discoveryengine.v1beta.TextInputH\x00\x12;\n\x05reply\x18\x02 \x01(\x0b\x32*.google.cloud.discoveryengine.v1beta.ReplyH\x00\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x42\t\n\x07messageB\x98\x02\n\'com.google.cloud.discoveryengine.v1betaB\x11\x43onversationProtoP\x01ZQcloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb\xa2\x02\x0f\x44ISCOVERYENGINE\xaa\x02#Google.Cloud.DiscoveryEngine.V1Beta\xca\x02#Google\\Cloud\\DiscoveryEngine\\V1beta\xea\x02&Google::Cloud::DiscoveryEngine::V1betab\x06proto3"
13
14
 
14
15
  pool = Google::Protobuf::DescriptorPool.generated_pool
15
16
 
@@ -25,6 +26,7 @@ rescue TypeError => e
25
26
  warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
26
27
  imports = [
27
28
  ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
29
+ ["google.cloud.discoveryengine.v1beta.SearchResponse.Summary", "google/cloud/discoveryengine/v1beta/search_service.proto"],
28
30
  ]
29
31
  imports.each do |type_name, expected_filename|
30
32
  import_file = pool.lookup(type_name).file_descriptor