google-cloud-security_center-v1 0.8.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (23) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/security_center/v1/security_center/client.rb +602 -128
  3. data/lib/google/cloud/security_center/v1/security_center/operations.rb +145 -33
  4. data/lib/google/cloud/security_center/v1/version.rb +1 -1
  5. data/lib/google/cloud/securitycenter/v1/asset_pb.rb +2 -2
  6. data/lib/google/cloud/securitycenter/v1/finding_pb.rb +4 -2
  7. data/lib/google/cloud/securitycenter/v1/folder_pb.rb +1 -1
  8. data/lib/google/cloud/securitycenter/v1/indicator_pb.rb +1 -1
  9. data/lib/google/cloud/securitycenter/v1/notification_config_pb.rb +2 -2
  10. data/lib/google/cloud/securitycenter/v1/notification_message_pb.rb +2 -2
  11. data/lib/google/cloud/securitycenter/v1/organization_settings_pb.rb +2 -2
  12. data/lib/google/cloud/securitycenter/v1/resource_pb.rb +4 -2
  13. data/lib/google/cloud/securitycenter/v1/run_asset_discovery_response_pb.rb +2 -2
  14. data/lib/google/cloud/securitycenter/v1/security_marks_pb.rb +2 -2
  15. data/lib/google/cloud/securitycenter/v1/securitycenter_service_pb.rb +4 -2
  16. data/lib/google/cloud/securitycenter/v1/securitycenter_service_services_pb.rb +1 -1
  17. data/lib/google/cloud/securitycenter/v1/source_pb.rb +2 -2
  18. data/lib/google/cloud/securitycenter/v1/vulnerability_pb.rb +86 -0
  19. data/proto_docs/google/cloud/securitycenter/v1/finding.rb +5 -0
  20. data/proto_docs/google/cloud/securitycenter/v1/resource.rb +6 -0
  21. data/proto_docs/google/cloud/securitycenter/v1/securitycenter_service.rb +7 -0
  22. data/proto_docs/google/cloud/securitycenter/v1/vulnerability.rb +226 -0
  23. metadata +6 -4
@@ -143,6 +143,27 @@ module Google
143
143
  #
144
144
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
145
145
  #
146
+ # @example Basic example
147
+ # require "google/longrunning"
148
+ #
149
+ # # Create a client object. The client can be reused for multiple calls.
150
+ # client = Google::Longrunning::Operations::Client.new
151
+ #
152
+ # # Create a request. To set request fields, pass in keyword arguments.
153
+ # request = Google::Longrunning::ListOperationsRequest.new
154
+ #
155
+ # # Call the list_operations method.
156
+ # result = client.list_operations request
157
+ #
158
+ # # The returned object is of type Gapic::PagedEnumerable. You can
159
+ # # iterate over all elements by calling #each, and the enumerable
160
+ # # will lazily make API calls to fetch subsequent pages. Other
161
+ # # methods are also available for managing paging directly.
162
+ # result.each do |response|
163
+ # # Each element is of type ::Google::Longrunning::Operation.
164
+ # p response
165
+ # end
166
+ #
146
167
  def list_operations request, options = nil
147
168
  raise ::ArgumentError, "request must be provided" if request.nil?
148
169
 
@@ -160,16 +181,20 @@ module Google
160
181
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
161
182
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
162
183
 
163
- header_params = {
164
- "name" => request.name
165
- }
184
+ header_params = {}
185
+ if request.name
186
+ header_params["name"] = request.name
187
+ end
188
+
166
189
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
167
190
  metadata[:"x-goog-request-params"] ||= request_params_header
168
191
 
169
192
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
170
193
  metadata: metadata,
171
194
  retry_policy: @config.rpcs.list_operations.retry_policy
172
- options.apply_defaults metadata: @config.metadata,
195
+
196
+ options.apply_defaults timeout: @config.timeout,
197
+ metadata: @config.metadata,
173
198
  retry_policy: @config.retry_policy
174
199
 
175
200
  @operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
@@ -213,6 +238,28 @@ module Google
213
238
  #
