Class: Google::Cloud::FinancialServices::V1::AML::Rest::Client

Inherits:
Object
  • Object
show all
Includes:
Paths
Defined in:
lib/google/cloud/financial_services/v1/aml/rest/client.rb

Overview

REST client for the AML service.

The AML (Anti Money Laundering) service allows users to perform REST operations on aml.

Defined Under Namespace

Classes: Configuration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Paths

#backtest_result_path, #dataset_path, #engine_config_path, #engine_version_path, #instance_path, #location_path, #model_path, #prediction_result_path

Constructor Details

#initialize {|config| ... } ⇒ Client

Create a new AML REST client object.

Examples:


# Create a client using the default configuration
client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the AML client.

Yield Parameters:



202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 202

def initialize
  # Create the configuration object
  @config = Configuration.new Client.configure

  # Yield the configuration if needed
  yield @config if block_given?

  # Create credentials
  credentials = @config.credentials
  # Use self-signed JWT if the endpoint is unchanged from default,
  # but only if the default endpoint does not have a region prefix.
  enable_self_signed_jwt = @config.endpoint.nil? ||
                           (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
                           !@config.endpoint.split(".").first.include?("-"))
  credentials ||= Credentials.default scope: @config.scope,
                                      enable_self_signed_jwt: enable_self_signed_jwt
  if credentials.is_a?(::String) || credentials.is_a?(::Hash)
    credentials = Credentials.new credentials, scope: @config.scope
  end

  @quota_project_id = @config.quota_project
  @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id

  @operations_client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Operations.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @config.endpoint
    config.universe_domain = @config.universe_domain
  end

  @aml_stub = ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.new(
    endpoint: @config.endpoint,
    endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
    universe_domain: @config.universe_domain,
    credentials: credentials,
    logger: @config.logger
  )

  @aml_stub.logger(stub: true)&.info do |entry|
    entry.set_system_name
    entry.set_service
    entry.message = "Created client for #{entry.service}"
    entry.set_credentials_fields credentials
    entry.set "customEndpoint", @config.endpoint if @config.endpoint
    entry.set "defaultTimeout", @config.timeout if @config.timeout
    entry.set "quotaProject", @quota_project_id if @quota_project_id
  end

  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
    config.credentials = credentials
    config.quota_project = @quota_project_id
    config.endpoint = @aml_stub.endpoint
    config.universe_domain = @aml_stub.universe_domain
    config.bindings_override = @config.bindings_override
    config.logger = @aml_stub.logger if config.respond_to? :logger=
  end
end

Instance Attribute Details

#location_clientGoogle::Cloud::Location::Locations::Rest::Client (readonly)

Get the associated client for mix-in of the Locations.

Returns:

  • (Google::Cloud::Location::Locations::Rest::Client)


272
273
274
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 272

def location_client
  @location_client
end

#operations_client::Google::Cloud::FinancialServices::V1::AML::Rest::Operations (readonly)

Get the associated client for long-running operations.



265
266
267
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 265

def operations_client
  @operations_client
end

Class Method Details

.configure {|config| ... } ⇒ Client::Configuration

Configure the AML Client class.

See Configuration for a description of the configuration fields.

Examples:


# Modify the configuration for all AML clients
::Google::Cloud::FinancialServices::V1::AML::Rest::Client.configure do |config|
  config.timeout = 10.0
end

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 66

def self.configure
  @configure ||= begin
    namespace = ["Google", "Cloud", "FinancialServices", "V1"]
    parent_config = while namespace.any?
                      parent_name = namespace.join "::"
                      parent_const = const_get parent_name
                      break parent_const.configure if parent_const.respond_to? :configure
                      namespace.pop
                    end
    default_config = Client::Configuration.new parent_config

    default_config.rpcs.list_instances.timeout = 10.0

    default_config.rpcs.get_instance.timeout = 10.0

    default_config.rpcs.create_instance.timeout = 120.0

    default_config.rpcs.update_instance.timeout = 120.0

    default_config.rpcs.delete_instance.timeout = 120.0

    default_config.rpcs.import_registered_parties.timeout = 120.0

    default_config.rpcs.export_registered_parties.timeout = 120.0

    default_config.rpcs.list_datasets.timeout = 10.0

    default_config.rpcs.get_dataset.timeout = 10.0

    default_config.rpcs.create_dataset.timeout = 120.0

    default_config.rpcs.update_dataset.timeout = 120.0

    default_config.rpcs.delete_dataset.timeout = 120.0

    default_config.rpcs.list_models.timeout = 10.0

    default_config.rpcs.get_model.timeout = 10.0

    default_config.rpcs.create_model.timeout = 120.0

    default_config.rpcs.update_model.timeout = 120.0

    default_config.rpcs..timeout = 120.0

    default_config.rpcs.delete_model.timeout = 120.0

    default_config.rpcs.list_engine_configs.timeout = 10.0

    default_config.rpcs.get_engine_config.timeout = 10.0

    default_config.rpcs.update_engine_config.timeout = 120.0

    default_config.rpcs..timeout = 120.0

    default_config.rpcs.delete_engine_config.timeout = 120.0

    default_config.rpcs.get_engine_version.timeout = 10.0

    default_config.rpcs.list_engine_versions.timeout = 10.0

    default_config.rpcs.list_prediction_results.timeout = 10.0

    default_config.rpcs.get_prediction_result.timeout = 10.0

    default_config.rpcs.create_prediction_result.timeout = 120.0

    default_config.rpcs.update_prediction_result.timeout = 120.0

    default_config.rpcs..timeout = 120.0

    default_config.rpcs.delete_prediction_result.timeout = 120.0

    default_config.rpcs.list_backtest_results.timeout = 10.0

    default_config.rpcs.get_backtest_result.timeout = 10.0

    default_config.rpcs.create_backtest_result.timeout = 120.0

    default_config.rpcs.update_backtest_result.timeout = 120.0

    default_config.rpcs..timeout = 120.0

    default_config.rpcs.delete_backtest_result.timeout = 120.0

    default_config
  end
  yield @configure if block_given?
  @configure
