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 Summary
ConstructorsConstructorDescriptionCreates an instance of PolicyAssignmentProperties class. -
Method Summary
Modifier and TypeMethodDescriptionstatic PolicyAssignmentPropertiesfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of PolicyAssignmentProperties from the JsonReader.policy()Get the policy property: Details of the policy.Get the roleDefinition property: Details of role definition.scope()Get the scope property: Details of the resource scope.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Set the policy property: Details of the policy.withRoleDefinition(PolicyAssignmentPropertiesRoleDefinition roleDefinition) Set the roleDefinition property: Details of role definition.Set the scope property: Details of the resource scope.Methods 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
-
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
- Specified by:
toJsonin interfacecom.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.
-