Class PolicySetResult

java.lang.Object
com.azure.resourcemanager.devtestlabs.models.PolicySetResult
All Implemented Interfaces:
com.azure.json.JsonSerializable<PolicySetResult>

public final class PolicySetResult extends Object implements com.azure.json.JsonSerializable<PolicySetResult>
Result of a policy set evaluation.
  • Constructor Details

    • PolicySetResult

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

    • hasError

      public Boolean hasError()
      Get the hasError property: A value indicating whether this policy set evaluation has discovered violations.
      Returns:
      the hasError value.
    • withHasError

      public PolicySetResult withHasError(Boolean hasError)
      Set the hasError property: A value indicating whether this policy set evaluation has discovered violations.
      Parameters:
      hasError - the hasError value to set.
      Returns:
      the PolicySetResult object itself.
    • policyViolations

      public List<PolicyViolation> policyViolations()
      Get the policyViolations property: The list of policy violations.
      Returns:
      the policyViolations value.
    • withPolicyViolations

      public PolicySetResult withPolicyViolations(List<PolicyViolation> policyViolations)
      Set the policyViolations property: The list of policy violations.
      Parameters:
      policyViolations - the policyViolations value to set.
      Returns:
      the PolicySetResult object itself.
    • validate

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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<PolicySetResult>
      Throws:
      IOException
    • fromJson

      public static PolicySetResult fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of PolicySetResult from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of PolicySetResult if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the PolicySetResult.