Record Class Ticket

java.lang.Object
java.lang.Record
fr.mathildeuh.youneedme.api.tickets.Ticket

public record Ticket(long id, UUID player, String playerLastKnownUsername, @Nullable String category, Ticket.Status status, @Nullable UUID claimedBy, @Nullable String claimedByUsername, long createdAt, @Nullable Long closedAt, @Nullable UUID closedBy, @Nullable String closedByUsername) extends Record
A player support ticket, from creation through an optional staff claim to closure.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Ticket(long id, UUID player, String playerLastKnownUsername, @Nullable String category, Ticket.Status status, @Nullable UUID claimedBy, @Nullable String claimedByUsername, long createdAt, @Nullable Long closedAt, @Nullable UUID closedBy, @Nullable String closedByUsername)
    Creates an instance of a Ticket record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable String
    Returns the value of the category record component.
    @Nullable UUID
    Returns the value of the claimedBy record component.
    @Nullable String
    Returns the value of the claimedByUsername record component.
    @Nullable Long
    Returns the value of the closedAt record component.
    @Nullable UUID
    Returns the value of the closedBy record component.
    @Nullable String
    Returns the value of the closedByUsername record component.
    long
    Returns the value of the createdAt record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    long
    id()
    Returns the value of the id record component.
    Returns the value of the player record component.
    Returns the value of the playerLastKnownUsername record component.
    Returns the value of the status record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Ticket

      public Ticket(long id, UUID player, String playerLastKnownUsername, @Nullable @Nullable String category, Ticket.Status status, @Nullable @Nullable UUID claimedBy, @Nullable @Nullable String claimedByUsername, long createdAt, @Nullable @Nullable Long closedAt, @Nullable @Nullable UUID closedBy, @Nullable @Nullable String closedByUsername)
      Creates an instance of a Ticket record class.
      Parameters:
      id - the value for the id record component
      player - the value for the player record component
      playerLastKnownUsername - the value for the playerLastKnownUsername record component
      category - the value for the category record component
      status - the value for the status record component
      claimedBy - the value for the claimedBy record component
      claimedByUsername - the value for the claimedByUsername record component
      createdAt - the value for the createdAt record component
      closedAt - the value for the closedAt record component
      closedBy - the value for the closedBy record component
      closedByUsername - the value for the closedByUsername record component
  • Method Details

    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • id

      public long id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • player

      public UUID player()
      Returns the value of the player record component.
      Returns:
      the value of the player record component
    • playerLastKnownUsername

      public String playerLastKnownUsername()
      Returns the value of the playerLastKnownUsername record component.
      Returns:
      the value of the playerLastKnownUsername record component
    • category

      @Nullable public @Nullable String category()
      Returns the value of the category record component.
      Returns:
      the value of the category record component
    • status

      public Ticket.Status status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • claimedBy

      @Nullable public @Nullable UUID claimedBy()
      Returns the value of the claimedBy record component.
      Returns:
      the value of the claimedBy record component
    • claimedByUsername

      @Nullable public @Nullable String claimedByUsername()
      Returns the value of the claimedByUsername record component.
      Returns:
      the value of the claimedByUsername record component
    • createdAt

      public long createdAt()
      Returns the value of the createdAt record component.
      Returns:
      the value of the createdAt record component
    • closedAt

      @Nullable public @Nullable Long closedAt()
      Returns the value of the closedAt record component.
      Returns:
      the value of the closedAt record component
    • closedBy

      @Nullable public @Nullable UUID closedBy()
      Returns the value of the closedBy record component.
      Returns:
      the value of the closedBy record component
    • closedByUsername

      @Nullable public @Nullable String closedByUsername()
      Returns the value of the closedByUsername record component.
      Returns:
      the value of the closedByUsername record component