Record Class PollOptionAdded

java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.PollOptionAdded
All Implemented Interfaces:
Serializable, ApiResult

public record PollOptionAdded(@Nullable MaybeInaccessibleMessage pollMessage, @NotNull String optionPersistentId, @NotNull String optionText, @Nullable List<MessageEntity> optionTextEntities) extends Record implements ApiResult
See Also:
  • Constructor Details

    • PollOptionAdded

      public PollOptionAdded(@Nullable @Nullable MaybeInaccessibleMessage pollMessage, @NotNull @NotNull String optionPersistentId, @NotNull @NotNull String optionText, @Nullable @Nullable List<MessageEntity> optionTextEntities)
      Creates an instance of a PollOptionAdded record class.
      Parameters:
      pollMessage - the value for the pollMessage record component
      optionPersistentId - the value for the optionPersistentId record component
      optionText - the value for the optionText record component
      optionTextEntities - the value for the optionTextEntities record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • pollMessage

      @Nullable public @Nullable MaybeInaccessibleMessage pollMessage()
      Returns the value of the pollMessage record component.
      Returns:
      the value of the pollMessage record component
    • optionPersistentId

      @NotNull public @NotNull String optionPersistentId()
      Returns the value of the optionPersistentId record component.
      Returns:
      the value of the optionPersistentId record component
    • optionText

      @NotNull public @NotNull String optionText()
      Returns the value of the optionText record component.
      Returns:
      the value of the optionText record component
    • optionTextEntities

      @Nullable public @Nullable List<MessageEntity> optionTextEntities()
      Returns the value of the optionTextEntities record component.
      Returns:
      the value of the optionTextEntities record component