Record Class GetUserGifts
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.methods.GetUserGifts
- All Implemented Interfaces:
ApiMethod<OwnedGifts>
public record GetUserGifts(long userId, boolean excludeUnlimited, boolean excludeLimitedUpgradable, boolean excludeLimitedNonUpgradable, boolean excludeFromBlockchain, boolean excludeUnique, boolean sortByPrice, String offset, @org.checkerframework.common.value.qual.IntRange(from=1L, to=100L) int limit)
extends Record
implements ApiMethod<OwnedGifts>
-
Field Summary
Fields inherited from interface org.teleight.teleightbots.api.ApiMethod
OBJECT_MAPPER -
Constructor Summary
ConstructorsConstructorDescriptionGetUserGifts(long userId, boolean excludeUnlimited, boolean excludeLimitedUpgradable, boolean excludeLimitedNonUpgradable, boolean excludeFromBlockchain, boolean excludeUnique, boolean sortByPrice, String offset, @org.checkerframework.common.value.qual.IntRange(from=1L, to=100L) int limit) Creates an instance of aGetUserGiftsrecord class. -
Method Summary
Modifier and TypeMethodDescription@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 theexcludeUniquerecord component.booleanReturns the value of theexcludeUnlimitedrecord component.@NotNull StringReturns the endpoint URL for the Telegram Bot API method.final inthashCode()Returns a hash code value for this object.@org.checkerframework.common.value.qual.IntRange(from=1L, to=100L) intlimit()Returns the value of thelimitrecord component.static @NotNull lombok.BuilderofBuilder(long userId) offset()Returns the value of theoffsetrecord component.booleanReturns the value of thesortByPricerecord component.final StringtoString()Returns a string representation of this record class.longuserId()Returns the value of theuserIdrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.teleight.teleightbots.api.ApiMethod
deserializeResponse, deserializeResponseArray, deserializeResponseSerializable
-
Constructor Details
-
GetUserGifts
public GetUserGifts(long userId, boolean excludeUnlimited, boolean excludeLimitedUpgradable, boolean excludeLimitedNonUpgradable, boolean excludeFromBlockchain, boolean excludeUnique, boolean sortByPrice, String offset, @org.checkerframework.common.value.qual.IntRange(from=1L, to=100L) int limit) Creates an instance of aGetUserGiftsrecord class.- Parameters:
userId- the value for theuserIdrecord 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
@NotNull public static @NotNull lombok.Builder ofBuilder(long userId) -
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
-
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 '=='. -
userId
public long userId()Returns the value of theuserIdrecord component.- Returns:
- the value of the
userIdrecord 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 @org.checkerframework.common.value.qual.IntRange(from=1L, to=100L) int limit()Returns the value of thelimitrecord component.- Returns:
- the value of the
limitrecord component
-