Class TemplateChannel.PermissionOverride
- java.lang.Object
-
- net.dv8tion.jda.api.entities.templates.TemplateChannel.PermissionOverride
-
- All Implemented Interfaces:
ISnowflake
- Enclosing class:
- TemplateChannel
public static class TemplateChannel.PermissionOverride extends java.lang.Object implements ISnowflake
Represents the specificRole
permission overrides that can be set for channels.- See Also:
TemplateChannel.getPermissionOverrides()
-
-
Constructor Summary
Constructors Constructor Description PermissionOverride(long id, long allow, long deny)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.EnumSet<Permission>
getAllowed()
EnumSet of allPermissions
that are specifically allowed by this override.long
getAllowedRaw()
This is the raw binary representation (as a base 10 long) of the permissions allowed by this override.java.util.EnumSet<Permission>
getDenied()
EnumSet of allPermissions
that are denied by this override.long
getDeniedRaw()
This is the raw binary representation (as a base 10 long) of the permissions denied by this override.long
getIdLong()
The ids of roles are their position as stored by Discord so this will not look like a typical snowflake.java.util.EnumSet<Permission>
getInherit()
EnumSet of allPermission
that are unaffected by this override.long
getInheritRaw()
This is the raw binary representation (as a base 10 long) of the permissions not affected by this override.java.time.OffsetDateTime
getTimeCreated()
As the ids of roles are their position, the date of creation cannot be calculated.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId
-
-
-
-
Method Detail
-
getAllowedRaw
public long getAllowedRaw()
This is the raw binary representation (as a base 10 long) of the permissions allowed by this override.
The long relates to the offsets used by eachPermission
.- Returns:
- Never-negative long containing the binary representation of the allowed permissions of this override.
-
getInheritRaw
public long getInheritRaw()
This is the raw binary representation (as a base 10 long) of the permissions not affected by this override.
The long relates to the offsets used by eachPermission
.- Returns:
- Never-negative long containing the binary representation of the unaffected permissions of this override.
-
getDeniedRaw
public long getDeniedRaw()
This is the raw binary representation (as a base 10 long) of the permissions denied by this override.
The long relates to the offsets used by eachPermission
.- Returns:
- Never-negative long containing the binary representation of the denied permissions of this override.
-
getAllowed
@Nonnull public java.util.EnumSet<Permission> getAllowed()
EnumSet of allPermissions
that are specifically allowed by this override.
Changes to the returned set do not affect this entity directly.- Returns:
- Possibly-empty set of allowed
Permissions
.
-
getInherit
@Nonnull public java.util.EnumSet<Permission> getInherit()
EnumSet of allPermission
that are unaffected by this override.
Changes to the returned set do not affect this entity directly.- Returns:
- Possibly-empty set of unaffected
Permissions
.
-
getDenied
@Nonnull public java.util.EnumSet<Permission> getDenied()
EnumSet of allPermissions
that are denied by this override.
Changes to the returned set do not affect this entity directly.- Returns:
- Possibly-empty set of denied
Permissions
.
-
getIdLong
public long getIdLong()
The ids of roles are their position as stored by Discord so this will not look like a typical snowflake.- Specified by:
getIdLong
in interfaceISnowflake
- Returns:
- The id for the role this override is for
-
getTimeCreated
public java.time.OffsetDateTime getTimeCreated()
As the ids of roles are their position, the date of creation cannot be calculated.- Specified by:
getTimeCreated
in interfaceISnowflake
- Returns:
- OffsetDateTime - Time this entity was created at.
- Throws:
java.lang.UnsupportedOperationException
- The date of creation cannot be calculated.- See Also:
TimeUtil.getTimeCreated(long)
-
-