Class: Google::Apis::WorkloadmanagerV1::Rule

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

Overview

A rule to be evaluated.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Rule

Returns a new instance of Rule.



2407
2408
2409
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2407

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

Instance Attribute Details

#asset_typeString

The CAI asset type of the rule is evaluating, for joined asset types, it will be the corresponding primary asset types. Corresponds to the JSON property assetType

Returns:

  • (String)


2345
2346
2347
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2345

def asset_type
  @asset_type
end

#descriptionString

Describe rule in plain language. Corresponds to the JSON property description

Returns:

  • (String)


2350
2351
2352
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2350

def description
  @description
end

#display_nameString

The name display in UI. Corresponds to the JSON property displayName

Returns:

  • (String)


2355
2356
2357
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2355

def display_name
  @display_name
end

#error_messageString

The message template for rule. Corresponds to the JSON property errorMessage

Returns:

  • (String)


2360
2361
2362
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2360

def error_message
  @error_message
end

#nameString

Rule name. Corresponds to the JSON property name

Returns:

  • (String)


2365
2366
2367
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2365

def name
  @name
end

#primary_categoryString

The primary category. Corresponds to the JSON property primaryCategory

Returns:

  • (String)


2370
2371
2372
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2370

def primary_category
  @primary_category
end

#remediationString

The remediation for the rule. Corresponds to the JSON property remediation

Returns:

  • (String)


2375
2376
2377
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2375

def remediation
  @remediation
end

#revision_idString

Output only. The version of the rule. Corresponds to the JSON property revisionId

Returns:

  • (String)


2380
2381
2382
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2380

def revision_id
  @revision_id
end

#rule_typeString

The type of the rule. Corresponds to the JSON property ruleType

Returns:

  • (String)


2385
2386
2387
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2385

def rule_type
  @rule_type
end

#secondary_categoryString

The secondary category. Corresponds to the JSON property secondaryCategory

Returns:

  • (String)


2390
2391
2392
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2390

def secondary_category
  @secondary_category
end

#severityString

The severity of the rule. Corresponds to the JSON property severity

Returns:

  • (String)


2395
2396
2397
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2395

def severity
  @severity
end

#tagsArray<String>

List of user-defined tags. Corresponds to the JSON property tags

Returns:

  • (Array<String>)


2400
2401
2402
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2400

def tags
  @tags
end

#uriString

The document url for the rule. Corresponds to the JSON property uri

Returns:

  • (String)


2405
2406
2407
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2405

def uri
  @uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2412

def update!(**args)
  @asset_type = args[:asset_type] if args.key?(:asset_type)
  @description = args[:description] if args.key?(:description)
  @display_name = args[:display_name] if args.key?(:display_name)
  @error_message = args[:error_message] if args.key?(:error_message)
  @name = args[:name] if args.key?(:name)
  @primary_category = args[:primary_category] if args.key?(:primary_category)
  @remediation = args[:remediation] if args.key?(:remediation)
  @revision_id = args[:revision_id] if args.key?(:revision_id)
  @rule_type = args[:rule_type] if args.key?(:rule_type)
  @secondary_category = args[:secondary_category] if args.key?(:secondary_category)
  @severity = args[:severity] if args.key?(:severity)
  @tags = args[:tags] if args.key?(:tags)
  @uri = args[:uri] if args.key?(:uri)
end