end

Instance Method Details

#configure {|config| ... } ⇒ Client::Configuration

Configure the AML Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on configure.

See Configuration for a description of the configuration fields.

Yields:

  • (config)

    Configure the Client client.

Yield Parameters:

Returns:



172
173
174
175
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 172

def configure
  yield @config if block_given?
  @config
end

#create_backtest_result(request, options = nil) ⇒ ::Gapic::Operation #create_backtest_result(parent: nil, backtest_result_id: nil, backtest_result: nil, request_id: nil) ⇒ ::Gapic::Operation

Create a BacktestResult.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest.new

# Call the create_backtest_result method.
result = client.create_backtest_result request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_backtest_result(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_backtest_result via a request object, either of type CreateBacktestResultRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_backtest_result(parent: nil, backtest_result_id: nil, backtest_result: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_backtest_result via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent of the BacktestResult is the Instance.

    • backtest_result_id (::String) (defaults to: nil)

      Required. The resource id of the BacktestResult

    • backtest_result (::Google::Cloud::FinancialServices::V1::BacktestResult, ::Hash) (defaults to: nil)

      Required. The BacktestResult that will be created.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 3632

def create_backtest_result request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_backtest_result..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_backtest_result.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_backtest_result.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.create_backtest_result request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_dataset(request, options = nil) ⇒ ::Gapic::Operation #create_dataset(parent: nil, dataset_id: nil, dataset: nil, request_id: nil) ⇒ ::Gapic::Operation

Creates a dataset.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::CreateDatasetRequest.new

# Call the create_dataset method.
result = client.create_dataset request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_dataset(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_dataset via a request object, either of type CreateDatasetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::CreateDatasetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_dataset(parent: nil, dataset_id: nil, dataset: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_dataset via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent of the Dataset is the Instance.

    • dataset_id (::String) (defaults to: nil)

      Required. The resource id of the dataset

    • dataset (::Google::Cloud::FinancialServices::V1::Dataset, ::Hash) (defaults to: nil)

      Required. The dataset that will be created.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 1219

def create_dataset request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateDatasetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_dataset..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_dataset.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_dataset.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.create_dataset request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_engine_config(request, options = nil) ⇒ ::Gapic::Operation #create_engine_config(parent: nil, engine_config_id: nil, engine_config: nil, request_id: nil) ⇒ ::Gapic::Operation

Creates an engine config.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest.new

# Call the create_engine_config method.
result = client.create_engine_config request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_engine_config(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_engine_config via a request object, either of type CreateEngineConfigRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_engine_config(parent: nil, engine_config_id: nil, engine_config: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_engine_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent of the EngineConfig is the Instance.

    • engine_config_id (::String) (defaults to: nil)

      Required. The resource id of the EngineConfig

    • engine_config (::Google::Cloud::FinancialServices::V1::EngineConfig, ::Hash) (defaults to: nil)

      Required. The EngineConfig that will be created.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 2290

def create_engine_config request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_engine_config..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_engine_config.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_engine_config.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.create_engine_config request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_instance(request, options = nil) ⇒ ::Gapic::Operation #create_instance(parent: nil, instance_id: nil, instance: nil, request_id: nil) ⇒ ::Gapic::Operation

Creates an instance.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::CreateInstanceRequest.new

# Call the create_instance method.
result = client.create_instance request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_instance(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_instance via a request object, either of type CreateInstanceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::CreateInstanceRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_instance(parent: nil, instance_id: nil, instance: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_instance via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent of the Instance is the location for that Instance. Every location has exactly one instance.

    • instance_id (::String) (defaults to: nil)

      Required. The resource id of the instance.

    • instance (::Google::Cloud::FinancialServices::V1::Instance, ::Hash) (defaults to: nil)

      Required. The instance that will be created.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 530

def create_instance request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateInstanceRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_instance..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_instance.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_instance.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.create_instance request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_model(request, options = nil) ⇒ ::Gapic::Operation #create_model(parent: nil, model_id: nil, model: nil, request_id: nil) ⇒ ::Gapic::Operation

Creates a model.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::CreateModelRequest.new

# Call the create_model method.
result = client.create_model request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_model(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_model via a request object, either of type CreateModelRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::CreateModelRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_model(parent: nil, model_id: nil, model: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_model via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent of the Model is the Instance.

    • model_id (::String) (defaults to: nil)

      Required. The resource id of the Model

    • model (::Google::Cloud::FinancialServices::V1::Model, ::Hash) (defaults to: nil)

      Required. The Model that will be created.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 1708

def create_model request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateModelRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_model..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_model.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_model.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.create_model request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#create_prediction_result(request, options = nil) ⇒ ::Gapic::Operation #create_prediction_result(parent: nil, prediction_result_id: nil, prediction_result: nil, request_id: nil) ⇒ ::Gapic::Operation

Create a PredictionResult.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest.new

# Call the create_prediction_result method.
result = client.create_prediction_result request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #create_prediction_result(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to create_prediction_result via a request object, either of type CreatePredictionResultRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #create_prediction_result(parent: nil, prediction_result_id: nil, prediction_result: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to create_prediction_result via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent of the PredictionResult is the Instance.

    • prediction_result_id (::String) (defaults to: nil)

      Required. The resource id of the PredictionResult

    • prediction_result (::Google::Cloud::FinancialServices::V1::PredictionResult, ::Hash) (defaults to: nil)

      Required. The PredictionResult that will be created.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 3050

def create_prediction_result request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.create_prediction_result..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.create_prediction_result.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.create_prediction_result.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.create_prediction_result request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_backtest_result(request, options = nil) ⇒ ::Gapic::Operation #delete_backtest_result(name: nil, request_id: nil) ⇒ ::Gapic::Operation

Deletes a BacktestResult.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest.new

# Call the delete_backtest_result method.
result = client.delete_backtest_result request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_backtest_result(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_backtest_result via a request object, either of type DeleteBacktestResultRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_backtest_result(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_backtest_result via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the BacktestResult.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 3933

def delete_backtest_result request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_backtest_result..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_backtest_result.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_backtest_result.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.delete_backtest_result request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_dataset(request, options = nil) ⇒ ::Gapic::Operation #delete_dataset(name: nil, request_id: nil) ⇒ ::Gapic::Operation

Deletes a dataset.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::DeleteDatasetRequest.new

# Call the delete_dataset method.
result = client.delete_dataset request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_dataset(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_dataset via a request object, either of type DeleteDatasetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_dataset(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_dataset via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the Dataset.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 1428

def delete_dataset request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_dataset..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_dataset.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_dataset.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.delete_dataset request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_engine_config(request, options = nil) ⇒ ::Gapic::Operation #delete_engine_config(name: nil, request_id: nil) ⇒ ::Gapic::Operation

Deletes an engine config.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest.new

# Call the delete_engine_config method.
result = client.delete_engine_config request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_engine_config(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_engine_config via a request object, either of type DeleteEngineConfigRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_engine_config(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_engine_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the EngineConfig.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 2591

def delete_engine_config request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_engine_config..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_engine_config.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_engine_config.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.delete_engine_config request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_instance(request, options = nil) ⇒ ::Gapic::Operation #delete_instance(name: nil, request_id: nil) ⇒ ::Gapic::Operation

Deletes an instance.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::DeleteInstanceRequest.new

# Call the delete_instance method.
result = client.delete_instance request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_instance(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_instance via a request object, either of type DeleteInstanceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_instance(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_instance via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the Instance.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 739

def delete_instance request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_instance..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_instance.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_instance.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.delete_instance request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_model(request, options = nil) ⇒ ::Gapic::Operation #delete_model(name: nil, request_id: nil) ⇒ ::Gapic::Operation

Deletes a model.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::DeleteModelRequest.new

# Call the delete_model method.
result = client.delete_model request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_model(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_model via a request object, either of type DeleteModelRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::DeleteModelRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_model(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_model via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the Model.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 2009

def delete_model request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteModelRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_model..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_model.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_model.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.delete_model request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#delete_prediction_result(request, options = nil) ⇒ ::Gapic::Operation #delete_prediction_result(name: nil, request_id: nil) ⇒ ::Gapic::Operation

Deletes a PredictionResult.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest.new

# Call the delete_prediction_result method.
result = client.delete_prediction_result request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #delete_prediction_result(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_prediction_result via a request object, either of type DeletePredictionResultRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #delete_prediction_result(name: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to delete_prediction_result via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the PredictionResult.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 3351

def delete_prediction_result request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.delete_prediction_result..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.delete_prediction_result.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.delete_prediction_result.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.delete_prediction_result request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#export_backtest_result_metadata(request, options = nil) ⇒ ::Gapic::Operation #export_backtest_result_metadata(backtest_result: nil, structured_metadata_destination: nil) ⇒ ::Gapic::Operation

Export governance information for a BacktestResult resource. For information on the exported fields, see AML output data model.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest.new

# Call the export_backtest_result_metadata method.
result = client. request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #export_backtest_result_metadata(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to export_backtest_result_metadata via a request object, either of type ExportBacktestResultMetadataRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #export_backtest_result_metadata(backtest_result: nil, structured_metadata_destination: nil) ⇒ ::Gapic::Operation

    Pass arguments to export_backtest_result_metadata via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 3832

def  request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs...to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs..timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs..retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub. request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#export_engine_config_metadata(request, options = nil) ⇒ ::Gapic::Operation #export_engine_config_metadata(engine_config: nil, structured_metadata_destination: nil) ⇒ ::Gapic::Operation

Export governance information for an EngineConfig resource. For information on the exported fields, see AML output data model.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest.new

# Call the export_engine_config_metadata method.
result = client. request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #export_engine_config_metadata(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to export_engine_config_metadata via a request object, either of type ExportEngineConfigMetadataRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #export_engine_config_metadata(engine_config: nil, structured_metadata_destination: nil) ⇒ ::Gapic::Operation

    Pass arguments to export_engine_config_metadata via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 2490

def  request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs...to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs..timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs..retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub. request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#export_model_metadata(request, options = nil) ⇒ ::Gapic::Operation #export_model_metadata(model: nil, structured_metadata_destination: nil) ⇒ ::Gapic::Operation

Export governance information for a Model resource. For information on the exported fields, see AML output data model.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest.new

# Call the export_model_metadata method.
result = client. request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #export_model_metadata(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to export_model_metadata via a request object, either of type ExportModelMetadataRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #export_model_metadata(model: nil, structured_metadata_destination: nil) ⇒ ::Gapic::Operation

    Pass arguments to export_model_metadata via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 1908

def  request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs...to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs..timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs..retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub. request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#export_prediction_result_metadata(request, options = nil) ⇒ ::Gapic::Operation #export_prediction_result_metadata(prediction_result: nil, structured_metadata_destination: nil) ⇒ ::Gapic::Operation

Export governance information for a PredictionResult resource. For information on the exported fields, see AML output data model.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest.new

# Call the export_prediction_result_metadata method.
result = client. request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #export_prediction_result_metadata(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to export_prediction_result_metadata via a request object, either of type ExportPredictionResultMetadataRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #export_prediction_result_metadata(prediction_result: nil, structured_metadata_destination: nil) ⇒ ::Gapic::Operation

    Pass arguments to export_prediction_result_metadata via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 3250

def  request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs...to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs..timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs..retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub. request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#export_registered_parties(request, options = nil) ⇒ ::Gapic::Operation #export_registered_parties(name: nil, dataset: nil, line_of_business: nil) ⇒ ::Gapic::Operation

Exports the list of registered parties. See Create and manage instances for information on the output schema for this method.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest.new

# Call the export_registered_parties method.
result = client.export_registered_parties request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #export_registered_parties(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to export_registered_parties via a request object, either of type ExportRegisteredPartiesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #export_registered_parties(name: nil, dataset: nil, line_of_business: nil) ⇒ ::Gapic::Operation

    Pass arguments to export_registered_parties via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 939

def export_registered_parties request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.export_registered_parties..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.export_registered_parties.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.export_registered_parties.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.export_registered_parties request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_backtest_result(request, options = nil) ⇒ ::Google::Cloud::FinancialServices::V1::BacktestResult #get_backtest_result(name: nil) ⇒ ::Google::Cloud::FinancialServices::V1::BacktestResult

Gets a BacktestResult.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::GetBacktestResultRequest.new

# Call the get_backtest_result method.
result = client.get_backtest_result request

# The returned object is of type Google::Cloud::FinancialServices::V1::BacktestResult.
p result

Overloads:

  • #get_backtest_result(request, options = nil) ⇒ ::Google::Cloud::FinancialServices::V1::BacktestResult

    Pass arguments to get_backtest_result via a request object, either of type GetBacktestResultRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_backtest_result(name: nil) ⇒ ::Google::Cloud::FinancialServices::V1::BacktestResult

    Pass arguments to get_backtest_result via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the BacktestResult

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 3529

def get_backtest_result request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_backtest_result..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_backtest_result.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_backtest_result.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.get_backtest_result request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_dataset(request, options = nil) ⇒ ::Google::Cloud::FinancialServices::V1::Dataset #get_dataset(name: nil) ⇒ ::Google::Cloud::FinancialServices::V1::Dataset

Gets a dataset.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::GetDatasetRequest.new

# Call the get_dataset method.
result = client.get_dataset request

# The returned object is of type Google::Cloud::FinancialServices::V1::Dataset.
p result

Overloads:

  • #get_dataset(request, options = nil) ⇒ ::Google::Cloud::FinancialServices::V1::Dataset

    Pass arguments to get_dataset via a request object, either of type GetDatasetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::GetDatasetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_dataset(name: nil) ⇒ ::Google::Cloud::FinancialServices::V1::Dataset

    Pass arguments to get_dataset via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the Dataset

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 1116

def get_dataset request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetDatasetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_dataset..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_dataset.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_dataset.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.get_dataset request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_engine_config(request, options = nil) ⇒ ::Google::Cloud::FinancialServices::V1::EngineConfig #get_engine_config(name: nil) ⇒ ::Google::Cloud::FinancialServices::V1::EngineConfig

Gets an engine config.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::GetEngineConfigRequest.new

# Call the get_engine_config method.
result = client.get_engine_config request

# The returned object is of type Google::Cloud::FinancialServices::V1::EngineConfig.
p result

Overloads:

  • #get_engine_config(request, options = nil) ⇒ ::Google::Cloud::FinancialServices::V1::EngineConfig

    Pass arguments to get_engine_config via a request object, either of type GetEngineConfigRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_engine_config(name: nil) ⇒ ::Google::Cloud::FinancialServices::V1::EngineConfig

    Pass arguments to get_engine_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the EngineConfig

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 2187

def get_engine_config request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_engine_config..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_engine_config.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_engine_config.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.get_engine_config request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_engine_version(request, options = nil) ⇒ ::Google::Cloud::FinancialServices::V1::EngineVersion #get_engine_version(name: nil) ⇒ ::Google::Cloud::FinancialServices::V1::EngineVersion

Gets a single EngineVersion.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::GetEngineVersionRequest.new

# Call the get_engine_version method.
result = client.get_engine_version request

# The returned object is of type Google::Cloud::FinancialServices::V1::EngineVersion.
p result

Overloads:

  • #get_engine_version(request, options = nil) ⇒ ::Google::Cloud::FinancialServices::V1::EngineVersion

    Pass arguments to get_engine_version via a request object, either of type GetEngineVersionRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_engine_version(name: nil) ⇒ ::Google::Cloud::FinancialServices::V1::EngineVersion

    Pass arguments to get_engine_version via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the EngineVersion

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 2671

def get_engine_version request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_engine_version..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_engine_version.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_engine_version.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.get_engine_version request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_instance(request, options = nil) ⇒ ::Google::Cloud::FinancialServices::V1::Instance #get_instance(name: nil) ⇒ ::Google::Cloud::FinancialServices::V1::Instance

Gets an instance.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::GetInstanceRequest.new

# Call the get_instance method.
result = client.get_instance request

# The returned object is of type Google::Cloud::FinancialServices::V1::Instance.
p result

Overloads:

  • #get_instance(request, options = nil) ⇒ ::Google::Cloud::FinancialServices::V1::Instance

    Pass arguments to get_instance via a request object, either of type GetInstanceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::GetInstanceRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_instance(name: nil) ⇒ ::Google::Cloud::FinancialServices::V1::Instance

    Pass arguments to get_instance via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the Instance.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 426

def get_instance request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetInstanceRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_instance..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_instance.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_instance.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.get_instance request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_model(request, options = nil) ⇒ ::Google::Cloud::FinancialServices::V1::Model #get_model(name: nil) ⇒ ::Google::Cloud::FinancialServices::V1::Model

Gets a model.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::GetModelRequest.new

# Call the get_model method.
result = client.get_model request

# The returned object is of type Google::Cloud::FinancialServices::V1::Model.
p result

Overloads:

  • #get_model(request, options = nil) ⇒ ::Google::Cloud::FinancialServices::V1::Model

    Pass arguments to get_model via a request object, either of type GetModelRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::GetModelRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_model(name: nil) ⇒ ::Google::Cloud::FinancialServices::V1::Model

    Pass arguments to get_model via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the Model

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 1605

def get_model request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetModelRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_model..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_model.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_model.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.get_model request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#get_prediction_result(request, options = nil) ⇒ ::Google::Cloud::FinancialServices::V1::PredictionResult #get_prediction_result(name: nil) ⇒ ::Google::Cloud::FinancialServices::V1::PredictionResult

Gets a PredictionResult.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::GetPredictionResultRequest.new

# Call the get_prediction_result method.
result = client.get_prediction_result request

# The returned object is of type Google::Cloud::FinancialServices::V1::PredictionResult.
p result

Overloads:

  • #get_prediction_result(request, options = nil) ⇒ ::Google::Cloud::FinancialServices::V1::PredictionResult

    Pass arguments to get_prediction_result via a request object, either of type GetPredictionResultRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #get_prediction_result(name: nil) ⇒ ::Google::Cloud::FinancialServices::V1::PredictionResult

    Pass arguments to get_prediction_result via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The resource name of the PredictionResult

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 2947

def get_prediction_result request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.get_prediction_result..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.get_prediction_result.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.get_prediction_result.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.get_prediction_result request, options do |result, operation|
    yield result, operation if block_given?
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#import_registered_parties(request, options = nil) ⇒ ::Gapic::Operation #import_registered_parties(name: nil, party_tables: nil, mode: nil, validate_only: nil, line_of_business: nil) ⇒ ::Gapic::Operation

Imports the list of registered parties. See Create and manage instances for information on the input schema and response for this method.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest.new

# Call the import_registered_parties method.
result = client.import_registered_parties request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #import_registered_parties(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to import_registered_parties via a request object, either of type ImportRegisteredPartiesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #import_registered_parties(name: nil, party_tables: nil, mode: nil, validate_only: nil, line_of_business: nil) ⇒ ::Gapic::Operation

    Pass arguments to import_registered_parties via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • name (::String) (defaults to: nil)

      Required. The full path to the Instance resource in this API. format: projects/{project}/locations/{location}/instances/{instance}

    • party_tables (::Array<::String>) (defaults to: nil)

      Optional. List of BigQuery tables. Union of tables will be taken if there is more than one table. VPC-SC restrictions apply. format: bq://{project}.{bqDatasetID}.{bqTableID} Use of datasets is preferred over the latter due to its simplicity and the reduced risk of errors party_tables and datasets must not be provided at the same time

    • mode (::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest::UpdateMode) (defaults to: nil)

      Required. Mode of the request.

    • validate_only (::Boolean) (defaults to: nil)

      Optional. If the request will not register the parties, just determine what would happen.

    • line_of_business (::Google::Cloud::FinancialServices::V1::LineOfBusiness) (defaults to: nil)

      Required. LineOfBusiness for the specified registered parties.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 844

def import_registered_parties request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.import_registered_parties..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.import_registered_parties.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.import_registered_parties.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.import_registered_parties request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_backtest_results(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::BacktestResult> #list_backtest_results(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::BacktestResult>

List BacktestResults.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest.new

# Call the list_backtest_results method.
result = client.list_backtest_results request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::FinancialServices::V1::BacktestResult.
  p item
end

Overloads:

  • #list_backtest_results(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::BacktestResult>

    Pass arguments to list_backtest_results via a request object, either of type ListBacktestResultsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_backtest_results(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::BacktestResult>

    Pass arguments to list_backtest_results via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent of the BacktestResult is the Instance.

    • page_size (::Integer) (defaults to: nil)

      The number of resources to be included in the response. The response contains a next_page_token, which can be used to retrieve the next page of resources.

    • page_token (::String) (defaults to: nil)

      In case of paginated results, this is the token that was returned in the previous ListBacktestResultsResponse. It should be copied here to retrieve the next page of resources. Empty will give the first page of ListBacktestResultsRequest, and the last page will return an empty page_token.

    • filter (::String) (defaults to: nil)

      Specify a filter to narrow search results.

    • order_by (::String) (defaults to: nil)

      Specify a field to use for ordering.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 3449

def list_backtest_results request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_backtest_results..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_backtest_results.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_backtest_results.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.list_backtest_results request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @aml_stub, :list_backtest_results, "backtest_results", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_datasets(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Dataset> #list_datasets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Dataset>

Lists datasets.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::ListDatasetsRequest.new

# Call the list_datasets method.
result = client.list_datasets request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::FinancialServices::V1::Dataset.
  p item
end

Overloads:

  • #list_datasets(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Dataset>

    Pass arguments to list_datasets via a request object, either of type ListDatasetsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::ListDatasetsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_datasets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Dataset>

    Pass arguments to list_datasets via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent of the Dataset is the Instance.

    • page_size (::Integer) (defaults to: nil)

      The number of resources to be included in the response. The response contains a next_page_token, which can be used to retrieve the next page of resources.

    • page_token (::String) (defaults to: nil)

      In case of paginated results, this is the token that was returned in the previous ListDatasetResponse. It should be copied here to retrieve the next page of resources. Empty will give the first page of ListDatasetRequest, and the last page will return an empty page_token.

    • filter (::String) (defaults to: nil)

      Specify a filter to narrow search results.

    • order_by (::String) (defaults to: nil)

      Specify a field to use for ordering.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 1036

def list_datasets request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListDatasetsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_datasets..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_datasets.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_datasets.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.list_datasets request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @aml_stub, :list_datasets, "datasets", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_engine_configs(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineConfig> #list_engine_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineConfig>

Lists engine configs.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest.new

# Call the list_engine_configs method.
result = client.list_engine_configs request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::FinancialServices::V1::EngineConfig.
  p item
end

Overloads:

  • #list_engine_configs(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineConfig>

    Pass arguments to list_engine_configs via a request object, either of type ListEngineConfigsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_engine_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineConfig>

    Pass arguments to list_engine_configs via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent of the EngineConfig is the Instance.

    • page_size (::Integer) (defaults to: nil)

      The number of resources to be included in the response. The response contains a next_page_token, which can be used to retrieve the next page of resources.

    • page_token (::String) (defaults to: nil)

      In case of paginated results, this is the token that was returned in the previous ListEngineConfigsResponse. It should be copied here to retrieve the next page of resources. Empty will give the first page of ListEngineConfigsRequest, and the last page will return an empty page_token.

    • filter (::String) (defaults to: nil)

      Specify a filter to narrow search results.

    • order_by (::String) (defaults to: nil)

      Specify a field to use for ordering.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 2107

def list_engine_configs request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_engine_configs..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_engine_configs.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_engine_configs.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.list_engine_configs request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @aml_stub, :list_engine_configs, "engine_configs", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_engine_versions(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineVersion> #list_engine_versions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineVersion>

Lists EngineVersions for given location.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest.new

# Call the list_engine_versions method.
result = client.list_engine_versions request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::FinancialServices::V1::EngineVersion.
  p item
end

Overloads:

  • #list_engine_versions(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineVersion>

    Pass arguments to list_engine_versions via a request object, either of type ListEngineVersionsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_engine_versions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineVersion>

    Pass arguments to list_engine_versions via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent of the EngineVersion is the Instance.

    • page_size (::Integer) (defaults to: nil)

      Optional. The number of resources to be included in the response. The response contains a next_page_token, which can be used to retrieve the next page of resources.

    • page_token (::String) (defaults to: nil)

      Optional. In case of paginated results, this is the token that was returned in the previous ListEngineVersionsResponse. It should be copied here to retrieve the next page of resources. Empty will give the first page of ListEngineVersionsRequest, and the last page will return an empty page_token.

    • filter (::String) (defaults to: nil)

      Optional. Specify a filter to narrow search results. If empty or unset will default to "state!=DEPRECATED", to view deprecated versions use "state:*" or any other filter.

    • order_by (::String) (defaults to: nil)

      Optional. Specify a field to use for ordering.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 2769

def list_engine_versions request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_engine_versions..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_engine_versions.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_engine_versions.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.list_engine_versions request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @aml_stub, :list_engine_versions, "engine_versions", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_instances(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Instance> #list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Instance>

Lists instances.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::ListInstancesRequest.new

# Call the list_instances method.
result = client.list_instances request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::FinancialServices::V1::Instance.
  p item
end

Overloads:

  • #list_instances(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Instance>

    Pass arguments to list_instances via a request object, either of type ListInstancesRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::ListInstancesRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Instance>

    Pass arguments to list_instances via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent of the Instance is the location for that Instance. Every location has exactly one instance.

    • page_size (::Integer) (defaults to: nil)

      The number of resources to be included in the response. The response contains a next_page_token, which can be used to retrieve the next page of resources.

    • page_token (::String) (defaults to: nil)

      In case of paginated results, this is the token that was returned in the previous ListInstancesResponse. It should be copied here to retrieve the next page of resources. This will be empty for the first instance of ListInstancesRequest.

    • filter (::String) (defaults to: nil)

      Specify a filter to narrow search results.

    • order_by (::String) (defaults to: nil)

      Specify a field to use for ordering.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 346

def list_instances request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListInstancesRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_instances..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_instances.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_instances.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.list_instances request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @aml_stub, :list_instances, "instances", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_models(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Model> #list_models(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Model>

Lists models.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::ListModelsRequest.new

# Call the list_models method.
result = client.list_models request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::FinancialServices::V1::Model.
  p item
end

Overloads:

  • #list_models(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Model>

    Pass arguments to list_models via a request object, either of type ListModelsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::ListModelsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_models(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Model>

    Pass arguments to list_models via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent of the Model is the Instance.

    • page_size (::Integer) (defaults to: nil)

      The number of resources to be included in the response. The response contains a next_page_token, which can be used to retrieve the next page of resources.

    • page_token (::String) (defaults to: nil)

      In case of paginated results, this is the token that was returned in the previous ListModelsResponse. It should be copied here to retrieve the next page of resources. Empty will give the first page of ListModelsRequest, and the last page will return an empty page_token.

    • filter (::String) (defaults to: nil)

      Specify a filter to narrow search results.

    • order_by (::String) (defaults to: nil)

      Specify a field to use for ordering.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 1525

def list_models request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListModelsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_models..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_models.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_models.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.list_models request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @aml_stub, :list_models, "models", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#list_prediction_results(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::PredictionResult> #list_prediction_results(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::PredictionResult>

List PredictionResults.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest.new

# Call the list_prediction_results method.
result = client.list_prediction_results request

# The returned object is of type Gapic::PagedEnumerable. You can iterate
# over elements, and API calls will be issued to fetch pages as needed.
result.each do |item|
  # Each element is of type ::Google::Cloud::FinancialServices::V1::PredictionResult.
  p item
end

Overloads:

  • #list_prediction_results(request, options = nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::PredictionResult>

    Pass arguments to list_prediction_results via a request object, either of type ListPredictionResultsRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #list_prediction_results(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) ⇒ ::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::PredictionResult>

    Pass arguments to list_prediction_results via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • parent (::String) (defaults to: nil)

      Required. The parent of the PredictionResult is the Instance.

    • page_size (::Integer) (defaults to: nil)

      The number of resources to be included in the response. The response contains a next_page_token, which can be used to retrieve the next page of resources.

    • page_token (::String) (defaults to: nil)

      In case of paginated results, this is the token that was returned in the previous ListPredictionResultsResponse. It should be copied here to retrieve the next page of resources. Empty will give the first page of ListPredictionResultsRequest, and the last page will return an empty page_token.

    • filter (::String) (defaults to: nil)

      Specify a filter to narrow search results.

    • order_by (::String) (defaults to: nil)

      Specify a field to use for ordering.

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

Returns:

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 2867

def list_prediction_results request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.list_prediction_results..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.list_prediction_results.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.list_prediction_results.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.list_prediction_results request, options do |result, operation|
    result = ::Gapic::Rest::PagedEnumerable.new @aml_stub, :list_prediction_results, "prediction_results", request, result, options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#loggerLogger

The logger used for request/response debug logging.

Returns:

  • (Logger)


279
280
281
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 279

def logger
  @aml_stub.logger
end

#universe_domainString

The effective universe domain

Returns:

  • (String)


182
183
184
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 182

def universe_domain
  @aml_stub.universe_domain
end

#update_backtest_result(request, options = nil) ⇒ ::Gapic::Operation #update_backtest_result(update_mask: nil, backtest_result: nil, request_id: nil) ⇒ ::Gapic::Operation

Updates the parameters of a single BacktestResult.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest.new

# Call the update_backtest_result method.
result = client.update_backtest_result request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_backtest_result(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_backtest_result via a request object, either of type UpdateBacktestResultRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_backtest_result(update_mask: nil, backtest_result: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_backtest_result via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. Field mask is used to specify the fields to be overwritten in the BacktestResult resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

    • backtest_result (::Google::Cloud::FinancialServices::V1::BacktestResult, ::Hash) (defaults to: nil)

      Required. The new value of the BacktestResult fields that will be updated according to the update_mask.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 3740

def update_backtest_result request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_backtest_result..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_backtest_result.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_backtest_result.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.update_backtest_result request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_dataset(request, options = nil) ⇒ ::Gapic::Operation #update_dataset(update_mask: nil, dataset: nil, request_id: nil) ⇒ ::Gapic::Operation

Updates the parameters of a single Dataset.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::UpdateDatasetRequest.new

# Call the update_dataset method.
result = client.update_dataset request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_dataset(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_dataset via a request object, either of type UpdateDatasetRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_dataset(update_mask: nil, dataset: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_dataset via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. Field mask is used to specify the fields to be overwritten in the Dataset resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

    • dataset (::Google::Cloud::FinancialServices::V1::Dataset, ::Hash) (defaults to: nil)

      Required. The new value of the dataset fields that will be updated according to the update_mask.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 1327

def update_dataset request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_dataset..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_dataset.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_dataset.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.update_dataset request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_engine_config(request, options = nil) ⇒ ::Gapic::Operation #update_engine_config(update_mask: nil, engine_config: nil, request_id: nil) ⇒ ::Gapic::Operation

Updates the parameters of a single EngineConfig.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest.new

# Call the update_engine_config method.
result = client.update_engine_config request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_engine_config(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_engine_config via a request object, either of type UpdateEngineConfigRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_engine_config(update_mask: nil, engine_config: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_engine_config via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. Field mask is used to specify the fields to be overwritten in the EngineConfig resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

    • engine_config (::Google::Cloud::FinancialServices::V1::EngineConfig, ::Hash) (defaults to: nil)

      Required. The new value of the EngineConfig fields that will be updated according to the update_mask.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 2398

def update_engine_config request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_engine_config..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_engine_config.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_engine_config.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.update_engine_config request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_instance(request, options = nil) ⇒ ::Gapic::Operation #update_instance(update_mask: nil, instance: nil, request_id: nil) ⇒ ::Gapic::Operation

Updates the parameters of a single Instance.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::UpdateInstanceRequest.new

# Call the update_instance method.
result = client.update_instance request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_instance(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_instance via a request object, either of type UpdateInstanceRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_instance(update_mask: nil, instance: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_instance via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. Field mask is used to specify the fields to be overwritten in the Instance resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

    • instance (::Google::Cloud::FinancialServices::V1::Instance, ::Hash) (defaults to: nil)

      Required. The new value of the instance fields that will be updated according to the update_mask

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 638

def update_instance request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_instance..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_instance.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_instance.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.update_instance request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_model(request, options = nil) ⇒ ::Gapic::Operation #update_model(update_mask: nil, model: nil, request_id: nil) ⇒ ::Gapic::Operation

Updates the parameters of a single Model.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::UpdateModelRequest.new

# Call the update_model method.
result = client.update_model request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_model(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_model via a request object, either of type UpdateModelRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::UpdateModelRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_model(update_mask: nil, model: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_model via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. Field mask is used to specify the fields to be overwritten in the Model resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

    • model (::Google::Cloud::FinancialServices::V1::Model, ::Hash) (defaults to: nil)

      Required. The new value of the Model fields that will be updated according to the update_mask.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 1816

def update_model request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateModelRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_model..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_model.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_model.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.update_model request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end

#update_prediction_result(request, options = nil) ⇒ ::Gapic::Operation #update_prediction_result(update_mask: nil, prediction_result: nil, request_id: nil) ⇒ ::Gapic::Operation

Updates the parameters of a single PredictionResult.

Examples:

Basic example

require "google/cloud/financial_services/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest.new

# Call the update_prediction_result method.
result = client.update_prediction_result request

# The returned object is of type Gapic::Operation. You can use it to
# check the status of an operation, cancel it, or wait for results.
# Here is how to wait for a response.
result.wait_until_done! timeout: 60
if result.response?
  p result.response
else
  puts "No response received."
end

Overloads:

  • #update_prediction_result(request, options = nil) ⇒ ::Gapic::Operation

    Pass arguments to update_prediction_result via a request object, either of type UpdatePredictionResultRequest or an equivalent Hash.

    Parameters:

    • request (::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest, ::Hash)

      A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.

    • options (::Gapic::CallOptions, ::Hash) (defaults to: nil)

      Overrides the default settings for this call, e.g, timeout, retries etc. Optional.

  • #update_prediction_result(update_mask: nil, prediction_result: nil, request_id: nil) ⇒ ::Gapic::Operation

    Pass arguments to update_prediction_result via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).

    Parameters:

    • update_mask (::Google::Protobuf::FieldMask, ::Hash) (defaults to: nil)

      Optional. Field mask is used to specify the fields to be overwritten in the PredictionResult resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

    • prediction_result (::Google::Cloud::FinancialServices::V1::PredictionResult, ::Hash) (defaults to: nil)

      Required. The new value of the PredictionResult fields that will be updated according to the update_mask.

    • request_id (::String) (defaults to: nil)

      Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request.

      For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.

      The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).

Yields:

  • (result, operation)

    Access the result along with the TransportOperation object

Yield Parameters:

  • result (::Gapic::Operation)
  • operation (::Gapic::Rest::TransportOperation)

Returns:

  • (::Gapic::Operation)

Raises:

  • (::Google::Cloud::Error)

    if the REST call is aborted.



3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
# File 'lib/google/cloud/financial_services/v1/aml/rest/client.rb', line 3158

def update_prediction_result request, options = nil
  raise ::ArgumentError, "request must be provided" if request.nil?

  request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest

  # Converts hash and nil to an options object
  options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

  # Customize the options with defaults
   = @config.rpcs.update_prediction_result..to_h

  # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
  [:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
    lib_name: @config.lib_name, lib_version: @config.lib_version,
    gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION,
    transports_version_send: [:rest]

  [:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
  [:"x-goog-user-project"] = @quota_project_id if @quota_project_id

  options.apply_defaults timeout:      @config.rpcs.update_prediction_result.timeout,
                         metadata:     ,
                         retry_policy: @config.rpcs.update_prediction_result.retry_policy

  options.apply_defaults timeout:      @config.timeout,
                         metadata:     @config.,
                         retry_policy: @config.retry_policy

  @aml_stub.update_prediction_result request, options do |result, operation|
    result = ::Gapic::Operation.new result, @operations_client, options: options
    yield result, operation if block_given?
    throw :response, result
  end
rescue ::Gapic::Rest::Error => e
  raise ::Google::Cloud::Error.from_error(e)
end