google-cloud-chronicle-v1 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/chronicle/v1/findings_refinement_pb.rb +50 -0
- data/lib/google/cloud/chronicle/v1/findings_refinement_service/client.rb +1331 -0
- data/lib/google/cloud/chronicle/v1/findings_refinement_service/credentials.rb +49 -0
- data/lib/google/cloud/chronicle/v1/findings_refinement_service/paths.rb +159 -0
- data/lib/google/cloud/chronicle/v1/findings_refinement_service/rest/client.rb +1225 -0
- data/lib/google/cloud/chronicle/v1/findings_refinement_service/rest/service_stub.rb +635 -0
- data/lib/google/cloud/chronicle/v1/findings_refinement_service/rest.rb +54 -0
- data/lib/google/cloud/chronicle/v1/findings_refinement_service.rb +57 -0
- data/lib/google/cloud/chronicle/v1/findings_refinement_services_pb.rb +63 -0
- data/lib/google/cloud/chronicle/v1/rest.rb +1 -0
- data/lib/google/cloud/chronicle/v1/version.rb +1 -1
- data/lib/google/cloud/chronicle/v1.rb +1 -0
- data/proto_docs/google/cloud/chronicle/v1/findings_refinement.rb +439 -0
- metadata +11 -1
|
@@ -0,0 +1,1331 @@
|
|
|
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/chronicle/v1/findings_refinement_pb"
|
|
21
|
+
|
|
22
|
+
module Google
|
|
23
|
+
module Cloud
|
|
24
|
+
module Chronicle
|
|
25
|
+
module V1
|
|
26
|
+
module FindingsRefinementService
|
|
27
|
+
##
|
|
28
|
+
# Client for the FindingsRefinementService service.
|
|
29
|
+
#
|
|
30
|
+
# FindingsRefinementService provides an interface for filtering out
|
|
31
|
+
# findings that are unlikely to be real threats to prevent them
|
|
32
|
+
# from triggering alerts or notifications.
|
|
33
|
+
#
|
|
34
|
+
class Client
|
|
35
|
+
# @private
|
|
36
|
+
API_VERSION = ""
|
|
37
|
+
|
|
38
|
+
# @private
|
|
39
|
+
DEFAULT_ENDPOINT_TEMPLATE = "chronicle.$UNIVERSE_DOMAIN$"
|
|
40
|
+
|
|
41
|
+
include Paths
|
|
42
|
+
|
|
43
|
+
# @private
|
|
44
|
+
attr_reader :findings_refinement_service_stub
|
|
45
|
+
|
|
46
|
+
##
|
|
47
|
+
# Configure the FindingsRefinementService Client class.
|
|
48
|
+
#
|
|
49
|
+
# See {::Google::Cloud::Chronicle::V1::FindingsRefinementService::Client::Configuration}
|
|
50
|
+
# for a description of the configuration fields.
|
|
51
|
+
#
|
|
52
|
+
# @example
|
|
53
|
+
#
|
|
54
|
+
# # Modify the configuration for all FindingsRefinementService clients
|
|
55
|
+
# ::Google::Cloud::Chronicle::V1::FindingsRefinementService::Client.configure do |config|
|
|
56
|
+
# config.timeout = 10.0
|
|
57
|
+
# end
|
|
58
|
+
#
|
|
59
|
+
# @yield [config] Configure the Client client.
|
|
60
|
+
# @yieldparam config [Client::Configuration]
|
|
61
|
+
#
|
|
62
|
+
# @return [Client::Configuration]
|
|
63
|
+
#
|
|
64
|
+
def self.configure
|
|
65
|
+
@configure ||= begin
|
|
66
|
+
namespace = ["Google", "Cloud", "Chronicle", "V1"]
|
|
67
|
+
parent_config = while namespace.any?
|
|
68
|
+
parent_name = namespace.join "::"
|
|
69
|
+
parent_const = const_get parent_name
|
|
70
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
|
71
|
+
namespace.pop
|
|
72
|
+
end
|
|
73
|
+
default_config = Client::Configuration.new parent_config
|
|
74
|
+
|
|
75
|
+
default_config.rpcs.get_findings_refinement.timeout = 60.0
|
|
76
|
+
default_config.rpcs.get_findings_refinement.retry_policy = {
|
|
77
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
default_config.rpcs.list_findings_refinements.timeout = 60.0
|
|
81
|
+
default_config.rpcs.list_findings_refinements.retry_policy = {
|
|
82
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
default_config.rpcs.create_findings_refinement.timeout = 60.0
|
|
86
|
+
default_config.rpcs.create_findings_refinement.retry_policy = {
|
|
87
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
default_config.rpcs.update_findings_refinement.timeout = 60.0
|
|
91
|
+
default_config.rpcs.update_findings_refinement.retry_policy = {
|
|
92
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
default_config.rpcs.get_findings_refinement_deployment.timeout = 120.0
|
|
96
|
+
default_config.rpcs.get_findings_refinement_deployment.retry_policy = {
|
|
97
|
+
initial_delay: 1.0, max_delay: 120.0, multiplier: 1.3, retry_codes: [14]
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
default_config.rpcs.update_findings_refinement_deployment.timeout = 120.0
|
|
101
|
+
|
|
102
|
+
default_config.rpcs.list_all_findings_refinement_deployments.timeout = 120.0
|
|
103
|
+
default_config.rpcs.list_all_findings_refinement_deployments.retry_policy = {
|
|
104
|
+
initial_delay: 1.0, max_delay: 120.0, multiplier: 1.3, retry_codes: [14]
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
default_config.rpcs.compute_findings_refinement_activity.timeout = 600.0
|
|
108
|
+
default_config.rpcs.compute_findings_refinement_activity.retry_policy = {
|
|
109
|
+
initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14]
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
default_config.rpcs.compute_all_findings_refinement_activities.timeout = 600.0
|
|
113
|
+
default_config.rpcs.compute_all_findings_refinement_activities.retry_policy = {
|
|
114
|
+
initial_delay: 1.0, max_delay: 600.0, multiplier: 1.3, retry_codes: [14]
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
default_config
|
|
118
|
+
end
|
|
119
|
+
yield @configure if block_given?
|
|
120
|
+
@configure
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
##
|
|
124
|
+
# Configure the FindingsRefinementService Client instance.
|
|
125
|
+
#
|
|
126
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
|
127
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
|
128
|
+
# should be made on {Client.configure}.
|
|
129
|
+
#
|
|
130
|
+
# See {::Google::Cloud::Chronicle::V1::FindingsRefinementService::Client::Configuration}
|
|
131
|
+
# for a description of the configuration fields.
|
|
132
|
+
#
|
|
133
|
+
# @yield [config] Configure the Client client.
|
|
134
|
+
# @yieldparam config [Client::Configuration]
|
|
135
|
+
#
|
|
136
|
+
# @return [Client::Configuration]
|
|
137
|
+
#
|
|
138
|
+
def configure
|
|
139
|
+
yield @config if block_given?
|
|
140
|
+
@config
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
##
|
|
144
|
+
# The effective universe domain
|
|
145
|
+
#
|
|
146
|
+
# @return [String]
|
|
147
|
+
#
|
|
148
|
+
def universe_domain
|
|
149
|
+
@findings_refinement_service_stub.universe_domain
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
##
|
|
153
|
+
# Create a new FindingsRefinementService client object.
|
|
154
|
+
#
|
|
155
|
+
# @example
|
|
156
|
+
#
|
|
157
|
+
# # Create a client using the default configuration
|
|
158
|
+
# client = ::Google::Cloud::Chronicle::V1::FindingsRefinementService::Client.new
|
|
159
|
+
#
|
|
160
|
+
# # Create a client using a custom configuration
|
|
161
|
+
# client = ::Google::Cloud::Chronicle::V1::FindingsRefinementService::Client.new do |config|
|
|
162
|
+
# config.timeout = 10.0
|
|
163
|
+
# end
|
|
164
|
+
#
|
|
165
|
+
# @yield [config] Configure the FindingsRefinementService client.
|
|
166
|
+
# @yieldparam config [Client::Configuration]
|
|
167
|
+
#
|
|
168
|
+
def initialize
|
|
169
|
+
# These require statements are intentionally placed here to initialize
|
|
170
|
+
# the gRPC module only when it's required.
|
|
171
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
|
172
|
+
require "gapic/grpc"
|
|
173
|
+
require "google/cloud/chronicle/v1/findings_refinement_services_pb"
|
|
174
|
+
|
|
175
|
+
# Create the configuration object
|
|
176
|
+
@config = Configuration.new Client.configure
|
|
177
|
+
|
|
178
|
+
# Yield the configuration if needed
|
|
179
|
+
yield @config if block_given?
|
|
180
|
+
|
|
181
|
+
# Create credentials
|
|
182
|
+
credentials = @config.credentials
|
|
183
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
184
|
+
# but only if the default endpoint does not have a region prefix.
|
|
185
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
|
186
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
|
187
|
+
!@config.endpoint.split(".").first.include?("-"))
|
|
188
|
+
credentials ||= Credentials.default scope: @config.scope,
|
|
189
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
|
190
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
|
191
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
|
192
|
+
end
|
|
193
|
+
@quota_project_id = @config.quota_project
|
|
194
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
|
195
|
+
|
|
196
|
+
@findings_refinement_service_stub = ::Gapic::ServiceStub.new(
|
|
197
|
+
::Google::Cloud::Chronicle::V1::FindingsRefinementService::Stub,
|
|
198
|
+
credentials: credentials,
|
|
199
|
+
endpoint: @config.endpoint,
|
|
200
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
|
201
|
+
universe_domain: @config.universe_domain,
|
|
202
|
+
channel_args: @config.channel_args,
|
|
203
|
+
interceptors: @config.interceptors,
|
|
204
|
+
channel_pool_config: @config.channel_pool,
|
|
205
|
+
logger: @config.logger
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
@findings_refinement_service_stub.stub_logger&.info do |entry|
|
|
209
|
+
entry.set_system_name
|
|
210
|
+
entry.set_service
|
|
211
|
+
entry.message = "Created client for #{entry.service}"
|
|
212
|
+
entry.set_credentials_fields credentials
|
|
213
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
|
214
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
|
215
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
|
216
|
+
end
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
##
|
|
220
|
+
# The logger used for request/response debug logging.
|
|
221
|
+
#
|
|
222
|
+
# @return [Logger]
|
|
223
|
+
#
|
|
224
|
+
def logger
|
|
225
|
+
@findings_refinement_service_stub.logger
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Service calls
|
|
229
|
+
|
|
230
|
+
##
|
|
231
|
+
# Gets a single findings refinement.
|
|
232
|
+
#
|
|
233
|
+
# @overload get_findings_refinement(request, options = nil)
|
|
234
|
+
# Pass arguments to `get_findings_refinement` via a request object, either of type
|
|
235
|
+
# {::Google::Cloud::Chronicle::V1::GetFindingsRefinementRequest} or an equivalent Hash.
|
|
236
|
+
#
|
|
237
|
+
# @param request [::Google::Cloud::Chronicle::V1::GetFindingsRefinementRequest, ::Hash]
|
|
238
|
+
# A request object representing the call parameters. Required. To specify no
|
|
239
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
240
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
241
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
242
|
+
#
|
|
243
|
+
# @overload get_findings_refinement(name: nil)
|
|
244
|
+
# Pass arguments to `get_findings_refinement` via keyword arguments. Note that at
|
|
245
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
246
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
247
|
+
#
|
|
248
|
+
# @param name [::String]
|
|
249
|
+
# Required. The name of the findings refinement to retrieve.
|
|
250
|
+
# Format:
|
|
251
|
+
# projects/\\{project}/locations/\\{location}/instances/\\{instance}/findingsRefinements/\\{findings_refinement}
|
|
252
|
+
#
|
|
253
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
254
|
+
# @yieldparam response [::Google::Cloud::Chronicle::V1::FindingsRefinement]
|
|
255
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
256
|
+
#
|
|
257
|
+
# @return [::Google::Cloud::Chronicle::V1::FindingsRefinement]
|
|
258
|
+
#
|
|
259
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
260
|
+
#
|
|
261
|
+
# @example Basic example
|
|
262
|
+
# require "google/cloud/chronicle/v1"
|
|
263
|
+
#
|
|
264
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
265
|
+
# client = Google::Cloud::Chronicle::V1::FindingsRefinementService::Client.new
|
|
266
|
+
#
|
|
267
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
268
|
+
# request = Google::Cloud::Chronicle::V1::GetFindingsRefinementRequest.new
|
|
269
|
+
#
|
|
270
|
+
# # Call the get_findings_refinement method.
|
|
271
|
+
# result = client.get_findings_refinement request
|
|
272
|
+
#
|
|
273
|
+
# # The returned object is of type Google::Cloud::Chronicle::V1::FindingsRefinement.
|
|
274
|
+
# p result
|
|
275
|
+
#
|
|
276
|
+
def get_findings_refinement request, options = nil
|
|
277
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
278
|
+
|
|
279
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetFindingsRefinementRequest
|
|
280
|
+
|
|
281
|
+
# Converts hash and nil to an options object
|
|
282
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
283
|
+
|
|
284
|
+
# Customize the options with defaults
|
|
285
|
+
metadata = @config.rpcs.get_findings_refinement.metadata.to_h
|
|
286
|
+
|
|
287
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
288
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
289
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
290
|
+
gapic_version: ::Google::Cloud::Chronicle::V1::VERSION
|
|
291
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
292
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
293
|
+
|
|
294
|
+
header_params = {}
|
|
295
|
+
if request.name
|
|
296
|
+
header_params["name"] = request.name
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
300
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
301
|
+
|
|
302
|
+
options.apply_defaults timeout: @config.rpcs.get_findings_refinement.timeout,
|
|
303
|
+
metadata: metadata,
|
|
304
|
+
retry_policy: @config.rpcs.get_findings_refinement.retry_policy
|
|
305
|
+
|
|
306
|
+
options.apply_defaults timeout: @config.timeout,
|
|
307
|
+
metadata: @config.metadata,
|
|
308
|
+
retry_policy: @config.retry_policy
|
|
309
|
+
|
|
310
|
+
@findings_refinement_service_stub.call_rpc :get_findings_refinement, request, options: options do |response, operation|
|
|
311
|
+
yield response, operation if block_given?
|
|
312
|
+
end
|
|
313
|
+
rescue ::GRPC::BadStatus => e
|
|
314
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
##
|
|
318
|
+
# Lists a collection of findings refinements.
|
|
319
|
+
#
|
|
320
|
+
# @overload list_findings_refinements(request, options = nil)
|
|
321
|
+
# Pass arguments to `list_findings_refinements` via a request object, either of type
|
|
322
|
+
# {::Google::Cloud::Chronicle::V1::ListFindingsRefinementsRequest} or an equivalent Hash.
|
|
323
|
+
#
|
|
324
|
+
# @param request [::Google::Cloud::Chronicle::V1::ListFindingsRefinementsRequest, ::Hash]
|
|
325
|
+
# A request object representing the call parameters. Required. To specify no
|
|
326
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
327
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
328
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
329
|
+
#
|
|
330
|
+
# @overload list_findings_refinements(parent: nil, page_size: nil, page_token: nil)
|
|
331
|
+
# Pass arguments to `list_findings_refinements` via keyword arguments. Note that at
|
|
332
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
333
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
334
|
+
#
|
|
335
|
+
# @param parent [::String]
|
|
336
|
+
# Required. The parent, which owns this collection of findings refinements.
|
|
337
|
+
# Format:
|
|
338
|
+
# projects/\\{project}/locations/\\{location}/instances/\\{instance}
|
|
339
|
+
# @param page_size [::Integer]
|
|
340
|
+
# The maximum number of findings refinements to return. The service may
|
|
341
|
+
# return fewer than this value. If unspecified, at most 100 rules will be
|
|
342
|
+
# returned. The maximum value is 1000; values above 1000 will be coerced to
|
|
343
|
+
# 1000.
|
|
344
|
+
# @param page_token [::String]
|
|
345
|
+
# A page token, received from a previous `ListFindingsRefinements` call.
|
|
346
|
+
# Provide this to retrieve the subsequent page.
|
|
347
|
+
#
|
|
348
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
349
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::FindingsRefinement>]
|
|
350
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
351
|
+
#
|
|
352
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::FindingsRefinement>]
|
|
353
|
+
#
|
|
354
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
355
|
+
#
|
|
356
|
+
# @example Basic example
|
|
357
|
+
# require "google/cloud/chronicle/v1"
|
|
358
|
+
#
|
|
359
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
360
|
+
# client = Google::Cloud::Chronicle::V1::FindingsRefinementService::Client.new
|
|
361
|
+
#
|
|
362
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
363
|
+
# request = Google::Cloud::Chronicle::V1::ListFindingsRefinementsRequest.new
|
|
364
|
+
#
|
|
365
|
+
# # Call the list_findings_refinements method.
|
|
366
|
+
# result = client.list_findings_refinements request
|
|
367
|
+
#
|
|
368
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
369
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
370
|
+
# result.each do |item|
|
|
371
|
+
# # Each element is of type ::Google::Cloud::Chronicle::V1::FindingsRefinement.
|
|
372
|
+
# p item
|
|
373
|
+
# end
|
|
374
|
+
#
|
|
375
|
+
def list_findings_refinements request, options = nil
|
|
376
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
377
|
+
|
|
378
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListFindingsRefinementsRequest
|
|
379
|
+
|
|
380
|
+
# Converts hash and nil to an options object
|
|
381
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
382
|
+
|
|
383
|
+
# Customize the options with defaults
|
|
384
|
+
metadata = @config.rpcs.list_findings_refinements.metadata.to_h
|
|
385
|
+
|
|
386
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
387
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
388
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
389
|
+
gapic_version: ::Google::Cloud::Chronicle::V1::VERSION
|
|
390
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
391
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
392
|
+
|
|
393
|
+
header_params = {}
|
|
394
|
+
if request.parent
|
|
395
|
+
header_params["parent"] = request.parent
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
399
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
400
|
+
|
|
401
|
+
options.apply_defaults timeout: @config.rpcs.list_findings_refinements.timeout,
|
|
402
|
+
metadata: metadata,
|
|
403
|
+
retry_policy: @config.rpcs.list_findings_refinements.retry_policy
|
|
404
|
+
|
|
405
|
+
options.apply_defaults timeout: @config.timeout,
|
|
406
|
+
metadata: @config.metadata,
|
|
407
|
+
retry_policy: @config.retry_policy
|
|
408
|
+
|
|
409
|
+
@findings_refinement_service_stub.call_rpc :list_findings_refinements, request, options: options do |response, operation|
|
|
410
|
+
response = ::Gapic::PagedEnumerable.new @findings_refinement_service_stub, :list_findings_refinements, request, response, operation, options
|
|
411
|
+
yield response, operation if block_given?
|
|
412
|
+
throw :response, response
|
|
413
|
+
end
|
|
414
|
+
rescue ::GRPC::BadStatus => e
|
|
415
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
416
|
+
end
|
|
417
|
+
|
|
418
|
+
##
|
|
419
|
+
# Creates a new findings refinement.
|
|
420
|
+
#
|
|
421
|
+
# @overload create_findings_refinement(request, options = nil)
|
|
422
|
+
# Pass arguments to `create_findings_refinement` via a request object, either of type
|
|
423
|
+
# {::Google::Cloud::Chronicle::V1::CreateFindingsRefinementRequest} or an equivalent Hash.
|
|
424
|
+
#
|
|
425
|
+
# @param request [::Google::Cloud::Chronicle::V1::CreateFindingsRefinementRequest, ::Hash]
|
|
426
|
+
# A request object representing the call parameters. Required. To specify no
|
|
427
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
428
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
429
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
430
|
+
#
|
|
431
|
+
# @overload create_findings_refinement(parent: nil, findings_refinement: nil)
|
|
432
|
+
# Pass arguments to `create_findings_refinement` via keyword arguments. Note that at
|
|
433
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
434
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
435
|
+
#
|
|
436
|
+
# @param parent [::String]
|
|
437
|
+
# Required. The parent resource where this findings refinement will be
|
|
438
|
+
# created. Format:
|
|
439
|
+
# projects/\\{project}/locations/\\{location}/instances/\\{instance}
|
|
440
|
+
# @param findings_refinement [::Google::Cloud::Chronicle::V1::FindingsRefinement, ::Hash]
|
|
441
|
+
# Required. The findings refinement to create.
|
|
442
|
+
#
|
|
443
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
444
|
+
# @yieldparam response [::Google::Cloud::Chronicle::V1::FindingsRefinement]
|
|
445
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
446
|
+
#
|
|
447
|
+
# @return [::Google::Cloud::Chronicle::V1::FindingsRefinement]
|
|
448
|
+
#
|
|
449
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
450
|
+
#
|
|
451
|
+
# @example Basic example
|
|
452
|
+
# require "google/cloud/chronicle/v1"
|
|
453
|
+
#
|
|
454
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
455
|
+
# client = Google::Cloud::Chronicle::V1::FindingsRefinementService::Client.new
|
|
456
|
+
#
|
|
457
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
458
|
+
# request = Google::Cloud::Chronicle::V1::CreateFindingsRefinementRequest.new
|
|
459
|
+
#
|
|
460
|
+
# # Call the create_findings_refinement method.
|
|
461
|
+
# result = client.create_findings_refinement request
|
|
462
|
+
#
|
|
463
|
+
# # The returned object is of type Google::Cloud::Chronicle::V1::FindingsRefinement.
|
|
464
|
+
# p result
|
|
465
|
+
#
|
|
466
|
+
def create_findings_refinement request, options = nil
|
|
467
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
468
|
+
|
|
469
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::CreateFindingsRefinementRequest
|
|
470
|
+
|
|
471
|
+
# Converts hash and nil to an options object
|
|
472
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
473
|
+
|
|
474
|
+
# Customize the options with defaults
|
|
475
|
+
metadata = @config.rpcs.create_findings_refinement.metadata.to_h
|
|
476
|
+
|
|
477
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
478
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
479
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
480
|
+
gapic_version: ::Google::Cloud::Chronicle::V1::VERSION
|
|
481
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
482
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
483
|
+
|
|
484
|
+
header_params = {}
|
|
485
|
+
if request.parent
|
|
486
|
+
header_params["parent"] = request.parent
|
|
487
|
+
end
|
|
488
|
+
|
|
489
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
490
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
491
|
+
|
|
492
|
+
options.apply_defaults timeout: @config.rpcs.create_findings_refinement.timeout,
|
|
493
|
+
metadata: metadata,
|
|
494
|
+
retry_policy: @config.rpcs.create_findings_refinement.retry_policy
|
|
495
|
+
|
|
496
|
+
options.apply_defaults timeout: @config.timeout,
|
|
497
|
+
metadata: @config.metadata,
|
|
498
|
+
retry_policy: @config.retry_policy
|
|
499
|
+
|
|
500
|
+
@findings_refinement_service_stub.call_rpc :create_findings_refinement, request, options: options do |response, operation|
|
|
501
|
+
yield response, operation if block_given?
|
|
502
|
+
end
|
|
503
|
+
rescue ::GRPC::BadStatus => e
|
|
504
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
505
|
+
end
|
|
506
|
+
|
|
507
|
+
##
|
|
508
|
+
# Updates a findings refinement.
|
|
509
|
+
#
|
|
510
|
+
# @overload update_findings_refinement(request, options = nil)
|
|
511
|
+
# Pass arguments to `update_findings_refinement` via a request object, either of type
|
|
512
|
+
# {::Google::Cloud::Chronicle::V1::UpdateFindingsRefinementRequest} or an equivalent Hash.
|
|
513
|
+
#
|
|
514
|
+
# @param request [::Google::Cloud::Chronicle::V1::UpdateFindingsRefinementRequest, ::Hash]
|
|
515
|
+
# A request object representing the call parameters. Required. To specify no
|
|
516
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
517
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
518
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
519
|
+
#
|
|
520
|
+
# @overload update_findings_refinement(findings_refinement: nil, update_mask: nil)
|
|
521
|
+
# Pass arguments to `update_findings_refinement` via keyword arguments. Note that at
|
|
522
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
523
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
524
|
+
#
|
|
525
|
+
# @param findings_refinement [::Google::Cloud::Chronicle::V1::FindingsRefinement, ::Hash]
|
|
526
|
+
# Required. The findings refinement to update.
|
|
527
|
+
#
|
|
528
|
+
# The findings refinement's `name` field is used to identify the findings
|
|
529
|
+
# refinement to update.
|
|
530
|
+
# Format:
|
|
531
|
+
# projects/\\{project}/locations/\\{location}/instances/\\{instance}/findingsRefinements/\\{findings_refinement}
|
|
532
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
533
|
+
# Optional. The list of fields to update. If `*` is provided, all fields will
|
|
534
|
+
# be updated.
|
|
535
|
+
#
|
|
536
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
537
|
+
# @yieldparam response [::Google::Cloud::Chronicle::V1::FindingsRefinement]
|
|
538
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
539
|
+
#
|
|
540
|
+
# @return [::Google::Cloud::Chronicle::V1::FindingsRefinement]
|
|
541
|
+
#
|
|
542
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
543
|
+
#
|
|
544
|
+
# @example Basic example
|
|
545
|
+
# require "google/cloud/chronicle/v1"
|
|
546
|
+
#
|
|
547
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
548
|
+
# client = Google::Cloud::Chronicle::V1::FindingsRefinementService::Client.new
|
|
549
|
+
#
|
|
550
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
551
|
+
# request = Google::Cloud::Chronicle::V1::UpdateFindingsRefinementRequest.new
|
|
552
|
+
#
|
|
553
|
+
# # Call the update_findings_refinement method.
|
|
554
|
+
# result = client.update_findings_refinement request
|
|
555
|
+
#
|
|
556
|
+
# # The returned object is of type Google::Cloud::Chronicle::V1::FindingsRefinement.
|
|
557
|
+
# p result
|
|
558
|
+
#
|
|
559
|
+
def update_findings_refinement request, options = nil
|
|
560
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
561
|
+
|
|
562
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateFindingsRefinementRequest
|
|
563
|
+
|
|
564
|
+
# Converts hash and nil to an options object
|
|
565
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
566
|
+
|
|
567
|
+
# Customize the options with defaults
|
|
568
|
+
metadata = @config.rpcs.update_findings_refinement.metadata.to_h
|
|
569
|
+
|
|
570
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
571
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
572
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
573
|
+
gapic_version: ::Google::Cloud::Chronicle::V1::VERSION
|
|
574
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
575
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
576
|
+
|
|
577
|
+
header_params = {}
|
|
578
|
+
if request.findings_refinement&.name
|
|
579
|
+
header_params["findings_refinement.name"] = request.findings_refinement.name
|
|
580
|
+
end
|
|
581
|
+
|
|
582
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
583
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
584
|
+
|
|
585
|
+
options.apply_defaults timeout: @config.rpcs.update_findings_refinement.timeout,
|
|
586
|
+
metadata: metadata,
|
|
587
|
+
retry_policy: @config.rpcs.update_findings_refinement.retry_policy
|
|
588
|
+
|
|
589
|
+
options.apply_defaults timeout: @config.timeout,
|
|
590
|
+
metadata: @config.metadata,
|
|
591
|
+
retry_policy: @config.retry_policy
|
|
592
|
+
|
|
593
|
+
@findings_refinement_service_stub.call_rpc :update_findings_refinement, request, options: options do |response, operation|
|
|
594
|
+
yield response, operation if block_given?
|
|
595
|
+
end
|
|
596
|
+
rescue ::GRPC::BadStatus => e
|
|
597
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
598
|
+
end
|
|
599
|
+
|
|
600
|
+
##
|
|
601
|
+
# Gets a findings refinement deployment.
|
|
602
|
+
#
|
|
603
|
+
# @overload get_findings_refinement_deployment(request, options = nil)
|
|
604
|
+
# Pass arguments to `get_findings_refinement_deployment` via a request object, either of type
|
|
605
|
+
# {::Google::Cloud::Chronicle::V1::GetFindingsRefinementDeploymentRequest} or an equivalent Hash.
|
|
606
|
+
#
|
|
607
|
+
# @param request [::Google::Cloud::Chronicle::V1::GetFindingsRefinementDeploymentRequest, ::Hash]
|
|
608
|
+
# A request object representing the call parameters. Required. To specify no
|
|
609
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
610
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
611
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
612
|
+
#
|
|
613
|
+
# @overload get_findings_refinement_deployment(name: nil)
|
|
614
|
+
# Pass arguments to `get_findings_refinement_deployment` via keyword arguments. Note that at
|
|
615
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
616
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
617
|
+
#
|
|
618
|
+
# @param name [::String]
|
|
619
|
+
# Required. The name of the findings refinement to retrieve.
|
|
620
|
+
# Format:
|
|
621
|
+
# projects/\\{project}/locations/\\{location}/instances/\\{instance}/findingsRefinements/\\{findings_refinement}/deployment
|
|
622
|
+
#
|
|
623
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
624
|
+
# @yieldparam response [::Google::Cloud::Chronicle::V1::FindingsRefinementDeployment]
|
|
625
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
626
|
+
#
|
|
627
|
+
# @return [::Google::Cloud::Chronicle::V1::FindingsRefinementDeployment]
|
|
628
|
+
#
|
|
629
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
630
|
+
#
|
|
631
|
+
# @example Basic example
|
|
632
|
+
# require "google/cloud/chronicle/v1"
|
|
633
|
+
#
|
|
634
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
635
|
+
# client = Google::Cloud::Chronicle::V1::FindingsRefinementService::Client.new
|
|
636
|
+
#
|
|
637
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
638
|
+
# request = Google::Cloud::Chronicle::V1::GetFindingsRefinementDeploymentRequest.new
|
|
639
|
+
#
|
|
640
|
+
# # Call the get_findings_refinement_deployment method.
|
|
641
|
+
# result = client.get_findings_refinement_deployment request
|
|
642
|
+
#
|
|
643
|
+
# # The returned object is of type Google::Cloud::Chronicle::V1::FindingsRefinementDeployment.
|
|
644
|
+
# p result
|
|
645
|
+
#
|
|
646
|
+
def get_findings_refinement_deployment request, options = nil
|
|
647
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
648
|
+
|
|
649
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::GetFindingsRefinementDeploymentRequest
|
|
650
|
+
|
|
651
|
+
# Converts hash and nil to an options object
|
|
652
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
653
|
+
|
|
654
|
+
# Customize the options with defaults
|
|
655
|
+
metadata = @config.rpcs.get_findings_refinement_deployment.metadata.to_h
|
|
656
|
+
|
|
657
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
658
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
659
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
660
|
+
gapic_version: ::Google::Cloud::Chronicle::V1::VERSION
|
|
661
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
662
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
663
|
+
|
|
664
|
+
header_params = {}
|
|
665
|
+
if request.name
|
|
666
|
+
header_params["name"] = request.name
|
|
667
|
+
end
|
|
668
|
+
|
|
669
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
670
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
671
|
+
|
|
672
|
+
options.apply_defaults timeout: @config.rpcs.get_findings_refinement_deployment.timeout,
|
|
673
|
+
metadata: metadata,
|
|
674
|
+
retry_policy: @config.rpcs.get_findings_refinement_deployment.retry_policy
|
|
675
|
+
|
|
676
|
+
options.apply_defaults timeout: @config.timeout,
|
|
677
|
+
metadata: @config.metadata,
|
|
678
|
+
retry_policy: @config.retry_policy
|
|
679
|
+
|
|
680
|
+
@findings_refinement_service_stub.call_rpc :get_findings_refinement_deployment, request, options: options do |response, operation|
|
|
681
|
+
yield response, operation if block_given?
|
|
682
|
+
end
|
|
683
|
+
rescue ::GRPC::BadStatus => e
|
|
684
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
685
|
+
end
|
|
686
|
+
|
|
687
|
+
##
|
|
688
|
+
# Updates a findings refinement deployment.
|
|
689
|
+
#
|
|
690
|
+
# @overload update_findings_refinement_deployment(request, options = nil)
|
|
691
|
+
# Pass arguments to `update_findings_refinement_deployment` via a request object, either of type
|
|
692
|
+
# {::Google::Cloud::Chronicle::V1::UpdateFindingsRefinementDeploymentRequest} or an equivalent Hash.
|
|
693
|
+
#
|
|
694
|
+
# @param request [::Google::Cloud::Chronicle::V1::UpdateFindingsRefinementDeploymentRequest, ::Hash]
|
|
695
|
+
# A request object representing the call parameters. Required. To specify no
|
|
696
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
697
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
698
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
699
|
+
#
|
|
700
|
+
# @overload update_findings_refinement_deployment(findings_refinement_deployment: nil, update_mask: nil)
|
|
701
|
+
# Pass arguments to `update_findings_refinement_deployment` via keyword arguments. Note that at
|
|
702
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
703
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
704
|
+
#
|
|
705
|
+
# @param findings_refinement_deployment [::Google::Cloud::Chronicle::V1::FindingsRefinementDeployment, ::Hash]
|
|
706
|
+
# Required. The findings refinement deployment to update.
|
|
707
|
+
#
|
|
708
|
+
# The findings refinement deployment's `name` field is used to identify the
|
|
709
|
+
# findings refinement deployment to update.
|
|
710
|
+
# Format:
|
|
711
|
+
# projects/\\{project}/locations/\\{location}/instances/\\{instance}/findingsRefinements/\\{findings_refinement}/deployment
|
|
712
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
713
|
+
# Required. The list of fields to update. If `*` is provided, all fields will
|
|
714
|
+
# be updated.
|
|
715
|
+
#
|
|
716
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
717
|
+
# @yieldparam response [::Google::Cloud::Chronicle::V1::FindingsRefinementDeployment]
|
|
718
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
719
|
+
#
|
|
720
|
+
# @return [::Google::Cloud::Chronicle::V1::FindingsRefinementDeployment]
|
|
721
|
+
#
|
|
722
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
723
|
+
#
|
|
724
|
+
# @example Basic example
|
|
725
|
+
# require "google/cloud/chronicle/v1"
|
|
726
|
+
#
|
|
727
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
728
|
+
# client = Google::Cloud::Chronicle::V1::FindingsRefinementService::Client.new
|
|
729
|
+
#
|
|
730
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
731
|
+
# request = Google::Cloud::Chronicle::V1::UpdateFindingsRefinementDeploymentRequest.new
|
|
732
|
+
#
|
|
733
|
+
# # Call the update_findings_refinement_deployment method.
|
|
734
|
+
# result = client.update_findings_refinement_deployment request
|
|
735
|
+
#
|
|
736
|
+
# # The returned object is of type Google::Cloud::Chronicle::V1::FindingsRefinementDeployment.
|
|
737
|
+
# p result
|
|
738
|
+
#
|
|
739
|
+
def update_findings_refinement_deployment request, options = nil
|
|
740
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
741
|
+
|
|
742
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::UpdateFindingsRefinementDeploymentRequest
|
|
743
|
+
|
|
744
|
+
# Converts hash and nil to an options object
|
|
745
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
746
|
+
|
|
747
|
+
# Customize the options with defaults
|
|
748
|
+
metadata = @config.rpcs.update_findings_refinement_deployment.metadata.to_h
|
|
749
|
+
|
|
750
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
751
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
752
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
753
|
+
gapic_version: ::Google::Cloud::Chronicle::V1::VERSION
|
|
754
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
755
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
756
|
+
|
|
757
|
+
header_params = {}
|
|
758
|
+
if request.findings_refinement_deployment&.name
|
|
759
|
+
header_params["findings_refinement_deployment.name"] = request.findings_refinement_deployment.name
|
|
760
|
+
end
|
|
761
|
+
|
|
762
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
763
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
764
|
+
|
|
765
|
+
options.apply_defaults timeout: @config.rpcs.update_findings_refinement_deployment.timeout,
|
|
766
|
+
metadata: metadata,
|
|
767
|
+
retry_policy: @config.rpcs.update_findings_refinement_deployment.retry_policy
|
|
768
|
+
|
|
769
|
+
options.apply_defaults timeout: @config.timeout,
|
|
770
|
+
metadata: @config.metadata,
|
|
771
|
+
retry_policy: @config.retry_policy
|
|
772
|
+
|
|
773
|
+
@findings_refinement_service_stub.call_rpc :update_findings_refinement_deployment, request, options: options do |response, operation|
|
|
774
|
+
yield response, operation if block_given?
|
|
775
|
+
end
|
|
776
|
+
rescue ::GRPC::BadStatus => e
|
|
777
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
778
|
+
end
|
|
779
|
+
|
|
780
|
+
##
|
|
781
|
+
# Lists all findings refinement deployments.
|
|
782
|
+
#
|
|
783
|
+
# @overload list_all_findings_refinement_deployments(request, options = nil)
|
|
784
|
+
# Pass arguments to `list_all_findings_refinement_deployments` via a request object, either of type
|
|
785
|
+
# {::Google::Cloud::Chronicle::V1::ListAllFindingsRefinementDeploymentsRequest} or an equivalent Hash.
|
|
786
|
+
#
|
|
787
|
+
# @param request [::Google::Cloud::Chronicle::V1::ListAllFindingsRefinementDeploymentsRequest, ::Hash]
|
|
788
|
+
# A request object representing the call parameters. Required. To specify no
|
|
789
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
790
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
791
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
792
|
+
#
|
|
793
|
+
# @overload list_all_findings_refinement_deployments(instance: nil, page_size: nil, page_token: nil, filter: nil)
|
|
794
|
+
# Pass arguments to `list_all_findings_refinement_deployments` via keyword arguments. Note that at
|
|
795
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
796
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
797
|
+
#
|
|
798
|
+
# @param instance [::String]
|
|
799
|
+
# Required. The name of the parent resource, which is the SecOps instance to
|
|
800
|
+
# list all findings refinement deployments over. Format:
|
|
801
|
+
# projects/\\{project}/locations/\\{location}/instances/\\{instance}
|
|
802
|
+
# @param page_size [::Integer]
|
|
803
|
+
# The maximum number of findings refinement deployments to return. The
|
|
804
|
+
# service may return fewer than this value. If unspecified, at most 100 rule
|
|
805
|
+
# deployments will be returned. The maximum value is 1000; values above 1000
|
|
806
|
+
# will be coerced to 1000.
|
|
807
|
+
# @param page_token [::String]
|
|
808
|
+
# A page token, received from a previous
|
|
809
|
+
# `ListAllFindingsRefinementDeployments` call. Provide this to retrieve the
|
|
810
|
+
# subsequent page.
|
|
811
|
+
#
|
|
812
|
+
# When paginating, all other parameters provided to
|
|
813
|
+
# `ListAllFindingsRefinementDeployments` must match the call that provided
|
|
814
|
+
# the page token.
|
|
815
|
+
# @param filter [::String]
|
|
816
|
+
# A filter that can be used to retrieve specific findings refinement
|
|
817
|
+
# deployments.
|
|
818
|
+
# Only the following filters are allowed:
|
|
819
|
+
# detection_exclusion_application.curated_rule_sets:"<curated_rule_set_name>"",
|
|
820
|
+
# detection_exclusion_application.curated_rules:"<curated_rule_name>"
|
|
821
|
+
#
|
|
822
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
823
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::FindingsRefinementDeployment>]
|
|
824
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
825
|
+
#
|
|
826
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Chronicle::V1::FindingsRefinementDeployment>]
|
|
827
|
+
#
|
|
828
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
829
|
+
#
|
|
830
|
+
# @example Basic example
|
|
831
|
+
# require "google/cloud/chronicle/v1"
|
|
832
|
+
#
|
|
833
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
834
|
+
# client = Google::Cloud::Chronicle::V1::FindingsRefinementService::Client.new
|
|
835
|
+
#
|
|
836
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
837
|
+
# request = Google::Cloud::Chronicle::V1::ListAllFindingsRefinementDeploymentsRequest.new
|
|
838
|
+
#
|
|
839
|
+
# # Call the list_all_findings_refinement_deployments method.
|
|
840
|
+
# result = client.list_all_findings_refinement_deployments request
|
|
841
|
+
#
|
|
842
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
843
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
844
|
+
# result.each do |item|
|
|
845
|
+
# # Each element is of type ::Google::Cloud::Chronicle::V1::FindingsRefinementDeployment.
|
|
846
|
+
# p item
|
|
847
|
+
# end
|
|
848
|
+
#
|
|
849
|
+
def list_all_findings_refinement_deployments request, options = nil
|
|
850
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
851
|
+
|
|
852
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ListAllFindingsRefinementDeploymentsRequest
|
|
853
|
+
|
|
854
|
+
# Converts hash and nil to an options object
|
|
855
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
856
|
+
|
|
857
|
+
# Customize the options with defaults
|
|
858
|
+
metadata = @config.rpcs.list_all_findings_refinement_deployments.metadata.to_h
|
|
859
|
+
|
|
860
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
861
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
862
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
863
|
+
gapic_version: ::Google::Cloud::Chronicle::V1::VERSION
|
|
864
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
865
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
866
|
+
|
|
867
|
+
header_params = {}
|
|
868
|
+
if request.instance
|
|
869
|
+
header_params["instance"] = request.instance
|
|
870
|
+
end
|
|
871
|
+
|
|
872
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
873
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
874
|
+
|
|
875
|
+
options.apply_defaults timeout: @config.rpcs.list_all_findings_refinement_deployments.timeout,
|
|
876
|
+
metadata: metadata,
|
|
877
|
+
retry_policy: @config.rpcs.list_all_findings_refinement_deployments.retry_policy
|
|
878
|
+
|
|
879
|
+
options.apply_defaults timeout: @config.timeout,
|
|
880
|
+
metadata: @config.metadata,
|
|
881
|
+
retry_policy: @config.retry_policy
|
|
882
|
+
|
|
883
|
+
@findings_refinement_service_stub.call_rpc :list_all_findings_refinement_deployments, request, options: options do |response, operation|
|
|
884
|
+
response = ::Gapic::PagedEnumerable.new @findings_refinement_service_stub, :list_all_findings_refinement_deployments, request, response, operation, options
|
|
885
|
+
yield response, operation if block_given?
|
|
886
|
+
throw :response, response
|
|
887
|
+
end
|
|
888
|
+
rescue ::GRPC::BadStatus => e
|
|
889
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
890
|
+
end
|
|
891
|
+
|
|
892
|
+
##
|
|
893
|
+
# Returns findings refinement activity for a specific findings refinement.
|
|
894
|
+
#
|
|
895
|
+
# @overload compute_findings_refinement_activity(request, options = nil)
|
|
896
|
+
# Pass arguments to `compute_findings_refinement_activity` via a request object, either of type
|
|
897
|
+
# {::Google::Cloud::Chronicle::V1::ComputeFindingsRefinementActivityRequest} or an equivalent Hash.
|
|
898
|
+
#
|
|
899
|
+
# @param request [::Google::Cloud::Chronicle::V1::ComputeFindingsRefinementActivityRequest, ::Hash]
|
|
900
|
+
# A request object representing the call parameters. Required. To specify no
|
|
901
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
902
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
903
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
904
|
+
#
|
|
905
|
+
# @overload compute_findings_refinement_activity(name: nil, interval: nil)
|
|
906
|
+
# Pass arguments to `compute_findings_refinement_activity` via keyword arguments. Note that at
|
|
907
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
908
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
909
|
+
#
|
|
910
|
+
# @param name [::String]
|
|
911
|
+
# Required. Full resource name for the findings refinement to fetch the
|
|
912
|
+
# activity for. Format:
|
|
913
|
+
# projects/\\{project}/locations/\\{region}/instances/\\{instance}/findingsRefinements/\\{findings_refinement}
|
|
914
|
+
# @param interval [::Google::Type::Interval, ::Hash]
|
|
915
|
+
# The time interval the activity is measured over.
|
|
916
|
+
#
|
|
917
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
918
|
+
# @yieldparam response [::Google::Cloud::Chronicle::V1::ComputeFindingsRefinementActivityResponse]
|
|
919
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
920
|
+
#
|
|
921
|
+
# @return [::Google::Cloud::Chronicle::V1::ComputeFindingsRefinementActivityResponse]
|
|
922
|
+
#
|
|
923
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
924
|
+
#
|
|
925
|
+
# @example Basic example
|
|
926
|
+
# require "google/cloud/chronicle/v1"
|
|
927
|
+
#
|
|
928
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
929
|
+
# client = Google::Cloud::Chronicle::V1::FindingsRefinementService::Client.new
|
|
930
|
+
#
|
|
931
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
932
|
+
# request = Google::Cloud::Chronicle::V1::ComputeFindingsRefinementActivityRequest.new
|
|
933
|
+
#
|
|
934
|
+
# # Call the compute_findings_refinement_activity method.
|
|
935
|
+
# result = client.compute_findings_refinement_activity request
|
|
936
|
+
#
|
|
937
|
+
# # The returned object is of type Google::Cloud::Chronicle::V1::ComputeFindingsRefinementActivityResponse.
|
|
938
|
+
# p result
|
|
939
|
+
#
|
|
940
|
+
def compute_findings_refinement_activity request, options = nil
|
|
941
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
942
|
+
|
|
943
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ComputeFindingsRefinementActivityRequest
|
|
944
|
+
|
|
945
|
+
# Converts hash and nil to an options object
|
|
946
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
947
|
+
|
|
948
|
+
# Customize the options with defaults
|
|
949
|
+
metadata = @config.rpcs.compute_findings_refinement_activity.metadata.to_h
|
|
950
|
+
|
|
951
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
952
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
953
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
954
|
+
gapic_version: ::Google::Cloud::Chronicle::V1::VERSION
|
|
955
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
956
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
957
|
+
|
|
958
|
+
header_params = {}
|
|
959
|
+
if request.name
|
|
960
|
+
header_params["name"] = request.name
|
|
961
|
+
end
|
|
962
|
+
|
|
963
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
964
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
965
|
+
|
|
966
|
+
options.apply_defaults timeout: @config.rpcs.compute_findings_refinement_activity.timeout,
|
|
967
|
+
metadata: metadata,
|
|
968
|
+
retry_policy: @config.rpcs.compute_findings_refinement_activity.retry_policy
|
|
969
|
+
|
|
970
|
+
options.apply_defaults timeout: @config.timeout,
|
|
971
|
+
metadata: @config.metadata,
|
|
972
|
+
retry_policy: @config.retry_policy
|
|
973
|
+
|
|
974
|
+
@findings_refinement_service_stub.call_rpc :compute_findings_refinement_activity, request, options: options do |response, operation|
|
|
975
|
+
yield response, operation if block_given?
|
|
976
|
+
end
|
|
977
|
+
rescue ::GRPC::BadStatus => e
|
|
978
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
979
|
+
end
|
|
980
|
+
|
|
981
|
+
##
|
|
982
|
+
# Returns findings refinement activity for all findings refinements.
|
|
983
|
+
#
|
|
984
|
+
# @overload compute_all_findings_refinement_activities(request, options = nil)
|
|
985
|
+
# Pass arguments to `compute_all_findings_refinement_activities` via a request object, either of type
|
|
986
|
+
# {::Google::Cloud::Chronicle::V1::ComputeAllFindingsRefinementActivitiesRequest} or an equivalent Hash.
|
|
987
|
+
#
|
|
988
|
+
# @param request [::Google::Cloud::Chronicle::V1::ComputeAllFindingsRefinementActivitiesRequest, ::Hash]
|
|
989
|
+
# A request object representing the call parameters. Required. To specify no
|
|
990
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
991
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
992
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
993
|
+
#
|
|
994
|
+
# @overload compute_all_findings_refinement_activities(instance: nil, interval: nil)
|
|
995
|
+
# Pass arguments to `compute_all_findings_refinement_activities` via keyword arguments. Note that at
|
|
996
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
997
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
998
|
+
#
|
|
999
|
+
# @param instance [::String]
|
|
1000
|
+
# Required. The ID of the Instance to retrieve counts for.
|
|
1001
|
+
# Format:
|
|
1002
|
+
# projects/\\{project}/locations/\\{location}/instances/\\{instance}
|
|
1003
|
+
# @param interval [::Google::Type::Interval, ::Hash]
|
|
1004
|
+
# The time interval the activity is measured over.
|
|
1005
|
+
#
|
|
1006
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1007
|
+
# @yieldparam response [::Google::Cloud::Chronicle::V1::ComputeAllFindingsRefinementActivitiesResponse]
|
|
1008
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1009
|
+
#
|
|
1010
|
+
# @return [::Google::Cloud::Chronicle::V1::ComputeAllFindingsRefinementActivitiesResponse]
|
|
1011
|
+
#
|
|
1012
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1013
|
+
#
|
|
1014
|
+
# @example Basic example
|
|
1015
|
+
# require "google/cloud/chronicle/v1"
|
|
1016
|
+
#
|
|
1017
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1018
|
+
# client = Google::Cloud::Chronicle::V1::FindingsRefinementService::Client.new
|
|
1019
|
+
#
|
|
1020
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1021
|
+
# request = Google::Cloud::Chronicle::V1::ComputeAllFindingsRefinementActivitiesRequest.new
|
|
1022
|
+
#
|
|
1023
|
+
# # Call the compute_all_findings_refinement_activities method.
|
|
1024
|
+
# result = client.compute_all_findings_refinement_activities request
|
|
1025
|
+
#
|
|
1026
|
+
# # The returned object is of type Google::Cloud::Chronicle::V1::ComputeAllFindingsRefinementActivitiesResponse.
|
|
1027
|
+
# p result
|
|
1028
|
+
#
|
|
1029
|
+
def compute_all_findings_refinement_activities request, options = nil
|
|
1030
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1031
|
+
|
|
1032
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Chronicle::V1::ComputeAllFindingsRefinementActivitiesRequest
|
|
1033
|
+
|
|
1034
|
+
# Converts hash and nil to an options object
|
|
1035
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1036
|
+
|
|
1037
|
+
# Customize the options with defaults
|
|
1038
|
+
metadata = @config.rpcs.compute_all_findings_refinement_activities.metadata.to_h
|
|
1039
|
+
|
|
1040
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1041
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1042
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1043
|
+
gapic_version: ::Google::Cloud::Chronicle::V1::VERSION
|
|
1044
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1045
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1046
|
+
|
|
1047
|
+
header_params = {}
|
|
1048
|
+
if request.instance
|
|
1049
|
+
header_params["instance"] = request.instance
|
|
1050
|
+
end
|
|
1051
|
+
|
|
1052
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1053
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1054
|
+
|
|
1055
|
+
options.apply_defaults timeout: @config.rpcs.compute_all_findings_refinement_activities.timeout,
|
|
1056
|
+
metadata: metadata,
|
|
1057
|
+
retry_policy: @config.rpcs.compute_all_findings_refinement_activities.retry_policy
|
|
1058
|
+
|
|
1059
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1060
|
+
metadata: @config.metadata,
|
|
1061
|
+
retry_policy: @config.retry_policy
|
|
1062
|
+
|
|
1063
|
+
@findings_refinement_service_stub.call_rpc :compute_all_findings_refinement_activities, request, options: options do |response, operation|
|
|
1064
|
+
yield response, operation if block_given?
|
|
1065
|
+
end
|
|
1066
|
+
rescue ::GRPC::BadStatus => e
|
|
1067
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1068
|
+
end
|
|
1069
|
+
|
|
1070
|
+
##
|
|
1071
|
+
# Configuration class for the FindingsRefinementService API.
|
|
1072
|
+
#
|
|
1073
|
+
# This class represents the configuration for FindingsRefinementService,
|
|
1074
|
+
# providing control over timeouts, retry behavior, logging, transport
|
|
1075
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
|
1076
|
+
# applied individually to specific RPCs. See
|
|
1077
|
+
# {::Google::Cloud::Chronicle::V1::FindingsRefinementService::Client::Configuration::Rpcs}
|
|
1078
|
+
# for a list of RPCs that can be configured independently.
|
|
1079
|
+
#
|
|
1080
|
+
# Configuration can be applied globally to all clients, or to a single client
|
|
1081
|
+
# on construction.
|
|
1082
|
+
#
|
|
1083
|
+
# @example
|
|
1084
|
+
#
|
|
1085
|
+
# # Modify the global config, setting the timeout for
|
|
1086
|
+
# # get_findings_refinement to 20 seconds,
|
|
1087
|
+
# # and all remaining timeouts to 10 seconds.
|
|
1088
|
+
# ::Google::Cloud::Chronicle::V1::FindingsRefinementService::Client.configure do |config|
|
|
1089
|
+
# config.timeout = 10.0
|
|
1090
|
+
# config.rpcs.get_findings_refinement.timeout = 20.0
|
|
1091
|
+
# end
|
|
1092
|
+
#
|
|
1093
|
+
# # Apply the above configuration only to a new client.
|
|
1094
|
+
# client = ::Google::Cloud::Chronicle::V1::FindingsRefinementService::Client.new do |config|
|
|
1095
|
+
# config.timeout = 10.0
|
|
1096
|
+
# config.rpcs.get_findings_refinement.timeout = 20.0
|
|
1097
|
+
# end
|
|
1098
|
+
#
|
|
1099
|
+
# @!attribute [rw] endpoint
|
|
1100
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
|
1101
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
|
1102
|
+
# @return [::String,nil]
|
|
1103
|
+
# @!attribute [rw] credentials
|
|
1104
|
+
# Credentials to send with calls. You may provide any of the following types:
|
|
1105
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
1106
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
1107
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
1108
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
|
1109
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
|
1110
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
1111
|
+
# * (`nil`) indicating no credentials
|
|
1112
|
+
#
|
|
1113
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
1114
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
1115
|
+
# Google APIs can compromise the security of your systems and data.
|
|
1116
|
+
#
|
|
1117
|
+
# @example
|
|
1118
|
+
#
|
|
1119
|
+
# # The recommended way to provide credentials is to use the `make_creds` method
|
|
1120
|
+
# # on the appropriate credentials class for your environment.
|
|
1121
|
+
#
|
|
1122
|
+
# require "googleauth"
|
|
1123
|
+
#
|
|
1124
|
+
# credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
1125
|
+
# json_key_io: ::File.open("/path/to/keyfile.json")
|
|
1126
|
+
# )
|
|
1127
|
+
#
|
|
1128
|
+
# client = ::Google::Cloud::Chronicle::V1::FindingsRefinementService::Client.new do |config|
|
|
1129
|
+
# config.credentials = credentials
|
|
1130
|
+
# end
|
|
1131
|
+
#
|
|
1132
|
+
# @note Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
1133
|
+
# external source for authentication to Google Cloud, you must validate it before
|
|
1134
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
|
1135
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
|
1136
|
+
# For more information, refer to [Validate credential configurations from external
|
|
1137
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
|
1138
|
+
# @return [::Object]
|
|
1139
|
+
# @!attribute [rw] scope
|
|
1140
|
+
# The OAuth scopes
|
|
1141
|
+
# @return [::Array<::String>]
|
|
1142
|
+
# @!attribute [rw] lib_name
|
|
1143
|
+
# The library name as recorded in instrumentation and logging
|
|
1144
|
+
# @return [::String]
|
|
1145
|
+
# @!attribute [rw] lib_version
|
|
1146
|
+
# The library version as recorded in instrumentation and logging
|
|
1147
|
+
# @return [::String]
|
|
1148
|
+
# @!attribute [rw] channel_args
|
|
1149
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
|
1150
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
|
1151
|
+
# @return [::Hash]
|
|
1152
|
+
# @!attribute [rw] interceptors
|
|
1153
|
+
# An array of interceptors that are run before calls are executed.
|
|
1154
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
|
1155
|
+
# @!attribute [rw] timeout
|
|
1156
|
+
# The call timeout in seconds.
|
|
1157
|
+
# @return [::Numeric]
|
|
1158
|
+
# @!attribute [rw] metadata
|
|
1159
|
+
# Additional gRPC headers to be sent with the call.
|
|
1160
|
+
# @return [::Hash{::Symbol=>::String}]
|
|
1161
|
+
# @!attribute [rw] retry_policy
|
|
1162
|
+
# The retry policy. The value is a hash with the following keys:
|
|
1163
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
1164
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
1165
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
1166
|
+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
|
|
1167
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
1168
|
+
# trigger a retry.
|
|
1169
|
+
# @return [::Hash]
|
|
1170
|
+
# @!attribute [rw] quota_project
|
|
1171
|
+
# A separate project against which to charge quota.
|
|
1172
|
+
# @return [::String]
|
|
1173
|
+
# @!attribute [rw] universe_domain
|
|
1174
|
+
# The universe domain within which to make requests. This determines the
|
|
1175
|
+
# default endpoint URL. The default value of nil uses the environment
|
|
1176
|
+
# universe (usually the default "googleapis.com" universe).
|
|
1177
|
+
# @return [::String,nil]
|
|
1178
|
+
# @!attribute [rw] logger
|
|
1179
|
+
# A custom logger to use for request/response debug logging, or the value
|
|
1180
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
|
1181
|
+
# explicitly disable logging.
|
|
1182
|
+
# @return [::Logger,:default,nil]
|
|
1183
|
+
#
|
|
1184
|
+
class Configuration
|
|
1185
|
+
extend ::Gapic::Config
|
|
1186
|
+
|
|
1187
|
+
# @private
|
|
1188
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
|
1189
|
+
DEFAULT_ENDPOINT = "chronicle.googleapis.com"
|
|
1190
|
+
|
|
1191
|
+
config_attr :endpoint, nil, ::String, nil
|
|
1192
|
+
config_attr :credentials, nil do |value|
|
|
1193
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
|
|
1194
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel
|
|
1195
|
+
allowed.any? { |klass| klass === value }
|
|
1196
|
+
end
|
|
1197
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
|
1198
|
+
config_attr :lib_name, nil, ::String, nil
|
|
1199
|
+
config_attr :lib_version, nil, ::String, nil
|
|
1200
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
|
1201
|
+
config_attr :interceptors, nil, ::Array, nil
|
|
1202
|
+
config_attr :timeout, nil, ::Numeric, nil
|
|
1203
|
+
config_attr :metadata, nil, ::Hash, nil
|
|
1204
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
1205
|
+
config_attr :quota_project, nil, ::String, nil
|
|
1206
|
+
config_attr :universe_domain, nil, ::String, nil
|
|
1207
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
|
1208
|
+
|
|
1209
|
+
# @private
|
|
1210
|
+
def initialize parent_config = nil
|
|
1211
|
+
@parent_config = parent_config unless parent_config.nil?
|
|
1212
|
+
|
|
1213
|
+
yield self if block_given?
|
|
1214
|
+
end
|
|
1215
|
+
|
|
1216
|
+
##
|
|
1217
|
+
# Configurations for individual RPCs
|
|
1218
|
+
# @return [Rpcs]
|
|
1219
|
+
#
|
|
1220
|
+
def rpcs
|
|
1221
|
+
@rpcs ||= begin
|
|
1222
|
+
parent_rpcs = nil
|
|
1223
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
|
1224
|
+
Rpcs.new parent_rpcs
|
|
1225
|
+
end
|
|
1226
|
+
end
|
|
1227
|
+
|
|
1228
|
+
##
|
|
1229
|
+
# Configuration for the channel pool
|
|
1230
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
|
1231
|
+
#
|
|
1232
|
+
def channel_pool
|
|
1233
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
|
1234
|
+
end
|
|
1235
|
+
|
|
1236
|
+
##
|
|
1237
|
+
# Configuration RPC class for the FindingsRefinementService API.
|
|
1238
|
+
#
|
|
1239
|
+
# Includes fields providing the configuration for each RPC in this service.
|
|
1240
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
|
1241
|
+
# the following configuration fields:
|
|
1242
|
+
#
|
|
1243
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
|
1244
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
|
1245
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
|
1246
|
+
# include the following keys:
|
|
1247
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
1248
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
1249
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
1250
|
+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
|
|
1251
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
1252
|
+
# trigger a retry.
|
|
1253
|
+
#
|
|
1254
|
+
class Rpcs
|
|
1255
|
+
##
|
|
1256
|
+
# RPC-specific configuration for `get_findings_refinement`
|
|
1257
|
+
# @return [::Gapic::Config::Method]
|
|
1258
|
+
#
|
|
1259
|
+
attr_reader :get_findings_refinement
|
|
1260
|
+
##
|
|
1261
|
+
# RPC-specific configuration for `list_findings_refinements`
|
|
1262
|
+
# @return [::Gapic::Config::Method]
|
|
1263
|
+
#
|
|
1264
|
+
attr_reader :list_findings_refinements
|
|
1265
|
+
##
|
|
1266
|
+
# RPC-specific configuration for `create_findings_refinement`
|
|
1267
|
+
# @return [::Gapic::Config::Method]
|
|
1268
|
+
#
|
|
1269
|
+
attr_reader :create_findings_refinement
|
|
1270
|
+
##
|
|
1271
|
+
# RPC-specific configuration for `update_findings_refinement`
|
|
1272
|
+
# @return [::Gapic::Config::Method]
|
|
1273
|
+
#
|
|
1274
|
+
attr_reader :update_findings_refinement
|
|
1275
|
+
##
|
|
1276
|
+
# RPC-specific configuration for `get_findings_refinement_deployment`
|
|
1277
|
+
# @return [::Gapic::Config::Method]
|
|
1278
|
+
#
|
|
1279
|
+
attr_reader :get_findings_refinement_deployment
|
|
1280
|
+
##
|
|
1281
|
+
# RPC-specific configuration for `update_findings_refinement_deployment`
|
|
1282
|
+
# @return [::Gapic::Config::Method]
|
|
1283
|
+
#
|
|
1284
|
+
attr_reader :update_findings_refinement_deployment
|
|
1285
|
+
##
|
|
1286
|
+
# RPC-specific configuration for `list_all_findings_refinement_deployments`
|
|
1287
|
+
# @return [::Gapic::Config::Method]
|
|
1288
|
+
#
|
|
1289
|
+
attr_reader :list_all_findings_refinement_deployments
|
|
1290
|
+
##
|
|
1291
|
+
# RPC-specific configuration for `compute_findings_refinement_activity`
|
|
1292
|
+
# @return [::Gapic::Config::Method]
|
|
1293
|
+
#
|
|
1294
|
+
attr_reader :compute_findings_refinement_activity
|
|
1295
|
+
##
|
|
1296
|
+
# RPC-specific configuration for `compute_all_findings_refinement_activities`
|
|
1297
|
+
# @return [::Gapic::Config::Method]
|
|
1298
|
+
#
|
|
1299
|
+
attr_reader :compute_all_findings_refinement_activities
|
|
1300
|
+
|
|
1301
|
+
# @private
|
|
1302
|
+
def initialize parent_rpcs = nil
|
|
1303
|
+
get_findings_refinement_config = parent_rpcs.get_findings_refinement if parent_rpcs.respond_to? :get_findings_refinement
|
|
1304
|
+
@get_findings_refinement = ::Gapic::Config::Method.new get_findings_refinement_config
|
|
1305
|
+
list_findings_refinements_config = parent_rpcs.list_findings_refinements if parent_rpcs.respond_to? :list_findings_refinements
|
|
1306
|
+
@list_findings_refinements = ::Gapic::Config::Method.new list_findings_refinements_config
|
|
1307
|
+
create_findings_refinement_config = parent_rpcs.create_findings_refinement if parent_rpcs.respond_to? :create_findings_refinement
|
|
1308
|
+
@create_findings_refinement = ::Gapic::Config::Method.new create_findings_refinement_config
|
|
1309
|
+
update_findings_refinement_config = parent_rpcs.update_findings_refinement if parent_rpcs.respond_to? :update_findings_refinement
|
|
1310
|
+
@update_findings_refinement = ::Gapic::Config::Method.new update_findings_refinement_config
|
|
1311
|
+
get_findings_refinement_deployment_config = parent_rpcs.get_findings_refinement_deployment if parent_rpcs.respond_to? :get_findings_refinement_deployment
|
|
1312
|
+
@get_findings_refinement_deployment = ::Gapic::Config::Method.new get_findings_refinement_deployment_config
|
|
1313
|
+
update_findings_refinement_deployment_config = parent_rpcs.update_findings_refinement_deployment if parent_rpcs.respond_to? :update_findings_refinement_deployment
|
|
1314
|
+
@update_findings_refinement_deployment = ::Gapic::Config::Method.new update_findings_refinement_deployment_config
|
|
1315
|
+
list_all_findings_refinement_deployments_config = parent_rpcs.list_all_findings_refinement_deployments if parent_rpcs.respond_to? :list_all_findings_refinement_deployments
|
|
1316
|
+
@list_all_findings_refinement_deployments = ::Gapic::Config::Method.new list_all_findings_refinement_deployments_config
|
|
1317
|
+
compute_findings_refinement_activity_config = parent_rpcs.compute_findings_refinement_activity if parent_rpcs.respond_to? :compute_findings_refinement_activity
|
|
1318
|
+
@compute_findings_refinement_activity = ::Gapic::Config::Method.new compute_findings_refinement_activity_config
|
|
1319
|
+
compute_all_findings_refinement_activities_config = parent_rpcs.compute_all_findings_refinement_activities if parent_rpcs.respond_to? :compute_all_findings_refinement_activities
|
|
1320
|
+
@compute_all_findings_refinement_activities = ::Gapic::Config::Method.new compute_all_findings_refinement_activities_config
|
|
1321
|
+
|
|
1322
|
+
yield self if block_given?
|
|
1323
|
+
end
|
|
1324
|
+
end
|
|
1325
|
+
end
|
|
1326
|
+
end
|
|
1327
|
+
end
|
|
1328
|
+
end
|
|
1329
|
+
end
|
|
1330
|
+
end
|
|
1331
|
+
end
|