google-cloud-discovery_engine-v1 0.4.2 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/google/cloud/discovery_engine/v1/completion_service/client.rb +235 -4
  4. data/lib/google/cloud/discovery_engine/v1/completion_service/operations.rb +801 -0
  5. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb +221 -4
  6. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb +1091 -0
  7. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/service_stub.rb +136 -0
  8. data/lib/google/cloud/discovery_engine/v1/completion_service/rest.rb +1 -0
  9. data/lib/google/cloud/discovery_engine/v1/completion_service.rb +1 -0
  10. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +20 -3
  11. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb +91 -0
  12. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +20 -3
  13. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/service_stub.rb +45 -0
  14. data/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb +924 -0
  15. data/lib/google/cloud/discovery_engine/v1/data_store_service/credentials.rb +47 -0
  16. data/lib/google/cloud/discovery_engine/v1/data_store_service/operations.rb +801 -0
  17. data/lib/google/cloud/discovery_engine/v1/data_store_service/paths.rb +97 -0
  18. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb +863 -0
  19. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb +1091 -0
  20. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/service_stub.rb +403 -0
  21. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest.rb +54 -0
  22. data/lib/google/cloud/discovery_engine/v1/data_store_service.rb +57 -0
  23. data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +14 -0
  24. data/lib/google/cloud/discovery_engine/v1/engine_service/client.rb +885 -0
  25. data/lib/google/cloud/discovery_engine/v1/engine_service/credentials.rb +47 -0
  26. data/lib/google/cloud/discovery_engine/v1/engine_service/operations.rb +801 -0
  27. data/lib/google/cloud/discovery_engine/v1/engine_service/paths.rb +73 -0
  28. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/client.rb +824 -0
  29. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +1091 -0
  30. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/service_stub.rb +366 -0
  31. data/lib/google/cloud/discovery_engine/v1/engine_service/rest.rb +54 -0
  32. data/lib/google/cloud/discovery_engine/v1/engine_service.rb +57 -0
  33. data/lib/google/cloud/discovery_engine/v1/rest.rb +3 -0
  34. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +14 -0
  35. data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +40 -4
  36. data/lib/google/cloud/discovery_engine/v1/search_service/paths.rb +19 -0
  37. data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +40 -4
  38. data/lib/google/cloud/discovery_engine/v1/search_service/rest/service_stub.rb +8 -0
  39. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb +1631 -0
  40. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/credentials.rb +47 -0
  41. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/operations.rb +801 -0
  42. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/paths.rb +127 -0
  43. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb +1521 -0
  44. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +1091 -0
  45. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/service_stub.rb +860 -0
  46. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest.rb +53 -0
  47. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service.rb +56 -0
  48. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +14 -0
  49. data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
  50. data/lib/google/cloud/discovery_engine/v1.rb +3 -0
  51. data/lib/google/cloud/discoveryengine/v1/common_pb.rb +5 -1
  52. data/lib/google/cloud/discoveryengine/v1/completion_pb.rb +45 -0
  53. data/lib/google/cloud/discoveryengine/v1/completion_service_pb.rb +4 -1
  54. data/lib/google/cloud/discoveryengine/v1/completion_service_services_pb.rb +8 -0
  55. data/lib/google/cloud/discoveryengine/v1/conversation_pb.rb +1 -1
  56. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +1 -1
  57. data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +49 -0
  58. data/lib/google/cloud/discoveryengine/v1/data_store_service_pb.rb +62 -0
  59. data/lib/google/cloud/discoveryengine/v1/data_store_service_services_pb.rb +61 -0
  60. data/lib/google/cloud/discoveryengine/v1/document_pb.rb +1 -1
  61. data/lib/google/cloud/discoveryengine/v1/document_service_pb.rb +1 -1
  62. data/lib/google/cloud/discoveryengine/v1/engine_pb.rb +53 -0
  63. data/lib/google/cloud/discoveryengine/v1/engine_service_pb.rb +62 -0
  64. data/lib/google/cloud/discoveryengine/v1/engine_service_services_pb.rb +55 -0
  65. data/lib/google/cloud/discoveryengine/v1/import_config_pb.rb +7 -1
  66. data/lib/google/cloud/discoveryengine/v1/purge_config_pb.rb +6 -1
  67. data/lib/google/cloud/discoveryengine/v1/schema_pb.rb +1 -1
  68. data/lib/google/cloud/discoveryengine/v1/schema_service_pb.rb +1 -1
  69. data/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +8 -1
  70. data/lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb +54 -0
  71. data/lib/google/cloud/discoveryengine/v1/site_search_engine_service_pb.rb +82 -0
  72. data/lib/google/cloud/discoveryengine/v1/site_search_engine_service_services_pb.rb +73 -0
  73. data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +1 -1
  74. data/lib/google/cloud/discoveryengine/v1/user_event_service_pb.rb +1 -1
  75. data/proto_docs/google/cloud/discoveryengine/v1/common.rb +51 -0
  76. data/proto_docs/google/cloud/discoveryengine/v1/completion.rb +53 -0
  77. data/proto_docs/google/cloud/discoveryengine/v1/completion_service.rb +10 -4
  78. data/proto_docs/google/cloud/discoveryengine/v1/conversation.rb +2 -0
  79. data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +19 -1
  80. data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +88 -0
  81. data/proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb +214 -0
  82. data/proto_docs/google/cloud/discoveryengine/v1/document.rb +1 -1
  83. data/proto_docs/google/cloud/discoveryengine/v1/engine.rb +214 -0
  84. data/proto_docs/google/cloud/discoveryengine/v1/engine_service.rb +177 -0
  85. data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +66 -0
  86. data/proto_docs/google/cloud/discoveryengine/v1/purge_config.rb +41 -0
  87. data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +149 -4
  88. data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine.rb +160 -0
  89. data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine_service.rb +525 -0
  90. data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +3 -3
  91. metadata +50 -116
