Class PolicyAssignmentProperties

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

public final class PolicyAssignmentProperties extends Object implements com.azure.json.JsonSerializable<PolicyAssignmentProperties>
Expanded info of resource scope, role definition and policy.
  • Constructor Details

    • PolicyAssignmentProperties

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

    • scope

      Get the scope property: Details of the resource scope.
      Returns:
      the scope value.
    • withScope

      Set the scope property: Details of the resource scope.
      Parameters:
      scope - the scope value to set.
      Returns:
      the PolicyAssignmentProperties object itself.
    • roleDefinition

      Get the roleDefinition property: Details of role definition.
      Returns:
      the roleDefinition value.
    • withRoleDefinition

      public PolicyAssignmentProperties withRoleDefinition(PolicyAssignmentPropertiesRoleDefinition roleDefinition)
      Set the roleDefinition property: Details of role definition.
      Parameters:
      roleDefinition - the roleDefinition value to set.
      Returns:
      the PolicyAssignmentProperties object itself.
    • policy

      Get the policy property: Details of the policy.
      Returns:
      the policy value.
    • withPolicy

      Set the policy property: Details of the policy.
      Parameters:
      policy - the policy value to set.
      Returns:
      the PolicyAssignmentProperties 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<PolicyAssignmentProperties>
      Throws:
      IOException
    • fromJson

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