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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb +24 -1
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb +30 -0
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +45 -2
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb +135 -1
- data/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +24 -1
- data/lib/google/cloud/discovery_engine/v1beta/document_service/operations.rb +10 -1
- data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb +144 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb +75 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/client.rb +24 -1
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/client.rb +30 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/client.rb +24 -1
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/operations.rb +10 -1
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/client.rb +119 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb +75 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +54 -2
- data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +64 -1
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb +24 -1
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/operations.rb +10 -1
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb +69 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb +75 -0
- data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/common_pb.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1beta/conversation_pb.rb +3 -1
- data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +2 -2
- data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +5 -1
- data/lib/google/cloud/discoveryengine/v1beta/user_event_pb.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/common.rb +9 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/conversation.rb +4 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb +34 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +136 -3
- data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +4 -0
- metadata +25 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c38099d0888d0affb8b7a6b7994f3a1f872c4dcd89f0d73b46d936ca136abcef
|
4
|
+
data.tar.gz: 6c89d1ee7cb59dd1cf8ff94b7929a51e90912c9fa4eb5de8e3607dd8863bd82f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f9229fb79cc50eae6767e6badcf2b7954cb6438b0ee109cb3b652d2b870aa67e9f49bfaa345267871652328dda64b8e965a772121f52cec38033e4c4879faa6
|
7
|
+
data.tar.gz: d742bac3155f58bb3971f01c7432f6902231b2db45d6e24a5f04aed76f6b7b06fef6aa346b7533cc31fd6533f08fd64b5cdba095ca1f6bbb8578cf16554ac336
|
data/README.md
CHANGED
@@ -40,7 +40,7 @@ response = client.complete_query request
|
|
40
40
|
View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1beta/latest)
|
41
41
|
for class and method documentation.
|
42
42
|
|
43
|
-
See also the [Product Documentation](https://cloud.google.com/
|
43
|
+
See also the [Product Documentation](https://cloud.google.com/generative-ai-app-builder/docs)
|
44
44
|
for general usage information.
|
45
45
|
|
46
46
|
## Enabling Logging
|
@@ -18,6 +18,7 @@
|
|
18
18
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/discoveryengine/v1beta/completion_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
|
@completion_service_stub = ::Gapic::ServiceStub.new(
|
142
149
|
::Google::Cloud::DiscoveryEngine::V1beta::CompletionService::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
|
##
|
@@ -396,6 +411,14 @@ module Google
|
|
396
411
|
end
|
397
412
|
end
|
398
413
|
|
414
|
+
##
|
415
|
+
# Configuration for the channel pool
|
416
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
417
|
+
#
|
418
|
+
def channel_pool
|
419
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
420
|
+
end
|
421
|
+
|
399
422
|
##
|
400
423
|
# Configuration RPC class for the CompletionService API.
|
401
424
|
#
|
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/discoveryengine/v1beta/completion_service_pb"
|
21
21
|
require "google/cloud/discovery_engine/v1beta/completion_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
|
@completion_service_stub = ::Google::Cloud::DiscoveryEngine::V1beta::CompletionService::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
|
##
|
@@ -210,6 +224,22 @@ module Google
|
|
210
224
|
# @return [::Google::Cloud::DiscoveryEngine::V1beta::CompleteQueryResponse]
|
211
225
|
#
|
212
226
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
227
|
+
#
|
228
|
+
# @example Basic example
|
229
|
+
# require "google/cloud/discovery_engine/v1beta"
|
230
|
+
#
|
231
|
+
# # Create a client object. The client can be reused for multiple calls.
|
232
|
+
# client = Google::Cloud::DiscoveryEngine::V1beta::CompletionService::Rest::Client.new
|
233
|
+
#
|
234
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
235
|
+
# request = Google::Cloud::DiscoveryEngine::V1beta::CompleteQueryRequest.new
|
236
|
+
#
|
237
|
+
# # Call the complete_query method.
|
238
|
+
# result = client.complete_query request
|
239
|
+
#
|
240
|
+
# # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::CompleteQueryResponse.
|
241
|
+
# p result
|
242
|
+
#
|
213
243
|
def complete_query request, options = nil
|
214
244
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
215
245
|
|
@@ -18,6 +18,7 @@
|
|
18
18
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/discoveryengine/v1beta/conversational_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
|
@conversational_search_service_stub = ::Gapic::ServiceStub.new(
|
142
149
|
::Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::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 converse_conversation(name: nil, query: nil, serving_config: nil, conversation: nil, safe_search: nil)
|
180
|
+
# @overload converse_conversation(name: nil, query: nil, serving_config: nil, conversation: nil, safe_search: nil, user_labels: nil, summary_spec: nil)
|
166
181
|
# Pass arguments to `converse_conversation` 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).
|
@@ -186,6 +201,26 @@ module Google
|
|
186
201
|
# session.
|
187
202
|
# @param safe_search [::Boolean]
|
188
203
|
# Whether to turn on safe search.
|
204
|
+
# @param user_labels [::Hash{::String => ::String}]
|
205
|
+
# The user labels applied to a resource must meet the following requirements:
|
206
|
+
#
|
207
|
+
# * Each resource can have multiple labels, up to a maximum of 64.
|
208
|
+
# * Each label must be a key-value pair.
|
209
|
+
# * Keys have a minimum length of 1 character and a maximum length of 63
|
210
|
+
# characters and cannot be empty. Values can be empty and have a maximum
|
211
|
+
# length of 63 characters.
|
212
|
+
# * Keys and values can contain only lowercase letters, numeric characters,
|
213
|
+
# underscores, and dashes. All characters must use UTF-8 encoding, and
|
214
|
+
# international characters are allowed.
|
215
|
+
# * The key portion of a label must be unique. However, you can use the same
|
216
|
+
# key with multiple resources.
|
217
|
+
# * Keys must start with a lowercase letter or international character.
|
218
|
+
#
|
219
|
+
# See [Google Cloud
|
220
|
+
# Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
221
|
+
# for more details.
|
222
|
+
# @param summary_spec [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec, ::Hash]
|
223
|
+
# A specification for configuring the summary returned in the response.
|
189
224
|
#
|
190
225
|
# @yield [response, operation] Access the result along with the RPC operation
|
191
226
|
# @yieldparam response [::Google::Cloud::DiscoveryEngine::V1beta::ConverseConversationResponse]
|
@@ -849,6 +884,14 @@ module Google
|
|
849
884
|
end
|
850
885
|
end
|
851
886
|
|
887
|
+
##
|
888
|
+
# Configuration for the channel pool
|
889
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
890
|
+
#
|
891
|
+
def channel_pool
|
892
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
893
|
+
end
|
894
|
+
|
852
895
|
##
|
853
896
|
# Configuration RPC class for the ConversationalSearchService API.
|
854
897
|
#
|
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/discoveryengine/v1beta/conversational_search_service_pb"
|
21
21
|
require "google/cloud/discovery_engine/v1beta/conversational_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
|
@conversational_search_service_stub = ::Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::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 converse_conversation(name: nil, query: nil, serving_config: nil, conversation: nil, safe_search: nil)
|
170
|
+
# @overload converse_conversation(name: nil, query: nil, serving_config: nil, conversation: nil, safe_search: nil, user_labels: nil, summary_spec: nil)
|
157
171
|
# Pass arguments to `converse_conversation` 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).
|
@@ -177,6 +191,26 @@ module Google
|
|
177
191
|
# session.
|
178
192
|
# @param safe_search [::Boolean]
|
179
193
|
# Whether to turn on safe search.
|
194
|
+
# @param user_labels [::Hash{::String => ::String}]
|
195
|
+
# The user labels applied to a resource must meet the following requirements:
|
196
|
+
#
|
197
|
+
# * Each resource can have multiple labels, up to a maximum of 64.
|
198
|
+
# * Each label must be a key-value pair.
|
199
|
+
# * Keys have a minimum length of 1 character and a maximum length of 63
|
200
|
+
# characters and cannot be empty. Values can be empty and have a maximum
|
201
|
+
# length of 63 characters.
|
202
|
+
# * Keys and values can contain only lowercase letters, numeric characters,
|
203
|
+
# underscores, and dashes. All characters must use UTF-8 encoding, and
|
204
|
+
# international characters are allowed.
|
205
|
+
# * The key portion of a label must be unique. However, you can use the same
|
206
|
+
# key with multiple resources.
|
207
|
+
# * Keys must start with a lowercase letter or international character.
|
208
|
+
#
|
209
|
+
# See [Google Cloud
|
210
|
+
# Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
211
|
+
# for more details.
|
212
|
+
# @param summary_spec [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec, ::Hash]
|
213
|
+
# A specification for configuring the summary returned in the response.
|
180
214
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
181
215
|
# @yieldparam result [::Google::Cloud::DiscoveryEngine::V1beta::ConverseConversationResponse]
|
182
216
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -184,6 +218,22 @@ module Google
|
|
184
218
|
# @return [::Google::Cloud::DiscoveryEngine::V1beta::ConverseConversationResponse]
|
185
219
|
#
|
186
220
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
221
|
+
#
|
222
|
+
# @example Basic example
|
223
|
+
# require "google/cloud/discovery_engine/v1beta"
|
224
|
+
#
|
225
|
+
# # Create a client object. The client can be reused for multiple calls.
|
226
|
+
# client = Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Rest::Client.new
|
227
|
+
#
|
228
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
229
|
+
# request = Google::Cloud::DiscoveryEngine::V1beta::ConverseConversationRequest.new
|
230
|
+
#
|
231
|
+
# # Call the converse_conversation method.
|
232
|
+
# result = client.converse_conversation request
|
233
|
+
#
|
234
|
+
# # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::ConverseConversationResponse.
|
235
|
+
# p result
|
236
|
+
#
|
187
237
|
def converse_conversation request, options = nil
|
188
238
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
189
239
|
|
@@ -252,6 +302,22 @@ module Google
|
|
252
302
|
# @return [::Google::Cloud::DiscoveryEngine::V1beta::Conversation]
|
253
303
|
#
|
254
304
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
305
|
+
#
|
306
|
+
# @example Basic example
|
307
|
+
# require "google/cloud/discovery_engine/v1beta"
|
308
|
+
#
|
309
|
+
# # Create a client object. The client can be reused for multiple calls.
|
310
|
+
# client = Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Rest::Client.new
|
311
|
+
#
|
312
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
313
|
+
# request = Google::Cloud::DiscoveryEngine::V1beta::CreateConversationRequest.new
|
314
|
+
#
|
315
|
+
# # Call the create_conversation method.
|
316
|
+
# result = client.create_conversation request
|
317
|
+
#
|
318
|
+
# # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::Conversation.
|
319
|
+
# p result
|
320
|
+
#
|
255
321
|
def create_conversation request, options = nil
|
256
322
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
257
323
|
|
@@ -318,6 +384,22 @@ module Google
|
|
318
384
|
# @return [::Google::Protobuf::Empty]
|
319
385
|
#
|
320
386
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
387
|
+
#
|
388
|
+
# @example Basic example
|
389
|
+
# require "google/cloud/discovery_engine/v1beta"
|
390
|
+
#
|
391
|
+
# # Create a client object. The client can be reused for multiple calls.
|
392
|
+
# client = Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Rest::Client.new
|
393
|
+
#
|
394
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
395
|
+
# request = Google::Cloud::DiscoveryEngine::V1beta::DeleteConversationRequest.new
|
396
|
+
#
|
397
|
+
# # Call the delete_conversation method.
|
398
|
+
# result = client.delete_conversation request
|
399
|
+
#
|
400
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
401
|
+
# p result
|
402
|
+
#
|
321
403
|
def delete_conversation request, options = nil
|
322
404
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
323
405
|
|
@@ -393,6 +475,22 @@ module Google
|
|
393
475
|
# @return [::Google::Cloud::DiscoveryEngine::V1beta::Conversation]
|
394
476
|
#
|
395
477
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
478
|
+
#
|
479
|
+
# @example Basic example
|
480
|
+
# require "google/cloud/discovery_engine/v1beta"
|
481
|
+
#
|
482
|
+
# # Create a client object. The client can be reused for multiple calls.
|
483
|
+
# client = Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Rest::Client.new
|
484
|
+
#
|
485
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
486
|
+
# request = Google::Cloud::DiscoveryEngine::V1beta::UpdateConversationRequest.new
|
487
|
+
#
|
488
|
+
# # Call the update_conversation method.
|
489
|
+
# result = client.update_conversation request
|
490
|
+
#
|
491
|
+
# # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::Conversation.
|
492
|
+
# p result
|
493
|
+
#
|
396
494
|
def update_conversation request, options = nil
|
397
495
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
398
496
|
|
@@ -456,6 +554,22 @@ module Google
|
|
456
554
|
# @return [::Google::Cloud::DiscoveryEngine::V1beta::Conversation]
|
457
555
|
#
|
458
556
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
557
|
+
#
|
558
|
+
# @example Basic example
|
559
|
+
# require "google/cloud/discovery_engine/v1beta"
|
560
|
+
#
|
561
|
+
# # Create a client object. The client can be reused for multiple calls.
|
562
|
+
# client = Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Rest::Client.new
|
563
|
+
#
|
564
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
565
|
+
# request = Google::Cloud::DiscoveryEngine::V1beta::GetConversationRequest.new
|
566
|
+
#
|
567
|
+
# # Call the get_conversation method.
|
568
|
+
# result = client.get_conversation request
|
569
|
+
#
|
570
|
+
# # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::Conversation.
|
571
|
+
# p result
|
572
|
+
#
|
459
573
|
def get_conversation request, options = nil
|
460
574
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
461
575
|
|
@@ -543,6 +657,26 @@ module Google
|
|
543
657
|
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1beta::Conversation>]
|
544
658
|
#
|
545
659
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
660
|
+
#
|
661
|
+
# @example Basic example
|
662
|
+
# require "google/cloud/discovery_engine/v1beta"
|
663
|
+
#
|
664
|
+
# # Create a client object. The client can be reused for multiple calls.
|
665
|
+
# client = Google::Cloud::DiscoveryEngine::V1beta::ConversationalSearchService::Rest::Client.new
|
666
|
+
#
|
667
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
668
|
+
# request = Google::Cloud::DiscoveryEngine::V1beta::ListConversationsRequest.new
|
669
|
+
#
|
670
|
+
# # Call the list_conversations method.
|
671
|
+
# result = client.list_conversations request
|
672
|
+
#
|
673
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
674
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
675
|
+
# result.each do |item|
|
676
|
+
# # Each element is of type ::Google::Cloud::DiscoveryEngine::V1beta::Conversation.
|
677
|
+
# p item
|
678
|
+
# end
|
679
|
+
#
|
546
680
|
def list_conversations request, options = nil
|
547
681
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
548
682
|
|
@@ -18,6 +18,7 @@
|
|
18
18
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/discoveryengine/v1beta/document_service_pb"
|
21
|
+
require "google/cloud/location"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -151,12 +152,19 @@ module Google
|
|
151
152
|
config.endpoint = @config.endpoint
|
152
153
|
end
|
153
154
|
|
155
|
+
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
156
|
+
config.credentials = credentials
|
157
|
+
config.quota_project = @quota_project_id
|
158
|
+
config.endpoint = @config.endpoint
|
159
|
+
end
|
160
|
+
|
154
161
|
@document_service_stub = ::Gapic::ServiceStub.new(
|
155
162
|
::Google::Cloud::DiscoveryEngine::V1beta::DocumentService::Stub,
|
156
163
|
credentials: credentials,
|
157
164
|
endpoint: @config.endpoint,
|
158
165
|
channel_args: @config.channel_args,
|
159
|
-
interceptors: @config.interceptors
|
166
|
+
interceptors: @config.interceptors,
|
167
|
+
channel_pool_config: @config.channel_pool
|
160
168
|
)
|
161
169
|
end
|
162
170
|
|
@@ -167,6 +175,13 @@ module Google
|
|
167
175
|
#
|
168
176
|
attr_reader :operations_client
|
169
177
|
|
178
|
+
##
|
179
|
+
# Get the associated client for mix-in of the Locations.
|
180
|
+
#
|
181
|
+
# @return [Google::Cloud::Location::Locations::Client]
|
182
|
+
#
|
183
|
+
attr_reader :location_client
|
184
|
+
|
170
185
|
# Service calls
|
171
186
|
|
172
187
|
##
|
@@ -1079,6 +1094,14 @@ module Google
|
|
1079
1094
|
end
|
1080
1095
|
end
|
1081
1096
|
|
1097
|
+
##
|
1098
|
+
# Configuration for the channel pool
|
1099
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
1100
|
+
#
|
1101
|
+
def channel_pool
|
1102
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
1103
|
+
end
|
1104
|
+
|
1082
1105
|
##
|
1083
1106
|
# Configuration RPC class for the DocumentService API.
|
1084
1107
|
#
|
@@ -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
|
#
|