214
239
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
215
240
  #
241
+ # @example Basic example
242
+ # require "google/longrunning"
243
+ #
244
+ # # Create a client object. The client can be reused for multiple calls.
245
+ # client = Google::Longrunning::Operations::Client.new
246
+ #
247
+ # # Create a request. To set request fields, pass in keyword arguments.
248
+ # request = Google::Longrunning::GetOperationRequest.new
249
+ #
250
+ # # Call the get_operation method.
251
+ # result = client.get_operation request
252
+ #
253
+ # # The returned object is of type Gapic::Operation. You can use this
254
+ # # object to check the status of an operation, cancel it, or wait
255
+ # # for results. Here is how to block until completion:
256
+ # result.wait_until_done! timeout: 60
257
+ # if result.response?
258
+ # p result.response
259
+ # else
260
+ # puts "Error!"
261
+ # end
262
+ #
216
263
  def get_operation request, options = nil
217
264
  raise ::ArgumentError, "request must be provided" if request.nil?
218
265
 
@@ -230,16 +277,20 @@ module Google
230
277
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
231
278
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
232
279
 
233
- header_params = {
234
- "name" => request.name
235
- }
280
+ header_params = {}
281
+ if request.name
282
+ header_params["name"] = request.name
283
+ end
284
+
236
285
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
237
286
  metadata[:"x-goog-request-params"] ||= request_params_header
238
287
 
239
288
  options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
240
289
  metadata: metadata,
241
290
  retry_policy: @config.rpcs.get_operation.retry_policy
242
- options.apply_defaults metadata: @config.metadata,
291
+
292
+ options.apply_defaults timeout: @config.timeout,
293
+ metadata: @config.metadata,
243
294
  retry_policy: @config.retry_policy
244
295
 
245
296
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
@@ -283,6 +334,21 @@ module Google
283
334
  #
284
335
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
285
336
  #
337
+ # @example Basic example
338
+ # require "google/longrunning"
339
+ #
340
+ # # Create a client object. The client can be reused for multiple calls.
341
+ # client = Google::Longrunning::Operations::Client.new
342
+ #
343
+ # # Create a request. To set request fields, pass in keyword arguments.
344
+ # request = Google::Longrunning::DeleteOperationRequest.new
345
+ #
346
+ # # Call the delete_operation method.
347
+ # result = client.delete_operation request
348
+ #
349
+ # # The returned object is of type Google::Protobuf::Empty.
350
+ # p result
351
+ #
286
352
  def delete_operation request, options = nil
287
353
  raise ::ArgumentError, "request must be provided" if request.nil?
288
354
 
@@ -300,16 +366,20 @@ module Google
300
366
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
301
367
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
302
368
 
303
- header_params = {
304
- "name" => request.name
305
- }
369
+ header_params = {}
370
+ if request.name
371
+ header_params["name"] = request.name
372
+ end
373
+
306
374
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
307
375
  metadata[:"x-goog-request-params"] ||= request_params_header
308
376
 
309
377
  options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
310
378
  metadata: metadata,
311
379
  retry_policy: @config.rpcs.delete_operation.retry_policy
312
- options.apply_defaults metadata: @config.metadata,
380
+
381
+ options.apply_defaults timeout: @config.timeout,
382
+ metadata: @config.metadata,
313
383
  retry_policy: @config.retry_policy
314
384
 
315
385
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
@@ -358,6 +428,21 @@ module Google
358
428
  #
359
429
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
360
430
  #
431
+ # @example Basic example
432
+ # require "google/longrunning"
433
+ #
434
+ # # Create a client object. The client can be reused for multiple calls.
435
+ # client = Google::Longrunning::Operations::Client.new
436
+ #
437
+ # # Create a request. To set request fields, pass in keyword arguments.
438
+ # request = Google::Longrunning::CancelOperationRequest.new
439
+ #
440
+ # # Call the cancel_operation method.
441
+ # result = client.cancel_operation request
442
+ #
443
+ # # The returned object is of type Google::Protobuf::Empty.
444
+ # p result
445
+ #
361
446
  def cancel_operation request, options = nil
