Class PolicyExemptionUpdate

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

public final class PolicyExemptionUpdate extends Object implements com.azure.json.JsonSerializable<PolicyExemptionUpdate>
The policy exemption for Patch request.
  • Constructor Details

    • PolicyExemptionUpdate

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

    • resourceSelectors

      public List<ResourceSelector> resourceSelectors()
      Get the resourceSelectors property: The resource selector list to filter policies by resource properties.
      Returns:
      the resourceSelectors value.
    • withResourceSelectors

      public PolicyExemptionUpdate withResourceSelectors(List<ResourceSelector> resourceSelectors)
      Set the resourceSelectors property: The resource selector list to filter policies by resource properties.
      Parameters:
      resourceSelectors - the resourceSelectors value to set.
      Returns:
      the PolicyExemptionUpdate object itself.
    • assignmentScopeValidation

      public AssignmentScopeValidation assignmentScopeValidation()
      Get the assignmentScopeValidation property: The option whether validate the exemption is at or under the assignment scope.
      Returns:
      the assignmentScopeValidation value.
    • withAssignmentScopeValidation

      public PolicyExemptionUpdate withAssignmentScopeValidation(AssignmentScopeValidation assignmentScopeValidation)
      Set the assignmentScopeValidation property: The option whether validate the exemption is at or under the assignment scope.
      Parameters:
      assignmentScopeValidation - the assignmentScopeValidation value to set.
      Returns:
      the PolicyExemptionUpdate 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<PolicyExemptionUpdate>
      Throws:
      IOException
    • fromJson

      public static PolicyExemptionUpdate fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of PolicyExemptionUpdate from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of PolicyExemptionUpdate 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 PolicyExemptionUpdate.