google-cloud-security_center-v2 0.a → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +144 -8
  5. data/lib/google/cloud/security_center/v2/rest.rb +37 -0
  6. data/lib/google/cloud/security_center/v2/security_center/client.rb +4728 -0
  7. data/lib/google/cloud/security_center/v2/security_center/credentials.rb +51 -0
  8. data/lib/google/cloud/security_center/v2/security_center/operations.rb +801 -0
  9. data/lib/google/cloud/security_center/v2/security_center/paths.rb +973 -0
  10. data/lib/google/cloud/security_center/v2/security_center/rest/client.rb +4347 -0
  11. data/lib/google/cloud/security_center/v2/security_center/rest/operations.rb +894 -0
  12. data/lib/google/cloud/security_center/v2/security_center/rest/service_stub.rb +3165 -0
  13. data/lib/google/cloud/security_center/v2/security_center/rest.rb +53 -0
  14. data/lib/google/cloud/security_center/v2/security_center.rb +56 -0
  15. data/lib/google/cloud/security_center/v2/version.rb +7 -2
  16. data/lib/google/cloud/security_center/v2.rb +45 -0
  17. data/lib/google/cloud/securitycenter/v2/access_pb.rb +44 -0
  18. data/lib/google/cloud/securitycenter/v2/application_pb.rb +42 -0
  19. data/lib/google/cloud/securitycenter/v2/attack_exposure_pb.rb +47 -0
  20. data/lib/google/cloud/securitycenter/v2/attack_path_pb.rb +49 -0
  21. data/lib/google/cloud/securitycenter/v2/backup_disaster_recovery_pb.rb +45 -0
  22. data/lib/google/cloud/securitycenter/v2/bigquery_export_pb.rb +47 -0
  23. data/lib/google/cloud/securitycenter/v2/cloud_dlp_data_profile_pb.rb +45 -0
  24. data/lib/google/cloud/securitycenter/v2/cloud_dlp_inspection_pb.rb +44 -0
  25. data/lib/google/cloud/securitycenter/v2/compliance_pb.rb +42 -0
  26. data/lib/google/cloud/securitycenter/v2/connection_pb.rb +43 -0
  27. data/lib/google/cloud/securitycenter/v2/contact_details_pb.rb +43 -0
  28. data/lib/google/cloud/securitycenter/v2/container_pb.rb +47 -0
  29. data/lib/google/cloud/securitycenter/v2/database_pb.rb +42 -0
  30. data/lib/google/cloud/securitycenter/v2/exfiltration_pb.rb +43 -0
  31. data/lib/google/cloud/securitycenter/v2/external_system_pb.rb +47 -0
  32. data/lib/google/cloud/securitycenter/v2/file_pb.rb +43 -0
  33. data/lib/google/cloud/securitycenter/v2/finding_pb.rb +105 -0
  34. data/lib/google/cloud/securitycenter/v2/iam_binding_pb.rb +43 -0
  35. data/lib/google/cloud/securitycenter/v2/indicator_pb.rb +47 -0
  36. data/lib/google/cloud/securitycenter/v2/kernel_rootkit_pb.rb +42 -0
  37. data/lib/google/cloud/securitycenter/v2/kubernetes_pb.rb +57 -0
  38. data/lib/google/cloud/securitycenter/v2/label_pb.rb +42 -0
  39. data/lib/google/cloud/securitycenter/v2/load_balancer_pb.rb +42 -0
  40. data/lib/google/cloud/securitycenter/v2/log_entry_pb.rb +46 -0
  41. data/lib/google/cloud/securitycenter/v2/mitre_attack_pb.rb +44 -0
  42. data/lib/google/cloud/securitycenter/v2/mute_config_pb.rb +48 -0
  43. data/lib/google/cloud/securitycenter/v2/notification_config_pb.rb +46 -0
  44. data/lib/google/cloud/securitycenter/v2/notification_message_pb.rb +47 -0
  45. data/lib/google/cloud/securitycenter/v2/org_policy_pb.rb +44 -0
  46. data/lib/google/cloud/securitycenter/v2/process_pb.rb +46 -0
  47. data/lib/google/cloud/securitycenter/v2/resource_pb.rb +44 -0
  48. data/lib/google/cloud/securitycenter/v2/resource_value_config_pb.rb +49 -0
  49. data/lib/google/cloud/securitycenter/v2/security_marks_pb.rb +44 -0
  50. data/lib/google/cloud/securitycenter/v2/security_posture_pb.rb +43 -0
  51. data/lib/google/cloud/securitycenter/v2/securitycenter_service_pb.rb +128 -0
  52. data/lib/google/cloud/securitycenter/v2/securitycenter_service_services_pb.rb +167 -0
  53. data/lib/google/cloud/securitycenter/v2/simulation_pb.rb +49 -0
  54. data/lib/google/cloud/securitycenter/v2/source_pb.rb +44 -0
  55. data/lib/google/cloud/securitycenter/v2/valued_resource_pb.rb +46 -0
  56. data/lib/google/cloud/securitycenter/v2/vulnerability_pb.rb +58 -0
  57. data/lib/google-cloud-security_center-v2.rb +21 -0
  58. data/proto_docs/README.md +4 -0
  59. data/proto_docs/google/api/client.rb +399 -0
  60. data/proto_docs/google/api/field_behavior.rb +85 -0
  61. data/proto_docs/google/api/launch_stage.rb +71 -0
  62. data/proto_docs/google/api/resource.rb +222 -0
  63. data/proto_docs/google/api/routing.rb +459 -0
  64. data/proto_docs/google/cloud/securitycenter/v2/access.rb +120 -0
  65. data/proto_docs/google/cloud/securitycenter/v2/application.rb +40 -0
  66. data/proto_docs/google/cloud/securitycenter/v2/attack_exposure.rb +73 -0
  67. data/proto_docs/google/cloud/securitycenter/v2/attack_path.rb +147 -0
  68. data/proto_docs/google/cloud/securitycenter/v2/backup_disaster_recovery.rb +90 -0
  69. data/proto_docs/google/cloud/securitycenter/v2/bigquery_export.rb +96 -0
  70. data/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_data_profile.rb +52 -0
  71. data/proto_docs/google/cloud/securitycenter/v2/cloud_dlp_inspection.rb +50 -0
  72. data/proto_docs/google/cloud/securitycenter/v2/compliance.rb +43 -0
  73. data/proto_docs/google/cloud/securitycenter/v2/connection.rb +70 -0
  74. data/proto_docs/google/cloud/securitycenter/v2/contact_details.rb +44 -0
  75. data/proto_docs/google/cloud/securitycenter/v2/container.rb +49 -0
  76. data/proto_docs/google/cloud/securitycenter/v2/database.rb +67 -0
  77. data/proto_docs/google/cloud/securitycenter/v2/exfiltration.rb +64 -0
  78. data/proto_docs/google/cloud/securitycenter/v2/external_system.rb +106 -0
  79. data/proto_docs/google/cloud/securitycenter/v2/file.rb +72 -0
  80. data/proto_docs/google/cloud/securitycenter/v2/finding.rb +411 -0
  81. data/proto_docs/google/cloud/securitycenter/v2/iam_binding.rb +56 -0
  82. data/proto_docs/google/cloud/securitycenter/v2/indicator.rb +112 -0
  83. data/proto_docs/google/cloud/securitycenter/v2/kernel_rootkit.rb +66 -0
  84. data/proto_docs/google/cloud/securitycenter/v2/kubernetes.rb +241 -0
  85. data/proto_docs/google/cloud/securitycenter/v2/label.rb +41 -0
  86. data/proto_docs/google/cloud/securitycenter/v2/load_balancer.rb +36 -0
  87. data/proto_docs/google/cloud/securitycenter/v2/log_entry.rb +58 -0
  88. data/proto_docs/google/cloud/securitycenter/v2/mitre_attack.rb +285 -0
  89. data/proto_docs/google/cloud/securitycenter/v2/mute_config.rb +100 -0
  90. data/proto_docs/google/cloud/securitycenter/v2/notification_config.rb +90 -0
  91. data/proto_docs/google/cloud/securitycenter/v2/notification_message.rb +42 -0
  92. data/proto_docs/google/cloud/securitycenter/v2/org_policy.rb +37 -0
  93. data/proto_docs/google/cloud/securitycenter/v2/process.rb +79 -0
  94. data/proto_docs/google/cloud/securitycenter/v2/resource.rb +42 -0
  95. data/proto_docs/google/cloud/securitycenter/v2/resource_value_config.rb +122 -0
  96. data/proto_docs/google/cloud/securitycenter/v2/security_marks.rb +84 -0
  97. data/proto_docs/google/cloud/securitycenter/v2/security_posture.rb +83 -0
  98. data/proto_docs/google/cloud/securitycenter/v2/securitycenter_service.rb +1136 -0
  99. data/proto_docs/google/cloud/securitycenter/v2/simulation.rb +43 -0
  100. data/proto_docs/google/cloud/securitycenter/v2/source.rb +65 -0
  101. data/proto_docs/google/cloud/securitycenter/v2/valued_resource.rb +86 -0
  102. data/proto_docs/google/cloud/securitycenter/v2/vulnerability.rb +333 -0
  103. data/proto_docs/google/iam/v1/iam_policy.rb +87 -0
  104. data/proto_docs/google/iam/v1/options.rb +50 -0
  105. data/proto_docs/google/iam/v1/policy.rb +426 -0
  106. data/proto_docs/google/longrunning/operations.rb +164 -0
  107. data/proto_docs/google/protobuf/any.rb +145 -0
  108. data/proto_docs/google/protobuf/duration.rb +98 -0
  109. data/proto_docs/google/protobuf/empty.rb +34 -0
  110. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  111. data/proto_docs/google/protobuf/struct.rb +96 -0
  112. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  113. data/proto_docs/google/rpc/status.rb +48 -0
  114. data/proto_docs/google/type/expr.rb +75 -0
  115. metadata +169 -10