362
447
  raise ::ArgumentError, "request must be provided" if request.nil?
363
448
 
@@ -375,16 +460,20 @@ module Google
375
460
  gapic_version: ::Google::Cloud::SecurityCenter::V1::VERSION
376
461
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
377
462
 
378
- header_params = {
379
- "name" => request.name
380
- }
463
+ header_params = {}
464
+ if request.name
465
+ header_params["name"] = request.name
466
+ end
467
+
381
468
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
382
469
  metadata[:"x-goog-request-params"] ||= request_params_header
383
470
 
384
471
  options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
385
472
  metadata: metadata,
386
473
  retry_policy: @config.rpcs.cancel_operation.retry_policy
387
- options.apply_defaults metadata: @config.metadata,
474
+
475
+ options.apply_defaults timeout: @config.timeout,
476
+ metadata: @config.metadata,
388
477
  retry_policy: @config.retry_policy
389
478
 
390
479
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
@@ -436,6 +525,28 @@ module Google
436
525
  #
437
526
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
438
527
  #
528
+ # @example Basic example
529
+ # require "google/longrunning"
530
+ #
531
+ # # Create a client object. The client can be reused for multiple calls.
532
+ # client = Google::Longrunning::Operations::Client.new
533
+ #
534
+ # # Create a request. To set request fields, pass in keyword arguments.
535
+ # request = Google::Longrunning::WaitOperationRequest.new
536
+ #
537
+ # # Call the wait_operation method.
538
+ # result = client.wait_operation request
539
+ #
540
+ # # The returned object is of type Gapic::Operation. You can use this
541
+ # # object to check the status of an operation, cancel it, or wait
542
+ # # for results. Here is how to block until completion:
543
+ # result.wait_until_done! timeout: 60
544
+ # if result.response?
545
+ # p result.response
546
+ # else
547
+ # puts "Error!"
548
+ # end
549
+ #
439
550
  def wait_operation request, options = nil
440
551
  raise ::ArgumentError, "request must be provided" if request.nil?
441
552
 
@@ -456,7 +567,9 @@ module Google
456
567
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
457
568
  metadata: metadata,
458
569
  retry_policy: @config.rpcs.wait_operation.retry_policy
459
- options.apply_defaults metadata: @config.metadata,
570
+
571
+ options.apply_defaults timeout: @config.timeout,
572
+ metadata: @config.metadata,
460
573
  retry_policy: @config.retry_policy
461
574
 
462
575
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
@@ -481,22 +594,21 @@ module Google
481
594
  # Configuration can be applied globally to all clients, or to a single client
482
595
  # on construction.
483
596
  #
484
- # # Examples
485
- #
486
- # To modify the global config, setting the timeout for list_operations
487
- # to 20 seconds, and all remaining timeouts to 10 seconds:
488
- #
489
- # ::Google::Longrunning::Operations::Client.configure do |config|
490
- # config.timeout = 10.0
491
- # config.rpcs.list_operations.timeout = 20.0
492
- # end
493
- #
494
- # To apply the above configuration only to a new client:
495
- #
496
- # client = ::Google::Longrunning::Operations::Client.new do |config|
497
- # config.timeout = 10.0
498
- # config.rpcs.list_operations.timeout = 20.0
499
- # end
597
+ # @example
598
+ #
599
+ # # Modify the global config, setting the timeout for
600
+ # # list_operations to 20 seconds,
601
+ # # and all remaining timeouts to 10 seconds.
602
+ # ::Google::Longrunning::Operations::Client.configure do |config|
603
+ # config.timeout = 10.0
604
+ # config.rpcs.list_operations.timeout = 20.0
605
+ # end
606
+ #
607
+ # # Apply the above configuration only to a new client.
608
+ # client = ::Google::Longrunning::Operations::Client.new do |config|
609
+ # config.timeout = 10.0
610
+ # config.rpcs.list_operations.timeout = 20.0
611
+ # end
500
612
  #
501
613
  # @!attribute [rw] endpoint
