Module tdlight.api
Package it.tdlight.jni

# Class TdApi.KeyboardButtonTypeRequestChat

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.KeyboardButtonType
it.tdlight.jni.TdApi.KeyboardButtonTypeRequestChat

Enclosing class:
  TdApi

public static final class TdApi.KeyboardButtonTypeRequestChat extends TdApi.KeyboardButtonType
A button that requests a chat to be shared by the current user; available only in private chats. Use the method shareChatWithBot to complete the request.

## Field Summary

Fields
Modifier and Type
Field
Description
`TdApi.ChatAdministratorRights`
`botAdministratorRights`
Expected bot administrator rights in the chat; may be null if they aren't restricted.
`boolean`
`botIsMember`
True, if the bot must be a member of the chat; for basic group and supergroup chats only.
`boolean`
`chatHasUsername`
True, if the chat must have a username; otherwise, the chat must not have a username.
`boolean`
`chatIsChannel`
True, if the chat must be a channel; otherwise, a basic group or a supergroup chat is shared.
`boolean`
`chatIsCreated`
True, if the chat must be created by the current user.
`boolean`
`chatIsForum`
True, if the chat must be a forum supergroup; otherwise, the chat must not be a forum supergroup.
`static final int`
`CONSTRUCTOR`
Identifier uniquely determining type of the object.
`int`
`id`
Unique button identifier.
`boolean`
`restrictChatHasUsername`
True, if the chat must or must not have a username.
`boolean`
`restrictChatIsForum`
True, if the chat must or must not be a forum supergroup.
`TdApi.ChatAdministratorRights`
`userAdministratorRights`
Expected user administrator rights in the chat; may be null if they aren't restricted.

## Constructor Summary

Constructors
Constructor
Description
`KeyboardButtonTypeRequestChat()`
A button that requests a chat to be shared by the current user; available only in private chats.
`KeyboardButtonTypeRequestChat(int id, boolean chatIsChannel, boolean restrictChatIsForum, boolean chatIsForum, boolean restrictChatHasUsername, boolean chatHasUsername, boolean chatIsCreated, TdApi.ChatAdministratorRights userAdministratorRights, TdApi.ChatAdministratorRights botAdministratorRights, boolean botIsMember)`
A button that requests a chat to be shared by the current user; available only in private chats.
`KeyboardButtonTypeRequestChat(DataInput input)`
A button that requests a chat to be shared by the current user; available only in private chats.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`int`
`getConstructor()`
Returns an identifier uniquely determining type of the object.
`int`
`hashCode()`
`void`
`serialize(DataOutput output)`
Serialize the TDLib class

### 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 int id
Unique button identifier.

### chatIsChannel

public boolean chatIsChannel
True, if the chat must be a channel; otherwise, a basic group or a supergroup chat is shared.

### restrictChatIsForum

public boolean restrictChatIsForum
True, if the chat must or must not be a forum supergroup.

### chatIsForum

public boolean chatIsForum
True, if the chat must be a forum supergroup; otherwise, the chat must not be a forum supergroup. Ignored if restrictChatIsForum is false.

### restrictChatHasUsername

public boolean restrictChatHasUsername
True, if the chat must or must not have a username.

### chatHasUsername

public boolean chatHasUsername
True, if the chat must have a username; otherwise, the chat must not have a username. Ignored if restrictChatHasUsername is false.

### chatIsCreated

public boolean chatIsCreated
True, if the chat must be created by the current user.

### userAdministratorRights

public TdApi.ChatAdministratorRights userAdministratorRights
Expected user administrator rights in the chat; may be null if they aren't restricted.

### botAdministratorRights

public TdApi.ChatAdministratorRights botAdministratorRights
Expected bot administrator rights in the chat; may be null if they aren't restricted.

### botIsMember

public boolean botIsMember
True, if the bot must be a member of the chat; for basic group and supergroup chats only.

### CONSTRUCTOR

public static final int CONSTRUCTOR
Identifier uniquely determining type of the object.

See Also:
  - Constant Field Values

## Constructor Details

### KeyboardButtonTypeRequestChat

public KeyboardButtonTypeRequestChat()
A button that requests a chat to be shared by the current user; available only in private chats. Use the method shareChatWithBot to complete the request.

### KeyboardButtonTypeRequestChat

public KeyboardButtonTypeRequestChat(int id, boolean chatIsChannel, boolean restrictChatIsForum, boolean chatIsForum, boolean restrictChatHasUsername, boolean chatHasUsername, boolean chatIsCreated, TdApi.ChatAdministratorRights userAdministratorRights, TdApi.ChatAdministratorRights botAdministratorRights, boolean botIsMember)
A button that requests a chat to be shared by the current user; available only in private chats. Use the method shareChatWithBot to complete the request.

Parameters:
  `id` - Unique button identifier.
  `chatIsChannel` - True, if the chat must be a channel; otherwise, a basic group or a supergroup chat is shared.
  `restrictChatIsForum` - True, if the chat must or must not be a forum supergroup.
  `chatIsForum` - True, if the chat must be a forum supergroup; otherwise, the chat must not be a forum supergroup. Ignored if restrictChatIsForum is false.
  `restrictChatHasUsername` - True, if the chat must or must not have a username.
  `chatHasUsername` - True, if the chat must have a username; otherwise, the chat must not have a username. Ignored if restrictChatHasUsername is false.
  `chatIsCreated` - True, if the chat must be created by the current user.
  `userAdministratorRights` - Expected user administrator rights in the chat; may be null if they aren't restricted.
  `botAdministratorRights` - Expected bot administrator rights in the chat; may be null if they aren't restricted.
  `botIsMember` - True, if the bot must be a member of the chat; for basic group and supergroup chats only.

### KeyboardButtonTypeRequestChat

public KeyboardButtonTypeRequestChat(DataInput input) throws IOException
A button that requests a chat to be shared by the current user; available only in private chats. Use the method shareChatWithBot to complete the request.

Parameters:
  `input` - Serialized input
Throws:
  `IOException` - the deserialization failed

## Method Details

### getConstructor

public int getConstructor()
Description copied from class: `TdApi.Object`
Returns an identifier uniquely determining type of the object.

Specified by:
  `getConstructor` in class `TdApi.Object`
Returns:
  this.CONSTRUCTOR

### serialize

public void serialize(DataOutput output) throws IOException
Serialize the TDLib class

Specified by:
  `serialize` in class `TdApi.Object`
Parameters:
  `output` - output data stream
Throws:
  `IOException` - the serialization failed

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`