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 -
Constructor Summary
ConstructorsConstructorDescriptionTicket(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 aTicketrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable Stringcategory()Returns the value of thecategoryrecord component.@Nullable UUIDReturns the value of theclaimedByrecord component.@Nullable StringReturns the value of theclaimedByUsernamerecord component.@Nullable LongclosedAt()Returns the value of theclosedAtrecord component.@Nullable UUIDclosedBy()Returns the value of theclosedByrecord component.@Nullable StringReturns the value of theclosedByUsernamerecord component.longReturns the value of thecreatedAtrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longid()Returns the value of theidrecord component.player()Returns the value of theplayerrecord component.Returns the value of theplayerLastKnownUsernamerecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.
-
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 aTicketrecord class.- Parameters:
id- the value for theidrecord componentplayer- the value for theplayerrecord componentplayerLastKnownUsername- the value for theplayerLastKnownUsernamerecord componentcategory- the value for thecategoryrecord componentstatus- the value for thestatusrecord componentclaimedBy- the value for theclaimedByrecord componentclaimedByUsername- the value for theclaimedByUsernamerecord componentcreatedAt- the value for thecreatedAtrecord componentclosedAt- the value for theclosedAtrecord componentclosedBy- the value for theclosedByrecord componentclosedByUsername- the value for theclosedByUsernamerecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
id
public long id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
player
Returns the value of theplayerrecord component.- Returns:
- the value of the
playerrecord component
-
playerLastKnownUsername
Returns the value of theplayerLastKnownUsernamerecord component.- Returns:
- the value of the
playerLastKnownUsernamerecord component
-
category
Returns the value of thecategoryrecord component.- Returns:
- the value of the
categoryrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
claimedBy
Returns the value of theclaimedByrecord component.- Returns:
- the value of the
claimedByrecord component
-
claimedByUsername
Returns the value of theclaimedByUsernamerecord component.- Returns:
- the value of the
claimedByUsernamerecord component
-
createdAt
public long createdAt()Returns the value of thecreatedAtrecord component.- Returns:
- the value of the
createdAtrecord component
-
closedAt
Returns the value of theclosedAtrecord component.- Returns:
- the value of the
closedAtrecord component
-
closedBy
Returns the value of theclosedByrecord component.- Returns:
- the value of the
closedByrecord component
-
closedByUsername
Returns the value of theclosedByUsernamerecord component.- Returns:
- the value of the
closedByUsernamerecord component
-