google-cloud-ai_platform-v1 1.51.0 → 1.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1840 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2026 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/aiplatform/v1/agent_anomaly_detection_service_pb"
21
+ require "google/cloud/ai_platform/v1/agent_anomaly_detection_service/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+ require "google/iam/v1/rest"
24
+
25
+ module Google
26
+ module Cloud
27
+ module AIPlatform
28
+ module V1
29
+ module AgentAnomalyDetectionService
30
+ module Rest
31
+ ##
32
+ # REST client for the AgentAnomalyDetectionService service.
33
+ #
34
+ # A service for managing Agent Anomaly Detection for monitored agents.
35
+ #
36
+ class Client
37
+ # @private
38
+ API_VERSION = ""
39
+
40
+ # @private
41
+ DEFAULT_ENDPOINT_TEMPLATE = "aiplatform.$UNIVERSE_DOMAIN$"
42
+
43
+ include Paths
44
+
45
+ # @private
46
+ attr_reader :agent_anomaly_detection_service_stub
47
+
48
+ ##
49
+ # Configure the AgentAnomalyDetectionService Client class.
50
+ #
51
+ # See {::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client::Configuration}
52
+ # for a description of the configuration fields.
53
+ #
54
+ # @example
55
+ #
56
+ # # Modify the configuration for all AgentAnomalyDetectionService clients
57
+ # ::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.configure do |config|
58
+ # config.timeout = 10.0
59
+ # end
60
+ #
61
+ # @yield [config] Configure the Client client.
62
+ # @yieldparam config [Client::Configuration]
63
+ #
64
+ # @return [Client::Configuration]
65
+ #
66
+ def self.configure
67
+ @configure ||= begin
68
+ namespace = ["Google", "Cloud", "AIPlatform", "V1"]
69
+ parent_config = while namespace.any?
70
+ parent_name = namespace.join "::"
71
+ parent_const = const_get parent_name
72
+ break parent_const.configure if parent_const.respond_to? :configure
73
+ namespace.pop
74
+ end
75
+ default_config = Client::Configuration.new parent_config
76
+
77
+ default_config
78
+ end
79
+ yield @configure if block_given?
80
+ @configure
81
+ end
82
+
83
+ ##
84
+ # Configure the AgentAnomalyDetectionService Client instance.
85
+ #
86
+ # The configuration is set to the derived mode, meaning that values can be changed,
87
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
88
+ # should be made on {Client.configure}.
89
+ #
90
+ # See {::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client::Configuration}
91
+ # for a description of the configuration fields.
92
+ #
93
+ # @yield [config] Configure the Client client.
94
+ # @yieldparam config [Client::Configuration]
95
+ #
96
+ # @return [Client::Configuration]
97
+ #
98
+ def configure
99
+ yield @config if block_given?
100
+ @config
101
+ end
102
+
103
+ ##
104
+ # The effective universe domain
105
+ #
106
+ # @return [String]
107
+ #
108
+ def universe_domain
109
+ @agent_anomaly_detection_service_stub.universe_domain
110
+ end
111
+
112
+ ##
113
+ # Create a new AgentAnomalyDetectionService REST client object.
114
+ #
115
+ # @example
116
+ #
117
+ # # Create a client using the default configuration
118
+ # client = ::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new
119
+ #
120
+ # # Create a client using a custom configuration
121
+ # client = ::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new do |config|
122
+ # config.timeout = 10.0
123
+ # end
124
+ #
125
+ # @yield [config] Configure the AgentAnomalyDetectionService client.
126
+ # @yieldparam config [Client::Configuration]
127
+ #
128
+ def initialize
129
+ # Create the configuration object
130
+ @config = Configuration.new Client.configure
131
+
132
+ # Yield the configuration if needed
133
+ yield @config if block_given?
134
+
135
+ # Create credentials
136
+ credentials = @config.credentials
137
+ # Use self-signed JWT if the endpoint is unchanged from default,
138
+ # but only if the default endpoint does not have a region prefix.
139
+ enable_self_signed_jwt = @config.endpoint.nil? ||
140
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
141
+ !@config.endpoint.split(".").first.include?("-"))
142
+ credentials ||= Credentials.default scope: @config.scope,
143
+ enable_self_signed_jwt: enable_self_signed_jwt
144
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
145
+ credentials = Credentials.new credentials, scope: @config.scope
146
+ end
147
+
148
+ @quota_project_id = @config.quota_project
149
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
150
+
151
+ @operations_client = ::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Operations.new do |config|
152
+ config.credentials = credentials
153
+ config.quota_project = @quota_project_id
154
+ config.endpoint = @config.endpoint
155
+ config.universe_domain = @config.universe_domain
156
+ end
157
+
158
+ @agent_anomaly_detection_service_stub = ::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::ServiceStub.new(
159
+ endpoint: @config.endpoint,
160
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
161
+ universe_domain: @config.universe_domain,
162
+ credentials: credentials,
163
+ logger: @config.logger
164
+ )
165
+
166
+ @agent_anomaly_detection_service_stub.logger(stub: true)&.info do |entry|
167
+ entry.set_system_name
168
+ entry.set_service
169
+ entry.message = "Created client for #{entry.service}"
170
+ entry.set_credentials_fields credentials
171
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
172
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
173
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
174
+ end
175
+
176
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
177
+ config.credentials = credentials
178
+ config.quota_project = @quota_project_id
179
+ config.endpoint = @agent_anomaly_detection_service_stub.endpoint
180
+ config.universe_domain = @agent_anomaly_detection_service_stub.universe_domain
181
+ config.bindings_override = @config.bindings_override
182
+ config.logger = @agent_anomaly_detection_service_stub.logger if config.respond_to? :logger=
183
+ end
184
+
185
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
186
+ config.credentials = credentials
187
+ config.quota_project = @quota_project_id
188
+ config.endpoint = @agent_anomaly_detection_service_stub.endpoint
189
+ config.universe_domain = @agent_anomaly_detection_service_stub.universe_domain
190
+ config.bindings_override = @config.bindings_override
191
+ config.logger = @agent_anomaly_detection_service_stub.logger if config.respond_to? :logger=
192
+ end
193
+ end
194
+
195
+ ##
196
+ # Get the associated client for long-running operations.
197
+ #
198
+ # @return [::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Operations]
199
+ #
200
+ attr_reader :operations_client
201
+
202
+ ##
203
+ # Get the associated client for mix-in of the Locations.
204
+ #
205
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
206
+ #
207
+ attr_reader :location_client
208
+
209
+ ##
210
+ # Get the associated client for mix-in of the IAMPolicy.
211
+ #
212
+ # @return [Google::Iam::V1::IAMPolicy::Rest::Client]
213
+ #
214
+ attr_reader :iam_policy_client
215
+
216
+ ##
217
+ # The logger used for request/response debug logging.
218
+ #
219
+ # @return [Logger]
220
+ #
221
+ def logger
222
+ @agent_anomaly_detection_service_stub.logger
223
+ end
224
+
225
+ # Service calls
226
+
227
+ ##
228
+ # Gets the details of a specific AgentAnomalyDetectionScope.
229
+ #
230
+ # @overload get_agent_anomaly_detection_scope(request, options = nil)
231
+ # Pass arguments to `get_agent_anomaly_detection_scope` via a request object, either of type
232
+ # {::Google::Cloud::AIPlatform::V1::GetAgentAnomalyDetectionScopeRequest} or an equivalent Hash.
233
+ #
234
+ # @param request [::Google::Cloud::AIPlatform::V1::GetAgentAnomalyDetectionScopeRequest, ::Hash]
235
+ # A request object representing the call parameters. Required. To specify no
236
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
237
+ # @param options [::Gapic::CallOptions, ::Hash]
238
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
239
+ #
240
+ # @overload get_agent_anomaly_detection_scope(name: nil)
241
+ # Pass arguments to `get_agent_anomaly_detection_scope` via keyword arguments. Note that at
242
+ # least one keyword argument is required. To specify no parameters, or to keep all
243
+ # the default parameter values, pass an empty Hash as a request object (see above).
244
+ #
245
+ # @param name [::String]
246
+ # Required. The name of the AgentAnomalyDetectionScope resource.
247
+ # Format:
248
+ # `projects/{project}/locations/{location}/agentAnomalyDetectionScopes/{agent_anomaly_detection_scope}`
249
+ # @yield [result, operation] Access the result along with the TransportOperation object
250
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionScope]
251
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
252
+ #
253
+ # @return [::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionScope]
254
+ #
255
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
256
+ #
257
+ # @example Basic example
258
+ # require "google/cloud/ai_platform/v1"
259
+ #
260
+ # # Create a client object. The client can be reused for multiple calls.
261
+ # client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new
262
+ #
263
+ # # Create a request. To set request fields, pass in keyword arguments.
264
+ # request = Google::Cloud::AIPlatform::V1::GetAgentAnomalyDetectionScopeRequest.new
265
+ #
266
+ # # Call the get_agent_anomaly_detection_scope method.
267
+ # result = client.get_agent_anomaly_detection_scope request
268
+ #
269
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionScope.
270
+ # p result
271
+ #
272
+ def get_agent_anomaly_detection_scope request, options = nil
273
+ raise ::ArgumentError, "request must be provided" if request.nil?
274
+
275
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetAgentAnomalyDetectionScopeRequest
276
+
277
+ # Converts hash and nil to an options object
278
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
279
+
280
+ # Customize the options with defaults
281
+ call_metadata = @config.rpcs.get_agent_anomaly_detection_scope.metadata.to_h
282
+
283
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
284
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
285
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
286
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
287
+ transports_version_send: [:rest]
288
+
289
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
290
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
291
+
292
+ options.apply_defaults timeout: @config.rpcs.get_agent_anomaly_detection_scope.timeout,
293
+ metadata: call_metadata,
294
+ retry_policy: @config.rpcs.get_agent_anomaly_detection_scope.retry_policy
295
+
296
+ options.apply_defaults timeout: @config.timeout,
297
+ metadata: @config.metadata,
298
+ retry_policy: @config.retry_policy
299
+
300
+ @agent_anomaly_detection_service_stub.get_agent_anomaly_detection_scope request, options do |result, operation|
301
+ yield result, operation if block_given?
302
+ end
303
+ rescue ::Gapic::Rest::Error => e
304
+ raise ::Google::Cloud::Error.from_error(e)
305
+ end
306
+
307
+ ##
308
+ # Gets the details of a specific MonitoredAgent.
309
+ #
310
+ # @overload get_monitored_agent(request, options = nil)
311
+ # Pass arguments to `get_monitored_agent` via a request object, either of type
312
+ # {::Google::Cloud::AIPlatform::V1::GetMonitoredAgentRequest} or an equivalent Hash.
313
+ #
314
+ # @param request [::Google::Cloud::AIPlatform::V1::GetMonitoredAgentRequest, ::Hash]
315
+ # A request object representing the call parameters. Required. To specify no
316
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
317
+ # @param options [::Gapic::CallOptions, ::Hash]
318
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
319
+ #
320
+ # @overload get_monitored_agent(name: nil)
321
+ # Pass arguments to `get_monitored_agent` via keyword arguments. Note that at
322
+ # least one keyword argument is required. To specify no parameters, or to keep all
323
+ # the default parameter values, pass an empty Hash as a request object (see above).
324
+ #
325
+ # @param name [::String]
326
+ # Required. The name of the MonitoredAgent resource.
327
+ # Format:
328
+ # `projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}`
329
+ # @yield [result, operation] Access the result along with the TransportOperation object
330
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::MonitoredAgent]
331
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
332
+ #
333
+ # @return [::Google::Cloud::AIPlatform::V1::MonitoredAgent]
334
+ #
335
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
336
+ #
337
+ # @example Basic example
338
+ # require "google/cloud/ai_platform/v1"
339
+ #
340
+ # # Create a client object. The client can be reused for multiple calls.
341
+ # client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new
342
+ #
343
+ # # Create a request. To set request fields, pass in keyword arguments.
344
+ # request = Google::Cloud::AIPlatform::V1::GetMonitoredAgentRequest.new
345
+ #
346
+ # # Call the get_monitored_agent method.
347
+ # result = client.get_monitored_agent request
348
+ #
349
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::MonitoredAgent.
350
+ # p result
351
+ #
352
+ def get_monitored_agent request, options = nil
353
+ raise ::ArgumentError, "request must be provided" if request.nil?
354
+
355
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetMonitoredAgentRequest
356
+
357
+ # Converts hash and nil to an options object
358
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
359
+
360
+ # Customize the options with defaults
361
+ call_metadata = @config.rpcs.get_monitored_agent.metadata.to_h
362
+
363
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
364
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
365
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
366
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
367
+ transports_version_send: [:rest]
368
+
369
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
370
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
371
+
372
+ options.apply_defaults timeout: @config.rpcs.get_monitored_agent.timeout,
373
+ metadata: call_metadata,
374
+ retry_policy: @config.rpcs.get_monitored_agent.retry_policy
375
+
376
+ options.apply_defaults timeout: @config.timeout,
377
+ metadata: @config.metadata,
378
+ retry_policy: @config.retry_policy
379
+
380
+ @agent_anomaly_detection_service_stub.get_monitored_agent request, options do |result, operation|
381
+ yield result, operation if block_given?
382
+ end
383
+ rescue ::Gapic::Rest::Error => e
384
+ raise ::Google::Cloud::Error.from_error(e)
385
+ end
386
+
387
+ ##
388
+ # Lists MonitoredAgents in a specific Location.
389
+ #
390
+ # @overload list_monitored_agents(request, options = nil)
391
+ # Pass arguments to `list_monitored_agents` via a request object, either of type
392
+ # {::Google::Cloud::AIPlatform::V1::ListMonitoredAgentsRequest} or an equivalent Hash.
393
+ #
394
+ # @param request [::Google::Cloud::AIPlatform::V1::ListMonitoredAgentsRequest, ::Hash]
395
+ # A request object representing the call parameters. Required. To specify no
396
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
397
+ # @param options [::Gapic::CallOptions, ::Hash]
398
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
399
+ #
400
+ # @overload list_monitored_agents(parent: nil, page_size: nil, page_token: nil, filter: nil)
401
+ # Pass arguments to `list_monitored_agents` via keyword arguments. Note that at
402
+ # least one keyword argument is required. To specify no parameters, or to keep all
403
+ # the default parameter values, pass an empty Hash as a request object (see above).
404
+ #
405
+ # @param parent [::String]
406
+ # Required. The resource name of the Location to list the
407
+ # MonitoredAgents from. Format:
408
+ # `projects/{project}/locations/{location}`
409
+ # @param page_size [::Integer]
410
+ # Optional. The standard list page size. The maximum value is 100; values
411
+ # above 100 will be coerced to 100. If unspecified, at most 10
412
+ # MonitoredAgents will be returned.
413
+ # @param page_token [::String]
414
+ # Optional. The standard list page token.
415
+ # @param filter [::String]
416
+ # Optional. An AIP-160 filter, currently restricted to a single equality
417
+ # predicate on `state`. The value must be the exact, case-sensitive name of a
418
+ # `MonitoredAgent.EnablementState` value: `ACTIVE`, `DISABLED`, `ENABLING`,
419
+ # or `ENABLEMENT_STATE_UNSPECIFIED`. A blank or absent filter returns every
420
+ # MonitoredAgent in the parent regardless of state; any other value returns
421
+ # `INVALID_ARGUMENT`.
422
+ #
423
+ # Example:
424
+ #
425
+ # ```
426
+ # state = ACTIVE
427
+ # ```
428
+ # @yield [result, operation] Access the result along with the TransportOperation object
429
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::MonitoredAgent>]
430
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
431
+ #
432
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::MonitoredAgent>]
433
+ #
434
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
435
+ #
436
+ # @example Basic example
437
+ # require "google/cloud/ai_platform/v1"
438
+ #
439
+ # # Create a client object. The client can be reused for multiple calls.
440
+ # client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new
441
+ #
442
+ # # Create a request. To set request fields, pass in keyword arguments.
443
+ # request = Google::Cloud::AIPlatform::V1::ListMonitoredAgentsRequest.new
444
+ #
445
+ # # Call the list_monitored_agents method.
446
+ # result = client.list_monitored_agents request
447
+ #
448
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
449
+ # # over elements, and API calls will be issued to fetch pages as needed.
450
+ # result.each do |item|
451
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::MonitoredAgent.
452
+ # p item
453
+ # end
454
+ #
455
+ def list_monitored_agents request, options = nil
456
+ raise ::ArgumentError, "request must be provided" if request.nil?
457
+
458
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListMonitoredAgentsRequest
459
+
460
+ # Converts hash and nil to an options object
461
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
462
+
463
+ # Customize the options with defaults
464
+ call_metadata = @config.rpcs.list_monitored_agents.metadata.to_h
465
+
466
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
467
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
468
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
469
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
470
+ transports_version_send: [:rest]
471
+
472
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
473
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
474
+
475
+ options.apply_defaults timeout: @config.rpcs.list_monitored_agents.timeout,
476
+ metadata: call_metadata,
477
+ retry_policy: @config.rpcs.list_monitored_agents.retry_policy
478
+
479
+ options.apply_defaults timeout: @config.timeout,
480
+ metadata: @config.metadata,
481
+ retry_policy: @config.retry_policy
482
+
483
+ @agent_anomaly_detection_service_stub.list_monitored_agents request, options do |result, operation|
484
+ result = ::Gapic::Rest::PagedEnumerable.new @agent_anomaly_detection_service_stub, :list_monitored_agents, "monitored_agents", request, result, options
485
+ yield result, operation if block_given?
486
+ throw :response, result
487
+ end
488
+ rescue ::Gapic::Rest::Error => e
489
+ raise ::Google::Cloud::Error.from_error(e)
490
+ end
491
+
492
+ ##
493
+ # Enables a specific MonitoredAgent.
494
+ #
495
+ # @overload enable_monitored_agent(request, options = nil)
496
+ # Pass arguments to `enable_monitored_agent` via a request object, either of type
497
+ # {::Google::Cloud::AIPlatform::V1::EnableMonitoredAgentRequest} or an equivalent Hash.
498
+ #
499
+ # @param request [::Google::Cloud::AIPlatform::V1::EnableMonitoredAgentRequest, ::Hash]
500
+ # A request object representing the call parameters. Required. To specify no
501
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
502
+ # @param options [::Gapic::CallOptions, ::Hash]
503
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
504
+ #
505
+ # @overload enable_monitored_agent(name: nil)
506
+ # Pass arguments to `enable_monitored_agent` via keyword arguments. Note that at
507
+ # least one keyword argument is required. To specify no parameters, or to keep all
508
+ # the default parameter values, pass an empty Hash as a request object (see above).
509
+ #
510
+ # @param name [::String]
511
+ # Required. The name of the MonitoredAgent resource to be enabled.
512
+ # Format:
513
+ # `projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}`
514
+ # @yield [result, operation] Access the result along with the TransportOperation object
515
+ # @yieldparam result [::Gapic::Operation]
516
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
517
+ #
518
+ # @return [::Gapic::Operation]
519
+ #
520
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
521
+ #
522
+ # @example Basic example
523
+ # require "google/cloud/ai_platform/v1"
524
+ #
525
+ # # Create a client object. The client can be reused for multiple calls.
526
+ # client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new
527
+ #
528
+ # # Create a request. To set request fields, pass in keyword arguments.
529
+ # request = Google::Cloud::AIPlatform::V1::EnableMonitoredAgentRequest.new
530
+ #
531
+ # # Call the enable_monitored_agent method.
532
+ # result = client.enable_monitored_agent request
533
+ #
534
+ # # The returned object is of type Gapic::Operation. You can use it to
535
+ # # check the status of an operation, cancel it, or wait for results.
536
+ # # Here is how to wait for a response.
537
+ # result.wait_until_done! timeout: 60
538
+ # if result.response?
539
+ # p result.response
540
+ # else
541
+ # puts "No response received."
542
+ # end
543
+ #
544
+ def enable_monitored_agent request, options = nil
545
+ raise ::ArgumentError, "request must be provided" if request.nil?
546
+
547
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::EnableMonitoredAgentRequest
548
+
549
+ # Converts hash and nil to an options object
550
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
551
+
552
+ # Customize the options with defaults
553
+ call_metadata = @config.rpcs.enable_monitored_agent.metadata.to_h
554
+
555
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
556
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
557
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
558
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
559
+ transports_version_send: [:rest]
560
+
561
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
562
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
563
+
564
+ options.apply_defaults timeout: @config.rpcs.enable_monitored_agent.timeout,
565
+ metadata: call_metadata,
566
+ retry_policy: @config.rpcs.enable_monitored_agent.retry_policy
567
+
568
+ options.apply_defaults timeout: @config.timeout,
569
+ metadata: @config.metadata,
570
+ retry_policy: @config.retry_policy
571
+
572
+ @agent_anomaly_detection_service_stub.enable_monitored_agent request, options do |result, operation|
573
+ result = ::Gapic::Operation.new result, @operations_client, options: options
574
+ yield result, operation if block_given?
575
+ throw :response, result
576
+ end
577
+ rescue ::Gapic::Rest::Error => e
578
+ raise ::Google::Cloud::Error.from_error(e)
579
+ end
580
+
581
+ ##
582
+ # Disables a specific MonitoredAgent.
583
+ #
584
+ # @overload disable_monitored_agent(request, options = nil)
585
+ # Pass arguments to `disable_monitored_agent` via a request object, either of type
586
+ # {::Google::Cloud::AIPlatform::V1::DisableMonitoredAgentRequest} or an equivalent Hash.
587
+ #
588
+ # @param request [::Google::Cloud::AIPlatform::V1::DisableMonitoredAgentRequest, ::Hash]
589
+ # A request object representing the call parameters. Required. To specify no
590
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
591
+ # @param options [::Gapic::CallOptions, ::Hash]
592
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
593
+ #
594
+ # @overload disable_monitored_agent(name: nil)
595
+ # Pass arguments to `disable_monitored_agent` via keyword arguments. Note that at
596
+ # least one keyword argument is required. To specify no parameters, or to keep all
597
+ # the default parameter values, pass an empty Hash as a request object (see above).
598
+ #
599
+ # @param name [::String]
600
+ # Required. The name of the MonitoredAgent resource to be disabled.
601
+ # Format:
602
+ # `projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}`
603
+ # @yield [result, operation] Access the result along with the TransportOperation object
604
+ # @yieldparam result [::Gapic::Operation]
605
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
606
+ #
607
+ # @return [::Gapic::Operation]
608
+ #
609
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
610
+ #
611
+ # @example Basic example
612
+ # require "google/cloud/ai_platform/v1"
613
+ #
614
+ # # Create a client object. The client can be reused for multiple calls.
615
+ # client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new
616
+ #
617
+ # # Create a request. To set request fields, pass in keyword arguments.
618
+ # request = Google::Cloud::AIPlatform::V1::DisableMonitoredAgentRequest.new
619
+ #
620
+ # # Call the disable_monitored_agent method.
621
+ # result = client.disable_monitored_agent request
622
+ #
623
+ # # The returned object is of type Gapic::Operation. You can use it to
624
+ # # check the status of an operation, cancel it, or wait for results.
625
+ # # Here is how to wait for a response.
626
+ # result.wait_until_done! timeout: 60
627
+ # if result.response?
628
+ # p result.response
629
+ # else
630
+ # puts "No response received."
631
+ # end
632
+ #
633
+ def disable_monitored_agent request, options = nil
634
+ raise ::ArgumentError, "request must be provided" if request.nil?
635
+
636
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DisableMonitoredAgentRequest
637
+
638
+ # Converts hash and nil to an options object
639
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
640
+
641
+ # Customize the options with defaults
642
+ call_metadata = @config.rpcs.disable_monitored_agent.metadata.to_h
643
+
644
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
645
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
646
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
647
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
648
+ transports_version_send: [:rest]
649
+
650
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
651
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
652
+
653
+ options.apply_defaults timeout: @config.rpcs.disable_monitored_agent.timeout,
654
+ metadata: call_metadata,
655
+ retry_policy: @config.rpcs.disable_monitored_agent.retry_policy
656
+
657
+ options.apply_defaults timeout: @config.timeout,
658
+ metadata: @config.metadata,
659
+ retry_policy: @config.retry_policy
660
+
661
+ @agent_anomaly_detection_service_stub.disable_monitored_agent request, options do |result, operation|
662
+ result = ::Gapic::Operation.new result, @operations_client, options: options
663
+ yield result, operation if block_given?
664
+ throw :response, result
665
+ end
666
+ rescue ::Gapic::Rest::Error => e
667
+ raise ::Google::Cloud::Error.from_error(e)
668
+ end
669
+
670
+ ##
671
+ # Deletes a specific AgentAnomalyDetectionScope.
672
+ #
673
+ # @overload delete_agent_anomaly_detection_scope(request, options = nil)
674
+ # Pass arguments to `delete_agent_anomaly_detection_scope` via a request object, either of type
675
+ # {::Google::Cloud::AIPlatform::V1::DeleteAgentAnomalyDetectionScopeRequest} or an equivalent Hash.
676
+ #
677
+ # @param request [::Google::Cloud::AIPlatform::V1::DeleteAgentAnomalyDetectionScopeRequest, ::Hash]
678
+ # A request object representing the call parameters. Required. To specify no
679
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
680
+ # @param options [::Gapic::CallOptions, ::Hash]
681
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
682
+ #
683
+ # @overload delete_agent_anomaly_detection_scope(name: nil)
684
+ # Pass arguments to `delete_agent_anomaly_detection_scope` via keyword arguments. Note that at
685
+ # least one keyword argument is required. To specify no parameters, or to keep all
686
+ # the default parameter values, pass an empty Hash as a request object (see above).
687
+ #
688
+ # @param name [::String]
689
+ # Required. The name of the AgentAnomalyDetectionScope resource to be
690
+ # deleted. Format:
691
+ # `projects/{project}/locations/{location}/agentAnomalyDetectionScopes/{agent_anomaly_detection_scope}`
692
+ # @yield [result, operation] Access the result along with the TransportOperation object
693
+ # @yieldparam result [::Gapic::Operation]
694
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
695
+ #
696
+ # @return [::Gapic::Operation]
697
+ #
698
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
699
+ #
700
+ # @example Basic example
701
+ # require "google/cloud/ai_platform/v1"
702
+ #
703
+ # # Create a client object. The client can be reused for multiple calls.
704
+ # client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new
705
+ #
706
+ # # Create a request. To set request fields, pass in keyword arguments.
707
+ # request = Google::Cloud::AIPlatform::V1::DeleteAgentAnomalyDetectionScopeRequest.new
708
+ #
709
+ # # Call the delete_agent_anomaly_detection_scope method.
710
+ # result = client.delete_agent_anomaly_detection_scope request
711
+ #
712
+ # # The returned object is of type Gapic::Operation. You can use it to
713
+ # # check the status of an operation, cancel it, or wait for results.
714
+ # # Here is how to wait for a response.
715
+ # result.wait_until_done! timeout: 60
716
+ # if result.response?
717
+ # p result.response
718
+ # else
719
+ # puts "No response received."
720
+ # end
721
+ #
722
+ def delete_agent_anomaly_detection_scope request, options = nil
723
+ raise ::ArgumentError, "request must be provided" if request.nil?
724
+
725
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteAgentAnomalyDetectionScopeRequest
726
+
727
+ # Converts hash and nil to an options object
728
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
729
+
730
+ # Customize the options with defaults
731
+ call_metadata = @config.rpcs.delete_agent_anomaly_detection_scope.metadata.to_h
732
+
733
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
734
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
735
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
736
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
737
+ transports_version_send: [:rest]
738
+
739
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
740
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
741
+
742
+ options.apply_defaults timeout: @config.rpcs.delete_agent_anomaly_detection_scope.timeout,
743
+ metadata: call_metadata,
744
+ retry_policy: @config.rpcs.delete_agent_anomaly_detection_scope.retry_policy
745
+
746
+ options.apply_defaults timeout: @config.timeout,
747
+ metadata: @config.metadata,
748
+ retry_policy: @config.retry_policy
749
+
750
+ @agent_anomaly_detection_service_stub.delete_agent_anomaly_detection_scope request, options do |result, operation|
751
+ result = ::Gapic::Operation.new result, @operations_client, options: options
752
+ yield result, operation if block_given?
753
+ throw :response, result
754
+ end
755
+ rescue ::Gapic::Rest::Error => e
756
+ raise ::Google::Cloud::Error.from_error(e)
757
+ end
758
+
759
+ ##
760
+ # Creates a new AgentAnomalyDetectionScope.
761
+ #
762
+ # @overload create_agent_anomaly_detection_scope(request, options = nil)
763
+ # Pass arguments to `create_agent_anomaly_detection_scope` via a request object, either of type
764
+ # {::Google::Cloud::AIPlatform::V1::CreateAgentAnomalyDetectionScopeRequest} or an equivalent Hash.
765
+ #
766
+ # @param request [::Google::Cloud::AIPlatform::V1::CreateAgentAnomalyDetectionScopeRequest, ::Hash]
767
+ # A request object representing the call parameters. Required. To specify no
768
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
769
+ # @param options [::Gapic::CallOptions, ::Hash]
770
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
771
+ #
772
+ # @overload create_agent_anomaly_detection_scope(parent: nil, agent_anomaly_detection_scope: nil, agent_anomaly_detection_scope_id: nil)
773
+ # Pass arguments to `create_agent_anomaly_detection_scope` via keyword arguments. Note that at
774
+ # least one keyword argument is required. To specify no parameters, or to keep all
775
+ # the default parameter values, pass an empty Hash as a request object (see above).
776
+ #
777
+ # @param parent [::String]
778
+ # Required. The resource name of the Location to create the
779
+ # AgentAnomalyDetectionScope in. Format:
780
+ # `projects/{project}/locations/{location}`
781
+ # @param agent_anomaly_detection_scope [::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionScope, ::Hash]
782
+ # Required. The AgentAnomalyDetectionScope to create.
783
+ # @param agent_anomaly_detection_scope_id [::String]
784
+ # Required. The ID to use for the AgentAnomalyDetectionScope, which will
785
+ # become the final component of the AgentAnomalyDetectionScope's resource
786
+ # name.
787
+ #
788
+ # This value should be 1-63 characters, and valid characters
789
+ # are /[a-z]([a-z0-9-]\\{0,61}[a-z0-9])?/.
790
+ # @yield [result, operation] Access the result along with the TransportOperation object
791
+ # @yieldparam result [::Gapic::Operation]
792
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
793
+ #
794
+ # @return [::Gapic::Operation]
795
+ #
796
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
797
+ #
798
+ # @example Basic example
799
+ # require "google/cloud/ai_platform/v1"
800
+ #
801
+ # # Create a client object. The client can be reused for multiple calls.
802
+ # client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new
803
+ #
804
+ # # Create a request. To set request fields, pass in keyword arguments.
805
+ # request = Google::Cloud::AIPlatform::V1::CreateAgentAnomalyDetectionScopeRequest.new
806
+ #
807
+ # # Call the create_agent_anomaly_detection_scope method.
808
+ # result = client.create_agent_anomaly_detection_scope request
809
+ #
810
+ # # The returned object is of type Gapic::Operation. You can use it to
811
+ # # check the status of an operation, cancel it, or wait for results.
812
+ # # Here is how to wait for a response.
813
+ # result.wait_until_done! timeout: 60
814
+ # if result.response?
815
+ # p result.response
816
+ # else
817
+ # puts "No response received."
818
+ # end
819
+ #
820
+ def create_agent_anomaly_detection_scope request, options = nil
821
+ raise ::ArgumentError, "request must be provided" if request.nil?
822
+
823
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateAgentAnomalyDetectionScopeRequest
824
+
825
+ # Converts hash and nil to an options object
826
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
827
+
828
+ # Customize the options with defaults
829
+ call_metadata = @config.rpcs.create_agent_anomaly_detection_scope.metadata.to_h
830
+
831
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
832
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
833
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
834
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
835
+ transports_version_send: [:rest]
836
+
837
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
838
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
839
+
840
+ options.apply_defaults timeout: @config.rpcs.create_agent_anomaly_detection_scope.timeout,
841
+ metadata: call_metadata,
842
+ retry_policy: @config.rpcs.create_agent_anomaly_detection_scope.retry_policy
843
+
844
+ options.apply_defaults timeout: @config.timeout,
845
+ metadata: @config.metadata,
846
+ retry_policy: @config.retry_policy
847
+
848
+ @agent_anomaly_detection_service_stub.create_agent_anomaly_detection_scope request, options do |result, operation|
849
+ result = ::Gapic::Operation.new result, @operations_client, options: options
850
+ yield result, operation if block_given?
851
+ throw :response, result
852
+ end
853
+ rescue ::Gapic::Rest::Error => e
854
+ raise ::Google::Cloud::Error.from_error(e)
855
+ end
856
+
857
+ ##
858
+ # Lists AgentAnomalyDetectionScopes in a Location.
859
+ #
860
+ # @overload list_agent_anomaly_detection_scopes(request, options = nil)
861
+ # Pass arguments to `list_agent_anomaly_detection_scopes` via a request object, either of type
862
+ # {::Google::Cloud::AIPlatform::V1::ListAgentAnomalyDetectionScopesRequest} or an equivalent Hash.
863
+ #
864
+ # @param request [::Google::Cloud::AIPlatform::V1::ListAgentAnomalyDetectionScopesRequest, ::Hash]
865
+ # A request object representing the call parameters. Required. To specify no
866
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
867
+ # @param options [::Gapic::CallOptions, ::Hash]
868
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
869
+ #
870
+ # @overload list_agent_anomaly_detection_scopes(parent: nil, page_size: nil, page_token: nil)
871
+ # Pass arguments to `list_agent_anomaly_detection_scopes` via keyword arguments. Note that at
872
+ # least one keyword argument is required. To specify no parameters, or to keep all
873
+ # the default parameter values, pass an empty Hash as a request object (see above).
874
+ #
875
+ # @param parent [::String]
876
+ # Required. The resource name of the Location to list the
877
+ # AgentAnomalyDetectionScopes from. Format:
878
+ # `projects/{project}/locations/{location}`
879
+ # @param page_size [::Integer]
880
+ # Optional. The standard list page size. The maximum value is 100; values
881
+ # above 100 will be coerced to 100. If unspecified, at most 10
882
+ # AgentAnomalyDetectionScopes will be returned.
883
+ # @param page_token [::String]
884
+ # Optional. The standard list page token.
885
+ # @yield [result, operation] Access the result along with the TransportOperation object
886
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionScope>]
887
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
888
+ #
889
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionScope>]
890
+ #
891
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
892
+ #
893
+ # @example Basic example
894
+ # require "google/cloud/ai_platform/v1"
895
+ #
896
+ # # Create a client object. The client can be reused for multiple calls.
897
+ # client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new
898
+ #
899
+ # # Create a request. To set request fields, pass in keyword arguments.
900
+ # request = Google::Cloud::AIPlatform::V1::ListAgentAnomalyDetectionScopesRequest.new
901
+ #
902
+ # # Call the list_agent_anomaly_detection_scopes method.
903
+ # result = client.list_agent_anomaly_detection_scopes request
904
+ #
905
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
906
+ # # over elements, and API calls will be issued to fetch pages as needed.
907
+ # result.each do |item|
908
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionScope.
909
+ # p item
910
+ # end
911
+ #
912
+ def list_agent_anomaly_detection_scopes request, options = nil
913
+ raise ::ArgumentError, "request must be provided" if request.nil?
914
+
915
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListAgentAnomalyDetectionScopesRequest
916
+
917
+ # Converts hash and nil to an options object
918
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
919
+
920
+ # Customize the options with defaults
921
+ call_metadata = @config.rpcs.list_agent_anomaly_detection_scopes.metadata.to_h
922
+
923
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
924
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
925
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
926
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
927
+ transports_version_send: [:rest]
928
+
929
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
930
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
931
+
932
+ options.apply_defaults timeout: @config.rpcs.list_agent_anomaly_detection_scopes.timeout,
933
+ metadata: call_metadata,
934
+ retry_policy: @config.rpcs.list_agent_anomaly_detection_scopes.retry_policy
935
+
936
+ options.apply_defaults timeout: @config.timeout,
937
+ metadata: @config.metadata,
938
+ retry_policy: @config.retry_policy
939
+
940
+ @agent_anomaly_detection_service_stub.list_agent_anomaly_detection_scopes request, options do |result, operation|
941
+ result = ::Gapic::Rest::PagedEnumerable.new @agent_anomaly_detection_service_stub, :list_agent_anomaly_detection_scopes, "agent_anomaly_detection_scopes", request, result, options
942
+ yield result, operation if block_given?
943
+ throw :response, result
944
+ end
945
+ rescue ::Gapic::Rest::Error => e
946
+ raise ::Google::Cloud::Error.from_error(e)
947
+ end
948
+
949
+ ##
950
+ # Lists AnalyzedSessions in a MonitoredAgent.
951
+ #
952
+ # @overload list_analyzed_sessions(request, options = nil)
953
+ # Pass arguments to `list_analyzed_sessions` via a request object, either of type
954
+ # {::Google::Cloud::AIPlatform::V1::ListAnalyzedSessionsRequest} or an equivalent Hash.
955
+ #
956
+ # @param request [::Google::Cloud::AIPlatform::V1::ListAnalyzedSessionsRequest, ::Hash]
957
+ # A request object representing the call parameters. Required. To specify no
958
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
959
+ # @param options [::Gapic::CallOptions, ::Hash]
960
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
961
+ #
962
+ # @overload list_analyzed_sessions(parent: nil, page_size: nil, page_token: nil, filter: nil, view: nil, order_by: nil)
963
+ # Pass arguments to `list_analyzed_sessions` via keyword arguments. Note that at
964
+ # least one keyword argument is required. To specify no parameters, or to keep all
965
+ # the default parameter values, pass an empty Hash as a request object (see above).
966
+ #
967
+ # @param parent [::String]
968
+ # Required. The parent MonitoredAgent resource.
969
+ # Format:
970
+ # `projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}`
971
+ # @param page_size [::Integer]
972
+ # Optional. The maximum number of analyzed sessions to return.
973
+ # @param page_token [::String]
974
+ # Optional. A page token, received from a previous `ListAnalyzedSessions`
975
+ # call.
976
+ # @param filter [::String]
977
+ # Optional. Filter expression restricting which AnalyzedSessions are
978
+ # returned. Supports a subset of AIP-160: a closed `detection_time` window
979
+ # (both bounds required), an equality on `severity`, an equality on
980
+ # `agent_type`, and an equality on `session_id`, joined by `AND`. Each
981
+ # clause is optional, may appear at most once, and may appear in any order.
982
+ #
983
+ # The `severity` value is the **canonical** `Severity` enum name --
984
+ # `SEVERITY_CRITICAL`, `SEVERITY_HIGH`, `SEVERITY_MEDIUM` or `SEVERITY_LOW`.
985
+ # Short forms such as `"CRITICAL"` are rejected, as is
986
+ # `SEVERITY_UNSPECIFIED`. It matches sessions whose *maximum* severity equals
987
+ # that bucket: a session that fires at both LOW and CRITICAL matches
988
+ # `severity = "SEVERITY_CRITICAL"`, not `severity = "SEVERITY_LOW"`.
989
+ #
990
+ # The `agent_type` value is the canonical `AgentResource.AgentType` enum name
991
+ # -- `REASONING_ENGINE`, `CLOUD_RUN_SERVICE`, `GKE_WORKLOAD`, `GCE_INSTANCE`,
992
+ # `AWS`, `AZURE`, `AGENT_TYPE_OTHER` or `AGENT_TYPE_UNSPECIFIED` -- and
993
+ # matches sessions run by an agent on that runtime.
994
+ #
995
+ # Unlike `severity`, `agent_type` accepts its `UNSPECIFIED` value. The two
996
+ # are not analogous: a session always has a computed severity bucket, so
997
+ # `SEVERITY_UNSPECIFIED` is never returned and filtering on it could only
998
+ # match nothing. `AGENT_TYPE_UNSPECIFIED` *is* returned -- it is what
999
+ # `AnalyzedSession.agent_type` reports for an agent whose runtime was never
1000
+ # recorded -- so it must remain filterable.
1001
+ #
1002
+ # The `session_id` value is a case-sensitive exact match (no substring or
1003
+ # prefix matching) on `AnalyzedSession.session_id`. Unlike `severity` and
1004
+ # `agent_type` it is not a closed enum, so any non-empty value is accepted;
1005
+ # an empty value (`session_id = ""`) is rejected rather than treated as "no
1006
+ # filter".
1007
+ #
1008
+ # Example (time window, severity and runtime):
1009
+ #
1010
+ # ```
1011
+ # detection_time >= "2024-01-01T00:00:00Z" AND detection_time <=
1012
+ # "2024-01-08T00:00:00Z" AND severity = "SEVERITY_CRITICAL" AND agent_type =
1013
+ # "CLOUD_RUN_SERVICE"
1014
+ # ```
1015
+ #
1016
+ # If empty, results are restricted to the last 7 days with no severity,
1017
+ # runtime, or session restriction. Other fields, additional operators, set
1018
+ # membership (`IN`), and boolean combinations (`OR`, `NOT`, parentheses) are
1019
+ # not yet supported.
1020
+ # @param view [::Google::Cloud::AIPlatform::V1::AnalyzedSessionView]
1021
+ # Optional. Resource view to control which fields are returned.
1022
+ # @param order_by [::String]
1023
+ # Optional. Comma-separated list of fields to sort by, following AIP-132
1024
+ # syntax. The default sort direction is ascending; append " desc" to a
1025
+ # field to sort descending.
1026
+ #
1027
+ # Supported fields (any other field yields INVALID_ARGUMENT):
1028
+ #
1029
+ # * `latest_detection_time` - the session's most-recent flagged detection
1030
+ # time. `latest_detection_time desc` puts the newest sessions first.
1031
+ # * `max_severity_rank` - the session's bucketed maximum severity, ranked
1032
+ # LOW=1 < MEDIUM=2 < HIGH=3 < CRITICAL=4. `max_severity_rank desc` puts
1033
+ # the most-severe sessions first.
1034
+ # * `agent_display_name` - the MonitoredAgent's display name. Sorted as a
1035
+ # STRING (case-sensitive, code-point order).
1036
+ #
1037
+ # If empty, defaults to `latest_detection_time desc`. Multi-field sort
1038
+ # (for example, `max_severity_rank desc, latest_detection_time desc`) is
1039
+ # supported.
1040
+ #
1041
+ # The `order_by` value MUST match the value used on the call that minted any
1042
+ # supplied `page_token` (AIP-158). Mismatches yield INVALID_ARGUMENT.
1043
+ # @yield [result, operation] Access the result along with the TransportOperation object
1044
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AnalyzedSession>]
1045
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1046
+ #
1047
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AnalyzedSession>]
1048
+ #
1049
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1050
+ #
1051
+ # @example Basic example
1052
+ # require "google/cloud/ai_platform/v1"
1053
+ #
1054
+ # # Create a client object. The client can be reused for multiple calls.
1055
+ # client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new
1056
+ #
1057
+ # # Create a request. To set request fields, pass in keyword arguments.
1058
+ # request = Google::Cloud::AIPlatform::V1::ListAnalyzedSessionsRequest.new
1059
+ #
1060
+ # # Call the list_analyzed_sessions method.
1061
+ # result = client.list_analyzed_sessions request
1062
+ #
1063
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1064
+ # # over elements, and API calls will be issued to fetch pages as needed.
1065
+ # result.each do |item|
1066
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::AnalyzedSession.
1067
+ # p item
1068
+ # end
1069
+ #
1070
+ def list_analyzed_sessions request, options = nil
1071
+ raise ::ArgumentError, "request must be provided" if request.nil?
1072
+
1073
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListAnalyzedSessionsRequest
1074
+
1075
+ # Converts hash and nil to an options object
1076
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1077
+
1078
+ # Customize the options with defaults
1079
+ call_metadata = @config.rpcs.list_analyzed_sessions.metadata.to_h
1080
+
1081
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1082
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1083
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1084
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1085
+ transports_version_send: [:rest]
1086
+
1087
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1088
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1089
+
1090
+ options.apply_defaults timeout: @config.rpcs.list_analyzed_sessions.timeout,
1091
+ metadata: call_metadata,
1092
+ retry_policy: @config.rpcs.list_analyzed_sessions.retry_policy
1093
+
1094
+ options.apply_defaults timeout: @config.timeout,
1095
+ metadata: @config.metadata,
1096
+ retry_policy: @config.retry_policy
1097
+
1098
+ @agent_anomaly_detection_service_stub.list_analyzed_sessions request, options do |result, operation|
1099
+ result = ::Gapic::Rest::PagedEnumerable.new @agent_anomaly_detection_service_stub, :list_analyzed_sessions, "analyzed_sessions", request, result, options
1100
+ yield result, operation if block_given?
1101
+ throw :response, result
1102
+ end
1103
+ rescue ::Gapic::Rest::Error => e
1104
+ raise ::Google::Cloud::Error.from_error(e)
1105
+ end
1106
+
1107
+ ##
1108
+ # Gets the details of a specific AnalyzedSession.
1109
+ #
1110
+ # @overload get_analyzed_session(request, options = nil)
1111
+ # Pass arguments to `get_analyzed_session` via a request object, either of type
1112
+ # {::Google::Cloud::AIPlatform::V1::GetAnalyzedSessionRequest} or an equivalent Hash.
1113
+ #
1114
+ # @param request [::Google::Cloud::AIPlatform::V1::GetAnalyzedSessionRequest, ::Hash]
1115
+ # A request object representing the call parameters. Required. To specify no
1116
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1117
+ # @param options [::Gapic::CallOptions, ::Hash]
1118
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1119
+ #
1120
+ # @overload get_analyzed_session(name: nil, view: nil)
1121
+ # Pass arguments to `get_analyzed_session` via keyword arguments. Note that at
1122
+ # least one keyword argument is required. To specify no parameters, or to keep all
1123
+ # the default parameter values, pass an empty Hash as a request object (see above).
1124
+ #
1125
+ # @param name [::String]
1126
+ # Required. The name of the AnalyzedSession resource.
1127
+ # Format:
1128
+ # `projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}/analyzedSessions/{analyzed_session}`
1129
+ # @param view [::Google::Cloud::AIPlatform::V1::AnalyzedSessionView]
1130
+ # Optional. Resource view to control which fields are returned.
1131
+ # @yield [result, operation] Access the result along with the TransportOperation object
1132
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::AnalyzedSession]
1133
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1134
+ #
1135
+ # @return [::Google::Cloud::AIPlatform::V1::AnalyzedSession]
1136
+ #
1137
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1138
+ #
1139
+ # @example Basic example
1140
+ # require "google/cloud/ai_platform/v1"
1141
+ #
1142
+ # # Create a client object. The client can be reused for multiple calls.
1143
+ # client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new
1144
+ #
1145
+ # # Create a request. To set request fields, pass in keyword arguments.
1146
+ # request = Google::Cloud::AIPlatform::V1::GetAnalyzedSessionRequest.new
1147
+ #
1148
+ # # Call the get_analyzed_session method.
1149
+ # result = client.get_analyzed_session request
1150
+ #
1151
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::AnalyzedSession.
1152
+ # p result
1153
+ #
1154
+ def get_analyzed_session request, options = nil
1155
+ raise ::ArgumentError, "request must be provided" if request.nil?
1156
+
1157
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetAnalyzedSessionRequest
1158
+
1159
+ # Converts hash and nil to an options object
1160
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1161
+
1162
+ # Customize the options with defaults
1163
+ call_metadata = @config.rpcs.get_analyzed_session.metadata.to_h
1164
+
1165
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1166
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1167
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1168
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1169
+ transports_version_send: [:rest]
1170
+
1171
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1172
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1173
+
1174
+ options.apply_defaults timeout: @config.rpcs.get_analyzed_session.timeout,
1175
+ metadata: call_metadata,
1176
+ retry_policy: @config.rpcs.get_analyzed_session.retry_policy
1177
+
1178
+ options.apply_defaults timeout: @config.timeout,
1179
+ metadata: @config.metadata,
1180
+ retry_policy: @config.retry_policy
1181
+
1182
+ @agent_anomaly_detection_service_stub.get_analyzed_session request, options do |result, operation|
1183
+ yield result, operation if block_given?
1184
+ end
1185
+ rescue ::Gapic::Rest::Error => e
1186
+ raise ::Google::Cloud::Error.from_error(e)
1187
+ end
1188
+
1189
+ ##
1190
+ # Lists AnalyzedInvocations in a MonitoredAgent's AnalyzedSession.
1191
+ #
1192
+ # @overload list_analyzed_invocations(request, options = nil)
1193
+ # Pass arguments to `list_analyzed_invocations` via a request object, either of type
1194
+ # {::Google::Cloud::AIPlatform::V1::ListAnalyzedInvocationsRequest} or an equivalent Hash.
1195
+ #
1196
+ # @param request [::Google::Cloud::AIPlatform::V1::ListAnalyzedInvocationsRequest, ::Hash]
1197
+ # A request object representing the call parameters. Required. To specify no
1198
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1199
+ # @param options [::Gapic::CallOptions, ::Hash]
1200
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1201
+ #
1202
+ # @overload list_analyzed_invocations(parent: nil, page_size: nil, page_token: nil)
1203
+ # Pass arguments to `list_analyzed_invocations` via keyword arguments. Note that at
1204
+ # least one keyword argument is required. To specify no parameters, or to keep all
1205
+ # the default parameter values, pass an empty Hash as a request object (see above).
1206
+ #
1207
+ # @param parent [::String]
1208
+ # Required. The parent AnalyzedSession resource.
1209
+ # Format:
1210
+ # `projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}/analyzedSessions/{analyzed_session}`
1211
+ # @param page_size [::Integer]
1212
+ # Optional. The maximum number of analyzed invocations to return.
1213
+ # @param page_token [::String]
1214
+ # Optional. A page token, received from a previous `ListAnalyzedInvocations`
1215
+ # call.
1216
+ # @yield [result, operation] Access the result along with the TransportOperation object
1217
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AnalyzedInvocation>]
1218
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1219
+ #
1220
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AnalyzedInvocation>]
1221
+ #
1222
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1223
+ #
1224
+ # @example Basic example
1225
+ # require "google/cloud/ai_platform/v1"
1226
+ #
1227
+ # # Create a client object. The client can be reused for multiple calls.
1228
+ # client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new
1229
+ #
1230
+ # # Create a request. To set request fields, pass in keyword arguments.
1231
+ # request = Google::Cloud::AIPlatform::V1::ListAnalyzedInvocationsRequest.new
1232
+ #
1233
+ # # Call the list_analyzed_invocations method.
1234
+ # result = client.list_analyzed_invocations request
1235
+ #
1236
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1237
+ # # over elements, and API calls will be issued to fetch pages as needed.
1238
+ # result.each do |item|
1239
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::AnalyzedInvocation.
1240
+ # p item
1241
+ # end
1242
+ #
1243
+ def list_analyzed_invocations request, options = nil
1244
+ raise ::ArgumentError, "request must be provided" if request.nil?
1245
+
1246
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListAnalyzedInvocationsRequest
1247
+
1248
+ # Converts hash and nil to an options object
1249
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1250
+
1251
+ # Customize the options with defaults
1252
+ call_metadata = @config.rpcs.list_analyzed_invocations.metadata.to_h
1253
+
1254
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1255
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1256
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1257
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1258
+ transports_version_send: [:rest]
1259
+
1260
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1261
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1262
+
1263
+ options.apply_defaults timeout: @config.rpcs.list_analyzed_invocations.timeout,
1264
+ metadata: call_metadata,
1265
+ retry_policy: @config.rpcs.list_analyzed_invocations.retry_policy
1266
+
1267
+ options.apply_defaults timeout: @config.timeout,
1268
+ metadata: @config.metadata,
1269
+ retry_policy: @config.retry_policy
1270
+
1271
+ @agent_anomaly_detection_service_stub.list_analyzed_invocations request, options do |result, operation|
1272
+ result = ::Gapic::Rest::PagedEnumerable.new @agent_anomaly_detection_service_stub, :list_analyzed_invocations, "analyzed_invocations", request, result, options
1273
+ yield result, operation if block_given?
1274
+ throw :response, result
1275
+ end
1276
+ rescue ::Gapic::Rest::Error => e
1277
+ raise ::Google::Cloud::Error.from_error(e)
1278
+ end
1279
+
1280
+ ##
1281
+ # Gets the details of a specific AnalyzedInvocation.
1282
+ #
1283
+ # @overload get_analyzed_invocation(request, options = nil)
1284
+ # Pass arguments to `get_analyzed_invocation` via a request object, either of type
1285
+ # {::Google::Cloud::AIPlatform::V1::GetAnalyzedInvocationRequest} or an equivalent Hash.
1286
+ #
1287
+ # @param request [::Google::Cloud::AIPlatform::V1::GetAnalyzedInvocationRequest, ::Hash]
1288
+ # A request object representing the call parameters. Required. To specify no
1289
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1290
+ # @param options [::Gapic::CallOptions, ::Hash]
1291
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1292
+ #
1293
+ # @overload get_analyzed_invocation(name: nil)
1294
+ # Pass arguments to `get_analyzed_invocation` via keyword arguments. Note that at
1295
+ # least one keyword argument is required. To specify no parameters, or to keep all
1296
+ # the default parameter values, pass an empty Hash as a request object (see above).
1297
+ #
1298
+ # @param name [::String]
1299
+ # Required. The name of the AnalyzedInvocation resource.
1300
+ # Format:
1301
+ # `projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}/analyzedSessions/{analyzed_session}/analyzedInvocations/{analyzed_invocation}`
1302
+ # @yield [result, operation] Access the result along with the TransportOperation object
1303
+ # @yieldparam result [::Google::Cloud::AIPlatform::V1::AnalyzedInvocation]
1304
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1305
+ #
1306
+ # @return [::Google::Cloud::AIPlatform::V1::AnalyzedInvocation]
1307
+ #
1308
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1309
+ #
1310
+ # @example Basic example
1311
+ # require "google/cloud/ai_platform/v1"
1312
+ #
1313
+ # # Create a client object. The client can be reused for multiple calls.
1314
+ # client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new
1315
+ #
1316
+ # # Create a request. To set request fields, pass in keyword arguments.
1317
+ # request = Google::Cloud::AIPlatform::V1::GetAnalyzedInvocationRequest.new
1318
+ #
1319
+ # # Call the get_analyzed_invocation method.
1320
+ # result = client.get_analyzed_invocation request
1321
+ #
1322
+ # # The returned object is of type Google::Cloud::AIPlatform::V1::AnalyzedInvocation.
1323
+ # p result
1324
+ #
1325
+ def get_analyzed_invocation request, options = nil
1326
+ raise ::ArgumentError, "request must be provided" if request.nil?
1327
+
1328
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetAnalyzedInvocationRequest
1329
+
1330
+ # Converts hash and nil to an options object
1331
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1332
+
1333
+ # Customize the options with defaults
1334
+ call_metadata = @config.rpcs.get_analyzed_invocation.metadata.to_h
1335
+
1336
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1337
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1338
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1339
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1340
+ transports_version_send: [:rest]
1341
+
1342
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1343
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1344
+
1345
+ options.apply_defaults timeout: @config.rpcs.get_analyzed_invocation.timeout,
1346
+ metadata: call_metadata,
1347
+ retry_policy: @config.rpcs.get_analyzed_invocation.retry_policy
1348
+
1349
+ options.apply_defaults timeout: @config.timeout,
1350
+ metadata: @config.metadata,
1351
+ retry_policy: @config.retry_policy
1352
+
1353
+ @agent_anomaly_detection_service_stub.get_analyzed_invocation request, options do |result, operation|
1354
+ yield result, operation if block_given?
1355
+ end
1356
+ rescue ::Gapic::Rest::Error => e
1357
+ raise ::Google::Cloud::Error.from_error(e)
1358
+ end
1359
+
1360
+ ##
1361
+ # Aggregates AnalyzedSessions across MonitoredAgents.
1362
+ #
1363
+ # To aggregate across all MonitoredAgents in a
1364
+ # location, use the following format for the parent field:
1365
+ # `projects/{project}/locations/{location}/monitoredAgents/-`
1366
+ #
1367
+ # @overload aggregate_analyzed_sessions(request, options = nil)
1368
+ # Pass arguments to `aggregate_analyzed_sessions` via a request object, either of type
1369
+ # {::Google::Cloud::AIPlatform::V1::AggregateAnalyzedSessionsRequest} or an equivalent Hash.
1370
+ #
1371
+ # @param request [::Google::Cloud::AIPlatform::V1::AggregateAnalyzedSessionsRequest, ::Hash]
1372
+ # A request object representing the call parameters. Required. To specify no
1373
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1374
+ # @param options [::Gapic::CallOptions, ::Hash]
1375
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1376
+ #
1377
+ # @overload aggregate_analyzed_sessions(parent: nil, filter: nil, page_size: nil, page_token: nil)
1378
+ # Pass arguments to `aggregate_analyzed_sessions` via keyword arguments. Note that at
1379
+ # least one keyword argument is required. To specify no parameters, or to keep all
1380
+ # the default parameter values, pass an empty Hash as a request object (see above).
1381
+ #
1382
+ # @param parent [::String]
1383
+ # Required. The parent MonitoredAgent resource. Use the `-` wildcard
1384
+ # for the monitored_agent segment to aggregate across multiple agents in the
1385
+ # location.
1386
+ # Format:
1387
+ # `projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}`
1388
+ # @param filter [::String]
1389
+ # Optional. Filter expression restricting which AnalyzedSessions are included
1390
+ # in the aggregation. Supports a subset of the
1391
+ # `ListAnalyzedSessionsRequest.filter` grammar: a closed `detection_time`
1392
+ # window with both bounds required. The `severity` clause is not supported
1393
+ # here. If empty, the aggregation covers the last 3 days.
1394
+ #
1395
+ # Example:
1396
+ #
1397
+ # ```
1398
+ # detection_time >= "2024-01-01T00:00:00Z" AND detection_time <=
1399
+ # "2024-01-08T00:00:00Z"
1400
+ # ```
1401
+ # @param page_size [::Integer]
1402
+ # Optional. The standard list page size. The maximum value is 100; values
1403
+ # above 100 will be coerced to 100. If unspecified, at most 10
1404
+ # MonitoredAgents will be returned.
1405
+ # @param page_token [::String]
1406
+ # Optional. The standard list page token.
1407
+ # @yield [result, operation] Access the result along with the TransportOperation object
1408
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AggregateAnalyzedSessionsResponse::AgentAggregate>]
1409
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1410
+ #
1411
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AIPlatform::V1::AggregateAnalyzedSessionsResponse::AgentAggregate>]
1412
+ #
1413
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1414
+ #
1415
+ # @example Basic example
1416
+ # require "google/cloud/ai_platform/v1"
1417
+ #
1418
+ # # Create a client object. The client can be reused for multiple calls.
1419
+ # client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new
1420
+ #
1421
+ # # Create a request. To set request fields, pass in keyword arguments.
1422
+ # request = Google::Cloud::AIPlatform::V1::AggregateAnalyzedSessionsRequest.new
1423
+ #
1424
+ # # Call the aggregate_analyzed_sessions method.
1425
+ # result = client.aggregate_analyzed_sessions request
1426
+ #
1427
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1428
+ # # over elements, and API calls will be issued to fetch pages as needed.
1429
+ # result.each do |item|
1430
+ # # Each element is of type ::Google::Cloud::AIPlatform::V1::AggregateAnalyzedSessionsResponse::AgentAggregate.
1431
+ # p item
1432
+ # end
1433
+ #
1434
+ def aggregate_analyzed_sessions request, options = nil
1435
+ raise ::ArgumentError, "request must be provided" if request.nil?
1436
+
1437
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::AggregateAnalyzedSessionsRequest
1438
+
1439
+ # Converts hash and nil to an options object
1440
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1441
+
1442
+ # Customize the options with defaults
1443
+ call_metadata = @config.rpcs.aggregate_analyzed_sessions.metadata.to_h
1444
+
1445
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1446
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1447
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1448
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1449
+ transports_version_send: [:rest]
1450
+
1451
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1452
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1453
+
1454
+ options.apply_defaults timeout: @config.rpcs.aggregate_analyzed_sessions.timeout,
1455
+ metadata: call_metadata,
1456
+ retry_policy: @config.rpcs.aggregate_analyzed_sessions.retry_policy
1457
+
1458
+ options.apply_defaults timeout: @config.timeout,
1459
+ metadata: @config.metadata,
1460
+ retry_policy: @config.retry_policy
1461
+
1462
+ @agent_anomaly_detection_service_stub.aggregate_analyzed_sessions request, options do |result, operation|
1463
+ result = ::Gapic::Rest::PagedEnumerable.new @agent_anomaly_detection_service_stub, :aggregate_analyzed_sessions, "agent_aggregates", request, result, options
1464
+ yield result, operation if block_given?
1465
+ throw :response, result
1466
+ end
1467
+ rescue ::Gapic::Rest::Error => e
1468
+ raise ::Google::Cloud::Error.from_error(e)
1469
+ end
1470
+
1471
+ ##
1472
+ # Clears (purges) the trained model artifacts derived from a MonitoredAgent's
1473
+ # data. The purged model is rebuilt by the next scheduled training run.
1474
+ #
1475
+ # To clear every MonitoredAgent in a location's scope, use the `-` wildcard
1476
+ # agent segment for the name field:
1477
+ # `projects/{project}/locations/{location}/monitoredAgents/-`
1478
+ #
1479
+ # This is the on-demand data-deletion path for customers who have deleted the
1480
+ # underlying logs / observability data a model was trained on. It deletes
1481
+ # only the derived model artifacts (it does NOT delete the scope or stop
1482
+ # monitoring). To stop monitoring an agent entirely, disable it via
1483
+ # DisableMonitoredAgent.
1484
+ #
1485
+ # @overload clear_training_data(request, options = nil)
1486
+ # Pass arguments to `clear_training_data` via a request object, either of type
1487
+ # {::Google::Cloud::AIPlatform::V1::ClearTrainingDataRequest} or an equivalent Hash.
1488
+ #
1489
+ # @param request [::Google::Cloud::AIPlatform::V1::ClearTrainingDataRequest, ::Hash]
1490
+ # A request object representing the call parameters. Required. To specify no
1491
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1492
+ # @param options [::Gapic::CallOptions, ::Hash]
1493
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1494
+ #
1495
+ # @overload clear_training_data(name: nil)
1496
+ # Pass arguments to `clear_training_data` via keyword arguments. Note that at
1497
+ # least one keyword argument is required. To specify no parameters, or to keep all
1498
+ # the default parameter values, pass an empty Hash as a request object (see above).
1499
+ #
1500
+ # @param name [::String]
1501
+ # Required. The MonitoredAgent whose trained model artifacts to purge. Use
1502
+ # the
1503
+ # `-` wildcard agent segment to purge every MonitoredAgent in the scope.
1504
+ # Format:
1505
+ # `projects/{project}/locations/{location}/monitoredAgents/{monitored_agent}`
1506
+ # @yield [result, operation] Access the result along with the TransportOperation object
1507
+ # @yieldparam result [::Gapic::Operation]
1508
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1509
+ #
1510
+ # @return [::Gapic::Operation]
1511
+ #
1512
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1513
+ #
1514
+ # @example Basic example
1515
+ # require "google/cloud/ai_platform/v1"
1516
+ #
1517
+ # # Create a client object. The client can be reused for multiple calls.
1518
+ # client = Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new
1519
+ #
1520
+ # # Create a request. To set request fields, pass in keyword arguments.
1521
+ # request = Google::Cloud::AIPlatform::V1::ClearTrainingDataRequest.new
1522
+ #
1523
+ # # Call the clear_training_data method.
1524
+ # result = client.clear_training_data request
1525
+ #
1526
+ # # The returned object is of type Gapic::Operation. You can use it to
1527
+ # # check the status of an operation, cancel it, or wait for results.
1528
+ # # Here is how to wait for a response.
1529
+ # result.wait_until_done! timeout: 60
1530
+ # if result.response?
1531
+ # p result.response
1532
+ # else
1533
+ # puts "No response received."
1534
+ # end
1535
+ #
1536
+ def clear_training_data request, options = nil
1537
+ raise ::ArgumentError, "request must be provided" if request.nil?
1538
+
1539
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ClearTrainingDataRequest
1540
+
1541
+ # Converts hash and nil to an options object
1542
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1543
+
1544
+ # Customize the options with defaults
1545
+ call_metadata = @config.rpcs.clear_training_data.metadata.to_h
1546
+
1547
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
1548
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1549
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1550
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
1551
+ transports_version_send: [:rest]
1552
+
1553
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
1554
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1555
+
1556
+ options.apply_defaults timeout: @config.rpcs.clear_training_data.timeout,
1557
+ metadata: call_metadata,
1558
+ retry_policy: @config.rpcs.clear_training_data.retry_policy
1559
+
1560
+ options.apply_defaults timeout: @config.timeout,
1561
+ metadata: @config.metadata,
1562
+ retry_policy: @config.retry_policy
1563
+
1564
+ @agent_anomaly_detection_service_stub.clear_training_data request, options do |result, operation|
1565
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1566
+ yield result, operation if block_given?
1567
+ throw :response, result
1568
+ end
1569
+ rescue ::Gapic::Rest::Error => e
1570
+ raise ::Google::Cloud::Error.from_error(e)
1571
+ end
1572
+
1573
+ ##
1574
+ # Configuration class for the AgentAnomalyDetectionService REST API.
1575
+ #
1576
+ # This class represents the configuration for AgentAnomalyDetectionService REST,
1577
+ # providing control over timeouts, retry behavior, logging, transport
1578
+ # parameters, and other low-level controls. Certain parameters can also be
1579
+ # applied individually to specific RPCs. See
1580
+ # {::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client::Configuration::Rpcs}
1581
+ # for a list of RPCs that can be configured independently.
1582
+ #
1583
+ # Configuration can be applied globally to all clients, or to a single client
1584
+ # on construction.
1585
+ #
1586
+ # @example
1587
+ #
1588
+ # # Modify the global config, setting the timeout for
1589
+ # # get_agent_anomaly_detection_scope to 20 seconds,
1590
+ # # and all remaining timeouts to 10 seconds.
1591
+ # ::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.configure do |config|
1592
+ # config.timeout = 10.0
1593
+ # config.rpcs.get_agent_anomaly_detection_scope.timeout = 20.0
1594
+ # end
1595
+ #
1596
+ # # Apply the above configuration only to a new client.
1597
+ # client = ::Google::Cloud::AIPlatform::V1::AgentAnomalyDetectionService::Rest::Client.new do |config|
1598
+ # config.timeout = 10.0
1599
+ # config.rpcs.get_agent_anomaly_detection_scope.timeout = 20.0
1600
+ # end
1601
+ #
1602
+ # @!attribute [rw] endpoint
1603
+ # A custom service endpoint, as a hostname or hostname:port. The default is
1604
+ # nil, indicating to use the default endpoint in the current universe domain.
1605
+ # @return [::String,nil]
1606
+ # @!attribute [rw] credentials
1607
+ # Credentials to send with calls. You may provide any of the following types:
1608
+ # * (`String`) The path to a service account key file in JSON format
1609
+ # * (`Hash`) A service account key as a Hash
1610
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1611
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1612
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1613
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1614
+ # * (`nil`) indicating no credentials
1615
+ #
1616
+ # Warning: If you accept a credential configuration (JSON file or Hash) from an
1617
+ # external source for authentication to Google Cloud, you must validate it before
1618
+ # providing it to a Google API client library. Providing an unvalidated credential
1619
+ # configuration to Google APIs can compromise the security of your systems and data.
1620
+ # For more information, refer to [Validate credential configurations from external
1621
+ # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
1622
+ # @return [::Object]
1623
+ # @!attribute [rw] scope
1624
+ # The OAuth scopes
1625
+ # @return [::Array<::String>]
1626
+ # @!attribute [rw] lib_name
1627
+ # The library name as recorded in instrumentation and logging
1628
+ # @return [::String]
1629
+ # @!attribute [rw] lib_version
1630
+ # The library version as recorded in instrumentation and logging
1631
+ # @return [::String]
1632
+ # @!attribute [rw] timeout
1633
+ # The call timeout in seconds.
1634
+ # @return [::Numeric]
1635
+ # @!attribute [rw] metadata
1636
+ # Additional headers to be sent with the call.
1637
+ # @return [::Hash{::Symbol=>::String}]
1638
+ # @!attribute [rw] retry_policy
1639
+ # The retry policy. The value is a hash with the following keys:
1640
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1641
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1642
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1643
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
1644
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1645
+ # trigger a retry.
1646
+ # @return [::Hash]
1647
+ # @!attribute [rw] quota_project
1648
+ # A separate project against which to charge quota.
1649
+ # @return [::String]
1650
+ # @!attribute [rw] universe_domain
1651
+ # The universe domain within which to make requests. This determines the
1652
+ # default endpoint URL. The default value of nil uses the environment
1653
+ # universe (usually the default "googleapis.com" universe).
1654
+ # @return [::String,nil]
1655
+ # @!attribute [rw] logger
1656
+ # A custom logger to use for request/response debug logging, or the value
1657
+ # `:default` (the default) to construct a default logger, or `nil` to
1658
+ # explicitly disable logging.
1659
+ # @return [::Logger,:default,nil]
1660
+ #
1661
+ class Configuration
1662
+ extend ::Gapic::Config
1663
+
1664
+ # @private
1665
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
1666
+ DEFAULT_ENDPOINT = "aiplatform.googleapis.com"
1667
+
1668
+ config_attr :endpoint, nil, ::String, nil
1669
+ config_attr :credentials, nil do |value|
1670
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
1671
+ allowed.any? { |klass| klass === value }
1672
+ end
1673
+ config_attr :scope, nil, ::String, ::Array, nil
1674
+ config_attr :lib_name, nil, ::String, nil
1675
+ config_attr :lib_version, nil, ::String, nil
1676
+ config_attr :timeout, nil, ::Numeric, nil
1677
+ config_attr :metadata, nil, ::Hash, nil
1678
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1679
+ config_attr :quota_project, nil, ::String, nil
1680
+ config_attr :universe_domain, nil, ::String, nil
1681
+
1682
+ # @private
1683
+ # Overrides for http bindings for the RPCs of this service
1684
+ # are only used when this service is used as mixin, and only
1685
+ # by the host service.
1686
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1687
+ config_attr :bindings_override, {}, ::Hash, nil
1688
+ config_attr :logger, :default, ::Logger, nil, :default
1689
+
1690
+ # @private
1691
+ def initialize parent_config = nil
1692
+ @parent_config = parent_config unless parent_config.nil?
1693
+
1694
+ yield self if block_given?
1695
+ end
1696
+
1697
+ ##
1698
+ # Configurations for individual RPCs
1699
+ # @return [Rpcs]
1700
+ #
1701
+ def rpcs
1702
+ @rpcs ||= begin
1703
+ parent_rpcs = nil
1704
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1705
+ Rpcs.new parent_rpcs
1706
+ end
1707
+ end
1708
+
1709
+ ##
1710
+ # Configuration RPC class for the AgentAnomalyDetectionService API.
1711
+ #
1712
+ # Includes fields providing the configuration for each RPC in this service.
1713
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1714
+ # the following configuration fields:
1715
+ #
1716
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1717
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1718
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1719
+ # include the following keys:
1720
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1721
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1722
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1723
+ # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
1724
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1725
+ # trigger a retry.
1726
+ #
1727
+ class Rpcs
1728
+ ##
1729
+ # RPC-specific configuration for `get_agent_anomaly_detection_scope`
1730
+ # @return [::Gapic::Config::Method]
1731
+ #
1732
+ attr_reader :get_agent_anomaly_detection_scope
1733
+ ##
1734
+ # RPC-specific configuration for `get_monitored_agent`
1735
+ # @return [::Gapic::Config::Method]
1736
+ #
1737
+ attr_reader :get_monitored_agent
1738
+ ##
1739
+ # RPC-specific configuration for `list_monitored_agents`
1740
+ # @return [::Gapic::Config::Method]
1741
+ #
1742
+ attr_reader :list_monitored_agents
1743
+ ##
1744
+ # RPC-specific configuration for `enable_monitored_agent`
1745
+ # @return [::Gapic::Config::Method]
1746
+ #
1747
+ attr_reader :enable_monitored_agent
1748
+ ##
1749
+ # RPC-specific configuration for `disable_monitored_agent`
1750
+ # @return [::Gapic::Config::Method]
1751
+ #
1752
+ attr_reader :disable_monitored_agent
1753
+ ##
1754
+ # RPC-specific configuration for `delete_agent_anomaly_detection_scope`
1755
+ # @return [::Gapic::Config::Method]
1756
+ #
1757
+ attr_reader :delete_agent_anomaly_detection_scope
1758
+ ##
1759
+ # RPC-specific configuration for `create_agent_anomaly_detection_scope`
1760
+ # @return [::Gapic::Config::Method]
1761
+ #
1762
+ attr_reader :create_agent_anomaly_detection_scope
1763
+ ##
1764
+ # RPC-specific configuration for `list_agent_anomaly_detection_scopes`
1765
+ # @return [::Gapic::Config::Method]
1766
+ #
1767
+ attr_reader :list_agent_anomaly_detection_scopes
1768
+ ##
1769
+ # RPC-specific configuration for `list_analyzed_sessions`
1770
+ # @return [::Gapic::Config::Method]
1771
+ #
1772
+ attr_reader :list_analyzed_sessions
1773
+ ##
1774
+ # RPC-specific configuration for `get_analyzed_session`
1775
+ # @return [::Gapic::Config::Method]
1776
+ #
1777
+ attr_reader :get_analyzed_session
1778
+ ##
1779
+ # RPC-specific configuration for `list_analyzed_invocations`
1780
+ # @return [::Gapic::Config::Method]
1781
+ #
1782
+ attr_reader :list_analyzed_invocations
1783
+ ##
1784
+ # RPC-specific configuration for `get_analyzed_invocation`
1785
+ # @return [::Gapic::Config::Method]
1786
+ #
1787
+ attr_reader :get_analyzed_invocation
1788
+ ##
1789
+ # RPC-specific configuration for `aggregate_analyzed_sessions`
1790
+ # @return [::Gapic::Config::Method]
1791
+ #
1792
+ attr_reader :aggregate_analyzed_sessions
1793
+ ##
1794
+ # RPC-specific configuration for `clear_training_data`
1795
+ # @return [::Gapic::Config::Method]
1796
+ #
1797
+ attr_reader :clear_training_data
1798
+
1799
+ # @private
1800
+ def initialize parent_rpcs = nil
1801
+ get_agent_anomaly_detection_scope_config = parent_rpcs.get_agent_anomaly_detection_scope if parent_rpcs.respond_to? :get_agent_anomaly_detection_scope
1802
+ @get_agent_anomaly_detection_scope = ::Gapic::Config::Method.new get_agent_anomaly_detection_scope_config
1803
+ get_monitored_agent_config = parent_rpcs.get_monitored_agent if parent_rpcs.respond_to? :get_monitored_agent
1804
+ @get_monitored_agent = ::Gapic::Config::Method.new get_monitored_agent_config
1805
+ list_monitored_agents_config = parent_rpcs.list_monitored_agents if parent_rpcs.respond_to? :list_monitored_agents
1806
+ @list_monitored_agents = ::Gapic::Config::Method.new list_monitored_agents_config
1807
+ enable_monitored_agent_config = parent_rpcs.enable_monitored_agent if parent_rpcs.respond_to? :enable_monitored_agent
1808
+ @enable_monitored_agent = ::Gapic::Config::Method.new enable_monitored_agent_config
1809
+ disable_monitored_agent_config = parent_rpcs.disable_monitored_agent if parent_rpcs.respond_to? :disable_monitored_agent
1810
+ @disable_monitored_agent = ::Gapic::Config::Method.new disable_monitored_agent_config
1811
+ delete_agent_anomaly_detection_scope_config = parent_rpcs.delete_agent_anomaly_detection_scope if parent_rpcs.respond_to? :delete_agent_anomaly_detection_scope
1812
+ @delete_agent_anomaly_detection_scope = ::Gapic::Config::Method.new delete_agent_anomaly_detection_scope_config
1813
+ create_agent_anomaly_detection_scope_config = parent_rpcs.create_agent_anomaly_detection_scope if parent_rpcs.respond_to? :create_agent_anomaly_detection_scope
1814
+ @create_agent_anomaly_detection_scope = ::Gapic::Config::Method.new create_agent_anomaly_detection_scope_config
1815
+ list_agent_anomaly_detection_scopes_config = parent_rpcs.list_agent_anomaly_detection_scopes if parent_rpcs.respond_to? :list_agent_anomaly_detection_scopes
1816
+ @list_agent_anomaly_detection_scopes = ::Gapic::Config::Method.new list_agent_anomaly_detection_scopes_config
1817
+ list_analyzed_sessions_config = parent_rpcs.list_analyzed_sessions if parent_rpcs.respond_to? :list_analyzed_sessions
1818
+ @list_analyzed_sessions = ::Gapic::Config::Method.new list_analyzed_sessions_config
1819
+ get_analyzed_session_config = parent_rpcs.get_analyzed_session if parent_rpcs.respond_to? :get_analyzed_session
1820
+ @get_analyzed_session = ::Gapic::Config::Method.new get_analyzed_session_config
1821
+ list_analyzed_invocations_config = parent_rpcs.list_analyzed_invocations if parent_rpcs.respond_to? :list_analyzed_invocations
1822
+ @list_analyzed_invocations = ::Gapic::Config::Method.new list_analyzed_invocations_config
1823
+ get_analyzed_invocation_config = parent_rpcs.get_analyzed_invocation if parent_rpcs.respond_to? :get_analyzed_invocation
1824
+ @get_analyzed_invocation = ::Gapic::Config::Method.new get_analyzed_invocation_config
1825
+ aggregate_analyzed_sessions_config = parent_rpcs.aggregate_analyzed_sessions if parent_rpcs.respond_to? :aggregate_analyzed_sessions
1826
+ @aggregate_analyzed_sessions = ::Gapic::Config::Method.new aggregate_analyzed_sessions_config
1827
+ clear_training_data_config = parent_rpcs.clear_training_data if parent_rpcs.respond_to? :clear_training_data
1828
+ @clear_training_data = ::Gapic::Config::Method.new clear_training_data_config
1829
+
1830
+ yield self if block_given?
1831
+ end
1832
+ end
1833
+ end
1834
+ end
1835
+ end
1836
+ end
1837
+ end
1838
+ end
1839
+ end
1840
+ end