Class RoleManagementPolicyRule

java.lang.Object
com.azure.resourcemanager.authorization.models.RoleManagementPolicyRule
All Implemented Interfaces:
com.azure.json.JsonSerializable<RoleManagementPolicyRule>
Direct Known Subclasses:
RoleManagementPolicyApprovalRule, RoleManagementPolicyAuthenticationContextRule, RoleManagementPolicyEnablementRule, RoleManagementPolicyExpirationRule, RoleManagementPolicyNotificationRule

public class RoleManagementPolicyRule extends Object implements com.azure.json.JsonSerializable<RoleManagementPolicyRule>
The role management policy rule.
  • Constructor Details

    • RoleManagementPolicyRule

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

    • ruleType

      public RoleManagementPolicyRuleType ruleType()
      Get the ruleType property: The type of rule.
      Returns:
      the ruleType value.
    • id

      public String id()
      Get the id property: The id of the rule.
      Returns:
      the id value.
    • withId

      public RoleManagementPolicyRule withId(String id)
      Set the id property: The id of the rule.
      Parameters:
      id - the id value to set.
      Returns:
      the RoleManagementPolicyRule object itself.
    • target

      Get the target property: The target of the current rule.
      Returns:
      the target value.
    • withTarget

      Set the target property: The target of the current rule.
      Parameters:
      target - the target value to set.
      Returns:
      the RoleManagementPolicyRule 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<RoleManagementPolicyRule>
      Throws:
      IOException
    • fromJson

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