# TdApi.Proxy (tdlight API 3.3.160 API)
declaration: package: it.tdlight.jni, class: TdApi, class: Proxy

Package it.tdlight.jni

# Class TdApi.Proxy

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

Enclosing class:
  TdApi

    public static class TdApi.Proxy
    extends TdApi.Object

Contains information about a proxy server.

## Field Summary

Fields
Modifier and Type | Field | Description
--- | --- | ---
`static int` | `CONSTRUCTOR` |
`int` | `id` | Unique identifier of the proxy.
`boolean` | `isEnabled` | True, if the proxy is enabled now.
`int` | `lastUsedDate` | Point in time (Unix timestamp) when the proxy was last used; 0 if never.
`int` | `port` | Proxy server port.
`String` | `server` | Proxy server IP address.
`TdApi.ProxyType` | `type` | Type of the proxy.

## Constructor Summary

Constructors
Constructor | Description
--- | ---
`Proxy()` | Contains information about a proxy server.
`Proxy​(int id, String server, int port, int lastUsedDate, boolean isEnabled, TdApi.ProxyType type)` | Contains information about a proxy server.
`Proxy​(DataInput input)` |

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

`getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### id

public int id
Unique identifier of the proxy.

### server

public String server
Proxy server IP address.

### port

public int port
Proxy server port.

### lastUsedDate

public int lastUsedDate
Point in time (Unix timestamp) when the proxy was last used; 0 if never.

### isEnabled

public boolean isEnabled
True, if the proxy is enabled now.

### type

public TdApi.ProxyType type
Type of the proxy.

### CONSTRUCTOR

public static final int CONSTRUCTOR

See Also:
  Constant Field Values

## Constructor Details

### Proxy

public Proxy()
Contains information about a proxy server.

### Proxy

public Proxy​(int id, String server, int port, int lastUsedDate, boolean isEnabled, TdApi.ProxyType type)
Contains information about a proxy server.

Parameters:
  `id` - int Unique identifier of the proxy.
  `server` - String Proxy server IP address.
  `port` - int Proxy server port.
  `lastUsedDate` - int Point in time (Unix timestamp) when the proxy was last used; 0 if never.
  `isEnabled` - boolean True, if the proxy is enabled now.
  `type` - ProxyType Type of the proxy.

### Proxy

public Proxy​(DataInput input) throws IOException

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`