Package odata.msgraph.client.entity
Class RoleDefinition
- java.lang.Object
-
- odata.msgraph.client.entity.Entity
-
- odata.msgraph.client.entity.RoleDefinition
-
- All Implemented Interfaces:
com.github.davidmoten.odata.client.ODataEntityType,com.github.davidmoten.odata.client.ODataType
- Direct Known Subclasses:
DeviceAndAppManagementRoleDefinition
public class RoleDefinition extends Entity implements com.github.davidmoten.odata.client.ODataEntityType
“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.”
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRoleDefinition.Builder
-
Field Summary
Fields Modifier and Type Field Description protected Stringdescriptionprotected StringdisplayNameprotected BooleanisBuiltInprotected List<RoleAssignment>roleAssignmentsprotected List<RolePermission>rolePermissionsprotected StringrolePermissionsNextLink-
Fields inherited from class odata.msgraph.client.entity.Entity
changedFields, contextPath, id, odataType, unmappedFields
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRoleDefinition()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RoleDefinition.BuilderbuilderRoleDefinition()Returns a builder which is used to create a new instance of this class (given that this class is immutable).com.github.davidmoten.odata.client.internal.ChangedFieldsgetChangedFields()Optional<String>getDescription()“Description of the Role definition.”Optional<String>getDisplayName()“Display Name of the Role definition.”Optional<Boolean>getIsBuiltIn()“Type of Role.RoleAssignmentCollectionRequestgetRoleAssignments()“List of Role assignments for this role definition.”com.github.davidmoten.odata.client.CollectionPage<RolePermission>getRolePermissions()“List of Role Permissions this role is allowed to perform.com.github.davidmoten.odata.client.CollectionPage<RolePermission>getRolePermissions(com.github.davidmoten.odata.client.HttpRequestOptions options)“List of Role Permissions this role is allowed to perform.com.github.davidmoten.odata.client.UnmappedFieldsgetUnmappedFields()StringodataTypeName()RoleDefinitionpatch()Submits only changed fields for update and returns an immutable copy ofthiswith changed fields reset.voidpostInject(boolean addKeysToContextPath)RoleDefinitionput()Submits all fields for update and returns an immutable copy ofthiswith changed fields reset (they were ignored anyway).StringtoString()RoleDefinitionwithDescription(String description)Returns an immutable copy ofthiswith just thedescriptionfield changed.RoleDefinitionwithDisplayName(String displayName)Returns an immutable copy ofthiswith just thedisplayNamefield changed.RoleDefinitionwithIsBuiltIn(Boolean isBuiltIn)Returns an immutable copy ofthiswith just theisBuiltInfield changed.RoleDefinitionwithRoleAssignments(List<RoleAssignment> roleAssignments)Returns an immutable copy ofthiswith just theroleAssignmentsfield changed.RoleDefinitionwithRolePermissions(List<RolePermission> rolePermissions)Returns an immutable copy ofthiswith just therolePermissionsfield changed.RoleDefinitionwithUnmappedField(String name, Object value)
-
-
-
Field Detail
-
description
protected String description
-
displayName
protected String displayName
-
isBuiltIn
protected Boolean isBuiltIn
-
rolePermissions
protected List<RolePermission> rolePermissions
-
rolePermissionsNextLink
protected String rolePermissionsNextLink
-
roleAssignments
protected List<RoleAssignment> roleAssignments
-
-
Method Detail
-
odataTypeName
public String odataTypeName()
- Specified by:
odataTypeNamein interfacecom.github.davidmoten.odata.client.ODataType- Overrides:
odataTypeNamein classEntity
-
builderRoleDefinition
public static RoleDefinition.Builder builderRoleDefinition()
Returns a builder which is used to create a new instance of this class (given that this class is immutable).- Returns:
- a new Builder for this class
-
getChangedFields
public com.github.davidmoten.odata.client.internal.ChangedFields getChangedFields()
- Specified by:
getChangedFieldsin interfacecom.github.davidmoten.odata.client.ODataEntityType- Overrides:
getChangedFieldsin classEntity
-
postInject
public void postInject(boolean addKeysToContextPath)
- Specified by:
postInjectin interfacecom.github.davidmoten.odata.client.ODataType- Overrides:
postInjectin classEntity
-
getDescription
public Optional<String> getDescription()
“Description of the Role definition.”- Returns:
- property description
-
withDescription
public RoleDefinition withDescription(String description)
Returns an immutable copy ofthiswith just thedescriptionfield changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that whenthis. patch()is called (if available)on the returned object only the changed fields are submitted.“Description of the Role definition.”
- Parameters:
description- new value ofdescriptionfield (as defined in service metadata)- Returns:
- immutable copy of
thiswith just thedescriptionfield changed
-
getDisplayName
public Optional<String> getDisplayName()
“Display Name of the Role definition.”- Returns:
- property displayName
-
withDisplayName
public RoleDefinition withDisplayName(String displayName)
Returns an immutable copy ofthiswith just thedisplayNamefield changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that whenthis. patch()is called (if available)on the returned object only the changed fields are submitted.“Display Name of the Role definition.”
- Parameters:
displayName- new value ofdisplayNamefield (as defined in service metadata)- Returns:
- immutable copy of
thiswith just thedisplayNamefield changed
-
getIsBuiltIn
public Optional<Boolean> getIsBuiltIn()
“Type of Role. Set to True if it is built-in, or set to False if it is a custom role definition.”- Returns:
- property isBuiltIn
-
withIsBuiltIn
public RoleDefinition withIsBuiltIn(Boolean isBuiltIn)
Returns an immutable copy ofthiswith just theisBuiltInfield changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that whenthis.patch()is called (if available)on the returned object only the changed fields are submitted.“Type of Role. Set to True if it is built-in, or set to False if it is a custom role definition.”
- Parameters:
isBuiltIn- new value ofisBuiltInfield (as defined in service metadata)- Returns:
- immutable copy of
thiswith just theisBuiltInfield changed
-
getRolePermissions
public com.github.davidmoten.odata.client.CollectionPage<RolePermission> getRolePermissions()
“List of Role Permissions this role is allowed to perform. These must match the actionName that is defined as part of the rolePermission.”- Returns:
- property rolePermissions
-
withRolePermissions
public RoleDefinition withRolePermissions(List<RolePermission> rolePermissions)
Returns an immutable copy ofthiswith just therolePermissionsfield changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that whenthis. patch()is called (if available)on the returned object only the changed fields are submitted.“List of Role Permissions this role is allowed to perform. These must match the actionName that is defined as part of the rolePermission.”
- Parameters:
rolePermissions- new value ofrolePermissionsfield (as defined in service metadata)- Returns:
- immutable copy of
thiswith just therolePermissionsfield changed
-
getRolePermissions
public com.github.davidmoten.odata.client.CollectionPage<RolePermission> getRolePermissions(com.github.davidmoten.odata.client.HttpRequestOptions options)
“List of Role Permissions this role is allowed to perform. These must match the actionName that is defined as part of the rolePermission.”- Parameters:
options- specify connect and read timeouts- Returns:
- property rolePermissions
-
withUnmappedField
public RoleDefinition withUnmappedField(String name, Object value)
- Overrides:
withUnmappedFieldin classEntity
-
getRoleAssignments
public RoleAssignmentCollectionRequest getRoleAssignments()
“List of Role assignments for this role definition.”- Returns:
- navigational property roleAssignments
-
withRoleAssignments
public RoleDefinition withRoleAssignments(List<RoleAssignment> roleAssignments)
Returns an immutable copy ofthiswith just theroleAssignmentsfield changed. Field description below. The field name is also added to an internal map of changed fields in the returned object so that whenthis. patch()is called (if available)on the returned object only the changed fields are submitted.“List of Role assignments for this role definition.”
- Parameters:
roleAssignments- new value ofroleAssignmentsfield (as defined in service metadata)- Returns:
- immutable copy of
thiswith just theroleAssignmentsfield changed
-
getUnmappedFields
public com.github.davidmoten.odata.client.UnmappedFields getUnmappedFields()
- Specified by:
getUnmappedFieldsin interfacecom.github.davidmoten.odata.client.ODataType- Overrides:
getUnmappedFieldsin classEntity
-
patch
public RoleDefinition patch()
Submits only changed fields for update and returns an immutable copy ofthiswith changed fields reset.
-
put
public RoleDefinition put()
Submits all fields for update and returns an immutable copy ofthiswith changed fields reset (they were ignored anyway).
-
-