502
614
  # The hostname or hostname:port of the service endpoint.
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module SecurityCenter
23
23
  module V1
24
- VERSION = "0.8.0"
24
+ VERSION = "0.10.0"
25
25
  end
26
26
  end
27
27
  end
@@ -1,14 +1,14 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/securitycenter/v1/asset.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/resource_pb'
7
5
  require 'google/cloud/securitycenter/v1/folder_pb'
8
6
  require 'google/cloud/securitycenter/v1/security_marks_pb'
9
7
  require 'google/protobuf/struct_pb'
10
8
  require 'google/protobuf/timestamp_pb'
11
9
  require 'google/api/annotations_pb'
10
+ require 'google/protobuf'
11
+
12
12
  Google::Protobuf::DescriptorPool.generated_pool.build do
13
13
  add_file("google/cloud/securitycenter/v1/asset.proto", :syntax => :proto3) do
14
14
  add_message "google.cloud.securitycenter.v1.Asset" do
@@ -1,15 +1,16 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/securitycenter/v1/finding.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/field_behavior_pb'
7
5
  require 'google/api/resource_pb'
8
6
  require 'google/cloud/securitycenter/v1/indicator_pb'
9
7
  require 'google/cloud/securitycenter/v1/security_marks_pb'
8
+ require 'google/cloud/securitycenter/v1/vulnerability_pb'
10
9
  require 'google/protobuf/struct_pb'
11
10
  require 'google/protobuf/timestamp_pb'
12
11
  require 'google/api/annotations_pb'
12
+ require 'google/protobuf'
13
+
13
14
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
15
  add_file("google/cloud/securitycenter/v1/finding.proto", :syntax => :proto3) do
15
16
  add_message "google.cloud.securitycenter.v1.Finding" do
@@ -27,6 +28,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
27
28
  optional :canonical_name, :string, 14
28
29
  optional :finding_class, :enum, 17, "google.cloud.securitycenter.v1.Finding.FindingClass"
29
30
  optional :indicator, :message, 18, "google.cloud.securitycenter.v1.Indicator"
31
+ optional :vulnerability, :message, 20, "google.cloud.securitycenter.v1.Vulnerability"
30
32
  end
31
33
  add_enum "google.cloud.securitycenter.v1.Finding.State" do
32
34
  value :STATE_UNSPECIFIED, 0
@@ -1,9 +1,9 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/securitycenter/v1/folder.proto
3
3
 
4
+ require 'google/api/annotations_pb'
4
5
  require 'google/protobuf'
5
6
 
6
- require 'google/api/annotations_pb'
7
7
  Google::Protobuf::DescriptorPool.generated_pool.build do
8
8
  add_file("google/cloud/securitycenter/v1/folder.proto", :syntax => :proto3) do
9
9
  add_message "google.cloud.securitycenter.v1.Folder" do
@@ -1,9 +1,9 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/securitycenter/v1/indicator.proto
3
3
 
4
+ require 'google/api/annotations_pb'
4
5
  require 'google/protobuf'
5
6
 
6
- require 'google/api/annotations_pb'
7
7
  Google::Protobuf::DescriptorPool.generated_pool.build do
8
8
  add_file("google/cloud/securitycenter/v1/indicator.proto", :syntax => :proto3) do
9
9
  add_message "google.cloud.securitycenter.v1.Indicator" do
@@ -1,11 +1,11 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/securitycenter/v1/notification_config.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/field_behavior_pb'
7
5
  require 'google/api/resource_pb'
8
6
  require 'google/api/annotations_pb'
7
+ require 'google/protobuf'
8
+
9
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
10
  add_file("google/cloud/securitycenter/v1/notification_config.proto", :syntax => :proto3) do
11
11
  add_message "google.cloud.securitycenter.v1.NotificationConfig" do
@@ -1,11 +1,11 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/securitycenter/v1/notification_message.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/cloud/securitycenter/v1/finding_pb'
7
5
  require 'google/cloud/securitycenter/v1/resource_pb'
8
6
  require 'google/api/annotations_pb'
