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

Module tdlight.api
Package it.tdlight.jni

# Class TdApi.MessageChatShared

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.MessageContent
it.tdlight.jni.TdApi.MessageChatShared

Enclosing class:
  TdApi

public static final class TdApi.MessageChatShared extends TdApi.MessageContent
The current user shared a chat, which was requested by the bot.

## Field Summary

Fields
Modifier and Type
Field
Description
`int`
`buttonId`
Identifier of the keyboard button with the request.
`long`
`chatId`
Identifier of the shared chat.
`static final int`
`CONSTRUCTOR`

## Constructor Summary

Constructors
Constructor
Description
`MessageChatShared()`
The current user shared a chat, which was requested by the bot.
`MessageChatShared(long chatId, int buttonId)`
The current user shared a chat, which was requested by the bot.
`MessageChatShared(DataInput input)`
The current user shared a chat, which was requested by the bot.

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

### chatId

public long chatId
Identifier of the shared chat.

### buttonId

public int buttonId
Identifier of the keyboard button with the request.

### CONSTRUCTOR

public static final int CONSTRUCTOR

See Also:
  - Constant Field Values

## Constructor Details

### MessageChatShared

public MessageChatShared()
The current user shared a chat, which was requested by the bot.

### MessageChatShared

public MessageChatShared(long chatId, int buttonId)
The current user shared a chat, which was requested by the bot.

Parameters:
  `chatId` - long Identifier of the shared chat.
  `buttonId` - int Identifier of the keyboard button with the request.

### MessageChatShared

public MessageChatShared(DataInput input) throws IOException
The current user shared a chat, which was requested by the bot.

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`