google-cloud-financial_services-v1 0.a → 0.1.1

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.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +154 -8
  5. data/lib/google/cloud/financial_services/v1/aml/client.rb +4687 -0
  6. data/lib/google/cloud/financial_services/v1/aml/credentials.rb +47 -0
  7. data/lib/google/cloud/financial_services/v1/aml/operations.rb +813 -0
  8. data/lib/google/cloud/financial_services/v1/aml/paths.rb +195 -0
  9. data/lib/google/cloud/financial_services/v1/aml/rest/client.rb +4403 -0
  10. data/lib/google/cloud/financial_services/v1/aml/rest/operations.rb +914 -0
  11. data/lib/google/cloud/financial_services/v1/aml/rest/service_stub.rb +2417 -0
  12. data/lib/google/cloud/financial_services/v1/aml/rest.rb +55 -0
  13. data/lib/google/cloud/financial_services/v1/aml.rb +57 -0
  14. data/lib/google/cloud/financial_services/v1/bindings_override.rb +102 -0
  15. data/lib/google/cloud/financial_services/v1/rest.rb +38 -0
  16. data/lib/google/cloud/financial_services/v1/version.rb +7 -2
  17. data/lib/google/cloud/financial_services/v1.rb +45 -0
  18. data/lib/google/cloud/financialservices/v1/backtest_result_pb.rb +62 -0
  19. data/lib/google/cloud/financialservices/v1/bigquery_destination_pb.rb +45 -0
  20. data/lib/google/cloud/financialservices/v1/dataset_pb.rb +60 -0
  21. data/lib/google/cloud/financialservices/v1/engine_config_pb.rb +65 -0
  22. data/lib/google/cloud/financialservices/v1/engine_version_pb.rb +52 -0
  23. data/lib/google/cloud/financialservices/v1/instance_pb.rb +64 -0
  24. data/lib/google/cloud/financialservices/v1/line_of_business_pb.rb +42 -0
  25. data/lib/google/cloud/financialservices/v1/model_pb.rb +61 -0
  26. data/lib/google/cloud/financialservices/v1/prediction_result_pb.rb +62 -0
  27. data/lib/google/cloud/financialservices/v1/service_pb.rb +57 -0
  28. data/lib/google/cloud/financialservices/v1/service_services_pb.rb +138 -0
  29. data/lib/google-cloud-financial_services-v1.rb +21 -0
  30. data/proto_docs/README.md +4 -0
  31. data/proto_docs/google/api/client.rb +473 -0
  32. data/proto_docs/google/api/field_behavior.rb +85 -0
  33. data/proto_docs/google/api/launch_stage.rb +71 -0
  34. data/proto_docs/google/api/resource.rb +227 -0
  35. data/proto_docs/google/cloud/financialservices/v1/backtest_result.rb +277 -0
  36. data/proto_docs/google/cloud/financialservices/v1/bigquery_destination.rb +56 -0
  37. data/proto_docs/google/cloud/financialservices/v1/dataset.rb +242 -0
  38. data/proto_docs/google/cloud/financialservices/v1/engine_config.rb +324 -0
  39. data/proto_docs/google/cloud/financialservices/v1/engine_version.rb +126 -0
  40. data/proto_docs/google/cloud/financialservices/v1/instance.rb +318 -0
  41. data/proto_docs/google/cloud/financialservices/v1/line_of_business.rb +38 -0
  42. data/proto_docs/google/cloud/financialservices/v1/model.rb +256 -0
  43. data/proto_docs/google/cloud/financialservices/v1/prediction_result.rb +277 -0
  44. data/proto_docs/google/cloud/financialservices/v1/service.rb +60 -0
  45. data/proto_docs/google/longrunning/operations.rb +173 -0
  46. data/proto_docs/google/protobuf/any.rb +145 -0
  47. data/proto_docs/google/protobuf/duration.rb +98 -0
  48. data/proto_docs/google/protobuf/empty.rb +34 -0
  49. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  50. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  51. data/proto_docs/google/rpc/status.rb +48 -0
  52. data/proto_docs/google/type/datetime.rb +103 -0
  53. data/proto_docs/google/type/interval.rb +45 -0
  54. metadata +114 -10
