Record Class BusinessConnection
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.BusinessConnection
- All Implemented Interfaces:
Serializable,ApiResult
public record BusinessConnection(@NotNull String id, @NotNull User user, @NotNull Long userChatId, int date, @Nullable BusinessBotRights rights, boolean isEnabled)
extends Record
implements ApiResult
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBusinessConnection(@NotNull String id, @NotNull User user, @NotNull Long userChatId, int date, @Nullable BusinessBotRights rights, boolean isEnabled) Creates an instance of aBusinessConnectionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintdate()Returns the value of thedaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Stringid()Returns the value of theidrecord component.booleanReturns the value of theisEnabledrecord component.@Nullable BusinessBotRightsrights()Returns the value of therightsrecord component.final StringtoString()Returns a string representation of this record class.@NotNull Useruser()Returns the value of theuserrecord component.@NotNull LongReturns the value of theuserChatIdrecord component.
-
Constructor Details
-
BusinessConnection
public BusinessConnection(@NotNull @NotNull String id, @NotNull @NotNull User user, @NotNull @NotNull Long userChatId, int date, @Nullable @Nullable BusinessBotRights rights, boolean isEnabled) Creates an instance of aBusinessConnectionrecord class.- Parameters:
id- the value for theidrecord componentuser- the value for theuserrecord componentuserChatId- the value for theuserChatIdrecord componentdate- the value for thedaterecord componentrights- the value for therightsrecord componentisEnabled- the value for theisEnabledrecord 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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
user
Returns the value of theuserrecord component.- Returns:
- the value of the
userrecord component
-
userChatId
Returns the value of theuserChatIdrecord component.- Returns:
- the value of the
userChatIdrecord component
-
date
public int date()Returns the value of thedaterecord component.- Returns:
- the value of the
daterecord component
-
rights
Returns the value of therightsrecord component.- Returns:
- the value of the
rightsrecord component
-
isEnabled
public boolean isEnabled()Returns the value of theisEnabledrecord component.- Returns:
- the value of the
isEnabledrecord component
-