Record Class Permission

java.lang.Object
java.lang.Record
net.flectone.pulse.config.Permission

public record Permission(Permission.PermissionEntry module, Permission.Command command, Permission.Integration integration, Permission.Message message) extends Record
Configuration for permissions in FlectonePulse. Contains all permissions and their types.
Since:
1.0
  • Constructor Details

    • Permission

      public Permission(@JsonPropertyDescription(" https://flectone.net/pulse/docs/config/module") Permission.PermissionEntry module, @JsonPropertyDescription(" https://flectone.net/pulse/docs/command") Permission.Command command, @JsonPropertyDescription(" https://flectone.net/pulse/docs/integration") Permission.Integration integration, @JsonPropertyDescription(" https://flectone.net/pulse/docs/message") Permission.Message message)
      Creates an instance of a Permission record class.
      Parameters:
      module - the value for the module record component
      command - the value for the command record component
      integration - the value for the integration record component
      message - the value for the message record component
  • Method Details

    • builder

      public static Permission.PermissionBuilder builder()
    • toBuilder

      public Permission.PermissionBuilder toBuilder()
    • withModule

      public Permission withModule(Permission.PermissionEntry module)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withCommand

      public Permission withCommand(Permission.Command command)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withIntegration

      public Permission withIntegration(Permission.Integration integration)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withMessage

      public Permission withMessage(Permission.Message message)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • module

      @JsonPropertyDescription(" https://flectone.net/pulse/docs/config/module") public Permission.PermissionEntry module()
      Returns the value of the module record component.
      Returns:
      the value of the module record component
    • command

      @JsonPropertyDescription(" https://flectone.net/pulse/docs/command") public Permission.Command command()
      Returns the value of the command record component.
      Returns:
      the value of the command record component
    • integration

      @JsonPropertyDescription(" https://flectone.net/pulse/docs/integration") public Permission.Integration integration()
      Returns the value of the integration record component.
      Returns:
      the value of the integration record component
    • message

      @JsonPropertyDescription(" https://flectone.net/pulse/docs/message") public Permission.Message message()
      Returns the value of the message record component.
      Returns:
      the value of the message record component