Module tdlight.api
Package it.tdlight.jni

# Class TdApi.CreateForumTopic

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.Function<TdApi.ForumTopicInfo>
it.tdlight.jni.TdApi.CreateForumTopic

Enclosing class:
  TdApi

public static final class TdApi.CreateForumTopic extends TdApi.Function<TdApi.ForumTopicInfo>
Creates a topic in a forum supergroup chat; requires canManageTopics administrator or canCreateTopics member right in the supergroup.

Returns `ForumTopicInfo`

## Field Summary

Fields
Modifier and Type
Field
Description
`long`
`chatId`
Identifier of the chat.
`static final int`
`CONSTRUCTOR`
Identifier uniquely determining type of the object.
`TdApi.ForumTopicIcon`
`icon`
Icon of the topic.
`String`
`name`
Name of the topic; 1-128 characters.

## Constructor Summary

Constructors
Constructor
Description
`CreateForumTopic()`
Creates a topic in a forum supergroup chat; requires canManageTopics administrator or canCreateTopics member right in the supergroup.
`CreateForumTopic(long chatId, String name, TdApi.ForumTopicIcon icon)`
Creates a topic in a forum supergroup chat; requires canManageTopics administrator or canCreateTopics member right in the supergroup.
`CreateForumTopic(DataInput input)`
Creates a topic in a forum supergroup chat; requires canManageTopics administrator or canCreateTopics member right in the supergroup.

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

`toString`

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

`serialize`

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

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

## Field Details

### chatId

public long chatId
Identifier of the chat.

### name

public String name
Name of the topic; 1-128 characters.

### icon

public TdApi.ForumTopicIcon icon
Icon of the topic. Icon color must be one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F. Telegram Premium users can use any custom emoji as topic icon, other users can use only a custom emoji returned by getForumTopicDefaultIcons.

### CONSTRUCTOR

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

See Also:
  - Constant Field Values

## Constructor Details

### CreateForumTopic

public CreateForumTopic()
Creates a topic in a forum supergroup chat; requires canManageTopics administrator or canCreateTopics member right in the supergroup.

Returns `ForumTopicInfo`

### CreateForumTopic

public CreateForumTopic(long chatId, String name, TdApi.ForumTopicIcon icon)
Creates a topic in a forum supergroup chat; requires canManageTopics administrator or canCreateTopics member right in the supergroup.

Returns `ForumTopicInfo`

Parameters:
  `chatId` - Identifier of the chat.
  `name` - Name of the topic; 1-128 characters.
  `icon` - Icon of the topic. Icon color must be one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F. Telegram Premium users can use any custom emoji as topic icon, other users can use only a custom emoji returned by getForumTopicDefaultIcons.

  Returns `ForumTopicInfo`

### CreateForumTopic

public CreateForumTopic(DataInput input) throws IOException
Creates a topic in a forum supergroup chat; requires canManageTopics administrator or canCreateTopics member right in the supergroup.

Returns `ForumTopicInfo`

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`