7
+ require 'google/protobuf'
8
+
9
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
10
  add_file("google/cloud/securitycenter/v1/notification_message.proto", :syntax => :proto3) do
11
11
  add_message "google.cloud.securitycenter.v1.NotificationMessage" do
@@ -1,10 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/securitycenter/v1/organization_settings.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/resource_pb'
7
5
  require 'google/api/annotations_pb'
6
+ require 'google/protobuf'
7
+
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("google/cloud/securitycenter/v1/organization_settings.proto", :syntax => :proto3) do
10
10
  add_message "google.cloud.securitycenter.v1.OrganizationSettings" do
@@ -1,11 +1,11 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/securitycenter/v1/resource.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/field_behavior_pb'
7
5
  require 'google/cloud/securitycenter/v1/folder_pb'
8
6
  require 'google/api/annotations_pb'
7
+ require 'google/protobuf'
8
+
9
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
10
  add_file("google/cloud/securitycenter/v1/resource.proto", :syntax => :proto3) do
11
11
  add_message "google.cloud.securitycenter.v1.Resource" do
@@ -14,7 +14,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
14
14
  optional :project_display_name, :string, 3
15
15
  optional :parent, :string, 4
16
16
  optional :parent_display_name, :string, 5
17
+ optional :type, :string, 6
17
18
  repeated :folders, :message, 7, "google.cloud.securitycenter.v1.Folder"
19
+ optional :display_name, :string, 8
18
20
  end
19
21
  end
20
22
  end
@@ -1,10 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/securitycenter/v1/run_asset_discovery_response.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/protobuf/duration_pb'
7
5
  require 'google/api/annotations_pb'
6
+ require 'google/protobuf'
7
+
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("google/cloud/securitycenter/v1/run_asset_discovery_response.proto", :syntax => :proto3) do
10
10
  add_message "google.cloud.securitycenter.v1.RunAssetDiscoveryResponse" do
@@ -1,10 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/securitycenter/v1/security_marks.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/resource_pb'
7
5
  require 'google/api/annotations_pb'
6
+ require 'google/protobuf'
7
+
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("google/cloud/securitycenter/v1/security_marks.proto", :syntax => :proto3) do
10
10
  add_message "google.cloud.securitycenter.v1.SecurityMarks" do
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/securitycenter/v1/securitycenter_service.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/cloud/securitycenter/v1/run_asset_discovery_response_pb'
7
5
  require 'google/api/annotations_pb'
8
6
  require 'google/api/client_pb'
@@ -23,6 +21,8 @@ require 'google/protobuf/empty_pb'
23
21
  require 'google/protobuf/field_mask_pb'
24
22
  require 'google/protobuf/struct_pb'
25
23
  require 'google/protobuf/timestamp_pb'
24
+ require 'google/protobuf'
25
+
26
26
  Google::Protobuf::DescriptorPool.generated_pool.build do
27
27
  add_file("google/cloud/securitycenter/v1/securitycenter_service.proto", :syntax => :proto3) do
28
28
  add_message "google.cloud.securitycenter.v1.CreateFindingRequest" do
@@ -156,7 +156,9 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
156
156
  optional :project_display_name, :string, 3
157
157
  optional :parent_name, :string, 4
158
158
  optional :parent_display_name, :string, 5
159
+ optional :type, :string, 6
159
160
  repeated :folders, :message, 7, "google.cloud.securitycenter.v1.Folder"
161
+ optional :display_name, :string, 8
160
162
  end
161
163
  add_enum "google.cloud.securitycenter.v1.ListFindingsResponse.ListFindingsResult.StateChange" do
162
164
  value :UNUSED, 0
@@ -27,7 +27,7 @@ module Google
27
27
  # V1 APIs for Security Center service.
28
28
  class Service
29
29
 
30
- include GRPC::GenericService
30
+ include ::GRPC::GenericService
31
31
 
32
32
  self.marshal_class_method = :encode
33
33
  self.unmarshal_class_method = :decode
