Record Class GetChatGifts
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.methods.GetChatGifts
- All Implemented Interfaces:
ApiMethod<OwnedGifts>
public record GetChatGifts(@NotNull String chatId, boolean excludeUnsaved, boolean excludeSaved, boolean excludeUnlimited, boolean excludeLimitedUpgradable, boolean excludeLimitedNonUpgradable, boolean excludeFromBlockchain, boolean excludeUnique, boolean sortByPrice, String offset, @IntRange(from=1L,to=100L) int limit)
extends Record
implements ApiMethod<OwnedGifts>
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface ApiMethod
OBJECT_MAPPER -
Constructor Summary
ConstructorsConstructorDescriptionGetChatGifts(@NotNull String chatId, boolean excludeUnsaved, boolean excludeSaved, boolean excludeUnlimited, boolean excludeLimitedUpgradable, boolean excludeLimitedNonUpgradable, boolean excludeFromBlockchain, boolean excludeUnique, boolean sortByPrice, String offset, @IntRange(from=1L,to=100L) int limit) Creates an instance of aGetChatGiftsrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull StringchatId()Returns the value of thechatIdrecord component.@NotNull OwnedGiftsdeserializeResponse(@NotNull String answer) Deserializes the response from the Telegram Bot API.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of theexcludeFromBlockchainrecord component.booleanReturns the value of theexcludeLimitedNonUpgradablerecord component.booleanReturns the value of theexcludeLimitedUpgradablerecord component.booleanReturns the value of theexcludeSavedrecord component.booleanReturns the value of theexcludeUniquerecord component.booleanReturns the value of theexcludeUnlimitedrecord component.booleanReturns the value of theexcludeUnsavedrecord component.@NotNull StringReturns the endpoint URL for the Telegram Bot API method.final inthashCode()Returns a hash code value for this object.@IntRange(from=1L,to=100L) intlimit()Returns the value of thelimitrecord component.static @NotNull GetChatGifts.Builderoffset()Returns the value of theoffsetrecord component.booleanReturns the value of thesortByPricerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface ApiMethod
deserializeResponse, deserializeResponseArray, deserializeResponseSerializable
-
Constructor Details
-
GetChatGifts
public GetChatGifts(@NotNull @NotNull String chatId, boolean excludeUnsaved, boolean excludeSaved, boolean excludeUnlimited, boolean excludeLimitedUpgradable, boolean excludeLimitedNonUpgradable, boolean excludeFromBlockchain, boolean excludeUnique, boolean sortByPrice, String offset, @IntRange(from=1L,to=100L) int limit) Creates an instance of aGetChatGiftsrecord class.- Parameters:
chatId- the value for thechatIdrecord componentexcludeUnsaved- the value for theexcludeUnsavedrecord componentexcludeSaved- the value for theexcludeSavedrecord componentexcludeUnlimited- the value for theexcludeUnlimitedrecord componentexcludeLimitedUpgradable- the value for theexcludeLimitedUpgradablerecord componentexcludeLimitedNonUpgradable- the value for theexcludeLimitedNonUpgradablerecord componentexcludeFromBlockchain- the value for theexcludeFromBlockchainrecord componentexcludeUnique- the value for theexcludeUniquerecord componentsortByPrice- the value for thesortByPricerecord componentoffset- the value for theoffsetrecord componentlimit- the value for thelimitrecord component
-
-
Method Details
-
ofBuilder
-
getEndpointURL
Description copied from interface:ApiMethodReturns the endpoint URL for the Telegram Bot API method.- Specified by:
getEndpointURLin interfaceApiMethod<OwnedGifts>- Returns:
- the endpoint URL
-
deserializeResponse
@NotNull public @NotNull OwnedGifts deserializeResponse(@NotNull @NotNull String answer) throws TelegramRequestException Description copied from interface:ApiMethodDeserializes the response from the Telegram Bot API.- Specified by:
deserializeResponsein interfaceApiMethod<OwnedGifts>- Parameters:
answer- the response from the Telegram Bot API- Returns:
- the deserialized response
- Throws:
TelegramRequestException- if an error occurs while deserializing the response
-
toBuilder
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
chatId
Returns the value of thechatIdrecord component.- Returns:
- the value of the
chatIdrecord component
-
excludeUnsaved
public boolean excludeUnsaved()Returns the value of theexcludeUnsavedrecord component.- Returns:
- the value of the
excludeUnsavedrecord component
-
excludeSaved
public boolean excludeSaved()Returns the value of theexcludeSavedrecord component.- Returns:
- the value of the
excludeSavedrecord component
-
excludeUnlimited
public boolean excludeUnlimited()Returns the value of theexcludeUnlimitedrecord component.- Returns:
- the value of the
excludeUnlimitedrecord component
-
excludeLimitedUpgradable
public boolean excludeLimitedUpgradable()Returns the value of theexcludeLimitedUpgradablerecord component.- Returns:
- the value of the
excludeLimitedUpgradablerecord component
-
excludeLimitedNonUpgradable
public boolean excludeLimitedNonUpgradable()Returns the value of theexcludeLimitedNonUpgradablerecord component.- Returns:
- the value of the
excludeLimitedNonUpgradablerecord component
-
excludeFromBlockchain
public boolean excludeFromBlockchain()Returns the value of theexcludeFromBlockchainrecord component.- Returns:
- the value of the
excludeFromBlockchainrecord component
-
excludeUnique
public boolean excludeUnique()Returns the value of theexcludeUniquerecord component.- Returns:
- the value of the
excludeUniquerecord component
-
sortByPrice
public boolean sortByPrice()Returns the value of thesortByPricerecord component.- Returns:
- the value of the
sortByPricerecord component
-
offset
Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-
limit
public @IntRange(from=1L,to=100L) int limit()Returns the value of thelimitrecord component.- Returns:
- the value of the
limitrecord component
-