Module tdlight.api

Class TdApi.KeyboardButtonTypeRequestUser

Enclosing class:
TdApi

public static final class TdApi.KeyboardButtonTypeRequestUser extends TdApi.KeyboardButtonType
A button that requests a user to be shared by the current user; available only in private chats. Use the method shareUserWithBot to complete the request.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Identifier uniquely determining type of the object.
    int
    Unique button identifier.
    boolean
    True, if the shared user must or must not be a bot.
    boolean
    True, if the shared user must or must not be a Telegram Premium user.
    boolean
    True, if the shared user must be a bot; otherwise, the shared user must no be a bot.
    boolean
    True, if the shared user must be a Telegram Premium user; otherwise, the shared user must no be a Telegram Premium user.
  • Constructor Summary

    Constructors
    Constructor
    Description
    A button that requests a user to be shared by the current user; available only in private chats.
    KeyboardButtonTypeRequestUser(int id, boolean restrictUserIsBot, boolean userIsBot, boolean restrictUserIsPremium, boolean userIsPremium)
    A button that requests a user to be shared by the current user; available only in private chats.
    A button that requests a user to be shared by the current user; available only in private chats.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
    Returns an identifier uniquely determining type of the object.
    int
     
    void
    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.
    • restrictUserIsBot

      public boolean restrictUserIsBot
      True, if the shared user must or must not be a bot.
    • userIsBot

      public boolean userIsBot
      True, if the shared user must be a bot; otherwise, the shared user must no be a bot. Ignored if restrictUserIsBot is false.
    • restrictUserIsPremium

      public boolean restrictUserIsPremium
      True, if the shared user must or must not be a Telegram Premium user.
    • userIsPremium

      public boolean userIsPremium
      True, if the shared user must be a Telegram Premium user; otherwise, the shared user must no be a Telegram Premium user. Ignored if restrictUserIsPremium is false.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      Identifier uniquely determining type of the object.
      See Also:
  • Constructor Details

    • KeyboardButtonTypeRequestUser

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

      public KeyboardButtonTypeRequestUser(int id, boolean restrictUserIsBot, boolean userIsBot, boolean restrictUserIsPremium, boolean userIsPremium)
      A button that requests a user to be shared by the current user; available only in private chats. Use the method shareUserWithBot to complete the request.
      Parameters:
      id - Unique button identifier.
      restrictUserIsBot - True, if the shared user must or must not be a bot.
      userIsBot - True, if the shared user must be a bot; otherwise, the shared user must no be a bot. Ignored if restrictUserIsBot is false.
      restrictUserIsPremium - True, if the shared user must or must not be a Telegram Premium user.
      userIsPremium - True, if the shared user must be a Telegram Premium user; otherwise, the shared user must no be a Telegram Premium user. Ignored if restrictUserIsPremium is false.
    • KeyboardButtonTypeRequestUser

      public KeyboardButtonTypeRequestUser(DataInput input) throws IOException
      A button that requests a user to be shared by the current user; available only in private chats. Use the method shareUserWithBot 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