Class RoleManagementPolicyExpirationRule
java.lang.Object
com.azure.resourcemanager.authorization.models.RoleManagementPolicyRule
com.azure.resourcemanager.authorization.models.RoleManagementPolicyExpirationRule
- All Implemented Interfaces:
com.azure.json.JsonSerializable<RoleManagementPolicyRule>
The role management policy expiration rule.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of RoleManagementPolicyExpirationRule class. -
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of RoleManagementPolicyExpirationRule from the JsonReader.Get the isExpirationRequired property: The value indicating whether expiration is required.Get the maximumDuration property: The maximum duration of expiration in timespan.ruleType()Get the ruleType property: The type of rule.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Set the id property: The id of the rule.withIsExpirationRequired(Boolean isExpirationRequired) Set the isExpirationRequired property: The value indicating whether expiration is required.withMaximumDuration(String maximumDuration) Set the maximumDuration property: The maximum duration of expiration in timespan.Set the target property: The target of the current rule.Methods inherited from class com.azure.resourcemanager.authorization.models.RoleManagementPolicyRule
id, targetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
RoleManagementPolicyExpirationRule
public RoleManagementPolicyExpirationRule()Creates an instance of RoleManagementPolicyExpirationRule class.
-
-
Method Details
-
ruleType
Get the ruleType property: The type of rule.- Overrides:
ruleTypein classRoleManagementPolicyRule- Returns:
- the ruleType value.
-
isExpirationRequired
Get the isExpirationRequired property: The value indicating whether expiration is required.- Returns:
- the isExpirationRequired value.
-
withIsExpirationRequired
Set the isExpirationRequired property: The value indicating whether expiration is required.- Parameters:
isExpirationRequired- the isExpirationRequired value to set.- Returns:
- the RoleManagementPolicyExpirationRule object itself.
-
maximumDuration
Get the maximumDuration property: The maximum duration of expiration in timespan.- Returns:
- the maximumDuration value.
-
withMaximumDuration
Set the maximumDuration property: The maximum duration of expiration in timespan.- Parameters:
maximumDuration- the maximumDuration value to set.- Returns:
- the RoleManagementPolicyExpirationRule object itself.
-
withId
Set the id property: The id of the rule.- Overrides:
withIdin classRoleManagementPolicyRule- Parameters:
id- the id value to set.- Returns:
- the RoleManagementPolicyRule object itself.
-
withTarget
Set the target property: The target of the current rule.- Overrides:
withTargetin classRoleManagementPolicyRule- Parameters:
target- the target value to set.- Returns:
- the RoleManagementPolicyRule object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validatein classRoleManagementPolicyRule- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<RoleManagementPolicyRule>- Overrides:
toJsonin classRoleManagementPolicyRule- Throws:
IOException
-
fromJson
public static RoleManagementPolicyExpirationRule fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of RoleManagementPolicyExpirationRule from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of RoleManagementPolicyExpirationRule 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 RoleManagementPolicyExpirationRule.
-