google-cloud-discovery_engine-v1 0.1.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/discovery_engine/v1/completion_service/client.rb +33 -4
- data/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb +39 -3
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +968 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb +176 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +897 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/service_stub.rb +450 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +33 -9
- data/lib/google/cloud/discovery_engine/v1/document_service/operations.rb +10 -1
- data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +153 -8
- data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +117 -0
- data/lib/google/cloud/discovery_engine/v1/rest.rb +2 -1
- data/lib/google/cloud/discovery_engine/v1/schema_service/client.rb +24 -1
- data/lib/google/cloud/discovery_engine/v1/schema_service/operations.rb +10 -1
- data/lib/google/cloud/discovery_engine/v1/schema_service/rest/client.rb +119 -0
- data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +117 -0
- data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +55 -10
- data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +67 -12
- data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +29 -6
- data/lib/google/cloud/discovery_engine/v1/user_event_service/operations.rb +10 -1
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +74 -5
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +117 -0
- data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
- data/lib/google/cloud/discovery_engine/v1.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1/common_pb.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1/completion_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/conversation_pb.rb +54 -0
- data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +61 -0
- data/lib/google/cloud/discoveryengine/v1/conversational_search_service_services_pb.rb +67 -0
- data/lib/google/cloud/discoveryengine/v1/import_config_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +13 -1
- data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/user_event_service_services_pb.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/cloud/discoveryengine/v1/common.rb +19 -2
- data/proto_docs/google/cloud/discoveryengine/v1/completion_service.rb +15 -2
- data/proto_docs/google/cloud/discoveryengine/v1/conversation.rb +113 -0
- data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +206 -0
- data/proto_docs/google/cloud/discoveryengine/v1/document.rb +8 -5
- data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +4 -3
- data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +23 -19
- data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +455 -19
- data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +44 -32
- data/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb +1 -1
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- metadata +38 -5
@@ -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/v1/document_service_pb"
|
21
21
|
require "google/cloud/discovery_engine/v1/document_service/rest/service_stub"
|
22
|
+
require "google/cloud/location/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -147,6 +148,12 @@ module Google
|
|
147
148
|
config.endpoint = @config.endpoint
|
148
149
|
end
|
149
150
|
|
151
|
+
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
152
|
+
config.credentials = credentials
|
153
|
+
config.quota_project = @quota_project_id
|
154
|
+
config.endpoint = @config.endpoint
|
155
|
+
end
|
156
|
+
|
150
157
|
@document_service_stub = ::Google::Cloud::DiscoveryEngine::V1::DocumentService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
151
158
|
end
|
152
159
|
|
@@ -157,6 +164,13 @@ module Google
|
|
157
164
|
#
|
158
165
|
attr_reader :operations_client
|
159
166
|
|
167
|
+
##
|
168
|
+
# Get the associated client for mix-in of the Locations.
|
169
|
+
#
|
170
|
+
# @return [Google::Cloud::Location::Locations::Rest::Client]
|
171
|
+
#
|
172
|
+
attr_reader :location_client
|
173
|
+
|
160
174
|
# Service calls
|
161
175
|
|
162
176
|
##
|
@@ -195,6 +209,22 @@ module Google
|
|
195
209
|
# @return [::Google::Cloud::DiscoveryEngine::V1::Document]
|
196
210
|
#
|
197
211
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
212
|
+
#
|
213
|
+
# @example Basic example
|
214
|
+
# require "google/cloud/discovery_engine/v1"
|
215
|
+
#
|
216
|
+
# # Create a client object. The client can be reused for multiple calls.
|
217
|
+
# client = Google::Cloud::DiscoveryEngine::V1::DocumentService::Rest::Client.new
|
218
|
+
#
|
219
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
220
|
+
# request = Google::Cloud::DiscoveryEngine::V1::GetDocumentRequest.new
|
221
|
+
#
|
222
|
+
# # Call the get_document method.
|
223
|
+
# result = client.get_document request
|
224
|
+
#
|
225
|
+
# # The returned object is of type Google::Cloud::DiscoveryEngine::V1::Document.
|
226
|
+
# p result
|
227
|
+
#
|
198
228
|
def get_document request, options = nil
|
199
229
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
200
230
|
|
@@ -254,9 +284,10 @@ module Google
|
|
254
284
|
# Use `default_branch` as the branch ID, to list documents under the default
|
255
285
|
# branch.
|
256
286
|
#
|
257
|
-
# If the caller does not have permission to list
|
258
|
-
#
|
259
|
-
# `PERMISSION_DENIED`
|
287
|
+
# If the caller does not have permission to list
|
288
|
+
# {::Google::Cloud::DiscoveryEngine::V1::Document Document}s under this branch,
|
289
|
+
# regardless of whether or not this branch exists, a `PERMISSION_DENIED`
|
290
|
+
# error is returned.
|
260
291
|
# @param page_size [::Integer]
|
261
292
|
# Maximum number of {::Google::Cloud::DiscoveryEngine::V1::Document Document}s to
|
262
293
|
# return. If unspecified, defaults to 100. The maximum allowed value is 1000.
|
@@ -281,6 +312,26 @@ module Google
|
|
281
312
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::Document>]
|
282
313
|
#
|
283
314
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
315
|
+
#
|
316
|
+
# @example Basic example
|
317
|
+
# require "google/cloud/discovery_engine/v1"
|
318
|
+
#
|
319
|
+
# # Create a client object. The client can be reused for multiple calls.
|
320
|
+
# client = Google::Cloud::DiscoveryEngine::V1::DocumentService::Rest::Client.new
|
321
|
+
#
|
322
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
323
|
+
# request = Google::Cloud::DiscoveryEngine::V1::ListDocumentsRequest.new
|
324
|
+
#
|
325
|
+
# # Call the list_documents method.
|
326
|
+
# result = client.list_documents request
|
327
|
+
#
|
328
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
329
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
330
|
+
# result.each do |item|
|
331
|
+
# # Each element is of type ::Google::Cloud::DiscoveryEngine::V1::Document.
|
332
|
+
# p item
|
333
|
+
# end
|
334
|
+
#
|
284
335
|
def list_documents request, options = nil
|
285
336
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
286
337
|
|
@@ -366,6 +417,22 @@ module Google
|
|
366
417
|
# @return [::Google::Cloud::DiscoveryEngine::V1::Document]
|
367
418
|
#
|
368
419
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
420
|
+
#
|
421
|
+
# @example Basic example
|
422
|
+
# require "google/cloud/discovery_engine/v1"
|
423
|
+
#
|
424
|
+
# # Create a client object. The client can be reused for multiple calls.
|
425
|
+
# client = Google::Cloud::DiscoveryEngine::V1::DocumentService::Rest::Client.new
|
426
|
+
#
|
427
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
428
|
+
# request = Google::Cloud::DiscoveryEngine::V1::CreateDocumentRequest.new
|
429
|
+
#
|
430
|
+
# # Call the create_document method.
|
431
|
+
# result = client.create_document request
|
432
|
+
#
|
433
|
+
# # The returned object is of type Google::Cloud::DiscoveryEngine::V1::Document.
|
434
|
+
# p result
|
435
|
+
#
|
369
436
|
def create_document request, options = nil
|
370
437
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
371
438
|
|
@@ -441,6 +508,22 @@ module Google
|
|
441
508
|
# @return [::Google::Cloud::DiscoveryEngine::V1::Document]
|
442
509
|
#
|
443
510
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
511
|
+
#
|
512
|
+
# @example Basic example
|
513
|
+
# require "google/cloud/discovery_engine/v1"
|
514
|
+
#
|
515
|
+
# # Create a client object. The client can be reused for multiple calls.
|
516
|
+
# client = Google::Cloud::DiscoveryEngine::V1::DocumentService::Rest::Client.new
|
517
|
+
#
|
518
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
519
|
+
# request = Google::Cloud::DiscoveryEngine::V1::UpdateDocumentRequest.new
|
520
|
+
#
|
521
|
+
# # Call the update_document method.
|
522
|
+
# result = client.update_document request
|
523
|
+
#
|
524
|
+
# # The returned object is of type Google::Cloud::DiscoveryEngine::V1::Document.
|
525
|
+
# p result
|
526
|
+
#
|
444
527
|
def update_document request, options = nil
|
445
528
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
446
529
|
|
@@ -512,6 +595,22 @@ module Google
|
|
512
595
|
# @return [::Google::Protobuf::Empty]
|
513
596
|
#
|
514
597
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
598
|
+
#
|
599
|
+
# @example Basic example
|
600
|
+
# require "google/cloud/discovery_engine/v1"
|
601
|
+
#
|
602
|
+
# # Create a client object. The client can be reused for multiple calls.
|
603
|
+
# client = Google::Cloud::DiscoveryEngine::V1::DocumentService::Rest::Client.new
|
604
|
+
#
|
605
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
606
|
+
# request = Google::Cloud::DiscoveryEngine::V1::DeleteDocumentRequest.new
|
607
|
+
#
|
608
|
+
# # Call the delete_document method.
|
609
|
+
# result = client.delete_document request
|
610
|
+
#
|
611
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
612
|
+
# p result
|
613
|
+
#
|
515
614
|
def delete_document request, options = nil
|
516
615
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
517
616
|
|
@@ -599,7 +698,7 @@ module Google
|
|
599
698
|
# `false`, {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id}s have
|
600
699
|
# to be specified using
|
601
700
|
# {::Google::Cloud::DiscoveryEngine::V1::ImportDocumentsRequest#id_field id_field},
|
602
|
-
#
|
701
|
+
# otherwise, documents without IDs fail to be imported.
|
603
702
|
#
|
604
703
|
# Only set this field when using
|
605
704
|
# {::Google::Cloud::DiscoveryEngine::V1::GcsSource GcsSource} or
|
@@ -607,7 +706,7 @@ module Google
|
|
607
706
|
# {::Google::Cloud::DiscoveryEngine::V1::GcsSource#data_schema GcsSource.data_schema}
|
608
707
|
# or
|
609
708
|
# {::Google::Cloud::DiscoveryEngine::V1::BigQuerySource#data_schema BigQuerySource.data_schema}
|
610
|
-
# is `custom`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
709
|
+
# is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
611
710
|
# @param id_field [::String]
|
612
711
|
# The field in the Cloud Storage and BigQuery sources that indicates the
|
613
712
|
# unique IDs of the documents.
|
@@ -617,12 +716,12 @@ module Google
|
|
617
716
|
# For {::Google::Cloud::DiscoveryEngine::V1::BigQuerySource BigQuerySource} it is
|
618
717
|
# the column name of the BigQuery table where the unique ids are stored.
|
619
718
|
#
|
620
|
-
# The values of the JSON field or the BigQuery column
|
719
|
+
# The values of the JSON field or the BigQuery column are used as the
|
621
720
|
# {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id}s. The JSON field
|
622
721
|
# or the BigQuery column must be of string type, and the values must be set
|
623
722
|
# as valid strings conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
|
624
|
-
# with 1-63 characters. Otherwise, documents without valid IDs
|
625
|
-
#
|
723
|
+
# with 1-63 characters. Otherwise, documents without valid IDs fail to be
|
724
|
+
# imported.
|
626
725
|
#
|
627
726
|
# Only set this field when using
|
628
727
|
# {::Google::Cloud::DiscoveryEngine::V1::GcsSource GcsSource} or
|
@@ -643,6 +742,29 @@ module Google
|
|
643
742
|
# @return [::Gapic::Operation]
|
644
743
|
#
|
645
744
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
745
|
+
#
|
746
|
+
# @example Basic example
|
747
|
+
# require "google/cloud/discovery_engine/v1"
|
748
|
+
#
|
749
|
+
# # Create a client object. The client can be reused for multiple calls.
|
750
|
+
# client = Google::Cloud::DiscoveryEngine::V1::DocumentService::Rest::Client.new
|
751
|
+
#
|
752
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
753
|
+
# request = Google::Cloud::DiscoveryEngine::V1::ImportDocumentsRequest.new
|
754
|
+
#
|
755
|
+
# # Call the import_documents method.
|
756
|
+
# result = client.import_documents request
|
757
|
+
#
|
758
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
759
|
+
# # check the status of an operation, cancel it, or wait for results.
|
760
|
+
# # Here is how to wait for a response.
|
761
|
+
# result.wait_until_done! timeout: 60
|
762
|
+
# if result.response?
|
763
|
+
# p result.response
|
764
|
+
# else
|
765
|
+
# puts "No response received."
|
766
|
+
# end
|
767
|
+
#
|
646
768
|
def import_documents request, options = nil
|
647
769
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
648
770
|
|
@@ -729,6 +851,29 @@ module Google
|
|
729
851
|
# @return [::Gapic::Operation]
|
730
852
|
#
|
731
853
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
854
|
+
#
|
855
|
+
# @example Basic example
|
856
|
+
# require "google/cloud/discovery_engine/v1"
|
857
|
+
#
|
858
|
+
# # Create a client object. The client can be reused for multiple calls.
|
859
|
+
# client = Google::Cloud::DiscoveryEngine::V1::DocumentService::Rest::Client.new
|
860
|
+
#
|
861
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
862
|
+
# request = Google::Cloud::DiscoveryEngine::V1::PurgeDocumentsRequest.new
|
863
|
+
#
|
864
|
+
# # Call the purge_documents method.
|
865
|
+
# result = client.purge_documents request
|
866
|
+
#
|
867
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
868
|
+
# # check the status of an operation, cancel it, or wait for results.
|
869
|
+
# # Here is how to wait for a response.
|
870
|
+
# result.wait_until_done! timeout: 60
|
871
|
+
# if result.response?
|
872
|
+
# p result.response
|
873
|
+
# else
|
874
|
+
# puts "No response received."
|
875
|
+
# end
|
876
|
+
#
|
732
877
|
def purge_documents request, options = nil
|
733
878
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
734
879
|
|
@@ -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
|
|
@@ -741,6 +816,20 @@ module Google
|
|
741
816
|
["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+/?$}, false]
|
742
817
|
]
|
743
818
|
)
|
819
|
+
.with_bindings(
|
820
|
+
uri_method: :get,
|
821
|
+
uri_template: "/v1/{name}/operations",
|
822
|
+
matches: [
|
823
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/?$}, false]
|
824
|
+
]
|
825
|
+
)
|
826
|
+
.with_bindings(
|
827
|
+
uri_method: :get,
|
828
|
+
uri_template: "/v1/{name}/operations",
|
829
|
+
matches: [
|
830
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/?$}, false]
|
831
|
+
]
|
832
|
+
)
|
744
833
|
.with_bindings(
|
745
834
|
uri_method: :get,
|
746
835
|
uri_template: "/v1/{name}/operations",
|
@@ -748,6 +837,13 @@ module Google
|
|
748
837
|
["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/?$}, false]
|
749
838
|
]
|
750
839
|
)
|
840
|
+
.with_bindings(
|
841
|
+
uri_method: :get,
|
842
|
+
uri_template: "/v1/{name}/operations",
|
843
|
+
matches: [
|
844
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/?$}, false]
|
845
|
+
]
|
846
|
+
)
|
751
847
|
.with_bindings(
|
752
848
|
uri_method: :get,
|
753
849
|
uri_template: "/v1/{name}/operations",
|
@@ -839,6 +935,27 @@ module Google
|
|
839
935
|
["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/schemas/[^/]+/operations/[^/]+/?$}, false]
|
840
936
|
]
|
841
937
|
)
|
938
|
+
.with_bindings(
|
939
|
+
uri_method: :get,
|
940
|
+
uri_template: "/v1/{name}",
|
941
|
+
matches: [
|
942
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/operations/[^/]+/?$}, false]
|
943
|
+
]
|
944
|
+
)
|
945
|
+
.with_bindings(
|
946
|
+
uri_method: :get,
|
947
|
+
uri_template: "/v1/{name}",
|
948
|
+
matches: [
|
949
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/siteSearchEngine/targetSites/operations/[^/]+/?$}, false]
|
950
|
+
]
|
951
|
+
)
|
952
|
+
.with_bindings(
|
953
|
+
uri_method: :get,
|
954
|
+
uri_template: "/v1/{name}",
|
955
|
+
matches: [
|
956
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/operations/[^/]+/?$}, false]
|
957
|
+
]
|
958
|
+
)
|
842
959
|
.with_bindings(
|
843
960
|
uri_method: :get,
|
844
961
|
uri_template: "/v1/{name}",
|
@@ -17,9 +17,10 @@
|
|
17
17
|
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
18
|
|
19
19
|
require "google/cloud/discovery_engine/v1/completion_service/rest"
|
20
|
+
require "google/cloud/discovery_engine/v1/search_service/rest"
|
21
|
+
require "google/cloud/discovery_engine/v1/conversational_search_service/rest"
|
20
22
|
require "google/cloud/discovery_engine/v1/document_service/rest"
|
21
23
|
require "google/cloud/discovery_engine/v1/schema_service/rest"
|
22
|
-
require "google/cloud/discovery_engine/v1/search_service/rest"
|
23
24
|
require "google/cloud/discovery_engine/v1/user_event_service/rest"
|
24
25
|
require "google/cloud/discovery_engine/v1/version"
|
25
26
|
|
@@ -18,6 +18,7 @@
|
|
18
18
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/discoveryengine/v1/schema_service_pb"
|
21
|
+
require "google/cloud/location"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -144,12 +145,19 @@ module Google
|
|
144
145
|
config.endpoint = @config.endpoint
|
145
146
|
end
|
146
147
|
|
148
|
+
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
149
|
+
config.credentials = credentials
|
150
|
+
config.quota_project = @quota_project_id
|
151
|
+
config.endpoint = @config.endpoint
|
152
|
+
end
|
153
|
+
|
147
154
|
@schema_service_stub = ::Gapic::ServiceStub.new(
|
148
155
|
::Google::Cloud::DiscoveryEngine::V1::SchemaService::Stub,
|
149
156
|
credentials: credentials,
|
150
157
|
endpoint: @config.endpoint,
|
151
158
|
channel_args: @config.channel_args,
|
152
|
-
interceptors: @config.interceptors
|
159
|
+
interceptors: @config.interceptors,
|
160
|
+
channel_pool_config: @config.channel_pool
|
153
161
|
)
|
154
162
|
end
|
155
163
|
|
@@ -160,6 +168,13 @@ module Google
|
|
160
168
|
#
|
161
169
|
attr_reader :operations_client
|
162
170
|
|
171
|
+
##
|
172
|
+
# Get the associated client for mix-in of the Locations.
|
173
|
+
#
|
174
|
+
# @return [Google::Cloud::Location::Locations::Client]
|
175
|
+
#
|
176
|
+
attr_reader :location_client
|
177
|
+
|
163
178
|
# Service calls
|
164
179
|
|
165
180
|
##
|
@@ -770,6 +785,14 @@ module Google
|
|
770
785
|
end
|
771
786
|
end
|
772
787
|
|
788
|
+
##
|
789
|
+
# Configuration for the channel pool
|
790
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
791
|
+
#
|
792
|
+
def channel_pool
|
793
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
794
|
+
end
|
795
|
+
|
773
796
|
##
|
774
797
|
# Configuration RPC class for the SchemaService API.
|
775
798
|
#
|
@@ -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
|
#
|