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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PolicySetResult
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of PolicySetResult from the JsonReader.hasError()
Get the hasError property: A value indicating whether this policy set evaluation has discovered violations.Get the policyViolations property: The list of policy violations.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withHasError
(Boolean hasError) Set the hasError property: A value indicating whether this policy set evaluation has discovered violations.withPolicyViolations
(List<PolicyViolation> policyViolations) Set the policyViolations property: The list of policy violations.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
PolicySetResult
public PolicySetResult()Creates an instance of PolicySetResult class.
-
-
Method Details
-
hasError
Get the hasError property: A value indicating whether this policy set evaluation has discovered violations.- Returns:
- the hasError value.
-
withHasError
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
Get the policyViolations property: The list of policy violations.- Returns:
- the policyViolations value.
-
withPolicyViolations
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
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<PolicySetResult>
- Throws:
IOException
-
fromJson
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.
-