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

Message represent a rule

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Rule

Returns a new instance of Rule.



816
817
818
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 816

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

Instance Attribute Details

#descriptionString

descrite rule in plain language Corresponds to the JSON property description

Returns:

  • (String)


769
770
771
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 769

def description
  @description
end

#display_nameString

the name display in UI Corresponds to the JSON property displayName

Returns:

  • (String)


774
775
776
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 774

def display_name
  @display_name
end

#error_messageString

the message template for rule Corresponds to the JSON property errorMessage

Returns:

  • (String)


779
780
781
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 779

def error_message
  @error_message
end

#nameString

rule name Corresponds to the JSON property name

Returns:

  • (String)


784
785
786
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 784

def name
  @name
end

#primary_categoryString

the primary category Corresponds to the JSON property primaryCategory

Returns:

  • (String)


789
790
791
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 789

def primary_category
  @primary_category
end

#remediationString

the remediation for the rule Corresponds to the JSON property remediation

Returns:

  • (String)


794
795
796
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 794

def remediation
  @remediation
end

#revision_idString

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

Returns:

  • (String)


799
800
801
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 799

def revision_id
  @revision_id
end

#secondary_categoryString

the secondary category Corresponds to the JSON property secondaryCategory

Returns:

  • (String)


804
805
806
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 804

def secondary_category
  @secondary_category
end

#severityString

the severity of the rule Corresponds to the JSON property severity

Returns:

  • (String)


809
810
811
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 809

def severity
  @severity
end

#uriString

the docuement url for the rule Corresponds to the JSON property uri

Returns:

  • (String)


814
815
816
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 814

def uri
  @uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



821
822
823
824
825
826
827
828
829
830
831
832
# File 'lib/google/apis/workloadmanager_v1/classes.rb', line 821

def update!(**args)
  @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)
  @secondary_category = args[:secondary_category] if args.key?(:secondary_category)
  @severity = args[:severity] if args.key?(:severity)
  @uri = args[:uri] if args.key?(:uri)
end