Class: Google::Apis::ClouddeployV1::PolicyViolationDetails

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

Overview

Policy violation details.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PolicyViolationDetails

Returns a new instance of PolicyViolationDetails.



3769
3770
3771
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 3769

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

Instance Attribute Details

#failure_messageString

User readable message about why the request violated a policy. This is not intended for machine parsing. Corresponds to the JSON property failureMessage

Returns:

  • (String)


3756
3757
3758
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 3756

def failure_message
  @failure_message
end

#policyString

Name of the policy that was violated. Policy resource will be in the format of projects/project/locations/location/policies/policy`. Corresponds to the JSON propertypolicy`

Returns:

  • (String)


3762
3763
3764
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 3762

def policy
  @policy
end

#rule_idString

Id of the rule that triggered the policy violation. Corresponds to the JSON property ruleId

Returns:

  • (String)


3767
3768
3769
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 3767

def rule_id
  @rule_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3774
3775
3776
3777
3778
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 3774

def update!(**args)
  @failure_message = args[:failure_message] if args.key?(:failure_message)
  @policy = args[:policy] if args.key?(:policy)
  @rule_id = args[:rule_id] if args.key?(:rule_id)
end