@@ -0,0 +1,885 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/discoveryengine/v1/engine_service_pb"
21
+ require "google/cloud/location"
22
+
23
+ module Google
24
+ module Cloud
25
+ module DiscoveryEngine
26
+ module V1
27
+ module EngineService
28
+ ##
29
+ # Client for the EngineService service.
30
+ #
31
+ # Service for managing {::Google::Cloud::DiscoveryEngine::V1::Engine Engine}
32
+ # configuration.
33
+ #
34
+ class Client
35
+ # @private
36
+ DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
37
+
38
+ include Paths
39
+
40
+ # @private
41
+ attr_reader :engine_service_stub
42
+
43
+ ##
44
+ # Configure the EngineService Client class.
45
+ #
46
+ # See {::Google::Cloud::DiscoveryEngine::V1::EngineService::Client::Configuration}
47
+ # for a description of the configuration fields.
48
+ #
49
+ # @example
50
+ #
51
+ # # Modify the configuration for all EngineService clients
52
+ # ::Google::Cloud::DiscoveryEngine::V1::EngineService::Client.configure do |config|
53
+ # config.timeout = 10.0
54
+ # end
55
+ #
56
+ # @yield [config] Configure the Client client.
57
+ # @yieldparam config [Client::Configuration]
58
+ #
59
+ # @return [Client::Configuration]
60
+ #
61
+ def self.configure
62
+ @configure ||= begin
63
+ namespace = ["Google", "Cloud", "DiscoveryEngine", "V1"]
64
+ parent_config = while namespace.any?
65
+ parent_name = namespace.join "::"
66
+ parent_const = const_get parent_name
67
+ break parent_const.configure if parent_const.respond_to? :configure
68
+ namespace.pop
69
+ end
70
+ default_config = Client::Configuration.new parent_config
71
+
72
+ default_config
73
+ end
74
+ yield @configure if block_given?
75
+ @configure
76
+ end
77
+
78
+ ##
79
+ # Configure the EngineService Client instance.
80
+ #
81
+ # The configuration is set to the derived mode, meaning that values can be changed,
82
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
83
+ # should be made on {Client.configure}.
84
+ #
85
+ # See {::Google::Cloud::DiscoveryEngine::V1::EngineService::Client::Configuration}
86
+ # for a description of the configuration fields.
87
+ #
88
+ # @yield [config] Configure the Client client.
89
+ # @yieldparam config [Client::Configuration]
90
+ #
91
+ # @return [Client::Configuration]
92
+ #
93
+ def configure
94
+ yield @config if block_given?
95
+ @config
96
+ end
97
+
98
+ ##
99
+ # The effective universe domain
100
+ #
101
+ # @return [String]
102
+ #
103
+ def universe_domain
104
+ @engine_service_stub.universe_domain
105
+ end
106
+
107
+ ##
108
+ # Create a new EngineService client object.
109
+ #
110
+ # @example
111
+ #
112
+ # # Create a client using the default configuration
113
+ # client = ::Google::Cloud::DiscoveryEngine::V1::EngineService::Client.new
114
+ #
115
+ # # Create a client using a custom configuration
116
+ # client = ::Google::Cloud::DiscoveryEngine::V1::EngineService::Client.new do |config|
117
+ # config.timeout = 10.0
118
+ # end
119
+ #
120
+ # @yield [config] Configure the EngineService client.
121
+ # @yieldparam config [Client::Configuration]
122
+ #
123
+ def initialize
124
+ # These require statements are intentionally placed here to initialize
125
+ # the gRPC module only when it's required.
126
+ # See https://github.com/googleapis/toolkit/issues/446
127
+ require "gapic/grpc"
128
+ require "google/cloud/discoveryengine/v1/engine_service_services_pb"
129
+
130
+ # Create the configuration object
131
+ @config = Configuration.new Client.configure
132
+
133
+ # Yield the configuration if needed
134
+ yield @config if block_given?
135
+
136
+ # Create credentials
137
+ credentials = @config.credentials
138
+ # Use self-signed JWT if the endpoint is unchanged from default,
139
+ # but only if the default endpoint does not have a region prefix.
140
+ enable_self_signed_jwt = @config.endpoint.nil? ||
141
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
142
+ !@config.endpoint.split(".").first.include?("-"))
143
+ credentials ||= Credentials.default scope: @config.scope,
144
+ enable_self_signed_jwt: enable_self_signed_jwt
145
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
146
+ credentials = Credentials.new credentials, scope: @config.scope
147
+ end
148
+ @quota_project_id = @config.quota_project
149
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
150
+
151
+ @operations_client = Operations.new do |config|
152
+ config.credentials = credentials
153
+ config.quota_project = @quota_project_id
154
+ config.endpoint = @config.endpoint
155
+ config.universe_domain = @config.universe_domain
156
+ end
157
+
158
+ @engine_service_stub = ::Gapic::ServiceStub.new(
159
+ ::Google::Cloud::DiscoveryEngine::V1::EngineService::Stub,
160
+ credentials: credentials,
161
+ endpoint: @config.endpoint,
162
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
163
+ universe_domain: @config.universe_domain,
164
+ channel_args: @config.channel_args,
165
+ interceptors: @config.interceptors,
166
+ channel_pool_config: @config.channel_pool
167
+ )
168
+
169
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
170
+ config.credentials = credentials
171
+ config.quota_project = @quota_project_id
172
+ config.endpoint = @engine_service_stub.endpoint
173
+ config.universe_domain = @engine_service_stub.universe_domain
174
+ end
175
+ end
176
+
177
+ ##
178
+ # Get the associated client for long-running operations.
179
+ #
180
+ # @return [::Google::Cloud::DiscoveryEngine::V1::EngineService::Operations]
181
+ #
182
+ attr_reader :operations_client
183
+
184
+ ##
185
+ # Get the associated client for mix-in of the Locations.
186
+ #
187
+ # @return [Google::Cloud::Location::Locations::Client]
188
+ #
189
+ attr_reader :location_client
190
+
191
+ # Service calls
192
+
193
+ ##
194
+ # Creates a {::Google::Cloud::DiscoveryEngine::V1::Engine Engine}.
195
+ #
196
+ # @overload create_engine(request, options = nil)
197
+ # Pass arguments to `create_engine` via a request object, either of type
198
+ # {::Google::Cloud::DiscoveryEngine::V1::CreateEngineRequest} or an equivalent Hash.
199
+ #
200
+ # @param request [::Google::Cloud::DiscoveryEngine::V1::CreateEngineRequest, ::Hash]
201
+ # A request object representing the call parameters. Required. To specify no
202
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
203
+ # @param options [::Gapic::CallOptions, ::Hash]
204
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
205
+ #
206
+ # @overload create_engine(parent: nil, engine: nil, engine_id: nil)
207
+ # Pass arguments to `create_engine` via keyword arguments. Note that at
208
+ # least one keyword argument is required. To specify no parameters, or to keep all
209
+ # the default parameter values, pass an empty Hash as a request object (see above).
210
+ #
211
+ # @param parent [::String]
212
+ # Required. The parent resource name, such as
213
+ # `projects/{project}/locations/{location}/collections/{collection}`.
214
+ # @param engine [::Google::Cloud::DiscoveryEngine::V1::Engine, ::Hash]
215
+ # Required. The {::Google::Cloud::DiscoveryEngine::V1::Engine Engine} to create.
216
+ # @param engine_id [::String]
217
+ # Required. The ID to use for the
218
+ # {::Google::Cloud::DiscoveryEngine::V1::Engine Engine}, which will become the
219
+ # final component of the {::Google::Cloud::DiscoveryEngine::V1::Engine Engine}'s
220
+ # resource name.
221
+ #
222
+ # This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
223
+ # standard with a length limit of 63 characters. Otherwise, an
224
+ # INVALID_ARGUMENT error is returned.
225
+ #
226
+ # @yield [response, operation] Access the result along with the RPC operation
227
+ # @yieldparam response [::Gapic::Operation]
228
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
229
+ #
230
+ # @return [::Gapic::Operation]
231
+ #
232
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
233
+ #
234
+ # @example Basic example
235
+ # require "google/cloud/discovery_engine/v1"
236
+ #
237
+ # # Create a client object. The client can be reused for multiple calls.
238
+ # client = Google::Cloud::DiscoveryEngine::V1::EngineService::Client.new
239
+ #
240
+ # # Create a request. To set request fields, pass in keyword arguments.
241
+ # request = Google::Cloud::DiscoveryEngine::V1::CreateEngineRequest.new
242
+ #
243
+ # # Call the create_engine method.
244
+ # result = client.create_engine request
245
+ #
246
+ # # The returned object is of type Gapic::Operation. You can use it to
247
+ # # check the status of an operation, cancel it, or wait for results.
248
+ # # Here is how to wait for a response.
249
+ # result.wait_until_done! timeout: 60
250
+ # if result.response?
251
+ # p result.response
252
+ # else
253
+ # puts "No response received."
254
+ # end
255
+ #
256
+ def create_engine request, options = nil
257
+ raise ::ArgumentError, "request must be provided" if request.nil?
258
+
259
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::CreateEngineRequest
260
+
261
+ # Converts hash and nil to an options object
262
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
263
+
264
+ # Customize the options with defaults
265
+ metadata = @config.rpcs.create_engine.metadata.to_h
266
+
267
+ # Set x-goog-api-client and x-goog-user-project headers
268
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
269
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
270
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
271
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
272
+
273
+ header_params = {}
274
+ if request.parent
275
+ header_params["parent"] = request.parent
276
+ end
277
+
278
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
279
+ metadata[:"x-goog-request-params"] ||= request_params_header
280
+
281
+ options.apply_defaults timeout: @config.rpcs.create_engine.timeout,
282
+ metadata: metadata,
283
+ retry_policy: @config.rpcs.create_engine.retry_policy
284
+
285
+ options.apply_defaults timeout: @config.timeout,
286
+ metadata: @config.metadata,
287
+ retry_policy: @config.retry_policy
288
+
289
+ @engine_service_stub.call_rpc :create_engine, request, options: options do |response, operation|
290
+ response = ::Gapic::Operation.new response, @operations_client, options: options
291
+ yield response, operation if block_given?
292
+ return response
293
+ end
294
+ rescue ::GRPC::BadStatus => e
295
+ raise ::Google::Cloud::Error.from_error(e)
296
+ end
297
+
298
+ ##
299
+ # Deletes a {::Google::Cloud::DiscoveryEngine::V1::Engine Engine}.
300
+ #
301
+ # @overload delete_engine(request, options = nil)
302
+ # Pass arguments to `delete_engine` via a request object, either of type
303
+ # {::Google::Cloud::DiscoveryEngine::V1::DeleteEngineRequest} or an equivalent Hash.
304
+ #
305
+ # @param request [::Google::Cloud::DiscoveryEngine::V1::DeleteEngineRequest, ::Hash]
306
+ # A request object representing the call parameters. Required. To specify no
307
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
308
+ # @param options [::Gapic::CallOptions, ::Hash]
309
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
310
+ #
311
+ # @overload delete_engine(name: nil)
312
+ # Pass arguments to `delete_engine` via keyword arguments. Note that at
313
+ # least one keyword argument is required. To specify no parameters, or to keep all
314
+ # the default parameter values, pass an empty Hash as a request object (see above).
315
+ #
316
+ # @param name [::String]
317
+ # Required. Full resource name of
318
+ # {::Google::Cloud::DiscoveryEngine::V1::Engine Engine}, such as
319
+ # `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.
320
+ #
321
+ # If the caller does not have permission to delete the
322
+ # {::Google::Cloud::DiscoveryEngine::V1::Engine Engine}, regardless of whether or
323
+ # not it exists, a PERMISSION_DENIED error is returned.
324
+ #
325
+ # If the {::Google::Cloud::DiscoveryEngine::V1::Engine Engine} to delete does not
326
+ # exist, a NOT_FOUND error is returned.
327
+ #
328
+ # @yield [response, operation] Access the result along with the RPC operation
329
+ # @yieldparam response [::Gapic::Operation]
330
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
331
+ #
332
+ # @return [::Gapic::Operation]
333
+ #
334
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
335
+ #
336
+ # @example Basic example
337
+ # require "google/cloud/discovery_engine/v1"
338
+ #
339
+ # # Create a client object. The client can be reused for multiple calls.
340
+ # client = Google::Cloud::DiscoveryEngine::V1::EngineService::Client.new
341
+ #
342
+ # # Create a request. To set request fields, pass in keyword arguments.
343
+ # request = Google::Cloud::DiscoveryEngine::V1::DeleteEngineRequest.new
344
+ #
345
+ # # Call the delete_engine method.
346
+ # result = client.delete_engine request
347
+ #
348
+ # # The returned object is of type Gapic::Operation. You can use it to
349
+ # # check the status of an operation, cancel it, or wait for results.
350
+ # # Here is how to wait for a response.
351
+ # result.wait_until_done! timeout: 60
352
+ # if result.response?
353
+ # p result.response
354
+ # else
355
+ # puts "No response received."
356
+ # end
357
+ #
358
+ def delete_engine request, options = nil
359
+ raise ::ArgumentError, "request must be provided" if request.nil?
360
+
361
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::DeleteEngineRequest
362
+
363
+ # Converts hash and nil to an options object
364
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
365
+
366
+ # Customize the options with defaults
367
+ metadata = @config.rpcs.delete_engine.metadata.to_h
368
+
369
+ # Set x-goog-api-client and x-goog-user-project headers
370
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
371
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
372
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
373
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
374
+
375
+ header_params = {}
376
+ if request.name
377
+ header_params["name"] = request.name
378
+ end
379
+
380
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
381
+ metadata[:"x-goog-request-params"] ||= request_params_header
382
+
383
+ options.apply_defaults timeout: @config.rpcs.delete_engine.timeout,
384
+ metadata: metadata,
385
+ retry_policy: @config.rpcs.delete_engine.retry_policy
386
+
387
+ options.apply_defaults timeout: @config.timeout,
388
+ metadata: @config.metadata,
389
+ retry_policy: @config.retry_policy
390
+
391
+ @engine_service_stub.call_rpc :delete_engine, request, options: options do |response, operation|
392
+ response = ::Gapic::Operation.new response, @operations_client, options: options
393
+ yield response, operation if block_given?
394
+ return response
395
+ end
396
+ rescue ::GRPC::BadStatus => e
397
+ raise ::Google::Cloud::Error.from_error(e)
398
+ end
399
+
400
+ ##
401
+ # Updates an {::Google::Cloud::DiscoveryEngine::V1::Engine Engine}
402
+ #
403
+ # @overload update_engine(request, options = nil)
404
+ # Pass arguments to `update_engine` via a request object, either of type
405
+ # {::Google::Cloud::DiscoveryEngine::V1::UpdateEngineRequest} or an equivalent Hash.
406
+ #
407
+ # @param request [::Google::Cloud::DiscoveryEngine::V1::UpdateEngineRequest, ::Hash]
408
+ # A request object representing the call parameters. Required. To specify no
409
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
410
+ # @param options [::Gapic::CallOptions, ::Hash]
411
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
412
+ #
413
+ # @overload update_engine(engine: nil, update_mask: nil)
414
+ # Pass arguments to `update_engine` via keyword arguments. Note that at
415
+ # least one keyword argument is required. To specify no parameters, or to keep all
416
+ # the default parameter values, pass an empty Hash as a request object (see above).
417
+ #
418
+ # @param engine [::Google::Cloud::DiscoveryEngine::V1::Engine, ::Hash]
419
+ # Required. The {::Google::Cloud::DiscoveryEngine::V1::Engine Engine} to update.
420
+ #
421
+ # If the caller does not have permission to update the
422
+ # {::Google::Cloud::DiscoveryEngine::V1::Engine Engine}, regardless of whether or
423
+ # not it exists, a PERMISSION_DENIED error is returned.
424
+ #
425
+ # If the {::Google::Cloud::DiscoveryEngine::V1::Engine Engine} to update does not
426
+ # exist, a NOT_FOUND error is returned.
427
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
428
+ # Indicates which fields in the provided
429
+ # {::Google::Cloud::DiscoveryEngine::V1::Engine Engine} to update.
430
+ #
431
+ # If an unsupported or unknown field is provided, an INVALID_ARGUMENT error
432
+ # is returned.
433
+ #
434
+ # @yield [response, operation] Access the result along with the RPC operation
435
+ # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1::Engine]
436
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
437
+ #
438
+ # @return [::Google::Cloud::DiscoveryEngine::V1::Engine]
439
+ #
440
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
441
+ #
442
+ # @example Basic example
443
+ # require "google/cloud/discovery_engine/v1"
444
+ #
445
+ # # Create a client object. The client can be reused for multiple calls.
446
+ # client = Google::Cloud::DiscoveryEngine::V1::EngineService::Client.new
447
+ #
448
+ # # Create a request. To set request fields, pass in keyword arguments.
449
+ # request = Google::Cloud::DiscoveryEngine::V1::UpdateEngineRequest.new
450
+ #
451
+ # # Call the update_engine method.
452
+ # result = client.update_engine request
453
+ #
454
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1::Engine.
455
+ # p result
456
+ #
457
+ def update_engine request, options = nil
458
+ raise ::ArgumentError, "request must be provided" if request.nil?
459
+
460
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::UpdateEngineRequest
461
+
462
+ # Converts hash and nil to an options object
463
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
464
+
465
+ # Customize the options with defaults
466
+ metadata = @config.rpcs.update_engine.metadata.to_h
467
+
468
+ # Set x-goog-api-client and x-goog-user-project headers
469
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
470
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
471
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
472
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
473
+
474
+ header_params = {}
475
+ if request.engine&.name
476
+ header_params["engine.name"] = request.engine.name
477
+ end
478
+
479
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
480
+ metadata[:"x-goog-request-params"] ||= request_params_header
481
+
482
+ options.apply_defaults timeout: @config.rpcs.update_engine.timeout,
483
+ metadata: metadata,
484
+ retry_policy: @config.rpcs.update_engine.retry_policy
485
+
486
+ options.apply_defaults timeout: @config.timeout,
487
+ metadata: @config.metadata,
488
+ retry_policy: @config.retry_policy
489
+
490
+ @engine_service_stub.call_rpc :update_engine, request, options: options do |response, operation|
491
+ yield response, operation if block_given?
492
+ return response
493
+ end
494
+ rescue ::GRPC::BadStatus => e
495
+ raise ::Google::Cloud::Error.from_error(e)
496
+ end
497
+
498
+ ##
499
+ # Gets a {::Google::Cloud::DiscoveryEngine::V1::Engine Engine}.
500
+ #
501
+ # @overload get_engine(request, options = nil)
502
+ # Pass arguments to `get_engine` via a request object, either of type
503
+ # {::Google::Cloud::DiscoveryEngine::V1::GetEngineRequest} or an equivalent Hash.
504
+ #
505
+ # @param request [::Google::Cloud::DiscoveryEngine::V1::GetEngineRequest, ::Hash]
506
+ # A request object representing the call parameters. Required. To specify no
507
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
508
+ # @param options [::Gapic::CallOptions, ::Hash]
509
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
510
+ #
511
+ # @overload get_engine(name: nil)
512
+ # Pass arguments to `get_engine` via keyword arguments. Note that at
513
+ # least one keyword argument is required. To specify no parameters, or to keep all
514
+ # the default parameter values, pass an empty Hash as a request object (see above).
515
+ #
516
+ # @param name [::String]
517
+ # Required. Full resource name of
518
+ # {::Google::Cloud::DiscoveryEngine::V1::Engine Engine}, such as
519
+ # `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}`.
520
+ #
521
+ # @yield [response, operation] Access the result along with the RPC operation
522
+ # @yieldparam response [::Google::Cloud::DiscoveryEngine::V1::Engine]
523
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
524
+ #
525
+ # @return [::Google::Cloud::DiscoveryEngine::V1::Engine]
526
+ #
527
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
528
+ #
529
+ # @example Basic example
530
+ # require "google/cloud/discovery_engine/v1"
531
+ #
532
+ # # Create a client object. The client can be reused for multiple calls.
533
+ # client = Google::Cloud::DiscoveryEngine::V1::EngineService::Client.new
534
+ #
535
+ # # Create a request. To set request fields, pass in keyword arguments.
536
+ # request = Google::Cloud::DiscoveryEngine::V1::GetEngineRequest.new
537
+ #
538
+ # # Call the get_engine method.
539
+ # result = client.get_engine request
540
+ #
541
+ # # The returned object is of type Google::Cloud::DiscoveryEngine::V1::Engine.
542
+ # p result
543
+ #
544
+ def get_engine request, options = nil
545
+ raise ::ArgumentError, "request must be provided" if request.nil?
546
+
547
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::GetEngineRequest
548
+
549
+ # Converts hash and nil to an options object
550
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
551
+
552
+ # Customize the options with defaults
553
+ metadata = @config.rpcs.get_engine.metadata.to_h
554
+
555
+ # Set x-goog-api-client and x-goog-user-project headers
556
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
557
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
558
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
559
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
560
+
561
+ header_params = {}
562
+ if request.name
563
+ header_params["name"] = request.name
564
+ end
565
+
566
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
567
+ metadata[:"x-goog-request-params"] ||= request_params_header
568
+
569
+ options.apply_defaults timeout: @config.rpcs.get_engine.timeout,
570
+ metadata: metadata,
571
+ retry_policy: @config.rpcs.get_engine.retry_policy
572
+
573
+ options.apply_defaults timeout: @config.timeout,
574
+ metadata: @config.metadata,
575
+ retry_policy: @config.retry_policy
576
+
577
+ @engine_service_stub.call_rpc :get_engine, request, options: options do |response, operation|
578
+ yield response, operation if block_given?
579
+ return response
580
+ end
581
+ rescue ::GRPC::BadStatus => e
582
+ raise ::Google::Cloud::Error.from_error(e)
583
+ end
584
+
585
+ ##
586
+ # Lists all the {::Google::Cloud::DiscoveryEngine::V1::Engine Engine}s associated
587
+ # with the project.
588
+ #
589
+ # @overload list_engines(request, options = nil)
590
+ # Pass arguments to `list_engines` via a request object, either of type
591
+ # {::Google::Cloud::DiscoveryEngine::V1::ListEnginesRequest} or an equivalent Hash.
592
+ #
593
+ # @param request [::Google::Cloud::DiscoveryEngine::V1::ListEnginesRequest, ::Hash]
594
+ # A request object representing the call parameters. Required. To specify no
595
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
596
+ # @param options [::Gapic::CallOptions, ::Hash]
597
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
598
+ #
599
+ # @overload list_engines(parent: nil, page_size: nil, page_token: nil, filter: nil)
600
+ # Pass arguments to `list_engines` via keyword arguments. Note that at
601
+ # least one keyword argument is required. To specify no parameters, or to keep all
602
+ # the default parameter values, pass an empty Hash as a request object (see above).
603
+ #
604
+ # @param parent [::String]
605
+ # Required. The parent resource name, such as
606
+ # `projects/{project}/locations/{location}/collections/{collection_id}`.
607
+ # @param page_size [::Integer]
608
+ # Optional. Not supported.
609
+ # @param page_token [::String]
610
+ # Optional. Not supported.
611
+ # @param filter [::String]
612
+ # Optional. Filter by solution type. For example:
613
+ # solution_type=SOLUTION_TYPE_SEARCH
614
+ #
615
+ # @yield [response, operation] Access the result along with the RPC operation
616
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::Engine>]
617
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
618
+ #
619
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::DiscoveryEngine::V1::Engine>]
620
+ #
621
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
622
+ #
623
+ # @example Basic example
624
+ # require "google/cloud/discovery_engine/v1"
625
+ #
626
+ # # Create a client object. The client can be reused for multiple calls.
627
+ # client = Google::Cloud::DiscoveryEngine::V1::EngineService::Client.new
628
+ #
629
+ # # Create a request. To set request fields, pass in keyword arguments.
630
+ # request = Google::Cloud::DiscoveryEngine::V1::ListEnginesRequest.new
631
+ #
632
+ # # Call the list_engines method.
633
+ # result = client.list_engines request
634
+ #
635
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
636
+ # # over elements, and API calls will be issued to fetch pages as needed.
637
+ # result.each do |item|
638
+ # # Each element is of type ::Google::Cloud::DiscoveryEngine::V1::Engine.
639
+ # p item
640
+ # end
641
+ #
642
+ def list_engines request, options = nil
643
+ raise ::ArgumentError, "request must be provided" if request.nil?
644
+
645
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1::ListEnginesRequest
646
+
647
+ # Converts hash and nil to an options object
648
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
649
+
650
+ # Customize the options with defaults
651
+ metadata = @config.rpcs.list_engines.metadata.to_h
652
+
653
+ # Set x-goog-api-client and x-goog-user-project headers
654
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
655
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
656
+ gapic_version: ::Google::Cloud::DiscoveryEngine::V1::VERSION
657
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
658
+
659
+ header_params = {}
660
+ if request.parent
661
+ header_params["parent"] = request.parent
662
+ end
663
+
664
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
665
+ metadata[:"x-goog-request-params"] ||= request_params_header
666
+
667
+ options.apply_defaults timeout: @config.rpcs.list_engines.timeout,
668
+ metadata: metadata,
669
+ retry_policy: @config.rpcs.list_engines.retry_policy
670
+
671
+ options.apply_defaults timeout: @config.timeout,
672
+ metadata: @config.metadata,
673
+ retry_policy: @config.retry_policy
674
+
675
+ @engine_service_stub.call_rpc :list_engines, request, options: options do |response, operation|
676
+ response = ::Gapic::PagedEnumerable.new @engine_service_stub, :list_engines, request, response, operation, options
677
+ yield response, operation if block_given?
678
+ return response
679
+ end
680
+ rescue ::GRPC::BadStatus => e
681
+ raise ::Google::Cloud::Error.from_error(e)
682
+ end
683
+
684
+ ##
685
+ # Configuration class for the EngineService API.
686
+ #
687
+ # This class represents the configuration for EngineService,
688
+ # providing control over timeouts, retry behavior, logging, transport
689
+ # parameters, and other low-level controls. Certain parameters can also be
690
+ # applied individually to specific RPCs. See
691
+ # {::Google::Cloud::DiscoveryEngine::V1::EngineService::Client::Configuration::Rpcs}
692
+ # for a list of RPCs that can be configured independently.
693
+ #
694
+ # Configuration can be applied globally to all clients, or to a single client
695
+ # on construction.
696
+ #
697
+ # @example
698
+ #
699
+ # # Modify the global config, setting the timeout for
700
+ # # create_engine to 20 seconds,
701
+ # # and all remaining timeouts to 10 seconds.
702
+ # ::Google::Cloud::DiscoveryEngine::V1::EngineService::Client.configure do |config|
703
+ # config.timeout = 10.0
704
+ # config.rpcs.create_engine.timeout = 20.0
705
+ # end
706
+ #
707
+ # # Apply the above configuration only to a new client.
708
+ # client = ::Google::Cloud::DiscoveryEngine::V1::EngineService::Client.new do |config|
709
+ # config.timeout = 10.0
710
+ # config.rpcs.create_engine.timeout = 20.0
711
+ # end
712
+ #
713
+ # @!attribute [rw] endpoint
714
+ # A custom service endpoint, as a hostname or hostname:port. The default is
715
+ # nil, indicating to use the default endpoint in the current universe domain.
716
+ # @return [::String,nil]
717
+ # @!attribute [rw] credentials
718
+ # Credentials to send with calls. You may provide any of the following types:
719
+ # * (`String`) The path to a service account key file in JSON format
720
+ # * (`Hash`) A service account key as a Hash
721
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
722
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
723
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
724
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
725
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
726
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
727
+ # * (`nil`) indicating no credentials
728
+ # @return [::Object]
729
+ # @!attribute [rw] scope
730
+ # The OAuth scopes
731
+ # @return [::Array<::String>]
732
+ # @!attribute [rw] lib_name
733
+ # The library name as recorded in instrumentation and logging
734
+ # @return [::String]
735
+ # @!attribute [rw] lib_version
736
+ # The library version as recorded in instrumentation and logging
737
+ # @return [::String]
738
+ # @!attribute [rw] channel_args
739
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
740
+ # `GRPC::Core::Channel` object is provided as the credential.
741
+ # @return [::Hash]
742
+ # @!attribute [rw] interceptors
743
+ # An array of interceptors that are run before calls are executed.
744
+ # @return [::Array<::GRPC::ClientInterceptor>]
745
+ # @!attribute [rw] timeout
746
+ # The call timeout in seconds.
747
+ # @return [::Numeric]
748
+ # @!attribute [rw] metadata
749
+ # Additional gRPC headers to be sent with the call.
750
+ # @return [::Hash{::Symbol=>::String}]
751
+ # @!attribute [rw] retry_policy
752
+ # The retry policy. The value is a hash with the following keys:
753
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
754
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
755
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
756
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
757
+ # trigger a retry.
758
+ # @return [::Hash]
759
+ # @!attribute [rw] quota_project
760
+ # A separate project against which to charge quota.
761
+ # @return [::String]
762
+ # @!attribute [rw] universe_domain
763
+ # The universe domain within which to make requests. This determines the
764
+ # default endpoint URL. The default value of nil uses the environment
765
+ # universe (usually the default "googleapis.com" universe).
766
+ # @return [::String,nil]
767
+ #
768
+ class Configuration
769
+ extend ::Gapic::Config
770
+
771
+ # @private
772
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
773
+ DEFAULT_ENDPOINT = "discoveryengine.googleapis.com"
774
+
775
+ config_attr :endpoint, nil, ::String, nil
776
+ config_attr :credentials, nil do |value|
777
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
778
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
779
+ allowed.any? { |klass| klass === value }
780
+ end
781
+ config_attr :scope, nil, ::String, ::Array, nil
782
+ config_attr :lib_name, nil, ::String, nil
783
+ config_attr :lib_version, nil, ::String, nil
784
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
785
+ config_attr :interceptors, nil, ::Array, nil
786
+ config_attr :timeout, nil, ::Numeric, nil
787
+ config_attr :metadata, nil, ::Hash, nil
788
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
789
+ config_attr :quota_project, nil, ::String, nil
790
+ config_attr :universe_domain, nil, ::String, nil
791
+
792
+ # @private
793
+ def initialize parent_config = nil
794
+ @parent_config = parent_config unless parent_config.nil?
795
+
796
+ yield self if block_given?
797
+ end
798
+
799
+ ##
800
+ # Configurations for individual RPCs
801
+ # @return [Rpcs]
802
+ #
803
+ def rpcs
804
+ @rpcs ||= begin
805
+ parent_rpcs = nil
806
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
807
+ Rpcs.new parent_rpcs
808
+ end
809
+ end
810
+
811
+ ##
812
+ # Configuration for the channel pool
813
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
814
+ #
815
+ def channel_pool
816
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
817
+ end
818
+
819
+ ##
820
+ # Configuration RPC class for the EngineService API.
821
+ #
822
+ # Includes fields providing the configuration for each RPC in this service.
823
+ # Each configuration object is of type `Gapic::Config::Method` and includes
824
+ # the following configuration fields:
825
+ #
826
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
827
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
828
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
829
+ # include the following keys:
830
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
831
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
832
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
833
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
834
+ # trigger a retry.
835
+ #
836
+ class Rpcs
837
+ ##
838
+ # RPC-specific configuration for `create_engine`
839
+ # @return [::Gapic::Config::Method]
840
+ #
841
+ attr_reader :create_engine
842
+ ##
843
+ # RPC-specific configuration for `delete_engine`
844
+ # @return [::Gapic::Config::Method]
845
+ #
846
+ attr_reader :delete_engine
847
+ ##
848
+ # RPC-specific configuration for `update_engine`
849
+ # @return [::Gapic::Config::Method]
850
+ #
851
+ attr_reader :update_engine
852
+ ##
853
+ # RPC-specific configuration for `get_engine`
854
+ # @return [::Gapic::Config::Method]
855
+ #
856
+ attr_reader :get_engine
857
+ ##
858
+ # RPC-specific configuration for `list_engines`
859
+ # @return [::Gapic::Config::Method]
860
+ #
861
+ attr_reader :list_engines
862
+
863
+ # @private
864
+ def initialize parent_rpcs = nil
865
+ create_engine_config = parent_rpcs.create_engine if parent_rpcs.respond_to? :create_engine
866
+ @create_engine = ::Gapic::Config::Method.new create_engine_config
867
+ delete_engine_config = parent_rpcs.delete_engine if parent_rpcs.respond_to? :delete_engine
868
+ @delete_engine = ::Gapic::Config::Method.new delete_engine_config
869
+ update_engine_config = parent_rpcs.update_engine if parent_rpcs.respond_to? :update_engine
870
+ @update_engine = ::Gapic::Config::Method.new update_engine_config
871
+ get_engine_config = parent_rpcs.get_engine if parent_rpcs.respond_to? :get_engine
872
+ @get_engine = ::Gapic::Config::Method.new get_engine_config
873
+ list_engines_config = parent_rpcs.list_engines if parent_rpcs.respond_to? :list_engines
874
+ @list_engines = ::Gapic::Config::Method.new list_engines_config
875
+
876
+ yield self if block_given?
877
+ end
878
+ end
879
+ end
880
+ end
881
+ end
882
+ end
883
+ end
884
+ end
885
+ end