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

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