Class PolicyAssignmentUpdate

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

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

    • PolicyAssignmentUpdate

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

    • location

      public String location()
      Get the location property: The location of the policy assignment. Only required when utilizing managed identity.
      Returns:
      the location value.
    • withLocation

      public PolicyAssignmentUpdate withLocation(String location)
      Set the location property: The location of the policy assignment. Only required when utilizing managed identity.
      Parameters:
      location - the location value to set.
      Returns:
      the PolicyAssignmentUpdate object itself.
    • identity

      public Identity identity()
      Get the identity property: The managed identity associated with the policy assignment.
      Returns:
      the identity value.
    • withIdentity

      public PolicyAssignmentUpdate withIdentity(Identity identity)
      Set the identity property: The managed identity associated with the policy assignment.
      Parameters:
      identity - the identity value to set.
      Returns:
      the PolicyAssignmentUpdate object itself.
    • 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 PolicyAssignmentUpdate 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 PolicyAssignmentUpdate object itself.
    • overrides

      public List<OverrideModel> overrides()
      Get the overrides property: The policy property value override.
      Returns:
      the overrides value.
    • withOverrides

      public PolicyAssignmentUpdate withOverrides(List<OverrideModel> overrides)
      Set the overrides property: The policy property value override.
      Parameters:
      overrides - the overrides value to set.
      Returns:
      the PolicyAssignmentUpdate 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<PolicyAssignmentUpdate>
      Throws:
      IOException
    • fromJson

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