google-cloud-discovery_engine 2.1.1 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +3 -3
- data/lib/google/cloud/discovery_engine/version.rb +1 -1
- data/lib/google/cloud/discovery_engine.rb +401 -51
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4746637b6d60d527b86a4b2a83bee92c4e87af1763312758cbb5b5f786f9a0d4
|
4
|
+
data.tar.gz: fa8450d7fa4d7696132cf2dcf832ba17985a5545daac360a2a7c8602187439b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65a4074b249504feaef862ca4923ab13d61a225bd3514dffd784afe13d7fb4a179876f55473e0050c1259c90c44226dd0383845c53b69900ed3342e437de8d56
|
7
|
+
data.tar.gz: 3be508227faea3c122ac6ef7890d30f512dacc969a50c947785dcc7b06dc45957df6e4e0a59f5374739052526984dbbfb25bcfef0680b62f0ca25ad9414edd9e
|
data/AUTHENTICATION.md
CHANGED
@@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization:
|
|
56
56
|
```ruby
|
57
57
|
require "google/cloud/discovery_engine"
|
58
58
|
|
59
|
-
client = Google::Cloud::DiscoveryEngine.
|
59
|
+
client = Google::Cloud::DiscoveryEngine.search_service do |config|
|
60
60
|
config.credentials = "path/to/credentialfile.json"
|
61
61
|
end
|
62
62
|
```
|
@@ -70,7 +70,7 @@ Google::Cloud::DiscoveryEngine.configure do |config|
|
|
70
70
|
config.credentials = "path/to/credentialfile.json"
|
71
71
|
end
|
72
72
|
|
73
|
-
client = Google::Cloud::DiscoveryEngine.
|
73
|
+
client = Google::Cloud::DiscoveryEngine.search_service
|
74
74
|
```
|
75
75
|
|
76
76
|
### Environment Variables
|
@@ -100,7 +100,7 @@ require "google/cloud/discovery_engine"
|
|
100
100
|
|
101
101
|
ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json"
|
102
102
|
|
103
|
-
client = Google::Cloud::DiscoveryEngine.
|
103
|
+
client = Google::Cloud::DiscoveryEngine.search_service
|
104
104
|
```
|
105
105
|
|
106
106
|
### Local ADC file
|
@@ -46,57 +46,57 @@ module Google
|
|
46
46
|
module Cloud
|
47
47
|
module DiscoveryEngine
|
48
48
|
##
|
49
|
-
# Create a new client object for
|
49
|
+
# Create a new client object for SearchService.
|
50
50
|
#
|
51
51
|
# By default, this returns an instance of
|
52
|
-
# [Google::Cloud::DiscoveryEngine::V1::
|
52
|
+
# [Google::Cloud::DiscoveryEngine::V1::SearchService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-SearchService-Client)
|
53
53
|
# for a gRPC client for version V1 of the API.
|
54
54
|
# However, you can specify a different API version by passing it in the
|
55
|
-
# `version` parameter. If the
|
55
|
+
# `version` parameter. If the SearchService service is
|
56
56
|
# supported by that API version, and the corresponding gem is available, the
|
57
57
|
# appropriate versioned client will be returned.
|
58
58
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
59
59
|
# the `transport` parameter.
|
60
60
|
#
|
61
61
|
# Raises an exception if the currently installed versioned client gem for the
|
62
|
-
# given API version does not support the given transport of the
|
62
|
+
# given API version does not support the given transport of the SearchService service.
|
63
63
|
# You can determine whether the method will succeed by calling
|
64
|
-
# {Google::Cloud::DiscoveryEngine.
|
64
|
+
# {Google::Cloud::DiscoveryEngine.search_service_available?}.
|
65
65
|
#
|
66
|
-
# ## About
|
66
|
+
# ## About SearchService
|
67
67
|
#
|
68
|
-
# Service for
|
68
|
+
# Service for search.
|
69
69
|
#
|
70
70
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
71
71
|
# Defaults to `:v1`.
|
72
72
|
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
73
73
|
# @return [::Object] A client object for the specified version.
|
74
74
|
#
|
75
|
-
def self.
|
75
|
+
def self.search_service version: :v1, transport: :grpc, &block
|
76
76
|
require "google/cloud/discovery_engine/#{version.to_s.downcase}"
|
77
77
|
|
78
78
|
package_name = Google::Cloud::DiscoveryEngine
|
79
79
|
.constants
|
80
80
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
81
81
|
.first
|
82
|
-
service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:
|
82
|
+
service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:SearchService)
|
83
83
|
service_module = service_module.const_get(:Rest) if transport == :rest
|
84
84
|
service_module.const_get(:Client).new(&block)
|
85
85
|
end
|
86
86
|
|
87
87
|
##
|
88
|
-
# Determines whether the
|
89
|
-
# If true, you can retrieve a client object by calling {Google::Cloud::DiscoveryEngine.
|
88
|
+
# Determines whether the SearchService service is supported by the current client.
|
89
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::DiscoveryEngine.search_service}.
|
90
90
|
# If false, that method will raise an exception. This could happen if the given
|
91
|
-
# API version does not exist or does not support the
|
92
|
-
# or if the versioned client gem needs an update to support the
|
91
|
+
# API version does not exist or does not support the SearchService service,
|
92
|
+
# or if the versioned client gem needs an update to support the SearchService service.
|
93
93
|
#
|
94
94
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
95
95
|
# Defaults to `:v1`.
|
96
96
|
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
97
97
|
# @return [boolean] Whether the service is available.
|
98
98
|
#
|
99
|
-
def self.
|
99
|
+
def self.search_service_available? version: :v1, transport: :grpc
|
100
100
|
require "google/cloud/discovery_engine/#{version.to_s.downcase}"
|
101
101
|
package_name = Google::Cloud::DiscoveryEngine
|
102
102
|
.constants
|
@@ -104,8 +104,8 @@ module Google
|
|
104
104
|
.first
|
105
105
|
return false unless package_name
|
106
106
|
service_module = Google::Cloud::DiscoveryEngine.const_get package_name
|
107
|
-
return false unless service_module.const_defined? :
|
108
|
-
service_module = service_module.const_get :
|
107
|
+
return false unless service_module.const_defined? :SearchService
|
108
|
+
service_module = service_module.const_get :SearchService
|
109
109
|
if transport == :rest
|
110
110
|
return false unless service_module.const_defined? :Rest
|
111
111
|
service_module = service_module.const_get :Rest
|
@@ -116,60 +116,57 @@ module Google
|
|
116
116
|
end
|
117
117
|
|
118
118
|
##
|
119
|
-
# Create a new client object for
|
119
|
+
# Create a new client object for AssistantService.
|
120
120
|
#
|
121
121
|
# By default, this returns an instance of
|
122
|
-
# [Google::Cloud::DiscoveryEngine::V1::
|
122
|
+
# [Google::Cloud::DiscoveryEngine::V1::AssistantService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-AssistantService-Client)
|
123
123
|
# for a gRPC client for version V1 of the API.
|
124
124
|
# However, you can specify a different API version by passing it in the
|
125
|
-
# `version` parameter. If the
|
125
|
+
# `version` parameter. If the AssistantService service is
|
126
126
|
# supported by that API version, and the corresponding gem is available, the
|
127
127
|
# appropriate versioned client will be returned.
|
128
128
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
129
129
|
# the `transport` parameter.
|
130
130
|
#
|
131
131
|
# Raises an exception if the currently installed versioned client gem for the
|
132
|
-
# given API version does not support the given transport of the
|
132
|
+
# given API version does not support the given transport of the AssistantService service.
|
133
133
|
# You can determine whether the method will succeed by calling
|
134
|
-
# {Google::Cloud::DiscoveryEngine.
|
134
|
+
# {Google::Cloud::DiscoveryEngine.assistant_service_available?}.
|
135
135
|
#
|
136
|
-
# ## About
|
136
|
+
# ## About AssistantService
|
137
137
|
#
|
138
|
-
# Service for
|
139
|
-
# Controls allow for custom logic to be implemented in the serving path.
|
140
|
-
# Controls need to be attached to a Serving Config to be considered during a
|
141
|
-
# request.
|
138
|
+
# Service for managing Assistant configuration and assisting users.
|
142
139
|
#
|
143
140
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
144
141
|
# Defaults to `:v1`.
|
145
142
|
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
146
143
|
# @return [::Object] A client object for the specified version.
|
147
144
|
#
|
148
|
-
def self.
|
145
|
+
def self.assistant_service version: :v1, transport: :grpc, &block
|
149
146
|
require "google/cloud/discovery_engine/#{version.to_s.downcase}"
|
150
147
|
|
151
148
|
package_name = Google::Cloud::DiscoveryEngine
|
152
149
|
.constants
|
153
150
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
154
151
|
.first
|
155
|
-
service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:
|
152
|
+
service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:AssistantService)
|
156
153
|
service_module = service_module.const_get(:Rest) if transport == :rest
|
157
154
|
service_module.const_get(:Client).new(&block)
|
158
155
|
end
|
159
156
|
|
160
157
|
##
|
161
|
-
# Determines whether the
|
162
|
-
# If true, you can retrieve a client object by calling {Google::Cloud::DiscoveryEngine.
|
158
|
+
# Determines whether the AssistantService service is supported by the current client.
|
159
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::DiscoveryEngine.assistant_service}.
|
163
160
|
# If false, that method will raise an exception. This could happen if the given
|
164
|
-
# API version does not exist or does not support the
|
165
|
-
# or if the versioned client gem needs an update to support the
|
161
|
+
# API version does not exist or does not support the AssistantService service,
|
162
|
+
# or if the versioned client gem needs an update to support the AssistantService service.
|
166
163
|
#
|
167
164
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
168
165
|
# Defaults to `:v1`.
|
169
166
|
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
170
167
|
# @return [boolean] Whether the service is available.
|
171
168
|
#
|
172
|
-
def self.
|
169
|
+
def self.assistant_service_available? version: :v1, transport: :grpc
|
173
170
|
require "google/cloud/discovery_engine/#{version.to_s.downcase}"
|
174
171
|
package_name = Google::Cloud::DiscoveryEngine
|
175
172
|
.constants
|
@@ -177,8 +174,8 @@ module Google
|
|
177
174
|
.first
|
178
175
|
return false unless package_name
|
179
176
|
service_module = Google::Cloud::DiscoveryEngine.const_get package_name
|
180
|
-
return false unless service_module.const_defined? :
|
181
|
-
service_module = service_module.const_get :
|
177
|
+
return false unless service_module.const_defined? :AssistantService
|
178
|
+
service_module = service_module.const_get :AssistantService
|
182
179
|
if transport == :rest
|
183
180
|
return false unless service_module.const_defined? :Rest
|
184
181
|
service_module = service_module.const_get :Rest
|
@@ -189,57 +186,57 @@ module Google
|
|
189
186
|
end
|
190
187
|
|
191
188
|
##
|
192
|
-
# Create a new client object for
|
189
|
+
# Create a new client object for CmekConfigService.
|
193
190
|
#
|
194
191
|
# By default, this returns an instance of
|
195
|
-
# [Google::Cloud::DiscoveryEngine::V1::
|
192
|
+
# [Google::Cloud::DiscoveryEngine::V1::CmekConfigService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-CmekConfigService-Client)
|
196
193
|
# for a gRPC client for version V1 of the API.
|
197
194
|
# However, you can specify a different API version by passing it in the
|
198
|
-
# `version` parameter. If the
|
195
|
+
# `version` parameter. If the CmekConfigService service is
|
199
196
|
# supported by that API version, and the corresponding gem is available, the
|
200
197
|
# appropriate versioned client will be returned.
|
201
198
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
202
199
|
# the `transport` parameter.
|
203
200
|
#
|
204
201
|
# Raises an exception if the currently installed versioned client gem for the
|
205
|
-
# given API version does not support the given transport of the
|
202
|
+
# given API version does not support the given transport of the CmekConfigService service.
|
206
203
|
# You can determine whether the method will succeed by calling
|
207
|
-
# {Google::Cloud::DiscoveryEngine.
|
204
|
+
# {Google::Cloud::DiscoveryEngine.cmek_config_service_available?}.
|
208
205
|
#
|
209
|
-
# ## About
|
206
|
+
# ## About CmekConfigService
|
210
207
|
#
|
211
|
-
# Service for
|
208
|
+
# Service for managing CMEK related tasks
|
212
209
|
#
|
213
210
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
214
211
|
# Defaults to `:v1`.
|
215
212
|
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
216
213
|
# @return [::Object] A client object for the specified version.
|
217
214
|
#
|
218
|
-
def self.
|
215
|
+
def self.cmek_config_service version: :v1, transport: :grpc, &block
|
219
216
|
require "google/cloud/discovery_engine/#{version.to_s.downcase}"
|
220
217
|
|
221
218
|
package_name = Google::Cloud::DiscoveryEngine
|
222
219
|
.constants
|
223
220
|
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
224
221
|
.first
|
225
|
-
service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:
|
222
|
+
service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:CmekConfigService)
|
226
223
|
service_module = service_module.const_get(:Rest) if transport == :rest
|
227
224
|
service_module.const_get(:Client).new(&block)
|
228
225
|
end
|
229
226
|
|
230
227
|
##
|
231
|
-
# Determines whether the
|
232
|
-
# If true, you can retrieve a client object by calling {Google::Cloud::DiscoveryEngine.
|
228
|
+
# Determines whether the CmekConfigService service is supported by the current client.
|
229
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::DiscoveryEngine.cmek_config_service}.
|
233
230
|
# If false, that method will raise an exception. This could happen if the given
|
234
|
-
# API version does not exist or does not support the
|
235
|
-
# or if the versioned client gem needs an update to support the
|
231
|
+
# API version does not exist or does not support the CmekConfigService service,
|
232
|
+
# or if the versioned client gem needs an update to support the CmekConfigService service.
|
236
233
|
#
|
237
234
|
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
238
235
|
# Defaults to `:v1`.
|
239
236
|
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
240
237
|
# @return [boolean] Whether the service is available.
|
241
238
|
#
|
242
|
-
def self.
|
239
|
+
def self.cmek_config_service_available? version: :v1, transport: :grpc
|
243
240
|
require "google/cloud/discovery_engine/#{version.to_s.downcase}"
|
244
241
|
package_name = Google::Cloud::DiscoveryEngine
|
245
242
|
.constants
|
@@ -247,8 +244,151 @@ module Google
|
|
247
244
|
.first
|
248
245
|
return false unless package_name
|
249
246
|
service_module = Google::Cloud::DiscoveryEngine.const_get package_name
|
250
|
-
return false unless service_module.const_defined? :
|
251
|
-
service_module = service_module.const_get :
|
247
|
+
return false unless service_module.const_defined? :CmekConfigService
|
248
|
+
service_module = service_module.const_get :CmekConfigService
|
249
|
+
if transport == :rest
|
250
|
+
return false unless service_module.const_defined? :Rest
|
251
|
+
service_module = service_module.const_get :Rest
|
252
|
+
end
|
253
|
+
service_module.const_defined? :Client
|
254
|
+
rescue ::LoadError
|
255
|
+
false
|
256
|
+
end
|
257
|
+
|
258
|
+
##
|
259
|
+
# Create a new client object for CompletionService.
|
260
|
+
#
|
261
|
+
# By default, this returns an instance of
|
262
|
+
# [Google::Cloud::DiscoveryEngine::V1::CompletionService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-CompletionService-Client)
|
263
|
+
# for a gRPC client for version V1 of the API.
|
264
|
+
# However, you can specify a different API version by passing it in the
|
265
|
+
# `version` parameter. If the CompletionService service is
|
266
|
+
# supported by that API version, and the corresponding gem is available, the
|
267
|
+
# appropriate versioned client will be returned.
|
268
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
269
|
+
# the `transport` parameter.
|
270
|
+
#
|
271
|
+
# Raises an exception if the currently installed versioned client gem for the
|
272
|
+
# given API version does not support the given transport of the CompletionService service.
|
273
|
+
# You can determine whether the method will succeed by calling
|
274
|
+
# {Google::Cloud::DiscoveryEngine.completion_service_available?}.
|
275
|
+
#
|
276
|
+
# ## About CompletionService
|
277
|
+
#
|
278
|
+
# Service for Auto-Completion.
|
279
|
+
#
|
280
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
281
|
+
# Defaults to `:v1`.
|
282
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
283
|
+
# @return [::Object] A client object for the specified version.
|
284
|
+
#
|
285
|
+
def self.completion_service version: :v1, transport: :grpc, &block
|
286
|
+
require "google/cloud/discovery_engine/#{version.to_s.downcase}"
|
287
|
+
|
288
|
+
package_name = Google::Cloud::DiscoveryEngine
|
289
|
+
.constants
|
290
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
291
|
+
.first
|
292
|
+
service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:CompletionService)
|
293
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
294
|
+
service_module.const_get(:Client).new(&block)
|
295
|
+
end
|
296
|
+
|
297
|
+
##
|
298
|
+
# Determines whether the CompletionService service is supported by the current client.
|
299
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::DiscoveryEngine.completion_service}.
|
300
|
+
# If false, that method will raise an exception. This could happen if the given
|
301
|
+
# API version does not exist or does not support the CompletionService service,
|
302
|
+
# or if the versioned client gem needs an update to support the CompletionService service.
|
303
|
+
#
|
304
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
305
|
+
# Defaults to `:v1`.
|
306
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
307
|
+
# @return [boolean] Whether the service is available.
|
308
|
+
#
|
309
|
+
def self.completion_service_available? version: :v1, transport: :grpc
|
310
|
+
require "google/cloud/discovery_engine/#{version.to_s.downcase}"
|
311
|
+
package_name = Google::Cloud::DiscoveryEngine
|
312
|
+
.constants
|
313
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
314
|
+
.first
|
315
|
+
return false unless package_name
|
316
|
+
service_module = Google::Cloud::DiscoveryEngine.const_get package_name
|
317
|
+
return false unless service_module.const_defined? :CompletionService
|
318
|
+
service_module = service_module.const_get :CompletionService
|
319
|
+
if transport == :rest
|
320
|
+
return false unless service_module.const_defined? :Rest
|
321
|
+
service_module = service_module.const_get :Rest
|
322
|
+
end
|
323
|
+
service_module.const_defined? :Client
|
324
|
+
rescue ::LoadError
|
325
|
+
false
|
326
|
+
end
|
327
|
+
|
328
|
+
##
|
329
|
+
# Create a new client object for ControlService.
|
330
|
+
#
|
331
|
+
# By default, this returns an instance of
|
332
|
+
# [Google::Cloud::DiscoveryEngine::V1::ControlService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-ControlService-Client)
|
333
|
+
# for a gRPC client for version V1 of the API.
|
334
|
+
# However, you can specify a different API version by passing it in the
|
335
|
+
# `version` parameter. If the ControlService service is
|
336
|
+
# supported by that API version, and the corresponding gem is available, the
|
337
|
+
# appropriate versioned client will be returned.
|
338
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
339
|
+
# the `transport` parameter.
|
340
|
+
#
|
341
|
+
# Raises an exception if the currently installed versioned client gem for the
|
342
|
+
# given API version does not support the given transport of the ControlService service.
|
343
|
+
# You can determine whether the method will succeed by calling
|
344
|
+
# {Google::Cloud::DiscoveryEngine.control_service_available?}.
|
345
|
+
#
|
346
|
+
# ## About ControlService
|
347
|
+
#
|
348
|
+
# Service for performing CRUD operations on Controls.
|
349
|
+
# Controls allow for custom logic to be implemented in the serving path.
|
350
|
+
# Controls need to be attached to a Serving Config to be considered during a
|
351
|
+
# request.
|
352
|
+
#
|
353
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
354
|
+
# Defaults to `:v1`.
|
355
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
356
|
+
# @return [::Object] A client object for the specified version.
|
357
|
+
#
|
358
|
+
def self.control_service version: :v1, transport: :grpc, &block
|
359
|
+
require "google/cloud/discovery_engine/#{version.to_s.downcase}"
|
360
|
+
|
361
|
+
package_name = Google::Cloud::DiscoveryEngine
|
362
|
+
.constants
|
363
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
364
|
+
.first
|
365
|
+
service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:ControlService)
|
366
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
367
|
+
service_module.const_get(:Client).new(&block)
|
368
|
+
end
|
369
|
+
|
370
|
+
##
|
371
|
+
# Determines whether the ControlService service is supported by the current client.
|
372
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::DiscoveryEngine.control_service}.
|
373
|
+
# If false, that method will raise an exception. This could happen if the given
|
374
|
+
# API version does not exist or does not support the ControlService service,
|
375
|
+
# or if the versioned client gem needs an update to support the ControlService service.
|
376
|
+
#
|
377
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
378
|
+
# Defaults to `:v1`.
|
379
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
380
|
+
# @return [boolean] Whether the service is available.
|
381
|
+
#
|
382
|
+
def self.control_service_available? version: :v1, transport: :grpc
|
383
|
+
require "google/cloud/discovery_engine/#{version.to_s.downcase}"
|
384
|
+
package_name = Google::Cloud::DiscoveryEngine
|
385
|
+
.constants
|
386
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
387
|
+
.first
|
388
|
+
return false unless package_name
|
389
|
+
service_module = Google::Cloud::DiscoveryEngine.const_get package_name
|
390
|
+
return false unless service_module.const_defined? :ControlService
|
391
|
+
service_module = service_module.const_get :ControlService
|
252
392
|
if transport == :rest
|
253
393
|
return false unless service_module.const_defined? :Rest
|
254
394
|
service_module = service_module.const_get :Rest
|
@@ -611,6 +751,76 @@ module Google
|
|
611
751
|
false
|
612
752
|
end
|
613
753
|
|
754
|
+
##
|
755
|
+
# Create a new client object for IdentityMappingStoreService.
|
756
|
+
#
|
757
|
+
# By default, this returns an instance of
|
758
|
+
# [Google::Cloud::DiscoveryEngine::V1::IdentityMappingStoreService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-IdentityMappingStoreService-Client)
|
759
|
+
# for a gRPC client for version V1 of the API.
|
760
|
+
# However, you can specify a different API version by passing it in the
|
761
|
+
# `version` parameter. If the IdentityMappingStoreService service is
|
762
|
+
# supported by that API version, and the corresponding gem is available, the
|
763
|
+
# appropriate versioned client will be returned.
|
764
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
765
|
+
# the `transport` parameter.
|
766
|
+
#
|
767
|
+
# Raises an exception if the currently installed versioned client gem for the
|
768
|
+
# given API version does not support the given transport of the IdentityMappingStoreService service.
|
769
|
+
# You can determine whether the method will succeed by calling
|
770
|
+
# {Google::Cloud::DiscoveryEngine.identity_mapping_store_service_available?}.
|
771
|
+
#
|
772
|
+
# ## About IdentityMappingStoreService
|
773
|
+
#
|
774
|
+
# Service for managing Identity Mapping Stores.
|
775
|
+
#
|
776
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
777
|
+
# Defaults to `:v1`.
|
778
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
779
|
+
# @return [::Object] A client object for the specified version.
|
780
|
+
#
|
781
|
+
def self.identity_mapping_store_service version: :v1, transport: :grpc, &block
|
782
|
+
require "google/cloud/discovery_engine/#{version.to_s.downcase}"
|
783
|
+
|
784
|
+
package_name = Google::Cloud::DiscoveryEngine
|
785
|
+
.constants
|
786
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
787
|
+
.first
|
788
|
+
service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:IdentityMappingStoreService)
|
789
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
790
|
+
service_module.const_get(:Client).new(&block)
|
791
|
+
end
|
792
|
+
|
793
|
+
##
|
794
|
+
# Determines whether the IdentityMappingStoreService service is supported by the current client.
|
795
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::DiscoveryEngine.identity_mapping_store_service}.
|
796
|
+
# If false, that method will raise an exception. This could happen if the given
|
797
|
+
# API version does not exist or does not support the IdentityMappingStoreService service,
|
798
|
+
# or if the versioned client gem needs an update to support the IdentityMappingStoreService service.
|
799
|
+
#
|
800
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
801
|
+
# Defaults to `:v1`.
|
802
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
803
|
+
# @return [boolean] Whether the service is available.
|
804
|
+
#
|
805
|
+
def self.identity_mapping_store_service_available? version: :v1, transport: :grpc
|
806
|
+
require "google/cloud/discovery_engine/#{version.to_s.downcase}"
|
807
|
+
package_name = Google::Cloud::DiscoveryEngine
|
808
|
+
.constants
|
809
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
810
|
+
.first
|
811
|
+
return false unless package_name
|
812
|
+
service_module = Google::Cloud::DiscoveryEngine.const_get package_name
|
813
|
+
return false unless service_module.const_defined? :IdentityMappingStoreService
|
814
|
+
service_module = service_module.const_get :IdentityMappingStoreService
|
815
|
+
if transport == :rest
|
816
|
+
return false unless service_module.const_defined? :Rest
|
817
|
+
service_module = service_module.const_get :Rest
|
818
|
+
end
|
819
|
+
service_module.const_defined? :Client
|
820
|
+
rescue ::LoadError
|
821
|
+
false
|
822
|
+
end
|
823
|
+
|
614
824
|
##
|
615
825
|
# Create a new client object for ProjectService.
|
616
826
|
#
|
@@ -1033,6 +1243,76 @@ module Google
|
|
1033
1243
|
false
|
1034
1244
|
end
|
1035
1245
|
|
1246
|
+
##
|
1247
|
+
# Create a new client object for SessionService.
|
1248
|
+
#
|
1249
|
+
# By default, this returns an instance of
|
1250
|
+
# [Google::Cloud::DiscoveryEngine::V1::SessionService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-SessionService-Client)
|
1251
|
+
# for a gRPC client for version V1 of the API.
|
1252
|
+
# However, you can specify a different API version by passing it in the
|
1253
|
+
# `version` parameter. If the SessionService service is
|
1254
|
+
# supported by that API version, and the corresponding gem is available, the
|
1255
|
+
# appropriate versioned client will be returned.
|
1256
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
1257
|
+
# the `transport` parameter.
|
1258
|
+
#
|
1259
|
+
# Raises an exception if the currently installed versioned client gem for the
|
1260
|
+
# given API version does not support the given transport of the SessionService service.
|
1261
|
+
# You can determine whether the method will succeed by calling
|
1262
|
+
# {Google::Cloud::DiscoveryEngine.session_service_available?}.
|
1263
|
+
#
|
1264
|
+
# ## About SessionService
|
1265
|
+
#
|
1266
|
+
# Service for managing Sessions and Session-related resources.
|
1267
|
+
#
|
1268
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1269
|
+
# Defaults to `:v1`.
|
1270
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1271
|
+
# @return [::Object] A client object for the specified version.
|
1272
|
+
#
|
1273
|
+
def self.session_service version: :v1, transport: :grpc, &block
|
1274
|
+
require "google/cloud/discovery_engine/#{version.to_s.downcase}"
|
1275
|
+
|
1276
|
+
package_name = Google::Cloud::DiscoveryEngine
|
1277
|
+
.constants
|
1278
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
1279
|
+
.first
|
1280
|
+
service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:SessionService)
|
1281
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
1282
|
+
service_module.const_get(:Client).new(&block)
|
1283
|
+
end
|
1284
|
+
|
1285
|
+
##
|
1286
|
+
# Determines whether the SessionService service is supported by the current client.
|
1287
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::DiscoveryEngine.session_service}.
|
1288
|
+
# If false, that method will raise an exception. This could happen if the given
|
1289
|
+
# API version does not exist or does not support the SessionService service,
|
1290
|
+
# or if the versioned client gem needs an update to support the SessionService service.
|
1291
|
+
#
|
1292
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1293
|
+
# Defaults to `:v1`.
|
1294
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1295
|
+
# @return [boolean] Whether the service is available.
|
1296
|
+
#
|
1297
|
+
def self.session_service_available? version: :v1, transport: :grpc
|
1298
|
+
require "google/cloud/discovery_engine/#{version.to_s.downcase}"
|
1299
|
+
package_name = Google::Cloud::DiscoveryEngine
|
1300
|
+
.constants
|
1301
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
1302
|
+
.first
|
1303
|
+
return false unless package_name
|
1304
|
+
service_module = Google::Cloud::DiscoveryEngine.const_get package_name
|
1305
|
+
return false unless service_module.const_defined? :SessionService
|
1306
|
+
service_module = service_module.const_get :SessionService
|
1307
|
+
if transport == :rest
|
1308
|
+
return false unless service_module.const_defined? :Rest
|
1309
|
+
service_module = service_module.const_get :Rest
|
1310
|
+
end
|
1311
|
+
service_module.const_defined? :Client
|
1312
|
+
rescue ::LoadError
|
1313
|
+
false
|
1314
|
+
end
|
1315
|
+
|
1036
1316
|
##
|
1037
1317
|
# Create a new client object for SiteSearchEngineService.
|
1038
1318
|
#
|
@@ -1173,6 +1453,76 @@ module Google
|
|
1173
1453
|
false
|
1174
1454
|
end
|
1175
1455
|
|
1456
|
+
##
|
1457
|
+
# Create a new client object for UserLicenseService.
|
1458
|
+
#
|
1459
|
+
# By default, this returns an instance of
|
1460
|
+
# [Google::Cloud::DiscoveryEngine::V1::UserLicenseService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest/Google-Cloud-DiscoveryEngine-V1-UserLicenseService-Client)
|
1461
|
+
# for a gRPC client for version V1 of the API.
|
1462
|
+
# However, you can specify a different API version by passing it in the
|
1463
|
+
# `version` parameter. If the UserLicenseService service is
|
1464
|
+
# supported by that API version, and the corresponding gem is available, the
|
1465
|
+
# appropriate versioned client will be returned.
|
1466
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
1467
|
+
# the `transport` parameter.
|
1468
|
+
#
|
1469
|
+
# Raises an exception if the currently installed versioned client gem for the
|
1470
|
+
# given API version does not support the given transport of the UserLicenseService service.
|
1471
|
+
# You can determine whether the method will succeed by calling
|
1472
|
+
# {Google::Cloud::DiscoveryEngine.user_license_service_available?}.
|
1473
|
+
#
|
1474
|
+
# ## About UserLicenseService
|
1475
|
+
#
|
1476
|
+
# Service for managing User Licenses.
|
1477
|
+
#
|
1478
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1479
|
+
# Defaults to `:v1`.
|
1480
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1481
|
+
# @return [::Object] A client object for the specified version.
|
1482
|
+
#
|
1483
|
+
def self.user_license_service version: :v1, transport: :grpc, &block
|
1484
|
+
require "google/cloud/discovery_engine/#{version.to_s.downcase}"
|
1485
|
+
|
1486
|
+
package_name = Google::Cloud::DiscoveryEngine
|
1487
|
+
.constants
|
1488
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
1489
|
+
.first
|
1490
|
+
service_module = Google::Cloud::DiscoveryEngine.const_get(package_name).const_get(:UserLicenseService)
|
1491
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
1492
|
+
service_module.const_get(:Client).new(&block)
|
1493
|
+
end
|
1494
|
+
|
1495
|
+
##
|
1496
|
+
# Determines whether the UserLicenseService service is supported by the current client.
|
1497
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::DiscoveryEngine.user_license_service}.
|
1498
|
+
# If false, that method will raise an exception. This could happen if the given
|
1499
|
+
# API version does not exist or does not support the UserLicenseService service,
|
1500
|
+
# or if the versioned client gem needs an update to support the UserLicenseService service.
|
1501
|
+
#
|
1502
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
1503
|
+
# Defaults to `:v1`.
|
1504
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
1505
|
+
# @return [boolean] Whether the service is available.
|
1506
|
+
#
|
1507
|
+
def self.user_license_service_available? version: :v1, transport: :grpc
|
1508
|
+
require "google/cloud/discovery_engine/#{version.to_s.downcase}"
|
1509
|
+
package_name = Google::Cloud::DiscoveryEngine
|
1510
|
+
.constants
|
1511
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
1512
|
+
.first
|
1513
|
+
return false unless package_name
|
1514
|
+
service_module = Google::Cloud::DiscoveryEngine.const_get package_name
|
1515
|
+
return false unless service_module.const_defined? :UserLicenseService
|
1516
|
+
service_module = service_module.const_get :UserLicenseService
|
1517
|
+
if transport == :rest
|
1518
|
+
return false unless service_module.const_defined? :Rest
|
1519
|
+
service_module = service_module.const_get :Rest
|
1520
|
+
end
|
1521
|
+
service_module.const_defined? :Client
|
1522
|
+
rescue ::LoadError
|
1523
|
+
false
|
1524
|
+
end
|
1525
|
+
|
1176
1526
|
##
|
1177
1527
|
# Configure the google-cloud-discovery_engine library.
|
1178
1528
|
#
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-discovery_engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
@@ -68,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
70
|
requirements: []
|
71
|
-
rubygems_version: 3.6.
|
71
|
+
rubygems_version: 3.6.9
|
72
72
|
specification_version: 4
|
73
73
|
summary: Discovery Engine API.
|
74
74
|
test_files: []
|