Package com.microsoft.graph.models
Class RoleDefinition
java.lang.Object
com.microsoft.graph.models.Entity
com.microsoft.graph.models.RoleDefinition
- All Implemented Interfaces:
com.microsoft.kiota.serialization.AdditionalDataHolder
,com.microsoft.kiota.serialization.Parsable
,com.microsoft.kiota.store.BackedModel
- Direct Known Subclasses:
DeviceAndAppManagementRoleDefinition
@Generated("com.microsoft.kiota")
public class RoleDefinition
extends Entity
implements com.microsoft.kiota.serialization.Parsable
The Role Definition resource. The role definition is the foundation of role based access in Intune. The role combines an Intune resource such as a Mobile App and associated role permissions such as Create or Read for the resource. There are two types of roles, built-in and custom. Built-in roles cannot be modified. Both built-in roles and custom roles must have assignments to be enforced. Create custom roles if you want to define a role that allows any of the available resources and role permissions to be combined into a single role.
-
Field Summary
Fields inherited from class com.microsoft.graph.models.Entity
backingStore
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RoleDefinition
createFromDiscriminatorValue
(com.microsoft.kiota.serialization.ParseNode parseNode) Creates a new instance of the appropriate class based on discriminator valueGets the description property value.Gets the displayName property value.The deserialization information for the current modelGets the isBuiltIn property value.Gets the roleAssignments property value.Gets the rolePermissions property value.void
serialize
(com.microsoft.kiota.serialization.SerializationWriter writer) Serializes information the current objectvoid
setDescription
(String value) Sets the description property value.void
setDisplayName
(String value) Sets the displayName property value.void
setIsBuiltIn
(Boolean value) Sets the isBuiltIn property value.void
setRoleAssignments
(List<RoleAssignment> value) Sets the roleAssignments property value.void
setRolePermissions
(List<RolePermission> value) Sets the rolePermissions property value.Methods inherited from class com.microsoft.graph.models.Entity
getAdditionalData, getBackingStore, getId, getOdataType, setAdditionalData, setBackingStore, setId, setOdataType
-
Constructor Details
-
RoleDefinition
public RoleDefinition()Instantiates a newRoleDefinition
and sets the default values.
-
-
Method Details
-
createFromDiscriminatorValue
@Nonnull public static RoleDefinition createFromDiscriminatorValue(@Nonnull com.microsoft.kiota.serialization.ParseNode parseNode) Creates a new instance of the appropriate class based on discriminator value- Parameters:
parseNode
- The parse node to use to read the discriminator value and create the object- Returns:
- a
RoleDefinition
-
getDescription
Gets the description property value. Description of the Role definition.- Returns:
- a
String
-
getDisplayName
Gets the displayName property value. Display Name of the Role definition.- Returns:
- a
String
-
getFieldDeserializers
@Nonnull public Map<String,Consumer<com.microsoft.kiota.serialization.ParseNode>> getFieldDeserializers()The deserialization information for the current model- Specified by:
getFieldDeserializers
in interfacecom.microsoft.kiota.serialization.Parsable
- Overrides:
getFieldDeserializers
in classEntity
- Returns:
- a
Map<String,
Consumer<com.microsoft.kiota.serialization.ParseNode>>
-
getIsBuiltIn
Gets the isBuiltIn property value. Type of Role. Set to True if it is built-in, or set to False if it is a custom role definition.- Returns:
- a
Boolean
-
getRoleAssignments
Gets the roleAssignments property value. List of Role assignments for this role definition.- Returns:
- a
List<RoleAssignment>
-
getRolePermissions
Gets the rolePermissions property value. List of Role Permissions this role is allowed to perform. These must match the actionName that is defined as part of the rolePermission.- Returns:
- a
List<RolePermission>
-
serialize
public void serialize(@Nonnull com.microsoft.kiota.serialization.SerializationWriter writer) Serializes information the current object -
setDescription
Sets the description property value. Description of the Role definition.- Parameters:
value
- Value to set for the description property.
-
setDisplayName
Sets the displayName property value. Display Name of the Role definition.- Parameters:
value
- Value to set for the displayName property.
-
setIsBuiltIn
Sets the isBuiltIn property value. Type of Role. Set to True if it is built-in, or set to False if it is a custom role definition.- Parameters:
value
- Value to set for the isBuiltIn property.
-
setRoleAssignments
Sets the roleAssignments property value. List of Role assignments for this role definition.- Parameters:
value
- Value to set for the roleAssignments property.
-
setRolePermissions
Sets the rolePermissions property value. List of Role Permissions this role is allowed to perform. These must match the actionName that is defined as part of the rolePermission.- Parameters:
value
- Value to set for the rolePermissions property.
-