Record Class UniqueGiftInfo
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.UniqueGiftInfo
- All Implemented Interfaces:
Serializable,ApiResult
public record UniqueGiftInfo(@NotNull UniqueGift gift, @NotNull UniqueGiftOrigin origin, TelegramCurrency lastResaleCurrency, int lastResaleAmount, @Nullable String ownedGiftId, @Nullable Integer transferStarCount, @Nullable Date nextTransferDate)
extends Record
implements ApiResult
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUniqueGiftInfo(@NotNull UniqueGift gift, @NotNull UniqueGiftOrigin origin, TelegramCurrency lastResaleCurrency, int lastResaleAmount, @Nullable String ownedGiftId, @Nullable Integer transferStarCount, @Nullable Date nextTransferDate) Creates an instance of aUniqueGiftInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@NotNull UniqueGiftgift()Returns the value of thegiftrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of thelastResaleAmountrecord component.Returns the value of thelastResaleCurrencyrecord component.@Nullable DateReturns the value of thenextTransferDaterecord component.@NotNull UniqueGiftOriginorigin()Returns the value of theoriginrecord component.@Nullable StringReturns the value of theownedGiftIdrecord component.final StringtoString()Returns a string representation of this record class.@Nullable IntegerReturns the value of thetransferStarCountrecord component.
-
Constructor Details
-
UniqueGiftInfo
public UniqueGiftInfo(@NotNull @NotNull UniqueGift gift, @NotNull @NotNull UniqueGiftOrigin origin, TelegramCurrency lastResaleCurrency, int lastResaleAmount, @Nullable @Nullable String ownedGiftId, @Nullable @Nullable Integer transferStarCount, @Nullable @Nullable Date nextTransferDate) Creates an instance of aUniqueGiftInforecord class.- Parameters:
gift- the value for thegiftrecord componentorigin- the value for theoriginrecord componentlastResaleCurrency- the value for thelastResaleCurrencyrecord componentlastResaleAmount- the value for thelastResaleAmountrecord componentownedGiftId- the value for theownedGiftIdrecord componenttransferStarCount- the value for thetransferStarCountrecord componentnextTransferDate- the value for thenextTransferDaterecord 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 '=='. -
gift
Returns the value of thegiftrecord component.- Returns:
- the value of the
giftrecord component
-
origin
Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-
lastResaleCurrency
Returns the value of thelastResaleCurrencyrecord component.- Returns:
- the value of the
lastResaleCurrencyrecord component
-
lastResaleAmount
public int lastResaleAmount()Returns the value of thelastResaleAmountrecord component.- Returns:
- the value of the
lastResaleAmountrecord component
-
ownedGiftId
Returns the value of theownedGiftIdrecord component.- Returns:
- the value of the
ownedGiftIdrecord component
-
transferStarCount
Returns the value of thetransferStarCountrecord component.- Returns:
- the value of the
transferStarCountrecord component
-
nextTransferDate
Returns the value of thenextTransferDaterecord component.- Returns:
- the value of the
nextTransferDaterecord component
-