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.
  • Constructor Details

    • RoleDefinition

      public RoleDefinition()
      Instantiates a new RoleDefinition 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

      @Nullable public String getDescription()
      Gets the description property value. Description of the Role definition.
      Returns:
      a String
    • getDisplayName

      @Nullable public 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 interface com.microsoft.kiota.serialization.Parsable
      Overrides:
      getFieldDeserializers in class Entity
      Returns:
      a Map<String,Consumer<com.microsoft.kiota.serialization.ParseNode>>
    • getIsBuiltIn

      @Nullable public Boolean 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

      @Nullable public List<RoleAssignment> getRoleAssignments()
      Gets the roleAssignments property value. List of Role assignments for this role definition.
      Returns:
      a List<RoleAssignment>
    • getRolePermissions

      @Nullable public List<RolePermission> 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
      Specified by:
      serialize in interface com.microsoft.kiota.serialization.Parsable
      Overrides:
      serialize in class Entity
      Parameters:
      writer - Serialization writer to use to serialize this model
    • setDescription

      public void setDescription(@Nullable String value)
      Sets the description property value. Description of the Role definition.
      Parameters:
      value - Value to set for the description property.
    • setDisplayName

      public void setDisplayName(@Nullable String value)
      Sets the displayName property value. Display Name of the Role definition.
      Parameters:
      value - Value to set for the displayName property.
    • setIsBuiltIn

      public void setIsBuiltIn(@Nullable Boolean value)
      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

      public void setRoleAssignments(@Nullable List<RoleAssignment> value)
      Sets the roleAssignments property value. List of Role assignments for this role definition.
      Parameters:
      value - Value to set for the roleAssignments property.
    • setRolePermissions

      public void setRolePermissions(@Nullable List<RolePermission> value)
      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.