@@ -0,0 +1,4687 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 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/financialservices/v1/service_pb"
21
+ require "google/cloud/location"
22
+
23
+ module Google
24
+ module Cloud
25
+ module FinancialServices
26
+ module V1
27
+ module AML
28
+ ##
29
+ # Client for the AML service.
30
+ #
31
+ # The AML (Anti Money Laundering) service allows users to perform REST
32
+ # operations on aml.
33
+ #
34
+ class Client
35
+ # @private
36
+ API_VERSION = ""
37
+
38
+ # @private
39
+ DEFAULT_ENDPOINT_TEMPLATE = "financialservices.$UNIVERSE_DOMAIN$"
40
+
41
+ include Paths
42
+
43
+ # @private
44
+ attr_reader :aml_stub
45
+
46
+ ##
47
+ # Configure the AML Client class.
48
+ #
49
+ # See {::Google::Cloud::FinancialServices::V1::AML::Client::Configuration}
50
+ # for a description of the configuration fields.
51
+ #
52
+ # @example
53
+ #
54
+ # # Modify the configuration for all AML clients
55
+ # ::Google::Cloud::FinancialServices::V1::AML::Client.configure do |config|
56
+ # config.timeout = 10.0
57
+ # end
58
+ #
59
+ # @yield [config] Configure the Client client.
60
+ # @yieldparam config [Client::Configuration]
61
+ #
62
+ # @return [Client::Configuration]
63
+ #
64
+ def self.configure
65
+ @configure ||= begin
66
+ namespace = ["Google", "Cloud", "FinancialServices", "V1"]
67
+ parent_config = while namespace.any?
68
+ parent_name = namespace.join "::"
69
+ parent_const = const_get parent_name
70
+ break parent_const.configure if parent_const.respond_to? :configure
71
+ namespace.pop
72
+ end
73
+ default_config = Client::Configuration.new parent_config
74
+
75
+ default_config.rpcs.list_instances.timeout = 10.0
76
+
77
+ default_config.rpcs.get_instance.timeout = 10.0
78
+
79
+ default_config.rpcs.create_instance.timeout = 120.0
80
+
81
+ default_config.rpcs.update_instance.timeout = 120.0
82
+
83
+ default_config.rpcs.delete_instance.timeout = 120.0
84
+
85
+ default_config.rpcs.import_registered_parties.timeout = 120.0
86
+
87
+ default_config.rpcs.export_registered_parties.timeout = 120.0
88
+
89
+ default_config.rpcs.list_datasets.timeout = 10.0
90
+
91
+ default_config.rpcs.get_dataset.timeout = 10.0
92
+
93
+ default_config.rpcs.create_dataset.timeout = 120.0
94
+
95
+ default_config.rpcs.update_dataset.timeout = 120.0
96
+
97
+ default_config.rpcs.delete_dataset.timeout = 120.0
98
+
99
+ default_config.rpcs.list_models.timeout = 10.0
100
+
101
+ default_config.rpcs.get_model.timeout = 10.0
102
+
103
+ default_config.rpcs.create_model.timeout = 120.0
104
+
105
+ default_config.rpcs.update_model.timeout = 120.0
106
+
107
+ default_config.rpcs.export_model_metadata.timeout = 120.0
108
+
109
+ default_config.rpcs.delete_model.timeout = 120.0
110
+
111
+ default_config.rpcs.list_engine_configs.timeout = 10.0
112
+
113
+ default_config.rpcs.get_engine_config.timeout = 10.0
114
+
115
+ default_config.rpcs.update_engine_config.timeout = 120.0
116
+
117
+ default_config.rpcs.export_engine_config_metadata.timeout = 120.0
118
+
119
+ default_config.rpcs.delete_engine_config.timeout = 120.0
120
+
121
+ default_config.rpcs.get_engine_version.timeout = 10.0
122
+
123
+ default_config.rpcs.list_engine_versions.timeout = 10.0
124
+
125
+ default_config.rpcs.list_prediction_results.timeout = 10.0
126
+
127
+ default_config.rpcs.get_prediction_result.timeout = 10.0
128
+
129
+ default_config.rpcs.create_prediction_result.timeout = 120.0
130
+
131
+ default_config.rpcs.update_prediction_result.timeout = 120.0
132
+
133
+ default_config.rpcs.export_prediction_result_metadata.timeout = 120.0
134
+
135
+ default_config.rpcs.delete_prediction_result.timeout = 120.0
136
+
137
+ default_config.rpcs.list_backtest_results.timeout = 10.0
138
+
139
+ default_config.rpcs.get_backtest_result.timeout = 10.0
140
+
141
+ default_config.rpcs.create_backtest_result.timeout = 120.0
142
+
143
+ default_config.rpcs.update_backtest_result.timeout = 120.0
144
+
145
+ default_config.rpcs.export_backtest_result_metadata.timeout = 120.0
146
+
147
+ default_config.rpcs.delete_backtest_result.timeout = 120.0
148
+
149
+ default_config
150
+ end
151
+ yield @configure if block_given?
152
+ @configure
153
+ end
154
+
155
+ ##
156
+ # Configure the AML Client instance.
157
+ #
158
+ # The configuration is set to the derived mode, meaning that values can be changed,
159
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
160
+ # should be made on {Client.configure}.
161
+ #
162
+ # See {::Google::Cloud::FinancialServices::V1::AML::Client::Configuration}
163
+ # for a description of the configuration fields.
164
+ #
165
+ # @yield [config] Configure the Client client.
166
+ # @yieldparam config [Client::Configuration]
167
+ #
168
+ # @return [Client::Configuration]
169
+ #
170
+ def configure
171
+ yield @config if block_given?
172
+ @config
173
+ end
174
+
175
+ ##
176
+ # The effective universe domain
177
+ #
178
+ # @return [String]
179
+ #
180
+ def universe_domain
181
+ @aml_stub.universe_domain
182
+ end
183
+
184
+ ##
185
+ # Create a new AML client object.
186
+ #
187
+ # @example
188
+ #
189
+ # # Create a client using the default configuration
190
+ # client = ::Google::Cloud::FinancialServices::V1::AML::Client.new
191
+ #
192
+ # # Create a client using a custom configuration
193
+ # client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config|
194
+ # config.timeout = 10.0
195
+ # end
196
+ #
197
+ # @yield [config] Configure the AML client.
198
+ # @yieldparam config [Client::Configuration]
199
+ #
200
+ def initialize
201
+ # These require statements are intentionally placed here to initialize
202
+ # the gRPC module only when it's required.
203
+ # See https://github.com/googleapis/toolkit/issues/446
204
+ require "gapic/grpc"
205
+ require "google/cloud/financialservices/v1/service_services_pb"
206
+
207
+ # Create the configuration object
208
+ @config = Configuration.new Client.configure
209
+
210
+ # Yield the configuration if needed
211
+ yield @config if block_given?
212
+
213
+ # Create credentials
214
+ credentials = @config.credentials
215
+ # Use self-signed JWT if the endpoint is unchanged from default,
216
+ # but only if the default endpoint does not have a region prefix.
217
+ enable_self_signed_jwt = @config.endpoint.nil? ||
218
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
219
+ !@config.endpoint.split(".").first.include?("-"))
220
+ credentials ||= Credentials.default scope: @config.scope,
221
+ enable_self_signed_jwt: enable_self_signed_jwt
222
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
223
+ credentials = Credentials.new credentials, scope: @config.scope
224
+ end
225
+ @quota_project_id = @config.quota_project
226
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
227
+
228
+ @operations_client = Operations.new do |config|
229
+ config.credentials = credentials
230
+ config.quota_project = @quota_project_id
231
+ config.endpoint = @config.endpoint
232
+ config.universe_domain = @config.universe_domain
233
+ end
234
+
235
+ @aml_stub = ::Gapic::ServiceStub.new(
236
+ ::Google::Cloud::FinancialServices::V1::AML::Stub,
237
+ credentials: credentials,
238
+ endpoint: @config.endpoint,
239
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
240
+ universe_domain: @config.universe_domain,
241
+ channel_args: @config.channel_args,
242
+ interceptors: @config.interceptors,
243
+ channel_pool_config: @config.channel_pool,
244
+ logger: @config.logger
245
+ )
246
+
247
+ @aml_stub.stub_logger&.info do |entry|
248
+ entry.set_system_name
249
+ entry.set_service
250
+ entry.message = "Created client for #{entry.service}"
251
+ entry.set_credentials_fields credentials
252
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
253
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
254
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
255
+ end
256
+
257
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
258
+ config.credentials = credentials
259
+ config.quota_project = @quota_project_id
260
+ config.endpoint = @aml_stub.endpoint
261
+ config.universe_domain = @aml_stub.universe_domain
262
+ config.logger = @aml_stub.logger if config.respond_to? :logger=
263
+ end
264
+ end
265
+
266
+ ##
267
+ # Get the associated client for long-running operations.
268
+ #
269
+ # @return [::Google::Cloud::FinancialServices::V1::AML::Operations]
270
+ #
271
+ attr_reader :operations_client
272
+
273
+ ##
274
+ # Get the associated client for mix-in of the Locations.
275
+ #
276
+ # @return [Google::Cloud::Location::Locations::Client]
277
+ #
278
+ attr_reader :location_client
279
+
280
+ ##
281
+ # The logger used for request/response debug logging.
282
+ #
283
+ # @return [Logger]
284
+ #
285
+ def logger
286
+ @aml_stub.logger
287
+ end
288
+
289
+ # Service calls
290
+
291
+ ##
292
+ # Lists instances.
293
+ #
294
+ # @overload list_instances(request, options = nil)
295
+ # Pass arguments to `list_instances` via a request object, either of type
296
+ # {::Google::Cloud::FinancialServices::V1::ListInstancesRequest} or an equivalent Hash.
297
+ #
298
+ # @param request [::Google::Cloud::FinancialServices::V1::ListInstancesRequest, ::Hash]
299
+ # A request object representing the call parameters. Required. To specify no
300
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
301
+ # @param options [::Gapic::CallOptions, ::Hash]
302
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
303
+ #
304
+ # @overload list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
305
+ # Pass arguments to `list_instances` via keyword arguments. Note that at
306
+ # least one keyword argument is required. To specify no parameters, or to keep all
307
+ # the default parameter values, pass an empty Hash as a request object (see above).
308
+ #
309
+ # @param parent [::String]
310
+ # Required. The parent of the Instance is the location for that Instance.
311
+ # Every location has exactly one instance.
312
+ # @param page_size [::Integer]
313
+ # The number of resources to be included in the response. The response
314
+ # contains a next_page_token, which can be used to retrieve the next page of
315
+ # resources.
316
+ # @param page_token [::String]
317
+ # In case of paginated results, this is the token that was returned in the
318
+ # previous ListInstancesResponse. It should be copied here to retrieve the
319
+ # next page of resources. This will be empty for the first instance of
320
+ # ListInstancesRequest.
321
+ # @param filter [::String]
322
+ # Specify a filter to narrow search results.
323
+ # @param order_by [::String]
324
+ # Specify a field to use for ordering.
325
+ #
326
+ # @yield [response, operation] Access the result along with the RPC operation
327
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Instance>]
328
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
329
+ #
330
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Instance>]
331
+ #
332
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
333
+ #
334
+ # @example Basic example
335
+ # require "google/cloud/financial_services/v1"
336
+ #
337
+ # # Create a client object. The client can be reused for multiple calls.
338
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
339
+ #
340
+ # # Create a request. To set request fields, pass in keyword arguments.
341
+ # request = Google::Cloud::FinancialServices::V1::ListInstancesRequest.new
342
+ #
343
+ # # Call the list_instances method.
344
+ # result = client.list_instances request
345
+ #
346
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
347
+ # # over elements, and API calls will be issued to fetch pages as needed.
348
+ # result.each do |item|
349
+ # # Each element is of type ::Google::Cloud::FinancialServices::V1::Instance.
350
+ # p item
351
+ # end
352
+ #
353
+ def list_instances request, options = nil
354
+ raise ::ArgumentError, "request must be provided" if request.nil?
355
+
356
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListInstancesRequest
357
+
358
+ # Converts hash and nil to an options object
359
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
360
+
361
+ # Customize the options with defaults
362
+ metadata = @config.rpcs.list_instances.metadata.to_h
363
+
364
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
365
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
366
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
367
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
368
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
369
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
370
+
371
+ header_params = {}
372
+ if request.parent
373
+ header_params["parent"] = request.parent
374
+ end
375
+
376
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
377
+ metadata[:"x-goog-request-params"] ||= request_params_header
378
+
379
+ options.apply_defaults timeout: @config.rpcs.list_instances.timeout,
380
+ metadata: metadata,
381
+ retry_policy: @config.rpcs.list_instances.retry_policy
382
+
383
+ options.apply_defaults timeout: @config.timeout,
384
+ metadata: @config.metadata,
385
+ retry_policy: @config.retry_policy
386
+
387
+ @aml_stub.call_rpc :list_instances, request, options: options do |response, operation|
388
+ response = ::Gapic::PagedEnumerable.new @aml_stub, :list_instances, request, response, operation, options
389
+ yield response, operation if block_given?
390
+ throw :response, response
391
+ end
392
+ rescue ::GRPC::BadStatus => e
393
+ raise ::Google::Cloud::Error.from_error(e)
394
+ end
395
+
396
+ ##
397
+ # Gets an instance.
398
+ #
399
+ # @overload get_instance(request, options = nil)
400
+ # Pass arguments to `get_instance` via a request object, either of type
401
+ # {::Google::Cloud::FinancialServices::V1::GetInstanceRequest} or an equivalent Hash.
402
+ #
403
+ # @param request [::Google::Cloud::FinancialServices::V1::GetInstanceRequest, ::Hash]
404
+ # A request object representing the call parameters. Required. To specify no
405
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
406
+ # @param options [::Gapic::CallOptions, ::Hash]
407
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
408
+ #
409
+ # @overload get_instance(name: nil)
410
+ # Pass arguments to `get_instance` via keyword arguments. Note that at
411
+ # least one keyword argument is required. To specify no parameters, or to keep all
412
+ # the default parameter values, pass an empty Hash as a request object (see above).
413
+ #
414
+ # @param name [::String]
415
+ # Required. The resource name of the Instance.
416
+ #
417
+ # @yield [response, operation] Access the result along with the RPC operation
418
+ # @yieldparam response [::Google::Cloud::FinancialServices::V1::Instance]
419
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
420
+ #
421
+ # @return [::Google::Cloud::FinancialServices::V1::Instance]
422
+ #
423
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
424
+ #
425
+ # @example Basic example
426
+ # require "google/cloud/financial_services/v1"
427
+ #
428
+ # # Create a client object. The client can be reused for multiple calls.
429
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
430
+ #
431
+ # # Create a request. To set request fields, pass in keyword arguments.
432
+ # request = Google::Cloud::FinancialServices::V1::GetInstanceRequest.new
433
+ #
434
+ # # Call the get_instance method.
435
+ # result = client.get_instance request
436
+ #
437
+ # # The returned object is of type Google::Cloud::FinancialServices::V1::Instance.
438
+ # p result
439
+ #
440
+ def get_instance request, options = nil
441
+ raise ::ArgumentError, "request must be provided" if request.nil?
442
+
443
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetInstanceRequest
444
+
445
+ # Converts hash and nil to an options object
446
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
447
+
448
+ # Customize the options with defaults
449
+ metadata = @config.rpcs.get_instance.metadata.to_h
450
+
451
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
452
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
453
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
454
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
455
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
456
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
457
+
458
+ header_params = {}
459
+ if request.name
460
+ header_params["name"] = request.name
461
+ end
462
+
463
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
464
+ metadata[:"x-goog-request-params"] ||= request_params_header
465
+
466
+ options.apply_defaults timeout: @config.rpcs.get_instance.timeout,
467
+ metadata: metadata,
468
+ retry_policy: @config.rpcs.get_instance.retry_policy
469
+
470
+ options.apply_defaults timeout: @config.timeout,
471
+ metadata: @config.metadata,
472
+ retry_policy: @config.retry_policy
473
+
474
+ @aml_stub.call_rpc :get_instance, request, options: options do |response, operation|
475
+ yield response, operation if block_given?
476
+ end
477
+ rescue ::GRPC::BadStatus => e
478
+ raise ::Google::Cloud::Error.from_error(e)
479
+ end
480
+
481
+ ##
482
+ # Creates an instance.
483
+ #
484
+ # @overload create_instance(request, options = nil)
485
+ # Pass arguments to `create_instance` via a request object, either of type
486
+ # {::Google::Cloud::FinancialServices::V1::CreateInstanceRequest} or an equivalent Hash.
487
+ #
488
+ # @param request [::Google::Cloud::FinancialServices::V1::CreateInstanceRequest, ::Hash]
489
+ # A request object representing the call parameters. Required. To specify no
490
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
491
+ # @param options [::Gapic::CallOptions, ::Hash]
492
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
493
+ #
494
+ # @overload create_instance(parent: nil, instance_id: nil, instance: nil, request_id: nil)
495
+ # Pass arguments to `create_instance` via keyword arguments. Note that at
496
+ # least one keyword argument is required. To specify no parameters, or to keep all
497
+ # the default parameter values, pass an empty Hash as a request object (see above).
498
+ #
499
+ # @param parent [::String]
500
+ # Required. The parent of the Instance is the location for that Instance.
501
+ # Every location has exactly one instance.
502
+ # @param instance_id [::String]
503
+ # Required. The resource id of the instance.
504
+ # @param instance [::Google::Cloud::FinancialServices::V1::Instance, ::Hash]
505
+ # Required. The instance that will be created.
506
+ # @param request_id [::String]
507
+ # Optional. An optional request ID to identify requests. Specify a unique
508
+ # request ID so that if you must retry your request, the server will know to
509
+ # ignore the request if it has already been completed. The server will
510
+ # guarantee that for at least 60 minutes since the first request.
511
+ #
512
+ # For example, consider a situation where you make an initial request and the
513
+ # request times out. If you make the request again with the same request
514
+ # ID, the server can check if original operation with the same request ID
515
+ # was received, and if so, will ignore the second request. This prevents
516
+ # clients from accidentally creating duplicate commitments.
517
+ #
518
+ # The request ID must be a valid UUID with the exception that zero UUID is
519
+ # not supported (00000000-0000-0000-0000-000000000000).
520
+ #
521
+ # @yield [response, operation] Access the result along with the RPC operation
522
+ # @yieldparam response [::Gapic::Operation]
523
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
524
+ #
525
+ # @return [::Gapic::Operation]
526
+ #
527
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
528
+ #
529
+ # @example Basic example
530
+ # require "google/cloud/financial_services/v1"
531
+ #
532
+ # # Create a client object. The client can be reused for multiple calls.
533
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
534
+ #
535
+ # # Create a request. To set request fields, pass in keyword arguments.
536
+ # request = Google::Cloud::FinancialServices::V1::CreateInstanceRequest.new
537
+ #
538
+ # # Call the create_instance method.
539
+ # result = client.create_instance request
540
+ #
541
+ # # The returned object is of type Gapic::Operation. You can use it to
542
+ # # check the status of an operation, cancel it, or wait for results.
543
+ # # Here is how to wait for a response.
544
+ # result.wait_until_done! timeout: 60
545
+ # if result.response?
546
+ # p result.response
547
+ # else
548
+ # puts "No response received."
549
+ # end
550
+ #
551
+ def create_instance request, options = nil
552
+ raise ::ArgumentError, "request must be provided" if request.nil?
553
+
554
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateInstanceRequest
555
+
556
+ # Converts hash and nil to an options object
557
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
558
+
559
+ # Customize the options with defaults
560
+ metadata = @config.rpcs.create_instance.metadata.to_h
561
+
562
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
563
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
564
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
565
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
566
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
567
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
568
+
569
+ header_params = {}
570
+ if request.parent
571
+ header_params["parent"] = request.parent
572
+ end
573
+
574
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
575
+ metadata[:"x-goog-request-params"] ||= request_params_header
576
+
577
+ options.apply_defaults timeout: @config.rpcs.create_instance.timeout,
578
+ metadata: metadata,
579
+ retry_policy: @config.rpcs.create_instance.retry_policy
580
+
581
+ options.apply_defaults timeout: @config.timeout,
582
+ metadata: @config.metadata,
583
+ retry_policy: @config.retry_policy
584
+
585
+ @aml_stub.call_rpc :create_instance, request, options: options do |response, operation|
586
+ response = ::Gapic::Operation.new response, @operations_client, options: options
587
+ yield response, operation if block_given?
588
+ throw :response, response
589
+ end
590
+ rescue ::GRPC::BadStatus => e
591
+ raise ::Google::Cloud::Error.from_error(e)
592
+ end
593
+
594
+ ##
595
+ # Updates the parameters of a single Instance.
596
+ #
597
+ # @overload update_instance(request, options = nil)
598
+ # Pass arguments to `update_instance` via a request object, either of type
599
+ # {::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest} or an equivalent Hash.
600
+ #
601
+ # @param request [::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest, ::Hash]
602
+ # A request object representing the call parameters. Required. To specify no
603
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
604
+ # @param options [::Gapic::CallOptions, ::Hash]
605
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
606
+ #
607
+ # @overload update_instance(update_mask: nil, instance: nil, request_id: nil)
608
+ # Pass arguments to `update_instance` via keyword arguments. Note that at
609
+ # least one keyword argument is required. To specify no parameters, or to keep all
610
+ # the default parameter values, pass an empty Hash as a request object (see above).
611
+ #
612
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
613
+ # Optional. Field mask is used to specify the fields to be overwritten in the
614
+ # Instance resource by the update.
615
+ # The fields specified in the update_mask are relative to the resource, not
616
+ # the full request. A field will be overwritten if it is in the mask. If the
617
+ # user does not provide a mask then all fields will be overwritten.
618
+ # @param instance [::Google::Cloud::FinancialServices::V1::Instance, ::Hash]
619
+ # Required. The new value of the instance fields that will be updated
620
+ # according to the update_mask
621
+ # @param request_id [::String]
622
+ # Optional. An optional request ID to identify requests. Specify a unique
623
+ # request ID so that if you must retry your request, the server will know to
624
+ # ignore the request if it has already been completed. The server will
625
+ # guarantee that for at least 60 minutes since the first request.
626
+ #
627
+ # For example, consider a situation where you make an initial request and the
628
+ # request times out. If you make the request again with the same request
629
+ # ID, the server can check if original operation with the same request ID
630
+ # was received, and if so, will ignore the second request. This prevents
631
+ # clients from accidentally creating duplicate commitments.
632
+ #
633
+ # The request ID must be a valid UUID with the exception that zero UUID is
634
+ # not supported (00000000-0000-0000-0000-000000000000).
635
+ #
636
+ # @yield [response, operation] Access the result along with the RPC operation
637
+ # @yieldparam response [::Gapic::Operation]
638
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
639
+ #
640
+ # @return [::Gapic::Operation]
641
+ #
642
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
643
+ #
644
+ # @example Basic example
645
+ # require "google/cloud/financial_services/v1"
646
+ #
647
+ # # Create a client object. The client can be reused for multiple calls.
648
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
649
+ #
650
+ # # Create a request. To set request fields, pass in keyword arguments.
651
+ # request = Google::Cloud::FinancialServices::V1::UpdateInstanceRequest.new
652
+ #
653
+ # # Call the update_instance method.
654
+ # result = client.update_instance request
655
+ #
656
+ # # The returned object is of type Gapic::Operation. You can use it to
657
+ # # check the status of an operation, cancel it, or wait for results.
658
+ # # Here is how to wait for a response.
659
+ # result.wait_until_done! timeout: 60
660
+ # if result.response?
661
+ # p result.response
662
+ # else
663
+ # puts "No response received."
664
+ # end
665
+ #
666
+ def update_instance request, options = nil
667
+ raise ::ArgumentError, "request must be provided" if request.nil?
668
+
669
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest
670
+
671
+ # Converts hash and nil to an options object
672
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
673
+
674
+ # Customize the options with defaults
675
+ metadata = @config.rpcs.update_instance.metadata.to_h
676
+
677
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
678
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
679
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
680
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
681
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
682
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
683
+
684
+ header_params = {}
685
+ if request.instance&.name
686
+ header_params["instance.name"] = request.instance.name
687
+ end
688
+
689
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
690
+ metadata[:"x-goog-request-params"] ||= request_params_header
691
+
692
+ options.apply_defaults timeout: @config.rpcs.update_instance.timeout,
693
+ metadata: metadata,
694
+ retry_policy: @config.rpcs.update_instance.retry_policy
695
+
696
+ options.apply_defaults timeout: @config.timeout,
697
+ metadata: @config.metadata,
698
+ retry_policy: @config.retry_policy
699
+
700
+ @aml_stub.call_rpc :update_instance, request, options: options do |response, operation|
701
+ response = ::Gapic::Operation.new response, @operations_client, options: options
702
+ yield response, operation if block_given?
703
+ throw :response, response
704
+ end
705
+ rescue ::GRPC::BadStatus => e
706
+ raise ::Google::Cloud::Error.from_error(e)
707
+ end
708
+
709
+ ##
710
+ # Deletes an instance.
711
+ #
712
+ # @overload delete_instance(request, options = nil)
713
+ # Pass arguments to `delete_instance` via a request object, either of type
714
+ # {::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest} or an equivalent Hash.
715
+ #
716
+ # @param request [::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest, ::Hash]
717
+ # A request object representing the call parameters. Required. To specify no
718
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
719
+ # @param options [::Gapic::CallOptions, ::Hash]
720
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
721
+ #
722
+ # @overload delete_instance(name: nil, request_id: nil)
723
+ # Pass arguments to `delete_instance` via keyword arguments. Note that at
724
+ # least one keyword argument is required. To specify no parameters, or to keep all
725
+ # the default parameter values, pass an empty Hash as a request object (see above).
726
+ #
727
+ # @param name [::String]
728
+ # Required. The resource name of the Instance.
729
+ # @param request_id [::String]
730
+ # Optional. An optional request ID to identify requests. Specify a unique
731
+ # request ID so that if you must retry your request, the server will know to
732
+ # ignore the request if it has already been completed. The server will
733
+ # guarantee that for at least 60 minutes after the first request.
734
+ #
735
+ # For example, consider a situation where you make an initial request and the
736
+ # request times out. If you make the request again with the same request
737
+ # ID, the server can check if original operation with the same request ID
738
+ # was received, and if so, will ignore the second request. This prevents
739
+ # clients from accidentally creating duplicate commitments.
740
+ #
741
+ # The request ID must be a valid UUID with the exception that zero UUID is
742
+ # not supported (00000000-0000-0000-0000-000000000000).
743
+ #
744
+ # @yield [response, operation] Access the result along with the RPC operation
745
+ # @yieldparam response [::Gapic::Operation]
746
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
747
+ #
748
+ # @return [::Gapic::Operation]
749
+ #
750
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
751
+ #
752
+ # @example Basic example
753
+ # require "google/cloud/financial_services/v1"
754
+ #
755
+ # # Create a client object. The client can be reused for multiple calls.
756
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
757
+ #
758
+ # # Create a request. To set request fields, pass in keyword arguments.
759
+ # request = Google::Cloud::FinancialServices::V1::DeleteInstanceRequest.new
760
+ #
761
+ # # Call the delete_instance method.
762
+ # result = client.delete_instance request
763
+ #
764
+ # # The returned object is of type Gapic::Operation. You can use it to
765
+ # # check the status of an operation, cancel it, or wait for results.
766
+ # # Here is how to wait for a response.
767
+ # result.wait_until_done! timeout: 60
768
+ # if result.response?
769
+ # p result.response
770
+ # else
771
+ # puts "No response received."
772
+ # end
773
+ #
774
+ def delete_instance request, options = nil
775
+ raise ::ArgumentError, "request must be provided" if request.nil?
776
+
777
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest
778
+
779
+ # Converts hash and nil to an options object
780
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
781
+
782
+ # Customize the options with defaults
783
+ metadata = @config.rpcs.delete_instance.metadata.to_h
784
+
785
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
786
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
787
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
788
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
789
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
790
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
791
+
792
+ header_params = {}
793
+ if request.name
794
+ header_params["name"] = request.name
795
+ end
796
+
797
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
798
+ metadata[:"x-goog-request-params"] ||= request_params_header
799
+
800
+ options.apply_defaults timeout: @config.rpcs.delete_instance.timeout,
801
+ metadata: metadata,
802
+ retry_policy: @config.rpcs.delete_instance.retry_policy
803
+
804
+ options.apply_defaults timeout: @config.timeout,
805
+ metadata: @config.metadata,
806
+ retry_policy: @config.retry_policy
807
+
808
+ @aml_stub.call_rpc :delete_instance, request, options: options do |response, operation|
809
+ response = ::Gapic::Operation.new response, @operations_client, options: options
810
+ yield response, operation if block_given?
811
+ throw :response, response
812
+ end
813
+ rescue ::GRPC::BadStatus => e
814
+ raise ::Google::Cloud::Error.from_error(e)
815
+ end
816
+
817
+ ##
818
+ # Imports the list of registered parties. See
819
+ # [Create and manage
820
+ # instances](https://cloud.google.com/financial-services/anti-money-laundering/docs/create-and-manage-instances#import-registered-parties)
821
+ # for information on the input schema and response for this method.
822
+ #
823
+ # @overload import_registered_parties(request, options = nil)
824
+ # Pass arguments to `import_registered_parties` via a request object, either of type
825
+ # {::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest} or an equivalent Hash.
826
+ #
827
+ # @param request [::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest, ::Hash]
828
+ # A request object representing the call parameters. Required. To specify no
829
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
830
+ # @param options [::Gapic::CallOptions, ::Hash]
831
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
832
+ #
833
+ # @overload import_registered_parties(name: nil, party_tables: nil, mode: nil, validate_only: nil, line_of_business: nil)
834
+ # Pass arguments to `import_registered_parties` via keyword arguments. Note that at
835
+ # least one keyword argument is required. To specify no parameters, or to keep all
836
+ # the default parameter values, pass an empty Hash as a request object (see above).
837
+ #
838
+ # @param name [::String]
839
+ # Required. The full path to the Instance resource in this API.
840
+ # format: `projects/{project}/locations/{location}/instances/{instance}`
841
+ # @param party_tables [::Array<::String>]
842
+ # Optional. List of BigQuery tables. Union of tables will be taken if there
843
+ # is more than one table. VPC-SC restrictions apply. format:
844
+ # `bq://{project}.{bqDatasetID}.{bqTableID}` Use of `datasets` is preferred
845
+ # over the latter due to its simplicity and the reduced risk of errors
846
+ # `party_tables` and `datasets` must not be provided at the
847
+ # same time
848
+ # @param mode [::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest::UpdateMode]
849
+ # Required. Mode of the request.
850
+ # @param validate_only [::Boolean]
851
+ # Optional. If the request will not register the parties, just determine what
852
+ # would happen.
853
+ # @param line_of_business [::Google::Cloud::FinancialServices::V1::LineOfBusiness]
854
+ # Required. LineOfBusiness for the specified registered parties.
855
+ #
856
+ # @yield [response, operation] Access the result along with the RPC operation
857
+ # @yieldparam response [::Gapic::Operation]
858
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
859
+ #
860
+ # @return [::Gapic::Operation]
861
+ #
862
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
863
+ #
864
+ # @example Basic example
865
+ # require "google/cloud/financial_services/v1"
866
+ #
867
+ # # Create a client object. The client can be reused for multiple calls.
868
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
869
+ #
870
+ # # Create a request. To set request fields, pass in keyword arguments.
871
+ # request = Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest.new
872
+ #
873
+ # # Call the import_registered_parties method.
874
+ # result = client.import_registered_parties request
875
+ #
876
+ # # The returned object is of type Gapic::Operation. You can use it to
877
+ # # check the status of an operation, cancel it, or wait for results.
878
+ # # Here is how to wait for a response.
879
+ # result.wait_until_done! timeout: 60
880
+ # if result.response?
881
+ # p result.response
882
+ # else
883
+ # puts "No response received."
884
+ # end
885
+ #
886
+ def import_registered_parties request, options = nil
887
+ raise ::ArgumentError, "request must be provided" if request.nil?
888
+
889
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest
890
+
891
+ # Converts hash and nil to an options object
892
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
893
+
894
+ # Customize the options with defaults
895
+ metadata = @config.rpcs.import_registered_parties.metadata.to_h
896
+
897
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
898
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
899
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
900
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
901
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
902
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
903
+
904
+ header_params = {}
905
+ if request.name
906
+ header_params["name"] = request.name
907
+ end
908
+
909
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
910
+ metadata[:"x-goog-request-params"] ||= request_params_header
911
+
912
+ options.apply_defaults timeout: @config.rpcs.import_registered_parties.timeout,
913
+ metadata: metadata,
914
+ retry_policy: @config.rpcs.import_registered_parties.retry_policy
915
+
916
+ options.apply_defaults timeout: @config.timeout,
917
+ metadata: @config.metadata,
918
+ retry_policy: @config.retry_policy
919
+
920
+ @aml_stub.call_rpc :import_registered_parties, request, options: options do |response, operation|
921
+ response = ::Gapic::Operation.new response, @operations_client, options: options
922
+ yield response, operation if block_given?
923
+ throw :response, response
924
+ end
925
+ rescue ::GRPC::BadStatus => e
926
+ raise ::Google::Cloud::Error.from_error(e)
927
+ end
928
+
929
+ ##
930
+ # Exports the list of registered parties. See
931
+ # [Create and manage
932
+ # instances](https://cloud.google.com/financial-services/anti-money-laundering/docs/create-and-manage-instances#export-registered-parties)
933
+ # for information on the output schema for this method.
934
+ #
935
+ # @overload export_registered_parties(request, options = nil)
936
+ # Pass arguments to `export_registered_parties` via a request object, either of type
937
+ # {::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest} or an equivalent Hash.
938
+ #
939
+ # @param request [::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest, ::Hash]
940
+ # A request object representing the call parameters. Required. To specify no
941
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
942
+ # @param options [::Gapic::CallOptions, ::Hash]
943
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
944
+ #
945
+ # @overload export_registered_parties(name: nil, dataset: nil, line_of_business: nil)
946
+ # Pass arguments to `export_registered_parties` via keyword arguments. Note that at
947
+ # least one keyword argument is required. To specify no parameters, or to keep all
948
+ # the default parameter values, pass an empty Hash as a request object (see above).
949
+ #
950
+ # @param name [::String]
951
+ # Required. The full path to the Instance resource in this API.
952
+ # format: `projects/{project}/locations/{location}/instances/{instance}`
953
+ # @param dataset [::Google::Cloud::FinancialServices::V1::BigQueryDestination, ::Hash]
954
+ # Required. The location to output the RegisteredParties.
955
+ # @param line_of_business [::Google::Cloud::FinancialServices::V1::LineOfBusiness]
956
+ # Required. LineOfBusiness to get RegisteredParties from.
957
+ #
958
+ # @yield [response, operation] Access the result along with the RPC operation
959
+ # @yieldparam response [::Gapic::Operation]
960
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
961
+ #
962
+ # @return [::Gapic::Operation]
963
+ #
964
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
965
+ #
966
+ # @example Basic example
967
+ # require "google/cloud/financial_services/v1"
968
+ #
969
+ # # Create a client object. The client can be reused for multiple calls.
970
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
971
+ #
972
+ # # Create a request. To set request fields, pass in keyword arguments.
973
+ # request = Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest.new
974
+ #
975
+ # # Call the export_registered_parties method.
976
+ # result = client.export_registered_parties request
977
+ #
978
+ # # The returned object is of type Gapic::Operation. You can use it to
979
+ # # check the status of an operation, cancel it, or wait for results.
980
+ # # Here is how to wait for a response.
981
+ # result.wait_until_done! timeout: 60
982
+ # if result.response?
983
+ # p result.response
984
+ # else
985
+ # puts "No response received."
986
+ # end
987
+ #
988
+ def export_registered_parties request, options = nil
989
+ raise ::ArgumentError, "request must be provided" if request.nil?
990
+
991
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest
992
+
993
+ # Converts hash and nil to an options object
994
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
995
+
996
+ # Customize the options with defaults
997
+ metadata = @config.rpcs.export_registered_parties.metadata.to_h
998
+
999
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1000
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1001
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1002
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
1003
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1004
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1005
+
1006
+ header_params = {}
1007
+ if request.name
1008
+ header_params["name"] = request.name
1009
+ end
1010
+
1011
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1012
+ metadata[:"x-goog-request-params"] ||= request_params_header
1013
+
1014
+ options.apply_defaults timeout: @config.rpcs.export_registered_parties.timeout,
1015
+ metadata: metadata,
1016
+ retry_policy: @config.rpcs.export_registered_parties.retry_policy
1017
+
1018
+ options.apply_defaults timeout: @config.timeout,
1019
+ metadata: @config.metadata,
1020
+ retry_policy: @config.retry_policy
1021
+
1022
+ @aml_stub.call_rpc :export_registered_parties, request, options: options do |response, operation|
1023
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1024
+ yield response, operation if block_given?
1025
+ throw :response, response
1026
+ end
1027
+ rescue ::GRPC::BadStatus => e
1028
+ raise ::Google::Cloud::Error.from_error(e)
1029
+ end
1030
+
1031
+ ##
1032
+ # Lists datasets.
1033
+ #
1034
+ # @overload list_datasets(request, options = nil)
1035
+ # Pass arguments to `list_datasets` via a request object, either of type
1036
+ # {::Google::Cloud::FinancialServices::V1::ListDatasetsRequest} or an equivalent Hash.
1037
+ #
1038
+ # @param request [::Google::Cloud::FinancialServices::V1::ListDatasetsRequest, ::Hash]
1039
+ # A request object representing the call parameters. Required. To specify no
1040
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1041
+ # @param options [::Gapic::CallOptions, ::Hash]
1042
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1043
+ #
1044
+ # @overload list_datasets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1045
+ # Pass arguments to `list_datasets` via keyword arguments. Note that at
1046
+ # least one keyword argument is required. To specify no parameters, or to keep all
1047
+ # the default parameter values, pass an empty Hash as a request object (see above).
1048
+ #
1049
+ # @param parent [::String]
1050
+ # Required. The parent of the Dataset is the Instance.
1051
+ # @param page_size [::Integer]
1052
+ # The number of resources to be included in the response. The response
1053
+ # contains a next_page_token, which can be used to retrieve the next page of
1054
+ # resources.
1055
+ # @param page_token [::String]
1056
+ # In case of paginated results, this is the token that was returned in the
1057
+ # previous ListDatasetResponse. It should be copied here to retrieve the
1058
+ # next page of resources. Empty will give the first page of
1059
+ # ListDatasetRequest, and the last page will return an empty page_token.
1060
+ # @param filter [::String]
1061
+ # Specify a filter to narrow search results.
1062
+ # @param order_by [::String]
1063
+ # Specify a field to use for ordering.
1064
+ #
1065
+ # @yield [response, operation] Access the result along with the RPC operation
1066
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Dataset>]
1067
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1068
+ #
1069
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Dataset>]
1070
+ #
1071
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1072
+ #
1073
+ # @example Basic example
1074
+ # require "google/cloud/financial_services/v1"
1075
+ #
1076
+ # # Create a client object. The client can be reused for multiple calls.
1077
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
1078
+ #
1079
+ # # Create a request. To set request fields, pass in keyword arguments.
1080
+ # request = Google::Cloud::FinancialServices::V1::ListDatasetsRequest.new
1081
+ #
1082
+ # # Call the list_datasets method.
1083
+ # result = client.list_datasets request
1084
+ #
1085
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1086
+ # # over elements, and API calls will be issued to fetch pages as needed.
1087
+ # result.each do |item|
1088
+ # # Each element is of type ::Google::Cloud::FinancialServices::V1::Dataset.
1089
+ # p item
1090
+ # end
1091
+ #
1092
+ def list_datasets request, options = nil
1093
+ raise ::ArgumentError, "request must be provided" if request.nil?
1094
+
1095
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListDatasetsRequest
1096
+
1097
+ # Converts hash and nil to an options object
1098
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1099
+
1100
+ # Customize the options with defaults
1101
+ metadata = @config.rpcs.list_datasets.metadata.to_h
1102
+
1103
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1104
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1105
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1106
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
1107
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1108
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1109
+
1110
+ header_params = {}
1111
+ if request.parent
1112
+ header_params["parent"] = request.parent
1113
+ end
1114
+
1115
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1116
+ metadata[:"x-goog-request-params"] ||= request_params_header
1117
+
1118
+ options.apply_defaults timeout: @config.rpcs.list_datasets.timeout,
1119
+ metadata: metadata,
1120
+ retry_policy: @config.rpcs.list_datasets.retry_policy
1121
+
1122
+ options.apply_defaults timeout: @config.timeout,
1123
+ metadata: @config.metadata,
1124
+ retry_policy: @config.retry_policy
1125
+
1126
+ @aml_stub.call_rpc :list_datasets, request, options: options do |response, operation|
1127
+ response = ::Gapic::PagedEnumerable.new @aml_stub, :list_datasets, request, response, operation, options
1128
+ yield response, operation if block_given?
1129
+ throw :response, response
1130
+ end
1131
+ rescue ::GRPC::BadStatus => e
1132
+ raise ::Google::Cloud::Error.from_error(e)
1133
+ end
1134
+
1135
+ ##
1136
+ # Gets a dataset.
1137
+ #
1138
+ # @overload get_dataset(request, options = nil)
1139
+ # Pass arguments to `get_dataset` via a request object, either of type
1140
+ # {::Google::Cloud::FinancialServices::V1::GetDatasetRequest} or an equivalent Hash.
1141
+ #
1142
+ # @param request [::Google::Cloud::FinancialServices::V1::GetDatasetRequest, ::Hash]
1143
+ # A request object representing the call parameters. Required. To specify no
1144
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1145
+ # @param options [::Gapic::CallOptions, ::Hash]
1146
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1147
+ #
1148
+ # @overload get_dataset(name: nil)
1149
+ # Pass arguments to `get_dataset` via keyword arguments. Note that at
1150
+ # least one keyword argument is required. To specify no parameters, or to keep all
1151
+ # the default parameter values, pass an empty Hash as a request object (see above).
1152
+ #
1153
+ # @param name [::String]
1154
+ # Required. The resource name of the Dataset
1155
+ #
1156
+ # @yield [response, operation] Access the result along with the RPC operation
1157
+ # @yieldparam response [::Google::Cloud::FinancialServices::V1::Dataset]
1158
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1159
+ #
1160
+ # @return [::Google::Cloud::FinancialServices::V1::Dataset]
1161
+ #
1162
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1163
+ #
1164
+ # @example Basic example
1165
+ # require "google/cloud/financial_services/v1"
1166
+ #
1167
+ # # Create a client object. The client can be reused for multiple calls.
1168
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
1169
+ #
1170
+ # # Create a request. To set request fields, pass in keyword arguments.
1171
+ # request = Google::Cloud::FinancialServices::V1::GetDatasetRequest.new
1172
+ #
1173
+ # # Call the get_dataset method.
1174
+ # result = client.get_dataset request
1175
+ #
1176
+ # # The returned object is of type Google::Cloud::FinancialServices::V1::Dataset.
1177
+ # p result
1178
+ #
1179
+ def get_dataset request, options = nil
1180
+ raise ::ArgumentError, "request must be provided" if request.nil?
1181
+
1182
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetDatasetRequest
1183
+
1184
+ # Converts hash and nil to an options object
1185
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1186
+
1187
+ # Customize the options with defaults
1188
+ metadata = @config.rpcs.get_dataset.metadata.to_h
1189
+
1190
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1191
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1192
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1193
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
1194
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1195
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1196
+
1197
+ header_params = {}
1198
+ if request.name
1199
+ header_params["name"] = request.name
1200
+ end
1201
+
1202
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1203
+ metadata[:"x-goog-request-params"] ||= request_params_header
1204
+
1205
+ options.apply_defaults timeout: @config.rpcs.get_dataset.timeout,
1206
+ metadata: metadata,
1207
+ retry_policy: @config.rpcs.get_dataset.retry_policy
1208
+
1209
+ options.apply_defaults timeout: @config.timeout,
1210
+ metadata: @config.metadata,
1211
+ retry_policy: @config.retry_policy
1212
+
1213
+ @aml_stub.call_rpc :get_dataset, request, options: options do |response, operation|
1214
+ yield response, operation if block_given?
1215
+ end
1216
+ rescue ::GRPC::BadStatus => e
1217
+ raise ::Google::Cloud::Error.from_error(e)
1218
+ end
1219
+
1220
+ ##
1221
+ # Creates a dataset.
1222
+ #
1223
+ # @overload create_dataset(request, options = nil)
1224
+ # Pass arguments to `create_dataset` via a request object, either of type
1225
+ # {::Google::Cloud::FinancialServices::V1::CreateDatasetRequest} or an equivalent Hash.
1226
+ #
1227
+ # @param request [::Google::Cloud::FinancialServices::V1::CreateDatasetRequest, ::Hash]
1228
+ # A request object representing the call parameters. Required. To specify no
1229
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1230
+ # @param options [::Gapic::CallOptions, ::Hash]
1231
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1232
+ #
1233
+ # @overload create_dataset(parent: nil, dataset_id: nil, dataset: nil, request_id: nil)
1234
+ # Pass arguments to `create_dataset` via keyword arguments. Note that at
1235
+ # least one keyword argument is required. To specify no parameters, or to keep all
1236
+ # the default parameter values, pass an empty Hash as a request object (see above).
1237
+ #
1238
+ # @param parent [::String]
1239
+ # Required. The parent of the Dataset is the Instance.
1240
+ # @param dataset_id [::String]
1241
+ # Required. The resource id of the dataset
1242
+ # @param dataset [::Google::Cloud::FinancialServices::V1::Dataset, ::Hash]
1243
+ # Required. The dataset that will be created.
1244
+ # @param request_id [::String]
1245
+ # Optional. An optional request ID to identify requests. Specify a unique
1246
+ # request ID so that if you must retry your request, the server will know to
1247
+ # ignore the request if it has already been completed. The server will
1248
+ # guarantee that for at least 60 minutes since the first request.
1249
+ #
1250
+ # For example, consider a situation where you make an initial request and the
1251
+ # request times out. If you make the request again with the same request
1252
+ # ID, the server can check if original operation with the same request ID
1253
+ # was received, and if so, will ignore the second request. This prevents
1254
+ # clients from accidentally creating duplicate commitments.
1255
+ #
1256
+ # The request ID must be a valid UUID with the exception that zero UUID is
1257
+ # not supported (00000000-0000-0000-0000-000000000000).
1258
+ #
1259
+ # @yield [response, operation] Access the result along with the RPC operation
1260
+ # @yieldparam response [::Gapic::Operation]
1261
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1262
+ #
1263
+ # @return [::Gapic::Operation]
1264
+ #
1265
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1266
+ #
1267
+ # @example Basic example
1268
+ # require "google/cloud/financial_services/v1"
1269
+ #
1270
+ # # Create a client object. The client can be reused for multiple calls.
1271
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
1272
+ #
1273
+ # # Create a request. To set request fields, pass in keyword arguments.
1274
+ # request = Google::Cloud::FinancialServices::V1::CreateDatasetRequest.new
1275
+ #
1276
+ # # Call the create_dataset method.
1277
+ # result = client.create_dataset request
1278
+ #
1279
+ # # The returned object is of type Gapic::Operation. You can use it to
1280
+ # # check the status of an operation, cancel it, or wait for results.
1281
+ # # Here is how to wait for a response.
1282
+ # result.wait_until_done! timeout: 60
1283
+ # if result.response?
1284
+ # p result.response
1285
+ # else
1286
+ # puts "No response received."
1287
+ # end
1288
+ #
1289
+ def create_dataset request, options = nil
1290
+ raise ::ArgumentError, "request must be provided" if request.nil?
1291
+
1292
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateDatasetRequest
1293
+
1294
+ # Converts hash and nil to an options object
1295
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1296
+
1297
+ # Customize the options with defaults
1298
+ metadata = @config.rpcs.create_dataset.metadata.to_h
1299
+
1300
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1301
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1302
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1303
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
1304
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1305
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1306
+
1307
+ header_params = {}
1308
+ if request.parent
1309
+ header_params["parent"] = request.parent
1310
+ end
1311
+
1312
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1313
+ metadata[:"x-goog-request-params"] ||= request_params_header
1314
+
1315
+ options.apply_defaults timeout: @config.rpcs.create_dataset.timeout,
1316
+ metadata: metadata,
1317
+ retry_policy: @config.rpcs.create_dataset.retry_policy
1318
+
1319
+ options.apply_defaults timeout: @config.timeout,
1320
+ metadata: @config.metadata,
1321
+ retry_policy: @config.retry_policy
1322
+
1323
+ @aml_stub.call_rpc :create_dataset, request, options: options do |response, operation|
1324
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1325
+ yield response, operation if block_given?
1326
+ throw :response, response
1327
+ end
1328
+ rescue ::GRPC::BadStatus => e
1329
+ raise ::Google::Cloud::Error.from_error(e)
1330
+ end
1331
+
1332
+ ##
1333
+ # Updates the parameters of a single Dataset.
1334
+ #
1335
+ # @overload update_dataset(request, options = nil)
1336
+ # Pass arguments to `update_dataset` via a request object, either of type
1337
+ # {::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest} or an equivalent Hash.
1338
+ #
1339
+ # @param request [::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest, ::Hash]
1340
+ # A request object representing the call parameters. Required. To specify no
1341
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1342
+ # @param options [::Gapic::CallOptions, ::Hash]
1343
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1344
+ #
1345
+ # @overload update_dataset(update_mask: nil, dataset: nil, request_id: nil)
1346
+ # Pass arguments to `update_dataset` via keyword arguments. Note that at
1347
+ # least one keyword argument is required. To specify no parameters, or to keep all
1348
+ # the default parameter values, pass an empty Hash as a request object (see above).
1349
+ #
1350
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1351
+ # Optional. Field mask is used to specify the fields to be overwritten in the
1352
+ # Dataset resource by the update.
1353
+ # The fields specified in the update_mask are relative to the resource, not
1354
+ # the full request. A field will be overwritten if it is in the mask. If the
1355
+ # user does not provide a mask then all fields will be overwritten.
1356
+ # @param dataset [::Google::Cloud::FinancialServices::V1::Dataset, ::Hash]
1357
+ # Required. The new value of the dataset fields that will be updated
1358
+ # according to the update_mask.
1359
+ # @param request_id [::String]
1360
+ # Optional. An optional request ID to identify requests. Specify a unique
1361
+ # request ID so that if you must retry your request, the server will know to
1362
+ # ignore the request if it has already been completed. The server will
1363
+ # guarantee that for at least 60 minutes since the first request.
1364
+ #
1365
+ # For example, consider a situation where you make an initial request and the
1366
+ # request times out. If you make the request again with the same request
1367
+ # ID, the server can check if original operation with the same request ID
1368
+ # was received, and if so, will ignore the second request. This prevents
1369
+ # clients from accidentally creating duplicate commitments.
1370
+ #
1371
+ # The request ID must be a valid UUID with the exception that zero UUID is
1372
+ # not supported (00000000-0000-0000-0000-000000000000).
1373
+ #
1374
+ # @yield [response, operation] Access the result along with the RPC operation
1375
+ # @yieldparam response [::Gapic::Operation]
1376
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1377
+ #
1378
+ # @return [::Gapic::Operation]
1379
+ #
1380
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1381
+ #
1382
+ # @example Basic example
1383
+ # require "google/cloud/financial_services/v1"
1384
+ #
1385
+ # # Create a client object. The client can be reused for multiple calls.
1386
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
1387
+ #
1388
+ # # Create a request. To set request fields, pass in keyword arguments.
1389
+ # request = Google::Cloud::FinancialServices::V1::UpdateDatasetRequest.new
1390
+ #
1391
+ # # Call the update_dataset method.
1392
+ # result = client.update_dataset request
1393
+ #
1394
+ # # The returned object is of type Gapic::Operation. You can use it to
1395
+ # # check the status of an operation, cancel it, or wait for results.
1396
+ # # Here is how to wait for a response.
1397
+ # result.wait_until_done! timeout: 60
1398
+ # if result.response?
1399
+ # p result.response
1400
+ # else
1401
+ # puts "No response received."
1402
+ # end
1403
+ #
1404
+ def update_dataset request, options = nil
1405
+ raise ::ArgumentError, "request must be provided" if request.nil?
1406
+
1407
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest
1408
+
1409
+ # Converts hash and nil to an options object
1410
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1411
+
1412
+ # Customize the options with defaults
1413
+ metadata = @config.rpcs.update_dataset.metadata.to_h
1414
+
1415
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1416
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1417
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1418
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
1419
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1420
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1421
+
1422
+ header_params = {}
1423
+ if request.dataset&.name
1424
+ header_params["dataset.name"] = request.dataset.name
1425
+ end
1426
+
1427
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1428
+ metadata[:"x-goog-request-params"] ||= request_params_header
1429
+
1430
+ options.apply_defaults timeout: @config.rpcs.update_dataset.timeout,
1431
+ metadata: metadata,
1432
+ retry_policy: @config.rpcs.update_dataset.retry_policy
1433
+
1434
+ options.apply_defaults timeout: @config.timeout,
1435
+ metadata: @config.metadata,
1436
+ retry_policy: @config.retry_policy
1437
+
1438
+ @aml_stub.call_rpc :update_dataset, request, options: options do |response, operation|
1439
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1440
+ yield response, operation if block_given?
1441
+ throw :response, response
1442
+ end
1443
+ rescue ::GRPC::BadStatus => e
1444
+ raise ::Google::Cloud::Error.from_error(e)
1445
+ end
1446
+
1447
+ ##
1448
+ # Deletes a dataset.
1449
+ #
1450
+ # @overload delete_dataset(request, options = nil)
1451
+ # Pass arguments to `delete_dataset` via a request object, either of type
1452
+ # {::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest} or an equivalent Hash.
1453
+ #
1454
+ # @param request [::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest, ::Hash]
1455
+ # A request object representing the call parameters. Required. To specify no
1456
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1457
+ # @param options [::Gapic::CallOptions, ::Hash]
1458
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1459
+ #
1460
+ # @overload delete_dataset(name: nil, request_id: nil)
1461
+ # Pass arguments to `delete_dataset` via keyword arguments. Note that at
1462
+ # least one keyword argument is required. To specify no parameters, or to keep all
1463
+ # the default parameter values, pass an empty Hash as a request object (see above).
1464
+ #
1465
+ # @param name [::String]
1466
+ # Required. The resource name of the Dataset.
1467
+ # @param request_id [::String]
1468
+ # Optional. An optional request ID to identify requests. Specify a unique
1469
+ # request ID so that if you must retry your request, the server will know to
1470
+ # ignore the request if it has already been completed. The server will
1471
+ # guarantee that for at least 60 minutes after the first request.
1472
+ #
1473
+ # For example, consider a situation where you make an initial request and the
1474
+ # request times out. If you make the request again with the same request
1475
+ # ID, the server can check if original operation with the same request ID
1476
+ # was received, and if so, will ignore the second request. This prevents
1477
+ # clients from accidentally creating duplicate commitments.
1478
+ #
1479
+ # The request ID must be a valid UUID with the exception that zero UUID is
1480
+ # not supported (00000000-0000-0000-0000-000000000000).
1481
+ #
1482
+ # @yield [response, operation] Access the result along with the RPC operation
1483
+ # @yieldparam response [::Gapic::Operation]
1484
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1485
+ #
1486
+ # @return [::Gapic::Operation]
1487
+ #
1488
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1489
+ #
1490
+ # @example Basic example
1491
+ # require "google/cloud/financial_services/v1"
1492
+ #
1493
+ # # Create a client object. The client can be reused for multiple calls.
1494
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
1495
+ #
1496
+ # # Create a request. To set request fields, pass in keyword arguments.
1497
+ # request = Google::Cloud::FinancialServices::V1::DeleteDatasetRequest.new
1498
+ #
1499
+ # # Call the delete_dataset method.
1500
+ # result = client.delete_dataset request
1501
+ #
1502
+ # # The returned object is of type Gapic::Operation. You can use it to
1503
+ # # check the status of an operation, cancel it, or wait for results.
1504
+ # # Here is how to wait for a response.
1505
+ # result.wait_until_done! timeout: 60
1506
+ # if result.response?
1507
+ # p result.response
1508
+ # else
1509
+ # puts "No response received."
1510
+ # end
1511
+ #
1512
+ def delete_dataset request, options = nil
1513
+ raise ::ArgumentError, "request must be provided" if request.nil?
1514
+
1515
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest
1516
+
1517
+ # Converts hash and nil to an options object
1518
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1519
+
1520
+ # Customize the options with defaults
1521
+ metadata = @config.rpcs.delete_dataset.metadata.to_h
1522
+
1523
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1524
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1525
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1526
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
1527
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1528
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1529
+
1530
+ header_params = {}
1531
+ if request.name
1532
+ header_params["name"] = request.name
1533
+ end
1534
+
1535
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1536
+ metadata[:"x-goog-request-params"] ||= request_params_header
1537
+
1538
+ options.apply_defaults timeout: @config.rpcs.delete_dataset.timeout,
1539
+ metadata: metadata,
1540
+ retry_policy: @config.rpcs.delete_dataset.retry_policy
1541
+
1542
+ options.apply_defaults timeout: @config.timeout,
1543
+ metadata: @config.metadata,
1544
+ retry_policy: @config.retry_policy
1545
+
1546
+ @aml_stub.call_rpc :delete_dataset, request, options: options do |response, operation|
1547
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1548
+ yield response, operation if block_given?
1549
+ throw :response, response
1550
+ end
1551
+ rescue ::GRPC::BadStatus => e
1552
+ raise ::Google::Cloud::Error.from_error(e)
1553
+ end
1554
+
1555
+ ##
1556
+ # Lists models.
1557
+ #
1558
+ # @overload list_models(request, options = nil)
1559
+ # Pass arguments to `list_models` via a request object, either of type
1560
+ # {::Google::Cloud::FinancialServices::V1::ListModelsRequest} or an equivalent Hash.
1561
+ #
1562
+ # @param request [::Google::Cloud::FinancialServices::V1::ListModelsRequest, ::Hash]
1563
+ # A request object representing the call parameters. Required. To specify no
1564
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1565
+ # @param options [::Gapic::CallOptions, ::Hash]
1566
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1567
+ #
1568
+ # @overload list_models(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
1569
+ # Pass arguments to `list_models` via keyword arguments. Note that at
1570
+ # least one keyword argument is required. To specify no parameters, or to keep all
1571
+ # the default parameter values, pass an empty Hash as a request object (see above).
1572
+ #
1573
+ # @param parent [::String]
1574
+ # Required. The parent of the Model is the Instance.
1575
+ # @param page_size [::Integer]
1576
+ # The number of resources to be included in the response. The response
1577
+ # contains a next_page_token, which can be used to retrieve the next page of
1578
+ # resources.
1579
+ # @param page_token [::String]
1580
+ # In case of paginated results, this is the token that was returned in the
1581
+ # previous ListModelsResponse. It should be copied here to retrieve the next
1582
+ # page of resources. Empty will give the first page of ListModelsRequest, and
1583
+ # the last page will return an empty page_token.
1584
+ # @param filter [::String]
1585
+ # Specify a filter to narrow search results.
1586
+ # @param order_by [::String]
1587
+ # Specify a field to use for ordering.
1588
+ #
1589
+ # @yield [response, operation] Access the result along with the RPC operation
1590
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Model>]
1591
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1592
+ #
1593
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Model>]
1594
+ #
1595
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1596
+ #
1597
+ # @example Basic example
1598
+ # require "google/cloud/financial_services/v1"
1599
+ #
1600
+ # # Create a client object. The client can be reused for multiple calls.
1601
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
1602
+ #
1603
+ # # Create a request. To set request fields, pass in keyword arguments.
1604
+ # request = Google::Cloud::FinancialServices::V1::ListModelsRequest.new
1605
+ #
1606
+ # # Call the list_models method.
1607
+ # result = client.list_models request
1608
+ #
1609
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1610
+ # # over elements, and API calls will be issued to fetch pages as needed.
1611
+ # result.each do |item|
1612
+ # # Each element is of type ::Google::Cloud::FinancialServices::V1::Model.
1613
+ # p item
1614
+ # end
1615
+ #
1616
+ def list_models request, options = nil
1617
+ raise ::ArgumentError, "request must be provided" if request.nil?
1618
+
1619
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListModelsRequest
1620
+
1621
+ # Converts hash and nil to an options object
1622
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1623
+
1624
+ # Customize the options with defaults
1625
+ metadata = @config.rpcs.list_models.metadata.to_h
1626
+
1627
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1628
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1629
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1630
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
1631
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1632
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1633
+
1634
+ header_params = {}
1635
+ if request.parent
1636
+ header_params["parent"] = request.parent
1637
+ end
1638
+
1639
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1640
+ metadata[:"x-goog-request-params"] ||= request_params_header
1641
+
1642
+ options.apply_defaults timeout: @config.rpcs.list_models.timeout,
1643
+ metadata: metadata,
1644
+ retry_policy: @config.rpcs.list_models.retry_policy
1645
+
1646
+ options.apply_defaults timeout: @config.timeout,
1647
+ metadata: @config.metadata,
1648
+ retry_policy: @config.retry_policy
1649
+
1650
+ @aml_stub.call_rpc :list_models, request, options: options do |response, operation|
1651
+ response = ::Gapic::PagedEnumerable.new @aml_stub, :list_models, request, response, operation, options
1652
+ yield response, operation if block_given?
1653
+ throw :response, response
1654
+ end
1655
+ rescue ::GRPC::BadStatus => e
1656
+ raise ::Google::Cloud::Error.from_error(e)
1657
+ end
1658
+
1659
+ ##
1660
+ # Gets a model.
1661
+ #
1662
+ # @overload get_model(request, options = nil)
1663
+ # Pass arguments to `get_model` via a request object, either of type
1664
+ # {::Google::Cloud::FinancialServices::V1::GetModelRequest} or an equivalent Hash.
1665
+ #
1666
+ # @param request [::Google::Cloud::FinancialServices::V1::GetModelRequest, ::Hash]
1667
+ # A request object representing the call parameters. Required. To specify no
1668
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1669
+ # @param options [::Gapic::CallOptions, ::Hash]
1670
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1671
+ #
1672
+ # @overload get_model(name: nil)
1673
+ # Pass arguments to `get_model` via keyword arguments. Note that at
1674
+ # least one keyword argument is required. To specify no parameters, or to keep all
1675
+ # the default parameter values, pass an empty Hash as a request object (see above).
1676
+ #
1677
+ # @param name [::String]
1678
+ # Required. The resource name of the Model
1679
+ #
1680
+ # @yield [response, operation] Access the result along with the RPC operation
1681
+ # @yieldparam response [::Google::Cloud::FinancialServices::V1::Model]
1682
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1683
+ #
1684
+ # @return [::Google::Cloud::FinancialServices::V1::Model]
1685
+ #
1686
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1687
+ #
1688
+ # @example Basic example
1689
+ # require "google/cloud/financial_services/v1"
1690
+ #
1691
+ # # Create a client object. The client can be reused for multiple calls.
1692
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
1693
+ #
1694
+ # # Create a request. To set request fields, pass in keyword arguments.
1695
+ # request = Google::Cloud::FinancialServices::V1::GetModelRequest.new
1696
+ #
1697
+ # # Call the get_model method.
1698
+ # result = client.get_model request
1699
+ #
1700
+ # # The returned object is of type Google::Cloud::FinancialServices::V1::Model.
1701
+ # p result
1702
+ #
1703
+ def get_model request, options = nil
1704
+ raise ::ArgumentError, "request must be provided" if request.nil?
1705
+
1706
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetModelRequest
1707
+
1708
+ # Converts hash and nil to an options object
1709
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1710
+
1711
+ # Customize the options with defaults
1712
+ metadata = @config.rpcs.get_model.metadata.to_h
1713
+
1714
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1715
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1716
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1717
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
1718
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1719
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1720
+
1721
+ header_params = {}
1722
+ if request.name
1723
+ header_params["name"] = request.name
1724
+ end
1725
+
1726
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1727
+ metadata[:"x-goog-request-params"] ||= request_params_header
1728
+
1729
+ options.apply_defaults timeout: @config.rpcs.get_model.timeout,
1730
+ metadata: metadata,
1731
+ retry_policy: @config.rpcs.get_model.retry_policy
1732
+
1733
+ options.apply_defaults timeout: @config.timeout,
1734
+ metadata: @config.metadata,
1735
+ retry_policy: @config.retry_policy
1736
+
1737
+ @aml_stub.call_rpc :get_model, request, options: options do |response, operation|
1738
+ yield response, operation if block_given?
1739
+ end
1740
+ rescue ::GRPC::BadStatus => e
1741
+ raise ::Google::Cloud::Error.from_error(e)
1742
+ end
1743
+
1744
+ ##
1745
+ # Creates a model.
1746
+ #
1747
+ # @overload create_model(request, options = nil)
1748
+ # Pass arguments to `create_model` via a request object, either of type
1749
+ # {::Google::Cloud::FinancialServices::V1::CreateModelRequest} or an equivalent Hash.
1750
+ #
1751
+ # @param request [::Google::Cloud::FinancialServices::V1::CreateModelRequest, ::Hash]
1752
+ # A request object representing the call parameters. Required. To specify no
1753
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1754
+ # @param options [::Gapic::CallOptions, ::Hash]
1755
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1756
+ #
1757
+ # @overload create_model(parent: nil, model_id: nil, model: nil, request_id: nil)
1758
+ # Pass arguments to `create_model` via keyword arguments. Note that at
1759
+ # least one keyword argument is required. To specify no parameters, or to keep all
1760
+ # the default parameter values, pass an empty Hash as a request object (see above).
1761
+ #
1762
+ # @param parent [::String]
1763
+ # Required. The parent of the Model is the Instance.
1764
+ # @param model_id [::String]
1765
+ # Required. The resource id of the Model
1766
+ # @param model [::Google::Cloud::FinancialServices::V1::Model, ::Hash]
1767
+ # Required. The Model that will be created.
1768
+ # @param request_id [::String]
1769
+ # Optional. An optional request ID to identify requests. Specify a unique
1770
+ # request ID so that if you must retry your request, the server will know to
1771
+ # ignore the request if it has already been completed. The server will
1772
+ # guarantee that for at least 60 minutes since the first request.
1773
+ #
1774
+ # For example, consider a situation where you make an initial request and the
1775
+ # request times out. If you make the request again with the same request
1776
+ # ID, the server can check if original operation with the same request ID
1777
+ # was received, and if so, will ignore the second request. This prevents
1778
+ # clients from accidentally creating duplicate commitments.
1779
+ #
1780
+ # The request ID must be a valid UUID with the exception that zero UUID is
1781
+ # not supported (00000000-0000-0000-0000-000000000000).
1782
+ #
1783
+ # @yield [response, operation] Access the result along with the RPC operation
1784
+ # @yieldparam response [::Gapic::Operation]
1785
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1786
+ #
1787
+ # @return [::Gapic::Operation]
1788
+ #
1789
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1790
+ #
1791
+ # @example Basic example
1792
+ # require "google/cloud/financial_services/v1"
1793
+ #
1794
+ # # Create a client object. The client can be reused for multiple calls.
1795
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
1796
+ #
1797
+ # # Create a request. To set request fields, pass in keyword arguments.
1798
+ # request = Google::Cloud::FinancialServices::V1::CreateModelRequest.new
1799
+ #
1800
+ # # Call the create_model method.
1801
+ # result = client.create_model request
1802
+ #
1803
+ # # The returned object is of type Gapic::Operation. You can use it to
1804
+ # # check the status of an operation, cancel it, or wait for results.
1805
+ # # Here is how to wait for a response.
1806
+ # result.wait_until_done! timeout: 60
1807
+ # if result.response?
1808
+ # p result.response
1809
+ # else
1810
+ # puts "No response received."
1811
+ # end
1812
+ #
1813
+ def create_model request, options = nil
1814
+ raise ::ArgumentError, "request must be provided" if request.nil?
1815
+
1816
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateModelRequest
1817
+
1818
+ # Converts hash and nil to an options object
1819
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1820
+
1821
+ # Customize the options with defaults
1822
+ metadata = @config.rpcs.create_model.metadata.to_h
1823
+
1824
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1825
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1826
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1827
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
1828
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1829
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1830
+
1831
+ header_params = {}
1832
+ if request.parent
1833
+ header_params["parent"] = request.parent
1834
+ end
1835
+
1836
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1837
+ metadata[:"x-goog-request-params"] ||= request_params_header
1838
+
1839
+ options.apply_defaults timeout: @config.rpcs.create_model.timeout,
1840
+ metadata: metadata,
1841
+ retry_policy: @config.rpcs.create_model.retry_policy
1842
+
1843
+ options.apply_defaults timeout: @config.timeout,
1844
+ metadata: @config.metadata,
1845
+ retry_policy: @config.retry_policy
1846
+
1847
+ @aml_stub.call_rpc :create_model, request, options: options do |response, operation|
1848
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1849
+ yield response, operation if block_given?
1850
+ throw :response, response
1851
+ end
1852
+ rescue ::GRPC::BadStatus => e
1853
+ raise ::Google::Cloud::Error.from_error(e)
1854
+ end
1855
+
1856
+ ##
1857
+ # Updates the parameters of a single Model.
1858
+ #
1859
+ # @overload update_model(request, options = nil)
1860
+ # Pass arguments to `update_model` via a request object, either of type
1861
+ # {::Google::Cloud::FinancialServices::V1::UpdateModelRequest} or an equivalent Hash.
1862
+ #
1863
+ # @param request [::Google::Cloud::FinancialServices::V1::UpdateModelRequest, ::Hash]
1864
+ # A request object representing the call parameters. Required. To specify no
1865
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1866
+ # @param options [::Gapic::CallOptions, ::Hash]
1867
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1868
+ #
1869
+ # @overload update_model(update_mask: nil, model: nil, request_id: nil)
1870
+ # Pass arguments to `update_model` via keyword arguments. Note that at
1871
+ # least one keyword argument is required. To specify no parameters, or to keep all
1872
+ # the default parameter values, pass an empty Hash as a request object (see above).
1873
+ #
1874
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1875
+ # Optional. Field mask is used to specify the fields to be overwritten in the
1876
+ # Model resource by the update.
1877
+ # The fields specified in the update_mask are relative to the resource, not
1878
+ # the full request. A field will be overwritten if it is in the mask. If the
1879
+ # user does not provide a mask then all fields will be overwritten.
1880
+ # @param model [::Google::Cloud::FinancialServices::V1::Model, ::Hash]
1881
+ # Required. The new value of the Model fields that will be updated according
1882
+ # to the update_mask.
1883
+ # @param request_id [::String]
1884
+ # Optional. An optional request ID to identify requests. Specify a unique
1885
+ # request ID so that if you must retry your request, the server will know to
1886
+ # ignore the request if it has already been completed. The server will
1887
+ # guarantee that for at least 60 minutes since the first request.
1888
+ #
1889
+ # For example, consider a situation where you make an initial request and the
1890
+ # request times out. If you make the request again with the same request
1891
+ # ID, the server can check if original operation with the same request ID
1892
+ # was received, and if so, will ignore the second request. This prevents
1893
+ # clients from accidentally creating duplicate commitments.
1894
+ #
1895
+ # The request ID must be a valid UUID with the exception that zero UUID is
1896
+ # not supported (00000000-0000-0000-0000-000000000000).
1897
+ #
1898
+ # @yield [response, operation] Access the result along with the RPC operation
1899
+ # @yieldparam response [::Gapic::Operation]
1900
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1901
+ #
1902
+ # @return [::Gapic::Operation]
1903
+ #
1904
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1905
+ #
1906
+ # @example Basic example
1907
+ # require "google/cloud/financial_services/v1"
1908
+ #
1909
+ # # Create a client object. The client can be reused for multiple calls.
1910
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
1911
+ #
1912
+ # # Create a request. To set request fields, pass in keyword arguments.
1913
+ # request = Google::Cloud::FinancialServices::V1::UpdateModelRequest.new
1914
+ #
1915
+ # # Call the update_model method.
1916
+ # result = client.update_model request
1917
+ #
1918
+ # # The returned object is of type Gapic::Operation. You can use it to
1919
+ # # check the status of an operation, cancel it, or wait for results.
1920
+ # # Here is how to wait for a response.
1921
+ # result.wait_until_done! timeout: 60
1922
+ # if result.response?
1923
+ # p result.response
1924
+ # else
1925
+ # puts "No response received."
1926
+ # end
1927
+ #
1928
+ def update_model request, options = nil
1929
+ raise ::ArgumentError, "request must be provided" if request.nil?
1930
+
1931
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateModelRequest
1932
+
1933
+ # Converts hash and nil to an options object
1934
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1935
+
1936
+ # Customize the options with defaults
1937
+ metadata = @config.rpcs.update_model.metadata.to_h
1938
+
1939
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1940
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1941
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1942
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
1943
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1944
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1945
+
1946
+ header_params = {}
1947
+ if request.model&.name
1948
+ header_params["model.name"] = request.model.name
1949
+ end
1950
+
1951
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1952
+ metadata[:"x-goog-request-params"] ||= request_params_header
1953
+
1954
+ options.apply_defaults timeout: @config.rpcs.update_model.timeout,
1955
+ metadata: metadata,
1956
+ retry_policy: @config.rpcs.update_model.retry_policy
1957
+
1958
+ options.apply_defaults timeout: @config.timeout,
1959
+ metadata: @config.metadata,
1960
+ retry_policy: @config.retry_policy
1961
+
1962
+ @aml_stub.call_rpc :update_model, request, options: options do |response, operation|
1963
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1964
+ yield response, operation if block_given?
1965
+ throw :response, response
1966
+ end
1967
+ rescue ::GRPC::BadStatus => e
1968
+ raise ::Google::Cloud::Error.from_error(e)
1969
+ end
1970
+
1971
+ ##
1972
+ # Export governance information for a Model resource. For
1973
+ # information on the exported fields, see
1974
+ # [AML output data
1975
+ # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#model).
1976
+ #
1977
+ # @overload export_model_metadata(request, options = nil)
1978
+ # Pass arguments to `export_model_metadata` via a request object, either of type
1979
+ # {::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest} or an equivalent Hash.
1980
+ #
1981
+ # @param request [::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest, ::Hash]
1982
+ # A request object representing the call parameters. Required. To specify no
1983
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1984
+ # @param options [::Gapic::CallOptions, ::Hash]
1985
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1986
+ #
1987
+ # @overload export_model_metadata(model: nil, structured_metadata_destination: nil)
1988
+ # Pass arguments to `export_model_metadata` via keyword arguments. Note that at
1989
+ # least one keyword argument is required. To specify no parameters, or to keep all
1990
+ # the default parameter values, pass an empty Hash as a request object (see above).
1991
+ #
1992
+ # @param model [::String]
1993
+ # Required. The resource name of the Model.
1994
+ # @param structured_metadata_destination [::Google::Cloud::FinancialServices::V1::BigQueryDestination, ::Hash]
1995
+ # Required. BigQuery output where the metadata will be written.
1996
+ #
1997
+ # @yield [response, operation] Access the result along with the RPC operation
1998
+ # @yieldparam response [::Gapic::Operation]
1999
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2000
+ #
2001
+ # @return [::Gapic::Operation]
2002
+ #
2003
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2004
+ #
2005
+ # @example Basic example
2006
+ # require "google/cloud/financial_services/v1"
2007
+ #
2008
+ # # Create a client object. The client can be reused for multiple calls.
2009
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
2010
+ #
2011
+ # # Create a request. To set request fields, pass in keyword arguments.
2012
+ # request = Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest.new
2013
+ #
2014
+ # # Call the export_model_metadata method.
2015
+ # result = client.export_model_metadata request
2016
+ #
2017
+ # # The returned object is of type Gapic::Operation. You can use it to
2018
+ # # check the status of an operation, cancel it, or wait for results.
2019
+ # # Here is how to wait for a response.
2020
+ # result.wait_until_done! timeout: 60
2021
+ # if result.response?
2022
+ # p result.response
2023
+ # else
2024
+ # puts "No response received."
2025
+ # end
2026
+ #
2027
+ def export_model_metadata request, options = nil
2028
+ raise ::ArgumentError, "request must be provided" if request.nil?
2029
+
2030
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest
2031
+
2032
+ # Converts hash and nil to an options object
2033
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2034
+
2035
+ # Customize the options with defaults
2036
+ metadata = @config.rpcs.export_model_metadata.metadata.to_h
2037
+
2038
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2039
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2040
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2041
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
2042
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2043
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2044
+
2045
+ header_params = {}
2046
+ if request.model
2047
+ header_params["model"] = request.model
2048
+ end
2049
+
2050
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2051
+ metadata[:"x-goog-request-params"] ||= request_params_header
2052
+
2053
+ options.apply_defaults timeout: @config.rpcs.export_model_metadata.timeout,
2054
+ metadata: metadata,
2055
+ retry_policy: @config.rpcs.export_model_metadata.retry_policy
2056
+
2057
+ options.apply_defaults timeout: @config.timeout,
2058
+ metadata: @config.metadata,
2059
+ retry_policy: @config.retry_policy
2060
+
2061
+ @aml_stub.call_rpc :export_model_metadata, request, options: options do |response, operation|
2062
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2063
+ yield response, operation if block_given?
2064
+ throw :response, response
2065
+ end
2066
+ rescue ::GRPC::BadStatus => e
2067
+ raise ::Google::Cloud::Error.from_error(e)
2068
+ end
2069
+
2070
+ ##
2071
+ # Deletes a model.
2072
+ #
2073
+ # @overload delete_model(request, options = nil)
2074
+ # Pass arguments to `delete_model` via a request object, either of type
2075
+ # {::Google::Cloud::FinancialServices::V1::DeleteModelRequest} or an equivalent Hash.
2076
+ #
2077
+ # @param request [::Google::Cloud::FinancialServices::V1::DeleteModelRequest, ::Hash]
2078
+ # A request object representing the call parameters. Required. To specify no
2079
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2080
+ # @param options [::Gapic::CallOptions, ::Hash]
2081
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2082
+ #
2083
+ # @overload delete_model(name: nil, request_id: nil)
2084
+ # Pass arguments to `delete_model` via keyword arguments. Note that at
2085
+ # least one keyword argument is required. To specify no parameters, or to keep all
2086
+ # the default parameter values, pass an empty Hash as a request object (see above).
2087
+ #
2088
+ # @param name [::String]
2089
+ # Required. The resource name of the Model.
2090
+ # @param request_id [::String]
2091
+ # Optional. An optional request ID to identify requests. Specify a unique
2092
+ # request ID so that if you must retry your request, the server will know to
2093
+ # ignore the request if it has already been completed. The server will
2094
+ # guarantee that for at least 60 minutes after the first request.
2095
+ #
2096
+ # For example, consider a situation where you make an initial request and the
2097
+ # request times out. If you make the request again with the same request
2098
+ # ID, the server can check if original operation with the same request ID
2099
+ # was received, and if so, will ignore the second request. This prevents
2100
+ # clients from accidentally creating duplicate commitments.
2101
+ #
2102
+ # The request ID must be a valid UUID with the exception that zero UUID is
2103
+ # not supported (00000000-0000-0000-0000-000000000000).
2104
+ #
2105
+ # @yield [response, operation] Access the result along with the RPC operation
2106
+ # @yieldparam response [::Gapic::Operation]
2107
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2108
+ #
2109
+ # @return [::Gapic::Operation]
2110
+ #
2111
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2112
+ #
2113
+ # @example Basic example
2114
+ # require "google/cloud/financial_services/v1"
2115
+ #
2116
+ # # Create a client object. The client can be reused for multiple calls.
2117
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
2118
+ #
2119
+ # # Create a request. To set request fields, pass in keyword arguments.
2120
+ # request = Google::Cloud::FinancialServices::V1::DeleteModelRequest.new
2121
+ #
2122
+ # # Call the delete_model method.
2123
+ # result = client.delete_model request
2124
+ #
2125
+ # # The returned object is of type Gapic::Operation. You can use it to
2126
+ # # check the status of an operation, cancel it, or wait for results.
2127
+ # # Here is how to wait for a response.
2128
+ # result.wait_until_done! timeout: 60
2129
+ # if result.response?
2130
+ # p result.response
2131
+ # else
2132
+ # puts "No response received."
2133
+ # end
2134
+ #
2135
+ def delete_model request, options = nil
2136
+ raise ::ArgumentError, "request must be provided" if request.nil?
2137
+
2138
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteModelRequest
2139
+
2140
+ # Converts hash and nil to an options object
2141
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2142
+
2143
+ # Customize the options with defaults
2144
+ metadata = @config.rpcs.delete_model.metadata.to_h
2145
+
2146
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2147
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2148
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2149
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
2150
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2151
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2152
+
2153
+ header_params = {}
2154
+ if request.name
2155
+ header_params["name"] = request.name
2156
+ end
2157
+
2158
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2159
+ metadata[:"x-goog-request-params"] ||= request_params_header
2160
+
2161
+ options.apply_defaults timeout: @config.rpcs.delete_model.timeout,
2162
+ metadata: metadata,
2163
+ retry_policy: @config.rpcs.delete_model.retry_policy
2164
+
2165
+ options.apply_defaults timeout: @config.timeout,
2166
+ metadata: @config.metadata,
2167
+ retry_policy: @config.retry_policy
2168
+
2169
+ @aml_stub.call_rpc :delete_model, request, options: options do |response, operation|
2170
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2171
+ yield response, operation if block_given?
2172
+ throw :response, response
2173
+ end
2174
+ rescue ::GRPC::BadStatus => e
2175
+ raise ::Google::Cloud::Error.from_error(e)
2176
+ end
2177
+
2178
+ ##
2179
+ # Lists engine configs.
2180
+ #
2181
+ # @overload list_engine_configs(request, options = nil)
2182
+ # Pass arguments to `list_engine_configs` via a request object, either of type
2183
+ # {::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest} or an equivalent Hash.
2184
+ #
2185
+ # @param request [::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest, ::Hash]
2186
+ # A request object representing the call parameters. Required. To specify no
2187
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2188
+ # @param options [::Gapic::CallOptions, ::Hash]
2189
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2190
+ #
2191
+ # @overload list_engine_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2192
+ # Pass arguments to `list_engine_configs` via keyword arguments. Note that at
2193
+ # least one keyword argument is required. To specify no parameters, or to keep all
2194
+ # the default parameter values, pass an empty Hash as a request object (see above).
2195
+ #
2196
+ # @param parent [::String]
2197
+ # Required. The parent of the EngineConfig is the Instance.
2198
+ # @param page_size [::Integer]
2199
+ # The number of resources to be included in the response. The response
2200
+ # contains a next_page_token, which can be used to retrieve the next page of
2201
+ # resources.
2202
+ # @param page_token [::String]
2203
+ # In case of paginated results, this is the token that was returned in the
2204
+ # previous ListEngineConfigsResponse. It should be copied here to retrieve
2205
+ # the next page of resources. Empty will give the first page of
2206
+ # ListEngineConfigsRequest, and the last page will return an empty
2207
+ # page_token.
2208
+ # @param filter [::String]
2209
+ # Specify a filter to narrow search results.
2210
+ # @param order_by [::String]
2211
+ # Specify a field to use for ordering.
2212
+ #
2213
+ # @yield [response, operation] Access the result along with the RPC operation
2214
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineConfig>]
2215
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2216
+ #
2217
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineConfig>]
2218
+ #
2219
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2220
+ #
2221
+ # @example Basic example
2222
+ # require "google/cloud/financial_services/v1"
2223
+ #
2224
+ # # Create a client object. The client can be reused for multiple calls.
2225
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
2226
+ #
2227
+ # # Create a request. To set request fields, pass in keyword arguments.
2228
+ # request = Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest.new
2229
+ #
2230
+ # # Call the list_engine_configs method.
2231
+ # result = client.list_engine_configs request
2232
+ #
2233
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2234
+ # # over elements, and API calls will be issued to fetch pages as needed.
2235
+ # result.each do |item|
2236
+ # # Each element is of type ::Google::Cloud::FinancialServices::V1::EngineConfig.
2237
+ # p item
2238
+ # end
2239
+ #
2240
+ def list_engine_configs request, options = nil
2241
+ raise ::ArgumentError, "request must be provided" if request.nil?
2242
+
2243
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest
2244
+
2245
+ # Converts hash and nil to an options object
2246
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2247
+
2248
+ # Customize the options with defaults
2249
+ metadata = @config.rpcs.list_engine_configs.metadata.to_h
2250
+
2251
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2252
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2253
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2254
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
2255
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2256
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2257
+
2258
+ header_params = {}
2259
+ if request.parent
2260
+ header_params["parent"] = request.parent
2261
+ end
2262
+
2263
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2264
+ metadata[:"x-goog-request-params"] ||= request_params_header
2265
+
2266
+ options.apply_defaults timeout: @config.rpcs.list_engine_configs.timeout,
2267
+ metadata: metadata,
2268
+ retry_policy: @config.rpcs.list_engine_configs.retry_policy
2269
+
2270
+ options.apply_defaults timeout: @config.timeout,
2271
+ metadata: @config.metadata,
2272
+ retry_policy: @config.retry_policy
2273
+
2274
+ @aml_stub.call_rpc :list_engine_configs, request, options: options do |response, operation|
2275
+ response = ::Gapic::PagedEnumerable.new @aml_stub, :list_engine_configs, request, response, operation, options
2276
+ yield response, operation if block_given?
2277
+ throw :response, response
2278
+ end
2279
+ rescue ::GRPC::BadStatus => e
2280
+ raise ::Google::Cloud::Error.from_error(e)
2281
+ end
2282
+
2283
+ ##
2284
+ # Gets an engine config.
2285
+ #
2286
+ # @overload get_engine_config(request, options = nil)
2287
+ # Pass arguments to `get_engine_config` via a request object, either of type
2288
+ # {::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest} or an equivalent Hash.
2289
+ #
2290
+ # @param request [::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest, ::Hash]
2291
+ # A request object representing the call parameters. Required. To specify no
2292
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2293
+ # @param options [::Gapic::CallOptions, ::Hash]
2294
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2295
+ #
2296
+ # @overload get_engine_config(name: nil)
2297
+ # Pass arguments to `get_engine_config` via keyword arguments. Note that at
2298
+ # least one keyword argument is required. To specify no parameters, or to keep all
2299
+ # the default parameter values, pass an empty Hash as a request object (see above).
2300
+ #
2301
+ # @param name [::String]
2302
+ # Required. The resource name of the EngineConfig
2303
+ #
2304
+ # @yield [response, operation] Access the result along with the RPC operation
2305
+ # @yieldparam response [::Google::Cloud::FinancialServices::V1::EngineConfig]
2306
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2307
+ #
2308
+ # @return [::Google::Cloud::FinancialServices::V1::EngineConfig]
2309
+ #
2310
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2311
+ #
2312
+ # @example Basic example
2313
+ # require "google/cloud/financial_services/v1"
2314
+ #
2315
+ # # Create a client object. The client can be reused for multiple calls.
2316
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
2317
+ #
2318
+ # # Create a request. To set request fields, pass in keyword arguments.
2319
+ # request = Google::Cloud::FinancialServices::V1::GetEngineConfigRequest.new
2320
+ #
2321
+ # # Call the get_engine_config method.
2322
+ # result = client.get_engine_config request
2323
+ #
2324
+ # # The returned object is of type Google::Cloud::FinancialServices::V1::EngineConfig.
2325
+ # p result
2326
+ #
2327
+ def get_engine_config request, options = nil
2328
+ raise ::ArgumentError, "request must be provided" if request.nil?
2329
+
2330
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest
2331
+
2332
+ # Converts hash and nil to an options object
2333
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2334
+
2335
+ # Customize the options with defaults
2336
+ metadata = @config.rpcs.get_engine_config.metadata.to_h
2337
+
2338
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2339
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2340
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2341
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
2342
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2343
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2344
+
2345
+ header_params = {}
2346
+ if request.name
2347
+ header_params["name"] = request.name
2348
+ end
2349
+
2350
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2351
+ metadata[:"x-goog-request-params"] ||= request_params_header
2352
+
2353
+ options.apply_defaults timeout: @config.rpcs.get_engine_config.timeout,
2354
+ metadata: metadata,
2355
+ retry_policy: @config.rpcs.get_engine_config.retry_policy
2356
+
2357
+ options.apply_defaults timeout: @config.timeout,
2358
+ metadata: @config.metadata,
2359
+ retry_policy: @config.retry_policy
2360
+
2361
+ @aml_stub.call_rpc :get_engine_config, request, options: options do |response, operation|
2362
+ yield response, operation if block_given?
2363
+ end
2364
+ rescue ::GRPC::BadStatus => e
2365
+ raise ::Google::Cloud::Error.from_error(e)
2366
+ end
2367
+
2368
+ ##
2369
+ # Creates an engine config.
2370
+ #
2371
+ # @overload create_engine_config(request, options = nil)
2372
+ # Pass arguments to `create_engine_config` via a request object, either of type
2373
+ # {::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest} or an equivalent Hash.
2374
+ #
2375
+ # @param request [::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest, ::Hash]
2376
+ # A request object representing the call parameters. Required. To specify no
2377
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2378
+ # @param options [::Gapic::CallOptions, ::Hash]
2379
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2380
+ #
2381
+ # @overload create_engine_config(parent: nil, engine_config_id: nil, engine_config: nil, request_id: nil)
2382
+ # Pass arguments to `create_engine_config` via keyword arguments. Note that at
2383
+ # least one keyword argument is required. To specify no parameters, or to keep all
2384
+ # the default parameter values, pass an empty Hash as a request object (see above).
2385
+ #
2386
+ # @param parent [::String]
2387
+ # Required. The parent of the EngineConfig is the Instance.
2388
+ # @param engine_config_id [::String]
2389
+ # Required. The resource id of the EngineConfig
2390
+ # @param engine_config [::Google::Cloud::FinancialServices::V1::EngineConfig, ::Hash]
2391
+ # Required. The EngineConfig that will be created.
2392
+ # @param request_id [::String]
2393
+ # Optional. An optional request ID to identify requests. Specify a unique
2394
+ # request ID so that if you must retry your request, the server will know to
2395
+ # ignore the request if it has already been completed. The server will
2396
+ # guarantee that for at least 60 minutes since the first request.
2397
+ #
2398
+ # For example, consider a situation where you make an initial request and the
2399
+ # request times out. If you make the request again with the same request
2400
+ # ID, the server can check if original operation with the same request ID
2401
+ # was received, and if so, will ignore the second request. This prevents
2402
+ # clients from accidentally creating duplicate commitments.
2403
+ #
2404
+ # The request ID must be a valid UUID with the exception that zero UUID is
2405
+ # not supported (00000000-0000-0000-0000-000000000000).
2406
+ #
2407
+ # @yield [response, operation] Access the result along with the RPC operation
2408
+ # @yieldparam response [::Gapic::Operation]
2409
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2410
+ #
2411
+ # @return [::Gapic::Operation]
2412
+ #
2413
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2414
+ #
2415
+ # @example Basic example
2416
+ # require "google/cloud/financial_services/v1"
2417
+ #
2418
+ # # Create a client object. The client can be reused for multiple calls.
2419
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
2420
+ #
2421
+ # # Create a request. To set request fields, pass in keyword arguments.
2422
+ # request = Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest.new
2423
+ #
2424
+ # # Call the create_engine_config method.
2425
+ # result = client.create_engine_config request
2426
+ #
2427
+ # # The returned object is of type Gapic::Operation. You can use it to
2428
+ # # check the status of an operation, cancel it, or wait for results.
2429
+ # # Here is how to wait for a response.
2430
+ # result.wait_until_done! timeout: 60
2431
+ # if result.response?
2432
+ # p result.response
2433
+ # else
2434
+ # puts "No response received."
2435
+ # end
2436
+ #
2437
+ def create_engine_config request, options = nil
2438
+ raise ::ArgumentError, "request must be provided" if request.nil?
2439
+
2440
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest
2441
+
2442
+ # Converts hash and nil to an options object
2443
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2444
+
2445
+ # Customize the options with defaults
2446
+ metadata = @config.rpcs.create_engine_config.metadata.to_h
2447
+
2448
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2449
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2450
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2451
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
2452
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2453
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2454
+
2455
+ header_params = {}
2456
+ if request.parent
2457
+ header_params["parent"] = request.parent
2458
+ end
2459
+
2460
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2461
+ metadata[:"x-goog-request-params"] ||= request_params_header
2462
+
2463
+ options.apply_defaults timeout: @config.rpcs.create_engine_config.timeout,
2464
+ metadata: metadata,
2465
+ retry_policy: @config.rpcs.create_engine_config.retry_policy
2466
+
2467
+ options.apply_defaults timeout: @config.timeout,
2468
+ metadata: @config.metadata,
2469
+ retry_policy: @config.retry_policy
2470
+
2471
+ @aml_stub.call_rpc :create_engine_config, request, options: options do |response, operation|
2472
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2473
+ yield response, operation if block_given?
2474
+ throw :response, response
2475
+ end
2476
+ rescue ::GRPC::BadStatus => e
2477
+ raise ::Google::Cloud::Error.from_error(e)
2478
+ end
2479
+
2480
+ ##
2481
+ # Updates the parameters of a single EngineConfig.
2482
+ #
2483
+ # @overload update_engine_config(request, options = nil)
2484
+ # Pass arguments to `update_engine_config` via a request object, either of type
2485
+ # {::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest} or an equivalent Hash.
2486
+ #
2487
+ # @param request [::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest, ::Hash]
2488
+ # A request object representing the call parameters. Required. To specify no
2489
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2490
+ # @param options [::Gapic::CallOptions, ::Hash]
2491
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2492
+ #
2493
+ # @overload update_engine_config(update_mask: nil, engine_config: nil, request_id: nil)
2494
+ # Pass arguments to `update_engine_config` via keyword arguments. Note that at
2495
+ # least one keyword argument is required. To specify no parameters, or to keep all
2496
+ # the default parameter values, pass an empty Hash as a request object (see above).
2497
+ #
2498
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
2499
+ # Optional. Field mask is used to specify the fields to be overwritten in the
2500
+ # EngineConfig resource by the update.
2501
+ # The fields specified in the update_mask are relative to the resource, not
2502
+ # the full request. A field will be overwritten if it is in the mask. If the
2503
+ # user does not provide a mask then all fields will be overwritten.
2504
+ # @param engine_config [::Google::Cloud::FinancialServices::V1::EngineConfig, ::Hash]
2505
+ # Required. The new value of the EngineConfig fields that will be updated
2506
+ # according to the update_mask.
2507
+ # @param request_id [::String]
2508
+ # Optional. An optional request ID to identify requests. Specify a unique
2509
+ # request ID so that if you must retry your request, the server will know to
2510
+ # ignore the request if it has already been completed. The server will
2511
+ # guarantee that for at least 60 minutes since the first request.
2512
+ #
2513
+ # For example, consider a situation where you make an initial request and the
2514
+ # request times out. If you make the request again with the same request
2515
+ # ID, the server can check if original operation with the same request ID
2516
+ # was received, and if so, will ignore the second request. This prevents
2517
+ # clients from accidentally creating duplicate commitments.
2518
+ #
2519
+ # The request ID must be a valid UUID with the exception that zero UUID is
2520
+ # not supported (00000000-0000-0000-0000-000000000000).
2521
+ #
2522
+ # @yield [response, operation] Access the result along with the RPC operation
2523
+ # @yieldparam response [::Gapic::Operation]
2524
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2525
+ #
2526
+ # @return [::Gapic::Operation]
2527
+ #
2528
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2529
+ #
2530
+ # @example Basic example
2531
+ # require "google/cloud/financial_services/v1"
2532
+ #
2533
+ # # Create a client object. The client can be reused for multiple calls.
2534
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
2535
+ #
2536
+ # # Create a request. To set request fields, pass in keyword arguments.
2537
+ # request = Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest.new
2538
+ #
2539
+ # # Call the update_engine_config method.
2540
+ # result = client.update_engine_config request
2541
+ #
2542
+ # # The returned object is of type Gapic::Operation. You can use it to
2543
+ # # check the status of an operation, cancel it, or wait for results.
2544
+ # # Here is how to wait for a response.
2545
+ # result.wait_until_done! timeout: 60
2546
+ # if result.response?
2547
+ # p result.response
2548
+ # else
2549
+ # puts "No response received."
2550
+ # end
2551
+ #
2552
+ def update_engine_config request, options = nil
2553
+ raise ::ArgumentError, "request must be provided" if request.nil?
2554
+
2555
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest
2556
+
2557
+ # Converts hash and nil to an options object
2558
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2559
+
2560
+ # Customize the options with defaults
2561
+ metadata = @config.rpcs.update_engine_config.metadata.to_h
2562
+
2563
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2564
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2565
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2566
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
2567
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2568
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2569
+
2570
+ header_params = {}
2571
+ if request.engine_config&.name
2572
+ header_params["engine_config.name"] = request.engine_config.name
2573
+ end
2574
+
2575
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2576
+ metadata[:"x-goog-request-params"] ||= request_params_header
2577
+
2578
+ options.apply_defaults timeout: @config.rpcs.update_engine_config.timeout,
2579
+ metadata: metadata,
2580
+ retry_policy: @config.rpcs.update_engine_config.retry_policy
2581
+
2582
+ options.apply_defaults timeout: @config.timeout,
2583
+ metadata: @config.metadata,
2584
+ retry_policy: @config.retry_policy
2585
+
2586
+ @aml_stub.call_rpc :update_engine_config, request, options: options do |response, operation|
2587
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2588
+ yield response, operation if block_given?
2589
+ throw :response, response
2590
+ end
2591
+ rescue ::GRPC::BadStatus => e
2592
+ raise ::Google::Cloud::Error.from_error(e)
2593
+ end
2594
+
2595
+ ##
2596
+ # Export governance information for an EngineConfig resource. For
2597
+ # information on the exported fields, see
2598
+ # [AML output data
2599
+ # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#engine-config).
2600
+ #
2601
+ # @overload export_engine_config_metadata(request, options = nil)
2602
+ # Pass arguments to `export_engine_config_metadata` via a request object, either of type
2603
+ # {::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest} or an equivalent Hash.
2604
+ #
2605
+ # @param request [::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest, ::Hash]
2606
+ # A request object representing the call parameters. Required. To specify no
2607
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2608
+ # @param options [::Gapic::CallOptions, ::Hash]
2609
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2610
+ #
2611
+ # @overload export_engine_config_metadata(engine_config: nil, structured_metadata_destination: nil)
2612
+ # Pass arguments to `export_engine_config_metadata` via keyword arguments. Note that at
2613
+ # least one keyword argument is required. To specify no parameters, or to keep all
2614
+ # the default parameter values, pass an empty Hash as a request object (see above).
2615
+ #
2616
+ # @param engine_config [::String]
2617
+ # Required. The resource name of the EngineConfig.
2618
+ # @param structured_metadata_destination [::Google::Cloud::FinancialServices::V1::BigQueryDestination, ::Hash]
2619
+ # Required. BigQuery output where the metadata will be written.
2620
+ #
2621
+ # @yield [response, operation] Access the result along with the RPC operation
2622
+ # @yieldparam response [::Gapic::Operation]
2623
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2624
+ #
2625
+ # @return [::Gapic::Operation]
2626
+ #
2627
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2628
+ #
2629
+ # @example Basic example
2630
+ # require "google/cloud/financial_services/v1"
2631
+ #
2632
+ # # Create a client object. The client can be reused for multiple calls.
2633
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
2634
+ #
2635
+ # # Create a request. To set request fields, pass in keyword arguments.
2636
+ # request = Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest.new
2637
+ #
2638
+ # # Call the export_engine_config_metadata method.
2639
+ # result = client.export_engine_config_metadata request
2640
+ #
2641
+ # # The returned object is of type Gapic::Operation. You can use it to
2642
+ # # check the status of an operation, cancel it, or wait for results.
2643
+ # # Here is how to wait for a response.
2644
+ # result.wait_until_done! timeout: 60
2645
+ # if result.response?
2646
+ # p result.response
2647
+ # else
2648
+ # puts "No response received."
2649
+ # end
2650
+ #
2651
+ def export_engine_config_metadata request, options = nil
2652
+ raise ::ArgumentError, "request must be provided" if request.nil?
2653
+
2654
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest
2655
+
2656
+ # Converts hash and nil to an options object
2657
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2658
+
2659
+ # Customize the options with defaults
2660
+ metadata = @config.rpcs.export_engine_config_metadata.metadata.to_h
2661
+
2662
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2663
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2664
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2665
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
2666
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2667
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2668
+
2669
+ header_params = {}
2670
+ if request.engine_config
2671
+ header_params["engine_config"] = request.engine_config
2672
+ end
2673
+
2674
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2675
+ metadata[:"x-goog-request-params"] ||= request_params_header
2676
+
2677
+ options.apply_defaults timeout: @config.rpcs.export_engine_config_metadata.timeout,
2678
+ metadata: metadata,
2679
+ retry_policy: @config.rpcs.export_engine_config_metadata.retry_policy
2680
+
2681
+ options.apply_defaults timeout: @config.timeout,
2682
+ metadata: @config.metadata,
2683
+ retry_policy: @config.retry_policy
2684
+
2685
+ @aml_stub.call_rpc :export_engine_config_metadata, request, options: options do |response, operation|
2686
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2687
+ yield response, operation if block_given?
2688
+ throw :response, response
2689
+ end
2690
+ rescue ::GRPC::BadStatus => e
2691
+ raise ::Google::Cloud::Error.from_error(e)
2692
+ end
2693
+
2694
+ ##
2695
+ # Deletes an engine config.
2696
+ #
2697
+ # @overload delete_engine_config(request, options = nil)
2698
+ # Pass arguments to `delete_engine_config` via a request object, either of type
2699
+ # {::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest} or an equivalent Hash.
2700
+ #
2701
+ # @param request [::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest, ::Hash]
2702
+ # A request object representing the call parameters. Required. To specify no
2703
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2704
+ # @param options [::Gapic::CallOptions, ::Hash]
2705
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2706
+ #
2707
+ # @overload delete_engine_config(name: nil, request_id: nil)
2708
+ # Pass arguments to `delete_engine_config` via keyword arguments. Note that at
2709
+ # least one keyword argument is required. To specify no parameters, or to keep all
2710
+ # the default parameter values, pass an empty Hash as a request object (see above).
2711
+ #
2712
+ # @param name [::String]
2713
+ # Required. The resource name of the EngineConfig.
2714
+ # @param request_id [::String]
2715
+ # Optional. An optional request ID to identify requests. Specify a unique
2716
+ # request ID so that if you must retry your request, the server will know to
2717
+ # ignore the request if it has already been completed. The server will
2718
+ # guarantee that for at least 60 minutes after the first request.
2719
+ #
2720
+ # For example, consider a situation where you make an initial request and the
2721
+ # request times out. If you make the request again with the same request
2722
+ # ID, the server can check if original operation with the same request ID
2723
+ # was received, and if so, will ignore the second request. This prevents
2724
+ # clients from accidentally creating duplicate commitments.
2725
+ #
2726
+ # The request ID must be a valid UUID with the exception that zero UUID is
2727
+ # not supported (00000000-0000-0000-0000-000000000000).
2728
+ #
2729
+ # @yield [response, operation] Access the result along with the RPC operation
2730
+ # @yieldparam response [::Gapic::Operation]
2731
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2732
+ #
2733
+ # @return [::Gapic::Operation]
2734
+ #
2735
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2736
+ #
2737
+ # @example Basic example
2738
+ # require "google/cloud/financial_services/v1"
2739
+ #
2740
+ # # Create a client object. The client can be reused for multiple calls.
2741
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
2742
+ #
2743
+ # # Create a request. To set request fields, pass in keyword arguments.
2744
+ # request = Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest.new
2745
+ #
2746
+ # # Call the delete_engine_config method.
2747
+ # result = client.delete_engine_config request
2748
+ #
2749
+ # # The returned object is of type Gapic::Operation. You can use it to
2750
+ # # check the status of an operation, cancel it, or wait for results.
2751
+ # # Here is how to wait for a response.
2752
+ # result.wait_until_done! timeout: 60
2753
+ # if result.response?
2754
+ # p result.response
2755
+ # else
2756
+ # puts "No response received."
2757
+ # end
2758
+ #
2759
+ def delete_engine_config request, options = nil
2760
+ raise ::ArgumentError, "request must be provided" if request.nil?
2761
+
2762
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest
2763
+
2764
+ # Converts hash and nil to an options object
2765
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2766
+
2767
+ # Customize the options with defaults
2768
+ metadata = @config.rpcs.delete_engine_config.metadata.to_h
2769
+
2770
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2771
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2772
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2773
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
2774
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2775
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2776
+
2777
+ header_params = {}
2778
+ if request.name
2779
+ header_params["name"] = request.name
2780
+ end
2781
+
2782
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2783
+ metadata[:"x-goog-request-params"] ||= request_params_header
2784
+
2785
+ options.apply_defaults timeout: @config.rpcs.delete_engine_config.timeout,
2786
+ metadata: metadata,
2787
+ retry_policy: @config.rpcs.delete_engine_config.retry_policy
2788
+
2789
+ options.apply_defaults timeout: @config.timeout,
2790
+ metadata: @config.metadata,
2791
+ retry_policy: @config.retry_policy
2792
+
2793
+ @aml_stub.call_rpc :delete_engine_config, request, options: options do |response, operation|
2794
+ response = ::Gapic::Operation.new response, @operations_client, options: options
2795
+ yield response, operation if block_given?
2796
+ throw :response, response
2797
+ end
2798
+ rescue ::GRPC::BadStatus => e
2799
+ raise ::Google::Cloud::Error.from_error(e)
2800
+ end
2801
+
2802
+ ##
2803
+ # Gets a single EngineVersion.
2804
+ #
2805
+ # @overload get_engine_version(request, options = nil)
2806
+ # Pass arguments to `get_engine_version` via a request object, either of type
2807
+ # {::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest} or an equivalent Hash.
2808
+ #
2809
+ # @param request [::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest, ::Hash]
2810
+ # A request object representing the call parameters. Required. To specify no
2811
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2812
+ # @param options [::Gapic::CallOptions, ::Hash]
2813
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2814
+ #
2815
+ # @overload get_engine_version(name: nil)
2816
+ # Pass arguments to `get_engine_version` via keyword arguments. Note that at
2817
+ # least one keyword argument is required. To specify no parameters, or to keep all
2818
+ # the default parameter values, pass an empty Hash as a request object (see above).
2819
+ #
2820
+ # @param name [::String]
2821
+ # Required. The resource name of the EngineVersion
2822
+ #
2823
+ # @yield [response, operation] Access the result along with the RPC operation
2824
+ # @yieldparam response [::Google::Cloud::FinancialServices::V1::EngineVersion]
2825
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2826
+ #
2827
+ # @return [::Google::Cloud::FinancialServices::V1::EngineVersion]
2828
+ #
2829
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2830
+ #
2831
+ # @example Basic example
2832
+ # require "google/cloud/financial_services/v1"
2833
+ #
2834
+ # # Create a client object. The client can be reused for multiple calls.
2835
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
2836
+ #
2837
+ # # Create a request. To set request fields, pass in keyword arguments.
2838
+ # request = Google::Cloud::FinancialServices::V1::GetEngineVersionRequest.new
2839
+ #
2840
+ # # Call the get_engine_version method.
2841
+ # result = client.get_engine_version request
2842
+ #
2843
+ # # The returned object is of type Google::Cloud::FinancialServices::V1::EngineVersion.
2844
+ # p result
2845
+ #
2846
+ def get_engine_version request, options = nil
2847
+ raise ::ArgumentError, "request must be provided" if request.nil?
2848
+
2849
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest
2850
+
2851
+ # Converts hash and nil to an options object
2852
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2853
+
2854
+ # Customize the options with defaults
2855
+ metadata = @config.rpcs.get_engine_version.metadata.to_h
2856
+
2857
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2858
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2859
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2860
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
2861
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2862
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2863
+
2864
+ header_params = {}
2865
+ if request.name
2866
+ header_params["name"] = request.name
2867
+ end
2868
+
2869
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2870
+ metadata[:"x-goog-request-params"] ||= request_params_header
2871
+
2872
+ options.apply_defaults timeout: @config.rpcs.get_engine_version.timeout,
2873
+ metadata: metadata,
2874
+ retry_policy: @config.rpcs.get_engine_version.retry_policy
2875
+
2876
+ options.apply_defaults timeout: @config.timeout,
2877
+ metadata: @config.metadata,
2878
+ retry_policy: @config.retry_policy
2879
+
2880
+ @aml_stub.call_rpc :get_engine_version, request, options: options do |response, operation|
2881
+ yield response, operation if block_given?
2882
+ end
2883
+ rescue ::GRPC::BadStatus => e
2884
+ raise ::Google::Cloud::Error.from_error(e)
2885
+ end
2886
+
2887
+ ##
2888
+ # Lists EngineVersions for given location.
2889
+ #
2890
+ # @overload list_engine_versions(request, options = nil)
2891
+ # Pass arguments to `list_engine_versions` via a request object, either of type
2892
+ # {::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest} or an equivalent Hash.
2893
+ #
2894
+ # @param request [::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest, ::Hash]
2895
+ # A request object representing the call parameters. Required. To specify no
2896
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2897
+ # @param options [::Gapic::CallOptions, ::Hash]
2898
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
2899
+ #
2900
+ # @overload list_engine_versions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
2901
+ # Pass arguments to `list_engine_versions` via keyword arguments. Note that at
2902
+ # least one keyword argument is required. To specify no parameters, or to keep all
2903
+ # the default parameter values, pass an empty Hash as a request object (see above).
2904
+ #
2905
+ # @param parent [::String]
2906
+ # Required. The parent of the EngineVersion is the Instance.
2907
+ # @param page_size [::Integer]
2908
+ # Optional. The number of resources to be included in the response. The
2909
+ # response contains a next_page_token, which can be used to retrieve the next
2910
+ # page of resources.
2911
+ # @param page_token [::String]
2912
+ # Optional. In case of paginated results, this is the token that was returned
2913
+ # in the previous ListEngineVersionsResponse. It should be copied here to
2914
+ # retrieve the next page of resources. Empty will give the first page of
2915
+ # ListEngineVersionsRequest, and the last page will return an empty
2916
+ # page_token.
2917
+ # @param filter [::String]
2918
+ # Optional. Specify a filter to narrow search results.
2919
+ # If empty or unset will default to "state!=DEPRECATED",
2920
+ # to view deprecated versions use "state:*" or any other filter.
2921
+ # @param order_by [::String]
2922
+ # Optional. Specify a field to use for ordering.
2923
+ #
2924
+ # @yield [response, operation] Access the result along with the RPC operation
2925
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineVersion>]
2926
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
2927
+ #
2928
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineVersion>]
2929
+ #
2930
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
2931
+ #
2932
+ # @example Basic example
2933
+ # require "google/cloud/financial_services/v1"
2934
+ #
2935
+ # # Create a client object. The client can be reused for multiple calls.
2936
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
2937
+ #
2938
+ # # Create a request. To set request fields, pass in keyword arguments.
2939
+ # request = Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest.new
2940
+ #
2941
+ # # Call the list_engine_versions method.
2942
+ # result = client.list_engine_versions request
2943
+ #
2944
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2945
+ # # over elements, and API calls will be issued to fetch pages as needed.
2946
+ # result.each do |item|
2947
+ # # Each element is of type ::Google::Cloud::FinancialServices::V1::EngineVersion.
2948
+ # p item
2949
+ # end
2950
+ #
2951
+ def list_engine_versions request, options = nil
2952
+ raise ::ArgumentError, "request must be provided" if request.nil?
2953
+
2954
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest
2955
+
2956
+ # Converts hash and nil to an options object
2957
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2958
+
2959
+ # Customize the options with defaults
2960
+ metadata = @config.rpcs.list_engine_versions.metadata.to_h
2961
+
2962
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
2963
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2964
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2965
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
2966
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
2967
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2968
+
2969
+ header_params = {}
2970
+ if request.parent
2971
+ header_params["parent"] = request.parent
2972
+ end
2973
+
2974
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
2975
+ metadata[:"x-goog-request-params"] ||= request_params_header
2976
+
2977
+ options.apply_defaults timeout: @config.rpcs.list_engine_versions.timeout,
2978
+ metadata: metadata,
2979
+ retry_policy: @config.rpcs.list_engine_versions.retry_policy
2980
+
2981
+ options.apply_defaults timeout: @config.timeout,
2982
+ metadata: @config.metadata,
2983
+ retry_policy: @config.retry_policy
2984
+
2985
+ @aml_stub.call_rpc :list_engine_versions, request, options: options do |response, operation|
2986
+ response = ::Gapic::PagedEnumerable.new @aml_stub, :list_engine_versions, request, response, operation, options
2987
+ yield response, operation if block_given?
2988
+ throw :response, response
2989
+ end
2990
+ rescue ::GRPC::BadStatus => e
2991
+ raise ::Google::Cloud::Error.from_error(e)
2992
+ end
2993
+
2994
+ ##
2995
+ # List PredictionResults.
2996
+ #
2997
+ # @overload list_prediction_results(request, options = nil)
2998
+ # Pass arguments to `list_prediction_results` via a request object, either of type
2999
+ # {::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest} or an equivalent Hash.
3000
+ #
3001
+ # @param request [::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest, ::Hash]
3002
+ # A request object representing the call parameters. Required. To specify no
3003
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3004
+ # @param options [::Gapic::CallOptions, ::Hash]
3005
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3006
+ #
3007
+ # @overload list_prediction_results(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
3008
+ # Pass arguments to `list_prediction_results` via keyword arguments. Note that at
3009
+ # least one keyword argument is required. To specify no parameters, or to keep all
3010
+ # the default parameter values, pass an empty Hash as a request object (see above).
3011
+ #
3012
+ # @param parent [::String]
3013
+ # Required. The parent of the PredictionResult is the Instance.
3014
+ # @param page_size [::Integer]
3015
+ # The number of resources to be included in the response. The response
3016
+ # contains a next_page_token, which can be used to retrieve the next page of
3017
+ # resources.
3018
+ # @param page_token [::String]
3019
+ # In case of paginated results, this is the token that was returned in the
3020
+ # previous ListPredictionResultsResponse. It should be copied here to
3021
+ # retrieve the next page of resources. Empty will give the first page of
3022
+ # ListPredictionResultsRequest, and the last page will return an empty
3023
+ # page_token.
3024
+ # @param filter [::String]
3025
+ # Specify a filter to narrow search results.
3026
+ # @param order_by [::String]
3027
+ # Specify a field to use for ordering.
3028
+ #
3029
+ # @yield [response, operation] Access the result along with the RPC operation
3030
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::PredictionResult>]
3031
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3032
+ #
3033
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::PredictionResult>]
3034
+ #
3035
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3036
+ #
3037
+ # @example Basic example
3038
+ # require "google/cloud/financial_services/v1"
3039
+ #
3040
+ # # Create a client object. The client can be reused for multiple calls.
3041
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
3042
+ #
3043
+ # # Create a request. To set request fields, pass in keyword arguments.
3044
+ # request = Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest.new
3045
+ #
3046
+ # # Call the list_prediction_results method.
3047
+ # result = client.list_prediction_results request
3048
+ #
3049
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3050
+ # # over elements, and API calls will be issued to fetch pages as needed.
3051
+ # result.each do |item|
3052
+ # # Each element is of type ::Google::Cloud::FinancialServices::V1::PredictionResult.
3053
+ # p item
3054
+ # end
3055
+ #
3056
+ def list_prediction_results request, options = nil
3057
+ raise ::ArgumentError, "request must be provided" if request.nil?
3058
+
3059
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest
3060
+
3061
+ # Converts hash and nil to an options object
3062
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3063
+
3064
+ # Customize the options with defaults
3065
+ metadata = @config.rpcs.list_prediction_results.metadata.to_h
3066
+
3067
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3068
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3069
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3070
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
3071
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3072
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3073
+
3074
+ header_params = {}
3075
+ if request.parent
3076
+ header_params["parent"] = request.parent
3077
+ end
3078
+
3079
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3080
+ metadata[:"x-goog-request-params"] ||= request_params_header
3081
+
3082
+ options.apply_defaults timeout: @config.rpcs.list_prediction_results.timeout,
3083
+ metadata: metadata,
3084
+ retry_policy: @config.rpcs.list_prediction_results.retry_policy
3085
+
3086
+ options.apply_defaults timeout: @config.timeout,
3087
+ metadata: @config.metadata,
3088
+ retry_policy: @config.retry_policy
3089
+
3090
+ @aml_stub.call_rpc :list_prediction_results, request, options: options do |response, operation|
3091
+ response = ::Gapic::PagedEnumerable.new @aml_stub, :list_prediction_results, request, response, operation, options
3092
+ yield response, operation if block_given?
3093
+ throw :response, response
3094
+ end
3095
+ rescue ::GRPC::BadStatus => e
3096
+ raise ::Google::Cloud::Error.from_error(e)
3097
+ end
3098
+
3099
+ ##
3100
+ # Gets a PredictionResult.
3101
+ #
3102
+ # @overload get_prediction_result(request, options = nil)
3103
+ # Pass arguments to `get_prediction_result` via a request object, either of type
3104
+ # {::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest} or an equivalent Hash.
3105
+ #
3106
+ # @param request [::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest, ::Hash]
3107
+ # A request object representing the call parameters. Required. To specify no
3108
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3109
+ # @param options [::Gapic::CallOptions, ::Hash]
3110
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3111
+ #
3112
+ # @overload get_prediction_result(name: nil)
3113
+ # Pass arguments to `get_prediction_result` via keyword arguments. Note that at
3114
+ # least one keyword argument is required. To specify no parameters, or to keep all
3115
+ # the default parameter values, pass an empty Hash as a request object (see above).
3116
+ #
3117
+ # @param name [::String]
3118
+ # Required. The resource name of the PredictionResult
3119
+ #
3120
+ # @yield [response, operation] Access the result along with the RPC operation
3121
+ # @yieldparam response [::Google::Cloud::FinancialServices::V1::PredictionResult]
3122
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3123
+ #
3124
+ # @return [::Google::Cloud::FinancialServices::V1::PredictionResult]
3125
+ #
3126
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3127
+ #
3128
+ # @example Basic example
3129
+ # require "google/cloud/financial_services/v1"
3130
+ #
3131
+ # # Create a client object. The client can be reused for multiple calls.
3132
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
3133
+ #
3134
+ # # Create a request. To set request fields, pass in keyword arguments.
3135
+ # request = Google::Cloud::FinancialServices::V1::GetPredictionResultRequest.new
3136
+ #
3137
+ # # Call the get_prediction_result method.
3138
+ # result = client.get_prediction_result request
3139
+ #
3140
+ # # The returned object is of type Google::Cloud::FinancialServices::V1::PredictionResult.
3141
+ # p result
3142
+ #
3143
+ def get_prediction_result request, options = nil
3144
+ raise ::ArgumentError, "request must be provided" if request.nil?
3145
+
3146
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest
3147
+
3148
+ # Converts hash and nil to an options object
3149
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3150
+
3151
+ # Customize the options with defaults
3152
+ metadata = @config.rpcs.get_prediction_result.metadata.to_h
3153
+
3154
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3155
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3156
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3157
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
3158
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3159
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3160
+
3161
+ header_params = {}
3162
+ if request.name
3163
+ header_params["name"] = request.name
3164
+ end
3165
+
3166
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3167
+ metadata[:"x-goog-request-params"] ||= request_params_header
3168
+
3169
+ options.apply_defaults timeout: @config.rpcs.get_prediction_result.timeout,
3170
+ metadata: metadata,
3171
+ retry_policy: @config.rpcs.get_prediction_result.retry_policy
3172
+
3173
+ options.apply_defaults timeout: @config.timeout,
3174
+ metadata: @config.metadata,
3175
+ retry_policy: @config.retry_policy
3176
+
3177
+ @aml_stub.call_rpc :get_prediction_result, request, options: options do |response, operation|
3178
+ yield response, operation if block_given?
3179
+ end
3180
+ rescue ::GRPC::BadStatus => e
3181
+ raise ::Google::Cloud::Error.from_error(e)
3182
+ end
3183
+
3184
+ ##
3185
+ # Create a PredictionResult.
3186
+ #
3187
+ # @overload create_prediction_result(request, options = nil)
3188
+ # Pass arguments to `create_prediction_result` via a request object, either of type
3189
+ # {::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest} or an equivalent Hash.
3190
+ #
3191
+ # @param request [::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest, ::Hash]
3192
+ # A request object representing the call parameters. Required. To specify no
3193
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3194
+ # @param options [::Gapic::CallOptions, ::Hash]
3195
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3196
+ #
3197
+ # @overload create_prediction_result(parent: nil, prediction_result_id: nil, prediction_result: nil, request_id: nil)
3198
+ # Pass arguments to `create_prediction_result` via keyword arguments. Note that at
3199
+ # least one keyword argument is required. To specify no parameters, or to keep all
3200
+ # the default parameter values, pass an empty Hash as a request object (see above).
3201
+ #
3202
+ # @param parent [::String]
3203
+ # Required. The parent of the PredictionResult is the Instance.
3204
+ # @param prediction_result_id [::String]
3205
+ # Required. The resource id of the PredictionResult
3206
+ # @param prediction_result [::Google::Cloud::FinancialServices::V1::PredictionResult, ::Hash]
3207
+ # Required. The PredictionResult that will be created.
3208
+ # @param request_id [::String]
3209
+ # Optional. An optional request ID to identify requests. Specify a unique
3210
+ # request ID so that if you must retry your request, the server will know to
3211
+ # ignore the request if it has already been completed. The server will
3212
+ # guarantee that for at least 60 minutes since the first request.
3213
+ #
3214
+ # For example, consider a situation where you make an initial request and the
3215
+ # request times out. If you make the request again with the same request
3216
+ # ID, the server can check if original operation with the same request ID
3217
+ # was received, and if so, will ignore the second request. This prevents
3218
+ # clients from accidentally creating duplicate commitments.
3219
+ #
3220
+ # The request ID must be a valid UUID with the exception that zero UUID is
3221
+ # not supported (00000000-0000-0000-0000-000000000000).
3222
+ #
3223
+ # @yield [response, operation] Access the result along with the RPC operation
3224
+ # @yieldparam response [::Gapic::Operation]
3225
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3226
+ #
3227
+ # @return [::Gapic::Operation]
3228
+ #
3229
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3230
+ #
3231
+ # @example Basic example
3232
+ # require "google/cloud/financial_services/v1"
3233
+ #
3234
+ # # Create a client object. The client can be reused for multiple calls.
3235
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
3236
+ #
3237
+ # # Create a request. To set request fields, pass in keyword arguments.
3238
+ # request = Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest.new
3239
+ #
3240
+ # # Call the create_prediction_result method.
3241
+ # result = client.create_prediction_result request
3242
+ #
3243
+ # # The returned object is of type Gapic::Operation. You can use it to
3244
+ # # check the status of an operation, cancel it, or wait for results.
3245
+ # # Here is how to wait for a response.
3246
+ # result.wait_until_done! timeout: 60
3247
+ # if result.response?
3248
+ # p result.response
3249
+ # else
3250
+ # puts "No response received."
3251
+ # end
3252
+ #
3253
+ def create_prediction_result request, options = nil
3254
+ raise ::ArgumentError, "request must be provided" if request.nil?
3255
+
3256
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest
3257
+
3258
+ # Converts hash and nil to an options object
3259
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3260
+
3261
+ # Customize the options with defaults
3262
+ metadata = @config.rpcs.create_prediction_result.metadata.to_h
3263
+
3264
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3265
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3266
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3267
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
3268
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3269
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3270
+
3271
+ header_params = {}
3272
+ if request.parent
3273
+ header_params["parent"] = request.parent
3274
+ end
3275
+
3276
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3277
+ metadata[:"x-goog-request-params"] ||= request_params_header
3278
+
3279
+ options.apply_defaults timeout: @config.rpcs.create_prediction_result.timeout,
3280
+ metadata: metadata,
3281
+ retry_policy: @config.rpcs.create_prediction_result.retry_policy
3282
+
3283
+ options.apply_defaults timeout: @config.timeout,
3284
+ metadata: @config.metadata,
3285
+ retry_policy: @config.retry_policy
3286
+
3287
+ @aml_stub.call_rpc :create_prediction_result, request, options: options do |response, operation|
3288
+ response = ::Gapic::Operation.new response, @operations_client, options: options
3289
+ yield response, operation if block_given?
3290
+ throw :response, response
3291
+ end
3292
+ rescue ::GRPC::BadStatus => e
3293
+ raise ::Google::Cloud::Error.from_error(e)
3294
+ end
3295
+
3296
+ ##
3297
+ # Updates the parameters of a single PredictionResult.
3298
+ #
3299
+ # @overload update_prediction_result(request, options = nil)
3300
+ # Pass arguments to `update_prediction_result` via a request object, either of type
3301
+ # {::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest} or an equivalent Hash.
3302
+ #
3303
+ # @param request [::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest, ::Hash]
3304
+ # A request object representing the call parameters. Required. To specify no
3305
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3306
+ # @param options [::Gapic::CallOptions, ::Hash]
3307
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3308
+ #
3309
+ # @overload update_prediction_result(update_mask: nil, prediction_result: nil, request_id: nil)
3310
+ # Pass arguments to `update_prediction_result` via keyword arguments. Note that at
3311
+ # least one keyword argument is required. To specify no parameters, or to keep all
3312
+ # the default parameter values, pass an empty Hash as a request object (see above).
3313
+ #
3314
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3315
+ # Optional. Field mask is used to specify the fields to be overwritten in the
3316
+ # PredictionResult resource by the update.
3317
+ # The fields specified in the update_mask are relative to the resource, not
3318
+ # the full request. A field will be overwritten if it is in the mask. If the
3319
+ # user does not provide a mask then all fields will be overwritten.
3320
+ # @param prediction_result [::Google::Cloud::FinancialServices::V1::PredictionResult, ::Hash]
3321
+ # Required. The new value of the PredictionResult fields that will be updated
3322
+ # according to the update_mask.
3323
+ # @param request_id [::String]
3324
+ # Optional. An optional request ID to identify requests. Specify a unique
3325
+ # request ID so that if you must retry your request, the server will know to
3326
+ # ignore the request if it has already been completed. The server will
3327
+ # guarantee that for at least 60 minutes since the first request.
3328
+ #
3329
+ # For example, consider a situation where you make an initial request and the
3330
+ # request times out. If you make the request again with the same request
3331
+ # ID, the server can check if original operation with the same request ID
3332
+ # was received, and if so, will ignore the second request. This prevents
3333
+ # clients from accidentally creating duplicate commitments.
3334
+ #
3335
+ # The request ID must be a valid UUID with the exception that zero UUID is
3336
+ # not supported (00000000-0000-0000-0000-000000000000).
3337
+ #
3338
+ # @yield [response, operation] Access the result along with the RPC operation
3339
+ # @yieldparam response [::Gapic::Operation]
3340
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3341
+ #
3342
+ # @return [::Gapic::Operation]
3343
+ #
3344
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3345
+ #
3346
+ # @example Basic example
3347
+ # require "google/cloud/financial_services/v1"
3348
+ #
3349
+ # # Create a client object. The client can be reused for multiple calls.
3350
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
3351
+ #
3352
+ # # Create a request. To set request fields, pass in keyword arguments.
3353
+ # request = Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest.new
3354
+ #
3355
+ # # Call the update_prediction_result method.
3356
+ # result = client.update_prediction_result request
3357
+ #
3358
+ # # The returned object is of type Gapic::Operation. You can use it to
3359
+ # # check the status of an operation, cancel it, or wait for results.
3360
+ # # Here is how to wait for a response.
3361
+ # result.wait_until_done! timeout: 60
3362
+ # if result.response?
3363
+ # p result.response
3364
+ # else
3365
+ # puts "No response received."
3366
+ # end
3367
+ #
3368
+ def update_prediction_result request, options = nil
3369
+ raise ::ArgumentError, "request must be provided" if request.nil?
3370
+
3371
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest
3372
+
3373
+ # Converts hash and nil to an options object
3374
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3375
+
3376
+ # Customize the options with defaults
3377
+ metadata = @config.rpcs.update_prediction_result.metadata.to_h
3378
+
3379
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3380
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3381
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3382
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
3383
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3384
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3385
+
3386
+ header_params = {}
3387
+ if request.prediction_result&.name
3388
+ header_params["prediction_result.name"] = request.prediction_result.name
3389
+ end
3390
+
3391
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3392
+ metadata[:"x-goog-request-params"] ||= request_params_header
3393
+
3394
+ options.apply_defaults timeout: @config.rpcs.update_prediction_result.timeout,
3395
+ metadata: metadata,
3396
+ retry_policy: @config.rpcs.update_prediction_result.retry_policy
3397
+
3398
+ options.apply_defaults timeout: @config.timeout,
3399
+ metadata: @config.metadata,
3400
+ retry_policy: @config.retry_policy
3401
+
3402
+ @aml_stub.call_rpc :update_prediction_result, request, options: options do |response, operation|
3403
+ response = ::Gapic::Operation.new response, @operations_client, options: options
3404
+ yield response, operation if block_given?
3405
+ throw :response, response
3406
+ end
3407
+ rescue ::GRPC::BadStatus => e
3408
+ raise ::Google::Cloud::Error.from_error(e)
3409
+ end
3410
+
3411
+ ##
3412
+ # Export governance information for a PredictionResult resource. For
3413
+ # information on the exported fields, see
3414
+ # [AML output data
3415
+ # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#prediction-results).
3416
+ #
3417
+ # @overload export_prediction_result_metadata(request, options = nil)
3418
+ # Pass arguments to `export_prediction_result_metadata` via a request object, either of type
3419
+ # {::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest} or an equivalent Hash.
3420
+ #
3421
+ # @param request [::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest, ::Hash]
3422
+ # A request object representing the call parameters. Required. To specify no
3423
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3424
+ # @param options [::Gapic::CallOptions, ::Hash]
3425
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3426
+ #
3427
+ # @overload export_prediction_result_metadata(prediction_result: nil, structured_metadata_destination: nil)
3428
+ # Pass arguments to `export_prediction_result_metadata` via keyword arguments. Note that at
3429
+ # least one keyword argument is required. To specify no parameters, or to keep all
3430
+ # the default parameter values, pass an empty Hash as a request object (see above).
3431
+ #
3432
+ # @param prediction_result [::String]
3433
+ # Required. The resource name of the PredictionResult.
3434
+ # @param structured_metadata_destination [::Google::Cloud::FinancialServices::V1::BigQueryDestination, ::Hash]
3435
+ # Required. BigQuery output where the metadata will be written.
3436
+ #
3437
+ # @yield [response, operation] Access the result along with the RPC operation
3438
+ # @yieldparam response [::Gapic::Operation]
3439
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3440
+ #
3441
+ # @return [::Gapic::Operation]
3442
+ #
3443
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3444
+ #
3445
+ # @example Basic example
3446
+ # require "google/cloud/financial_services/v1"
3447
+ #
3448
+ # # Create a client object. The client can be reused for multiple calls.
3449
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
3450
+ #
3451
+ # # Create a request. To set request fields, pass in keyword arguments.
3452
+ # request = Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest.new
3453
+ #
3454
+ # # Call the export_prediction_result_metadata method.
3455
+ # result = client.export_prediction_result_metadata request
3456
+ #
3457
+ # # The returned object is of type Gapic::Operation. You can use it to
3458
+ # # check the status of an operation, cancel it, or wait for results.
3459
+ # # Here is how to wait for a response.
3460
+ # result.wait_until_done! timeout: 60
3461
+ # if result.response?
3462
+ # p result.response
3463
+ # else
3464
+ # puts "No response received."
3465
+ # end
3466
+ #
3467
+ def export_prediction_result_metadata request, options = nil
3468
+ raise ::ArgumentError, "request must be provided" if request.nil?
3469
+
3470
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest
3471
+
3472
+ # Converts hash and nil to an options object
3473
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3474
+
3475
+ # Customize the options with defaults
3476
+ metadata = @config.rpcs.export_prediction_result_metadata.metadata.to_h
3477
+
3478
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3479
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3480
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3481
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
3482
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3483
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3484
+
3485
+ header_params = {}
3486
+ if request.prediction_result
3487
+ header_params["prediction_result"] = request.prediction_result
3488
+ end
3489
+
3490
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3491
+ metadata[:"x-goog-request-params"] ||= request_params_header
3492
+
3493
+ options.apply_defaults timeout: @config.rpcs.export_prediction_result_metadata.timeout,
3494
+ metadata: metadata,
3495
+ retry_policy: @config.rpcs.export_prediction_result_metadata.retry_policy
3496
+
3497
+ options.apply_defaults timeout: @config.timeout,
3498
+ metadata: @config.metadata,
3499
+ retry_policy: @config.retry_policy
3500
+
3501
+ @aml_stub.call_rpc :export_prediction_result_metadata, request, options: options do |response, operation|
3502
+ response = ::Gapic::Operation.new response, @operations_client, options: options
3503
+ yield response, operation if block_given?
3504
+ throw :response, response
3505
+ end
3506
+ rescue ::GRPC::BadStatus => e
3507
+ raise ::Google::Cloud::Error.from_error(e)
3508
+ end
3509
+
3510
+ ##
3511
+ # Deletes a PredictionResult.
3512
+ #
3513
+ # @overload delete_prediction_result(request, options = nil)
3514
+ # Pass arguments to `delete_prediction_result` via a request object, either of type
3515
+ # {::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest} or an equivalent Hash.
3516
+ #
3517
+ # @param request [::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest, ::Hash]
3518
+ # A request object representing the call parameters. Required. To specify no
3519
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3520
+ # @param options [::Gapic::CallOptions, ::Hash]
3521
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3522
+ #
3523
+ # @overload delete_prediction_result(name: nil, request_id: nil)
3524
+ # Pass arguments to `delete_prediction_result` via keyword arguments. Note that at
3525
+ # least one keyword argument is required. To specify no parameters, or to keep all
3526
+ # the default parameter values, pass an empty Hash as a request object (see above).
3527
+ #
3528
+ # @param name [::String]
3529
+ # Required. The resource name of the PredictionResult.
3530
+ # @param request_id [::String]
3531
+ # Optional. An optional request ID to identify requests. Specify a unique
3532
+ # request ID so that if you must retry your request, the server will know to
3533
+ # ignore the request if it has already been completed. The server will
3534
+ # guarantee that for at least 60 minutes after the first request.
3535
+ #
3536
+ # For example, consider a situation where you make an initial request and the
3537
+ # request times out. If you make the request again with the same request
3538
+ # ID, the server can check if original operation with the same request ID
3539
+ # was received, and if so, will ignore the second request. This prevents
3540
+ # clients from accidentally creating duplicate commitments.
3541
+ #
3542
+ # The request ID must be a valid UUID with the exception that zero UUID is
3543
+ # not supported (00000000-0000-0000-0000-000000000000).
3544
+ #
3545
+ # @yield [response, operation] Access the result along with the RPC operation
3546
+ # @yieldparam response [::Gapic::Operation]
3547
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3548
+ #
3549
+ # @return [::Gapic::Operation]
3550
+ #
3551
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3552
+ #
3553
+ # @example Basic example
3554
+ # require "google/cloud/financial_services/v1"
3555
+ #
3556
+ # # Create a client object. The client can be reused for multiple calls.
3557
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
3558
+ #
3559
+ # # Create a request. To set request fields, pass in keyword arguments.
3560
+ # request = Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest.new
3561
+ #
3562
+ # # Call the delete_prediction_result method.
3563
+ # result = client.delete_prediction_result request
3564
+ #
3565
+ # # The returned object is of type Gapic::Operation. You can use it to
3566
+ # # check the status of an operation, cancel it, or wait for results.
3567
+ # # Here is how to wait for a response.
3568
+ # result.wait_until_done! timeout: 60
3569
+ # if result.response?
3570
+ # p result.response
3571
+ # else
3572
+ # puts "No response received."
3573
+ # end
3574
+ #
3575
+ def delete_prediction_result request, options = nil
3576
+ raise ::ArgumentError, "request must be provided" if request.nil?
3577
+
3578
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest
3579
+
3580
+ # Converts hash and nil to an options object
3581
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3582
+
3583
+ # Customize the options with defaults
3584
+ metadata = @config.rpcs.delete_prediction_result.metadata.to_h
3585
+
3586
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3587
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3588
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3589
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
3590
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3591
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3592
+
3593
+ header_params = {}
3594
+ if request.name
3595
+ header_params["name"] = request.name
3596
+ end
3597
+
3598
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3599
+ metadata[:"x-goog-request-params"] ||= request_params_header
3600
+
3601
+ options.apply_defaults timeout: @config.rpcs.delete_prediction_result.timeout,
3602
+ metadata: metadata,
3603
+ retry_policy: @config.rpcs.delete_prediction_result.retry_policy
3604
+
3605
+ options.apply_defaults timeout: @config.timeout,
3606
+ metadata: @config.metadata,
3607
+ retry_policy: @config.retry_policy
3608
+
3609
+ @aml_stub.call_rpc :delete_prediction_result, request, options: options do |response, operation|
3610
+ response = ::Gapic::Operation.new response, @operations_client, options: options
3611
+ yield response, operation if block_given?
3612
+ throw :response, response
3613
+ end
3614
+ rescue ::GRPC::BadStatus => e
3615
+ raise ::Google::Cloud::Error.from_error(e)
3616
+ end
3617
+
3618
+ ##
3619
+ # List BacktestResults.
3620
+ #
3621
+ # @overload list_backtest_results(request, options = nil)
3622
+ # Pass arguments to `list_backtest_results` via a request object, either of type
3623
+ # {::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest} or an equivalent Hash.
3624
+ #
3625
+ # @param request [::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest, ::Hash]
3626
+ # A request object representing the call parameters. Required. To specify no
3627
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3628
+ # @param options [::Gapic::CallOptions, ::Hash]
3629
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3630
+ #
3631
+ # @overload list_backtest_results(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
3632
+ # Pass arguments to `list_backtest_results` via keyword arguments. Note that at
3633
+ # least one keyword argument is required. To specify no parameters, or to keep all
3634
+ # the default parameter values, pass an empty Hash as a request object (see above).
3635
+ #
3636
+ # @param parent [::String]
3637
+ # Required. The parent of the BacktestResult is the Instance.
3638
+ # @param page_size [::Integer]
3639
+ # The number of resources to be included in the response. The response
3640
+ # contains a next_page_token, which can be used to retrieve the next page of
3641
+ # resources.
3642
+ # @param page_token [::String]
3643
+ # In case of paginated results, this is the token that was returned in the
3644
+ # previous ListBacktestResultsResponse. It should be copied here to
3645
+ # retrieve the next page of resources. Empty will give the first page of
3646
+ # ListBacktestResultsRequest, and the last page will return an empty
3647
+ # page_token.
3648
+ # @param filter [::String]
3649
+ # Specify a filter to narrow search results.
3650
+ # @param order_by [::String]
3651
+ # Specify a field to use for ordering.
3652
+ #
3653
+ # @yield [response, operation] Access the result along with the RPC operation
3654
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::BacktestResult>]
3655
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3656
+ #
3657
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::BacktestResult>]
3658
+ #
3659
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3660
+ #
3661
+ # @example Basic example
3662
+ # require "google/cloud/financial_services/v1"
3663
+ #
3664
+ # # Create a client object. The client can be reused for multiple calls.
3665
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
3666
+ #
3667
+ # # Create a request. To set request fields, pass in keyword arguments.
3668
+ # request = Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest.new
3669
+ #
3670
+ # # Call the list_backtest_results method.
3671
+ # result = client.list_backtest_results request
3672
+ #
3673
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
3674
+ # # over elements, and API calls will be issued to fetch pages as needed.
3675
+ # result.each do |item|
3676
+ # # Each element is of type ::Google::Cloud::FinancialServices::V1::BacktestResult.
3677
+ # p item
3678
+ # end
3679
+ #
3680
+ def list_backtest_results request, options = nil
3681
+ raise ::ArgumentError, "request must be provided" if request.nil?
3682
+
3683
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest
3684
+
3685
+ # Converts hash and nil to an options object
3686
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3687
+
3688
+ # Customize the options with defaults
3689
+ metadata = @config.rpcs.list_backtest_results.metadata.to_h
3690
+
3691
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3692
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3693
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3694
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
3695
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3696
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3697
+
3698
+ header_params = {}
3699
+ if request.parent
3700
+ header_params["parent"] = request.parent
3701
+ end
3702
+
3703
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3704
+ metadata[:"x-goog-request-params"] ||= request_params_header
3705
+
3706
+ options.apply_defaults timeout: @config.rpcs.list_backtest_results.timeout,
3707
+ metadata: metadata,
3708
+ retry_policy: @config.rpcs.list_backtest_results.retry_policy
3709
+
3710
+ options.apply_defaults timeout: @config.timeout,
3711
+ metadata: @config.metadata,
3712
+ retry_policy: @config.retry_policy
3713
+
3714
+ @aml_stub.call_rpc :list_backtest_results, request, options: options do |response, operation|
3715
+ response = ::Gapic::PagedEnumerable.new @aml_stub, :list_backtest_results, request, response, operation, options
3716
+ yield response, operation if block_given?
3717
+ throw :response, response
3718
+ end
3719
+ rescue ::GRPC::BadStatus => e
3720
+ raise ::Google::Cloud::Error.from_error(e)
3721
+ end
3722
+
3723
+ ##
3724
+ # Gets a BacktestResult.
3725
+ #
3726
+ # @overload get_backtest_result(request, options = nil)
3727
+ # Pass arguments to `get_backtest_result` via a request object, either of type
3728
+ # {::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest} or an equivalent Hash.
3729
+ #
3730
+ # @param request [::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest, ::Hash]
3731
+ # A request object representing the call parameters. Required. To specify no
3732
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3733
+ # @param options [::Gapic::CallOptions, ::Hash]
3734
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3735
+ #
3736
+ # @overload get_backtest_result(name: nil)
3737
+ # Pass arguments to `get_backtest_result` via keyword arguments. Note that at
3738
+ # least one keyword argument is required. To specify no parameters, or to keep all
3739
+ # the default parameter values, pass an empty Hash as a request object (see above).
3740
+ #
3741
+ # @param name [::String]
3742
+ # Required. The resource name of the BacktestResult
3743
+ #
3744
+ # @yield [response, operation] Access the result along with the RPC operation
3745
+ # @yieldparam response [::Google::Cloud::FinancialServices::V1::BacktestResult]
3746
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3747
+ #
3748
+ # @return [::Google::Cloud::FinancialServices::V1::BacktestResult]
3749
+ #
3750
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3751
+ #
3752
+ # @example Basic example
3753
+ # require "google/cloud/financial_services/v1"
3754
+ #
3755
+ # # Create a client object. The client can be reused for multiple calls.
3756
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
3757
+ #
3758
+ # # Create a request. To set request fields, pass in keyword arguments.
3759
+ # request = Google::Cloud::FinancialServices::V1::GetBacktestResultRequest.new
3760
+ #
3761
+ # # Call the get_backtest_result method.
3762
+ # result = client.get_backtest_result request
3763
+ #
3764
+ # # The returned object is of type Google::Cloud::FinancialServices::V1::BacktestResult.
3765
+ # p result
3766
+ #
3767
+ def get_backtest_result request, options = nil
3768
+ raise ::ArgumentError, "request must be provided" if request.nil?
3769
+
3770
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest
3771
+
3772
+ # Converts hash and nil to an options object
3773
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3774
+
3775
+ # Customize the options with defaults
3776
+ metadata = @config.rpcs.get_backtest_result.metadata.to_h
3777
+
3778
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3779
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3780
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3781
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
3782
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3783
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3784
+
3785
+ header_params = {}
3786
+ if request.name
3787
+ header_params["name"] = request.name
3788
+ end
3789
+
3790
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3791
+ metadata[:"x-goog-request-params"] ||= request_params_header
3792
+
3793
+ options.apply_defaults timeout: @config.rpcs.get_backtest_result.timeout,
3794
+ metadata: metadata,
3795
+ retry_policy: @config.rpcs.get_backtest_result.retry_policy
3796
+
3797
+ options.apply_defaults timeout: @config.timeout,
3798
+ metadata: @config.metadata,
3799
+ retry_policy: @config.retry_policy
3800
+
3801
+ @aml_stub.call_rpc :get_backtest_result, request, options: options do |response, operation|
3802
+ yield response, operation if block_given?
3803
+ end
3804
+ rescue ::GRPC::BadStatus => e
3805
+ raise ::Google::Cloud::Error.from_error(e)
3806
+ end
3807
+
3808
+ ##
3809
+ # Create a BacktestResult.
3810
+ #
3811
+ # @overload create_backtest_result(request, options = nil)
3812
+ # Pass arguments to `create_backtest_result` via a request object, either of type
3813
+ # {::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest} or an equivalent Hash.
3814
+ #
3815
+ # @param request [::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest, ::Hash]
3816
+ # A request object representing the call parameters. Required. To specify no
3817
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3818
+ # @param options [::Gapic::CallOptions, ::Hash]
3819
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3820
+ #
3821
+ # @overload create_backtest_result(parent: nil, backtest_result_id: nil, backtest_result: nil, request_id: nil)
3822
+ # Pass arguments to `create_backtest_result` via keyword arguments. Note that at
3823
+ # least one keyword argument is required. To specify no parameters, or to keep all
3824
+ # the default parameter values, pass an empty Hash as a request object (see above).
3825
+ #
3826
+ # @param parent [::String]
3827
+ # Required. The parent of the BacktestResult is the Instance.
3828
+ # @param backtest_result_id [::String]
3829
+ # Required. The resource id of the BacktestResult
3830
+ # @param backtest_result [::Google::Cloud::FinancialServices::V1::BacktestResult, ::Hash]
3831
+ # Required. The BacktestResult that will be created.
3832
+ # @param request_id [::String]
3833
+ # Optional. An optional request ID to identify requests. Specify a unique
3834
+ # request ID so that if you must retry your request, the server will know to
3835
+ # ignore the request if it has already been completed. The server will
3836
+ # guarantee that for at least 60 minutes since the first request.
3837
+ #
3838
+ # For example, consider a situation where you make an initial request and the
3839
+ # request times out. If you make the request again with the same request
3840
+ # ID, the server can check if original operation with the same request ID
3841
+ # was received, and if so, will ignore the second request. This prevents
3842
+ # clients from accidentally creating duplicate commitments.
3843
+ #
3844
+ # The request ID must be a valid UUID with the exception that zero UUID is
3845
+ # not supported (00000000-0000-0000-0000-000000000000).
3846
+ #
3847
+ # @yield [response, operation] Access the result along with the RPC operation
3848
+ # @yieldparam response [::Gapic::Operation]
3849
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3850
+ #
3851
+ # @return [::Gapic::Operation]
3852
+ #
3853
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3854
+ #
3855
+ # @example Basic example
3856
+ # require "google/cloud/financial_services/v1"
3857
+ #
3858
+ # # Create a client object. The client can be reused for multiple calls.
3859
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
3860
+ #
3861
+ # # Create a request. To set request fields, pass in keyword arguments.
3862
+ # request = Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest.new
3863
+ #
3864
+ # # Call the create_backtest_result method.
3865
+ # result = client.create_backtest_result request
3866
+ #
3867
+ # # The returned object is of type Gapic::Operation. You can use it to
3868
+ # # check the status of an operation, cancel it, or wait for results.
3869
+ # # Here is how to wait for a response.
3870
+ # result.wait_until_done! timeout: 60
3871
+ # if result.response?
3872
+ # p result.response
3873
+ # else
3874
+ # puts "No response received."
3875
+ # end
3876
+ #
3877
+ def create_backtest_result request, options = nil
3878
+ raise ::ArgumentError, "request must be provided" if request.nil?
3879
+
3880
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest
3881
+
3882
+ # Converts hash and nil to an options object
3883
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3884
+
3885
+ # Customize the options with defaults
3886
+ metadata = @config.rpcs.create_backtest_result.metadata.to_h
3887
+
3888
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
3889
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3890
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3891
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
3892
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
3893
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3894
+
3895
+ header_params = {}
3896
+ if request.parent
3897
+ header_params["parent"] = request.parent
3898
+ end
3899
+
3900
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
3901
+ metadata[:"x-goog-request-params"] ||= request_params_header
3902
+
3903
+ options.apply_defaults timeout: @config.rpcs.create_backtest_result.timeout,
3904
+ metadata: metadata,
3905
+ retry_policy: @config.rpcs.create_backtest_result.retry_policy
3906
+
3907
+ options.apply_defaults timeout: @config.timeout,
3908
+ metadata: @config.metadata,
3909
+ retry_policy: @config.retry_policy
3910
+
3911
+ @aml_stub.call_rpc :create_backtest_result, request, options: options do |response, operation|
3912
+ response = ::Gapic::Operation.new response, @operations_client, options: options
3913
+ yield response, operation if block_given?
3914
+ throw :response, response
3915
+ end
3916
+ rescue ::GRPC::BadStatus => e
3917
+ raise ::Google::Cloud::Error.from_error(e)
3918
+ end
3919
+
3920
+ ##
3921
+ # Updates the parameters of a single BacktestResult.
3922
+ #
3923
+ # @overload update_backtest_result(request, options = nil)
3924
+ # Pass arguments to `update_backtest_result` via a request object, either of type
3925
+ # {::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest} or an equivalent Hash.
3926
+ #
3927
+ # @param request [::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest, ::Hash]
3928
+ # A request object representing the call parameters. Required. To specify no
3929
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3930
+ # @param options [::Gapic::CallOptions, ::Hash]
3931
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
3932
+ #
3933
+ # @overload update_backtest_result(update_mask: nil, backtest_result: nil, request_id: nil)
3934
+ # Pass arguments to `update_backtest_result` via keyword arguments. Note that at
3935
+ # least one keyword argument is required. To specify no parameters, or to keep all
3936
+ # the default parameter values, pass an empty Hash as a request object (see above).
3937
+ #
3938
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3939
+ # Optional. Field mask is used to specify the fields to be overwritten in the
3940
+ # BacktestResult resource by the update.
3941
+ # The fields specified in the update_mask are relative to the resource, not
3942
+ # the full request. A field will be overwritten if it is in the mask. If the
3943
+ # user does not provide a mask then all fields will be overwritten.
3944
+ # @param backtest_result [::Google::Cloud::FinancialServices::V1::BacktestResult, ::Hash]
3945
+ # Required. The new value of the BacktestResult fields that will be updated
3946
+ # according to the update_mask.
3947
+ # @param request_id [::String]
3948
+ # Optional. An optional request ID to identify requests. Specify a unique
3949
+ # request ID so that if you must retry your request, the server will know to
3950
+ # ignore the request if it has already been completed. The server will
3951
+ # guarantee that for at least 60 minutes since the first request.
3952
+ #
3953
+ # For example, consider a situation where you make an initial request and the
3954
+ # request times out. If you make the request again with the same request
3955
+ # ID, the server can check if original operation with the same request ID
3956
+ # was received, and if so, will ignore the second request. This prevents
3957
+ # clients from accidentally creating duplicate commitments.
3958
+ #
3959
+ # The request ID must be a valid UUID with the exception that zero UUID is
3960
+ # not supported (00000000-0000-0000-0000-000000000000).
3961
+ #
3962
+ # @yield [response, operation] Access the result along with the RPC operation
3963
+ # @yieldparam response [::Gapic::Operation]
3964
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
3965
+ #
3966
+ # @return [::Gapic::Operation]
3967
+ #
3968
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
3969
+ #
3970
+ # @example Basic example
3971
+ # require "google/cloud/financial_services/v1"
3972
+ #
3973
+ # # Create a client object. The client can be reused for multiple calls.
3974
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
3975
+ #
3976
+ # # Create a request. To set request fields, pass in keyword arguments.
3977
+ # request = Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest.new
3978
+ #
3979
+ # # Call the update_backtest_result method.
3980
+ # result = client.update_backtest_result request
3981
+ #
3982
+ # # The returned object is of type Gapic::Operation. You can use it to
3983
+ # # check the status of an operation, cancel it, or wait for results.
3984
+ # # Here is how to wait for a response.
3985
+ # result.wait_until_done! timeout: 60
3986
+ # if result.response?
3987
+ # p result.response
3988
+ # else
3989
+ # puts "No response received."
3990
+ # end
3991
+ #
3992
+ def update_backtest_result request, options = nil
3993
+ raise ::ArgumentError, "request must be provided" if request.nil?
3994
+
3995
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest
3996
+
3997
+ # Converts hash and nil to an options object
3998
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3999
+
4000
+ # Customize the options with defaults
4001
+ metadata = @config.rpcs.update_backtest_result.metadata.to_h
4002
+
4003
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4004
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4005
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4006
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
4007
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4008
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4009
+
4010
+ header_params = {}
4011
+ if request.backtest_result&.name
4012
+ header_params["backtest_result.name"] = request.backtest_result.name
4013
+ end
4014
+
4015
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
4016
+ metadata[:"x-goog-request-params"] ||= request_params_header
4017
+
4018
+ options.apply_defaults timeout: @config.rpcs.update_backtest_result.timeout,
4019
+ metadata: metadata,
4020
+ retry_policy: @config.rpcs.update_backtest_result.retry_policy
4021
+
4022
+ options.apply_defaults timeout: @config.timeout,
4023
+ metadata: @config.metadata,
4024
+ retry_policy: @config.retry_policy
4025
+
4026
+ @aml_stub.call_rpc :update_backtest_result, request, options: options do |response, operation|
4027
+ response = ::Gapic::Operation.new response, @operations_client, options: options
4028
+ yield response, operation if block_given?
4029
+ throw :response, response
4030
+ end
4031
+ rescue ::GRPC::BadStatus => e
4032
+ raise ::Google::Cloud::Error.from_error(e)
4033
+ end
4034
+
4035
+ ##
4036
+ # Export governance information for a BacktestResult resource. For
4037
+ # information on the exported fields, see
4038
+ # [AML output data
4039
+ # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#backtest-results).
4040
+ #
4041
+ # @overload export_backtest_result_metadata(request, options = nil)
4042
+ # Pass arguments to `export_backtest_result_metadata` via a request object, either of type
4043
+ # {::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest} or an equivalent Hash.
4044
+ #
4045
+ # @param request [::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest, ::Hash]
4046
+ # A request object representing the call parameters. Required. To specify no
4047
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4048
+ # @param options [::Gapic::CallOptions, ::Hash]
4049
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
4050
+ #
4051
+ # @overload export_backtest_result_metadata(backtest_result: nil, structured_metadata_destination: nil)
4052
+ # Pass arguments to `export_backtest_result_metadata` via keyword arguments. Note that at
4053
+ # least one keyword argument is required. To specify no parameters, or to keep all
4054
+ # the default parameter values, pass an empty Hash as a request object (see above).
4055
+ #
4056
+ # @param backtest_result [::String]
4057
+ # Required. The resource name of the BacktestResult.
4058
+ # @param structured_metadata_destination [::Google::Cloud::FinancialServices::V1::BigQueryDestination, ::Hash]
4059
+ # Required. BigQuery output where the metadata will be written.
4060
+ #
4061
+ # @yield [response, operation] Access the result along with the RPC operation
4062
+ # @yieldparam response [::Gapic::Operation]
4063
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
4064
+ #
4065
+ # @return [::Gapic::Operation]
4066
+ #
4067
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
4068
+ #
4069
+ # @example Basic example
4070
+ # require "google/cloud/financial_services/v1"
4071
+ #
4072
+ # # Create a client object. The client can be reused for multiple calls.
4073
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
4074
+ #
4075
+ # # Create a request. To set request fields, pass in keyword arguments.
4076
+ # request = Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest.new
4077
+ #
4078
+ # # Call the export_backtest_result_metadata method.
4079
+ # result = client.export_backtest_result_metadata request
4080
+ #
4081
+ # # The returned object is of type Gapic::Operation. You can use it to
4082
+ # # check the status of an operation, cancel it, or wait for results.
4083
+ # # Here is how to wait for a response.
4084
+ # result.wait_until_done! timeout: 60
4085
+ # if result.response?
4086
+ # p result.response
4087
+ # else
4088
+ # puts "No response received."
4089
+ # end
4090
+ #
4091
+ def export_backtest_result_metadata request, options = nil
4092
+ raise ::ArgumentError, "request must be provided" if request.nil?
4093
+
4094
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest
4095
+
4096
+ # Converts hash and nil to an options object
4097
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4098
+
4099
+ # Customize the options with defaults
4100
+ metadata = @config.rpcs.export_backtest_result_metadata.metadata.to_h
4101
+
4102
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4103
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4104
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4105
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
4106
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4107
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4108
+
4109
+ header_params = {}
4110
+ if request.backtest_result
4111
+ header_params["backtest_result"] = request.backtest_result
4112
+ end
4113
+
4114
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
4115
+ metadata[:"x-goog-request-params"] ||= request_params_header
4116
+
4117
+ options.apply_defaults timeout: @config.rpcs.export_backtest_result_metadata.timeout,
4118
+ metadata: metadata,
4119
+ retry_policy: @config.rpcs.export_backtest_result_metadata.retry_policy
4120
+
4121
+ options.apply_defaults timeout: @config.timeout,
4122
+ metadata: @config.metadata,
4123
+ retry_policy: @config.retry_policy
4124
+
4125
+ @aml_stub.call_rpc :export_backtest_result_metadata, request, options: options do |response, operation|
4126
+ response = ::Gapic::Operation.new response, @operations_client, options: options
4127
+ yield response, operation if block_given?
4128
+ throw :response, response
4129
+ end
4130
+ rescue ::GRPC::BadStatus => e
4131
+ raise ::Google::Cloud::Error.from_error(e)
4132
+ end
4133
+
4134
+ ##
4135
+ # Deletes a BacktestResult.
4136
+ #
4137
+ # @overload delete_backtest_result(request, options = nil)
4138
+ # Pass arguments to `delete_backtest_result` via a request object, either of type
4139
+ # {::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest} or an equivalent Hash.
4140
+ #
4141
+ # @param request [::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest, ::Hash]
4142
+ # A request object representing the call parameters. Required. To specify no
4143
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
4144
+ # @param options [::Gapic::CallOptions, ::Hash]
4145
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
4146
+ #
4147
+ # @overload delete_backtest_result(name: nil, request_id: nil)
4148
+ # Pass arguments to `delete_backtest_result` via keyword arguments. Note that at
4149
+ # least one keyword argument is required. To specify no parameters, or to keep all
4150
+ # the default parameter values, pass an empty Hash as a request object (see above).
4151
+ #
4152
+ # @param name [::String]
4153
+ # Required. The resource name of the BacktestResult.
4154
+ # @param request_id [::String]
4155
+ # Optional. An optional request ID to identify requests. Specify a unique
4156
+ # request ID so that if you must retry your request, the server will know to
4157
+ # ignore the request if it has already been completed. The server will
4158
+ # guarantee that for at least 60 minutes after the first request.
4159
+ #
4160
+ # For example, consider a situation where you make an initial request and the
4161
+ # request times out. If you make the request again with the same request
4162
+ # ID, the server can check if original operation with the same request ID
4163
+ # was received, and if so, will ignore the second request. This prevents
4164
+ # clients from accidentally creating duplicate commitments.
4165
+ #
4166
+ # The request ID must be a valid UUID with the exception that zero UUID is
4167
+ # not supported (00000000-0000-0000-0000-000000000000).
4168
+ #
4169
+ # @yield [response, operation] Access the result along with the RPC operation
4170
+ # @yieldparam response [::Gapic::Operation]
4171
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
4172
+ #
4173
+ # @return [::Gapic::Operation]
4174
+ #
4175
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
4176
+ #
4177
+ # @example Basic example
4178
+ # require "google/cloud/financial_services/v1"
4179
+ #
4180
+ # # Create a client object. The client can be reused for multiple calls.
4181
+ # client = Google::Cloud::FinancialServices::V1::AML::Client.new
4182
+ #
4183
+ # # Create a request. To set request fields, pass in keyword arguments.
4184
+ # request = Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest.new
4185
+ #
4186
+ # # Call the delete_backtest_result method.
4187
+ # result = client.delete_backtest_result request
4188
+ #
4189
+ # # The returned object is of type Gapic::Operation. You can use it to
4190
+ # # check the status of an operation, cancel it, or wait for results.
4191
+ # # Here is how to wait for a response.
4192
+ # result.wait_until_done! timeout: 60
4193
+ # if result.response?
4194
+ # p result.response
4195
+ # else
4196
+ # puts "No response received."
4197
+ # end
4198
+ #
4199
+ def delete_backtest_result request, options = nil
4200
+ raise ::ArgumentError, "request must be provided" if request.nil?
4201
+
4202
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest
4203
+
4204
+ # Converts hash and nil to an options object
4205
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
4206
+
4207
+ # Customize the options with defaults
4208
+ metadata = @config.rpcs.delete_backtest_result.metadata.to_h
4209
+
4210
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
4211
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
4212
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
4213
+ gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION
4214
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
4215
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
4216
+
4217
+ header_params = {}
4218
+ if request.name
4219
+ header_params["name"] = request.name
4220
+ end
4221
+
4222
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
4223
+ metadata[:"x-goog-request-params"] ||= request_params_header
4224
+
4225
+ options.apply_defaults timeout: @config.rpcs.delete_backtest_result.timeout,
4226
+ metadata: metadata,
4227
+ retry_policy: @config.rpcs.delete_backtest_result.retry_policy
4228
+
4229
+ options.apply_defaults timeout: @config.timeout,
4230
+ metadata: @config.metadata,
4231
+ retry_policy: @config.retry_policy
4232
+
4233
+ @aml_stub.call_rpc :delete_backtest_result, request, options: options do |response, operation|
4234
+ response = ::Gapic::Operation.new response, @operations_client, options: options
4235
+ yield response, operation if block_given?
4236
+ throw :response, response
4237
+ end
4238
+ rescue ::GRPC::BadStatus => e
4239
+ raise ::Google::Cloud::Error.from_error(e)
4240
+ end
4241
+
4242
+ ##
4243
+ # Configuration class for the AML API.
4244
+ #
4245
+ # This class represents the configuration for AML,
4246
+ # providing control over timeouts, retry behavior, logging, transport
4247
+ # parameters, and other low-level controls. Certain parameters can also be
4248
+ # applied individually to specific RPCs. See
4249
+ # {::Google::Cloud::FinancialServices::V1::AML::Client::Configuration::Rpcs}
4250
+ # for a list of RPCs that can be configured independently.
4251
+ #
4252
+ # Configuration can be applied globally to all clients, or to a single client
4253
+ # on construction.
4254
+ #
4255
+ # @example
4256
+ #
4257
+ # # Modify the global config, setting the timeout for
4258
+ # # list_instances to 20 seconds,
4259
+ # # and all remaining timeouts to 10 seconds.
4260
+ # ::Google::Cloud::FinancialServices::V1::AML::Client.configure do |config|
4261
+ # config.timeout = 10.0
4262
+ # config.rpcs.list_instances.timeout = 20.0
4263
+ # end
4264
+ #
4265
+ # # Apply the above configuration only to a new client.
4266
+ # client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config|
4267
+ # config.timeout = 10.0
4268
+ # config.rpcs.list_instances.timeout = 20.0
4269
+ # end
4270
+ #
4271
+ # @!attribute [rw] endpoint
4272
+ # A custom service endpoint, as a hostname or hostname:port. The default is
4273
+ # nil, indicating to use the default endpoint in the current universe domain.
4274
+ # @return [::String,nil]
4275
+ # @!attribute [rw] credentials
4276
+ # Credentials to send with calls. You may provide any of the following types:
4277
+ # * (`String`) The path to a service account key file in JSON format
4278
+ # * (`Hash`) A service account key as a Hash
4279
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
4280
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
4281
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
4282
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
4283
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
4284
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
4285
+ # * (`nil`) indicating no credentials
4286
+ #
4287
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
4288
+ # external source for authentication to Google Cloud, you must validate it before
4289
+ # providing it to a Google API client library. Providing an unvalidated credential
4290
+ # configuration to Google APIs can compromise the security of your systems and data.
4291
+ # For more information, refer to [Validate credential configurations from external
4292
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
4293
+ # @return [::Object]
4294
+ # @!attribute [rw] scope
4295
+ # The OAuth scopes
4296
+ # @return [::Array<::String>]
4297
+ # @!attribute [rw] lib_name
4298
+ # The library name as recorded in instrumentation and logging
4299
+ # @return [::String]
4300
+ # @!attribute [rw] lib_version
4301
+ # The library version as recorded in instrumentation and logging
4302
+ # @return [::String]
4303
+ # @!attribute [rw] channel_args
4304
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
4305
+ # `GRPC::Core::Channel` object is provided as the credential.
4306
+ # @return [::Hash]
4307
+ # @!attribute [rw] interceptors
4308
+ # An array of interceptors that are run before calls are executed.
4309
+ # @return [::Array<::GRPC::ClientInterceptor>]
4310
+ # @!attribute [rw] timeout
4311
+ # The call timeout in seconds.
4312
+ # @return [::Numeric]
4313
+ # @!attribute [rw] metadata
4314
+ # Additional gRPC headers to be sent with the call.
4315
+ # @return [::Hash{::Symbol=>::String}]
4316
+ # @!attribute [rw] retry_policy
4317
+ # The retry policy. The value is a hash with the following keys:
4318
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
4319
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
4320
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
4321
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
4322
+ # trigger a retry.
4323
+ # @return [::Hash]
4324
+ # @!attribute [rw] quota_project
4325
+ # A separate project against which to charge quota.
4326
+ # @return [::String]
4327
+ # @!attribute [rw] universe_domain
4328
+ # The universe domain within which to make requests. This determines the
4329
+ # default endpoint URL. The default value of nil uses the environment
4330
+ # universe (usually the default "googleapis.com" universe).
4331
+ # @return [::String,nil]
4332
+ # @!attribute [rw] logger
4333
+ # A custom logger to use for request/response debug logging, or the value
4334
+ # `:default` (the default) to construct a default logger, or `nil` to
4335
+ # explicitly disable logging.
4336
+ # @return [::Logger,:default,nil]
4337
+ #
4338
+ class Configuration
4339
+ extend ::Gapic::Config
4340
+
4341
+ # @private
4342
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
4343
+ DEFAULT_ENDPOINT = "financialservices.googleapis.com"
4344
+
4345
+ config_attr :endpoint, nil, ::String, nil
4346
+ config_attr :credentials, nil do |value|
4347
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
4348
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
4349
+ allowed.any? { |klass| klass === value }
4350
+ end
4351
+ config_attr :scope, nil, ::String, ::Array, nil
4352
+ config_attr :lib_name, nil, ::String, nil
4353
+ config_attr :lib_version, nil, ::String, nil
4354
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
4355
+ config_attr :interceptors, nil, ::Array, nil
4356
+ config_attr :timeout, nil, ::Numeric, nil
4357
+ config_attr :metadata, nil, ::Hash, nil
4358
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
4359
+ config_attr :quota_project, nil, ::String, nil
4360
+ config_attr :universe_domain, nil, ::String, nil
4361
+ config_attr :logger, :default, ::Logger, nil, :default
4362
+
4363
+ # @private
4364
+ def initialize parent_config = nil
4365
+ @parent_config = parent_config unless parent_config.nil?
4366
+
4367
+ yield self if block_given?
4368
+ end
4369
+
4370
+ ##
4371
+ # Configurations for individual RPCs
4372
+ # @return [Rpcs]
4373
+ #
4374
+ def rpcs
4375
+ @rpcs ||= begin
4376
+ parent_rpcs = nil
4377
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
4378
+ Rpcs.new parent_rpcs
4379
+ end
4380
+ end
4381
+
4382
+ ##
4383
+ # Configuration for the channel pool
4384
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
4385
+ #
4386
+ def channel_pool
4387
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
4388
+ end
4389
+
4390
+ ##
4391
+ # Configuration RPC class for the AML API.
4392
+ #
4393
+ # Includes fields providing the configuration for each RPC in this service.
4394
+ # Each configuration object is of type `Gapic::Config::Method` and includes
4395
+ # the following configuration fields:
4396
+ #
4397
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
4398
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
4399
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
4400
+ # include the following keys:
4401
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
4402
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
4403
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
4404
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
4405
+ # trigger a retry.
4406
+ #
4407
+ class Rpcs
4408
+ ##
4409
+ # RPC-specific configuration for `list_instances`
4410
+ # @return [::Gapic::Config::Method]
4411
+ #
4412
+ attr_reader :list_instances
4413
+ ##
4414
+ # RPC-specific configuration for `get_instance`
4415
+ # @return [::Gapic::Config::Method]
4416
+ #
4417
+ attr_reader :get_instance
4418
+ ##
4419
+ # RPC-specific configuration for `create_instance`
4420
+ # @return [::Gapic::Config::Method]
4421
+ #
4422
+ attr_reader :create_instance
4423
+ ##
4424
+ # RPC-specific configuration for `update_instance`
4425
+ # @return [::Gapic::Config::Method]
4426
+ #
4427
+ attr_reader :update_instance
4428
+ ##
4429
+ # RPC-specific configuration for `delete_instance`
4430
+ # @return [::Gapic::Config::Method]
4431
+ #
4432
+ attr_reader :delete_instance
4433
+ ##
4434
+ # RPC-specific configuration for `import_registered_parties`
4435
+ # @return [::Gapic::Config::Method]
4436
+ #
4437
+ attr_reader :import_registered_parties
4438
+ ##
4439
+ # RPC-specific configuration for `export_registered_parties`
4440
+ # @return [::Gapic::Config::Method]
4441
+ #
4442
+ attr_reader :export_registered_parties
4443
+ ##
4444
+ # RPC-specific configuration for `list_datasets`
4445
+ # @return [::Gapic::Config::Method]
4446
+ #
4447
+ attr_reader :list_datasets
4448
+ ##
4449
+ # RPC-specific configuration for `get_dataset`
4450
+ # @return [::Gapic::Config::Method]
4451
+ #
4452
+ attr_reader :get_dataset
4453
+ ##
4454
+ # RPC-specific configuration for `create_dataset`
4455
+ # @return [::Gapic::Config::Method]
4456
+ #
4457
+ attr_reader :create_dataset
4458
+ ##
4459
+ # RPC-specific configuration for `update_dataset`
4460
+ # @return [::Gapic::Config::Method]
4461
+ #
4462
+ attr_reader :update_dataset
4463
+ ##
4464
+ # RPC-specific configuration for `delete_dataset`
4465
+ # @return [::Gapic::Config::Method]
4466
+ #
4467
+ attr_reader :delete_dataset
4468
+ ##
4469
+ # RPC-specific configuration for `list_models`
4470
+ # @return [::Gapic::Config::Method]
4471
+ #
4472
+ attr_reader :list_models
4473
+ ##
4474
+ # RPC-specific configuration for `get_model`
4475
+ # @return [::Gapic::Config::Method]
4476
+ #
4477
+ attr_reader :get_model
4478
+ ##
4479
+ # RPC-specific configuration for `create_model`
4480
+ # @return [::Gapic::Config::Method]
4481
+ #
4482
+ attr_reader :create_model
4483
+ ##
4484
+ # RPC-specific configuration for `update_model`
4485
+ # @return [::Gapic::Config::Method]
4486
+ #
4487
+ attr_reader :update_model
4488
+ ##
4489
+ # RPC-specific configuration for `export_model_metadata`
4490
+ # @return [::Gapic::Config::Method]
4491
+ #
4492
+ attr_reader :export_model_metadata
4493
+ ##
4494
+ # RPC-specific configuration for `delete_model`
4495
+ # @return [::Gapic::Config::Method]
4496
+ #
4497
+ attr_reader :delete_model
4498
+ ##
4499
+ # RPC-specific configuration for `list_engine_configs`
4500
+ # @return [::Gapic::Config::Method]
4501
+ #
4502
+ attr_reader :list_engine_configs
4503
+ ##
4504
+ # RPC-specific configuration for `get_engine_config`
4505
+ # @return [::Gapic::Config::Method]
4506
+ #
4507
+ attr_reader :get_engine_config
4508
+ ##
4509
+ # RPC-specific configuration for `create_engine_config`
4510
+ # @return [::Gapic::Config::Method]
4511
+ #
4512
+ attr_reader :create_engine_config
4513
+ ##
4514
+ # RPC-specific configuration for `update_engine_config`
4515
+ # @return [::Gapic::Config::Method]
4516
+ #
4517
+ attr_reader :update_engine_config
4518
+ ##
4519
+ # RPC-specific configuration for `export_engine_config_metadata`
4520
+ # @return [::Gapic::Config::Method]
4521
+ #
4522
+ attr_reader :export_engine_config_metadata
4523
+ ##
4524
+ # RPC-specific configuration for `delete_engine_config`
4525
+ # @return [::Gapic::Config::Method]
4526
+ #
4527
+ attr_reader :delete_engine_config
4528
+ ##
4529
+ # RPC-specific configuration for `get_engine_version`
4530
+ # @return [::Gapic::Config::Method]
4531
+ #
4532
+ attr_reader :get_engine_version
4533
+ ##
4534
+ # RPC-specific configuration for `list_engine_versions`
4535
+ # @return [::Gapic::Config::Method]
4536
+ #
4537
+ attr_reader :list_engine_versions
4538
+ ##
4539
+ # RPC-specific configuration for `list_prediction_results`
4540
+ # @return [::Gapic::Config::Method]
4541
+ #
4542
+ attr_reader :list_prediction_results
4543
+ ##
4544
+ # RPC-specific configuration for `get_prediction_result`
4545
+ # @return [::Gapic::Config::Method]
4546
+ #
4547
+ attr_reader :get_prediction_result
4548
+ ##
4549
+ # RPC-specific configuration for `create_prediction_result`
4550
+ # @return [::Gapic::Config::Method]
4551
+ #
4552
+ attr_reader :create_prediction_result
4553
+ ##
4554
+ # RPC-specific configuration for `update_prediction_result`
4555
+ # @return [::Gapic::Config::Method]
4556
+ #
4557
+ attr_reader :update_prediction_result
4558
+ ##
4559
+ # RPC-specific configuration for `export_prediction_result_metadata`
4560
+ # @return [::Gapic::Config::Method]
4561
+ #
4562
+ attr_reader :export_prediction_result_metadata
4563
+ ##
4564
+ # RPC-specific configuration for `delete_prediction_result`
4565
+ # @return [::Gapic::Config::Method]
4566
+ #
4567
+ attr_reader :delete_prediction_result
4568
+ ##
4569
+ # RPC-specific configuration for `list_backtest_results`
4570
+ # @return [::Gapic::Config::Method]
4571
+ #
4572
+ attr_reader :list_backtest_results
4573
+ ##
4574
+ # RPC-specific configuration for `get_backtest_result`
4575
+ # @return [::Gapic::Config::Method]
4576
+ #
4577
+ attr_reader :get_backtest_result
4578
+ ##
4579
+ # RPC-specific configuration for `create_backtest_result`
4580
+ # @return [::Gapic::Config::Method]
4581
+ #
4582
+ attr_reader :create_backtest_result
4583
+ ##
4584
+ # RPC-specific configuration for `update_backtest_result`
4585
+ # @return [::Gapic::Config::Method]
4586
+ #
4587
+ attr_reader :update_backtest_result
4588
+ ##
4589
+ # RPC-specific configuration for `export_backtest_result_metadata`
4590
+ # @return [::Gapic::Config::Method]
4591
+ #
4592
+ attr_reader :export_backtest_result_metadata
4593
+ ##
4594
+ # RPC-specific configuration for `delete_backtest_result`
4595
+ # @return [::Gapic::Config::Method]
4596
+ #
4597
+ attr_reader :delete_backtest_result
4598
+
4599
+ # @private
4600
+ def initialize parent_rpcs = nil
4601
+ list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances
4602
+ @list_instances = ::Gapic::Config::Method.new list_instances_config
4603
+ get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance
4604
+ @get_instance = ::Gapic::Config::Method.new get_instance_config
4605
+ create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance
4606
+ @create_instance = ::Gapic::Config::Method.new create_instance_config
4607
+ update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance
4608
+ @update_instance = ::Gapic::Config::Method.new update_instance_config
4609
+ delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance
4610
+ @delete_instance = ::Gapic::Config::Method.new delete_instance_config
4611
+ import_registered_parties_config = parent_rpcs.import_registered_parties if parent_rpcs.respond_to? :import_registered_parties
4612
+ @import_registered_parties = ::Gapic::Config::Method.new import_registered_parties_config
4613
+ export_registered_parties_config = parent_rpcs.export_registered_parties if parent_rpcs.respond_to? :export_registered_parties
4614
+ @export_registered_parties = ::Gapic::Config::Method.new export_registered_parties_config
4615
+ list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets
4616
+ @list_datasets = ::Gapic::Config::Method.new list_datasets_config
4617
+ get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset
4618
+ @get_dataset = ::Gapic::Config::Method.new get_dataset_config
4619
+ create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset
4620
+ @create_dataset = ::Gapic::Config::Method.new create_dataset_config
4621
+ update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset
4622
+ @update_dataset = ::Gapic::Config::Method.new update_dataset_config
4623
+ delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset
4624
+ @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config
4625
+ list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models
4626
+ @list_models = ::Gapic::Config::Method.new list_models_config
4627
+ get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model
4628
+ @get_model = ::Gapic::Config::Method.new get_model_config
4629
+ create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model
4630
+ @create_model = ::Gapic::Config::Method.new create_model_config
4631
+ update_model_config = parent_rpcs.update_model if parent_rpcs.respond_to? :update_model
4632
+ @update_model = ::Gapic::Config::Method.new update_model_config
4633
+ export_model_metadata_config = parent_rpcs.export_model_metadata if parent_rpcs.respond_to? :export_model_metadata
4634
+ @export_model_metadata = ::Gapic::Config::Method.new export_model_metadata_config
4635
+ delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model
4636
+ @delete_model = ::Gapic::Config::Method.new delete_model_config
4637
+ list_engine_configs_config = parent_rpcs.list_engine_configs if parent_rpcs.respond_to? :list_engine_configs
4638
+ @list_engine_configs = ::Gapic::Config::Method.new list_engine_configs_config
4639
+ get_engine_config_config = parent_rpcs.get_engine_config if parent_rpcs.respond_to? :get_engine_config
4640
+ @get_engine_config = ::Gapic::Config::Method.new get_engine_config_config
4641
+ create_engine_config_config = parent_rpcs.create_engine_config if parent_rpcs.respond_to? :create_engine_config
4642
+ @create_engine_config = ::Gapic::Config::Method.new create_engine_config_config
4643
+ update_engine_config_config = parent_rpcs.update_engine_config if parent_rpcs.respond_to? :update_engine_config
4644
+ @update_engine_config = ::Gapic::Config::Method.new update_engine_config_config
4645
+ export_engine_config_metadata_config = parent_rpcs.export_engine_config_metadata if parent_rpcs.respond_to? :export_engine_config_metadata
4646
+ @export_engine_config_metadata = ::Gapic::Config::Method.new export_engine_config_metadata_config
4647
+ delete_engine_config_config = parent_rpcs.delete_engine_config if parent_rpcs.respond_to? :delete_engine_config
4648
+ @delete_engine_config = ::Gapic::Config::Method.new delete_engine_config_config
4649
+ get_engine_version_config = parent_rpcs.get_engine_version if parent_rpcs.respond_to? :get_engine_version
4650
+ @get_engine_version = ::Gapic::Config::Method.new get_engine_version_config
4651
+ list_engine_versions_config = parent_rpcs.list_engine_versions if parent_rpcs.respond_to? :list_engine_versions
4652
+ @list_engine_versions = ::Gapic::Config::Method.new list_engine_versions_config
4653
+ list_prediction_results_config = parent_rpcs.list_prediction_results if parent_rpcs.respond_to? :list_prediction_results
4654
+ @list_prediction_results = ::Gapic::Config::Method.new list_prediction_results_config
4655
+ get_prediction_result_config = parent_rpcs.get_prediction_result if parent_rpcs.respond_to? :get_prediction_result
4656
+ @get_prediction_result = ::Gapic::Config::Method.new get_prediction_result_config
4657
+ create_prediction_result_config = parent_rpcs.create_prediction_result if parent_rpcs.respond_to? :create_prediction_result
4658
+ @create_prediction_result = ::Gapic::Config::Method.new create_prediction_result_config
4659
+ update_prediction_result_config = parent_rpcs.update_prediction_result if parent_rpcs.respond_to? :update_prediction_result
4660
+ @update_prediction_result = ::Gapic::Config::Method.new update_prediction_result_config
4661
+ export_prediction_result_metadata_config = parent_rpcs.export_prediction_result_metadata if parent_rpcs.respond_to? :export_prediction_result_metadata
4662
+ @export_prediction_result_metadata = ::Gapic::Config::Method.new export_prediction_result_metadata_config
4663
+ delete_prediction_result_config = parent_rpcs.delete_prediction_result if parent_rpcs.respond_to? :delete_prediction_result
4664
+ @delete_prediction_result = ::Gapic::Config::Method.new delete_prediction_result_config
4665
+ list_backtest_results_config = parent_rpcs.list_backtest_results if parent_rpcs.respond_to? :list_backtest_results
4666
+ @list_backtest_results = ::Gapic::Config::Method.new list_backtest_results_config
4667
+ get_backtest_result_config = parent_rpcs.get_backtest_result if parent_rpcs.respond_to? :get_backtest_result
4668
+ @get_backtest_result = ::Gapic::Config::Method.new get_backtest_result_config
4669
+ create_backtest_result_config = parent_rpcs.create_backtest_result if parent_rpcs.respond_to? :create_backtest_result
4670
+ @create_backtest_result = ::Gapic::Config::Method.new create_backtest_result_config
4671
+ update_backtest_result_config = parent_rpcs.update_backtest_result if parent_rpcs.respond_to? :update_backtest_result
4672
+ @update_backtest_result = ::Gapic::Config::Method.new update_backtest_result_config
4673
+ export_backtest_result_metadata_config = parent_rpcs.export_backtest_result_metadata if parent_rpcs.respond_to? :export_backtest_result_metadata
4674
+ @export_backtest_result_metadata = ::Gapic::Config::Method.new export_backtest_result_metadata_config
4675
+ delete_backtest_result_config = parent_rpcs.delete_backtest_result if parent_rpcs.respond_to? :delete_backtest_result
4676
+ @delete_backtest_result = ::Gapic::Config::Method.new delete_backtest_result_config
4677
+
4678
+ yield self if block_given?
4679
+ end
4680
+ end
4681
+ end
4682
+ end
4683
+ end
4684
+ end
4685
+ end
4686
+ end
4687
+ end