@@ -1,10 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/securitycenter/v1/source.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/resource_pb'
7
5
  require 'google/api/annotations_pb'
6
+ require 'google/protobuf'
7
+
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_file("google/cloud/securitycenter/v1/source.proto", :syntax => :proto3) do
10
10
  add_message "google.cloud.securitycenter.v1.Source" do
@@ -0,0 +1,86 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/securitycenter/v1/vulnerability.proto
3
+
4
+ require 'google/api/annotations_pb'
5
+ require 'google/protobuf'
6
+
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_file("google/cloud/securitycenter/v1/vulnerability.proto", :syntax => :proto3) do
9
+ add_message "google.cloud.securitycenter.v1.Vulnerability" do
10
+ optional :cve, :message, 1, "google.cloud.securitycenter.v1.Cve"
11
+ end
12
+ add_message "google.cloud.securitycenter.v1.Cve" do
13
+ optional :id, :string, 1
14
+ repeated :references, :message, 2, "google.cloud.securitycenter.v1.Reference"
15
+ optional :cvssv3, :message, 3, "google.cloud.securitycenter.v1.Cvssv3"
16
+ end
17
+ add_message "google.cloud.securitycenter.v1.Reference" do
18
+ optional :source, :string, 1
19
+ optional :uri, :string, 2
20
+ end
21
+ add_message "google.cloud.securitycenter.v1.Cvssv3" do
22
+ optional :base_score, :double, 1
23
+ optional :attack_vector, :enum, 5, "google.cloud.securitycenter.v1.Cvssv3.AttackVector"
24
+ optional :attack_complexity, :enum, 6, "google.cloud.securitycenter.v1.Cvssv3.AttackComplexity"
25
+ optional :privileges_required, :enum, 7, "google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired"
26
+ optional :user_interaction, :enum, 8, "google.cloud.securitycenter.v1.Cvssv3.UserInteraction"
27
+ optional :scope, :enum, 9, "google.cloud.securitycenter.v1.Cvssv3.Scope"
28
+ optional :confidentiality_impact, :enum, 10, "google.cloud.securitycenter.v1.Cvssv3.Impact"
29
+ optional :integrity_impact, :enum, 11, "google.cloud.securitycenter.v1.Cvssv3.Impact"
30
+ optional :availability_impact, :enum, 12, "google.cloud.securitycenter.v1.Cvssv3.Impact"
31
+ end
32
+ add_enum "google.cloud.securitycenter.v1.Cvssv3.AttackVector" do
33
+ value :ATTACK_VECTOR_UNSPECIFIED, 0
34
+ value :ATTACK_VECTOR_NETWORK, 1
35
+ value :ATTACK_VECTOR_ADJACENT, 2
36
+ value :ATTACK_VECTOR_LOCAL, 3
37
+ value :ATTACK_VECTOR_PHYSICAL, 4
38
+ end
39
+ add_enum "google.cloud.securitycenter.v1.Cvssv3.AttackComplexity" do
40
+ value :ATTACK_COMPLEXITY_UNSPECIFIED, 0
41
+ value :ATTACK_COMPLEXITY_LOW, 1
42
+ value :ATTACK_COMPLEXITY_HIGH, 2
43
+ end
44
+ add_enum "google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired" do
45
+ value :PRIVILEGES_REQUIRED_UNSPECIFIED, 0
46
+ value :PRIVILEGES_REQUIRED_NONE, 1
47
+ value :PRIVILEGES_REQUIRED_LOW, 2
48
+ value :PRIVILEGES_REQUIRED_HIGH, 3
49
+ end
50
+ add_enum "google.cloud.securitycenter.v1.Cvssv3.UserInteraction" do
51
+ value :USER_INTERACTION_UNSPECIFIED, 0
52
+ value :USER_INTERACTION_NONE, 1
53
+ value :USER_INTERACTION_REQUIRED, 2
54
+ end
55
+ add_enum "google.cloud.securitycenter.v1.Cvssv3.Scope" do
56
+ value :SCOPE_UNSPECIFIED, 0
57
+ value :SCOPE_UNCHANGED, 1
58
+ value :SCOPE_CHANGED, 2
59
+ end
60
+ add_enum "google.cloud.securitycenter.v1.Cvssv3.Impact" do
61
+ value :IMPACT_UNSPECIFIED, 0
62
+ value :IMPACT_HIGH, 1
63
+ value :IMPACT_LOW, 2
64
+ value :IMPACT_NONE, 3
65
+ end
66
+ end
67
+ end
68
+
69
+ module Google
70
+ module Cloud
71
+ module SecurityCenter
72
+ module V1
73
+ Vulnerability = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Vulnerability").msgclass
74
+ Cve = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cve").msgclass
75
+ Reference = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Reference").msgclass
76
+ Cvssv3 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3").msgclass
77
+ Cvssv3::AttackVector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.AttackVector").enummodule
78
+ Cvssv3::AttackComplexity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.AttackComplexity").enummodule
79
+ Cvssv3::PrivilegesRequired = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.PrivilegesRequired").enummodule
80
+ Cvssv3::UserInteraction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.UserInteraction").enummodule
81
+ Cvssv3::Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.Scope").enummodule
82
+ Cvssv3::Impact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.securitycenter.v1.Cvssv3.Impact").enummodule
83
+ end
84
+ end
85
+ end
86
+ end
@@ -106,6 +106,11 @@ module Google
106
106
  # operating system that, with high confidence, indicates a computer
