Package io.datarouter.auth.model.dto
Record Class UserRoleMetadata
java.lang.Object
java.lang.Record
io.datarouter.auth.model.dto.UserRoleMetadata
public record UserRoleMetadata(Role role, boolean hasRole, Map<RoleApprovalType,RoleApprovalRequirementStatus> requirementStatusByApprovalType, Optional<RoleApprovalType> editorPrioritizedApprovalType, Optional<Boolean> editorCanRevoke, List<String> groupsHasWithRole)
extends Record
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionUserRoleMetadata(Role role, boolean hasRole, Map<RoleApprovalType, RoleApprovalRequirementStatus> requirementStatusByApprovalType, Optional<RoleApprovalType> editorPrioritizedApprovalType, Optional<Boolean> editorCanRevoke, List<String> groupsHasWithRole) Creates an instance of aUserRoleMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theeditorCanRevokerecord component.Returns the value of theeditorPrioritizedApprovalTyperecord component.final booleanIndicates whether some other object is "equal to" this one.getChangeString(UserRoleMetadata oldRoleMetaData) Returns the value of thegroupsHasWithRolerecord component.final inthashCode()Returns a hash code value for this object.booleanhasRole()Returns the value of thehasRolerecord component.Returns the value of therequirementStatusByApprovalTyperecord component.role()Returns the value of therolerecord component.toJsDto()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
UserRoleMetadata
public UserRoleMetadata(Role role, boolean hasRole, Map<RoleApprovalType, RoleApprovalRequirementStatus> requirementStatusByApprovalType, Optional<RoleApprovalType> editorPrioritizedApprovalType, Optional<Boolean> editorCanRevoke, List<String> groupsHasWithRole) Creates an instance of aUserRoleMetadatarecord class.- Parameters:
role- the value for therolerecord componenthasRole- the value for thehasRolerecord componentrequirementStatusByApprovalType- the value for therequirementStatusByApprovalTyperecord componenteditorPrioritizedApprovalType- the value for theeditorPrioritizedApprovalTyperecord componenteditorCanRevoke- the value for theeditorCanRevokerecord componentgroupsHasWithRole- the value for thegroupsHasWithRolerecord component
-
-
Method Details
-
getChangeString
-
toJsDto
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
role
Returns the value of therolerecord component.- Returns:
- the value of the
rolerecord component
-
hasRole
public boolean hasRole()Returns the value of thehasRolerecord component.- Returns:
- the value of the
hasRolerecord component
-
requirementStatusByApprovalType
Returns the value of therequirementStatusByApprovalTyperecord component.- Returns:
- the value of the
requirementStatusByApprovalTyperecord component
-
editorPrioritizedApprovalType
Returns the value of theeditorPrioritizedApprovalTyperecord component.- Returns:
- the value of the
editorPrioritizedApprovalTyperecord component
-
editorCanRevoke
Returns the value of theeditorCanRevokerecord component.- Returns:
- the value of the
editorCanRevokerecord component
-
groupsHasWithRole
Returns the value of thegroupsHasWithRolerecord component.- Returns:
- the value of the
groupsHasWithRolerecord component
-