Package dev.tobee.telegram.model.chat
Record Class ChatPermissions
java.lang.Object
java.lang.Record
dev.tobee.telegram.model.chat.ChatPermissions
public record ChatPermissions(Optional<Boolean> canSendMessages, Optional<Boolean> canSendMediaMessages, Optional<Boolean> canSendPolls, Optional<Boolean> canSendOtherMessages, Optional<Boolean> canAddWebPagePreviews, Optional<Boolean> canChangeInfo, Optional<Boolean> canInviteUsers, Optional<Boolean> canPinMessages)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionChatPermissions(Optional<Boolean> canSendMessages, Optional<Boolean> canSendMediaMessages, Optional<Boolean> canSendPolls, Optional<Boolean> canSendOtherMessages, Optional<Boolean> canAddWebPagePreviews, Optional<Boolean> canChangeInfo, Optional<Boolean> canInviteUsers, Optional<Boolean> canPinMessages) Creates an instance of aChatPermissionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecanAddWebPagePreviewsrecord component.Returns the value of thecanChangeInforecord component.Returns the value of thecanInviteUsersrecord component.Returns the value of thecanPinMessagesrecord component.Returns the value of thecanSendMediaMessagesrecord component.Returns the value of thecanSendMessagesrecord component.Returns the value of thecanSendOtherMessagesrecord component.Returns the value of thecanSendPollsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ChatPermissions
public ChatPermissions(Optional<Boolean> canSendMessages, Optional<Boolean> canSendMediaMessages, Optional<Boolean> canSendPolls, Optional<Boolean> canSendOtherMessages, Optional<Boolean> canAddWebPagePreviews, Optional<Boolean> canChangeInfo, Optional<Boolean> canInviteUsers, Optional<Boolean> canPinMessages) Creates an instance of aChatPermissionsrecord class.- Parameters:
canSendMessages- the value for thecanSendMessagesrecord componentcanSendMediaMessages- the value for thecanSendMediaMessagesrecord componentcanSendPolls- the value for thecanSendPollsrecord componentcanSendOtherMessages- the value for thecanSendOtherMessagesrecord componentcanAddWebPagePreviews- the value for thecanAddWebPagePreviewsrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
canSendMessages
Returns the value of thecanSendMessagesrecord component.- Returns:
- the value of the
canSendMessagesrecord component
-
canSendMediaMessages
Returns the value of thecanSendMediaMessagesrecord component.- Returns:
- the value of the
canSendMediaMessagesrecord component
-
canSendPolls
Returns the value of thecanSendPollsrecord component.- Returns:
- the value of the
canSendPollsrecord component
-
canSendOtherMessages
Returns the value of thecanSendOtherMessagesrecord component.- Returns:
- the value of the
canSendOtherMessagesrecord component
-
canAddWebPagePreviews
Returns the value of thecanAddWebPagePreviewsrecord component.- Returns:
- the value of the
canAddWebPagePreviewsrecord 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
-