@@ -0,0 +1,4347 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+ require "google/cloud/errors"
20
+ require "google/cloud/securitycenter/v2/securitycenter_service_pb"
21
+ require "google/cloud/security_center/v2/security_center/rest/service_stub"
22
+
23
+ module Google
24
+ module Cloud
25
+ module SecurityCenter
26
+ module V2
27
+ module SecurityCenter
28
+ module Rest
29
+ ##
30
+ # REST client for the SecurityCenter service.
31
+ #
32
+ # V2 APIs for Security Center service.
33
+ #
34
+ class Client
35
+ # @private
36
+ DEFAULT_ENDPOINT_TEMPLATE = "securitycenter.$UNIVERSE_DOMAIN$"
37
+
38
+ include Paths
39
+
40
+ # @private
41
+ attr_reader :security_center_stub
42
+
43
+ ##
44
+ # Configure the SecurityCenter Client class.
45
+ #
46
+ # See {::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client::Configuration}
47
+ # for a description of the configuration fields.
48
+ #
49
+ # @example
50
+ #
51
+ # # Modify the configuration for all SecurityCenter clients
52
+ # ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.configure do |config|
53
+ # config.timeout = 10.0
54
+ # end
55
+ #
56
+ # @yield [config] Configure the Client client.
57
+ # @yieldparam config [Client::Configuration]
58
+ #
59
+ # @return [Client::Configuration]
60
+ #
61
+ def self.configure
62
+ @configure ||= begin
63
+ namespace = ["Google", "Cloud", "SecurityCenter", "V2"]
64
+ parent_config = while namespace.any?
65
+ parent_name = namespace.join "::"
66
+ parent_const = const_get parent_name
67
+ break parent_const.configure if parent_const.respond_to? :configure
68
+ namespace.pop
69
+ end
70
+ default_config = Client::Configuration.new parent_config
71
+
72
+ default_config
73
+ end
74
+ yield @configure if block_given?
75
+ @configure
76
+ end
77
+
78
+ ##
79
+ # Configure the SecurityCenter Client instance.
80
+ #
81
+ # The configuration is set to the derived mode, meaning that values can be changed,
82
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
83
+ # should be made on {Client.configure}.
84
+ #
85
+ # See {::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client::Configuration}
86
+ # for a description of the configuration fields.
87
+ #
88
+ # @yield [config] Configure the Client client.
89
+ # @yieldparam config [Client::Configuration]
90
+ #
91
+ # @return [Client::Configuration]
92
+ #
93
+ def configure
94
+ yield @config if block_given?
95
+ @config
96
+ end
97
+
98
+ ##
99
+ # The effective universe domain
100
+ #
101
+ # @return [String]
102
+ #
103
+ def universe_domain
104
+ @security_center_stub.universe_domain
105
+ end
106
+
107
+ ##
108
+ # Create a new SecurityCenter REST client object.
109
+ #
110
+ # @example
111
+ #
112
+ # # Create a client using the default configuration
113
+ # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
114
+ #
115
+ # # Create a client using a custom configuration
116
+ # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config|
117
+ # config.timeout = 10.0
118
+ # end
119
+ #
120
+ # @yield [config] Configure the SecurityCenter client.
121
+ # @yieldparam config [Client::Configuration]
122
+ #
123
+ def initialize
124
+ # Create the configuration object
125
+ @config = Configuration.new Client.configure
126
+
127
+ # Yield the configuration if needed
128
+ yield @config if block_given?
129
+
130
+ # Create credentials
131
+ credentials = @config.credentials
132
+ # Use self-signed JWT if the endpoint is unchanged from default,
133
+ # but only if the default endpoint does not have a region prefix.
134
+ enable_self_signed_jwt = @config.endpoint.nil? ||
135
+ (@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
136
+ !@config.endpoint.split(".").first.include?("-"))
137
+ credentials ||= Credentials.default scope: @config.scope,
138
+ enable_self_signed_jwt: enable_self_signed_jwt
139
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
140
+ credentials = Credentials.new credentials, scope: @config.scope
141
+ end
142
+
143
+ @quota_project_id = @config.quota_project
144
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
145
+
146
+ @operations_client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Operations.new do |config|
147
+ config.credentials = credentials
148
+ config.quota_project = @quota_project_id
149
+ config.endpoint = @config.endpoint
150
+ config.universe_domain = @config.universe_domain
151
+ end
152
+
153
+ @security_center_stub = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::ServiceStub.new(
154
+ endpoint: @config.endpoint,
155
+ endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
156
+ universe_domain: @config.universe_domain,
157
+ credentials: credentials
158
+ )
159
+ end
160
+
161
+ ##
162
+ # Get the associated client for long-running operations.
163
+ #
164
+ # @return [::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Operations]
165
+ #
166
+ attr_reader :operations_client
167
+
168
+ # Service calls
169
+
170
+ ##
171
+ # Creates a ResourceValueConfig for an organization. Maps user's tags to
172
+ # difference resource values for use by the attack path simulation.
173
+ #
174
+ # @overload batch_create_resource_value_configs(request, options = nil)
175
+ # Pass arguments to `batch_create_resource_value_configs` via a request object, either of type
176
+ # {::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest} or an equivalent Hash.
177
+ #
178
+ # @param request [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest, ::Hash]
179
+ # A request object representing the call parameters. Required. To specify no
180
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
181
+ # @param options [::Gapic::CallOptions, ::Hash]
182
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
183
+ #
184
+ # @overload batch_create_resource_value_configs(parent: nil, requests: nil)
185
+ # Pass arguments to `batch_create_resource_value_configs` via keyword arguments. Note that at
186
+ # least one keyword argument is required. To specify no parameters, or to keep all
187
+ # the default parameter values, pass an empty Hash as a request object (see above).
188
+ #
189
+ # @param parent [::String]
190
+ # Required. Resource name of the new ResourceValueConfig's parent.
191
+ # The parent field in the CreateResourceValueConfigRequest
192
+ # messages must either be empty or match this field.
193
+ # @param requests [::Array<::Google::Cloud::SecurityCenter::V2::CreateResourceValueConfigRequest, ::Hash>]
194
+ # Required. The resource value configs to be created.
195
+ # @yield [result, operation] Access the result along with the TransportOperation object
196
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse]
197
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
198
+ #
199
+ # @return [::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse]
200
+ #
201
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
202
+ #
203
+ # @example Basic example
204
+ # require "google/cloud/security_center/v2"
205
+ #
206
+ # # Create a client object. The client can be reused for multiple calls.
207
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
208
+ #
209
+ # # Create a request. To set request fields, pass in keyword arguments.
210
+ # request = Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest.new
211
+ #
212
+ # # Call the batch_create_resource_value_configs method.
213
+ # result = client.batch_create_resource_value_configs request
214
+ #
215
+ # # The returned object is of type Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsResponse.
216
+ # p result
217
+ #
218
+ def batch_create_resource_value_configs request, options = nil
219
+ raise ::ArgumentError, "request must be provided" if request.nil?
220
+
221
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::BatchCreateResourceValueConfigsRequest
222
+
223
+ # Converts hash and nil to an options object
224
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
225
+
226
+ # Customize the options with defaults
227
+ call_metadata = @config.rpcs.batch_create_resource_value_configs.metadata.to_h
228
+
229
+ # Set x-goog-api-client and x-goog-user-project headers
230
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
231
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
232
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
233
+ transports_version_send: [:rest]
234
+
235
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
236
+
237
+ options.apply_defaults timeout: @config.rpcs.batch_create_resource_value_configs.timeout,
238
+ metadata: call_metadata,
239
+ retry_policy: @config.rpcs.batch_create_resource_value_configs.retry_policy
240
+
241
+ options.apply_defaults timeout: @config.timeout,
242
+ metadata: @config.metadata,
243
+ retry_policy: @config.retry_policy
244
+
245
+ @security_center_stub.batch_create_resource_value_configs request, options do |result, operation|
246
+ yield result, operation if block_given?
247
+ return result
248
+ end
249
+ rescue ::Gapic::Rest::Error => e
250
+ raise ::Google::Cloud::Error.from_error(e)
251
+ end
252
+
253
+ ##
254
+ # Kicks off an LRO to bulk mute findings for a parent based on a filter. If
255
+ # no location is specified, findings are muted in global. The parent
256
+ # can be either an organization, folder, or project. The findings matched by
257
+ # the filter will be muted after the LRO is done.
258
+ #
259
+ # @overload bulk_mute_findings(request, options = nil)
260
+ # Pass arguments to `bulk_mute_findings` via a request object, either of type
261
+ # {::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest} or an equivalent Hash.
262
+ #
263
+ # @param request [::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest, ::Hash]
264
+ # A request object representing the call parameters. Required. To specify no
265
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
266
+ # @param options [::Gapic::CallOptions, ::Hash]
267
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
268
+ #
269
+ # @overload bulk_mute_findings(parent: nil, filter: nil)
270
+ # Pass arguments to `bulk_mute_findings` via keyword arguments. Note that at
271
+ # least one keyword argument is required. To specify no parameters, or to keep all
272
+ # the default parameter values, pass an empty Hash as a request object (see above).
273
+ #
274
+ # @param parent [::String]
275
+ # Required. The parent, at which bulk action needs to be applied. If no
276
+ # location is specified, findings are updated in global. The following list
277
+ # shows some examples:
278
+ #
279
+ # + `organizations/[organization_id]`
280
+ # + `organizations/[organization_id]/locations/[location_id]`
281
+ # + `folders/[folder_id]`
282
+ # + `folders/[folder_id]/locations/[location_id]`
283
+ # + `projects/[project_id]`
284
+ # + `projects/[project_id]/locations/[location_id]`
285
+ # @param filter [::String]
286
+ # Expression that identifies findings that should be updated.
287
+ # The expression is a list of zero or more restrictions combined
288
+ # via logical operators `AND` and `OR`. Parentheses are supported, and `OR`
289
+ # has higher precedence than `AND`.
290
+ #
291
+ # Restrictions have the form `<field> <operator> <value>` and may have a
292
+ # `-` character in front of them to indicate negation. The fields map to
293
+ # those defined in the corresponding resource.
294
+ #
295
+ # The supported operators are:
296
+ #
297
+ # * `=` for all value types.
298
+ # * `>`, `<`, `>=`, `<=` for integer values.
299
+ # * `:`, meaning substring matching, for strings.
300
+ #
301
+ # The supported value types are:
302
+ #
303
+ # * string literals in quotes.
304
+ # * integer literals without quotes.
305
+ # * boolean literals `true` and `false` without quotes.
306
+ # @yield [result, operation] Access the result along with the TransportOperation object
307
+ # @yieldparam result [::Gapic::Operation]
308
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
309
+ #
310
+ # @return [::Gapic::Operation]
311
+ #
312
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
313
+ #
314
+ # @example Basic example
315
+ # require "google/cloud/security_center/v2"
316
+ #
317
+ # # Create a client object. The client can be reused for multiple calls.
318
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
319
+ #
320
+ # # Create a request. To set request fields, pass in keyword arguments.
321
+ # request = Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest.new
322
+ #
323
+ # # Call the bulk_mute_findings method.
324
+ # result = client.bulk_mute_findings request
325
+ #
326
+ # # The returned object is of type Gapic::Operation. You can use it to
327
+ # # check the status of an operation, cancel it, or wait for results.
328
+ # # Here is how to wait for a response.
329
+ # result.wait_until_done! timeout: 60
330
+ # if result.response?
331
+ # p result.response
332
+ # else
333
+ # puts "No response received."
334
+ # end
335
+ #
336
+ def bulk_mute_findings request, options = nil
337
+ raise ::ArgumentError, "request must be provided" if request.nil?
338
+
339
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::BulkMuteFindingsRequest
340
+
341
+ # Converts hash and nil to an options object
342
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
343
+
344
+ # Customize the options with defaults
345
+ call_metadata = @config.rpcs.bulk_mute_findings.metadata.to_h
346
+
347
+ # Set x-goog-api-client and x-goog-user-project headers
348
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
349
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
350
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
351
+ transports_version_send: [:rest]
352
+
353
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
354
+
355
+ options.apply_defaults timeout: @config.rpcs.bulk_mute_findings.timeout,
356
+ metadata: call_metadata,
357
+ retry_policy: @config.rpcs.bulk_mute_findings.retry_policy
358
+
359
+ options.apply_defaults timeout: @config.timeout,
360
+ metadata: @config.metadata,
361
+ retry_policy: @config.retry_policy
362
+
363
+ @security_center_stub.bulk_mute_findings request, options do |result, operation|
364
+ result = ::Gapic::Operation.new result, @operations_client, options: options
365
+ yield result, operation if block_given?
366
+ return result
367
+ end
368
+ rescue ::Gapic::Rest::Error => e
369
+ raise ::Google::Cloud::Error.from_error(e)
370
+ end
371
+
372
+ ##
373
+ # Creates a BigQuery export.
374
+ #
375
+ # @overload create_big_query_export(request, options = nil)
376
+ # Pass arguments to `create_big_query_export` via a request object, either of type
377
+ # {::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest} or an equivalent Hash.
378
+ #
379
+ # @param request [::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest, ::Hash]
380
+ # A request object representing the call parameters. Required. To specify no
381
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
382
+ # @param options [::Gapic::CallOptions, ::Hash]
383
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
384
+ #
385
+ # @overload create_big_query_export(parent: nil, big_query_export: nil, big_query_export_id: nil)
386
+ # Pass arguments to `create_big_query_export` via keyword arguments. Note that at
387
+ # least one keyword argument is required. To specify no parameters, or to keep all
388
+ # the default parameter values, pass an empty Hash as a request object (see above).
389
+ #
390
+ # @param parent [::String]
391
+ # Required. The name of the parent resource of the new BigQuery export. Its
392
+ # format is "organizations/[organization_id]/locations/[location_id]",
393
+ # "folders/[folder_id]/locations/[location_id]", or
394
+ # "projects/[project_id]/locations/[location_id]".
395
+ # @param big_query_export [::Google::Cloud::SecurityCenter::V2::BigQueryExport, ::Hash]
396
+ # Required. The BigQuery export being created.
397
+ # @param big_query_export_id [::String]
398
+ # Required. Unique identifier provided by the client within the parent scope.
399
+ # It must consist of only lowercase letters, numbers, and hyphens, must start
400
+ # with a letter, must end with either a letter or a number, and must be 63
401
+ # characters or less.
402
+ # @yield [result, operation] Access the result along with the TransportOperation object
403
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BigQueryExport]
404
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
405
+ #
406
+ # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport]
407
+ #
408
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
409
+ #
410
+ # @example Basic example
411
+ # require "google/cloud/security_center/v2"
412
+ #
413
+ # # Create a client object. The client can be reused for multiple calls.
414
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
415
+ #
416
+ # # Create a request. To set request fields, pass in keyword arguments.
417
+ # request = Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest.new
418
+ #
419
+ # # Call the create_big_query_export method.
420
+ # result = client.create_big_query_export request
421
+ #
422
+ # # The returned object is of type Google::Cloud::SecurityCenter::V2::BigQueryExport.
423
+ # p result
424
+ #
425
+ def create_big_query_export request, options = nil
426
+ raise ::ArgumentError, "request must be provided" if request.nil?
427
+
428
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::CreateBigQueryExportRequest
429
+
430
+ # Converts hash and nil to an options object
431
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
432
+
433
+ # Customize the options with defaults
434
+ call_metadata = @config.rpcs.create_big_query_export.metadata.to_h
435
+
436
+ # Set x-goog-api-client and x-goog-user-project headers
437
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
438
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
439
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
440
+ transports_version_send: [:rest]
441
+
442
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
443
+
444
+ options.apply_defaults timeout: @config.rpcs.create_big_query_export.timeout,
445
+ metadata: call_metadata,
446
+ retry_policy: @config.rpcs.create_big_query_export.retry_policy
447
+
448
+ options.apply_defaults timeout: @config.timeout,
449
+ metadata: @config.metadata,
450
+ retry_policy: @config.retry_policy
451
+
452
+ @security_center_stub.create_big_query_export request, options do |result, operation|
453
+ yield result, operation if block_given?
454
+ return result
455
+ end
456
+ rescue ::Gapic::Rest::Error => e
457
+ raise ::Google::Cloud::Error.from_error(e)
458
+ end
459
+
460
+ ##
461
+ # Creates a finding in a location. The corresponding source must exist for
462
+ # finding creation to succeed.
463
+ #
464
+ # @overload create_finding(request, options = nil)
465
+ # Pass arguments to `create_finding` via a request object, either of type
466
+ # {::Google::Cloud::SecurityCenter::V2::CreateFindingRequest} or an equivalent Hash.
467
+ #
468
+ # @param request [::Google::Cloud::SecurityCenter::V2::CreateFindingRequest, ::Hash]
469
+ # A request object representing the call parameters. Required. To specify no
470
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
471
+ # @param options [::Gapic::CallOptions, ::Hash]
472
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
473
+ #
474
+ # @overload create_finding(parent: nil, finding_id: nil, finding: nil)
475
+ # Pass arguments to `create_finding` via keyword arguments. Note that at
476
+ # least one keyword argument is required. To specify no parameters, or to keep all
477
+ # the default parameter values, pass an empty Hash as a request object (see above).
478
+ #
479
+ # @param parent [::String]
480
+ # Required. Resource name of the new finding's parent. The following list
481
+ # shows some examples of the format:
482
+ # +
483
+ # `organizations/[organization_id]/sources/[source_id]`
484
+ # +
485
+ # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]`
486
+ # @param finding_id [::String]
487
+ # Required. Unique identifier provided by the client within the parent scope.
488
+ # It must be alphanumeric and less than or equal to 32 characters and
489
+ # greater than 0 characters in length.
490
+ # @param finding [::Google::Cloud::SecurityCenter::V2::Finding, ::Hash]
491
+ # Required. The Finding being created. The name and security_marks will be
492
+ # ignored as they are both output only fields on this resource.
493
+ # @yield [result, operation] Access the result along with the TransportOperation object
494
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding]
495
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
496
+ #
497
+ # @return [::Google::Cloud::SecurityCenter::V2::Finding]
498
+ #
499
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
500
+ #
501
+ # @example Basic example
502
+ # require "google/cloud/security_center/v2"
503
+ #
504
+ # # Create a client object. The client can be reused for multiple calls.
505
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
506
+ #
507
+ # # Create a request. To set request fields, pass in keyword arguments.
508
+ # request = Google::Cloud::SecurityCenter::V2::CreateFindingRequest.new
509
+ #
510
+ # # Call the create_finding method.
511
+ # result = client.create_finding request
512
+ #
513
+ # # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding.
514
+ # p result
515
+ #
516
+ def create_finding request, options = nil
517
+ raise ::ArgumentError, "request must be provided" if request.nil?
518
+
519
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::CreateFindingRequest
520
+
521
+ # Converts hash and nil to an options object
522
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
523
+
524
+ # Customize the options with defaults
525
+ call_metadata = @config.rpcs.create_finding.metadata.to_h
526
+
527
+ # Set x-goog-api-client and x-goog-user-project headers
528
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
529
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
530
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
531
+ transports_version_send: [:rest]
532
+
533
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
534
+
535
+ options.apply_defaults timeout: @config.rpcs.create_finding.timeout,
536
+ metadata: call_metadata,
537
+ retry_policy: @config.rpcs.create_finding.retry_policy
538
+
539
+ options.apply_defaults timeout: @config.timeout,
540
+ metadata: @config.metadata,
541
+ retry_policy: @config.retry_policy
542
+
543
+ @security_center_stub.create_finding request, options do |result, operation|
544
+ yield result, operation if block_given?
545
+ return result
546
+ end
547
+ rescue ::Gapic::Rest::Error => e
548
+ raise ::Google::Cloud::Error.from_error(e)
549
+ end
550
+
551
+ ##
552
+ # Creates a mute config.
553
+ #
554
+ # @overload create_mute_config(request, options = nil)
555
+ # Pass arguments to `create_mute_config` via a request object, either of type
556
+ # {::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest} or an equivalent Hash.
557
+ #
558
+ # @param request [::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest, ::Hash]
559
+ # A request object representing the call parameters. Required. To specify no
560
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
561
+ # @param options [::Gapic::CallOptions, ::Hash]
562
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
563
+ #
564
+ # @overload create_mute_config(parent: nil, mute_config: nil, mute_config_id: nil)
565
+ # Pass arguments to `create_mute_config` via keyword arguments. Note that at
566
+ # least one keyword argument is required. To specify no parameters, or to keep all
567
+ # the default parameter values, pass an empty Hash as a request object (see above).
568
+ #
569
+ # @param parent [::String]
570
+ # Required. Resource name of the new mute configs's parent. Its format is
571
+ # "organizations/[organization_id]/locations/[location_id]",
572
+ # "folders/[folder_id]/locations/[location_id]", or
573
+ # "projects/[project_id]/locations/[location_id]".
574
+ # @param mute_config [::Google::Cloud::SecurityCenter::V2::MuteConfig, ::Hash]
575
+ # Required. The mute config being created.
576
+ # @param mute_config_id [::String]
577
+ # Required. Unique identifier provided by the client within the parent scope.
578
+ # It must consist of only lowercase letters, numbers, and hyphens, must start
579
+ # with a letter, must end with either a letter or a number, and must be 63
580
+ # characters or less.
581
+ # @yield [result, operation] Access the result along with the TransportOperation object
582
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V2::MuteConfig]
583
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
584
+ #
585
+ # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig]
586
+ #
587
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
588
+ #
589
+ # @example Basic example
590
+ # require "google/cloud/security_center/v2"
591
+ #
592
+ # # Create a client object. The client can be reused for multiple calls.
593
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
594
+ #
595
+ # # Create a request. To set request fields, pass in keyword arguments.
596
+ # request = Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest.new
597
+ #
598
+ # # Call the create_mute_config method.
599
+ # result = client.create_mute_config request
600
+ #
601
+ # # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig.
602
+ # p result
603
+ #
604
+ def create_mute_config request, options = nil
605
+ raise ::ArgumentError, "request must be provided" if request.nil?
606
+
607
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::CreateMuteConfigRequest
608
+
609
+ # Converts hash and nil to an options object
610
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
611
+
612
+ # Customize the options with defaults
613
+ call_metadata = @config.rpcs.create_mute_config.metadata.to_h
614
+
615
+ # Set x-goog-api-client and x-goog-user-project headers
616
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
617
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
618
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
619
+ transports_version_send: [:rest]
620
+
621
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
622
+
623
+ options.apply_defaults timeout: @config.rpcs.create_mute_config.timeout,
624
+ metadata: call_metadata,
625
+ retry_policy: @config.rpcs.create_mute_config.retry_policy
626
+
627
+ options.apply_defaults timeout: @config.timeout,
628
+ metadata: @config.metadata,
629
+ retry_policy: @config.retry_policy
630
+
631
+ @security_center_stub.create_mute_config request, options do |result, operation|
632
+ yield result, operation if block_given?
633
+ return result
634
+ end
635
+ rescue ::Gapic::Rest::Error => e
636
+ raise ::Google::Cloud::Error.from_error(e)
637
+ end
638
+
639
+ ##
640
+ # Creates a notification config.
641
+ #
642
+ # @overload create_notification_config(request, options = nil)
643
+ # Pass arguments to `create_notification_config` via a request object, either of type
644
+ # {::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest} or an equivalent Hash.
645
+ #
646
+ # @param request [::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest, ::Hash]
647
+ # A request object representing the call parameters. Required. To specify no
648
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
649
+ # @param options [::Gapic::CallOptions, ::Hash]
650
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
651
+ #
652
+ # @overload create_notification_config(parent: nil, config_id: nil, notification_config: nil)
653
+ # Pass arguments to `create_notification_config` via keyword arguments. Note that at
654
+ # least one keyword argument is required. To specify no parameters, or to keep all
655
+ # the default parameter values, pass an empty Hash as a request object (see above).
656
+ #
657
+ # @param parent [::String]
658
+ # Required. Resource name of the new notification config's parent. Its format
659
+ # is "organizations/[organization_id]/locations/[location_id]",
660
+ # "folders/[folder_id]/locations/[location_id]", or
661
+ # "projects/[project_id]/locations/[location_id]".
662
+ # @param config_id [::String]
663
+ # Required.
664
+ # Unique identifier provided by the client within the parent scope.
665
+ # It must be between 1 and 128 characters and contain alphanumeric
666
+ # characters, underscores, or hyphens only.
667
+ # @param notification_config [::Google::Cloud::SecurityCenter::V2::NotificationConfig, ::Hash]
668
+ # Required. The notification config being created. The name and the service
669
+ # account will be ignored as they are both output only fields on this
670
+ # resource.
671
+ # @yield [result, operation] Access the result along with the TransportOperation object
672
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V2::NotificationConfig]
673
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
674
+ #
675
+ # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig]
676
+ #
677
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
678
+ #
679
+ # @example Basic example
680
+ # require "google/cloud/security_center/v2"
681
+ #
682
+ # # Create a client object. The client can be reused for multiple calls.
683
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
684
+ #
685
+ # # Create a request. To set request fields, pass in keyword arguments.
686
+ # request = Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest.new
687
+ #
688
+ # # Call the create_notification_config method.
689
+ # result = client.create_notification_config request
690
+ #
691
+ # # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig.
692
+ # p result
693
+ #
694
+ def create_notification_config request, options = nil
695
+ raise ::ArgumentError, "request must be provided" if request.nil?
696
+
697
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::CreateNotificationConfigRequest
698
+
699
+ # Converts hash and nil to an options object
700
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
701
+
702
+ # Customize the options with defaults
703
+ call_metadata = @config.rpcs.create_notification_config.metadata.to_h
704
+
705
+ # Set x-goog-api-client and x-goog-user-project headers
706
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
707
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
708
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
709
+ transports_version_send: [:rest]
710
+
711
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
712
+
713
+ options.apply_defaults timeout: @config.rpcs.create_notification_config.timeout,
714
+ metadata: call_metadata,
715
+ retry_policy: @config.rpcs.create_notification_config.retry_policy
716
+
717
+ options.apply_defaults timeout: @config.timeout,
718
+ metadata: @config.metadata,
719
+ retry_policy: @config.retry_policy
720
+
721
+ @security_center_stub.create_notification_config request, options do |result, operation|
722
+ yield result, operation if block_given?
723
+ return result
724
+ end
725
+ rescue ::Gapic::Rest::Error => e
726
+ raise ::Google::Cloud::Error.from_error(e)
727
+ end
728
+
729
+ ##
730
+ # Creates a source.
731
+ #
732
+ # @overload create_source(request, options = nil)
733
+ # Pass arguments to `create_source` via a request object, either of type
734
+ # {::Google::Cloud::SecurityCenter::V2::CreateSourceRequest} or an equivalent Hash.
735
+ #
736
+ # @param request [::Google::Cloud::SecurityCenter::V2::CreateSourceRequest, ::Hash]
737
+ # A request object representing the call parameters. Required. To specify no
738
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
739
+ # @param options [::Gapic::CallOptions, ::Hash]
740
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
741
+ #
742
+ # @overload create_source(parent: nil, source: nil)
743
+ # Pass arguments to `create_source` via keyword arguments. Note that at
744
+ # least one keyword argument is required. To specify no parameters, or to keep all
745
+ # the default parameter values, pass an empty Hash as a request object (see above).
746
+ #
747
+ # @param parent [::String]
748
+ # Required. Resource name of the new source's parent. Its format should be
749
+ # "organizations/[organization_id]".
750
+ # @param source [::Google::Cloud::SecurityCenter::V2::Source, ::Hash]
751
+ # Required. The Source being created, only the display_name and description
752
+ # will be used. All other fields will be ignored.
753
+ # @yield [result, operation] Access the result along with the TransportOperation object
754
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Source]
755
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
756
+ #
757
+ # @return [::Google::Cloud::SecurityCenter::V2::Source]
758
+ #
759
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
760
+ #
761
+ # @example Basic example
762
+ # require "google/cloud/security_center/v2"
763
+ #
764
+ # # Create a client object. The client can be reused for multiple calls.
765
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
766
+ #
767
+ # # Create a request. To set request fields, pass in keyword arguments.
768
+ # request = Google::Cloud::SecurityCenter::V2::CreateSourceRequest.new
769
+ #
770
+ # # Call the create_source method.
771
+ # result = client.create_source request
772
+ #
773
+ # # The returned object is of type Google::Cloud::SecurityCenter::V2::Source.
774
+ # p result
775
+ #
776
+ def create_source request, options = nil
777
+ raise ::ArgumentError, "request must be provided" if request.nil?
778
+
779
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::CreateSourceRequest
780
+
781
+ # Converts hash and nil to an options object
782
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
783
+
784
+ # Customize the options with defaults
785
+ call_metadata = @config.rpcs.create_source.metadata.to_h
786
+
787
+ # Set x-goog-api-client and x-goog-user-project headers
788
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
789
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
790
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
791
+ transports_version_send: [:rest]
792
+
793
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
794
+
795
+ options.apply_defaults timeout: @config.rpcs.create_source.timeout,
796
+ metadata: call_metadata,
797
+ retry_policy: @config.rpcs.create_source.retry_policy
798
+
799
+ options.apply_defaults timeout: @config.timeout,
800
+ metadata: @config.metadata,
801
+ retry_policy: @config.retry_policy
802
+
803
+ @security_center_stub.create_source request, options do |result, operation|
804
+ yield result, operation if block_given?
805
+ return result
806
+ end
807
+ rescue ::Gapic::Rest::Error => e
808
+ raise ::Google::Cloud::Error.from_error(e)
809
+ end
810
+
811
+ ##
812
+ # Deletes an existing BigQuery export.
813
+ #
814
+ # @overload delete_big_query_export(request, options = nil)
815
+ # Pass arguments to `delete_big_query_export` via a request object, either of type
816
+ # {::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest} or an equivalent Hash.
817
+ #
818
+ # @param request [::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest, ::Hash]
819
+ # A request object representing the call parameters. Required. To specify no
820
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
821
+ # @param options [::Gapic::CallOptions, ::Hash]
822
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
823
+ #
824
+ # @overload delete_big_query_export(name: nil)
825
+ # Pass arguments to `delete_big_query_export` via keyword arguments. Note that at
826
+ # least one keyword argument is required. To specify no parameters, or to keep all
827
+ # the default parameter values, pass an empty Hash as a request object (see above).
828
+ #
829
+ # @param name [::String]
830
+ # Required. The name of the BigQuery export to delete. The following list
831
+ # shows some examples of the format:
832
+ #
833
+ # +
834
+ # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
835
+ # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
836
+ # + `projects/{project}/locations/{location}/bigQueryExports/{export_id}`
837
+ # @yield [result, operation] Access the result along with the TransportOperation object
838
+ # @yieldparam result [::Google::Protobuf::Empty]
839
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
840
+ #
841
+ # @return [::Google::Protobuf::Empty]
842
+ #
843
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
844
+ #
845
+ # @example Basic example
846
+ # require "google/cloud/security_center/v2"
847
+ #
848
+ # # Create a client object. The client can be reused for multiple calls.
849
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
850
+ #
851
+ # # Create a request. To set request fields, pass in keyword arguments.
852
+ # request = Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest.new
853
+ #
854
+ # # Call the delete_big_query_export method.
855
+ # result = client.delete_big_query_export request
856
+ #
857
+ # # The returned object is of type Google::Protobuf::Empty.
858
+ # p result
859
+ #
860
+ def delete_big_query_export request, options = nil
861
+ raise ::ArgumentError, "request must be provided" if request.nil?
862
+
863
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::DeleteBigQueryExportRequest
864
+
865
+ # Converts hash and nil to an options object
866
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
867
+
868
+ # Customize the options with defaults
869
+ call_metadata = @config.rpcs.delete_big_query_export.metadata.to_h
870
+
871
+ # Set x-goog-api-client and x-goog-user-project headers
872
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
873
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
874
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
875
+ transports_version_send: [:rest]
876
+
877
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
878
+
879
+ options.apply_defaults timeout: @config.rpcs.delete_big_query_export.timeout,
880
+ metadata: call_metadata,
881
+ retry_policy: @config.rpcs.delete_big_query_export.retry_policy
882
+
883
+ options.apply_defaults timeout: @config.timeout,
884
+ metadata: @config.metadata,
885
+ retry_policy: @config.retry_policy
886
+
887
+ @security_center_stub.delete_big_query_export request, options do |result, operation|
888
+ yield result, operation if block_given?
889
+ return result
890
+ end
891
+ rescue ::Gapic::Rest::Error => e
892
+ raise ::Google::Cloud::Error.from_error(e)
893
+ end
894
+
895
+ ##
896
+ # Deletes an existing mute config. If no location is specified, default is
897
+ # global.
898
+ #
899
+ # @overload delete_mute_config(request, options = nil)
900
+ # Pass arguments to `delete_mute_config` via a request object, either of type
901
+ # {::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest} or an equivalent Hash.
902
+ #
903
+ # @param request [::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest, ::Hash]
904
+ # A request object representing the call parameters. Required. To specify no
905
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
906
+ # @param options [::Gapic::CallOptions, ::Hash]
907
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
908
+ #
909
+ # @overload delete_mute_config(name: nil)
910
+ # Pass arguments to `delete_mute_config` via keyword arguments. Note that at
911
+ # least one keyword argument is required. To specify no parameters, or to keep all
912
+ # the default parameter values, pass an empty Hash as a request object (see above).
913
+ #
914
+ # @param name [::String]
915
+ # Required. Name of the mute config to delete. The following list shows some
916
+ # examples of the format:
917
+ #
918
+ # + `organizations/{organization}/muteConfigs/{config_id}`
919
+ # +
920
+ # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
921
+ # + `folders/{folder}/muteConfigs/{config_id}`
922
+ # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
923
+ # + `projects/{project}/muteConfigs/{config_id}`
924
+ # + `projects/{project}/locations/{location}/muteConfigs/{config_id}`
925
+ # @yield [result, operation] Access the result along with the TransportOperation object
926
+ # @yieldparam result [::Google::Protobuf::Empty]
927
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
928
+ #
929
+ # @return [::Google::Protobuf::Empty]
930
+ #
931
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
932
+ #
933
+ # @example Basic example
934
+ # require "google/cloud/security_center/v2"
935
+ #
936
+ # # Create a client object. The client can be reused for multiple calls.
937
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
938
+ #
939
+ # # Create a request. To set request fields, pass in keyword arguments.
940
+ # request = Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest.new
941
+ #
942
+ # # Call the delete_mute_config method.
943
+ # result = client.delete_mute_config request
944
+ #
945
+ # # The returned object is of type Google::Protobuf::Empty.
946
+ # p result
947
+ #
948
+ def delete_mute_config request, options = nil
949
+ raise ::ArgumentError, "request must be provided" if request.nil?
950
+
951
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::DeleteMuteConfigRequest
952
+
953
+ # Converts hash and nil to an options object
954
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
955
+
956
+ # Customize the options with defaults
957
+ call_metadata = @config.rpcs.delete_mute_config.metadata.to_h
958
+
959
+ # Set x-goog-api-client and x-goog-user-project headers
960
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
961
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
962
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
963
+ transports_version_send: [:rest]
964
+
965
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
966
+
967
+ options.apply_defaults timeout: @config.rpcs.delete_mute_config.timeout,
968
+ metadata: call_metadata,
969
+ retry_policy: @config.rpcs.delete_mute_config.retry_policy
970
+
971
+ options.apply_defaults timeout: @config.timeout,
972
+ metadata: @config.metadata,
973
+ retry_policy: @config.retry_policy
974
+
975
+ @security_center_stub.delete_mute_config request, options do |result, operation|
976
+ yield result, operation if block_given?
977
+ return result
978
+ end
979
+ rescue ::Gapic::Rest::Error => e
980
+ raise ::Google::Cloud::Error.from_error(e)
981
+ end
982
+
983
+ ##
984
+ # Deletes a notification config.
985
+ #
986
+ # @overload delete_notification_config(request, options = nil)
987
+ # Pass arguments to `delete_notification_config` via a request object, either of type
988
+ # {::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest} or an equivalent Hash.
989
+ #
990
+ # @param request [::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest, ::Hash]
991
+ # A request object representing the call parameters. Required. To specify no
992
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
993
+ # @param options [::Gapic::CallOptions, ::Hash]
994
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
995
+ #
996
+ # @overload delete_notification_config(name: nil)
997
+ # Pass arguments to `delete_notification_config` via keyword arguments. Note that at
998
+ # least one keyword argument is required. To specify no parameters, or to keep all
999
+ # the default parameter values, pass an empty Hash as a request object (see above).
1000
+ #
1001
+ # @param name [::String]
1002
+ # Required. Name of the notification config to delete. The following list
1003
+ # shows some examples of the format:
1004
+ #
1005
+ # +
1006
+ # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
1007
+ # +
1008
+ # `folders/[folder_id]/locations/[location_id]notificationConfigs/[config_id]`
1009
+ # +
1010
+ # `projects/[project_id]/locations/[location_id]notificationConfigs/[config_id]`
1011
+ # @yield [result, operation] Access the result along with the TransportOperation object
1012
+ # @yieldparam result [::Google::Protobuf::Empty]
1013
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1014
+ #
1015
+ # @return [::Google::Protobuf::Empty]
1016
+ #
1017
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1018
+ #
1019
+ # @example Basic example
1020
+ # require "google/cloud/security_center/v2"
1021
+ #
1022
+ # # Create a client object. The client can be reused for multiple calls.
1023
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
1024
+ #
1025
+ # # Create a request. To set request fields, pass in keyword arguments.
1026
+ # request = Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest.new
1027
+ #
1028
+ # # Call the delete_notification_config method.
1029
+ # result = client.delete_notification_config request
1030
+ #
1031
+ # # The returned object is of type Google::Protobuf::Empty.
1032
+ # p result
1033
+ #
1034
+ def delete_notification_config request, options = nil
1035
+ raise ::ArgumentError, "request must be provided" if request.nil?
1036
+
1037
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::DeleteNotificationConfigRequest
1038
+
1039
+ # Converts hash and nil to an options object
1040
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1041
+
1042
+ # Customize the options with defaults
1043
+ call_metadata = @config.rpcs.delete_notification_config.metadata.to_h
1044
+
1045
+ # Set x-goog-api-client and x-goog-user-project headers
1046
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1047
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1048
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
1049
+ transports_version_send: [:rest]
1050
+
1051
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1052
+
1053
+ options.apply_defaults timeout: @config.rpcs.delete_notification_config.timeout,
1054
+ metadata: call_metadata,
1055
+ retry_policy: @config.rpcs.delete_notification_config.retry_policy
1056
+
1057
+ options.apply_defaults timeout: @config.timeout,
1058
+ metadata: @config.metadata,
1059
+ retry_policy: @config.retry_policy
1060
+
1061
+ @security_center_stub.delete_notification_config request, options do |result, operation|
1062
+ yield result, operation if block_given?
1063
+ return result
1064
+ end
1065
+ rescue ::Gapic::Rest::Error => e
1066
+ raise ::Google::Cloud::Error.from_error(e)
1067
+ end
1068
+
1069
+ ##
1070
+ # Deletes a ResourceValueConfig.
1071
+ #
1072
+ # @overload delete_resource_value_config(request, options = nil)
1073
+ # Pass arguments to `delete_resource_value_config` via a request object, either of type
1074
+ # {::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest} or an equivalent Hash.
1075
+ #
1076
+ # @param request [::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest, ::Hash]
1077
+ # A request object representing the call parameters. Required. To specify no
1078
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1079
+ # @param options [::Gapic::CallOptions, ::Hash]
1080
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1081
+ #
1082
+ # @overload delete_resource_value_config(name: nil)
1083
+ # Pass arguments to `delete_resource_value_config` via keyword arguments. Note that at
1084
+ # least one keyword argument is required. To specify no parameters, or to keep all
1085
+ # the default parameter values, pass an empty Hash as a request object (see above).
1086
+ #
1087
+ # @param name [::String]
1088
+ # Required. Name of the ResourceValueConfig to delete
1089
+ # @yield [result, operation] Access the result along with the TransportOperation object
1090
+ # @yieldparam result [::Google::Protobuf::Empty]
1091
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1092
+ #
1093
+ # @return [::Google::Protobuf::Empty]
1094
+ #
1095
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1096
+ #
1097
+ # @example Basic example
1098
+ # require "google/cloud/security_center/v2"
1099
+ #
1100
+ # # Create a client object. The client can be reused for multiple calls.
1101
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
1102
+ #
1103
+ # # Create a request. To set request fields, pass in keyword arguments.
1104
+ # request = Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest.new
1105
+ #
1106
+ # # Call the delete_resource_value_config method.
1107
+ # result = client.delete_resource_value_config request
1108
+ #
1109
+ # # The returned object is of type Google::Protobuf::Empty.
1110
+ # p result
1111
+ #
1112
+ def delete_resource_value_config request, options = nil
1113
+ raise ::ArgumentError, "request must be provided" if request.nil?
1114
+
1115
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::DeleteResourceValueConfigRequest
1116
+
1117
+ # Converts hash and nil to an options object
1118
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1119
+
1120
+ # Customize the options with defaults
1121
+ call_metadata = @config.rpcs.delete_resource_value_config.metadata.to_h
1122
+
1123
+ # Set x-goog-api-client and x-goog-user-project headers
1124
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1125
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1126
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
1127
+ transports_version_send: [:rest]
1128
+
1129
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1130
+
1131
+ options.apply_defaults timeout: @config.rpcs.delete_resource_value_config.timeout,
1132
+ metadata: call_metadata,
1133
+ retry_policy: @config.rpcs.delete_resource_value_config.retry_policy
1134
+
1135
+ options.apply_defaults timeout: @config.timeout,
1136
+ metadata: @config.metadata,
1137
+ retry_policy: @config.retry_policy
1138
+
1139
+ @security_center_stub.delete_resource_value_config request, options do |result, operation|
1140
+ yield result, operation if block_given?
1141
+ return result
1142
+ end
1143
+ rescue ::Gapic::Rest::Error => e
1144
+ raise ::Google::Cloud::Error.from_error(e)
1145
+ end
1146
+
1147
+ ##
1148
+ # Gets a BigQuery export.
1149
+ #
1150
+ # @overload get_big_query_export(request, options = nil)
1151
+ # Pass arguments to `get_big_query_export` via a request object, either of type
1152
+ # {::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest} or an equivalent Hash.
1153
+ #
1154
+ # @param request [::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest, ::Hash]
1155
+ # A request object representing the call parameters. Required. To specify no
1156
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1157
+ # @param options [::Gapic::CallOptions, ::Hash]
1158
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1159
+ #
1160
+ # @overload get_big_query_export(name: nil)
1161
+ # Pass arguments to `get_big_query_export` via keyword arguments. Note that at
1162
+ # least one keyword argument is required. To specify no parameters, or to keep all
1163
+ # the default parameter values, pass an empty Hash as a request object (see above).
1164
+ #
1165
+ # @param name [::String]
1166
+ # Required. Name of the BigQuery export to retrieve. The following list shows
1167
+ # some examples of the format:
1168
+ #
1169
+ # +
1170
+ # `organizations/{organization}/locations/{location}/bigQueryExports/{export_id}`
1171
+ # + `folders/{folder}/locations/{location}/bigQueryExports/{export_id}`
1172
+ # + `projects/{project}locations/{location}//bigQueryExports/{export_id}`
1173
+ # @yield [result, operation] Access the result along with the TransportOperation object
1174
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BigQueryExport]
1175
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1176
+ #
1177
+ # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport]
1178
+ #
1179
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1180
+ #
1181
+ # @example Basic example
1182
+ # require "google/cloud/security_center/v2"
1183
+ #
1184
+ # # Create a client object. The client can be reused for multiple calls.
1185
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
1186
+ #
1187
+ # # Create a request. To set request fields, pass in keyword arguments.
1188
+ # request = Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest.new
1189
+ #
1190
+ # # Call the get_big_query_export method.
1191
+ # result = client.get_big_query_export request
1192
+ #
1193
+ # # The returned object is of type Google::Cloud::SecurityCenter::V2::BigQueryExport.
1194
+ # p result
1195
+ #
1196
+ def get_big_query_export request, options = nil
1197
+ raise ::ArgumentError, "request must be provided" if request.nil?
1198
+
1199
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetBigQueryExportRequest
1200
+
1201
+ # Converts hash and nil to an options object
1202
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1203
+
1204
+ # Customize the options with defaults
1205
+ call_metadata = @config.rpcs.get_big_query_export.metadata.to_h
1206
+
1207
+ # Set x-goog-api-client and x-goog-user-project headers
1208
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1209
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1210
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
1211
+ transports_version_send: [:rest]
1212
+
1213
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1214
+
1215
+ options.apply_defaults timeout: @config.rpcs.get_big_query_export.timeout,
1216
+ metadata: call_metadata,
1217
+ retry_policy: @config.rpcs.get_big_query_export.retry_policy
1218
+
1219
+ options.apply_defaults timeout: @config.timeout,
1220
+ metadata: @config.metadata,
1221
+ retry_policy: @config.retry_policy
1222
+
1223
+ @security_center_stub.get_big_query_export request, options do |result, operation|
1224
+ yield result, operation if block_given?
1225
+ return result
1226
+ end
1227
+ rescue ::Gapic::Rest::Error => e
1228
+ raise ::Google::Cloud::Error.from_error(e)
1229
+ end
1230
+
1231
+ ##
1232
+ # Get the simulation by name or the latest simulation for the given
1233
+ # organization.
1234
+ #
1235
+ # @overload get_simulation(request, options = nil)
1236
+ # Pass arguments to `get_simulation` via a request object, either of type
1237
+ # {::Google::Cloud::SecurityCenter::V2::GetSimulationRequest} or an equivalent Hash.
1238
+ #
1239
+ # @param request [::Google::Cloud::SecurityCenter::V2::GetSimulationRequest, ::Hash]
1240
+ # A request object representing the call parameters. Required. To specify no
1241
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1242
+ # @param options [::Gapic::CallOptions, ::Hash]
1243
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1244
+ #
1245
+ # @overload get_simulation(name: nil)
1246
+ # Pass arguments to `get_simulation` via keyword arguments. Note that at
1247
+ # least one keyword argument is required. To specify no parameters, or to keep all
1248
+ # the default parameter values, pass an empty Hash as a request object (see above).
1249
+ #
1250
+ # @param name [::String]
1251
+ # Required. The organization name or simulation name of this simulation
1252
+ #
1253
+ # Valid format:
1254
+ # "organizations/\\{organization}/simulations/latest"
1255
+ # "organizations/\\{organization}/simulations/\\{simulation}"
1256
+ # @yield [result, operation] Access the result along with the TransportOperation object
1257
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Simulation]
1258
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1259
+ #
1260
+ # @return [::Google::Cloud::SecurityCenter::V2::Simulation]
1261
+ #
1262
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1263
+ #
1264
+ # @example Basic example
1265
+ # require "google/cloud/security_center/v2"
1266
+ #
1267
+ # # Create a client object. The client can be reused for multiple calls.
1268
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
1269
+ #
1270
+ # # Create a request. To set request fields, pass in keyword arguments.
1271
+ # request = Google::Cloud::SecurityCenter::V2::GetSimulationRequest.new
1272
+ #
1273
+ # # Call the get_simulation method.
1274
+ # result = client.get_simulation request
1275
+ #
1276
+ # # The returned object is of type Google::Cloud::SecurityCenter::V2::Simulation.
1277
+ # p result
1278
+ #
1279
+ def get_simulation request, options = nil
1280
+ raise ::ArgumentError, "request must be provided" if request.nil?
1281
+
1282
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetSimulationRequest
1283
+
1284
+ # Converts hash and nil to an options object
1285
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1286
+
1287
+ # Customize the options with defaults
1288
+ call_metadata = @config.rpcs.get_simulation.metadata.to_h
1289
+
1290
+ # Set x-goog-api-client and x-goog-user-project headers
1291
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1292
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1293
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
1294
+ transports_version_send: [:rest]
1295
+
1296
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1297
+
1298
+ options.apply_defaults timeout: @config.rpcs.get_simulation.timeout,
1299
+ metadata: call_metadata,
1300
+ retry_policy: @config.rpcs.get_simulation.retry_policy
1301
+
1302
+ options.apply_defaults timeout: @config.timeout,
1303
+ metadata: @config.metadata,
1304
+ retry_policy: @config.retry_policy
1305
+
1306
+ @security_center_stub.get_simulation request, options do |result, operation|
1307
+ yield result, operation if block_given?
1308
+ return result
1309
+ end
1310
+ rescue ::Gapic::Rest::Error => e
1311
+ raise ::Google::Cloud::Error.from_error(e)
1312
+ end
1313
+
1314
+ ##
1315
+ # Get the valued resource by name
1316
+ #
1317
+ # @overload get_valued_resource(request, options = nil)
1318
+ # Pass arguments to `get_valued_resource` via a request object, either of type
1319
+ # {::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest} or an equivalent Hash.
1320
+ #
1321
+ # @param request [::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest, ::Hash]
1322
+ # A request object representing the call parameters. Required. To specify no
1323
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1324
+ # @param options [::Gapic::CallOptions, ::Hash]
1325
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1326
+ #
1327
+ # @overload get_valued_resource(name: nil)
1328
+ # Pass arguments to `get_valued_resource` via keyword arguments. Note that at
1329
+ # least one keyword argument is required. To specify no parameters, or to keep all
1330
+ # the default parameter values, pass an empty Hash as a request object (see above).
1331
+ #
1332
+ # @param name [::String]
1333
+ # Required. The name of this valued resource
1334
+ #
1335
+ # Valid format:
1336
+ # "organizations/\\{organization}/simulations/\\{simulation}/valuedResources/\\{valued_resource}"
1337
+ # @yield [result, operation] Access the result along with the TransportOperation object
1338
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ValuedResource]
1339
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1340
+ #
1341
+ # @return [::Google::Cloud::SecurityCenter::V2::ValuedResource]
1342
+ #
1343
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1344
+ #
1345
+ # @example Basic example
1346
+ # require "google/cloud/security_center/v2"
1347
+ #
1348
+ # # Create a client object. The client can be reused for multiple calls.
1349
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
1350
+ #
1351
+ # # Create a request. To set request fields, pass in keyword arguments.
1352
+ # request = Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest.new
1353
+ #
1354
+ # # Call the get_valued_resource method.
1355
+ # result = client.get_valued_resource request
1356
+ #
1357
+ # # The returned object is of type Google::Cloud::SecurityCenter::V2::ValuedResource.
1358
+ # p result
1359
+ #
1360
+ def get_valued_resource request, options = nil
1361
+ raise ::ArgumentError, "request must be provided" if request.nil?
1362
+
1363
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetValuedResourceRequest
1364
+
1365
+ # Converts hash and nil to an options object
1366
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1367
+
1368
+ # Customize the options with defaults
1369
+ call_metadata = @config.rpcs.get_valued_resource.metadata.to_h
1370
+
1371
+ # Set x-goog-api-client and x-goog-user-project headers
1372
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1373
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1374
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
1375
+ transports_version_send: [:rest]
1376
+
1377
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1378
+
1379
+ options.apply_defaults timeout: @config.rpcs.get_valued_resource.timeout,
1380
+ metadata: call_metadata,
1381
+ retry_policy: @config.rpcs.get_valued_resource.retry_policy
1382
+
1383
+ options.apply_defaults timeout: @config.timeout,
1384
+ metadata: @config.metadata,
1385
+ retry_policy: @config.retry_policy
1386
+
1387
+ @security_center_stub.get_valued_resource request, options do |result, operation|
1388
+ yield result, operation if block_given?
1389
+ return result
1390
+ end
1391
+ rescue ::Gapic::Rest::Error => e
1392
+ raise ::Google::Cloud::Error.from_error(e)
1393
+ end
1394
+
1395
+ ##
1396
+ # Gets the access control policy on the specified Source.
1397
+ #
1398
+ # @overload get_iam_policy(request, options = nil)
1399
+ # Pass arguments to `get_iam_policy` via a request object, either of type
1400
+ # {::Google::Iam::V1::GetIamPolicyRequest} or an equivalent Hash.
1401
+ #
1402
+ # @param request [::Google::Iam::V1::GetIamPolicyRequest, ::Hash]
1403
+ # A request object representing the call parameters. Required. To specify no
1404
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1405
+ # @param options [::Gapic::CallOptions, ::Hash]
1406
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1407
+ #
1408
+ # @overload get_iam_policy(resource: nil, options: nil)
1409
+ # Pass arguments to `get_iam_policy` via keyword arguments. Note that at
1410
+ # least one keyword argument is required. To specify no parameters, or to keep all
1411
+ # the default parameter values, pass an empty Hash as a request object (see above).
1412
+ #
1413
+ # @param resource [::String]
1414
+ # REQUIRED: The resource for which the policy is being requested.
1415
+ # See the operation documentation for the appropriate value for this field.
1416
+ # @param options [::Google::Iam::V1::GetPolicyOptions, ::Hash]
1417
+ # OPTIONAL: A `GetPolicyOptions` object for specifying options to
1418
+ # `GetIamPolicy`.
1419
+ # @yield [result, operation] Access the result along with the TransportOperation object
1420
+ # @yieldparam result [::Google::Iam::V1::Policy]
1421
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1422
+ #
1423
+ # @return [::Google::Iam::V1::Policy]
1424
+ #
1425
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1426
+ #
1427
+ # @example Basic example
1428
+ # require "google/cloud/security_center/v2"
1429
+ #
1430
+ # # Create a client object. The client can be reused for multiple calls.
1431
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
1432
+ #
1433
+ # # Create a request. To set request fields, pass in keyword arguments.
1434
+ # request = Google::Iam::V1::GetIamPolicyRequest.new
1435
+ #
1436
+ # # Call the get_iam_policy method.
1437
+ # result = client.get_iam_policy request
1438
+ #
1439
+ # # The returned object is of type Google::Iam::V1::Policy.
1440
+ # p result
1441
+ #
1442
+ def get_iam_policy request, options = nil
1443
+ raise ::ArgumentError, "request must be provided" if request.nil?
1444
+
1445
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::GetIamPolicyRequest
1446
+
1447
+ # Converts hash and nil to an options object
1448
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1449
+
1450
+ # Customize the options with defaults
1451
+ call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
1452
+
1453
+ # Set x-goog-api-client and x-goog-user-project headers
1454
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1455
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1456
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
1457
+ transports_version_send: [:rest]
1458
+
1459
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1460
+
1461
+ options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
1462
+ metadata: call_metadata,
1463
+ retry_policy: @config.rpcs.get_iam_policy.retry_policy
1464
+
1465
+ options.apply_defaults timeout: @config.timeout,
1466
+ metadata: @config.metadata,
1467
+ retry_policy: @config.retry_policy
1468
+
1469
+ @security_center_stub.get_iam_policy request, options do |result, operation|
1470
+ yield result, operation if block_given?
1471
+ return result
1472
+ end
1473
+ rescue ::Gapic::Rest::Error => e
1474
+ raise ::Google::Cloud::Error.from_error(e)
1475
+ end
1476
+
1477
+ ##
1478
+ # Gets a mute config. If no location is specified, default is
1479
+ # global.
1480
+ #
1481
+ # @overload get_mute_config(request, options = nil)
1482
+ # Pass arguments to `get_mute_config` via a request object, either of type
1483
+ # {::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest} or an equivalent Hash.
1484
+ #
1485
+ # @param request [::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest, ::Hash]
1486
+ # A request object representing the call parameters. Required. To specify no
1487
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1488
+ # @param options [::Gapic::CallOptions, ::Hash]
1489
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1490
+ #
1491
+ # @overload get_mute_config(name: nil)
1492
+ # Pass arguments to `get_mute_config` via keyword arguments. Note that at
1493
+ # least one keyword argument is required. To specify no parameters, or to keep all
1494
+ # the default parameter values, pass an empty Hash as a request object (see above).
1495
+ #
1496
+ # @param name [::String]
1497
+ # Required. Name of the mute config to retrieve. The following list shows
1498
+ # some examples of the format:
1499
+ #
1500
+ # + `organizations/{organization}/muteConfigs/{config_id}`
1501
+ # +
1502
+ # `organizations/{organization}/locations/{location}/muteConfigs/{config_id}`
1503
+ # + `folders/{folder}/muteConfigs/{config_id}`
1504
+ # + `folders/{folder}/locations/{location}/muteConfigs/{config_id}`
1505
+ # + `projects/{project}/muteConfigs/{config_id}`
1506
+ # + `projects/{project}/locations/{location}/muteConfigs/{config_id}`
1507
+ # @yield [result, operation] Access the result along with the TransportOperation object
1508
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V2::MuteConfig]
1509
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1510
+ #
1511
+ # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig]
1512
+ #
1513
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1514
+ #
1515
+ # @example Basic example
1516
+ # require "google/cloud/security_center/v2"
1517
+ #
1518
+ # # Create a client object. The client can be reused for multiple calls.
1519
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
1520
+ #
1521
+ # # Create a request. To set request fields, pass in keyword arguments.
1522
+ # request = Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest.new
1523
+ #
1524
+ # # Call the get_mute_config method.
1525
+ # result = client.get_mute_config request
1526
+ #
1527
+ # # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig.
1528
+ # p result
1529
+ #
1530
+ def get_mute_config request, options = nil
1531
+ raise ::ArgumentError, "request must be provided" if request.nil?
1532
+
1533
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetMuteConfigRequest
1534
+
1535
+ # Converts hash and nil to an options object
1536
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1537
+
1538
+ # Customize the options with defaults
1539
+ call_metadata = @config.rpcs.get_mute_config.metadata.to_h
1540
+
1541
+ # Set x-goog-api-client and x-goog-user-project headers
1542
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1543
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1544
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
1545
+ transports_version_send: [:rest]
1546
+
1547
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1548
+
1549
+ options.apply_defaults timeout: @config.rpcs.get_mute_config.timeout,
1550
+ metadata: call_metadata,
1551
+ retry_policy: @config.rpcs.get_mute_config.retry_policy
1552
+
1553
+ options.apply_defaults timeout: @config.timeout,
1554
+ metadata: @config.metadata,
1555
+ retry_policy: @config.retry_policy
1556
+
1557
+ @security_center_stub.get_mute_config request, options do |result, operation|
1558
+ yield result, operation if block_given?
1559
+ return result
1560
+ end
1561
+ rescue ::Gapic::Rest::Error => e
1562
+ raise ::Google::Cloud::Error.from_error(e)
1563
+ end
1564
+
1565
+ ##
1566
+ # Gets a notification config.
1567
+ #
1568
+ # @overload get_notification_config(request, options = nil)
1569
+ # Pass arguments to `get_notification_config` via a request object, either of type
1570
+ # {::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest} or an equivalent Hash.
1571
+ #
1572
+ # @param request [::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest, ::Hash]
1573
+ # A request object representing the call parameters. Required. To specify no
1574
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1575
+ # @param options [::Gapic::CallOptions, ::Hash]
1576
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1577
+ #
1578
+ # @overload get_notification_config(name: nil)
1579
+ # Pass arguments to `get_notification_config` via keyword arguments. Note that at
1580
+ # least one keyword argument is required. To specify no parameters, or to keep all
1581
+ # the default parameter values, pass an empty Hash as a request object (see above).
1582
+ #
1583
+ # @param name [::String]
1584
+ # Required. Name of the notification config to get. The following list shows
1585
+ # some examples of the format:
1586
+ #
1587
+ # +
1588
+ # `organizations/[organization_id]/locations/[location_id]/notificationConfigs/[config_id]`
1589
+ # +
1590
+ # `folders/[folder_id]/locations/[location_id]/notificationConfigs/[config_id]`
1591
+ # +
1592
+ # `projects/[project_id]/locations/[location_id]/notificationConfigs/[config_id]`
1593
+ # @yield [result, operation] Access the result along with the TransportOperation object
1594
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V2::NotificationConfig]
1595
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1596
+ #
1597
+ # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig]
1598
+ #
1599
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1600
+ #
1601
+ # @example Basic example
1602
+ # require "google/cloud/security_center/v2"
1603
+ #
1604
+ # # Create a client object. The client can be reused for multiple calls.
1605
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
1606
+ #
1607
+ # # Create a request. To set request fields, pass in keyword arguments.
1608
+ # request = Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest.new
1609
+ #
1610
+ # # Call the get_notification_config method.
1611
+ # result = client.get_notification_config request
1612
+ #
1613
+ # # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig.
1614
+ # p result
1615
+ #
1616
+ def get_notification_config request, options = nil
1617
+ raise ::ArgumentError, "request must be provided" if request.nil?
1618
+
1619
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetNotificationConfigRequest
1620
+
1621
+ # Converts hash and nil to an options object
1622
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1623
+
1624
+ # Customize the options with defaults
1625
+ call_metadata = @config.rpcs.get_notification_config.metadata.to_h
1626
+
1627
+ # Set x-goog-api-client and x-goog-user-project headers
1628
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1629
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1630
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
1631
+ transports_version_send: [:rest]
1632
+
1633
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1634
+
1635
+ options.apply_defaults timeout: @config.rpcs.get_notification_config.timeout,
1636
+ metadata: call_metadata,
1637
+ retry_policy: @config.rpcs.get_notification_config.retry_policy
1638
+
1639
+ options.apply_defaults timeout: @config.timeout,
1640
+ metadata: @config.metadata,
1641
+ retry_policy: @config.retry_policy
1642
+
1643
+ @security_center_stub.get_notification_config request, options do |result, operation|
1644
+ yield result, operation if block_given?
1645
+ return result
1646
+ end
1647
+ rescue ::Gapic::Rest::Error => e
1648
+ raise ::Google::Cloud::Error.from_error(e)
1649
+ end
1650
+
1651
+ ##
1652
+ # Gets a ResourceValueConfig.
1653
+ #
1654
+ # @overload get_resource_value_config(request, options = nil)
1655
+ # Pass arguments to `get_resource_value_config` via a request object, either of type
1656
+ # {::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest} or an equivalent Hash.
1657
+ #
1658
+ # @param request [::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest, ::Hash]
1659
+ # A request object representing the call parameters. Required. To specify no
1660
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1661
+ # @param options [::Gapic::CallOptions, ::Hash]
1662
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1663
+ #
1664
+ # @overload get_resource_value_config(name: nil)
1665
+ # Pass arguments to `get_resource_value_config` via keyword arguments. Note that at
1666
+ # least one keyword argument is required. To specify no parameters, or to keep all
1667
+ # the default parameter values, pass an empty Hash as a request object (see above).
1668
+ #
1669
+ # @param name [::String]
1670
+ # Required. Name of the resource value config to retrieve. Its format is
1671
+ # organizations/\\{organization}/resourceValueConfigs/\\{config_id}.
1672
+ # @yield [result, operation] Access the result along with the TransportOperation object
1673
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig]
1674
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1675
+ #
1676
+ # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig]
1677
+ #
1678
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1679
+ #
1680
+ # @example Basic example
1681
+ # require "google/cloud/security_center/v2"
1682
+ #
1683
+ # # Create a client object. The client can be reused for multiple calls.
1684
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
1685
+ #
1686
+ # # Create a request. To set request fields, pass in keyword arguments.
1687
+ # request = Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest.new
1688
+ #
1689
+ # # Call the get_resource_value_config method.
1690
+ # result = client.get_resource_value_config request
1691
+ #
1692
+ # # The returned object is of type Google::Cloud::SecurityCenter::V2::ResourceValueConfig.
1693
+ # p result
1694
+ #
1695
+ def get_resource_value_config request, options = nil
1696
+ raise ::ArgumentError, "request must be provided" if request.nil?
1697
+
1698
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetResourceValueConfigRequest
1699
+
1700
+ # Converts hash and nil to an options object
1701
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1702
+
1703
+ # Customize the options with defaults
1704
+ call_metadata = @config.rpcs.get_resource_value_config.metadata.to_h
1705
+
1706
+ # Set x-goog-api-client and x-goog-user-project headers
1707
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1708
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1709
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
1710
+ transports_version_send: [:rest]
1711
+
1712
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1713
+
1714
+ options.apply_defaults timeout: @config.rpcs.get_resource_value_config.timeout,
1715
+ metadata: call_metadata,
1716
+ retry_policy: @config.rpcs.get_resource_value_config.retry_policy
1717
+
1718
+ options.apply_defaults timeout: @config.timeout,
1719
+ metadata: @config.metadata,
1720
+ retry_policy: @config.retry_policy
1721
+
1722
+ @security_center_stub.get_resource_value_config request, options do |result, operation|
1723
+ yield result, operation if block_given?
1724
+ return result
1725
+ end
1726
+ rescue ::Gapic::Rest::Error => e
1727
+ raise ::Google::Cloud::Error.from_error(e)
1728
+ end
1729
+
1730
+ ##
1731
+ # Gets a source.
1732
+ #
1733
+ # @overload get_source(request, options = nil)
1734
+ # Pass arguments to `get_source` via a request object, either of type
1735
+ # {::Google::Cloud::SecurityCenter::V2::GetSourceRequest} or an equivalent Hash.
1736
+ #
1737
+ # @param request [::Google::Cloud::SecurityCenter::V2::GetSourceRequest, ::Hash]
1738
+ # A request object representing the call parameters. Required. To specify no
1739
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1740
+ # @param options [::Gapic::CallOptions, ::Hash]
1741
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1742
+ #
1743
+ # @overload get_source(name: nil)
1744
+ # Pass arguments to `get_source` via keyword arguments. Note that at
1745
+ # least one keyword argument is required. To specify no parameters, or to keep all
1746
+ # the default parameter values, pass an empty Hash as a request object (see above).
1747
+ #
1748
+ # @param name [::String]
1749
+ # Required. Relative resource name of the source. Its format is
1750
+ # "organizations/[organization_id]/source/[source_id]".
1751
+ # @yield [result, operation] Access the result along with the TransportOperation object
1752
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Source]
1753
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1754
+ #
1755
+ # @return [::Google::Cloud::SecurityCenter::V2::Source]
1756
+ #
1757
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1758
+ #
1759
+ # @example Basic example
1760
+ # require "google/cloud/security_center/v2"
1761
+ #
1762
+ # # Create a client object. The client can be reused for multiple calls.
1763
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
1764
+ #
1765
+ # # Create a request. To set request fields, pass in keyword arguments.
1766
+ # request = Google::Cloud::SecurityCenter::V2::GetSourceRequest.new
1767
+ #
1768
+ # # Call the get_source method.
1769
+ # result = client.get_source request
1770
+ #
1771
+ # # The returned object is of type Google::Cloud::SecurityCenter::V2::Source.
1772
+ # p result
1773
+ #
1774
+ def get_source request, options = nil
1775
+ raise ::ArgumentError, "request must be provided" if request.nil?
1776
+
1777
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GetSourceRequest
1778
+
1779
+ # Converts hash and nil to an options object
1780
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1781
+
1782
+ # Customize the options with defaults
1783
+ call_metadata = @config.rpcs.get_source.metadata.to_h
1784
+
1785
+ # Set x-goog-api-client and x-goog-user-project headers
1786
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1787
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1788
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
1789
+ transports_version_send: [:rest]
1790
+
1791
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1792
+
1793
+ options.apply_defaults timeout: @config.rpcs.get_source.timeout,
1794
+ metadata: call_metadata,
1795
+ retry_policy: @config.rpcs.get_source.retry_policy
1796
+
1797
+ options.apply_defaults timeout: @config.timeout,
1798
+ metadata: @config.metadata,
1799
+ retry_policy: @config.retry_policy
1800
+
1801
+ @security_center_stub.get_source request, options do |result, operation|
1802
+ yield result, operation if block_given?
1803
+ return result
1804
+ end
1805
+ rescue ::Gapic::Rest::Error => e
1806
+ raise ::Google::Cloud::Error.from_error(e)
1807
+ end
1808
+
1809
+ ##
1810
+ # Filters an organization or source's findings and groups them by their
1811
+ # specified properties in a location. If no location is specified, findings
1812
+ # are assumed to be in global
1813
+ #
1814
+ # To group across all sources provide a `-` as the source id.
1815
+ # The following list shows some examples:
1816
+ #
1817
+ # + `/v2/organizations/{organization_id}/sources/-/findings`
1818
+ # +
1819
+ # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings`
1820
+ # + `/v2/folders/{folder_id}/sources/-/findings`
1821
+ # + `/v2/folders/{folder_id}/sources/-/locations/{location_id}/findings`
1822
+ # + `/v2/projects/{project_id}/sources/-/findings`
1823
+ # + `/v2/projects/{project_id}/sources/-/locations/{location_id}/findings`
1824
+ #
1825
+ # @overload group_findings(request, options = nil)
1826
+ # Pass arguments to `group_findings` via a request object, either of type
1827
+ # {::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest} or an equivalent Hash.
1828
+ #
1829
+ # @param request [::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest, ::Hash]
1830
+ # A request object representing the call parameters. Required. To specify no
1831
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1832
+ # @param options [::Gapic::CallOptions, ::Hash]
1833
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1834
+ #
1835
+ # @overload group_findings(parent: nil, filter: nil, group_by: nil, page_token: nil, page_size: nil)
1836
+ # Pass arguments to `group_findings` via keyword arguments. Note that at
1837
+ # least one keyword argument is required. To specify no parameters, or to keep all
1838
+ # the default parameter values, pass an empty Hash as a request object (see above).
1839
+ #
1840
+ # @param parent [::String]
1841
+ # Required. Name of the source to groupBy. If no location is specified,
1842
+ # finding is assumed to be in global.
1843
+ # The following list shows some examples:
1844
+ #
1845
+ # + `organizations/[organization_id]/sources/[source_id]`
1846
+ # +
1847
+ # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]`
1848
+ # + `folders/[folder_id]/sources/[source_id]`
1849
+ # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]`
1850
+ # + `projects/[project_id]/sources/[source_id]`
1851
+ # + `projects/[project_id]/sources/[source_id]/locations/[location_id]`
1852
+ #
1853
+ # To groupBy across all sources provide a source_id of `-`. The following
1854
+ # list shows some examples:
1855
+ #
1856
+ # + `organizations/{organization_id}/sources/-`
1857
+ # + `organizations/{organization_id}/sources/-/locations/[location_id]`
1858
+ # + `folders/{folder_id}/sources/-`
1859
+ # + `folders/{folder_id}/sources/-/locations/[location_id]`
1860
+ # + `projects/{project_id}/sources/-`
1861
+ # + `projects/{project_id}/sources/-/locations/[location_id]`
1862
+ # @param filter [::String]
1863
+ # Expression that defines the filter to apply across findings.
1864
+ # The expression is a list of one or more restrictions combined via logical
1865
+ # operators `AND` and `OR`.
1866
+ # Parentheses are supported, and `OR` has higher precedence than `AND`.
1867
+ #
1868
+ # Restrictions have the form `<field> <operator> <value>` and may have a `-`
1869
+ # character in front of them to indicate negation. Examples include:
1870
+ #
1871
+ # * name
1872
+ # * security_marks.marks.marka
1873
+ #
1874
+ # The supported operators are:
1875
+ #
1876
+ # * `=` for all value types.
1877
+ # * `>`, `<`, `>=`, `<=` for integer values.
1878
+ # * `:`, meaning substring matching, for strings.
1879
+ #
1880
+ # The supported value types are:
1881
+ #
1882
+ # * string literals in quotes.
1883
+ # * integer literals without quotes.
1884
+ # * boolean literals `true` and `false` without quotes.
1885
+ #
1886
+ # The following field and operator combinations are supported:
1887
+ #
1888
+ # * name: `=`
1889
+ # * parent: `=`, `:`
1890
+ # * resource_name: `=`, `:`
1891
+ # * state: `=`, `:`
1892
+ # * category: `=`, `:`
1893
+ # * external_uri: `=`, `:`
1894
+ # * event_time: `=`, `>`, `<`, `>=`, `<=`
1895
+ #
1896
+ # Usage: This should be milliseconds since epoch or an RFC3339 string.
1897
+ # Examples:
1898
+ # `event_time = "2019-06-10T16:07:18-07:00"`
1899
+ # `event_time = 1560208038000`
1900
+ #
1901
+ # * severity: `=`, `:`
1902
+ # * security_marks.marks: `=`, `:`
1903
+ # * resource:
1904
+ # * resource.name: `=`, `:`
1905
+ # * resource.parent_name: `=`, `:`
1906
+ # * resource.parent_display_name: `=`, `:`
1907
+ # * resource.project_name: `=`, `:`
1908
+ # * resource.project_display_name: `=`, `:`
1909
+ # * resource.type: `=`, `:`
1910
+ # @param group_by [::String]
1911
+ # Required. Expression that defines what assets fields to use for grouping.
1912
+ # The string value should follow SQL syntax: comma separated list of fields.
1913
+ # For example: "parent,resource_name".
1914
+ #
1915
+ # The following fields are supported:
1916
+ #
1917
+ # * resource_name
1918
+ # * category
1919
+ # * state
1920
+ # * parent
1921
+ # * severity
1922
+ # @param page_token [::String]
1923
+ # The value returned by the last `GroupFindingsResponse`; indicates
1924
+ # that this is a continuation of a prior `GroupFindings` call, and
1925
+ # that the system should return the next page of data.
1926
+ # @param page_size [::Integer]
1927
+ # The maximum number of results to return in a single response. Default is
1928
+ # 10, minimum is 1, maximum is 1000.
1929
+ # @yield [result, operation] Access the result along with the TransportOperation object
1930
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::GroupResult>]
1931
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1932
+ #
1933
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::GroupResult>]
1934
+ #
1935
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1936
+ #
1937
+ # @example Basic example
1938
+ # require "google/cloud/security_center/v2"
1939
+ #
1940
+ # # Create a client object. The client can be reused for multiple calls.
1941
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
1942
+ #
1943
+ # # Create a request. To set request fields, pass in keyword arguments.
1944
+ # request = Google::Cloud::SecurityCenter::V2::GroupFindingsRequest.new
1945
+ #
1946
+ # # Call the group_findings method.
1947
+ # result = client.group_findings request
1948
+ #
1949
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
1950
+ # # over elements, and API calls will be issued to fetch pages as needed.
1951
+ # result.each do |item|
1952
+ # # Each element is of type ::Google::Cloud::SecurityCenter::V2::GroupResult.
1953
+ # p item
1954
+ # end
1955
+ #
1956
+ def group_findings request, options = nil
1957
+ raise ::ArgumentError, "request must be provided" if request.nil?
1958
+
1959
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::GroupFindingsRequest
1960
+
1961
+ # Converts hash and nil to an options object
1962
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1963
+
1964
+ # Customize the options with defaults
1965
+ call_metadata = @config.rpcs.group_findings.metadata.to_h
1966
+
1967
+ # Set x-goog-api-client and x-goog-user-project headers
1968
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1969
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1970
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
1971
+ transports_version_send: [:rest]
1972
+
1973
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1974
+
1975
+ options.apply_defaults timeout: @config.rpcs.group_findings.timeout,
1976
+ metadata: call_metadata,
1977
+ retry_policy: @config.rpcs.group_findings.retry_policy
1978
+
1979
+ options.apply_defaults timeout: @config.timeout,
1980
+ metadata: @config.metadata,
1981
+ retry_policy: @config.retry_policy
1982
+
1983
+ @security_center_stub.group_findings request, options do |result, operation|
1984
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :group_findings, "group_by_results", request, result, options
1985
+ yield result, operation if block_given?
1986
+ return result
1987
+ end
1988
+ rescue ::Gapic::Rest::Error => e
1989
+ raise ::Google::Cloud::Error.from_error(e)
1990
+ end
1991
+
1992
+ ##
1993
+ # Lists the attack paths for a set of simulation results or valued resources
1994
+ # and filter.
1995
+ #
1996
+ # @overload list_attack_paths(request, options = nil)
1997
+ # Pass arguments to `list_attack_paths` via a request object, either of type
1998
+ # {::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest} or an equivalent Hash.
1999
+ #
2000
+ # @param request [::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest, ::Hash]
2001
+ # A request object representing the call parameters. Required. To specify no
2002
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2003
+ # @param options [::Gapic::CallOptions, ::Hash]
2004
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2005
+ #
2006
+ # @overload list_attack_paths(parent: nil, filter: nil, page_token: nil, page_size: nil)
2007
+ # Pass arguments to `list_attack_paths` via keyword arguments. Note that at
2008
+ # least one keyword argument is required. To specify no parameters, or to keep all
2009
+ # the default parameter values, pass an empty Hash as a request object (see above).
2010
+ #
2011
+ # @param parent [::String]
2012
+ # Required. Name of parent to list attack paths.
2013
+ #
2014
+ # Valid formats:
2015
+ # "organizations/\\{organization}",
2016
+ # "organizations/\\{organization}/simulations/\\{simulation}"
2017
+ # "organizations/\\{organization}/simulations/\\{simulation}/attackExposureResults/\\{attack_exposure_result_v2}"
2018
+ # "organizations/\\{organization}/simulations/\\{simulation}/valuedResources/\\{valued_resource}"
2019
+ # @param filter [::String]
2020
+ # The filter expression that filters the attack path in the response.
2021
+ # Supported fields:
2022
+ #
2023
+ # * `valued_resources` supports =
2024
+ # @param page_token [::String]
2025
+ # The value returned by the last `ListAttackPathsResponse`; indicates
2026
+ # that this is a continuation of a prior `ListAttackPaths` call, and
2027
+ # that the system should return the next page of data.
2028
+ # @param page_size [::Integer]
2029
+ # The maximum number of results to return in a single response. Default is
2030
+ # 10, minimum is 1, maximum is 1000.
2031
+ # @yield [result, operation] Access the result along with the TransportOperation object
2032
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::AttackPath>]
2033
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2034
+ #
2035
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::AttackPath>]
2036
+ #
2037
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2038
+ #
2039
+ # @example Basic example
2040
+ # require "google/cloud/security_center/v2"
2041
+ #
2042
+ # # Create a client object. The client can be reused for multiple calls.
2043
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
2044
+ #
2045
+ # # Create a request. To set request fields, pass in keyword arguments.
2046
+ # request = Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest.new
2047
+ #
2048
+ # # Call the list_attack_paths method.
2049
+ # result = client.list_attack_paths request
2050
+ #
2051
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2052
+ # # over elements, and API calls will be issued to fetch pages as needed.
2053
+ # result.each do |item|
2054
+ # # Each element is of type ::Google::Cloud::SecurityCenter::V2::AttackPath.
2055
+ # p item
2056
+ # end
2057
+ #
2058
+ def list_attack_paths request, options = nil
2059
+ raise ::ArgumentError, "request must be provided" if request.nil?
2060
+
2061
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListAttackPathsRequest
2062
+
2063
+ # Converts hash and nil to an options object
2064
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2065
+
2066
+ # Customize the options with defaults
2067
+ call_metadata = @config.rpcs.list_attack_paths.metadata.to_h
2068
+
2069
+ # Set x-goog-api-client and x-goog-user-project headers
2070
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2071
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2072
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
2073
+ transports_version_send: [:rest]
2074
+
2075
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2076
+
2077
+ options.apply_defaults timeout: @config.rpcs.list_attack_paths.timeout,
2078
+ metadata: call_metadata,
2079
+ retry_policy: @config.rpcs.list_attack_paths.retry_policy
2080
+
2081
+ options.apply_defaults timeout: @config.timeout,
2082
+ metadata: @config.metadata,
2083
+ retry_policy: @config.retry_policy
2084
+
2085
+ @security_center_stub.list_attack_paths request, options do |result, operation|
2086
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_attack_paths, "attack_paths", request, result, options
2087
+ yield result, operation if block_given?
2088
+ return result
2089
+ end
2090
+ rescue ::Gapic::Rest::Error => e
2091
+ raise ::Google::Cloud::Error.from_error(e)
2092
+ end
2093
+
2094
+ ##
2095
+ # Lists BigQuery exports. Note that when requesting BigQuery exports at a
2096
+ # given level all exports under that level are also returned e.g. if
2097
+ # requesting BigQuery exports under a folder, then all BigQuery exports
2098
+ # immediately under the folder plus the ones created under the projects
2099
+ # within the folder are returned.
2100
+ #
2101
+ # @overload list_big_query_exports(request, options = nil)
2102
+ # Pass arguments to `list_big_query_exports` via a request object, either of type
2103
+ # {::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest} or an equivalent Hash.
2104
+ #
2105
+ # @param request [::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest, ::Hash]
2106
+ # A request object representing the call parameters. Required. To specify no
2107
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2108
+ # @param options [::Gapic::CallOptions, ::Hash]
2109
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2110
+ #
2111
+ # @overload list_big_query_exports(parent: nil, page_size: nil, page_token: nil)
2112
+ # Pass arguments to `list_big_query_exports` via keyword arguments. Note that at
2113
+ # least one keyword argument is required. To specify no parameters, or to keep all
2114
+ # the default parameter values, pass an empty Hash as a request object (see above).
2115
+ #
2116
+ # @param parent [::String]
2117
+ # Required. The parent, which owns the collection of BigQuery exports. Its
2118
+ # format is "organizations/[organization_id]/locations/[location_id]",
2119
+ # "folders/[folder_id]/locations/[location_id]", or
2120
+ # "projects/[project_id]/locations/[location_id]".
2121
+ # @param page_size [::Integer]
2122
+ # The maximum number of configs to return. The service may return fewer than
2123
+ # this value.
2124
+ # If unspecified, at most 10 configs will be returned.
2125
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
2126
+ # @param page_token [::String]
2127
+ # A page token, received from a previous `ListBigQueryExports` call.
2128
+ # Provide this to retrieve the subsequent page.
2129
+ # When paginating, all other parameters provided to `ListBigQueryExports`
2130
+ # must match the call that provided the page token.
2131
+ # @yield [result, operation] Access the result along with the TransportOperation object
2132
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::BigQueryExport>]
2133
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2134
+ #
2135
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::BigQueryExport>]
2136
+ #
2137
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2138
+ #
2139
+ # @example Basic example
2140
+ # require "google/cloud/security_center/v2"
2141
+ #
2142
+ # # Create a client object. The client can be reused for multiple calls.
2143
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
2144
+ #
2145
+ # # Create a request. To set request fields, pass in keyword arguments.
2146
+ # request = Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest.new
2147
+ #
2148
+ # # Call the list_big_query_exports method.
2149
+ # result = client.list_big_query_exports request
2150
+ #
2151
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2152
+ # # over elements, and API calls will be issued to fetch pages as needed.
2153
+ # result.each do |item|
2154
+ # # Each element is of type ::Google::Cloud::SecurityCenter::V2::BigQueryExport.
2155
+ # p item
2156
+ # end
2157
+ #
2158
+ def list_big_query_exports request, options = nil
2159
+ raise ::ArgumentError, "request must be provided" if request.nil?
2160
+
2161
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListBigQueryExportsRequest
2162
+
2163
+ # Converts hash and nil to an options object
2164
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2165
+
2166
+ # Customize the options with defaults
2167
+ call_metadata = @config.rpcs.list_big_query_exports.metadata.to_h
2168
+
2169
+ # Set x-goog-api-client and x-goog-user-project headers
2170
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2171
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2172
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
2173
+ transports_version_send: [:rest]
2174
+
2175
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2176
+
2177
+ options.apply_defaults timeout: @config.rpcs.list_big_query_exports.timeout,
2178
+ metadata: call_metadata,
2179
+ retry_policy: @config.rpcs.list_big_query_exports.retry_policy
2180
+
2181
+ options.apply_defaults timeout: @config.timeout,
2182
+ metadata: @config.metadata,
2183
+ retry_policy: @config.retry_policy
2184
+
2185
+ @security_center_stub.list_big_query_exports request, options do |result, operation|
2186
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_big_query_exports, "big_query_exports", request, result, options
2187
+ yield result, operation if block_given?
2188
+ return result
2189
+ end
2190
+ rescue ::Gapic::Rest::Error => e
2191
+ raise ::Google::Cloud::Error.from_error(e)
2192
+ end
2193
+
2194
+ ##
2195
+ # Lists an organization or source's findings.
2196
+ #
2197
+ # To list across all sources for a given location provide a `-` as the source
2198
+ # id. If no location is specified, finding are assumed to be in global.
2199
+ # The following list shows some examples:
2200
+ #
2201
+ # + `/v2/organizations/{organization_id}/sources/-/findings`
2202
+ # +
2203
+ # `/v2/organizations/{organization_id}/sources/-/locations/{location_id}/findings`
2204
+ #
2205
+ # @overload list_findings(request, options = nil)
2206
+ # Pass arguments to `list_findings` via a request object, either of type
2207
+ # {::Google::Cloud::SecurityCenter::V2::ListFindingsRequest} or an equivalent Hash.
2208
+ #
2209
+ # @param request [::Google::Cloud::SecurityCenter::V2::ListFindingsRequest, ::Hash]
2210
+ # A request object representing the call parameters. Required. To specify no
2211
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2212
+ # @param options [::Gapic::CallOptions, ::Hash]
2213
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2214
+ #
2215
+ # @overload list_findings(parent: nil, filter: nil, order_by: nil, field_mask: nil, page_token: nil, page_size: nil)
2216
+ # Pass arguments to `list_findings` via keyword arguments. Note that at
2217
+ # least one keyword argument is required. To specify no parameters, or to keep all
2218
+ # the default parameter values, pass an empty Hash as a request object (see above).
2219
+ #
2220
+ # @param parent [::String]
2221
+ # Required. Name of the source the findings belong to. If no location is
2222
+ # specified, the default is global. The following list shows some examples:
2223
+ #
2224
+ # + `organizations/[organization_id]/sources/[source_id]`
2225
+ # +
2226
+ # `organizations/[organization_id]/sources/[source_id]/locations/[location_id]`
2227
+ # + `folders/[folder_id]/sources/[source_id]`
2228
+ # + `folders/[folder_id]/sources/[source_id]/locations/[location_id]`
2229
+ # + `projects/[project_id]/sources/[source_id]`
2230
+ # + `projects/[project_id]/sources/[source_id]/locations/[location_id]`
2231
+ #
2232
+ # To list across all sources provide a source_id of `-`. The following
2233
+ # list shows some examples:
2234
+ #
2235
+ # + `organizations/{organization_id}/sources/-`
2236
+ # + `organizations/{organization_id}/sources/-/locations/{location_id}`
2237
+ # + `folders/{folder_id}/sources/-`
2238
+ # + `folders/{folder_id}/sources/-locations/{location_id}`
2239
+ # + `projects/{projects_id}/sources/-`
2240
+ # + `projects/{projects_id}/sources/-/locations/{location_id}`
2241
+ # @param filter [::String]
2242
+ # Expression that defines the filter to apply across findings.
2243
+ # The expression is a list of one or more restrictions combined via logical
2244
+ # operators `AND` and `OR`.
2245
+ # Parentheses are supported, and `OR` has higher precedence than `AND`.
2246
+ #
2247
+ # Restrictions have the form `<field> <operator> <value>` and may have a `-`
2248
+ # character in front of them to indicate negation. Examples include:
2249
+ #
2250
+ # * name
2251
+ # * security_marks.marks.marka
2252
+ #
2253
+ # The supported operators are:
2254
+ #
2255
+ # * `=` for all value types.
2256
+ # * `>`, `<`, `>=`, `<=` for integer values.
2257
+ # * `:`, meaning substring matching, for strings.
2258
+ #
2259
+ # The supported value types are:
2260
+ #
2261
+ # * string literals in quotes.
2262
+ # * integer literals without quotes.
2263
+ # * boolean literals `true` and `false` without quotes.
2264
+ #
2265
+ # The following field and operator combinations are supported:
2266
+ #
2267
+ # * name: `=`
2268
+ # * parent: `=`, `:`
2269
+ # * resource_name: `=`, `:`
2270
+ # * state: `=`, `:`
2271
+ # * category: `=`, `:`
2272
+ # * external_uri: `=`, `:`
2273
+ # * event_time: `=`, `>`, `<`, `>=`, `<=`
2274
+ #
2275
+ # Usage: This should be milliseconds since epoch or an RFC3339 string.
2276
+ # Examples:
2277
+ # `event_time = "2019-06-10T16:07:18-07:00"`
2278
+ # `event_time = 1560208038000`
2279
+ #
2280
+ # * severity: `=`, `:`
2281
+ # * security_marks.marks: `=`, `:`
2282
+ # * resource:
2283
+ # * resource.name: `=`, `:`
2284
+ # * resource.parent_name: `=`, `:`
2285
+ # * resource.parent_display_name: `=`, `:`
2286
+ # * resource.project_name: `=`, `:`
2287
+ # * resource.project_display_name: `=`, `:`
2288
+ # * resource.type: `=`, `:`
2289
+ # * resource.folders.resource_folder: `=`, `:`
2290
+ # * resource.display_name: `=`, `:`
2291
+ # @param order_by [::String]
2292
+ # Expression that defines what fields and order to use for sorting. The
2293
+ # string value should follow SQL syntax: comma separated list of fields. For
2294
+ # example: "name,parent". The default sorting order
2295
+ # is ascending. To specify descending order for a field, a suffix " desc"
2296
+ # should be appended to the field name. For example: "name
2297
+ # desc,parent". Redundant space characters in the
2298
+ # syntax are insignificant. "name desc,parent" and "
2299
+ # name desc , parent " are equivalent.
2300
+ #
2301
+ # The following fields are supported:
2302
+ # name
2303
+ # parent
2304
+ # state
2305
+ # category
2306
+ # resource_name
2307
+ # event_time
2308
+ # security_marks.marks
2309
+ # @param field_mask [::Google::Protobuf::FieldMask, ::Hash]
2310
+ # A field mask to specify the Finding fields to be listed in the response.
2311
+ # An empty field mask will list all fields.
2312
+ # @param page_token [::String]
2313
+ # The value returned by the last `ListFindingsResponse`; indicates
2314
+ # that this is a continuation of a prior `ListFindings` call, and
2315
+ # that the system should return the next page of data.
2316
+ # @param page_size [::Integer]
2317
+ # The maximum number of results to return in a single response. Default is
2318
+ # 10, minimum is 1, maximum is 1000.
2319
+ # @yield [result, operation] Access the result along with the TransportOperation object
2320
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ListFindingsResponse::ListFindingsResult>]
2321
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2322
+ #
2323
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ListFindingsResponse::ListFindingsResult>]
2324
+ #
2325
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2326
+ #
2327
+ # @example Basic example
2328
+ # require "google/cloud/security_center/v2"
2329
+ #
2330
+ # # Create a client object. The client can be reused for multiple calls.
2331
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
2332
+ #
2333
+ # # Create a request. To set request fields, pass in keyword arguments.
2334
+ # request = Google::Cloud::SecurityCenter::V2::ListFindingsRequest.new
2335
+ #
2336
+ # # Call the list_findings method.
2337
+ # result = client.list_findings request
2338
+ #
2339
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2340
+ # # over elements, and API calls will be issued to fetch pages as needed.
2341
+ # result.each do |item|
2342
+ # # Each element is of type ::Google::Cloud::SecurityCenter::V2::ListFindingsResponse::ListFindingsResult.
2343
+ # p item
2344
+ # end
2345
+ #
2346
+ def list_findings request, options = nil
2347
+ raise ::ArgumentError, "request must be provided" if request.nil?
2348
+
2349
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListFindingsRequest
2350
+
2351
+ # Converts hash and nil to an options object
2352
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2353
+
2354
+ # Customize the options with defaults
2355
+ call_metadata = @config.rpcs.list_findings.metadata.to_h
2356
+
2357
+ # Set x-goog-api-client and x-goog-user-project headers
2358
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2359
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2360
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
2361
+ transports_version_send: [:rest]
2362
+
2363
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2364
+
2365
+ options.apply_defaults timeout: @config.rpcs.list_findings.timeout,
2366
+ metadata: call_metadata,
2367
+ retry_policy: @config.rpcs.list_findings.retry_policy
2368
+
2369
+ options.apply_defaults timeout: @config.timeout,
2370
+ metadata: @config.metadata,
2371
+ retry_policy: @config.retry_policy
2372
+
2373
+ @security_center_stub.list_findings request, options do |result, operation|
2374
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_findings, "list_findings_results", request, result, options
2375
+ yield result, operation if block_given?
2376
+ return result
2377
+ end
2378
+ rescue ::Gapic::Rest::Error => e
2379
+ raise ::Google::Cloud::Error.from_error(e)
2380
+ end
2381
+
2382
+ ##
2383
+ # Lists mute configs. If no location is specified, default is
2384
+ # global.
2385
+ #
2386
+ # @overload list_mute_configs(request, options = nil)
2387
+ # Pass arguments to `list_mute_configs` via a request object, either of type
2388
+ # {::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest} or an equivalent Hash.
2389
+ #
2390
+ # @param request [::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest, ::Hash]
2391
+ # A request object representing the call parameters. Required. To specify no
2392
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2393
+ # @param options [::Gapic::CallOptions, ::Hash]
2394
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2395
+ #
2396
+ # @overload list_mute_configs(parent: nil, page_size: nil, page_token: nil)
2397
+ # Pass arguments to `list_mute_configs` via keyword arguments. Note that at
2398
+ # least one keyword argument is required. To specify no parameters, or to keep all
2399
+ # the default parameter values, pass an empty Hash as a request object (see above).
2400
+ #
2401
+ # @param parent [::String]
2402
+ # Required. The parent, which owns the collection of mute configs. Its format
2403
+ # is "organizations/[organization_id]", "folders/[folder_id]",
2404
+ # "projects/[project_id]",
2405
+ # "organizations/[organization_id]/locations/[location_id]",
2406
+ # "folders/[folder_id]/locations/[location_id]",
2407
+ # "projects/[project_id]/locations/[location_id]".
2408
+ # @param page_size [::Integer]
2409
+ # The maximum number of configs to return. The service may return fewer than
2410
+ # this value.
2411
+ # If unspecified, at most 10 configs will be returned.
2412
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
2413
+ # @param page_token [::String]
2414
+ # A page token, received from a previous `ListMuteConfigs` call.
2415
+ # Provide this to retrieve the subsequent page.
2416
+ #
2417
+ # When paginating, all other parameters provided to `ListMuteConfigs` must
2418
+ # match the call that provided the page token.
2419
+ # @yield [result, operation] Access the result along with the TransportOperation object
2420
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::MuteConfig>]
2421
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2422
+ #
2423
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::MuteConfig>]
2424
+ #
2425
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2426
+ #
2427
+ # @example Basic example
2428
+ # require "google/cloud/security_center/v2"
2429
+ #
2430
+ # # Create a client object. The client can be reused for multiple calls.
2431
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
2432
+ #
2433
+ # # Create a request. To set request fields, pass in keyword arguments.
2434
+ # request = Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest.new
2435
+ #
2436
+ # # Call the list_mute_configs method.
2437
+ # result = client.list_mute_configs request
2438
+ #
2439
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2440
+ # # over elements, and API calls will be issued to fetch pages as needed.
2441
+ # result.each do |item|
2442
+ # # Each element is of type ::Google::Cloud::SecurityCenter::V2::MuteConfig.
2443
+ # p item
2444
+ # end
2445
+ #
2446
+ def list_mute_configs request, options = nil
2447
+ raise ::ArgumentError, "request must be provided" if request.nil?
2448
+
2449
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListMuteConfigsRequest
2450
+
2451
+ # Converts hash and nil to an options object
2452
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2453
+
2454
+ # Customize the options with defaults
2455
+ call_metadata = @config.rpcs.list_mute_configs.metadata.to_h
2456
+
2457
+ # Set x-goog-api-client and x-goog-user-project headers
2458
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2459
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2460
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
2461
+ transports_version_send: [:rest]
2462
+
2463
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2464
+
2465
+ options.apply_defaults timeout: @config.rpcs.list_mute_configs.timeout,
2466
+ metadata: call_metadata,
2467
+ retry_policy: @config.rpcs.list_mute_configs.retry_policy
2468
+
2469
+ options.apply_defaults timeout: @config.timeout,
2470
+ metadata: @config.metadata,
2471
+ retry_policy: @config.retry_policy
2472
+
2473
+ @security_center_stub.list_mute_configs request, options do |result, operation|
2474
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_mute_configs, "mute_configs", request, result, options
2475
+ yield result, operation if block_given?
2476
+ return result
2477
+ end
2478
+ rescue ::Gapic::Rest::Error => e
2479
+ raise ::Google::Cloud::Error.from_error(e)
2480
+ end
2481
+
2482
+ ##
2483
+ # Lists notification configs.
2484
+ #
2485
+ # @overload list_notification_configs(request, options = nil)
2486
+ # Pass arguments to `list_notification_configs` via a request object, either of type
2487
+ # {::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest} or an equivalent Hash.
2488
+ #
2489
+ # @param request [::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest, ::Hash]
2490
+ # A request object representing the call parameters. Required. To specify no
2491
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2492
+ # @param options [::Gapic::CallOptions, ::Hash]
2493
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2494
+ #
2495
+ # @overload list_notification_configs(parent: nil, page_token: nil, page_size: nil)
2496
+ # Pass arguments to `list_notification_configs` via keyword arguments. Note that at
2497
+ # least one keyword argument is required. To specify no parameters, or to keep all
2498
+ # the default parameter values, pass an empty Hash as a request object (see above).
2499
+ #
2500
+ # @param parent [::String]
2501
+ # Required. The name of the parent in which to list the notification
2502
+ # configurations. Its format is
2503
+ # "organizations/[organization_id]/locations/[location_id]",
2504
+ # "folders/[folder_id]/locations/[location_id]", or
2505
+ # "projects/[project_id]/locations/[location_id]".
2506
+ # @param page_token [::String]
2507
+ # The value returned by the last `ListNotificationConfigsResponse`; indicates
2508
+ # that this is a continuation of a prior `ListNotificationConfigs` call, and
2509
+ # that the system should return the next page of data.
2510
+ # @param page_size [::Integer]
2511
+ # The maximum number of results to return in a single response. Default is
2512
+ # 10, minimum is 1, maximum is 1000.
2513
+ # @yield [result, operation] Access the result along with the TransportOperation object
2514
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::NotificationConfig>]
2515
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2516
+ #
2517
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::NotificationConfig>]
2518
+ #
2519
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2520
+ #
2521
+ # @example Basic example
2522
+ # require "google/cloud/security_center/v2"
2523
+ #
2524
+ # # Create a client object. The client can be reused for multiple calls.
2525
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
2526
+ #
2527
+ # # Create a request. To set request fields, pass in keyword arguments.
2528
+ # request = Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest.new
2529
+ #
2530
+ # # Call the list_notification_configs method.
2531
+ # result = client.list_notification_configs request
2532
+ #
2533
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2534
+ # # over elements, and API calls will be issued to fetch pages as needed.
2535
+ # result.each do |item|
2536
+ # # Each element is of type ::Google::Cloud::SecurityCenter::V2::NotificationConfig.
2537
+ # p item
2538
+ # end
2539
+ #
2540
+ def list_notification_configs request, options = nil
2541
+ raise ::ArgumentError, "request must be provided" if request.nil?
2542
+
2543
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListNotificationConfigsRequest
2544
+
2545
+ # Converts hash and nil to an options object
2546
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2547
+
2548
+ # Customize the options with defaults
2549
+ call_metadata = @config.rpcs.list_notification_configs.metadata.to_h
2550
+
2551
+ # Set x-goog-api-client and x-goog-user-project headers
2552
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2553
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2554
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
2555
+ transports_version_send: [:rest]
2556
+
2557
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2558
+
2559
+ options.apply_defaults timeout: @config.rpcs.list_notification_configs.timeout,
2560
+ metadata: call_metadata,
2561
+ retry_policy: @config.rpcs.list_notification_configs.retry_policy
2562
+
2563
+ options.apply_defaults timeout: @config.timeout,
2564
+ metadata: @config.metadata,
2565
+ retry_policy: @config.retry_policy
2566
+
2567
+ @security_center_stub.list_notification_configs request, options do |result, operation|
2568
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_notification_configs, "notification_configs", request, result, options
2569
+ yield result, operation if block_given?
2570
+ return result
2571
+ end
2572
+ rescue ::Gapic::Rest::Error => e
2573
+ raise ::Google::Cloud::Error.from_error(e)
2574
+ end
2575
+
2576
+ ##
2577
+ # Lists all ResourceValueConfigs.
2578
+ #
2579
+ # @overload list_resource_value_configs(request, options = nil)
2580
+ # Pass arguments to `list_resource_value_configs` via a request object, either of type
2581
+ # {::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest} or an equivalent Hash.
2582
+ #
2583
+ # @param request [::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest, ::Hash]
2584
+ # A request object representing the call parameters. Required. To specify no
2585
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2586
+ # @param options [::Gapic::CallOptions, ::Hash]
2587
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2588
+ #
2589
+ # @overload list_resource_value_configs(parent: nil, page_size: nil, page_token: nil)
2590
+ # Pass arguments to `list_resource_value_configs` via keyword arguments. Note that at
2591
+ # least one keyword argument is required. To specify no parameters, or to keep all
2592
+ # the default parameter values, pass an empty Hash as a request object (see above).
2593
+ #
2594
+ # @param parent [::String]
2595
+ # Required. The parent, which owns the collection of resource value configs.
2596
+ # Its format is
2597
+ # "organizations/[organization_id]"
2598
+ # @param page_size [::Integer]
2599
+ # The maximum number of configs to return. The service may return fewer than
2600
+ # this value.
2601
+ # If unspecified, at most 10 configs will be returned.
2602
+ # The maximum value is 1000; values above 1000 will be coerced to 1000.
2603
+ # @param page_token [::String]
2604
+ # A page token, received from a previous `ListResourceValueConfigs` call.
2605
+ # Provide this to retrieve the subsequent page.
2606
+ #
2607
+ # When paginating, all other parameters provided to
2608
+ # `ListResourceValueConfigs` must match the call that provided the
2609
+ # page token.
2610
+ #
2611
+ # page_size can be specified, and the new page_size will be used.
2612
+ # @yield [result, operation] Access the result along with the TransportOperation object
2613
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ResourceValueConfig>]
2614
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2615
+ #
2616
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ResourceValueConfig>]
2617
+ #
2618
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2619
+ #
2620
+ # @example Basic example
2621
+ # require "google/cloud/security_center/v2"
2622
+ #
2623
+ # # Create a client object. The client can be reused for multiple calls.
2624
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
2625
+ #
2626
+ # # Create a request. To set request fields, pass in keyword arguments.
2627
+ # request = Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest.new
2628
+ #
2629
+ # # Call the list_resource_value_configs method.
2630
+ # result = client.list_resource_value_configs request
2631
+ #
2632
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2633
+ # # over elements, and API calls will be issued to fetch pages as needed.
2634
+ # result.each do |item|
2635
+ # # Each element is of type ::Google::Cloud::SecurityCenter::V2::ResourceValueConfig.
2636
+ # p item
2637
+ # end
2638
+ #
2639
+ def list_resource_value_configs request, options = nil
2640
+ raise ::ArgumentError, "request must be provided" if request.nil?
2641
+
2642
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListResourceValueConfigsRequest
2643
+
2644
+ # Converts hash and nil to an options object
2645
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2646
+
2647
+ # Customize the options with defaults
2648
+ call_metadata = @config.rpcs.list_resource_value_configs.metadata.to_h
2649
+
2650
+ # Set x-goog-api-client and x-goog-user-project headers
2651
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2652
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2653
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
2654
+ transports_version_send: [:rest]
2655
+
2656
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2657
+
2658
+ options.apply_defaults timeout: @config.rpcs.list_resource_value_configs.timeout,
2659
+ metadata: call_metadata,
2660
+ retry_policy: @config.rpcs.list_resource_value_configs.retry_policy
2661
+
2662
+ options.apply_defaults timeout: @config.timeout,
2663
+ metadata: @config.metadata,
2664
+ retry_policy: @config.retry_policy
2665
+
2666
+ @security_center_stub.list_resource_value_configs request, options do |result, operation|
2667
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_resource_value_configs, "resource_value_configs", request, result, options
2668
+ yield result, operation if block_given?
2669
+ return result
2670
+ end
2671
+ rescue ::Gapic::Rest::Error => e
2672
+ raise ::Google::Cloud::Error.from_error(e)
2673
+ end
2674
+
2675
+ ##
2676
+ # Lists all sources belonging to an organization.
2677
+ #
2678
+ # @overload list_sources(request, options = nil)
2679
+ # Pass arguments to `list_sources` via a request object, either of type
2680
+ # {::Google::Cloud::SecurityCenter::V2::ListSourcesRequest} or an equivalent Hash.
2681
+ #
2682
+ # @param request [::Google::Cloud::SecurityCenter::V2::ListSourcesRequest, ::Hash]
2683
+ # A request object representing the call parameters. Required. To specify no
2684
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2685
+ # @param options [::Gapic::CallOptions, ::Hash]
2686
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2687
+ #
2688
+ # @overload list_sources(parent: nil, page_token: nil, page_size: nil)
2689
+ # Pass arguments to `list_sources` via keyword arguments. Note that at
2690
+ # least one keyword argument is required. To specify no parameters, or to keep all
2691
+ # the default parameter values, pass an empty Hash as a request object (see above).
2692
+ #
2693
+ # @param parent [::String]
2694
+ # Required. Resource name of the parent of sources to list. Its format should
2695
+ # be "organizations/[organization_id]", "folders/[folder_id]", or
2696
+ # "projects/[project_id]".
2697
+ # @param page_token [::String]
2698
+ # The value returned by the last `ListSourcesResponse`; indicates
2699
+ # that this is a continuation of a prior `ListSources` call, and
2700
+ # that the system should return the next page of data.
2701
+ # @param page_size [::Integer]
2702
+ # The maximum number of results to return in a single response. Default is
2703
+ # 10, minimum is 1, maximum is 1000.
2704
+ # @yield [result, operation] Access the result along with the TransportOperation object
2705
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::Source>]
2706
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2707
+ #
2708
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::Source>]
2709
+ #
2710
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2711
+ #
2712
+ # @example Basic example
2713
+ # require "google/cloud/security_center/v2"
2714
+ #
2715
+ # # Create a client object. The client can be reused for multiple calls.
2716
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
2717
+ #
2718
+ # # Create a request. To set request fields, pass in keyword arguments.
2719
+ # request = Google::Cloud::SecurityCenter::V2::ListSourcesRequest.new
2720
+ #
2721
+ # # Call the list_sources method.
2722
+ # result = client.list_sources request
2723
+ #
2724
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2725
+ # # over elements, and API calls will be issued to fetch pages as needed.
2726
+ # result.each do |item|
2727
+ # # Each element is of type ::Google::Cloud::SecurityCenter::V2::Source.
2728
+ # p item
2729
+ # end
2730
+ #
2731
+ def list_sources request, options = nil
2732
+ raise ::ArgumentError, "request must be provided" if request.nil?
2733
+
2734
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListSourcesRequest
2735
+
2736
+ # Converts hash and nil to an options object
2737
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2738
+
2739
+ # Customize the options with defaults
2740
+ call_metadata = @config.rpcs.list_sources.metadata.to_h
2741
+
2742
+ # Set x-goog-api-client and x-goog-user-project headers
2743
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2744
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2745
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
2746
+ transports_version_send: [:rest]
2747
+
2748
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2749
+
2750
+ options.apply_defaults timeout: @config.rpcs.list_sources.timeout,
2751
+ metadata: call_metadata,
2752
+ retry_policy: @config.rpcs.list_sources.retry_policy
2753
+
2754
+ options.apply_defaults timeout: @config.timeout,
2755
+ metadata: @config.metadata,
2756
+ retry_policy: @config.retry_policy
2757
+
2758
+ @security_center_stub.list_sources request, options do |result, operation|
2759
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_sources, "sources", request, result, options
2760
+ yield result, operation if block_given?
2761
+ return result
2762
+ end
2763
+ rescue ::Gapic::Rest::Error => e
2764
+ raise ::Google::Cloud::Error.from_error(e)
2765
+ end
2766
+
2767
+ ##
2768
+ # Lists the valued resources for a set of simulation results and filter.
2769
+ #
2770
+ # @overload list_valued_resources(request, options = nil)
2771
+ # Pass arguments to `list_valued_resources` via a request object, either of type
2772
+ # {::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest} or an equivalent Hash.
2773
+ #
2774
+ # @param request [::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest, ::Hash]
2775
+ # A request object representing the call parameters. Required. To specify no
2776
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2777
+ # @param options [::Gapic::CallOptions, ::Hash]
2778
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2779
+ #
2780
+ # @overload list_valued_resources(parent: nil, filter: nil, page_token: nil, page_size: nil, order_by: nil)
2781
+ # Pass arguments to `list_valued_resources` via keyword arguments. Note that at
2782
+ # least one keyword argument is required. To specify no parameters, or to keep all
2783
+ # the default parameter values, pass an empty Hash as a request object (see above).
2784
+ #
2785
+ # @param parent [::String]
2786
+ # Required. Name of parent to list exposed resources.
2787
+ #
2788
+ # Valid formats:
2789
+ # "organizations/\\{organization}",
2790
+ # "organizations/\\{organization}/simulations/\\{simulation}"
2791
+ # "organizations/\\{organization}/simulations/\\{simulation}/attackExposureResults/\\{attack_exposure_result_v2}"
2792
+ # @param filter [::String]
2793
+ # The filter expression that filters the valued resources in the response.
2794
+ # Supported fields:
2795
+ #
2796
+ # * `resource_value` supports =
2797
+ # * `resource_type` supports =
2798
+ # @param page_token [::String]
2799
+ # The value returned by the last `ListValuedResourcesResponse`; indicates
2800
+ # that this is a continuation of a prior `ListValuedResources` call, and
2801
+ # that the system should return the next page of data.
2802
+ # @param page_size [::Integer]
2803
+ # The maximum number of results to return in a single response. Default is
2804
+ # 10, minimum is 1, maximum is 1000.
2805
+ # @param order_by [::String]
2806
+ # Optional. The fields by which to order the valued resources response.
2807
+ #
2808
+ # Supported fields:
2809
+ #
2810
+ # * `exposed_score`
2811
+ #
2812
+ # * `resource_value`
2813
+ #
2814
+ # * `resource_type`
2815
+ #
2816
+ # Values should be a comma separated list of fields. For example:
2817
+ # `exposed_score,resource_value`.
2818
+ #
2819
+ # The default sorting order is descending. To specify ascending or descending
2820
+ # order for a field, append a " ASC" or a " DESC" suffix, respectively; for
2821
+ # example: `exposed_score DESC`.
2822
+ # @yield [result, operation] Access the result along with the TransportOperation object
2823
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ValuedResource>]
2824
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2825
+ #
2826
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::SecurityCenter::V2::ValuedResource>]
2827
+ #
2828
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2829
+ #
2830
+ # @example Basic example
2831
+ # require "google/cloud/security_center/v2"
2832
+ #
2833
+ # # Create a client object. The client can be reused for multiple calls.
2834
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
2835
+ #
2836
+ # # Create a request. To set request fields, pass in keyword arguments.
2837
+ # request = Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest.new
2838
+ #
2839
+ # # Call the list_valued_resources method.
2840
+ # result = client.list_valued_resources request
2841
+ #
2842
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
2843
+ # # over elements, and API calls will be issued to fetch pages as needed.
2844
+ # result.each do |item|
2845
+ # # Each element is of type ::Google::Cloud::SecurityCenter::V2::ValuedResource.
2846
+ # p item
2847
+ # end
2848
+ #
2849
+ def list_valued_resources request, options = nil
2850
+ raise ::ArgumentError, "request must be provided" if request.nil?
2851
+
2852
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::ListValuedResourcesRequest
2853
+
2854
+ # Converts hash and nil to an options object
2855
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2856
+
2857
+ # Customize the options with defaults
2858
+ call_metadata = @config.rpcs.list_valued_resources.metadata.to_h
2859
+
2860
+ # Set x-goog-api-client and x-goog-user-project headers
2861
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2862
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2863
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
2864
+ transports_version_send: [:rest]
2865
+
2866
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2867
+
2868
+ options.apply_defaults timeout: @config.rpcs.list_valued_resources.timeout,
2869
+ metadata: call_metadata,
2870
+ retry_policy: @config.rpcs.list_valued_resources.retry_policy
2871
+
2872
+ options.apply_defaults timeout: @config.timeout,
2873
+ metadata: @config.metadata,
2874
+ retry_policy: @config.retry_policy
2875
+
2876
+ @security_center_stub.list_valued_resources request, options do |result, operation|
2877
+ result = ::Gapic::Rest::PagedEnumerable.new @security_center_stub, :list_valued_resources, "valued_resources", request, result, options
2878
+ yield result, operation if block_given?
2879
+ return result
2880
+ end
2881
+ rescue ::Gapic::Rest::Error => e
2882
+ raise ::Google::Cloud::Error.from_error(e)
2883
+ end
2884
+
2885
+ ##
2886
+ # Updates the state of a finding. If no location is specified, finding is
2887
+ # assumed to be in global
2888
+ #
2889
+ # @overload set_finding_state(request, options = nil)
2890
+ # Pass arguments to `set_finding_state` via a request object, either of type
2891
+ # {::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest} or an equivalent Hash.
2892
+ #
2893
+ # @param request [::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest, ::Hash]
2894
+ # A request object representing the call parameters. Required. To specify no
2895
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2896
+ # @param options [::Gapic::CallOptions, ::Hash]
2897
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2898
+ #
2899
+ # @overload set_finding_state(name: nil, state: nil)
2900
+ # Pass arguments to `set_finding_state` via keyword arguments. Note that at
2901
+ # least one keyword argument is required. To specify no parameters, or to keep all
2902
+ # the default parameter values, pass an empty Hash as a request object (see above).
2903
+ #
2904
+ # @param name [::String]
2905
+ # Required. The [relative resource
2906
+ # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
2907
+ # of the finding. If no location is specified, finding is assumed to be in
2908
+ # global. The following list shows some examples:
2909
+ #
2910
+ # +
2911
+ # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
2912
+ # +
2913
+ # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
2914
+ # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
2915
+ # +
2916
+ # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
2917
+ # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
2918
+ # +
2919
+ # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
2920
+ # @param state [::Google::Cloud::SecurityCenter::V2::Finding::State]
2921
+ # Required. The desired State of the finding.
2922
+ # @yield [result, operation] Access the result along with the TransportOperation object
2923
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding]
2924
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
2925
+ #
2926
+ # @return [::Google::Cloud::SecurityCenter::V2::Finding]
2927
+ #
2928
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
2929
+ #
2930
+ # @example Basic example
2931
+ # require "google/cloud/security_center/v2"
2932
+ #
2933
+ # # Create a client object. The client can be reused for multiple calls.
2934
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
2935
+ #
2936
+ # # Create a request. To set request fields, pass in keyword arguments.
2937
+ # request = Google::Cloud::SecurityCenter::V2::SetFindingStateRequest.new
2938
+ #
2939
+ # # Call the set_finding_state method.
2940
+ # result = client.set_finding_state request
2941
+ #
2942
+ # # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding.
2943
+ # p result
2944
+ #
2945
+ def set_finding_state request, options = nil
2946
+ raise ::ArgumentError, "request must be provided" if request.nil?
2947
+
2948
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::SetFindingStateRequest
2949
+
2950
+ # Converts hash and nil to an options object
2951
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
2952
+
2953
+ # Customize the options with defaults
2954
+ call_metadata = @config.rpcs.set_finding_state.metadata.to_h
2955
+
2956
+ # Set x-goog-api-client and x-goog-user-project headers
2957
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
2958
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
2959
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
2960
+ transports_version_send: [:rest]
2961
+
2962
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
2963
+
2964
+ options.apply_defaults timeout: @config.rpcs.set_finding_state.timeout,
2965
+ metadata: call_metadata,
2966
+ retry_policy: @config.rpcs.set_finding_state.retry_policy
2967
+
2968
+ options.apply_defaults timeout: @config.timeout,
2969
+ metadata: @config.metadata,
2970
+ retry_policy: @config.retry_policy
2971
+
2972
+ @security_center_stub.set_finding_state request, options do |result, operation|
2973
+ yield result, operation if block_given?
2974
+ return result
2975
+ end
2976
+ rescue ::Gapic::Rest::Error => e
2977
+ raise ::Google::Cloud::Error.from_error(e)
2978
+ end
2979
+
2980
+ ##
2981
+ # Sets the access control policy on the specified Source.
2982
+ #
2983
+ # @overload set_iam_policy(request, options = nil)
2984
+ # Pass arguments to `set_iam_policy` via a request object, either of type
2985
+ # {::Google::Iam::V1::SetIamPolicyRequest} or an equivalent Hash.
2986
+ #
2987
+ # @param request [::Google::Iam::V1::SetIamPolicyRequest, ::Hash]
2988
+ # A request object representing the call parameters. Required. To specify no
2989
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
2990
+ # @param options [::Gapic::CallOptions, ::Hash]
2991
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
2992
+ #
2993
+ # @overload set_iam_policy(resource: nil, policy: nil, update_mask: nil)
2994
+ # Pass arguments to `set_iam_policy` via keyword arguments. Note that at
2995
+ # least one keyword argument is required. To specify no parameters, or to keep all
2996
+ # the default parameter values, pass an empty Hash as a request object (see above).
2997
+ #
2998
+ # @param resource [::String]
2999
+ # REQUIRED: The resource for which the policy is being specified.
3000
+ # See the operation documentation for the appropriate value for this field.
3001
+ # @param policy [::Google::Iam::V1::Policy, ::Hash]
3002
+ # REQUIRED: The complete policy to be applied to the `resource`. The size of
3003
+ # the policy is limited to a few 10s of KB. An empty policy is a
3004
+ # valid policy but certain Cloud Platform services (such as Projects)
3005
+ # might reject them.
3006
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3007
+ # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
3008
+ # the fields in the mask will be modified. If no mask is provided, the
3009
+ # following default mask is used:
3010
+ #
3011
+ # `paths: "bindings, etag"`
3012
+ # @yield [result, operation] Access the result along with the TransportOperation object
3013
+ # @yieldparam result [::Google::Iam::V1::Policy]
3014
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3015
+ #
3016
+ # @return [::Google::Iam::V1::Policy]
3017
+ #
3018
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3019
+ #
3020
+ # @example Basic example
3021
+ # require "google/cloud/security_center/v2"
3022
+ #
3023
+ # # Create a client object. The client can be reused for multiple calls.
3024
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
3025
+ #
3026
+ # # Create a request. To set request fields, pass in keyword arguments.
3027
+ # request = Google::Iam::V1::SetIamPolicyRequest.new
3028
+ #
3029
+ # # Call the set_iam_policy method.
3030
+ # result = client.set_iam_policy request
3031
+ #
3032
+ # # The returned object is of type Google::Iam::V1::Policy.
3033
+ # p result
3034
+ #
3035
+ def set_iam_policy request, options = nil
3036
+ raise ::ArgumentError, "request must be provided" if request.nil?
3037
+
3038
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::SetIamPolicyRequest
3039
+
3040
+ # Converts hash and nil to an options object
3041
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3042
+
3043
+ # Customize the options with defaults
3044
+ call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
3045
+
3046
+ # Set x-goog-api-client and x-goog-user-project headers
3047
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3048
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3049
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
3050
+ transports_version_send: [:rest]
3051
+
3052
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3053
+
3054
+ options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
3055
+ metadata: call_metadata,
3056
+ retry_policy: @config.rpcs.set_iam_policy.retry_policy
3057
+
3058
+ options.apply_defaults timeout: @config.timeout,
3059
+ metadata: @config.metadata,
3060
+ retry_policy: @config.retry_policy
3061
+
3062
+ @security_center_stub.set_iam_policy request, options do |result, operation|
3063
+ yield result, operation if block_given?
3064
+ return result
3065
+ end
3066
+ rescue ::Gapic::Rest::Error => e
3067
+ raise ::Google::Cloud::Error.from_error(e)
3068
+ end
3069
+
3070
+ ##
3071
+ # Updates the mute state of a finding. If no location is specified, finding
3072
+ # is assumed to be in global
3073
+ #
3074
+ # @overload set_mute(request, options = nil)
3075
+ # Pass arguments to `set_mute` via a request object, either of type
3076
+ # {::Google::Cloud::SecurityCenter::V2::SetMuteRequest} or an equivalent Hash.
3077
+ #
3078
+ # @param request [::Google::Cloud::SecurityCenter::V2::SetMuteRequest, ::Hash]
3079
+ # A request object representing the call parameters. Required. To specify no
3080
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3081
+ # @param options [::Gapic::CallOptions, ::Hash]
3082
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3083
+ #
3084
+ # @overload set_mute(name: nil, mute: nil)
3085
+ # Pass arguments to `set_mute` via keyword arguments. Note that at
3086
+ # least one keyword argument is required. To specify no parameters, or to keep all
3087
+ # the default parameter values, pass an empty Hash as a request object (see above).
3088
+ #
3089
+ # @param name [::String]
3090
+ # Required. The [relative resource
3091
+ # name](https://cloud.google.com/apis/design/resource_names#relative_resource_name)
3092
+ # of the finding. If no location is specified, finding is assumed to be in
3093
+ # global. The following list shows some examples:
3094
+ #
3095
+ # +
3096
+ # `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}`
3097
+ # +
3098
+ # `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
3099
+ # + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}`
3100
+ # +
3101
+ # `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
3102
+ # + `projects/{project_id}/sources/{source_id}/findings/{finding_id}`
3103
+ # +
3104
+ # `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`
3105
+ # @param mute [::Google::Cloud::SecurityCenter::V2::Finding::Mute]
3106
+ # Required. The desired state of the Mute.
3107
+ # @yield [result, operation] Access the result along with the TransportOperation object
3108
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding]
3109
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3110
+ #
3111
+ # @return [::Google::Cloud::SecurityCenter::V2::Finding]
3112
+ #
3113
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3114
+ #
3115
+ # @example Basic example
3116
+ # require "google/cloud/security_center/v2"
3117
+ #
3118
+ # # Create a client object. The client can be reused for multiple calls.
3119
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
3120
+ #
3121
+ # # Create a request. To set request fields, pass in keyword arguments.
3122
+ # request = Google::Cloud::SecurityCenter::V2::SetMuteRequest.new
3123
+ #
3124
+ # # Call the set_mute method.
3125
+ # result = client.set_mute request
3126
+ #
3127
+ # # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding.
3128
+ # p result
3129
+ #
3130
+ def set_mute request, options = nil
3131
+ raise ::ArgumentError, "request must be provided" if request.nil?
3132
+
3133
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::SetMuteRequest
3134
+
3135
+ # Converts hash and nil to an options object
3136
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3137
+
3138
+ # Customize the options with defaults
3139
+ call_metadata = @config.rpcs.set_mute.metadata.to_h
3140
+
3141
+ # Set x-goog-api-client and x-goog-user-project headers
3142
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3143
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3144
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
3145
+ transports_version_send: [:rest]
3146
+
3147
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3148
+
3149
+ options.apply_defaults timeout: @config.rpcs.set_mute.timeout,
3150
+ metadata: call_metadata,
3151
+ retry_policy: @config.rpcs.set_mute.retry_policy
3152
+
3153
+ options.apply_defaults timeout: @config.timeout,
3154
+ metadata: @config.metadata,
3155
+ retry_policy: @config.retry_policy
3156
+
3157
+ @security_center_stub.set_mute request, options do |result, operation|
3158
+ yield result, operation if block_given?
3159
+ return result
3160
+ end
3161
+ rescue ::Gapic::Rest::Error => e
3162
+ raise ::Google::Cloud::Error.from_error(e)
3163
+ end
3164
+
3165
+ ##
3166
+ # Returns the permissions that a caller has on the specified source.
3167
+ #
3168
+ # @overload test_iam_permissions(request, options = nil)
3169
+ # Pass arguments to `test_iam_permissions` via a request object, either of type
3170
+ # {::Google::Iam::V1::TestIamPermissionsRequest} or an equivalent Hash.
3171
+ #
3172
+ # @param request [::Google::Iam::V1::TestIamPermissionsRequest, ::Hash]
3173
+ # A request object representing the call parameters. Required. To specify no
3174
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3175
+ # @param options [::Gapic::CallOptions, ::Hash]
3176
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3177
+ #
3178
+ # @overload test_iam_permissions(resource: nil, permissions: nil)
3179
+ # Pass arguments to `test_iam_permissions` via keyword arguments. Note that at
3180
+ # least one keyword argument is required. To specify no parameters, or to keep all
3181
+ # the default parameter values, pass an empty Hash as a request object (see above).
3182
+ #
3183
+ # @param resource [::String]
3184
+ # REQUIRED: The resource for which the policy detail is being requested.
3185
+ # See the operation documentation for the appropriate value for this field.
3186
+ # @param permissions [::Array<::String>]
3187
+ # The set of permissions to check for the `resource`. Permissions with
3188
+ # wildcards (such as '*' or 'storage.*') are not allowed. For more
3189
+ # information see
3190
+ # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
3191
+ # @yield [result, operation] Access the result along with the TransportOperation object
3192
+ # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse]
3193
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3194
+ #
3195
+ # @return [::Google::Iam::V1::TestIamPermissionsResponse]
3196
+ #
3197
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3198
+ #
3199
+ # @example Basic example
3200
+ # require "google/cloud/security_center/v2"
3201
+ #
3202
+ # # Create a client object. The client can be reused for multiple calls.
3203
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
3204
+ #
3205
+ # # Create a request. To set request fields, pass in keyword arguments.
3206
+ # request = Google::Iam::V1::TestIamPermissionsRequest.new
3207
+ #
3208
+ # # Call the test_iam_permissions method.
3209
+ # result = client.test_iam_permissions request
3210
+ #
3211
+ # # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
3212
+ # p result
3213
+ #
3214
+ def test_iam_permissions request, options = nil
3215
+ raise ::ArgumentError, "request must be provided" if request.nil?
3216
+
3217
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::V1::TestIamPermissionsRequest
3218
+
3219
+ # Converts hash and nil to an options object
3220
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3221
+
3222
+ # Customize the options with defaults
3223
+ call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
3224
+
3225
+ # Set x-goog-api-client and x-goog-user-project headers
3226
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3227
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3228
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
3229
+ transports_version_send: [:rest]
3230
+
3231
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3232
+
3233
+ options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
3234
+ metadata: call_metadata,
3235
+ retry_policy: @config.rpcs.test_iam_permissions.retry_policy
3236
+
3237
+ options.apply_defaults timeout: @config.timeout,
3238
+ metadata: @config.metadata,
3239
+ retry_policy: @config.retry_policy
3240
+
3241
+ @security_center_stub.test_iam_permissions request, options do |result, operation|
3242
+ yield result, operation if block_given?
3243
+ return result
3244
+ end
3245
+ rescue ::Gapic::Rest::Error => e
3246
+ raise ::Google::Cloud::Error.from_error(e)
3247
+ end
3248
+
3249
+ ##
3250
+ # Updates a BigQuery export.
3251
+ #
3252
+ # @overload update_big_query_export(request, options = nil)
3253
+ # Pass arguments to `update_big_query_export` via a request object, either of type
3254
+ # {::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest} or an equivalent Hash.
3255
+ #
3256
+ # @param request [::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest, ::Hash]
3257
+ # A request object representing the call parameters. Required. To specify no
3258
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3259
+ # @param options [::Gapic::CallOptions, ::Hash]
3260
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3261
+ #
3262
+ # @overload update_big_query_export(big_query_export: nil, update_mask: nil)
3263
+ # Pass arguments to `update_big_query_export` via keyword arguments. Note that at
3264
+ # least one keyword argument is required. To specify no parameters, or to keep all
3265
+ # the default parameter values, pass an empty Hash as a request object (see above).
3266
+ #
3267
+ # @param big_query_export [::Google::Cloud::SecurityCenter::V2::BigQueryExport, ::Hash]
3268
+ # Required. The BigQuery export being updated.
3269
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3270
+ # The list of fields to be updated.
3271
+ # If empty all mutable fields will be updated.
3272
+ # @yield [result, operation] Access the result along with the TransportOperation object
3273
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V2::BigQueryExport]
3274
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3275
+ #
3276
+ # @return [::Google::Cloud::SecurityCenter::V2::BigQueryExport]
3277
+ #
3278
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3279
+ #
3280
+ # @example Basic example
3281
+ # require "google/cloud/security_center/v2"
3282
+ #
3283
+ # # Create a client object. The client can be reused for multiple calls.
3284
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
3285
+ #
3286
+ # # Create a request. To set request fields, pass in keyword arguments.
3287
+ # request = Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest.new
3288
+ #
3289
+ # # Call the update_big_query_export method.
3290
+ # result = client.update_big_query_export request
3291
+ #
3292
+ # # The returned object is of type Google::Cloud::SecurityCenter::V2::BigQueryExport.
3293
+ # p result
3294
+ #
3295
+ def update_big_query_export request, options = nil
3296
+ raise ::ArgumentError, "request must be provided" if request.nil?
3297
+
3298
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateBigQueryExportRequest
3299
+
3300
+ # Converts hash and nil to an options object
3301
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3302
+
3303
+ # Customize the options with defaults
3304
+ call_metadata = @config.rpcs.update_big_query_export.metadata.to_h
3305
+
3306
+ # Set x-goog-api-client and x-goog-user-project headers
3307
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3308
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3309
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
3310
+ transports_version_send: [:rest]
3311
+
3312
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3313
+
3314
+ options.apply_defaults timeout: @config.rpcs.update_big_query_export.timeout,
3315
+ metadata: call_metadata,
3316
+ retry_policy: @config.rpcs.update_big_query_export.retry_policy
3317
+
3318
+ options.apply_defaults timeout: @config.timeout,
3319
+ metadata: @config.metadata,
3320
+ retry_policy: @config.retry_policy
3321
+
3322
+ @security_center_stub.update_big_query_export request, options do |result, operation|
3323
+ yield result, operation if block_given?
3324
+ return result
3325
+ end
3326
+ rescue ::Gapic::Rest::Error => e
3327
+ raise ::Google::Cloud::Error.from_error(e)
3328
+ end
3329
+
3330
+ ##
3331
+ # Updates external system. This is for a given finding. If no location is
3332
+ # specified, finding is assumed to be in global
3333
+ #
3334
+ # @overload update_external_system(request, options = nil)
3335
+ # Pass arguments to `update_external_system` via a request object, either of type
3336
+ # {::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest} or an equivalent Hash.
3337
+ #
3338
+ # @param request [::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest, ::Hash]
3339
+ # A request object representing the call parameters. Required. To specify no
3340
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3341
+ # @param options [::Gapic::CallOptions, ::Hash]
3342
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3343
+ #
3344
+ # @overload update_external_system(external_system: nil, update_mask: nil)
3345
+ # Pass arguments to `update_external_system` via keyword arguments. Note that at
3346
+ # least one keyword argument is required. To specify no parameters, or to keep all
3347
+ # the default parameter values, pass an empty Hash as a request object (see above).
3348
+ #
3349
+ # @param external_system [::Google::Cloud::SecurityCenter::V2::ExternalSystem, ::Hash]
3350
+ # Required. The external system resource to update.
3351
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3352
+ # The FieldMask to use when updating the external system resource.
3353
+ #
3354
+ # If empty all mutable fields will be updated.
3355
+ # @yield [result, operation] Access the result along with the TransportOperation object
3356
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ExternalSystem]
3357
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3358
+ #
3359
+ # @return [::Google::Cloud::SecurityCenter::V2::ExternalSystem]
3360
+ #
3361
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3362
+ #
3363
+ # @example Basic example
3364
+ # require "google/cloud/security_center/v2"
3365
+ #
3366
+ # # Create a client object. The client can be reused for multiple calls.
3367
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
3368
+ #
3369
+ # # Create a request. To set request fields, pass in keyword arguments.
3370
+ # request = Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest.new
3371
+ #
3372
+ # # Call the update_external_system method.
3373
+ # result = client.update_external_system request
3374
+ #
3375
+ # # The returned object is of type Google::Cloud::SecurityCenter::V2::ExternalSystem.
3376
+ # p result
3377
+ #
3378
+ def update_external_system request, options = nil
3379
+ raise ::ArgumentError, "request must be provided" if request.nil?
3380
+
3381
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateExternalSystemRequest
3382
+
3383
+ # Converts hash and nil to an options object
3384
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3385
+
3386
+ # Customize the options with defaults
3387
+ call_metadata = @config.rpcs.update_external_system.metadata.to_h
3388
+
3389
+ # Set x-goog-api-client and x-goog-user-project headers
3390
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3391
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3392
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
3393
+ transports_version_send: [:rest]
3394
+
3395
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3396
+
3397
+ options.apply_defaults timeout: @config.rpcs.update_external_system.timeout,
3398
+ metadata: call_metadata,
3399
+ retry_policy: @config.rpcs.update_external_system.retry_policy
3400
+
3401
+ options.apply_defaults timeout: @config.timeout,
3402
+ metadata: @config.metadata,
3403
+ retry_policy: @config.retry_policy
3404
+
3405
+ @security_center_stub.update_external_system request, options do |result, operation|
3406
+ yield result, operation if block_given?
3407
+ return result
3408
+ end
3409
+ rescue ::Gapic::Rest::Error => e
3410
+ raise ::Google::Cloud::Error.from_error(e)
3411
+ end
3412
+
3413
+ ##
3414
+ # Creates or updates a finding. If no location is specified, finding is
3415
+ # assumed to be in global. The corresponding source must exist for a finding
3416
+ # creation to succeed.
3417
+ #
3418
+ # @overload update_finding(request, options = nil)
3419
+ # Pass arguments to `update_finding` via a request object, either of type
3420
+ # {::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest} or an equivalent Hash.
3421
+ #
3422
+ # @param request [::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest, ::Hash]
3423
+ # A request object representing the call parameters. Required. To specify no
3424
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3425
+ # @param options [::Gapic::CallOptions, ::Hash]
3426
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3427
+ #
3428
+ # @overload update_finding(finding: nil, update_mask: nil)
3429
+ # Pass arguments to `update_finding` via keyword arguments. Note that at
3430
+ # least one keyword argument is required. To specify no parameters, or to keep all
3431
+ # the default parameter values, pass an empty Hash as a request object (see above).
3432
+ #
3433
+ # @param finding [::Google::Cloud::SecurityCenter::V2::Finding, ::Hash]
3434
+ # Required. The finding resource to update or create if it does not already
3435
+ # exist. parent, security_marks, and update_time will be ignored.
3436
+ #
3437
+ # In the case of creation, the finding id portion of the name must be
3438
+ # alphanumeric and less than or equal to 32 characters and greater than 0
3439
+ # characters in length.
3440
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3441
+ # The FieldMask to use when updating the finding resource. This field should
3442
+ # not be specified when creating a finding.
3443
+ #
3444
+ # When updating a finding, an empty mask is treated as updating all mutable
3445
+ # fields and replacing source_properties. Individual source_properties can
3446
+ # be added/updated by using "source_properties.<property key>" in the field
3447
+ # mask.
3448
+ # @yield [result, operation] Access the result along with the TransportOperation object
3449
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Finding]
3450
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3451
+ #
3452
+ # @return [::Google::Cloud::SecurityCenter::V2::Finding]
3453
+ #
3454
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3455
+ #
3456
+ # @example Basic example
3457
+ # require "google/cloud/security_center/v2"
3458
+ #
3459
+ # # Create a client object. The client can be reused for multiple calls.
3460
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
3461
+ #
3462
+ # # Create a request. To set request fields, pass in keyword arguments.
3463
+ # request = Google::Cloud::SecurityCenter::V2::UpdateFindingRequest.new
3464
+ #
3465
+ # # Call the update_finding method.
3466
+ # result = client.update_finding request
3467
+ #
3468
+ # # The returned object is of type Google::Cloud::SecurityCenter::V2::Finding.
3469
+ # p result
3470
+ #
3471
+ def update_finding request, options = nil
3472
+ raise ::ArgumentError, "request must be provided" if request.nil?
3473
+
3474
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateFindingRequest
3475
+
3476
+ # Converts hash and nil to an options object
3477
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3478
+
3479
+ # Customize the options with defaults
3480
+ call_metadata = @config.rpcs.update_finding.metadata.to_h
3481
+
3482
+ # Set x-goog-api-client and x-goog-user-project headers
3483
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3484
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3485
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
3486
+ transports_version_send: [:rest]
3487
+
3488
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3489
+
3490
+ options.apply_defaults timeout: @config.rpcs.update_finding.timeout,
3491
+ metadata: call_metadata,
3492
+ retry_policy: @config.rpcs.update_finding.retry_policy
3493
+
3494
+ options.apply_defaults timeout: @config.timeout,
3495
+ metadata: @config.metadata,
3496
+ retry_policy: @config.retry_policy
3497
+
3498
+ @security_center_stub.update_finding request, options do |result, operation|
3499
+ yield result, operation if block_given?
3500
+ return result
3501
+ end
3502
+ rescue ::Gapic::Rest::Error => e
3503
+ raise ::Google::Cloud::Error.from_error(e)
3504
+ end
3505
+
3506
+ ##
3507
+ # Updates a mute config. If no location is specified, default is
3508
+ # global.
3509
+ #
3510
+ # @overload update_mute_config(request, options = nil)
3511
+ # Pass arguments to `update_mute_config` via a request object, either of type
3512
+ # {::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest} or an equivalent Hash.
3513
+ #
3514
+ # @param request [::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest, ::Hash]
3515
+ # A request object representing the call parameters. Required. To specify no
3516
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3517
+ # @param options [::Gapic::CallOptions, ::Hash]
3518
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3519
+ #
3520
+ # @overload update_mute_config(mute_config: nil, update_mask: nil)
3521
+ # Pass arguments to `update_mute_config` via keyword arguments. Note that at
3522
+ # least one keyword argument is required. To specify no parameters, or to keep all
3523
+ # the default parameter values, pass an empty Hash as a request object (see above).
3524
+ #
3525
+ # @param mute_config [::Google::Cloud::SecurityCenter::V2::MuteConfig, ::Hash]
3526
+ # Required. The mute config being updated.
3527
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3528
+ # The list of fields to be updated.
3529
+ # If empty all mutable fields will be updated.
3530
+ # @yield [result, operation] Access the result along with the TransportOperation object
3531
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V2::MuteConfig]
3532
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3533
+ #
3534
+ # @return [::Google::Cloud::SecurityCenter::V2::MuteConfig]
3535
+ #
3536
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3537
+ #
3538
+ # @example Basic example
3539
+ # require "google/cloud/security_center/v2"
3540
+ #
3541
+ # # Create a client object. The client can be reused for multiple calls.
3542
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
3543
+ #
3544
+ # # Create a request. To set request fields, pass in keyword arguments.
3545
+ # request = Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest.new
3546
+ #
3547
+ # # Call the update_mute_config method.
3548
+ # result = client.update_mute_config request
3549
+ #
3550
+ # # The returned object is of type Google::Cloud::SecurityCenter::V2::MuteConfig.
3551
+ # p result
3552
+ #
3553
+ def update_mute_config request, options = nil
3554
+ raise ::ArgumentError, "request must be provided" if request.nil?
3555
+
3556
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateMuteConfigRequest
3557
+
3558
+ # Converts hash and nil to an options object
3559
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3560
+
3561
+ # Customize the options with defaults
3562
+ call_metadata = @config.rpcs.update_mute_config.metadata.to_h
3563
+
3564
+ # Set x-goog-api-client and x-goog-user-project headers
3565
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3566
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3567
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
3568
+ transports_version_send: [:rest]
3569
+
3570
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3571
+
3572
+ options.apply_defaults timeout: @config.rpcs.update_mute_config.timeout,
3573
+ metadata: call_metadata,
3574
+ retry_policy: @config.rpcs.update_mute_config.retry_policy
3575
+
3576
+ options.apply_defaults timeout: @config.timeout,
3577
+ metadata: @config.metadata,
3578
+ retry_policy: @config.retry_policy
3579
+
3580
+ @security_center_stub.update_mute_config request, options do |result, operation|
3581
+ yield result, operation if block_given?
3582
+ return result
3583
+ end
3584
+ rescue ::Gapic::Rest::Error => e
3585
+ raise ::Google::Cloud::Error.from_error(e)
3586
+ end
3587
+
3588
+ ##
3589
+ # Updates a notification config. The following update
3590
+ # fields are allowed: description, pubsub_topic, streaming_config.filter
3591
+ #
3592
+ # @overload update_notification_config(request, options = nil)
3593
+ # Pass arguments to `update_notification_config` via a request object, either of type
3594
+ # {::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest} or an equivalent Hash.
3595
+ #
3596
+ # @param request [::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest, ::Hash]
3597
+ # A request object representing the call parameters. Required. To specify no
3598
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3599
+ # @param options [::Gapic::CallOptions, ::Hash]
3600
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3601
+ #
3602
+ # @overload update_notification_config(notification_config: nil, update_mask: nil)
3603
+ # Pass arguments to `update_notification_config` via keyword arguments. Note that at
3604
+ # least one keyword argument is required. To specify no parameters, or to keep all
3605
+ # the default parameter values, pass an empty Hash as a request object (see above).
3606
+ #
3607
+ # @param notification_config [::Google::Cloud::SecurityCenter::V2::NotificationConfig, ::Hash]
3608
+ # Required. The notification config to update.
3609
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3610
+ # The FieldMask to use when updating the notification config.
3611
+ #
3612
+ # If empty all mutable fields will be updated.
3613
+ # @yield [result, operation] Access the result along with the TransportOperation object
3614
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V2::NotificationConfig]
3615
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3616
+ #
3617
+ # @return [::Google::Cloud::SecurityCenter::V2::NotificationConfig]
3618
+ #
3619
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3620
+ #
3621
+ # @example Basic example
3622
+ # require "google/cloud/security_center/v2"
3623
+ #
3624
+ # # Create a client object. The client can be reused for multiple calls.
3625
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
3626
+ #
3627
+ # # Create a request. To set request fields, pass in keyword arguments.
3628
+ # request = Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest.new
3629
+ #
3630
+ # # Call the update_notification_config method.
3631
+ # result = client.update_notification_config request
3632
+ #
3633
+ # # The returned object is of type Google::Cloud::SecurityCenter::V2::NotificationConfig.
3634
+ # p result
3635
+ #
3636
+ def update_notification_config request, options = nil
3637
+ raise ::ArgumentError, "request must be provided" if request.nil?
3638
+
3639
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateNotificationConfigRequest
3640
+
3641
+ # Converts hash and nil to an options object
3642
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3643
+
3644
+ # Customize the options with defaults
3645
+ call_metadata = @config.rpcs.update_notification_config.metadata.to_h
3646
+
3647
+ # Set x-goog-api-client and x-goog-user-project headers
3648
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3649
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3650
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
3651
+ transports_version_send: [:rest]
3652
+
3653
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3654
+
3655
+ options.apply_defaults timeout: @config.rpcs.update_notification_config.timeout,
3656
+ metadata: call_metadata,
3657
+ retry_policy: @config.rpcs.update_notification_config.retry_policy
3658
+
3659
+ options.apply_defaults timeout: @config.timeout,
3660
+ metadata: @config.metadata,
3661
+ retry_policy: @config.retry_policy
3662
+
3663
+ @security_center_stub.update_notification_config request, options do |result, operation|
3664
+ yield result, operation if block_given?
3665
+ return result
3666
+ end
3667
+ rescue ::Gapic::Rest::Error => e
3668
+ raise ::Google::Cloud::Error.from_error(e)
3669
+ end
3670
+
3671
+ ##
3672
+ # Updates an existing ResourceValueConfigs with new rules.
3673
+ #
3674
+ # @overload update_resource_value_config(request, options = nil)
3675
+ # Pass arguments to `update_resource_value_config` via a request object, either of type
3676
+ # {::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest} or an equivalent Hash.
3677
+ #
3678
+ # @param request [::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest, ::Hash]
3679
+ # A request object representing the call parameters. Required. To specify no
3680
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3681
+ # @param options [::Gapic::CallOptions, ::Hash]
3682
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3683
+ #
3684
+ # @overload update_resource_value_config(resource_value_config: nil, update_mask: nil)
3685
+ # Pass arguments to `update_resource_value_config` via keyword arguments. Note that at
3686
+ # least one keyword argument is required. To specify no parameters, or to keep all
3687
+ # the default parameter values, pass an empty Hash as a request object (see above).
3688
+ #
3689
+ # @param resource_value_config [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig, ::Hash]
3690
+ # Required. The resource value config being updated.
3691
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3692
+ # The list of fields to be updated.
3693
+ # If empty all mutable fields will be updated.
3694
+ # @yield [result, operation] Access the result along with the TransportOperation object
3695
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig]
3696
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3697
+ #
3698
+ # @return [::Google::Cloud::SecurityCenter::V2::ResourceValueConfig]
3699
+ #
3700
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3701
+ #
3702
+ # @example Basic example
3703
+ # require "google/cloud/security_center/v2"
3704
+ #
3705
+ # # Create a client object. The client can be reused for multiple calls.
3706
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
3707
+ #
3708
+ # # Create a request. To set request fields, pass in keyword arguments.
3709
+ # request = Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest.new
3710
+ #
3711
+ # # Call the update_resource_value_config method.
3712
+ # result = client.update_resource_value_config request
3713
+ #
3714
+ # # The returned object is of type Google::Cloud::SecurityCenter::V2::ResourceValueConfig.
3715
+ # p result
3716
+ #
3717
+ def update_resource_value_config request, options = nil
3718
+ raise ::ArgumentError, "request must be provided" if request.nil?
3719
+
3720
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateResourceValueConfigRequest
3721
+
3722
+ # Converts hash and nil to an options object
3723
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3724
+
3725
+ # Customize the options with defaults
3726
+ call_metadata = @config.rpcs.update_resource_value_config.metadata.to_h
3727
+
3728
+ # Set x-goog-api-client and x-goog-user-project headers
3729
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3730
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3731
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
3732
+ transports_version_send: [:rest]
3733
+
3734
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3735
+
3736
+ options.apply_defaults timeout: @config.rpcs.update_resource_value_config.timeout,
3737
+ metadata: call_metadata,
3738
+ retry_policy: @config.rpcs.update_resource_value_config.retry_policy
3739
+
3740
+ options.apply_defaults timeout: @config.timeout,
3741
+ metadata: @config.metadata,
3742
+ retry_policy: @config.retry_policy
3743
+
3744
+ @security_center_stub.update_resource_value_config request, options do |result, operation|
3745
+ yield result, operation if block_given?
3746
+ return result
3747
+ end
3748
+ rescue ::Gapic::Rest::Error => e
3749
+ raise ::Google::Cloud::Error.from_error(e)
3750
+ end
3751
+
3752
+ ##
3753
+ # Updates security marks. For Finding Security marks, if no location is
3754
+ # specified, finding is assumed to be in global. Assets Security Marks can
3755
+ # only be accessed through global endpoint.
3756
+ #
3757
+ # @overload update_security_marks(request, options = nil)
3758
+ # Pass arguments to `update_security_marks` via a request object, either of type
3759
+ # {::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest} or an equivalent Hash.
3760
+ #
3761
+ # @param request [::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest, ::Hash]
3762
+ # A request object representing the call parameters. Required. To specify no
3763
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3764
+ # @param options [::Gapic::CallOptions, ::Hash]
3765
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3766
+ #
3767
+ # @overload update_security_marks(security_marks: nil, update_mask: nil)
3768
+ # Pass arguments to `update_security_marks` via keyword arguments. Note that at
3769
+ # least one keyword argument is required. To specify no parameters, or to keep all
3770
+ # the default parameter values, pass an empty Hash as a request object (see above).
3771
+ #
3772
+ # @param security_marks [::Google::Cloud::SecurityCenter::V2::SecurityMarks, ::Hash]
3773
+ # Required. The security marks resource to update.
3774
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3775
+ # The FieldMask to use when updating the security marks resource.
3776
+ #
3777
+ # The field mask must not contain duplicate fields.
3778
+ # If empty or set to "marks", all marks will be replaced. Individual
3779
+ # marks can be updated using "marks.<mark_key>".
3780
+ # @yield [result, operation] Access the result along with the TransportOperation object
3781
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V2::SecurityMarks]
3782
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3783
+ #
3784
+ # @return [::Google::Cloud::SecurityCenter::V2::SecurityMarks]
3785
+ #
3786
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3787
+ #
3788
+ # @example Basic example
3789
+ # require "google/cloud/security_center/v2"
3790
+ #
3791
+ # # Create a client object. The client can be reused for multiple calls.
3792
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
3793
+ #
3794
+ # # Create a request. To set request fields, pass in keyword arguments.
3795
+ # request = Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest.new
3796
+ #
3797
+ # # Call the update_security_marks method.
3798
+ # result = client.update_security_marks request
3799
+ #
3800
+ # # The returned object is of type Google::Cloud::SecurityCenter::V2::SecurityMarks.
3801
+ # p result
3802
+ #
3803
+ def update_security_marks request, options = nil
3804
+ raise ::ArgumentError, "request must be provided" if request.nil?
3805
+
3806
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateSecurityMarksRequest
3807
+
3808
+ # Converts hash and nil to an options object
3809
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3810
+
3811
+ # Customize the options with defaults
3812
+ call_metadata = @config.rpcs.update_security_marks.metadata.to_h
3813
+
3814
+ # Set x-goog-api-client and x-goog-user-project headers
3815
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3816
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3817
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
3818
+ transports_version_send: [:rest]
3819
+
3820
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3821
+
3822
+ options.apply_defaults timeout: @config.rpcs.update_security_marks.timeout,
3823
+ metadata: call_metadata,
3824
+ retry_policy: @config.rpcs.update_security_marks.retry_policy
3825
+
3826
+ options.apply_defaults timeout: @config.timeout,
3827
+ metadata: @config.metadata,
3828
+ retry_policy: @config.retry_policy
3829
+
3830
+ @security_center_stub.update_security_marks request, options do |result, operation|
3831
+ yield result, operation if block_given?
3832
+ return result
3833
+ end
3834
+ rescue ::Gapic::Rest::Error => e
3835
+ raise ::Google::Cloud::Error.from_error(e)
3836
+ end
3837
+
3838
+ ##
3839
+ # Updates a source.
3840
+ #
3841
+ # @overload update_source(request, options = nil)
3842
+ # Pass arguments to `update_source` via a request object, either of type
3843
+ # {::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest} or an equivalent Hash.
3844
+ #
3845
+ # @param request [::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest, ::Hash]
3846
+ # A request object representing the call parameters. Required. To specify no
3847
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
3848
+ # @param options [::Gapic::CallOptions, ::Hash]
3849
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
3850
+ #
3851
+ # @overload update_source(source: nil, update_mask: nil)
3852
+ # Pass arguments to `update_source` via keyword arguments. Note that at
3853
+ # least one keyword argument is required. To specify no parameters, or to keep all
3854
+ # the default parameter values, pass an empty Hash as a request object (see above).
3855
+ #
3856
+ # @param source [::Google::Cloud::SecurityCenter::V2::Source, ::Hash]
3857
+ # Required. The source resource to update.
3858
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
3859
+ # The FieldMask to use when updating the source resource.
3860
+ #
3861
+ # If empty all mutable fields will be updated.
3862
+ # @yield [result, operation] Access the result along with the TransportOperation object
3863
+ # @yieldparam result [::Google::Cloud::SecurityCenter::V2::Source]
3864
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
3865
+ #
3866
+ # @return [::Google::Cloud::SecurityCenter::V2::Source]
3867
+ #
3868
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
3869
+ #
3870
+ # @example Basic example
3871
+ # require "google/cloud/security_center/v2"
3872
+ #
3873
+ # # Create a client object. The client can be reused for multiple calls.
3874
+ # client = Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new
3875
+ #
3876
+ # # Create a request. To set request fields, pass in keyword arguments.
3877
+ # request = Google::Cloud::SecurityCenter::V2::UpdateSourceRequest.new
3878
+ #
3879
+ # # Call the update_source method.
3880
+ # result = client.update_source request
3881
+ #
3882
+ # # The returned object is of type Google::Cloud::SecurityCenter::V2::Source.
3883
+ # p result
3884
+ #
3885
+ def update_source request, options = nil
3886
+ raise ::ArgumentError, "request must be provided" if request.nil?
3887
+
3888
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::SecurityCenter::V2::UpdateSourceRequest
3889
+
3890
+ # Converts hash and nil to an options object
3891
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
3892
+
3893
+ # Customize the options with defaults
3894
+ call_metadata = @config.rpcs.update_source.metadata.to_h
3895
+
3896
+ # Set x-goog-api-client and x-goog-user-project headers
3897
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
3898
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
3899
+ gapic_version: ::Google::Cloud::SecurityCenter::V2::VERSION,
3900
+ transports_version_send: [:rest]
3901
+
3902
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
3903
+
3904
+ options.apply_defaults timeout: @config.rpcs.update_source.timeout,
3905
+ metadata: call_metadata,
3906
+ retry_policy: @config.rpcs.update_source.retry_policy
3907
+
3908
+ options.apply_defaults timeout: @config.timeout,
3909
+ metadata: @config.metadata,
3910
+ retry_policy: @config.retry_policy
3911
+
3912
+ @security_center_stub.update_source request, options do |result, operation|
3913
+ yield result, operation if block_given?
3914
+ return result
3915
+ end
3916
+ rescue ::Gapic::Rest::Error => e
3917
+ raise ::Google::Cloud::Error.from_error(e)
3918
+ end
3919
+
3920
+ ##
3921
+ # Configuration class for the SecurityCenter REST API.
3922
+ #
3923
+ # This class represents the configuration for SecurityCenter REST,
3924
+ # providing control over timeouts, retry behavior, logging, transport
3925
+ # parameters, and other low-level controls. Certain parameters can also be
3926
+ # applied individually to specific RPCs. See
3927
+ # {::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client::Configuration::Rpcs}
3928
+ # for a list of RPCs that can be configured independently.
3929
+ #
3930
+ # Configuration can be applied globally to all clients, or to a single client
3931
+ # on construction.
3932
+ #
3933
+ # @example
3934
+ #
3935
+ # # Modify the global config, setting the timeout for
3936
+ # # batch_create_resource_value_configs to 20 seconds,
3937
+ # # and all remaining timeouts to 10 seconds.
3938
+ # ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.configure do |config|
3939
+ # config.timeout = 10.0
3940
+ # config.rpcs.batch_create_resource_value_configs.timeout = 20.0
3941
+ # end
3942
+ #
3943
+ # # Apply the above configuration only to a new client.
3944
+ # client = ::Google::Cloud::SecurityCenter::V2::SecurityCenter::Rest::Client.new do |config|
3945
+ # config.timeout = 10.0
3946
+ # config.rpcs.batch_create_resource_value_configs.timeout = 20.0
3947
+ # end
3948
+ #
3949
+ # @!attribute [rw] endpoint
3950
+ # A custom service endpoint, as a hostname or hostname:port. The default is
3951
+ # nil, indicating to use the default endpoint in the current universe domain.
3952
+ # @return [::String,nil]
3953
+ # @!attribute [rw] credentials
3954
+ # Credentials to send with calls. You may provide any of the following types:
3955
+ # * (`String`) The path to a service account key file in JSON format
3956
+ # * (`Hash`) A service account key as a Hash
3957
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
3958
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
3959
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
3960
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
3961
+ # * (`nil`) indicating no credentials
3962
+ # @return [::Object]
3963
+ # @!attribute [rw] scope
3964
+ # The OAuth scopes
3965
+ # @return [::Array<::String>]
3966
+ # @!attribute [rw] lib_name
3967
+ # The library name as recorded in instrumentation and logging
3968
+ # @return [::String]
3969
+ # @!attribute [rw] lib_version
3970
+ # The library version as recorded in instrumentation and logging
3971
+ # @return [::String]
3972
+ # @!attribute [rw] timeout
3973
+ # The call timeout in seconds.
3974
+ # @return [::Numeric]
3975
+ # @!attribute [rw] metadata
3976
+ # Additional headers to be sent with the call.
3977
+ # @return [::Hash{::Symbol=>::String}]
3978
+ # @!attribute [rw] retry_policy
3979
+ # The retry policy. The value is a hash with the following keys:
3980
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
3981
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
3982
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
3983
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
3984
+ # trigger a retry.
3985
+ # @return [::Hash]
3986
+ # @!attribute [rw] quota_project
3987
+ # A separate project against which to charge quota.
3988
+ # @return [::String]
3989
+ # @!attribute [rw] universe_domain
3990
+ # The universe domain within which to make requests. This determines the
3991
+ # default endpoint URL. The default value of nil uses the environment
3992
+ # universe (usually the default "googleapis.com" universe).
3993
+ # @return [::String,nil]
3994
+ #
3995
+ class Configuration
3996
+ extend ::Gapic::Config
3997
+
3998
+ # @private
3999
+ # The endpoint specific to the default "googleapis.com" universe. Deprecated.
4000
+ DEFAULT_ENDPOINT = "securitycenter.googleapis.com"
4001
+
4002
+ config_attr :endpoint, nil, ::String, nil
4003
+ config_attr :credentials, nil do |value|
4004
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
4005
+ allowed.any? { |klass| klass === value }
4006
+ end
4007
+ config_attr :scope, nil, ::String, ::Array, nil
4008
+ config_attr :lib_name, nil, ::String, nil
4009
+ config_attr :lib_version, nil, ::String, nil
4010
+ config_attr :timeout, nil, ::Numeric, nil
4011
+ config_attr :metadata, nil, ::Hash, nil
4012
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
4013
+ config_attr :quota_project, nil, ::String, nil
4014
+ config_attr :universe_domain, nil, ::String, nil
4015
+
4016
+ # @private
4017
+ def initialize parent_config = nil
4018
+ @parent_config = parent_config unless parent_config.nil?
4019
+
4020
+ yield self if block_given?
4021
+ end
4022
+
4023
+ ##
4024
+ # Configurations for individual RPCs
4025
+ # @return [Rpcs]
4026
+ #
4027
+ def rpcs
4028
+ @rpcs ||= begin
4029
+ parent_rpcs = nil
4030
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
4031
+ Rpcs.new parent_rpcs
4032
+ end
4033
+ end
4034
+
4035
+ ##
4036
+ # Configuration RPC class for the SecurityCenter API.
4037
+ #
4038
+ # Includes fields providing the configuration for each RPC in this service.
4039
+ # Each configuration object is of type `Gapic::Config::Method` and includes
4040
+ # the following configuration fields:
4041
+ #
4042
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
4043
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
4044
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
4045
+ # include the following keys:
4046
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
4047
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
4048
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
4049
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
4050
+ # trigger a retry.
4051
+ #
4052
+ class Rpcs
4053
+ ##
4054
+ # RPC-specific configuration for `batch_create_resource_value_configs`
4055
+ # @return [::Gapic::Config::Method]
4056
+ #
4057
+ attr_reader :batch_create_resource_value_configs
4058
+ ##
4059
+ # RPC-specific configuration for `bulk_mute_findings`
4060
+ # @return [::Gapic::Config::Method]
4061
+ #
4062
+ attr_reader :bulk_mute_findings
4063
+ ##
4064
+ # RPC-specific configuration for `create_big_query_export`
4065
+ # @return [::Gapic::Config::Method]
4066
+ #
4067
+ attr_reader :create_big_query_export
4068
+ ##
4069
+ # RPC-specific configuration for `create_finding`
4070
+ # @return [::Gapic::Config::Method]
4071
+ #
4072
+ attr_reader :create_finding
4073
+ ##
4074
+ # RPC-specific configuration for `create_mute_config`
4075
+ # @return [::Gapic::Config::Method]
4076
+ #
4077
+ attr_reader :create_mute_config
4078
+ ##
4079
+ # RPC-specific configuration for `create_notification_config`
4080
+ # @return [::Gapic::Config::Method]
4081
+ #
4082
+ attr_reader :create_notification_config
4083
+ ##
4084
+ # RPC-specific configuration for `create_source`
4085
+ # @return [::Gapic::Config::Method]
4086
+ #
4087
+ attr_reader :create_source
4088
+ ##
4089
+ # RPC-specific configuration for `delete_big_query_export`
4090
+ # @return [::Gapic::Config::Method]
4091
+ #
4092
+ attr_reader :delete_big_query_export
4093
+ ##
4094
+ # RPC-specific configuration for `delete_mute_config`
4095
+ # @return [::Gapic::Config::Method]
4096
+ #
4097
+ attr_reader :delete_mute_config
4098
+ ##
4099
+ # RPC-specific configuration for `delete_notification_config`
4100
+ # @return [::Gapic::Config::Method]
4101
+ #
4102
+ attr_reader :delete_notification_config
4103
+ ##
4104
+ # RPC-specific configuration for `delete_resource_value_config`
4105
+ # @return [::Gapic::Config::Method]
4106
+ #
4107
+ attr_reader :delete_resource_value_config
4108
+ ##
4109
+ # RPC-specific configuration for `get_big_query_export`
4110
+ # @return [::Gapic::Config::Method]
4111
+ #
4112
+ attr_reader :get_big_query_export
4113
+ ##
4114
+ # RPC-specific configuration for `get_simulation`
4115
+ # @return [::Gapic::Config::Method]
4116
+ #
4117
+ attr_reader :get_simulation
4118
+ ##
4119
+ # RPC-specific configuration for `get_valued_resource`
4120
+ # @return [::Gapic::Config::Method]
4121
+ #
4122
+ attr_reader :get_valued_resource
4123
+ ##
4124
+ # RPC-specific configuration for `get_iam_policy`
4125
+ # @return [::Gapic::Config::Method]
4126
+ #
4127
+ attr_reader :get_iam_policy
4128
+ ##
4129
+ # RPC-specific configuration for `get_mute_config`
4130
+ # @return [::Gapic::Config::Method]
4131
+ #
4132
+ attr_reader :get_mute_config
4133
+ ##
4134
+ # RPC-specific configuration for `get_notification_config`
4135
+ # @return [::Gapic::Config::Method]
4136
+ #
4137
+ attr_reader :get_notification_config
4138
+ ##
4139
+ # RPC-specific configuration for `get_resource_value_config`
4140
+ # @return [::Gapic::Config::Method]
4141
+ #
4142
+ attr_reader :get_resource_value_config
4143
+ ##
4144
+ # RPC-specific configuration for `get_source`
4145
+ # @return [::Gapic::Config::Method]
4146
+ #
4147
+ attr_reader :get_source
4148
+ ##
4149
+ # RPC-specific configuration for `group_findings`
4150
+ # @return [::Gapic::Config::Method]
4151
+ #
4152
+ attr_reader :group_findings
4153
+ ##
4154
+ # RPC-specific configuration for `list_attack_paths`
4155
+ # @return [::Gapic::Config::Method]
4156
+ #
4157
+ attr_reader :list_attack_paths
4158
+ ##
4159
+ # RPC-specific configuration for `list_big_query_exports`
4160
+ # @return [::Gapic::Config::Method]
4161
+ #
4162
+ attr_reader :list_big_query_exports
4163
+ ##
4164
+ # RPC-specific configuration for `list_findings`
4165
+ # @return [::Gapic::Config::Method]
4166
+ #
4167
+ attr_reader :list_findings
4168
+ ##
4169
+ # RPC-specific configuration for `list_mute_configs`
4170
+ # @return [::Gapic::Config::Method]
4171
+ #
4172
+ attr_reader :list_mute_configs
4173
+ ##
4174
+ # RPC-specific configuration for `list_notification_configs`
4175
+ # @return [::Gapic::Config::Method]
4176
+ #
4177
+ attr_reader :list_notification_configs
4178
+ ##
4179
+ # RPC-specific configuration for `list_resource_value_configs`
4180
+ # @return [::Gapic::Config::Method]
4181
+ #
4182
+ attr_reader :list_resource_value_configs
4183
+ ##
4184
+ # RPC-specific configuration for `list_sources`
4185
+ # @return [::Gapic::Config::Method]
4186
+ #
4187
+ attr_reader :list_sources
4188
+ ##
4189
+ # RPC-specific configuration for `list_valued_resources`
4190
+ # @return [::Gapic::Config::Method]
4191
+ #
4192
+ attr_reader :list_valued_resources
4193
+ ##
4194
+ # RPC-specific configuration for `set_finding_state`
4195
+ # @return [::Gapic::Config::Method]
4196
+ #
4197
+ attr_reader :set_finding_state
4198
+ ##
4199
+ # RPC-specific configuration for `set_iam_policy`
4200
+ # @return [::Gapic::Config::Method]
4201
+ #
4202
+ attr_reader :set_iam_policy
4203
+ ##
4204
+ # RPC-specific configuration for `set_mute`
4205
+ # @return [::Gapic::Config::Method]
4206
+ #
4207
+ attr_reader :set_mute
4208
+ ##
4209
+ # RPC-specific configuration for `test_iam_permissions`
4210
+ # @return [::Gapic::Config::Method]
4211
+ #
4212
+ attr_reader :test_iam_permissions
4213
+ ##
4214
+ # RPC-specific configuration for `update_big_query_export`
4215
+ # @return [::Gapic::Config::Method]
4216
+ #
4217
+ attr_reader :update_big_query_export
4218
+ ##
4219
+ # RPC-specific configuration for `update_external_system`
4220
+ # @return [::Gapic::Config::Method]
4221
+ #
4222
+ attr_reader :update_external_system
4223
+ ##
4224
+ # RPC-specific configuration for `update_finding`
4225
+ # @return [::Gapic::Config::Method]
4226
+ #
4227
+ attr_reader :update_finding
4228
+ ##
4229
+ # RPC-specific configuration for `update_mute_config`
4230
+ # @return [::Gapic::Config::Method]
4231
+ #
4232
+ attr_reader :update_mute_config
4233
+ ##
4234
+ # RPC-specific configuration for `update_notification_config`
4235
+ # @return [::Gapic::Config::Method]
4236
+ #
4237
+ attr_reader :update_notification_config
4238
+ ##
4239
+ # RPC-specific configuration for `update_resource_value_config`
4240
+ # @return [::Gapic::Config::Method]
4241
+ #
4242
+ attr_reader :update_resource_value_config
4243
+ ##
4244
+ # RPC-specific configuration for `update_security_marks`
4245
+ # @return [::Gapic::Config::Method]
4246
+ #
4247
+ attr_reader :update_security_marks
4248
+ ##
4249
+ # RPC-specific configuration for `update_source`
4250
+ # @return [::Gapic::Config::Method]
4251
+ #
4252
+ attr_reader :update_source
4253
+
4254
+ # @private
4255
+ def initialize parent_rpcs = nil
4256
+ batch_create_resource_value_configs_config = parent_rpcs.batch_create_resource_value_configs if parent_rpcs.respond_to? :batch_create_resource_value_configs
4257
+ @batch_create_resource_value_configs = ::Gapic::Config::Method.new batch_create_resource_value_configs_config
4258
+ bulk_mute_findings_config = parent_rpcs.bulk_mute_findings if parent_rpcs.respond_to? :bulk_mute_findings
4259
+ @bulk_mute_findings = ::Gapic::Config::Method.new bulk_mute_findings_config
4260
+ create_big_query_export_config = parent_rpcs.create_big_query_export if parent_rpcs.respond_to? :create_big_query_export
4261
+ @create_big_query_export = ::Gapic::Config::Method.new create_big_query_export_config
4262
+ create_finding_config = parent_rpcs.create_finding if parent_rpcs.respond_to? :create_finding
4263
+ @create_finding = ::Gapic::Config::Method.new create_finding_config
4264
+ create_mute_config_config = parent_rpcs.create_mute_config if parent_rpcs.respond_to? :create_mute_config
4265
+ @create_mute_config = ::Gapic::Config::Method.new create_mute_config_config
4266
+ create_notification_config_config = parent_rpcs.create_notification_config if parent_rpcs.respond_to? :create_notification_config
4267
+ @create_notification_config = ::Gapic::Config::Method.new create_notification_config_config
4268
+ create_source_config = parent_rpcs.create_source if parent_rpcs.respond_to? :create_source
4269
+ @create_source = ::Gapic::Config::Method.new create_source_config
4270
+ delete_big_query_export_config = parent_rpcs.delete_big_query_export if parent_rpcs.respond_to? :delete_big_query_export
4271
+ @delete_big_query_export = ::Gapic::Config::Method.new delete_big_query_export_config
4272
+ delete_mute_config_config = parent_rpcs.delete_mute_config if parent_rpcs.respond_to? :delete_mute_config
4273
+ @delete_mute_config = ::Gapic::Config::Method.new delete_mute_config_config
4274
+ delete_notification_config_config = parent_rpcs.delete_notification_config if parent_rpcs.respond_to? :delete_notification_config
4275
+ @delete_notification_config = ::Gapic::Config::Method.new delete_notification_config_config
4276
+ delete_resource_value_config_config = parent_rpcs.delete_resource_value_config if parent_rpcs.respond_to? :delete_resource_value_config
4277
+ @delete_resource_value_config = ::Gapic::Config::Method.new delete_resource_value_config_config
4278
+ get_big_query_export_config = parent_rpcs.get_big_query_export if parent_rpcs.respond_to? :get_big_query_export
4279
+ @get_big_query_export = ::Gapic::Config::Method.new get_big_query_export_config
4280
+ get_simulation_config = parent_rpcs.get_simulation if parent_rpcs.respond_to? :get_simulation
4281
+ @get_simulation = ::Gapic::Config::Method.new get_simulation_config
4282
+ get_valued_resource_config = parent_rpcs.get_valued_resource if parent_rpcs.respond_to? :get_valued_resource
4283
+ @get_valued_resource = ::Gapic::Config::Method.new get_valued_resource_config
4284
+ get_iam_policy_config = parent_rpcs.get_iam_policy if parent_rpcs.respond_to? :get_iam_policy
4285
+ @get_iam_policy = ::Gapic::Config::Method.new get_iam_policy_config
4286
+ get_mute_config_config = parent_rpcs.get_mute_config if parent_rpcs.respond_to? :get_mute_config
4287
+ @get_mute_config = ::Gapic::Config::Method.new get_mute_config_config
4288
+ get_notification_config_config = parent_rpcs.get_notification_config if parent_rpcs.respond_to? :get_notification_config
4289
+ @get_notification_config = ::Gapic::Config::Method.new get_notification_config_config
4290
+ get_resource_value_config_config = parent_rpcs.get_resource_value_config if parent_rpcs.respond_to? :get_resource_value_config
4291
+ @get_resource_value_config = ::Gapic::Config::Method.new get_resource_value_config_config
4292
+ get_source_config = parent_rpcs.get_source if parent_rpcs.respond_to? :get_source
4293
+ @get_source = ::Gapic::Config::Method.new get_source_config
4294
+ group_findings_config = parent_rpcs.group_findings if parent_rpcs.respond_to? :group_findings
4295
+ @group_findings = ::Gapic::Config::Method.new group_findings_config
4296
+ list_attack_paths_config = parent_rpcs.list_attack_paths if parent_rpcs.respond_to? :list_attack_paths
4297
+ @list_attack_paths = ::Gapic::Config::Method.new list_attack_paths_config
4298
+ list_big_query_exports_config = parent_rpcs.list_big_query_exports if parent_rpcs.respond_to? :list_big_query_exports
4299
+ @list_big_query_exports = ::Gapic::Config::Method.new list_big_query_exports_config
4300
+ list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings
4301
+ @list_findings = ::Gapic::Config::Method.new list_findings_config
4302
+ list_mute_configs_config = parent_rpcs.list_mute_configs if parent_rpcs.respond_to? :list_mute_configs
4303
+ @list_mute_configs = ::Gapic::Config::Method.new list_mute_configs_config
4304
+ list_notification_configs_config = parent_rpcs.list_notification_configs if parent_rpcs.respond_to? :list_notification_configs
4305
+ @list_notification_configs = ::Gapic::Config::Method.new list_notification_configs_config
4306
+ list_resource_value_configs_config = parent_rpcs.list_resource_value_configs if parent_rpcs.respond_to? :list_resource_value_configs
4307
+ @list_resource_value_configs = ::Gapic::Config::Method.new list_resource_value_configs_config
4308
+ list_sources_config = parent_rpcs.list_sources if parent_rpcs.respond_to? :list_sources
4309
+ @list_sources = ::Gapic::Config::Method.new list_sources_config
4310
+ list_valued_resources_config = parent_rpcs.list_valued_resources if parent_rpcs.respond_to? :list_valued_resources
4311
+ @list_valued_resources = ::Gapic::Config::Method.new list_valued_resources_config
4312
+ set_finding_state_config = parent_rpcs.set_finding_state if parent_rpcs.respond_to? :set_finding_state
4313
+ @set_finding_state = ::Gapic::Config::Method.new set_finding_state_config
4314
+ set_iam_policy_config = parent_rpcs.set_iam_policy if parent_rpcs.respond_to? :set_iam_policy
4315
+ @set_iam_policy = ::Gapic::Config::Method.new set_iam_policy_config
4316
+ set_mute_config = parent_rpcs.set_mute if parent_rpcs.respond_to? :set_mute
4317
+ @set_mute = ::Gapic::Config::Method.new set_mute_config
4318
+ test_iam_permissions_config = parent_rpcs.test_iam_permissions if parent_rpcs.respond_to? :test_iam_permissions
4319
+ @test_iam_permissions = ::Gapic::Config::Method.new test_iam_permissions_config
4320
+ update_big_query_export_config = parent_rpcs.update_big_query_export if parent_rpcs.respond_to? :update_big_query_export
4321
+ @update_big_query_export = ::Gapic::Config::Method.new update_big_query_export_config
4322
+ update_external_system_config = parent_rpcs.update_external_system if parent_rpcs.respond_to? :update_external_system
4323
+ @update_external_system = ::Gapic::Config::Method.new update_external_system_config
4324
+ update_finding_config = parent_rpcs.update_finding if parent_rpcs.respond_to? :update_finding
4325
+ @update_finding = ::Gapic::Config::Method.new update_finding_config
4326
+ update_mute_config_config = parent_rpcs.update_mute_config if parent_rpcs.respond_to? :update_mute_config
4327
+ @update_mute_config = ::Gapic::Config::Method.new update_mute_config_config
4328
+ update_notification_config_config = parent_rpcs.update_notification_config if parent_rpcs.respond_to? :update_notification_config
4329
+ @update_notification_config = ::Gapic::Config::Method.new update_notification_config_config
4330
+ update_resource_value_config_config = parent_rpcs.update_resource_value_config if parent_rpcs.respond_to? :update_resource_value_config
4331
+ @update_resource_value_config = ::Gapic::Config::Method.new update_resource_value_config_config
4332
+ update_security_marks_config = parent_rpcs.update_security_marks if parent_rpcs.respond_to? :update_security_marks
4333
+ @update_security_marks = ::Gapic::Config::Method.new update_security_marks_config
4334
+ update_source_config = parent_rpcs.update_source if parent_rpcs.respond_to? :update_source
4335
+ @update_source = ::Gapic::Config::Method.new update_source_config
4336
+
4337
+ yield self if block_given?
4338
+ end
4339
+ end
4340
+ end
4341
+ end
4342
+ end
4343
+ end
4344
+ end
4345
+ end
4346
+ end
4347
+ end