Package dev.tobee.telegram.request.body
Record Class PromoteChatMemberBody
java.lang.Object
java.lang.Record
dev.tobee.telegram.request.body.PromoteChatMemberBody
public record PromoteChatMemberBody(long chatId, int userId, Optional<Boolean> is_anonymous, Optional<Boolean> canManageChat, Optional<Boolean> canPostMessages, Optional<Boolean> canEditMessages, Optional<Boolean> canDeleteMessages, Optional<Boolean> canManageVoiceChats, Optional<Boolean> canRestrictMembers, Optional<Boolean> canPromoteMembers, Optional<Boolean> canChangeInfo, Optional<Boolean> canInviteUsers, Optional<Boolean> canPinMessages)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionPromoteChatMemberBody(long chatId, int userId, Optional<Boolean> is_anonymous, Optional<Boolean> canManageChat, Optional<Boolean> canPostMessages, Optional<Boolean> canEditMessages, Optional<Boolean> canDeleteMessages, Optional<Boolean> canManageVoiceChats, Optional<Boolean> canRestrictMembers, Optional<Boolean> canPromoteMembers, Optional<Boolean> canChangeInfo, Optional<Boolean> canInviteUsers, Optional<Boolean> canPinMessages)Creates an instance of aPromoteChatMemberBodyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecanChangeInforecord component.Returns the value of thecanDeleteMessagesrecord component.Returns the value of thecanEditMessagesrecord component.Returns the value of thecanInviteUsersrecord component.Returns the value of thecanManageChatrecord component.Returns the value of thecanManageVoiceChatsrecord component.Returns the value of thecanPinMessagesrecord component.Returns the value of thecanPostMessagesrecord component.Returns the value of thecanPromoteMembersrecord component.Returns the value of thecanRestrictMembersrecord component.longchatId()Returns the value of thechatIdrecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.Returns the value of theis_anonymousrecord component.toString()Returns a string representation of this record class.intuserId()Returns the value of theuserIdrecord component.
-
Constructor Details
-
PromoteChatMemberBody
public PromoteChatMemberBody(long chatId, int userId, Optional<Boolean> is_anonymous, Optional<Boolean> canManageChat, Optional<Boolean> canPostMessages, Optional<Boolean> canEditMessages, Optional<Boolean> canDeleteMessages, Optional<Boolean> canManageVoiceChats, Optional<Boolean> canRestrictMembers, Optional<Boolean> canPromoteMembers, Optional<Boolean> canChangeInfo, Optional<Boolean> canInviteUsers, Optional<Boolean> canPinMessages)Creates an instance of aPromoteChatMemberBodyrecord class.- Parameters:
chatId- the value for thechatIdrecord componentuserId- the value for theuserIdrecord componentis_anonymous- the value for theis_anonymousrecord componentcanManageChat- the value for thecanManageChatrecord componentcanPostMessages- the value for thecanPostMessagesrecord componentcanEditMessages- the value for thecanEditMessagesrecord componentcanDeleteMessages- the value for thecanDeleteMessagesrecord componentcanManageVoiceChats- the value for thecanManageVoiceChatsrecord componentcanRestrictMembers- the value for thecanRestrictMembersrecord componentcanPromoteMembers- the value for thecanPromoteMembersrecord componentcanChangeInfo- the value for thecanChangeInforecord componentcanInviteUsers- the value for thecanInviteUsersrecord componentcanPinMessages- the value for thecanPinMessagesrecord 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 '=='. -
chatId
public long chatId()Returns the value of thechatIdrecord component.- Returns:
- the value of the
chatIdrecord component
-
userId
public int userId()Returns the value of theuserIdrecord component.- Returns:
- the value of the
userIdrecord component
-
is_anonymous
Returns the value of theis_anonymousrecord component.- Returns:
- the value of the
is_anonymousrecord component
-
canManageChat
Returns the value of thecanManageChatrecord component.- Returns:
- the value of the
canManageChatrecord component
-
canPostMessages
Returns the value of thecanPostMessagesrecord component.- Returns:
- the value of the
canPostMessagesrecord component
-
canEditMessages
Returns the value of thecanEditMessagesrecord component.- Returns:
- the value of the
canEditMessagesrecord component
-
canDeleteMessages
Returns the value of thecanDeleteMessagesrecord component.- Returns:
- the value of the
canDeleteMessagesrecord component
-
canManageVoiceChats
Returns the value of thecanManageVoiceChatsrecord component.- Returns:
- the value of the
canManageVoiceChatsrecord component
-
canRestrictMembers
Returns the value of thecanRestrictMembersrecord component.- Returns:
- the value of the
canRestrictMembersrecord component
-
canPromoteMembers
Returns the value of thecanPromoteMembersrecord component.- Returns:
- the value of the
canPromoteMembersrecord component
-
canChangeInfo
Returns the value of thecanChangeInforecord component.- Returns:
- the value of the
canChangeInforecord component
-
canInviteUsers
Returns the value of thecanInviteUsersrecord component.- Returns:
- the value of the
canInviteUsersrecord component
-
canPinMessages
Returns the value of thecanPinMessagesrecord component.- Returns:
- the value of the
canPinMessagesrecord component
-