Record Class SharedUser
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.SharedUser
- All Implemented Interfaces:
Serializable,ApiResult
public record SharedUser(long userId, @Nullable String firstName, @Nullable String lastName, @Nullable String username, @Nullable PhotoSize[] photo)
extends Record
implements ApiResult
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSharedUser(long userId, @Nullable String firstName, @Nullable String lastName, @Nullable String username, @Nullable PhotoSize[] photo) Creates an instance of aSharedUserrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@Nullable StringReturns the value of thefirstNamerecord component.final inthashCode()Returns a hash code value for this object.@Nullable StringlastName()Returns the value of thelastNamerecord component.@Nullable PhotoSize[]photo()Returns the value of thephotorecord component.final StringtoString()Returns a string representation of this record class.longuserId()Returns the value of theuserIdrecord component.@Nullable Stringusername()Returns the value of theusernamerecord component.
-
Constructor Details
-
SharedUser
public SharedUser(long userId, @Nullable @Nullable String firstName, @Nullable @Nullable String lastName, @Nullable @Nullable String username, @Nullable @Nullable PhotoSize[] photo) Creates an instance of aSharedUserrecord class.- Parameters:
userId- the value for theuserIdrecord componentfirstName- the value for thefirstNamerecord componentlastName- the value for thelastNamerecord componentusername- the value for theusernamerecord componentphoto- the value for thephotorecord component
-
-
Method Details
-
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 '=='. -
userId
public long userId()Returns the value of theuserIdrecord component.- Returns:
- the value of the
userIdrecord component
-
firstName
Returns the value of thefirstNamerecord component.- Returns:
- the value of the
firstNamerecord component
-
lastName
Returns the value of thelastNamerecord component.- Returns:
- the value of the
lastNamerecord component
-
username
Returns the value of theusernamerecord component.- Returns:
- the value of the
usernamerecord component
-
photo
Returns the value of thephotorecord component.- Returns:
- the value of the
photorecord component
-