# TdApi.PremiumState (tdlight API 4.0.311 API)
declaration: module: tdlight.api, package: it.tdlight.jni, class: TdApi, class: PremiumState

Module tdlight.api
Package it.tdlight.jni

# Class TdApi.PremiumState

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.PremiumState

Enclosing class:
  TdApi

public static final class TdApi.PremiumState extends TdApi.Object
Contains state of Telegram Premium subscription and promotion videos for Premium features.

## Field Summary

Fields
Modifier and Type
Field
Description
`TdApi.PremiumFeaturePromotionAnimation[]`
`animations`
The list of available promotion animations for Premium features.
`static final int`
`CONSTRUCTOR`
`TdApi.PremiumStatePaymentOption[]`
`paymentOptions`
The list of available options for buying Telegram Premium.
`TdApi.FormattedText`
`state`
Text description of the state of the current Premium subscription; may be empty if the current user has no Telegram Premium subscription.

## Constructor Summary

Constructors
Constructor
Description
`PremiumState()`
Contains state of Telegram Premium subscription and promotion videos for Premium features.
`PremiumState(TdApi.FormattedText state, TdApi.PremiumStatePaymentOption[] paymentOptions, TdApi.PremiumFeaturePromotionAnimation[] animations)`
Contains state of Telegram Premium subscription and promotion videos for Premium features.
`PremiumState(DataInput input)`
Contains state of Telegram Premium subscription and promotion videos for Premium features.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`int`
`getConstructor()`
`int`
`hashCode()`
`void`
`serialize(DataOutput output)`

### Methods inherited from class it.tdlight.jni.TdApi.Object

`serialize, toString`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### state

public TdApi.FormattedText state
Text description of the state of the current Premium subscription; may be empty if the current user has no Telegram Premium subscription.

### paymentOptions

public TdApi.PremiumStatePaymentOption[] paymentOptions
The list of available options for buying Telegram Premium.

### animations

public TdApi.PremiumFeaturePromotionAnimation[] animations
The list of available promotion animations for Premium features.

### CONSTRUCTOR

public static final int CONSTRUCTOR

See Also:
  - Constant Field Values

## Constructor Details

### PremiumState

public PremiumState()
Contains state of Telegram Premium subscription and promotion videos for Premium features.

### PremiumState

public PremiumState(TdApi.FormattedText state, TdApi.PremiumStatePaymentOption[] paymentOptions, TdApi.PremiumFeaturePromotionAnimation[] animations)
Contains state of Telegram Premium subscription and promotion videos for Premium features.

Parameters:
  `state` - FormattedText Text description of the state of the current Premium subscription; may be empty if the current user has no Telegram Premium subscription.
  `paymentOptions` - PremiumStatePaymentOption[] The list of available options for buying Telegram Premium.
  `animations` - PremiumFeaturePromotionAnimation[] The list of available promotion animations for Premium features.

### PremiumState

public PremiumState(DataInput input) throws IOException
Contains state of Telegram Premium subscription and promotion videos for Premium features.

Throws:
  `IOException`

## Method Details

### getConstructor

public int getConstructor()

Specified by:
  `getConstructor` in class `TdApi.Object`

### serialize

public void serialize(DataOutput output) throws IOException

Specified by:
  `serialize` in class `TdApi.Object`
Throws:
  `IOException`

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`