Module tdlight.api
Package it.tdlight.jni

# Class TdApi.Session

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

Enclosing class:
  TdApi

public static final class TdApi.Session extends TdApi.Object
Contains information about one session in a Telegram application used by the current user. Sessions must be shown to the user in the returned order.

## Field Summary

Fields
Modifier and Type
Field
Description
`int`
`apiId`
Telegram API identifier, as provided by the application.
`String`
`applicationName`
Name of the application, as provided by the application.
`String`
`applicationVersion`
The version of the application, as provided by the application.
`static final int`
`CONSTRUCTOR`
`String`
`country`
A two-letter country code for the country from which the session was created, based on the IP address.
`String`
`deviceModel`
Model of the device the application has been run or is running on, as provided by the application.
`long`
`id`
Session identifier.
`String`
`ip`
IP address from which the session was created, in human-readable format.
`boolean`
`isCurrent`
True, if this session is the current session.
`boolean`
`isOfficialApplication`
True, if the application is an official application or uses the apiId of an official application.
`boolean`
`isPasswordPending`
True, if a password is needed to complete authorization of the session.
`int`
`lastActiveDate`
Point in time (Unix timestamp) when the session was last used.
`int`
`logInDate`
Point in time (Unix timestamp) when the user has logged in.
`String`
`platform`
Operating system the application has been run or is running on, as provided by the application.
`String`
`region`
Region code from which the session was created, based on the IP address.
`String`
`systemVersion`
Version of the operating system the application has been run or is running on, as provided by the application.

## Constructor Summary

Constructors
Constructor
Description
`Session()`
Contains information about one session in a Telegram application used by the current user.
`Session(long id, boolean isCurrent, boolean isPasswordPending, int apiId, String applicationName, String applicationVersion, boolean isOfficialApplication, String deviceModel, String platform, String systemVersion, int logInDate, int lastActiveDate, String ip, String country, String region)`
Contains information about one session in a Telegram application used by the current user.
`Session(DataInput input)`
Contains information about one session in a Telegram application used by the current user.

## 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

### id

public long id
Session identifier.

### isCurrent

public boolean isCurrent
True, if this session is the current session.

### isPasswordPending

public boolean isPasswordPending
True, if a password is needed to complete authorization of the session.

### apiId

public int apiId
Telegram API identifier, as provided by the application.

### applicationName

public String applicationName
Name of the application, as provided by the application.

### applicationVersion

public String applicationVersion
The version of the application, as provided by the application.

### isOfficialApplication

public boolean isOfficialApplication
True, if the application is an official application or uses the apiId of an official application.

### deviceModel

public String deviceModel
Model of the device the application has been run or is running on, as provided by the application.

### platform

public String platform
Operating system the application has been run or is running on, as provided by the application.

### systemVersion

public String systemVersion
Version of the operating system the application has been run or is running on, as provided by the application.

### logInDate

public int logInDate
Point in time (Unix timestamp) when the user has logged in.

### lastActiveDate

public int lastActiveDate
Point in time (Unix timestamp) when the session was last used.

### ip

public String ip
IP address from which the session was created, in human-readable format.

### country

public String country
A two-letter country code for the country from which the session was created, based on the IP address.

### region

public String region
Region code from which the session was created, based on the IP address.

### CONSTRUCTOR

public static final int CONSTRUCTOR

See Also:
  - Constant Field Values

## Constructor Details

### Session

public Session()
Contains information about one session in a Telegram application used by the current user. Sessions must be shown to the user in the returned order.

### Session

public Session(long id, boolean isCurrent, boolean isPasswordPending, int apiId, String applicationName, String applicationVersion, boolean isOfficialApplication, String deviceModel, String platform, String systemVersion, int logInDate, int lastActiveDate, String ip, String country, String region)
Contains information about one session in a Telegram application used by the current user. Sessions must be shown to the user in the returned order.

Parameters:
  `id` - long Session identifier.
  `isCurrent` - boolean True, if this session is the current session.
  `isPasswordPending` - boolean True, if a password is needed to complete authorization of the session.
  `apiId` - int Telegram API identifier, as provided by the application.
  `applicationName` - String Name of the application, as provided by the application.
  `applicationVersion` - String The version of the application, as provided by the application.
  `isOfficialApplication` - boolean True, if the application is an official application or uses the apiId of an official application.
  `deviceModel` - String Model of the device the application has been run or is running on, as provided by the application.
  `platform` - String Operating system the application has been run or is running on, as provided by the application.
  `systemVersion` - String Version of the operating system the application has been run or is running on, as provided by the application.
  `logInDate` - int Point in time (Unix timestamp) when the user has logged in.
  `lastActiveDate` - int Point in time (Unix timestamp) when the session was last used.
  `ip` - String IP address from which the session was created, in human-readable format.
  `country` - String A two-letter country code for the country from which the session was created, based on the IP address.
  `region` - String Region code from which the session was created, based on the IP address.

### Session

public Session(DataInput input) throws IOException
Contains information about one session in a Telegram application used by the current user. Sessions must be shown to the user in the returned order.

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`