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.



2409
2410
2411
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2409

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)


2347
2348
2349
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2347

def asset_type
  @asset_type
end

#descriptionString

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

Returns:

  • (String)


2352
2353
2354
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2352

def description
  @description
end

#display_nameString

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

Returns:

  • (String)


2357
2358
2359
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2357

def display_name
  @display_name
end

#error_messageString

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

Returns:

  • (String)


2362
2363
2364
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2362

def error_message
  @error_message
end

#nameString

Rule name. Corresponds to the JSON property name

Returns:

  • (String)


2367
2368
2369
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2367

def name
  @name
end

#primary_categoryString

The primary category. Corresponds to the JSON property primaryCategory

Returns:

  • (String)


2372
2373
2374
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2372

def primary_category
  @primary_category
end

#remediationString

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

Returns:

  • (String)


2377
2378
2379
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2377

def remediation
  @remediation
end

#revision_idString

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

Returns:

  • (String)


2382
2383
2384
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2382

def revision_id
  @revision_id
end

#rule_typeString

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

Returns:

  • (String)


2387
2388
2389
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2387

def rule_type
  @rule_type
end

#secondary_categoryString

The secondary category. Corresponds to the JSON property secondaryCategory

Returns:

  • (String)


2392
2393
2394
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2392

def secondary_category
  @secondary_category
end

#severityString

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

Returns:

  • (String)


2397
2398
2399
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2397

def severity
  @severity
end

#tagsArray<String>

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

Returns:

  • (Array<String>)


2402
2403
2404
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 2402

def tags
  @tags
end

#uriString

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

Returns:

  • (String)


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

def uri
  @uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



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

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