107
107
  # intrusion.
108
108
  # Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise
109
+ # @!attribute [rw] vulnerability
110
+ # @return [::Google::Cloud::SecurityCenter::V1::Vulnerability]
111
+ # Represents vulnerability specific fields like cve, cvss scores etc.
112
+ # CVE stands for Common Vulnerabilities and Exposures
113
+ # (https://cve.mitre.org/about/)
109
114
  class Finding
110
115
  include ::Google::Protobuf::MessageExts
111
116
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -38,11 +38,17 @@ module Google
38
38
  # @!attribute [rw] parent_display_name
39
39
  # @return [::String]
40
40
  # The human readable name of resource's parent.
41
+ # @!attribute [rw] type
42
+ # @return [::String]
43
+ # The full resource type of the resource.
41
44
  # @!attribute [r] folders
42
45
  # @return [::Array<::Google::Cloud::SecurityCenter::V1::Folder>]
43
46
  # Output only. Contains a Folder message for each folder in the assets ancestry.
44
47
  # The first folder is the deepest nested folder, and the last folder is the
45
48
  # folder directly under the Organization.
49
+ # @!attribute [rw] display_name
50
+ # @return [::String]
51
+ # The human readable name of the resource.
46
52
  class Resource
47
53
  include ::Google::Protobuf::MessageExts
48
54
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -790,6 +790,7 @@ module Google
790
790
  # * resource.project_display_name: `=`, `:`
791
791
  # * resource.type: `=`, `:`
792
792
  # * resource.folders.resource_folder: `=`, `:`
793
+ # * resource.display_name: `=`, `:`
793
794
  # @!attribute [rw] order_by
794
795
  # @return [::String]
795
796
  # Expression that defines what fields and order to use for sorting. The
@@ -916,11 +917,17 @@ module Google
916
917
  # @!attribute [rw] parent_display_name
917
918
  # @return [::String]
918
919
  # The human readable name of resource's parent.
920
+ # @!attribute [rw] type
921
+ # @return [::String]
922
+ # The full resource type of the resource.
919
923
  # @!attribute [rw] folders
920
924
  # @return [::Array<::Google::Cloud::SecurityCenter::V1::Folder>]
921
925
  # Contains a Folder message for each folder in the assets ancestry.
922
926
  # The first folder is the deepest nested folder, and the last folder is
923
927
  # the folder directly under the Organization.
928
+ # @!attribute [rw] display_name
929
+ # @return [::String]
930
+ # The human readable name of the resource.
924
931
  class Resource
925
932
  include ::Google::Protobuf::MessageExts
926
933
  extend ::Google::Protobuf::MessageExts::ClassMethods