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.



3788
3789
3790
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 3788

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)


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

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)


3781
3782
3783
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 3781

def policy
  @policy
end

#rule_idString

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

Returns:

  • (String)


3786
3787
3788
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 3786

def rule_id
  @rule_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3793
3794
3795
3796
3797
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 3793

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