Class: Google::Apis::SecuritycenterV1::Resource

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/securitycenter_v1/classes.rb,
lib/google/apis/securitycenter_v1/representations.rb,
lib/google/apis/securitycenter_v1/representations.rb

Overview

Information related to the Google Cloud resource that is associated with this finding.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Resource

Returns a new instance of Resource.



2498
2499
2500
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 2498

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#display_nameString

The human readable name of the resource. Corresponds to the JSON property displayName

Returns:

  • (String)


2458
2459
2460
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 2458

def display_name
  @display_name
end

#foldersArray<Google::Apis::SecuritycenterV1::Folder>

Contains a Folder message for each folder in the assets ancestry. The first folder is the deepest nested folder, and the last folder is the folder directly under the Organization. Corresponds to the JSON property folders



2465
2466
2467
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 2465

def folders
  @folders
end

#nameString

The full resource name of the resource. See: https://cloud.google.com/apis/ design/resource_names#full_resource_name Corresponds to the JSON property name

Returns:

  • (String)


2471
2472
2473
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 2471

def name
  @name
end

#parent_display_nameString

The human readable name of resource's parent. Corresponds to the JSON property parentDisplayName

Returns:

  • (String)


2476
2477
2478
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 2476

def parent_display_name
  @parent_display_name
end

#parent_nameString

The full resource name of resource's parent. Corresponds to the JSON property parentName

Returns:

  • (String)


2481
2482
2483
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 2481

def parent_name
  @parent_name
end

#project_display_nameString

The project id that the resource belongs to. Corresponds to the JSON property projectDisplayName

Returns:

  • (String)


2486
2487
2488
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 2486

def project_display_name
  @project_display_name
end

#project_nameString

The full resource name of project that the resource belongs to. Corresponds to the JSON property projectName

Returns:

  • (String)


2491
2492
2493
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 2491

def project_name
  @project_name
end

#typeString

The full resource type of the resource. Corresponds to the JSON property type

Returns:

  • (String)


2496
2497
2498
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 2496

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
# File 'lib/google/apis/securitycenter_v1/classes.rb', line 2503

def update!(**args)
  @display_name = args[:display_name] if args.key?(:display_name)
  @folders = args[:folders] if args.key?(:folders)
  @name = args[:name] if args.key?(:name)
  @parent_display_name = args[:parent_display_name] if args.key?(:parent_display_name)
  @parent_name = args[:parent_name] if args.key?(:parent_name)
  @project_display_name = args[:project_display_name] if args.key?(:project_display_name)
  @project_name = args[:project_name] if args.key?(:project_name)
  @type = args[:type] if args.key?(:type)
end