Class PolicyViolation

java.lang.Object
com.azure.resourcemanager.devtestlabs.models.PolicyViolation

public final class PolicyViolation extends Object
Policy violation.
  • Constructor Details

    • PolicyViolation

      public PolicyViolation()
      Creates an instance of PolicyViolation class.
  • Method Details

    • code

      public String code()
      Get the code property: The code of the policy violation.
      Returns:
      the code value.
    • withCode

      public PolicyViolation withCode(String code)
      Set the code property: The code of the policy violation.
      Parameters:
      code - the code value to set.
      Returns:
      the PolicyViolation object itself.
    • message

      public String message()
      Get the message property: The message of the policy violation.
      Returns:
      the message value.
    • withMessage

      public PolicyViolation withMessage(String message)
      Set the message property: The message of the policy violation.
      Parameters:
      message - the message value to set.
      Returns:
      the PolicyViolation object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.